diff --git a/.appveyor.yml b/.appveyor.yml
index f6fb2b6f36d..6642e3f9eaf 100644
--- a/.appveyor.yml
+++ b/.appveyor.yml
@@ -105,7 +105,7 @@ install:
#
# Clone but don't install pyomo-model-libraries
#
- - "git clone https://github.com/Pyomo/pyomo-model-libraries.git"
+ - "git clone -b expr_dev https://github.com/Pyomo/pyomo-model-libraries.git"
- "python -m pip install git+https://github.com/PyUtilib/pyutilib"
- "python setup.py develop"
#
diff --git a/.gitignore b/.gitignore
index 0190718ab02..4a4cded6005 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,6 +4,7 @@
.ropeproject
# Python generates numerous files when byte compiling / installing packages
+*.pyx
*.pyc
*.pyo
*.egg-info
diff --git a/.travis.yml b/.travis.yml
index 438f10ac1e9..1a029169f39 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -122,7 +122,7 @@ install:
#
# Clone but don't install pyomo-model-libraries
#
- - git clone --quiet https://github.com/Pyomo/pyomo-model-libraries.git
+ - git clone -b expr_dev --quiet https://github.com/Pyomo/pyomo-model-libraries.git
#
# Install PyUtilib (master branch)
#
@@ -163,7 +163,8 @@ script:
- test.pyomo -v --cat=$CATEGORY pyomo `pwd`/pyomo-model-libraries
# Run documentation tests
- - nosetests -v --with-doctest --doctest-extension=.rst doc/OnlineDocs
+ - cd doc/OnlineDocs; make doctests -d; cd ../..
+ # nosetests -v --with-doctest --doctest-extension=.rst doc/OnlineDocs
after_success:
diff --git a/pyomo/repn/ampl_repn.py b/ATTIC/repn/ampl_repn.py
similarity index 99%
rename from pyomo/repn/ampl_repn.py
rename to ATTIC/repn/ampl_repn.py
index dca0be53d0d..2bfe7d6f710 100644
--- a/pyomo/repn/ampl_repn.py
+++ b/ATTIC/repn/ampl_repn.py
@@ -796,9 +796,14 @@ def generate_ampl_repn(exp, idMap=None):
# We need to do this not at the global scope in case someone changed
# the mode after importing the environment.
_using_pyomo4_trees = expr_common.mode == expr_common.Mode.pyomo4_trees
+ _using_pyomo5_trees = expr_common.mode == expr_common.Mode.pyomo5_trees
if idMap is None:
idMap = {}
+ if _using_pyomo5_trees:
+ from pyomo.repn.standard_repn import generate_standard_repn
+ return generate_standard_repn(exp, quadratic=False)
+
if exp is None:
return AmplRepn()
degree = exp.polynomial_degree()
diff --git a/pyomo/repn/canonical_repn.py b/ATTIC/repn/canonical_repn.py
similarity index 93%
rename from pyomo/repn/canonical_repn.py
rename to ATTIC/repn/canonical_repn.py
index da2e50c5120..1f194e33286 100644
--- a/pyomo/repn/canonical_repn.py
+++ b/ATTIC/repn/canonical_repn.py
@@ -1031,6 +1031,72 @@ def pyomo4_generate_canonical_repn(exp, idMap=None, compute_values=True):
{ None: exp, -1 : collect_variables(exp, idMap) } )
+def pyomo5_generate_canonical_repn(exp, idMap=None, compute_values=True):
+ from pyomo.repn.standard_repn import generate_standard_repn
+
+ if idMap is None:
+ idMap = {}
+ srepn = generate_standard_repn(exp, idMap=idMap, compute_values=compute_values)
+
+ if srepn.nonlinear_expr is None and len(srepn.quadratic_coefs) == 0:
+ #
+ # Construct linear canonical repn
+ #
+ rep = pyomo4_CompiledLinearCanonicalRepn()
+ if not (type(srepn.constant) in native_numeric_types and srepn.constant == 0):
+ rep.constant = srepn.constant
+ else:
+ rep.constant = None
+ if len(srepn.linear_vars) > 0:
+ rep.linear = srepn.linear_coefs
+ rep.variables = srepn.linear_vars
+ else:
+ rep.linear = None
+ rep.variables = None
+ else:
+ #
+ # Construct nonlinear canonical repn
+ #
+ ans = {}
+ if not srepn.nonlinear_expr is None:
+ ans[None] = srepn.nonlinear_expr
+
+ #print(srepn)
+ #print(idMap)
+ ans[-1] = {}
+ for v_ in srepn.nonlinear_vars:
+ ans[-1][idMap[None][id(v_)]] = v_
+ for v_ in srepn.linear_vars:
+ ans[-1][idMap[None][id(v_)]] = v_
+ for v1_,v2_ in srepn.quadratic_vars:
+ ans[-1][idMap[None][id(v1_)]] = v1_
+ ans[-1][idMap[None][id(v2_)]] = v2_
+
+ if not (type(srepn.constant) in native_numeric_types and srepn.constant == 0):
+ ans[0] = GeneralCanonicalRepn({None:srepn.constant})
+
+ if len(srepn.linear_vars) > 0:
+ tmp = {}
+ for i in range(len(srepn.linear_vars)):
+ v_ = srepn.linear_vars[i]
+ tmp[ idMap[None][id(v_)] ] = srepn.linear_coefs[i]
+ ans[1] = tmp
+
+ if len(srepn.quadratic_vars) > 0:
+ tmp = {}
+ for i in range(len(srepn.quadratic_vars)):
+ v1_,v2_ = srepn.quadratic_vars[i]
+ if id(v1_) == id(v2_):
+ terms = GeneralCanonicalRepn({idMap[None][id(v1_)]:2})
+ else:
+ terms = GeneralCanonicalRepn({idMap[None][id(v1_)]:1, idMap[None][id(v2_)]:1})
+ tmp[terms] = srepn.quadratic_coefs[i]
+ ans[2] = tmp
+
+ rep = GeneralCanonicalRepn(ans)
+ return rep
+
+
def canonical_is_constant(repn):
"""Return True if the canonical representation is a constant expression"""
if isinstance(repn, dict):
@@ -1079,6 +1145,8 @@ def generate_canonical_repn(exp, idMap=None, compute_values=True):
elif common.mode is common.Mode.pyomo4_trees:
globals()['CompiledLinearCanonicalRepn'] = pyomo4_CompiledLinearCanonicalRepn
return pyomo4_generate_canonical_repn(exp, idMap, compute_values)
+ elif common.mode is common.Mode.pyomo5_trees:
+ return pyomo5_generate_canonical_repn(exp, idMap, compute_values)
else:
raise RuntimeError("Unrecognized expression tree mode")
@@ -1086,5 +1154,7 @@ def generate_canonical_repn(exp, idMap=None, compute_values=True):
CompiledLinearCanonicalRepn = coopr3_CompiledLinearCanonicalRepn
elif common.mode is common.Mode.pyomo4_trees:
CompiledLinearCanonicalRepn = pyomo4_CompiledLinearCanonicalRepn
+elif common.mode is common.Mode.pyomo5_trees:
+ CompiledLinearCanonicalRepn = pyomo4_CompiledLinearCanonicalRepn
else:
raise RuntimeError("Unrecognized expression tree mode")
diff --git a/pyomo/repn/tests/test_canonical.py b/ATTIC/repn/test_canonical.py
similarity index 84%
rename from pyomo/repn/tests/test_canonical.py
rename to ATTIC/repn/test_canonical.py
index 51f0dc67363..2f31700510f 100644
--- a/pyomo/repn/tests/test_canonical.py
+++ b/ATTIC/repn/test_canonical.py
@@ -18,9 +18,10 @@
import pyutilib.th as unittest
import pyutilib.services
-from pyomo.core.base.expr import Expr_if
+from pyomo.core.base import expr_common, expr as EXPR
from pyomo.repn import *
from pyomo.environ import *
+#from pyomo.core.base.expr import Expr_if
from six import iteritems
from six.moves import range
@@ -39,24 +40,23 @@ def linear_repn_to_dict(repn):
if repn.variables is not None:
for i in range(len(repn.variables)):
result[id(repn.variables[i])] = repn.linear[i]
- if repn.constant != None:
+ if repn.constant != None and repn.constant != 0:
result[None] = repn.constant
return result
class Test(unittest.TestCase):
- #def setUp(self):
+ def setUp(self):
#
# Create Model
#
- #self.plugin = SimplePreprocessor()
- #self.plugin.deactivate_action("compute_canonical_repn")
+ EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
def tearDown(self):
if os.path.exists("unknown.lp"):
os.unlink("unknown.lp")
pyutilib.services.TempfileManager.clear_tempfiles()
- #self.plugin.activate_action("compute_canonical_repn")
+ EXPR.set_expression_tree_format(expr_common._default_mode)
def test_abstract_linear_expression(self):
m = AbstractModel()
@@ -66,7 +66,7 @@ def p_init(model, i):
m.p = Param(m.A, initialize=p_init)
m.x = Var(m.A, bounds=(-1,1))
def obj_rule(model):
- return summation(model.p, model.x)
+ return sum_product(model.p, model.x)
m.obj = Objective(rule=obj_rule)
i = m.create_instance()
@@ -89,7 +89,7 @@ def p_init(model, i):
return 2*i
m.p = Param(m.A, initialize=p_init)
m.x = Var(m.A, bounds=(-1,1))
- m.obj = Objective(expr=summation(m.p, m.x))
+ m.obj = Objective(expr=sum_product(m.p, m.x))
rep = generate_canonical_repn(m.obj[None].expr)
# rep should only have variables and linear terms
self.assertTrue(rep.variables != None)
@@ -180,19 +180,21 @@ def test_polynomial_expression(self):
x = [Var(bounds=(-1,1)) for i in I]
expr = x[1]*(x[1]+x[2]) + x[2]*(x[1]+3.0*x[3]*x[3])
rep = generate_canonical_repn(expr)
- # rep should only have [-1,2,3]
+ # rep should only have [None,-1,2]
self.assertEqual(len(rep), 3)
self.assertTrue(2 in rep)
- self.assertTrue(3 in rep)
self.assertTrue(-1 in rep)
+ if expr_common.mode == expr_common.Mode.pyomo5_trees:
+ self.assertTrue(None in rep)
+ else:
+ self.assertTrue(3 in rep)
+ # check the expression encoding
+ self.assertEqual(rep[2], {frozendict({0:2}):1.0,
+ frozendict({0:1, 1:1}):2.0})
# rep[-1] should have the 3 of the 4 variables...
self.assertEqual(rep[-1], { 0: x[1],
1: x[2],
2: x[3] })
- # check the expression encoding
- self.assertEqual(rep[2], {frozendict({0:2}):1.0,
- frozendict({0:1, 1:1}):2.0})
- self.assertEqual(rep[3], {frozendict({1:1, 2:2}):3.0})
def test_polynomial_expression_with_fixed(self):
@@ -204,19 +206,21 @@ def test_polynomial_expression_with_fixed(self):
x[1].set_value(5)
x[1].fixed = True
rep = generate_canonical_repn(expr)
- # rep should only have [-1,0,1,3]
+ # rep should only have [None,-1,0,1]
self.assertEqual(len(rep), 4)
self.assertTrue(0 in rep)
self.assertTrue(1 in rep)
- self.assertTrue(3 in rep)
self.assertTrue(-1 in rep)
+ if expr_common.mode == expr_common.Mode.pyomo5_trees:
+ self.assertTrue(None in rep)
+ else:
+ self.assertTrue(3 in rep)
# rep[-1] should have the 2 of the 4 variables...
self.assertEqual(rep[-1], { 0: x[2],
1: x[3] })
# check the expression encoding
self.assertEqual(rep[0], {None: 25.0})
self.assertEqual(rep[1], {0: 10.0})
- self.assertEqual(rep[3], {frozendict({0:1, 1:2}):3.0})
def test_linear_expression_with_constant_division(self):
@@ -226,7 +230,7 @@ def p_init(model, i):
return 2*i
m.p = Param(m.A, initialize=p_init)
m.x = Var(m.A, bounds=(-1,1))
- expr = summation(m.p, m.x)/2.0
+ expr = sum_product(m.p, m.x)/2.0
rep = generate_canonical_repn(expr)
# rep should only have only variables and linear terms
@@ -249,10 +253,10 @@ def p_init(model, i):
m.x = Var(m.A, bounds=(-1,1))
m.y = Var(initialize=2.0)
m.y.fixed = True
- expr = summation(m.p, m.x)/m.y
+ expr = sum_product(m.p, m.x)/m.y
rep = generate_canonical_repn(expr)
- # rep should only have variables and linearm terms
+ # rep should only have variables and linear terms
self.assertTrue(rep.linear != None)
self.assertTrue(rep.constant == None)
self.assertTrue(rep.variables != None)
@@ -273,7 +277,7 @@ def p_init(model, i):
m.x = Var(m.A, bounds=(-1,1))
m.y = Var(initialize=1.0)
m.y.fixed = True
- expr = summation(m.p, m.x)/(m.y+1)
+ expr = sum_product(m.p, m.x)/(m.y+1)
rep = generate_canonical_repn(expr)
# rep should only have variable and a linear component
@@ -288,7 +292,7 @@ def p_init(model, i):
self.assertEqual(baseline,
linear_repn_to_dict(rep))
- def test_expr_rational_summation(self):
+ def test_expr_rational_sum_product(self):
m = ConcreteModel()
m.A = RangeSet(1,3)
def p_init(model, i):
@@ -296,7 +300,7 @@ def p_init(model, i):
m.p = Param(m.A, initialize=p_init)
m.x = Var(m.A, bounds=(-1,1))
m.y = Var(initialize=1.0)
- expr = summation(m.p, m.x)/(1+m.y)
+ expr = sum_product(m.p, m.x)/(1+m.y)
rep = generate_canonical_repn(expr)
# rep should only have [-1,None]
@@ -359,15 +363,22 @@ def test_general_nonlinear(self):
expr = x[1] + 5*cos(x[2])
rep = generate_canonical_repn(expr)
- # rep should only have [-1,None]
- self.assertEqual(len(rep), 2)
+
self.assertTrue(None in rep)
self.assertTrue(-1 in rep)
+ if expr_common.mode == expr_common.Mode.pyomo5_trees:
+ # rep should only have [-1,None,1]
+ self.assertEqual(len(rep), 3)
+ self.assertTrue(1 in rep)
+ self.assertEqual(rep[1], { 0: 1})
+ else:
+ # rep should only have [-1,None]
+ self.assertEqual(len(rep), 2)
+ self.assertIs(rep[None], expr)
# rep[-1] should have 2 variables...
self.assertEqual(rep[-1], { 0: x[1],
1: x[2] })
# check the expression encoding
- self.assertIs(rep[None], expr)
def test_general_nonlinear_fixed(self):
I = range(3)
@@ -379,7 +390,7 @@ def test_general_nonlinear_fixed(self):
x[2].fixed = True
rep = generate_canonical_repn(expr)
- # rep should only have variables, a constsant, and linear terms
+ # rep should only have variables, a constants, and linear terms
self.assertTrue(isinstance(rep, LinearCanonicalRepn) == True)
self.assertTrue(rep.variables != None)
self.assertTrue(rep.linear != None)
@@ -467,13 +478,13 @@ def test_Expression_nonindexed(self):
rep1 = generate_canonical_repn(m.x**2, {})
self.assertEqual(rep1, rep)
- rep = generate_canonical_repn(m.e+cos(m.y), {})
- rep1 = generate_canonical_repn(m.x**2+cos(m.y), {})
- self.assertEqual(rep1, rep)
+ #rep = generate_canonical_repn(m.e+cos(m.y), {})
+ #rep1 = generate_canonical_repn(m.x**2+cos(m.y), {})
+ #self.assertEqual(rep1, rep)
- rep = generate_canonical_repn(m.e+cos(m.e), {})
- rep1 = generate_canonical_repn(m.x**2+cos(m.x**2), {})
- self.assertEqual(rep1, rep)
+ #rep = generate_canonical_repn(m.e+cos(m.e), {})
+ #rep1 = generate_canonical_repn(m.x**2+cos(m.x**2), {})
+ #self.assertEqual(rep1, rep)
def test_Expression_indexed(self):
m = ConcreteModel()
@@ -523,20 +534,20 @@ def test_Expression_indexed(self):
rep1 = generate_canonical_repn(m.x**2, {})
self.assertEqual(rep1, rep)
- rep = generate_canonical_repn(m.e[1]+cos(m.y), {})
- rep1 = generate_canonical_repn(m.x**2+cos(m.y), {})
- self.assertEqual(rep1, rep)
+ #rep = generate_canonical_repn(m.e[1]+cos(m.y), {})
+ #rep1 = generate_canonical_repn(m.x**2+cos(m.y), {})
+ #self.assertEqual(rep1, rep)
- rep = generate_canonical_repn(m.e[1]+cos(m.e[1]), {})
- rep1 = generate_canonical_repn(m.x**2+cos(m.x**2), {})
- self.assertEqual(rep1, rep)
+ #rep = generate_canonical_repn(m.e[1]+cos(m.e[1]), {})
+ #rep1 = generate_canonical_repn(m.x**2+cos(m.x**2), {})
+ #self.assertEqual(rep1, rep)
def test_Expr_if_constant(self):
model = ConcreteModel()
model.x = Var()
model.x.fix(2.0)
- rep = generate_canonical_repn(Expr_if(IF=model.x, THEN=1, ELSE=-1))
+ rep = generate_canonical_repn(EXPR.Expr_if(IF=model.x, THEN=1, ELSE=-1))
self.assertTrue(isinstance(rep, LinearCanonicalRepn) == True)
self.assertTrue(rep.linear == None)
self.assertTrue(rep.constant != None)
@@ -544,7 +555,7 @@ def test_Expr_if_constant(self):
baseline = { None : 1}
self.assertEqual(baseline,
linear_repn_to_dict(rep))
- rep = generate_canonical_repn(Expr_if(IF=model.x**2, THEN=1, ELSE=-1))
+ rep = generate_canonical_repn(EXPR.Expr_if(IF=model.x**2, THEN=1, ELSE=-1))
self.assertTrue(isinstance(rep, LinearCanonicalRepn) == True)
self.assertTrue(rep.linear == None)
self.assertTrue(rep.constant != None)
@@ -552,7 +563,7 @@ def test_Expr_if_constant(self):
baseline = { None : 1}
self.assertEqual(baseline,
linear_repn_to_dict(rep))
- rep = generate_canonical_repn(Expr_if(IF=(1-cos(model.x-1)) > 0.5, THEN=1, ELSE=-1))
+ rep = generate_canonical_repn(EXPR.Expr_if(IF=(1-cos(model.x-1)) > 0.5, THEN=1, ELSE=-1))
self.assertTrue(isinstance(rep, LinearCanonicalRepn) == True)
self.assertTrue(rep.linear == None)
self.assertTrue(rep.constant != None)
@@ -560,7 +571,7 @@ def test_Expr_if_constant(self):
baseline = { None : -1}
self.assertEqual(baseline,
linear_repn_to_dict(rep))
- rep = generate_canonical_repn(Expr_if(IF=1, THEN=model.x, ELSE=-1))
+ rep = generate_canonical_repn(EXPR.Expr_if(IF=1, THEN=model.x, ELSE=-1))
self.assertTrue(isinstance(rep, LinearCanonicalRepn) == True)
self.assertTrue(rep.linear == None)
self.assertTrue(rep.constant != None)
@@ -568,7 +579,7 @@ def test_Expr_if_constant(self):
baseline = { None : value(model.x)}
self.assertEqual(baseline,
linear_repn_to_dict(rep))
- rep = generate_canonical_repn(Expr_if(IF=0, THEN=1, ELSE=model.x))
+ rep = generate_canonical_repn(EXPR.Expr_if(IF=0, THEN=1, ELSE=model.x))
self.assertTrue(isinstance(rep, LinearCanonicalRepn) == True)
self.assertTrue(rep.linear == None)
self.assertTrue(rep.constant != None)
@@ -582,7 +593,7 @@ def test_Expr_if_linear(self):
model.x = Var()
model.y = Var()
- rep = generate_canonical_repn(Expr_if(IF=1, THEN=model.x+3*model.y+10, ELSE=-1))
+ rep = generate_canonical_repn(EXPR.Expr_if(IF=1, THEN=model.x+3*model.y+10, ELSE=-1))
self.assertTrue(isinstance(rep, LinearCanonicalRepn) == True)
self.assertTrue(rep.linear != None)
self.assertTrue(rep.constant != None)
@@ -593,7 +604,7 @@ def test_Expr_if_linear(self):
self.assertEqual(baseline,
linear_repn_to_dict(rep))
- rep = generate_canonical_repn(Expr_if(IF=0.0, THEN=1.0, ELSE=-model.x))
+ rep = generate_canonical_repn(EXPR.Expr_if(IF=0.0, THEN=1.0, ELSE=-model.x))
self.assertTrue(isinstance(rep, LinearCanonicalRepn) == True)
self.assertTrue(rep.linear != None)
self.assertTrue(rep.constant == None)
@@ -607,10 +618,10 @@ def test_Expr_if_quadratic(self):
model = ConcreteModel()
model.x = Var()
- rep = generate_canonical_repn(Expr_if(IF=1.0, THEN=model.x**2, ELSE=-1.0))
+ rep = generate_canonical_repn(EXPR.Expr_if(IF=1.0, THEN=model.x**2, ELSE=-1.0))
self.assertTrue(isinstance(rep, GeneralCanonicalRepn) == True)
self.assertEqual(canonical_degree(rep), 2)
- rep = generate_canonical_repn(Expr_if(IF=0.0, THEN=1.0, ELSE=-model.x**2))
+ rep = generate_canonical_repn(EXPR.Expr_if(IF=0.0, THEN=1.0, ELSE=-model.x**2))
self.assertTrue(isinstance(rep, GeneralCanonicalRepn) == True)
self.assertEqual(canonical_degree(rep), 2)
@@ -618,17 +629,41 @@ def test_Expr_if_nonlinear(self):
model = ConcreteModel()
model.x = Var()
- rep = generate_canonical_repn(Expr_if(IF=model.x, THEN=1.0, ELSE=-1.0))
+ rep = generate_canonical_repn(EXPR.Expr_if(IF=model.x, THEN=1.0, ELSE=-1.0))
self.assertTrue(isinstance(rep, GeneralCanonicalRepn) == True)
self.assertEqual(canonical_degree(rep), None)
- rep = generate_canonical_repn(Expr_if(IF=1.0,
- THEN=Expr_if(IF=model.x**2, THEN=1.0, ELSE=-1.0),
+ rep = generate_canonical_repn(EXPR.Expr_if(IF=1.0,
+ THEN=EXPR.Expr_if(IF=model.x**2, THEN=1.0, ELSE=-1.0),
ELSE=-1.0))
self.assertTrue(isinstance(rep, GeneralCanonicalRepn) == True)
self.assertEqual(canonical_degree(rep), None)
- rep = generate_canonical_repn(Expr_if(IF=model.x**2, THEN=1.0, ELSE=-1.0))
+ rep = generate_canonical_repn(EXPR.Expr_if(IF=model.x**2, THEN=1.0, ELSE=-1.0))
self.assertTrue(isinstance(rep, GeneralCanonicalRepn) == True)
self.assertEqual(canonical_degree(rep), None)
+
+class Test_pyomo5(Test):
+
+ def setUp(self):
+ # This class tests the Pyomo 5.x expression trees
+ Test.setUp(self)
+ EXPR.set_expression_tree_format(expr_common.Mode.pyomo5_trees)
+
+ def tearDown(self):
+ EXPR.set_expression_tree_format(expr_common._default_mode)
+ Test.tearDown(self)
+
+ @unittest.skipIf(True, "Pyomo5 does not recognize rational expressions.")
+ def test_expr_rational(self):
+ pass
+
+ @unittest.skipIf(True, "Pyomo5 does not recognize rational expressions.")
+ def test_expr_rational_sum_product(self):
+ pass
+
+ @unittest.skipIf(True, "Pyomo5 does not recognize rational expressions.")
+ def test_expr_rational_fixed(self):
+ pass
+
if __name__ == "__main__":
unittest.main()
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index 098e6d78c1e..e3c61a765da 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -11,6 +11,7 @@ Current Development
- Wrap Vars in value() for assignment to numpy vectors (#436)
- Adding TerminationCondition and SolverStatus to pyomo.environ (#429)
- Resolved problems with ExternalFunctions with fixed arguments (#442)
+- Adding the Pyomo5 expression system, which supports PyPy (#272)
-------------------------------------------------------------------------------
Pyomo 5.5
@@ -69,6 +70,7 @@ Pyomo 5.4.1
Pyomo 5.4
-------------------------------------------------------------------------------
+=======
- Remove checks for is_indexed from PersistentSolver methods (#366)
- GDP rewrite (#354)
- Updated gdp.chull to handle named expressions (#318)
diff --git a/admin/performance/convert_perf.py b/admin/performance/convert_perf.py
new file mode 100644
index 00000000000..c60443ec26f
--- /dev/null
+++ b/admin/performance/convert_perf.py
@@ -0,0 +1,449 @@
+#
+# This script runs performance tests while converting a model
+#
+
+from pyomo.environ import *
+import pyomo.version
+from pyomo.core.base.expr_common import _clear_expression_pool
+from pyomo.core.base import expr as EXPR
+
+import pprint as pp
+import gc
+import time
+try:
+ import pympler
+ pympler_available=True
+ pympler_kwds = {}
+except:
+ pympler_available=False
+import sys
+import argparse
+import re
+import pyutilib.subprocess
+
+## TIMEOUT LOGIC
+from functools import wraps
+import errno
+import os
+import signal
+
+
+class TimeoutError(Exception):
+ pass
+
+class timeout:
+ def __init__(self, seconds=10, error_message='Timeout'):
+ self.seconds = seconds
+ self.error_message = error_message
+ def handle_timeout(self, signum, frame):
+ raise TimeoutError(self.error_message)
+ def __enter__(self):
+ signal.signal(signal.SIGALRM, self.handle_timeout)
+ signal.alarm(self.seconds)
+ def __exit__(self, type, value, traceback):
+ signal.alarm(0)
+
+
+_bin = {'COOPR3': '/Users/wehart/src/pyomo/py36/bin',
+ 'PYOMO5': os.path.abspath('../../../../bin'),
+ 'PYPY': '/Users/wehart/src/pyomo/pypy/bin'
+ }
+#exdir = '../../../pyomo_prod/examples/performance'
+exdir = '../../examples/performance'
+
+large = True
+_timeout = 20
+#N = 30
+N = 1
+
+
+parser = argparse.ArgumentParser()
+parser.add_argument("-o", "--output", help="Save results to the specified file", action="store", default=None)
+parser.add_argument("-t", "--type", help="Specify the file type to test", action="store", default=None)
+parser.add_argument("-v", "--verbose", help="Run just a single trial in verbose mode", action="store_true", default=False)
+parser.add_argument("--ntrials", help="The number of test trials", action="store", type=int, default=None)
+args = parser.parse_args()
+
+if args.ntrials:
+ N = args.ntrials
+print("NTrials %d\n\n" % N)
+
+
+#
+# Execute a function 'n' times, collecting performance statistics and
+# averaging them
+#
+def measure(f, n=25):
+ """measure average execution time over n trials"""
+ data = []
+ for i in range(n):
+ data.append(f())
+ sys.stdout.write('.')
+ sys.stdout.flush()
+ sys.stdout.write('\n')
+ #
+ ans = {}
+ for key in data[0]:
+ d_ = []
+ for i in range(n):
+ d_.append( data[i][key] )
+ ans[key] = {"mean": sum(d_)/float(n), "data": d_}
+ #
+ return ans
+
+
+#
+# Evaluate Pyomo output
+#
+def evaluate(logfile, seconds, verbose):
+ with open(logfile, 'r') as OUTPUT:
+ if verbose:
+ sys.stdout.write("*" * 50 + "\n")
+
+ for line in OUTPUT:
+ if verbose:
+ sys.stdout.write(line)
+ tokens = re.split('[ \t]+', line.strip())
+ #print(tokens)
+ if len(tokens) < 2:
+ pass
+ elif tokens[1] == 'seconds' and tokens[2] == 'required':
+ if tokens[3:5] == ['to', 'construct']:
+ seconds['construct'] = float(tokens[0])
+ elif tokens[3:6] == ['to', 'write', 'file']:
+ seconds['write_problem'] = float(tokens[0])
+ elif tokens[3:6] == ['to', 'read', 'logfile']:
+ seconds['read_logfile'] = float(tokens[0])
+ elif tokens[3:6] == ['to', 'read', 'solution']:
+ seconds['read_solution'] = float(tokens[0])
+ elif tokens[3:5] == ['for', 'solver']:
+ seconds['solver'] = float(tokens[0])
+ elif tokens[3:5] == ['for', 'presolve']:
+ seconds['presolve'] = float(tokens[0])
+ elif tokens[3:5] == ['for', 'postsolve']:
+ seconds['postsolve'] = float(tokens[0])
+ elif tokens[3:6] == ['for', 'problem', 'transformations']:
+ seconds['transformations'] = float(tokens[0])
+
+ if verbose:
+ sys.stdout.write("*" * 50 + "\n")
+ return seconds
+
+
+#
+# Convert a test problem
+#
+def run_pyomo(code, format_, problem, verbose, cwd=None):
+
+ if verbose:
+ options = "" # TODO
+ else:
+ options = ""
+
+ def f():
+ cmd = _bin[code] + '/pyomo convert --report-timing --output=file.%s %s %s' % (format_, options, problem)
+ _cwd = os.getcwd()
+ if not cwd is None:
+ os.chdir(cwd)
+ if verbose:
+ print("Command: %s" % cmd)
+ res = pyutilib.subprocess.run(cmd, outfile='pyomo.out', verbose=verbose)
+ if res[0] != 0:
+ print("Aborting performance testing!")
+ sys.exit(1)
+
+ seconds = {}
+ eval_ = evaluate('pyomo.out', seconds, verbose)
+ os.chdir(_cwd)
+ return eval_
+
+ return f
+
+#
+# Convert a test problem
+#
+def run_script(code, format_, problem, verbose, cwd=None):
+
+ if verbose:
+ options = "" # TODO
+ else:
+ options = ""
+
+ def f():
+ cmd = _bin[code] + '/lpython %s pyomo.%s' % (problem, format_)
+ if verbose:
+ print("Command: %s" % cmd)
+ _cwd = os.getcwd()
+ os.chdir(cwd)
+ res = pyutilib.subprocess.run(cmd, outfile='pyomo.out', verbose=verbose)
+ os.chdir(_cwd)
+ if res[0] != 0:
+ print("Aborting performance testing!")
+ sys.exit(1)
+
+ seconds = {}
+ return evaluate(cwd+'/pyomo.out', seconds, verbose)
+
+ return f
+
+
+#
+# Utility function used by runall()
+#
+def print_results(factors_, ans_, output):
+ if output:
+ print(factors_)
+ pp.pprint(ans_)
+ print("")
+
+#
+# Run the experiments and populate the dictionary 'res'
+# with the mapping: factors -> performance results
+#
+# Performance results are a mapping: name -> seconds
+#
+def runall(factors, res, output=True, filetype=None, verbose=False):
+
+ code = factors[0]
+
+ def pmedian1(name, num):
+ testname = 'pmedian1_%d' % num
+ if not filetype or filetype == name:
+ factors_ = tuple(factors+[name,testname])
+ print("TESTING: %s" % " ".join(factors_))
+ ans_ = res[factors_] = measure(run_pyomo(code, name, "%s/pmedian/pmedian1.py %s/pmedian/pmedian.test%d.dat" % (exdir, exdir, num), verbose), n=N)
+ if not verbose:
+ print_results(factors_, ans_, output)
+
+ def pmedian2(name, num):
+ testname = 'pmedian2_%d' % num
+ if not filetype or filetype == name:
+ factors_ = tuple(factors+[name,testname])
+ print("TESTING: %s" % " ".join(factors_))
+ ans_ = res[factors_] = measure(run_pyomo(code, name, "%s/pmedian/pmedian2.py %s/pmedian/pmedian.test%d.dat" % (exdir, exdir, num), verbose), n=N)
+ if not verbose:
+ print_results(factors_, ans_, output)
+
+ def bilinear1(name, num):
+ testname = 'bilinear1_%d' % num
+ if not filetype or filetype == name:
+ factors_ = tuple(factors+[name,testname])
+ print("TESTING: %s" % " ".join(factors_))
+ ans_ = res[factors_] = measure(run_pyomo(code, name, "%s/misc/bilinear1_%d.py" % (exdir, num), verbose), n=N)
+ if not verbose:
+ print_results(factors_, ans_, output)
+
+ def bilinear2(name, num):
+ testname = 'bilinear2_%d' % num
+ if not filetype or filetype == name:
+ factors_ = tuple(factors+[name,testname])
+ print("TESTING: %s" % " ".join(factors_))
+ ans_ = res[factors_] = measure(run_pyomo(code, name, "%s/misc/bilinear2_%d.py" % (exdir, num), verbose), n=N)
+ if not verbose:
+ print_results(factors_, ans_, output)
+
+ def diag1(name, num):
+ testname = 'diag1_%d' % num
+ if not filetype or filetype == name:
+ factors_ = tuple(factors+[name,testname])
+ print("TESTING: %s" % " ".join(factors_))
+ ans_ = res[factors_] = measure(run_pyomo(code, name, "%s/misc/diag1_%d.py" % (exdir, num), verbose), n=N)
+ if not verbose:
+ print_results(factors_, ans_, output)
+
+ def diag2(name, num):
+ testname = 'diag2_%d' % num
+ if not filetype or filetype == name:
+ factors_ = tuple(factors+[name,testname])
+ print("TESTING: %s" % " ".join(factors_))
+ ans_ = res[factors_] = measure(run_pyomo(code, name, "%s/misc/diag2_%d.py" % (exdir, num), verbose), n=N)
+ if not verbose:
+ print_results(factors_, ans_, output)
+
+ def stochpdegas1(name, num):
+ testname = 'stochpdegas1_%d' % num
+ if not filetype or filetype == name:
+ factors_ = tuple(factors+[name,testname])
+ print("TESTING: %s" % " ".join(factors_))
+ ans_ = res[factors_] = measure(run_script(code, name, "run_stochpdegas1_automatic.py", verbose, cwd='%s/dae/' % exdir), n=N)
+ if not verbose:
+ print_results(factors_, ans_, output)
+
+ def dcopf1(name, num):
+ testname = 'dcopf1_%d' % num
+ if not filetype or filetype == name:
+ factors_ = tuple(factors+[name,testname])
+ print("TESTING: %s" % " ".join(factors_))
+ ans_ = res[factors_] = measure(run_script(code, name, "perf_test_dcopf_case2383wp.py", verbose, cwd='%s/dcopf/' % exdir), n=N)
+ if not verbose:
+ print_results(factors_, ans_, output)
+
+ def uc1(name, num):
+ testname = 'uc1_%d' % num
+ if not filetype or filetype == name:
+ factors_ = tuple(factors+[name,testname])
+ print("TESTING: %s" % " ".join(factors_))
+ ans_ = res[factors_] = measure(run_pyomo(code, name, "%s/uc/ReferenceModel.py %s/uc/2014-09-01-expected.dat" % (exdir, exdir), verbose), n=N)
+ if not verbose:
+ print_results(factors_, ans_, output)
+
+ def jump_clnlbeam(name, num):
+ testname = 'jump_clnlbeam_%d' % num
+ if not filetype or filetype == name:
+ factors_ = tuple(factors+[name,testname])
+ print("TESTING: %s" % " ".join(factors_))
+ ans_ = res[factors_] = measure(run_pyomo(code, name, "%s/jump/clnlbeam.py %s/jump/clnlbeam-%d.dat" % (exdir, exdir, num), verbose), n=N)
+ if not verbose:
+ print_results(factors_, ans_, output)
+
+ def jump_facility(name, num):
+ testname = 'jump_facility'
+ if not filetype or filetype == name:
+ factors_ = tuple(factors+[name,testname])
+ print("TESTING: %s" % " ".join(factors_))
+ ans_ = res[factors_] = measure(run_pyomo(code, name, "%s/jump/facility.py" % exdir, verbose), n=N)
+ if not verbose:
+ print_results(factors_, ans_, output)
+
+ def jump_lqcp(name, num):
+ testname = 'jump_lqcp'
+ if not filetype or filetype == name:
+ factors_ = tuple(factors+[name,testname])
+ print("TESTING: %s" % " ".join(factors_))
+ ans_ = res[factors_] = measure(run_pyomo(code, name, "%s/jump/lqcp.py" % exdir, verbose), n=N)
+ if not verbose:
+ print_results(factors_, ans_, output)
+
+ def jump_opf(name, num):
+ testname = 'jump_opf_%d' % num
+ if not filetype or filetype == name:
+ factors_ = tuple(factors+[name,testname])
+ print("TESTING: %s" % " ".join(factors_))
+ ans_ = res[factors_] = measure(run_pyomo(code, name, "opf_%dbus.py" % num, verbose, cwd="%s/jump" % exdir), n=N)
+ if not verbose:
+ print_results(factors_, ans_, output)
+
+
+ if True:
+ #jump_clnlbeam('nl', 500000)
+ #jump_opf('nl', 66200)
+ if large:
+ jump_clnlbeam('nl', 50000)
+ jump_opf('nl', 6620)
+ else:
+ jump_clnlbeam('nl', 5000)
+ jump_opf('nl', 662)
+ jump_facility('nl', 0)
+ jump_lqcp('nl', 0)
+
+ if True:
+ if large:
+ dcopf1('lp', 0)
+ dcopf1('nl', 0)
+ else:
+ dcopf1('lp', 0)
+ dcopf1('nl', 0)
+
+ if True:
+ if large:
+ stochpdegas1('nl', 0)
+ else:
+ stochpdegas1('nl', 0)
+
+ if True:
+ if large:
+ uc1('lp', 0)
+ uc1('nl', 0)
+ else:
+ uc1('lp', 0)
+ uc1('nl', 0)
+
+ if True:
+ if large:
+ pmedian1('lp',8)
+ pmedian1('nl',8)
+ else:
+ pmedian1('lp',4)
+ pmedian1('nl',4)
+
+ if True:
+ if large:
+ pmedian2('lp',8)
+ pmedian2('nl',8)
+ else:
+ pmedian2('lp',4)
+ pmedian2('nl',4)
+
+ if True:
+ if large:
+ bilinear1('lp',100000)
+ bilinear1('nl',100000)
+ else:
+ bilinear1('lp',100)
+ bilinear1('nl',100)
+
+ if True:
+ if large:
+ bilinear2('lp',100000)
+ bilinear2('nl',100000)
+ else:
+ bilinear2('lp',100)
+ bilinear2('nl',100)
+
+ if True:
+ if large:
+ diag1('lp',100000)
+ diag1('nl',100000)
+ else:
+ diag1('lp',100)
+ diag1('nl',100)
+
+ if True:
+ if large:
+ diag2('lp',100000)
+ diag2('nl',100000)
+ else:
+ diag2('lp',100)
+ diag2('nl',100)
+
+
+def remap_keys(mapping):
+ return [{'factors':k, 'performance': v} for k, v in mapping.items()]
+
+#
+# MAIN
+#
+res = {}
+
+runall(['COOPR3'], res, filetype=args.type, verbose=args.verbose)
+runall(['PYOMO5'], res, filetype=args.type, verbose=args.verbose)
+runall(['PYPY'], res, filetype=args.type, verbose=args.verbose)
+
+
+
+if args.output:
+ if args.output.endswith(".csv"):
+ #
+ # Write csv file
+ #
+ perf_types = sorted(next(iter(res.values())).keys())
+ res_ = [ list(key) + [res.get(key,{}).get(k,{}).get('mean',-777) for k in perf_types] for key in sorted(res.keys())]
+ with open(args.output, 'w') as OUTPUT:
+ import csv
+ writer = csv.writer(OUTPUT)
+ writer.writerow(['Version', 'ExprType', 'ExprNum'] + perf_types)
+ for line in res_:
+ writer.writerow(line)
+
+ elif args.output.endswith(".json"):
+ res_ = {'script': sys.argv[0], 'NTrials':N, 'data': remap_keys(res), 'pyomo_version':pyomo.version.version, 'pyomo_versioninfo':pyomo.version.version_info[:3]}
+ #
+ # Write json file
+ #
+ with open(args.output, 'w') as OUTPUT:
+ import json
+ json.dump(res_, OUTPUT)
+
+ else:
+ print("Unknown output format for file '%s'" % args.output)
+
diff --git a/admin/performance/expr_perf.py b/admin/performance/expr_perf.py
index 89325f26373..3cd19994be5 100644
--- a/admin/performance/expr_perf.py
+++ b/admin/performance/expr_perf.py
@@ -25,7 +25,12 @@
import os
import signal
-coopr3_or_pyomo4 = True
+try:
+ RecursionError
+except:
+ RecursionError = RuntimeError
+
+coopr3_or_pyomo4 = False
#
# Dummy Sum() function used for Coopr3 tests
#
@@ -51,9 +56,10 @@ def __exit__(self, type, value, traceback):
_timeout = 20
+#NTerms = 100
+#N = 1
NTerms = 100000
-N = 30
-
+N = 30
parser = argparse.ArgumentParser()
parser.add_argument("-o", "--output", help="Save results to the specified file", action="store", default=None)
@@ -100,22 +106,26 @@ def evaluate(expr, seconds):
except:
seconds['size'] = -1
- gc.collect()
- _clear_expression_pool()
- try:
- with timeout(seconds=_timeout):
- start = time.time()
- expr = EXPR.compress_expression(expr, verbose=False)
- stop = time.time()
- seconds['compress'] = stop-start
- seconds['compressed_size'] = expr.size()
- except TimeoutError:
- print("TIMEOUT")
- seconds['compressed_size'] = -999.0
- except:
- seconds['compressed_size'] = 0
+ if False:
+ #
+ # Compression is no longer necessary
+ #
+ gc.collect()
+ _clear_expression_pool()
+ try:
+ with timeout(seconds=_timeout):
+ start = time.time()
+ expr = EXPR.compress_expression(expr, verbose=False)
+ stop = time.time()
+ seconds['compress'] = stop-start
+ seconds['compressed_size'] = expr.size()
+ except TimeoutError:
+ print("TIMEOUT")
+ seconds['compressed_size'] = -999.0
+ except:
+ seconds['compressed_size'] = 0
- # NOTE: All other tests after this are on the compressed expression!
+ # NOTE: All other tests after this are on the compressed expression!
gc.collect()
_clear_expression_pool()
@@ -191,6 +201,34 @@ def evaluate(expr, seconds):
print("TIMEOUT")
seconds['generate_repn'] = -999.0
+ gc.collect()
+ _clear_expression_pool()
+ try:
+ with timeout(seconds=_timeout):
+ start = time.time()
+ s_ = expr.is_constant()
+ stop = time.time()
+ seconds['is_constant'] = stop-start
+ except RecursionError:
+ seconds['is_constant'] = -888.0
+ except TimeoutError:
+ print("TIMEOUT")
+ seconds['is_constant'] = -999.0
+
+ gc.collect()
+ _clear_expression_pool()
+ try:
+ with timeout(seconds=_timeout):
+ start = time.time()
+ s_ = expr.is_fixed()
+ stop = time.time()
+ seconds['is_fixed'] = stop-start
+ except RecursionError:
+ seconds['is_fixed'] = -888.0
+ except TimeoutError:
+ print("TIMEOUT")
+ seconds['is_fixed'] = -999.0
+
if coopr3_or_pyomo4:
gc.collect()
_clear_expression_pool()
@@ -220,24 +258,6 @@ def evaluate_all(expr, seconds):
except:
seconds['size'] = -1
- gc.collect()
- _clear_expression_pool()
- try:
- with timeout(seconds=_timeout):
- start = time.time()
- for e in expr:
- EXPR.compress_expression(e, verbose=False)
- stop = time.time()
- seconds['compress'] = stop-start
- seconds['compressed_size'] = expr.size()
- except TimeoutError:
- print("TIMEOUT")
- seconds['compressed_size'] = -999.0
- except:
- seconds['compressed_size'] = 0
-
- # NOTE: All other tests after this are on the compressed expression!
-
gc.collect()
_clear_expression_pool()
try:
@@ -301,6 +321,14 @@ def evaluate_all(expr, seconds):
if not coopr3_or_pyomo4:
gc.collect()
_clear_expression_pool()
+ if True:
+ from pyomo.repn import generate_standard_repn
+ with timeout(seconds=_timeout):
+ start = time.time()
+ for e in expr:
+ generate_standard_repn(e, quadratic=False)
+ stop = time.time()
+ seconds['generate_repn'] = stop-start
try:
from pyomo.repn import generate_standard_repn
with timeout(seconds=_timeout):
@@ -362,43 +390,85 @@ def f():
nclones = ctr.count
with timeout(seconds=_timeout):
- start = time.time()
#
if flag == 1:
- expr = summation(model.p, model.x)
+ start = time.time()
+ expr = sum_product(model.p, model.x)
+ stop = time.time()
elif flag == 2:
+ start = time.time()
expr=sum(model.p[i]*model.x[i] for i in model.A)
+ stop = time.time()
elif flag == 3:
+ start = time.time()
expr=0
for i in model.A:
expr += model.p[i] * model.x[i]
+ stop = time.time()
elif flag == 4:
+ start = time.time()
expr=0
for i in model.A:
expr = expr + model.p[i] * model.x[i]
+ stop = time.time()
elif flag == 5:
+ start = time.time()
expr=0
for i in model.A:
expr = model.p[i] * model.x[i] + expr
+ stop = time.time()
elif flag == 6:
+ start = time.time()
expr=Sum(model.p[i]*model.x[i] for i in model.A)
+ stop = time.time()
+ elif flag == 7:
+ start = time.time()
+ expr=0
+ for i in model.A:
+ expr += model.p[i] * (1 + model.x[i])
+ stop = time.time()
+ elif flag == 8:
+ start = time.time()
+ expr=0
+ for i in model.A:
+ expr += (model.x[i]+model.x[i])
+ stop = time.time()
+ elif flag == 9:
+ start = time.time()
+ expr=0
+ for i in model.A:
+ expr += model.p[i]*(model.x[i]+model.x[i])
+ stop = time.time()
elif flag == 12:
+ start = time.time()
with EXPR.linear_expression as expr:
expr=sum((model.p[i]*model.x[i] for i in model.A), expr)
+ stop = time.time()
elif flag == 13:
+ start = time.time()
with EXPR.linear_expression as expr:
for i in model.A:
expr += model.p[i] * model.x[i]
+ stop = time.time()
elif flag == 14:
+ start = time.time()
with EXPR.linear_expression as expr:
for i in model.A:
expr = expr + model.p[i] * model.x[i]
+ stop = time.time()
elif flag == 15:
+ start = time.time()
with EXPR.linear_expression as expr:
for i in model.A:
expr = model.p[i] * model.x[i] + expr
+ stop = time.time()
+ elif flag == 17:
+ start = time.time()
+ with EXPR.linear_expression as expr:
+ for i in model.A:
+ expr += model.p[i] * (1 + model.x[i])
+ stop = time.time()
#
- stop = time.time()
seconds['construction'] = stop-start
seconds['nclones'] = ctr.count - nclones
seconds = evaluate(expr, seconds)
@@ -407,8 +477,6 @@ def f():
except TimeoutError:
print("TIMEOUT")
seconds['construction'] = -999.0
- except:
- pass
return seconds
return f
@@ -433,43 +501,85 @@ def f():
nclones = ctr.count
with timeout(seconds=_timeout):
- start = time.time()
#
if flag == 1:
- expr = summation(model.p, model.x)
+ start = time.time()
+ expr = sum_product(model.p, model.x)
+ stop = time.time()
elif flag == 2:
+ start = time.time()
expr=sum(model.p[i]*model.x[i] for i in model.A)
+ stop = time.time()
elif flag == 3:
+ start = time.time()
expr=0
for i in model.A:
expr += model.p[i] * model.x[i]
+ stop = time.time()
elif flag == 4:
+ start = time.time()
expr=0
for i in model.A:
expr = expr + model.p[i] * model.x[i]
+ stop = time.time()
elif flag == 5:
+ start = time.time()
expr=0
for i in model.A:
expr = model.p[i] * model.x[i] + expr
+ stop = time.time()
elif flag == 6:
+ start = time.time()
expr=Sum(model.p[i]*model.x[i] for i in model.A)
+ stop = time.time()
+ elif flag == 7:
+ start = time.time()
+ expr=0
+ for i in model.A:
+ expr += model.p[i] * (1 + model.x[i])
+ stop = time.time()
+ elif flag == 8:
+ start = time.time()
+ expr=0
+ for i in model.A:
+ expr += (model.x[i]+model.x[i])
+ stop = time.time()
+ elif flag == 9:
+ start = time.time()
+ expr=0
+ for i in model.A:
+ expr += model.p[i]*(model.x[i]+model.x[i])
+ stop = time.time()
elif flag == 12:
+ start = time.time()
with EXPR.linear_expression as expr:
expr=sum((model.p[i]*model.x[i] for i in model.A), expr)
+ stop = time.time()
elif flag == 13:
+ start = time.time()
with EXPR.linear_expression as expr:
for i in model.A:
expr += model.p[i] * model.x[i]
+ stop = time.time()
elif flag == 14:
+ start = time.time()
with EXPR.linear_expression as expr:
for i in model.A:
expr = expr + model.p[i] * model.x[i]
+ stop = time.time()
elif flag == 15:
+ start = time.time()
with EXPR.linear_expression as expr:
for i in model.A:
expr = model.p[i] * model.x[i] + expr
+ stop = time.time()
+ elif flag == 17:
+ start = time.time()
+ with EXPR.linear_expression as expr:
+ for i in model.A:
+ expr += model.p[i] * (1 + model.x[i])
+ stop = time.time()
#
- stop = time.time()
seconds['construction'] = stop-start
seconds['nclones'] = ctr.count - nclones
seconds = evaluate(expr, seconds)
@@ -478,8 +588,6 @@ def f():
except TimeoutError:
print("TIMEOUT")
seconds['construction'] = -999.0
- except:
- pass
return seconds
return f
@@ -510,7 +618,7 @@ def f():
start = time.time()
#
if flag == 1:
- expr = 2* summation(model.p, model.x)
+ expr = 2* sum_product(model.p, model.x)
elif flag == 2:
expr= 2 * sum(model.p[i]*model.x[i] for i in model.A)
elif flag == 3:
@@ -558,8 +666,6 @@ def f():
except TimeoutError:
print("TIMEOUT")
seconds['construction'] = -999.0
- except:
- pass
return seconds
return f
@@ -588,7 +694,7 @@ def f():
start = time.time()
#
if flag == 1:
- expr = summation(model.p, model.q, index=model.A)
+ expr = sum_product(model.p, model.q, index=model.A)
elif flag == 2:
expr=sum(model.p[i]*model.q[i] for i in model.A)
elif flag == 3:
@@ -614,8 +720,6 @@ def f():
except TimeoutError:
print("TIMEOUT")
seconds['construction'] = -999.0
- except:
- pass
return seconds
return f
@@ -650,7 +754,7 @@ def f():
start = time.time()
#
if flag == 1:
- expr = summation(model.p, model.x, model.y)
+ expr = sum_product(model.p, model.x, model.y)
elif flag == 2:
expr=sum(model.p[i]*model.x[i]*model.y[i] for i in model.A)
elif flag == 3:
@@ -676,8 +780,6 @@ def f():
except TimeoutError:
print("TIMEOUT")
seconds['construction'] = -999.0
- except:
- pass
return seconds
return f
@@ -734,8 +836,6 @@ def f():
except TimeoutError:
print("TIMEOUT")
seconds['construction'] = -999.0
- except:
- pass
return seconds
return f
@@ -777,8 +877,6 @@ def f():
except TimeoutError:
print("TIMEOUT")
seconds['construction'] = -999.0
- except:
- pass
return seconds
return f
@@ -826,8 +924,6 @@ def f():
except TimeoutError:
print("TIMEOUT")
seconds['construction'] = -999.0
- except:
- pass
return seconds
return f
@@ -871,8 +967,6 @@ def f():
except TimeoutError:
print("TIMEOUT")
seconds['construction'] = -999.0
- except:
- pass
return seconds
return f
@@ -966,11 +1060,28 @@ def runall(factors, res, output=True):
ans_ = res[factors_] = measure(linear(NTerms, 6), n=N)
print_results(factors_, ans_, output)
+ factors_ = tuple(factors+['Linear','Loop 7'])
+ ans_ = res[factors_] = measure(linear(NTerms, 7), n=N)
+ print_results(factors_, ans_, output)
+
+ factors_ = tuple(factors+['Linear','Loop 17'])
+ ans_ = res[factors_] = measure(linear(NTerms, 17), n=N)
+ print_results(factors_, ans_, output)
+
+ factors_ = tuple(factors+['Linear','Loop 8'])
+ ans_ = res[factors_] = measure(linear(NTerms, 8), n=N)
+ print_results(factors_, ans_, output)
+
+ factors_ = tuple(factors+['Linear','Loop 9'])
+ ans_ = res[factors_] = measure(linear(NTerms, 9), n=N)
+ print_results(factors_, ans_, output)
+
if True:
factors_ = tuple(factors+['SimpleLinear','Loop 1'])
ans_ = res[factors_] = measure(simple_linear(NTerms, 1), n=N)
print_results(factors_, ans_, output)
+ if True:
factors_ = tuple(factors+['SimpleLinear','Loop 2'])
ans_ = res[factors_] = measure(simple_linear(NTerms, 2), n=N)
print_results(factors_, ans_, output)
@@ -1003,8 +1114,20 @@ def runall(factors, res, output=True):
ans_ = res[factors_] = measure(simple_linear(NTerms, 15), n=N)
print_results(factors_, ans_, output)
- factors_ = tuple(factors+['SimpleLinear','Loop 6'])
- ans_ = res[factors_] = measure(simple_linear(NTerms, 6), n=N)
+ factors_ = tuple(factors+['SimpleLinear','Loop 7'])
+ ans_ = res[factors_] = measure(simple_linear(NTerms, 7), n=N)
+ print_results(factors_, ans_, output)
+
+ factors_ = tuple(factors+['SimpleLinear','Loop 17'])
+ ans_ = res[factors_] = measure(simple_linear(NTerms, 17), n=N)
+ print_results(factors_, ans_, output)
+
+ factors_ = tuple(factors+['SimpleLinear','Loop 8'])
+ ans_ = res[factors_] = measure(simple_linear(NTerms, 8), n=N)
+ print_results(factors_, ans_, output)
+
+ factors_ = tuple(factors+['SimpleLinear','Loop 9'])
+ ans_ = res[factors_] = measure(simple_linear(NTerms, 9), n=N)
print_results(factors_, ans_, output)
@@ -1122,7 +1245,7 @@ def remap_keys(mapping):
#
res = {}
-runall(["COOPR3"], res)
+#runall(["COOPR3"], res)
#EXPR.set_expression_tree_format(EXPR.common.Mode.pyomo4_trees)
#runall(["PYOMO4"], res)
@@ -1130,7 +1253,7 @@ def remap_keys(mapping):
#EXPR.set_expression_tree_format(EXPR.common.Mode.pyomo5_trees)
#import cProfile
#cProfile.run('runall(["PYOMO5"], res)', 'restats4')
-#runall(["PYOMO5"], res)
+runall(["PYOMO5"], res)
if args.output:
if args.output.endswith(".csv"):
diff --git a/admin/performance/simple.py b/admin/performance/simple.py
index d9f82966a29..9ac5a8b0a37 100644
--- a/admin/performance/simple.py
+++ b/admin/performance/simple.py
@@ -1,10 +1,10 @@
from pyomo.environ import *
-import pyomo.core.kernel.expr as EXPR
+import pyomo.core.expr.current as EXPR
import timeit
import signal
-coopr3 = True
-pyomo4 = True
+coopr3 = False
+pyomo4 = False
if coopr3 or pyomo4:
from pyomo.repn import generate_ampl_repn
@@ -33,13 +33,26 @@ def __exit__(self, type, value, traceback):
model.A = RangeSet(N)
model.p = Param(model.A, default=2)
model.x = Var(model.A, initialize=2)
+model.y = Var(model.A, initialize=3)
def linear(flag):
- if flag == 1:
- expr = summation(model.p, model.x)
+ if flag == 0:
+ expr=sum(model.x[i] for i in model.A)
+ elif flag == 10:
+ with EXPR.linear_expression as expr:
+ expr=sum((model.x[i] for i in model.A), expr)
+ elif flag == 20:
+ expr=quicksum(model.x[i] for i in model.A)
+
+ elif flag == 1:
+ expr = sum_product(model.p, model.x)
elif flag == 6:
- expr=Sum(model.p[i]*model.x[i] for i in model.A)
+ expr=quicksum((model.p[i]*model.x[i] for i in model.A), linear=False)
+ elif flag == 16:
+ expr=quicksum((model.p[i]*model.x[i] for i in model.A), linear=True)
+ elif flag == 26:
+ expr=quicksum(model.p[i]*model.x[i] for i in model.A)
elif flag == 2:
expr=sum(model.p[i]*model.x[i] for i in model.A)
@@ -67,6 +80,9 @@ def linear(flag):
elif flag == 12:
with EXPR.linear_expression as expr:
expr=sum((model.p[i]*model.x[i] for i in model.A), expr)
+ elif flag == 22:
+ with EXPR.nonlinear_expression as expr:
+ expr=sum((model.p[i]*model.x[i] for i in model.A), expr)
elif flag == 13:
with EXPR.linear_expression as expr:
for i in model.A:
@@ -84,33 +100,65 @@ def linear(flag):
expr=0
for i in model.A:
expr += model.p[i] * (1 + model.x[i])
-
elif flag == 17:
with EXPR.linear_expression as expr:
for i in model.A:
expr += model.p[i] * (1 + model.x[i])
+ elif flag == 27:
+ expr = quicksum(model.p[i]*(1 + model.x[i]) for i in model.A)
+
+ elif flag == 8:
+ expr=0
+ for i in model.A:
+ expr += (model.x[i]+model.x[i])
+ elif flag == 18:
+ # This will assume a nonlinear sum
+ expr = quicksum((model.x[i] + model.x[i]) for i in model.A)
+
+ elif flag == 9:
+ expr=0
+ for i in model.A:
+ expr += model.p[i]*(model.x[i]+model.x[i])
+
+ elif flag == 19:
+ # This will assume a nonlinear sum
+ expr = quicksum(model.p[i]*(model.x[i] + model.x[i]) for i in model.A)
+
+ elif flag == -9:
+ expr = quicksum(sin(model.x[i]) for i in model.A)
+
+ elif flag == 30:
+ expr=0
+ for i in model.A:
+ expr += model.x[i]*model.y[i]
+
+ elif flag == -30:
+ expr= quicksum(model.x[i]*model.y[i] for i in model.A)
if coopr3 or pyomo4:
- generate_ampl_repn(expr)
+ repn = generate_ampl_repn(expr)
else:
- generate_standard_repn(EXPR.compress_expression(expr), quadratic=False)
+ repn = generate_standard_repn(EXPR.compress_expression(expr), quadratic=False)
if coopr3:
import pyomo.core.kernel.expr_coopr3 as COOPR3
print("REFCOUNT: "+str(COOPR3._getrefcount_available))
- for i in (2,3,7):
+ for i in (0,2,3,6,7,8,9):
print((i,timeit.timeit('linear(%d)' % i, "from __main__ import linear", number=1)))
if pyomo4:
import pyomo.core.kernel.expr_pyomo4 as PYOMO4
EXPR.set_expression_tree_format(EXPR.common.Mode.pyomo4_trees)
print("REFCOUNT: "+str(PYOMO4._getrefcount_available))
- for i in (2,3,7):
+ for i in (0,2,3,6,7,8,9):
print((i,timeit.timeit('linear(%d)' % i, "from __main__ import linear", number=1)))
if not (coopr3 or pyomo4):
- import pyomo.core.kernel.expr_pyomo5 as PYOMO5
- print("REFCOUNT: "+str(PYOMO5._getrefcount_available))
- for i in (2,12,3,13,4,14,5,15,7,17):
+ import pyomo.core.expr.expr_pyomo5 as PYOMO5
+ #print("REFCOUNT: "+str(PYOMO5._getrefcount_available))
+ #import cProfile
+ #cProfile.run("linear(7)", "stats.7")
+ for i in (0,10,20,2,12,22,3,13,4,14,5,15,6,16,26,7,17,27,8,18,9,19,-9,30,-30):
+ #for i in (6,16,26):
print((i,timeit.timeit('linear(%d)' % i, "from __main__ import linear", number=1)))
diff --git a/admin/performance/solver_perf.py b/admin/performance/solver_perf.py
index 4cb6660d6be..3e4c9cea3d7 100644
--- a/admin/performance/solver_perf.py
+++ b/admin/performance/solver_perf.py
@@ -4,7 +4,8 @@
from pyomo.environ import *
import pyomo.version
-import pyutilib.subprocess
+from pyomo.core.base.expr_common import _clear_expression_pool
+from pyomo.core.base import expr as EXPR
import pprint as pp
import gc
@@ -18,16 +19,42 @@
import sys
import argparse
import re
+import pyutilib.subprocess
+
+## TIMEOUT LOGIC
+from functools import wraps
+import errno
+import os
+import signal
+
+
+class TimeoutError(Exception):
+ pass
-#N = 50
-N = 5
+class timeout:
+ def __init__(self, seconds=10, error_message='Timeout'):
+ self.seconds = seconds
+ self.error_message = error_message
+ def handle_timeout(self, signum, frame):
+ raise TimeoutError(self.error_message)
+ def __enter__(self):
+ signal.signal(signal.SIGALRM, self.handle_timeout)
+ signal.alarm(self.seconds)
+ def __exit__(self, type, value, traceback):
+ signal.alarm(0)
+
+
+
+_timeout = 20
+#N = 30
+N = 1
parser = argparse.ArgumentParser()
parser.add_argument("-o", "--output", help="Save results to the specified file", action="store", default=None)
-parser.add_argument("-s", "--solver", help="Specify the solver to test", action="store", default=None)
+#parser.add_argument("-s", "--solver", help="Specify the solver to test", action="store", default=None)
parser.add_argument("-v", "--verbose", help="Run just a single trial in verbose mode", action="store_true", default=False)
-parser.add_argument("--ntrials", help="The number of test trials", action="store", default=None)
+parser.add_argument("--ntrials", help="The number of test trials", action="store", type=int, default=None)
args = parser.parse_args()
if args.ntrials:
@@ -39,15 +66,13 @@
# Execute a function 'n' times, collecting performance statistics and
# averaging them
#
-def measure(f, n=25, verbose=False):
+def measure(f, n=25):
"""measure average execution time over n trials"""
- if verbose:
- f()
- return None
data = []
for i in range(n):
data.append(f())
sys.stdout.write('.')
+ sys.stdout.flush()
sys.stdout.write('\n')
#
ans = {}
@@ -60,7 +85,6 @@ def measure(f, n=25, verbose=False):
return ans
-
#
# Evaluate Pyomo output
#
@@ -125,7 +149,7 @@ def f():
def solve_pmedian(solver, num, verbose):
- return run_pyomo(solver, "../../examples/performance/pmedian.py ../../examples/performance/pmedian.test%d.dat" % num, verbose)
+ return run_pyomo(solver, "../../examples/performance/pmedian/pmedian.py ../../examples/performance/pmedian/pmedian.test%d.dat" % num, verbose)
#
# Utility function used by runall()
@@ -191,7 +215,7 @@ def remap_keys(mapping):
# Write csv file
#
perf_types = sorted(next(iter(res.values())).keys())
- res_ = [ list(key) + [res[key][k]['mean'] for k in perf_types] for key in res]
+ res_ = [ list(key) + [res.get(key,{}).get(k,{}).get('mean',-777) for k in perf_types] for key in sorted(res.keys())]
with open(args.output, 'w') as OUTPUT:
import csv
writer = csv.writer(OUTPUT)
@@ -200,7 +224,7 @@ def remap_keys(mapping):
writer.writerow(line)
elif args.output.endswith(".json"):
- res_ = {'script': sys.argv[0], 'NTerms':NTerms, 'NTrials':N, 'data': remap_keys(res), 'pyomo_version':pyomo.version.version, 'pyomo_versioninfo':pyomo.version.version_info[:3]}
+ res_ = {'script': sys.argv[0], 'NTrials':N, 'data': remap_keys(res), 'pyomo_version':pyomo.version.version, 'pyomo_versioninfo':pyomo.version.version_info[:3]}
#
# Write json file
#
diff --git a/doc/GettingStarted/current/examples/Isinglebuild.py b/doc/GettingStarted/current/examples/Isinglebuild.py
index 6de0d26ae6f..5bb40e839dc 100644
--- a/doc/GettingStarted/current/examples/Isinglebuild.py
+++ b/doc/GettingStarted/current/examples/Isinglebuild.py
@@ -25,7 +25,7 @@ def Populate_In_and_Out(model):
model.Supply = Param(model.Nodes)
def Obj_rule(model):
- return summation(model.FlowCost, model.Flow)
+ return sum_product(model.FlowCost, model.Flow)
model.Obj = Objective(rule=Obj_rule, sense=minimize)
def FlowBalance_rule(model, node):
diff --git a/doc/GettingStarted/current/examples/Isinglecomm.py b/doc/GettingStarted/current/examples/Isinglecomm.py
index d782a0065d7..8bfa9eaf596 100644
--- a/doc/GettingStarted/current/examples/Isinglecomm.py
+++ b/doc/GettingStarted/current/examples/Isinglecomm.py
@@ -30,7 +30,7 @@ def NodesIn_init(model, node):
model.Supply = Param(model.Nodes)
def Obj_rule(model):
- return summation(model.FlowCost, model.Flow)
+ return sum_product(model.FlowCost, model.Flow)
model.Obj = Objective(rule=Obj_rule, sense=minimize)
def FlowBalance_rule(model, node):
diff --git a/doc/GettingStarted/current/examples/abstract1.py b/doc/GettingStarted/current/examples/abstract1.py
index 84dbd2ca33f..5c80a712704 100644
--- a/doc/GettingStarted/current/examples/abstract1.py
+++ b/doc/GettingStarted/current/examples/abstract1.py
@@ -17,7 +17,7 @@
model.x = Var(model.J, domain=NonNegativeReals)
def obj_expression(model):
- return summation(model.c, model.x)
+ return sum_product(model.c, model.x)
model.OBJ = Objective(rule=obj_expression)
diff --git a/doc/GettingStarted/current/examples/abstract2.py b/doc/GettingStarted/current/examples/abstract2.py
index 9bf0ab6cf38..d4d5ab09a14 100644
--- a/doc/GettingStarted/current/examples/abstract2.py
+++ b/doc/GettingStarted/current/examples/abstract2.py
@@ -16,7 +16,7 @@
model.x = Var(model.J, domain=NonNegativeReals)
def obj_expression(model):
- return summation(model.c, model.x)
+ return sum_product(model.c, model.x)
model.OBJ = Objective(rule=obj_expression)
diff --git a/doc/GettingStarted/current/examples/abstract2piece.py b/doc/GettingStarted/current/examples/abstract2piece.py
index 132d5ce060d..9df792a5de9 100644
--- a/doc/GettingStarted/current/examples/abstract2piece.py
+++ b/doc/GettingStarted/current/examples/abstract2piece.py
@@ -31,7 +31,7 @@ def f4(model, j, xp):
model.ComputeObj = Piecewise(model.J, model.y, model.x, pw_pts=bpts, pw_constr_type='EQ', f_rule=f4)
def obj_expression(model):
- return summation(model.c, model.y)
+ return sum_product(model.c, model.y)
model.OBJ = Objective(rule=obj_expression)
diff --git a/doc/GettingStarted/current/examples/abstract2piecebuild.py b/doc/GettingStarted/current/examples/abstract2piecebuild.py
index c47815fcba2..860c97882ea 100644
--- a/doc/GettingStarted/current/examples/abstract2piecebuild.py
+++ b/doc/GettingStarted/current/examples/abstract2piecebuild.py
@@ -38,7 +38,7 @@ def f4(model, j, xp):
model.ComputePieces = Piecewise(model.J, model.y, model.x, pw_pts=model.bpts, pw_constr_type='EQ', f_rule=f4)
def obj_expression(model):
- return summation(model.c, model.y)
+ return sum_product(model.c, model.y)
model.OBJ = Objective(rule=obj_expression)
diff --git a/doc/GettingStarted/current/examples/d2singlecomm.py b/doc/GettingStarted/current/examples/d2singlecomm.py
index d747c68ad9e..399569444d3 100644
--- a/doc/GettingStarted/current/examples/d2singlecomm.py
+++ b/doc/GettingStarted/current/examples/d2singlecomm.py
@@ -13,7 +13,7 @@
model.Supply = Param(model.Nodes)
def Obj_rule(model):
- return summation(model.FlowCost, model.Flow)
+ return sum_product(model.FlowCost, model.Flow)
model.Obj = Objective(rule=Obj_rule, sense=minimize)
def FlowBalance_rule(model, node):
diff --git a/doc/GettingStarted/current/examples/farmer.py b/doc/GettingStarted/current/examples/farmer.py
index 7303c6908d8..8767db53ad4 100644
--- a/doc/GettingStarted/current/examples/farmer.py
+++ b/doc/GettingStarted/current/examples/farmer.py
@@ -57,7 +57,7 @@ def super_quota_selling_price_validate (model, value, i):
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=ConstrainTotalAcreage_rule)
@@ -81,14 +81,14 @@ def EnforceQuotas_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return model.FirstStageCost - summation(model.PlantingCostPerAcre, model.DevotedAcreage) == 0.0
+ return model.FirstStageCost - sum_product(model.PlantingCostPerAcre, model.DevotedAcreage) == 0.0
model.ComputeFirstStageCost = Constraint(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return (model.SecondStageCost - expr) == 0.0
model.ComputeSecondStageCost = Constraint(rule=ComputeSecondStageCost_rule)
diff --git a/doc/GettingStarted/current/examples/iterative1.py b/doc/GettingStarted/current/examples/iterative1.py
index 9d3e3e06c5c..550b8b4edc5 100644
--- a/doc/GettingStarted/current/examples/iterative1.py
+++ b/doc/GettingStarted/current/examples/iterative1.py
@@ -14,7 +14,7 @@
model.n = Param(default=4)
model.x = Var(RangeSet(model.n), within=Binary)
def o_rule(model):
- return summation(model.x)
+ return sum_product(model.x)
model.o = Objective(rule=o_rule)
model.c = ConstraintList()
diff --git a/doc/GettingStarted/current/examples/iterative2.py b/doc/GettingStarted/current/examples/iterative2.py
index 6f1a0da97a1..03d00b16df5 100644
--- a/doc/GettingStarted/current/examples/iterative2.py
+++ b/doc/GettingStarted/current/examples/iterative2.py
@@ -14,7 +14,7 @@
model.n = Param(default=4)
model.x = Var(RangeSet(model.n), within=Binary)
def o_rule(model):
- return summation(model.x)
+ return sum_product(model.x)
model.o = Objective(rule=o_rule)
model.c = ConstraintList()
diff --git a/doc/GettingStarted/current/examples/noiteration1.py b/doc/GettingStarted/current/examples/noiteration1.py
index c1047a12e92..c1ef60367dc 100644
--- a/doc/GettingStarted/current/examples/noiteration1.py
+++ b/doc/GettingStarted/current/examples/noiteration1.py
@@ -14,7 +14,7 @@
model.n = Param(default=4)
model.x = Var(RangeSet(model.n), within=Binary)
def o_rule(model):
- return summation(model.x)
+ return sum_product(model.x)
model.o = Objective(rule=o_rule)
model.c = ConstraintList()
diff --git a/doc/GettingStarted/current/examples/parallel.py b/doc/GettingStarted/current/examples/parallel.py
index a50f84b3509..943cb540664 100644
--- a/doc/GettingStarted/current/examples/parallel.py
+++ b/doc/GettingStarted/current/examples/parallel.py
@@ -25,7 +25,7 @@
model.n = Param(default=4)
model.x = Var(RangeSet(model.n), within=Binary)
def o_rule(model):
- return summation(model.x)
+ return sum_product(model.x)
model.o = Objective(rule=o_rule)
model.c = ConstraintList()
diff --git a/doc/GettingStarted/current/examples/singlecomm.py b/doc/GettingStarted/current/examples/singlecomm.py
index 0cb8a8b1691..32019a343e2 100644
--- a/doc/GettingStarted/current/examples/singlecomm.py
+++ b/doc/GettingStarted/current/examples/singlecomm.py
@@ -13,7 +13,7 @@
model.Supply = Param(model.Nodes)
def Obj_rule(model):
- return summation(model.FlowCost, model.Flow)
+ return sum_product(model.FlowCost, model.Flow)
model.Obj = Objective(rule=Obj_rule, sense=minimize)
def FlowBalance_rule(model, node):
diff --git a/doc/OnlineDocs/README.txt b/doc/OnlineDocs/README.txt
index c54aad1ec42..e6ec16e481d 100644
--- a/doc/OnlineDocs/README.txt
+++ b/doc/OnlineDocs/README.txt
@@ -17,6 +17,11 @@ or
make latexpdf
+NOTE: If the local python is not on your path, then you may need to
+invoke 'make' differently. For example, using the PyUtilib 'lbin' command:
+
+ lbin make html
+
3. Admire your work
cd _build/html
diff --git a/doc/OnlineDocs/developer_reference/expressions/design.rst b/doc/OnlineDocs/developer_reference/expressions/design.rst
new file mode 100644
index 00000000000..9a2fb479726
--- /dev/null
+++ b/doc/OnlineDocs/developer_reference/expressions/design.rst
@@ -0,0 +1,268 @@
+.. |p| raw:: html
+
+
+
+Design Details
+==============
+
+.. warning::
+ Pyomo expression trees are not composed of Python
+ objects from a single class hierarchy. Consequently, Pyomo
+ relies on duck typing to ensure that valid expression trees are
+ created.
+
+Most Pyomo expression trees have the following form
+
+1. Interior nodes are objects that inherit from the :class:`ExpressionBase ` class. These objects typically have one or more child nodes. Linear expression nodes do not have child nodes, but they are treated as interior nodes in the expression tree because they references other leaf nodes.
+
+2. Leaf nodes are numeric values, parameter components and variable components, which represent the *inputs* to the expresion.
+
+Expression Classes
+------------------
+
+Expression classes typically represent unary and binary operations. The following table
+describes the standard operators in Python and their associated Pyomo expression class:
+
+========== ============= =============================================================================
+Operation Python Syntax Pyomo Class
+========== ============= =============================================================================
+sum ``x + y`` :class:`SumExpression `
+product ``x * y`` :class:`ProductExpression `
+negation ``- x`` :class:`NegationExpression `
+reciprocal ``1 / x`` :class:`ReciprocalExpression `
+power ``x ** y`` :class:`PowExpression `
+inequality ``x <= y`` :class:`InequalityExpression `
+equality ``x == y`` :class:`EqualityExpression `
+========== ============= =============================================================================
+
+Additionally, there are a variety of other Pyomo expression classes that capture more general
+logical relationships, which are summarized in the following table:
+
+==================== ==================================== ========================================================================================
+Operation Example Pyomo Class
+==================== ==================================== ========================================================================================
+exernal function ``myfunc(x,y,z)`` :class:`ExternalFunctionExpression `
+logical if-then-else ``Expr_if(IF=x, THEN=y, ELSE=z)`` :class:`Expr_ifExpression `
+intrinsic function ``sin(x)`` :class:`UnaryFunctionExpression `
+absolute function ``abs(x)`` :class:`AbsExpression `
+==================== ==================================== ========================================================================================
+
+Expression objects are immutable. Specifically, the list of
+arguments to an expression object (a.k.a. the list of child nodes
+in the tree) cannot be changed after an expression class is
+constructed. To enforce this property, expression objects have a
+standard API for accessing expression arguments:
+
+* :attr:`args` - a class property that returns a generator that yields the expression arguments
+* :attr:`arg(i)` - a function that returns the ``i``-th argument
+* :attr:`nargs()` - a function that returns the number of expression arguments
+
+.. warning::
+
+ Developers should never use the :attr:`_args_` property directly!
+ The semantics for the use of this data has changed since earlier
+ versions of Pyomo. For example, in some expression classes the
+ the value :func:`nargs()` may not equal :const:`len(_args_)`!
+
+Expression trees can be categorized in four different ways:
+
+* constant expressions - expressions that do not contain numeric constants and immutable parameters.
+* mutable expressions - expressions that contain mutable parameters but no variables.
+* potentially variable expressions - expressions that contain variables, which may be fixed.
+* fixed expressions - expressions that contain variables, all of which are fixed.
+
+These three categories are illustrated with the following example:
+
+.. literalinclude:: ../../tests/expr/design_categories.spy
+
+The following table describes four different simple expressions
+that consist of a single model component, and it shows how they
+are categorized:
+
+======================== ===== ===== ===== =====
+Category m.p m.q m.x m.y
+======================== ===== ===== ===== =====
+constant True False False False
+not potentially variable True True False False
+potentially_variable False False True True
+fixed True True False True
+======================== ===== ===== ===== =====
+
+Expressions classes contain methods to test whether an expression
+tree is in each of these categories. Additionally, Pyomo includes
+custom expression classes for expression trees that are *not potentially
+variable*. These custom classes will not normally be used by
+developers, but they provide an optimization of the checks for
+potentially variability.
+
+Special Expression Classes
+--------------------------
+
+The following classes are *exceptions* to the design principles describe above.
+
+Named Expressions
+~~~~~~~~~~~~~~~~~
+
+Named expressions allow for changes to an expression after it has
+been constructed. For example, consider the expression ``f`` defined
+with the :class:`Expression ` component:
+
+.. literalinclude:: ../../tests/expr/design_named_expression.spy
+
+Although ``f`` is an immutable expression, whose definition is
+fixed, a sub-expressions is the named expression ``M.e``. Named
+expressions have a mutable value. In other words, the expression
+that they point to can change. Thus, a change to the value of
+``M.e`` changes the expression tree for any expression that includes
+the named expression.
+
+.. note::
+
+ The named expression classes are not implemented as sub-classes
+ of :class:`ExpressionBase `.
+ This reflects design constraints related to the fact that these
+ are modeling components that belong to class hierarchies other
+ than the expression class hierarchy, and Pyomo's design prohibits
+ the use of multiple inheritance for these classes.
+
+Linear Expressions
+~~~~~~~~~~~~~~~~~~
+
+Pyomo includes a special expression class for linear expressions.
+The class :class:`LinearExpression
+` provides a compact
+description of linear polynomials. Specifically, it includes a
+constant value :attr:`constant` and two lists for coefficients and
+variables: :attr:`linear_coefs` and :attr:`linear_vars`.
+
+This expression object does not have arguments, and thus it is
+treated as a leaf node by Pyomo visitor classes. Further, the
+expression API functions described above do not work with this
+class. Thus, developers need to treat this class differently when
+walking an expression tree (e.g. when developing a problem
+transformation).
+
+Sum Expressions
+~~~~~~~~~~~~~~~
+
+Pyomo does not have a binary sum expression class. Instead,
+it has an ``n``-ary summation class, :class:`SumExpression
+`. This expression class
+treats sums as ``n``-ary sums for efficiency reasons; many large
+optimization models contain large sums. But note tht this class
+maintains the immutability property described above. This class
+shares an underlying list of arguments with other :class:`SumExpression
+` objects. A particular
+object owns the first ``n`` arguments in the shared list, but
+different objects may have different values of ``n``.
+
+This class acts like a normal immutable expression class, and the
+API described above works normally. But direct access to the shared
+list could have unexpected results.
+
+Mutable Expressions
+~~~~~~~~~~~~~~~~~~~
+
+Finally, Pyomo includes several **mutable** expression classes
+that are private. These are not intended to be used by users, but
+they might be useful for developers in contexts where the developer
+can appropriately control how the classes are used. Specifically,
+immutability eliminates side-effects where changes to a sub-expression
+unexpectedly create changes to the expression tree. But within the context of
+model transformations, developers may be able to limit the use of
+expressions to avoid these side-effects. The following mutable private classes
+are available in Pyomo:
+
+:class:`_MutableSumExpression `
+ This class
+ is used in the :data:`nonlinear_expression ` context manager to
+ efficiently combine sums of nonlinear terms.
+:class:`_MutableLinearExpression `
+ This class
+ is used in the :data:`linear_expression ` context manager to
+ efficiently combine sums of linear terms.
+
+
+
+Expression Semantics
+--------------------
+
+Pyomo clear semantics regarding what is considered a valid leaf and
+interior node.
+
+The following classes are valid interior nodes:
+
+* Subclasses of :class:`ExpressionBase `
+
+* Classes that that are *duck typed* to match the API of the :class:`ExpressionBase ` class. For example, the named expression class :class:`Expression `.
+
+The following classes are valid leaf nodes:
+
+* Members of :data:`nonpyomo_leaf_types `, which includes standard numeric data types like :const:`int`, :const:`float` and :const:`long`, as well as numeric data types defined by `numpy` and other commonly used packages. This set also includes :class:`NonNumericValue `, which is used to wrap non-numeric arguments to the :class:`ExternalFunctionExpression ` class.
+
+* Parameter component classes like :class:`SimpleParam ` and :class:`_ParamData `, which arise in expression trees when the parameters are declared as mutable. (Immutable parameters are identified when generating expressions, and they are replaced with their associated numeric value.)
+
+* Variable component classes like :class:`SimpleVar ` and :class:`_GeneralVarData `, which often arise in expression trees. `.
+
+.. note::
+
+ In some contexts the :class:`LinearExpression
+ ` class can be treated
+ as an interior node, and sometimes it can be treated as a leaf.
+ This expression object does not have any child arguments, so
+ ``nargs()`` is zero. But this expression references variables
+ and parameters in a linear expression, so in that sense it does
+ not represent a leaf node in the tree.
+
+
+
+Context Managers
+----------------
+
+Pyomo defines several context managers that can be used to declare
+the form of expressions, and to define a mutable expression object that
+efficiently manages sums.
+
+The :data:`linear_expression `
+object is a context manager that can be used to declare a linear sum. For
+example, consider the following two loops:
+
+.. literalinclude:: ../../tests/expr/design_cm1.spy
+
+The first apparent difference in these loops is that the value of
+``s`` is explicitly initialized while ``e`` is initialized when the
+context manager is entered. However, a more fundamental difference
+is that the expression representation for ``s`` differs from ``e``.
+Each term added to ``s`` results in a new, immutable expression.
+By contrast, the context manager creates a mutable expression
+representation for ``e``. This difference allows for both (a) a
+more efficient processing of each sum, and (b) a more compact
+representation for the expression.
+
+The difference between :data:`linear_expression
+` and
+:data:`nonlinear_expression `
+is the underlying representation that each supports. Note that
+both of these are instances of context manager classes. In
+singled-threaded applications, these objects can be safely used to
+construct different expressions with different context declarations.
+
+Finally, note that these context managers can be passed into the :attr:`start`
+method for the :func:`quicksum ` function. For example:
+
+.. literalinclude:: ../../tests/expr/design_cm2.spy
+
+This sum contains terms for ``M.x[i]`` and ``M.y[i]``. The syntax
+in this example is not intuitive because the sum is being stored
+in ``e``.
+
+.. note::
+
+ We do not generally expect users or developers to use these
+ context managers. They are used by the :func:`quicksum
+ ` and :func:`sum_product
+ ` functions to accelerate expression
+ generation, and there are few cases where the direct use of
+ these context managers would provide additional utility to users
+ and developers.
+
diff --git a/doc/OnlineDocs/developer_reference/expressions/index.rst b/doc/OnlineDocs/developer_reference/expressions/index.rst
new file mode 100644
index 00000000000..62220d300b0
--- /dev/null
+++ b/doc/OnlineDocs/developer_reference/expressions/index.rst
@@ -0,0 +1,55 @@
+.. |p| raw:: html
+
+
+
+Pyomo Expressions
+=================
+
+.. warning::
+
+ This documentation does not explicitly reference objects in
+ pyomo.core.kernel. While the Pyomo5 expression system works
+ with pyomo.core.kernel objects, the documentation of these
+ documents was not sufficient to appropriately descibe the use
+ of kernel objects in expressions.
+
+Pyomo supports the declaration of symbolic expressions that represent
+objectives, constraints and other optimization modeling components.
+Pyomo expressions are represented in an expression tree, where the
+leaves are operands, such as constants or variables, and the internal
+nodes contain operators. Pyomo relies on so-called magic methods
+to automate the construction of symbolic expressions. For example,
+consider an expression ``e`` declared as follows:
+
+.. literalinclude:: ../../tests/expr/index_simple.spy
+
+Python determines that the magic method ``__mul__`` is called on
+the ``M.v`` object, with the argument ``2``. This method returns
+a Pyomo expression object ``ProductExpression`` that has arguments
+``M.v`` and ``2``. This represents the following symbolic expression
+tree:
+
+.. graphviz::
+
+ digraph foo {
+ "*" -> "v";
+ "*" -> "2";
+ }
+
+.. note::
+
+ End-users will not likely need to know details related to how
+ symbolic expressions are generated and managed in Pyomo. Thus,
+ most of the following documentation of expressions in Pyomo is most
+ useful for Pyomo developers. However, the discussion of runtime
+ performance in the first section will help end-users write large-scale
+ models.
+
+.. toctree::
+ :maxdepth: 1
+
+ performance.rst
+ overview.rst
+ design.rst
+ managing.rst
+
diff --git a/doc/OnlineDocs/developer_reference/expressions/managing.rst b/doc/OnlineDocs/developer_reference/expressions/managing.rst
new file mode 100644
index 00000000000..2eb8222921b
--- /dev/null
+++ b/doc/OnlineDocs/developer_reference/expressions/managing.rst
@@ -0,0 +1,290 @@
+.. |p| raw:: html
+
+
+
+Managing Expressions
+====================
+
+Creating a String Representation of an Expression
+-------------------------------------------------
+
+There are several ways that string representations can be created
+from an expression, but the :func:`expression_to_string
+` function provides
+the most flexible mechanism for generating a string representation.
+The options to this function control distinct aspects of the string
+representation.
+
+Algebraic vs. Nested Functional Form
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The default string representation is an algebraic form, which closely
+mimics the Python operations used to construct an expression. The
+:data:`verbose` flag can be set to :const:`True` to generate a
+string representation that is a nested functional form. For example:
+
+.. literalinclude:: ../../tests/expr/managing_ex1.spy
+
+Labeler and Symbol Map
+~~~~~~~~~~~~~~~~~~~~~~
+
+The string representation used for variables in expression can be customized to
+define different label formats. If the :data:`labeler` option is specified, then this
+function (or class functor) is used to generate a string label used to represent the variable. Pyomo
+defines a variety of labelers in the `pyomo.core.base.label` module. For example, the
+:class:`NumericLabeler` defines a functor that can be used to sequentially generate
+simple labels with a prefix followed by the variable count:
+
+.. literalinclude:: ../../tests/expr/managing_ex2.spy
+
+The :data:`smap` option is used to specify a symbol map object
+(:class:`SymbolMap `), which
+caches the variable label data. This option is normally specified
+in contexts where the string representations for many expressions
+are being generated. In that context, a symbol map ensures that
+variables in different expressions have a consistent label in their
+associated string representations.
+
+
+Standardized String Representations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The :data:`standardize` option can be used to re-order the string
+representation to print polynomial terms before nonlinear terms. By
+default, :data:`standardize` is :const:`False`, and the string
+representation reflects the order in which terms were combined to
+form the expression. Pyomo does not guarantee that the string
+representation exactly matches the Python expression order, since
+some simplification and re-ordering of terms is done automatically to
+improve the efficiency of expression generation. But in most cases
+the string representation will closely correspond to the
+Python expression order.
+
+If :data:`standardize` is :const:`True`, then the pyomo expression
+is processed to identify polynomial terms, and the string representation
+consists of the constant and linear terms followed by
+an expression that contains other nonlinear terms. For example:
+
+.. literalinclude:: ../../tests/expr/managing_ex3.spy
+
+Other Ways to Generate String Representations
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+There are two other standard ways to generate string representations:
+
+* Call the :func:`__str__` magic method (e.g. using the Python :func:`str()` function. This
+ calls :func:`expression_to_string ` with
+ the option :data:`standardize` equal to :const:`True` (see below).
+
+* Call the :func:`to_string` method on the :class:`ExpressionBase ` class.
+ This defaults to calling :func:`expression_to_string ` with
+ the option :data:`standardize` equal to :const:`False` (see below).
+
+In practice, we expect at the :func:`__str__` magic method will be
+used by most users, and the standardization of the output provides
+a consistent ordering of terms that should make it easier to interpret
+expressions.
+
+
+Cloning Expressions
+-------------------
+
+Expressions are automatically cloned only during certain expression
+transformations. Since this can be an expensive operation, the
+:data:`clone_counter ` context
+manager object is provided to track the number of times the
+:func:`clone_expression `
+function is executed.
+
+For example:
+
+.. literalinclude:: ../../tests/expr/managing_ex4.spy
+
+Evaluating Expressions
+----------------------
+
+Expressions can be evaluated when all variables and parameters in
+the expression have a value. The :func:`value `
+function can be used to walk the expression tree and compute the
+value of an expression. For example:
+
+.. literalinclude:: ../../tests/expr/managing_ex5.spy
+
+Additionally, expressions define the :func:`__call__` method, so the
+following is another way to compute the value of an expression:
+
+.. literalinclude:: ../../tests/expr/managing_ex6.spy
+
+If a parameter or variable is undefined, then the :func:`value
+` function and :func:`__call__` method will
+raise an exception. This exception can be suppressed using the
+:attr:`exception` option. For example:
+
+.. literalinclude:: ../../tests/expr/managing_ex7.spy
+
+This option is useful in contexts where adding a try block is inconvenient
+in your modeling script.
+
+.. note::
+
+ Both the :func:`value ` function and
+ :func:`__call__` method call the :func:`evaluate_expression
+ ` function. In
+ practice, this function will be slightly faster, but the
+ difference is only meaningful when expressions are evaluated
+ many times.
+
+Identifying Components and Variables
+------------------------------------
+
+Expression transformations sometimes need to find all nodes in an
+expression tree that are of a given type. Pyomo contains two utility
+functions that support this functionality. First, the
+:func:`identify_components `
+function is a generator function that walks the expression tree and yields all
+nodes whose type is in a specified set of node types. For example:
+
+.. literalinclude:: ../../tests/expr/managing_ex8.spy
+
+The :func:`identify_variables `
+function is a generator function that yields all nodes that are
+variables. Pyomo uses several different classes to represent variables,
+but this set of variable types does not need to be specified by the user.
+However, the :attr:`include_fixed` flag can be specified to omit fixed
+variables. For example:
+
+.. literalinclude:: ../../tests/expr/managing_ex9.spy
+
+Walking an Expression Tree with a Visitor Class
+-----------------------------------------------
+
+Many of the utility functions defined above are implemented by
+walking an expression tree and performing an operation at nodes in
+the tree. For example, evaluating an expression is performed using
+a post-order depth-first search process where the value of a node
+is computed using the values of its children.
+
+Walking an expression tree can be tricky, and the code requires intimate
+knowledge of the design of the expression system. Pyomo includes
+several classes that define so-called visitor patterns for walking
+expression tree:
+
+:class:`SimpleExpressionVisitor `
+ A :func:`visitor` method is called for each node in the tree,
+ and the visitor class collects information about the tree.
+
+:class:`ExpressionValueVisitor `
+ When the :func:`visitor` method is called on each node in the
+ tree, the *values* of its children have been computed. The
+ *value* of the node is returned from :func:`visitor`.
+
+:class:`ExpressionReplacementVisitor `
+ When the :func:`visitor` method is called on each node in the
+ tree, it may clone or otherwise replace the node using objects
+ for its children (which themselves may be clones or replacements
+ from the original child objects). The new node object is
+ returned from :func:`visitor`.
+
+These classes define a variety of suitable tree search methods:
+
+* :class:`SimpleExpressionVisitor `
+
+ * **xbfs**: breadth-first search where leaf nodes are immediately visited
+ * **xbfs_yield_leaves**: breadth-first search where leaf nodes are immediately visited, and the visit method yields a value
+
+* :class:`ExpressionValueVisitor `
+
+ * **dfs_postorder_stack**: postorder depth-first search using a stack
+
+* :class:`ExpressionReplacementVisitor `
+
+ * **dfs_postorder_stack**: postorder depth-first search using a stack
+
+.. note::
+
+ The PyUtilib visitor classes define several other search methods
+ that could be used with Pyomo expressions. But these are the
+ only search methods currently used within Pyomo.
+
+To implement a visitor object, a user creates a subclass of one of these
+classes. Only one of a few methods will need to be defined to
+implement the visitor:
+
+:func:`visitor`
+ Defines the operation that is performed when a node is visited. In
+ the :class:`ExpressionValueVisitor ` and :class:`ExpressionReplacementVisitor ` visitor classes, this
+ method returns a value that is used by its parent node.
+
+:func:`visiting_potential_leaf`
+ Checks if the search should terminate with this node. If no,
+ then this method returns the tuple ``(False, None)``. If yes,
+ then this method returns ``(False, value)``, where *value* is
+ computed by this method. This method is not used in the
+ :class:`SimpleExpressionVisitor
+ ` visitor
+ class.
+
+:func:`finalize`
+ This method defines the final value that is returned from the
+ visitor. This is not normally redefined.
+
+Detailed documentation of the APIs for these methods is provided
+with the class documentation for these visitors.
+
+SimpleExpressionVisitor Example
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In this example, we describe an visitor class that counts the number
+of nodes in an expression (including leaf nodes). Consider the following
+class:
+
+.. literalinclude:: ../../tests/expr/managing_visitor1.spy
+
+The class constructor creates a counter, and the :func:`visit` method
+increments this counter for every node that is visited. The :func:`finalize`
+method returns the value of this counter after the tree has been walked. The
+following function illustrates this use of this visitor class:
+
+.. literalinclude:: ../../tests/expr/managing_visitor2.spy
+
+
+ExpressionValueVisitor Example
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In this example, we describe an visitor class that clones the
+expression tree (including leaf nodes). Consider the following
+class:
+
+.. literalinclude:: ../../tests/expr/managing_visitor3.spy
+
+The :func:`visit` method creates a new expression node with children
+specified by :attr:`values`. The :func:`visiting_potential_leaf`
+method performs a :func:`deepcopy` on leaf nodes, which are native
+Python types or non-expression objects.
+
+.. literalinclude:: ../../tests/expr/managing_visitor4.spy
+
+
+ExpressionReplacementVisitor Example
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+In this example, we describe an visitor class that replaces
+variables with scaled variables, using a mutable parameter that
+can be modified later. the following
+class:
+
+.. literalinclude:: ../../tests/expr/managing_visitor5.spy
+
+No :func:`visit` method needs to be defined. The
+:func:`visiting_potential_leaf` function identifies variable nodes
+and returns a product expression that contains a mutable parameter.
+The :class:`_LinearExpression` class has a different representation
+that embeds variables. Hence, this class must be handled
+in a separate condition that explicitly transforms this sub-expression.
+
+.. literalinclude:: ../../tests/expr/managing_visitor6.spy
+
+The :func:`scale_expression` function is called with an expression and
+a dictionary, :attr:`scale`, that maps variable ID to model parameter. For example:
+
+.. literalinclude:: ../../tests/expr/managing_visitor7.spy
diff --git a/doc/OnlineDocs/developer_reference/expressions/overview.rst b/doc/OnlineDocs/developer_reference/expressions/overview.rst
new file mode 100644
index 00000000000..58808a813f1
--- /dev/null
+++ b/doc/OnlineDocs/developer_reference/expressions/overview.rst
@@ -0,0 +1,300 @@
+.. |p| raw:: html
+
+
+
+Design Overview
+===============
+
+Historical Comparison
+---------------------
+
+This document describes the "Pyomo5" expressions, which were
+introduced in Pyomo 5.6. The main differences between "Pyomo5"
+expressions and the previous expression system, called "Coopr3",
+are:
+
+* Pyomo5 supports both CPython and PyPy implementations of Python,
+ while Coopr3 only supports CPython.
+
+ The key difference in these implementations is that Coopr3 relies
+ on CPython reference counting, which is not part of the Python
+ language standard. Hence, this implementation is not guaranteed
+ to run on other implementations of Python.
+
+ Pyomo5 does not rely on reference counting, and it has been tested
+ with PyPy. In the future, this should allow Pyomo to support
+ other Python implementations (e.g. Jython).
+
+ |p|
+
+* Pyomo5 expression objects are immutable, while Coopr3 expression
+ objects are mutable.
+
+ This difference relates to how expression objects are managed
+ in Pyomo. Once created, Pyomo5 expression objects cannot be
+ changed. Further, the user is guaranteed that no "side effects"
+ occur when expressions change at a later point in time. By
+ contrast, Coopr3 allows expressions to change in-place, and thus
+ "side effects" make occur when expressions are changed at a later
+ point in time. (See discussion of entanglement below.)
+
+ |p|
+
+* Pyomo5 provides more consistent runtime performance than Coopr3.
+
+ While this documentation does not provide a detailed comparison
+ of runtime performance between Coopr3 and Pyomo5, the following
+ performance considerations also motivated the creation of Pyomo5:
+
+ * There were surprising performance inconsistencies in Coopr3. For
+ example, the following two loops had dramatically different
+ runtime:
+
+ .. literalinclude:: ../../tests/expr/overview_example1.spy
+
+ * Coopr3 eliminates side effects by automatically cloning sub-expressions.
+ Unfortunately, this can easily lead to unexpected cloning in models, which
+ can dramatically slow down Pyomo model generation. For example:
+
+ .. literalinclude:: ../../tests/expr/overview_example2.spy
+
+ * Coopr3 leverages recursion in many operations, including expression
+ cloning. Even simple non-linear expressions can result in deep
+ expression trees where these recursive operations fail because
+ Python runs out of stack space.
+
+ |p|
+
+ * The immutable representation used in Pyomo5 requires more memory allocations
+ than Coopr3 in simple loops. Hence, a pure-Python execution of Pyomo5
+ can be 10% slower than Coopr3 for model construction. But when Cython is used
+ to optimize the execution of Pyomo5 expression generation, the
+ runtimes for Pyomo5 and Coopr3 are about the same. (In principle,
+ Cython would improve the runtime of Coopr3 as well, but the limitations
+ noted above motivated a new expression system in any case.)
+
+Expression Entanglement and Mutability
+--------------------------------------
+
+Pyomo fundamentally relies on the use of magic methods in Python
+to generate expression trees, which means that Pyomo has very limited
+control for how expressions are managed in Python. For example:
+
+* Python variables can point to the same expression tree
+
+ .. literalinclude:: ../../tests/expr/overview_tree1.spy
+
+ This is illustrated as follows:
+
+ .. graphviz::
+
+ digraph foo {
+ {
+ e [shape=box]
+ f [shape=box]
+ }
+ "*" -> 2;
+ "*" -> v;
+ subgraph cluster { "*"; 2; v; }
+ e -> "*" [splines=curved, style=dashed];
+ f -> "*" [splines=curved, style=dashed];
+ }
+
+* A variable can point to a sub-tree that another variable points to
+
+ .. literalinclude:: ../../tests/expr/overview_tree2.spy
+
+ This is illustrated as follows:
+
+ .. graphviz::
+
+ digraph foo {
+ {
+ e [shape=box]
+ f [shape=box]
+ }
+ "*" -> 2;
+ "*" -> v;
+ "+" -> "*";
+ "+" -> 3;
+ subgraph cluster { "+"; 3; "*"; 2; v; }
+ e -> "*" [splines=curved, style=dashed, constraint=false];
+ f -> "+" [splines=curved, style=dashed];
+ }
+
+* Two expression trees can point to the same sub-tree
+
+ .. literalinclude:: ../../tests/expr/overview_tree3.spy
+
+ This is illustrated as follows:
+
+ .. graphviz::
+
+ digraph foo {
+ {
+ e [shape=box]
+ f [shape=box]
+ g [shape=box]
+ }
+ x [label="+"];
+ "*" -> 2;
+ "*" -> v;
+ "+" -> "*";
+ "+" -> 3;
+ x -> 4;
+ x -> "*";
+ subgraph cluster { x; 4; "+"; 3; "*"; 2; v; }
+ e -> "*" [splines=curved, style=dashed, constraint=false];
+ f -> "+" [splines=curved, style=dashed];
+ g -> x [splines=curved, style=dashed];
+ }
+
+In each of these examples, it is almost impossible for a Pyomo user
+or developer to detect whether expressions are being shared. In
+CPython, the reference counting logic can support this to a limited
+degree. But no equivalent mechanisms are available in PyPy and
+other Python implementations.
+
+Entangled Sub-Expressions
+~~~~~~~~~~~~~~~~~~~~~~~~~
+
+We say that expressions are *entangled* if they share one or more
+sub-expressions. The first example above does not represent
+entanglement, but rather the fact that multiple Python variables
+can point to the same expression tree. In the second and third
+examples, the expressions are entangled because the subtree represented
+by ``e`` is shared. However, if a leave node like ``M.v`` is shared
+between expressions, we do not consider those expressions entangled.
+
+Expression entanglement is problematic because shared expressions complicate
+the expected behavior when sub-expressions are changed. Consider the following example:
+
+.. literalinclude:: ../../tests/expr/overview_tree4.spy
+
+What is the value of ``e`` after ``M.w`` is added to it? What is the
+value of ``f``? The answers to these questions are not immediately
+obvious, and the fact that Coopr3 uses mutable expression objects
+makes them even less clear. However, Pyomo5 and Coopr3 enforce
+the following semantics:
+
+.. pull-quote::
+
+ A change to an expression *e* that is a sub-expression of *f*
+ does not change the expression tree for *f*.
+
+This property ensures a change to an expression does not create side effects that change the
+values of other, previously defined expressions.
+
+For instance, the previous example results in the following (in Pyomo5):
+
+.. graphviz::
+
+ digraph foo {
+ {
+ e [shape=box]
+ f [shape=box]
+ }
+ x [label="+"];
+ "*" -> 2;
+ "*" -> v;
+ "+" -> "*";
+ "+" -> 3;
+ x -> "*";
+ x -> w;
+ subgraph cluster { "+"; 3; "*"; 2; v; x; w;}
+ f -> "+" [splines=curved, style=dashed];
+ e -> x [splines=curved, style=dashed];
+ }
+
+With Pyomo5 expressions, each sub-expression is immutable. Thus,
+the summation operation generates a new expression ``e`` without
+changing existing expression objects referenced in the expression
+tree for ``f``. By contrast, Coopr3 imposes the same property by
+cloning the expression ``e`` before added ``M.w``, resulting in the following:
+
+.. graphviz::
+
+ digraph foo {
+ {
+ e [shape=box]
+ f [shape=box]
+ }
+ "*" -> 2;
+ "*" -> v;
+ "+" -> "*";
+ "+" -> 3;
+ etimes [label="*"];
+ etwo [label=2];
+ etimes -> etwo;
+ etimes -> v;
+ x [label="+"];
+ x -> w;
+ x -> etimes;
+ subgraph cluster { "+"; 3; "*"; 2; v; x; w; etimes; etwo;}
+ f -> "+" [splines=curved, style=dashed];
+ e -> x [splines=curved, style=dashed];
+ }
+
+This example also illustrates that leaves may be shared between expressions.
+
+Mutable Expression Components
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+There is one important exception to the entanglement property
+described above. The ``Expression`` component is treated as a
+mutable expression when shared between expressions. For example:
+
+.. literalinclude:: ../../tests/expr/overview_tree5.spy
+
+Here, the expression ``M.e`` is a so-called *named expression* that
+the user has declared. Named expressions are explicitly intended
+for re-use within models, and they provide a convenient mechanism
+for changing sub-expressions in complex applications. In this example, the
+expression tree is as follows before ``M.w`` is added:
+
+.. graphviz::
+
+ digraph foo {
+ {
+ f [shape=box]
+ }
+ "*" -> 2;
+ "*" -> v;
+ "+" -> "M.e";
+ "+" -> 3;
+ "M.e" -> "*";
+ subgraph cluster { "+"; 3; "*"; 2; v; "M.e";}
+ f -> "+" [splines=curved, style=dashed];
+ }
+
+
+And the expression tree is as follows after ``M.w`` is added.
+
+.. graphviz::
+
+ digraph foo {
+ {
+ f [shape=box]
+ }
+ x [label="+"];
+ "*" -> 2;
+ "*" -> v;
+ "+" -> "M.e";
+ "+" -> 3;
+ x -> "*";
+ x -> w;
+ "M.e" -> x;
+ subgraph cluster { "+"; 3; "*"; 2; v; "M.e"; x; w;}
+ f -> "+" [splines=curved, style=dashed];
+ }
+
+
+When considering named expressions, Pyomo5 and Coopr3 enforce
+the following semantics:
+
+.. pull-quote::
+
+ A change to a named expression *e* that is a sub-expression of
+ *f* changes the expression tree for *f*, because *f* continues
+ to point to *e* after it is changed.
+
diff --git a/doc/OnlineDocs/developer_reference/expressions/performance.rst b/doc/OnlineDocs/developer_reference/expressions/performance.rst
new file mode 100644
index 00000000000..e8d7fa2679f
--- /dev/null
+++ b/doc/OnlineDocs/developer_reference/expressions/performance.rst
@@ -0,0 +1,171 @@
+.. |p| raw:: html
+
+
+
+Building Expressions Faster
+===========================
+
+Expression Generation
+---------------------
+
+Pyomo expressions can be constructed using native binary operators
+in Python. For example, a sum can be created in a simple loop:
+
+.. literalinclude:: ../../tests/expr/performance_loop1.spy
+
+Additionally, Pyomo expressions can be constructed using functions
+that iteratively apply Python binary operators. For example, the
+Python :func:`sum` function can be used to replace the previous
+loop:
+
+.. literalinclude:: ../../tests/expr/performance_loop2.spy
+
+The :func:`sum` function is both more compact and more efficient.
+Using :func:`sum` avoids the creation of temporary variables, and
+the summation logic is executed in the Python interpreter while the
+loop is interpreted.
+
+
+Linear, Quadratic and General Nonlinear Expressions
+---------------------------------------------------
+
+Pyomo can express a very wide range of algebraic expressions, and
+there are three general classes of expressions that are recognized
+by Pyomo:
+
+ * **linear polynomials**
+ * **quadratic polynomials**
+ * **nonlinear expressions**, including higher-order polynomials and
+ expressions with intrinsic functions
+
+These classes of expressions are leveraged to efficiently generate
+compact representations of expressions, and to transform expression
+trees into standard forms used to interface with solvers. Note
+that There not all quadratic polynomials are recognized by Pyomo;
+in other words, some quadratic expressions are treated as nonlinear
+expressions.
+
+For example, consider the following quadratic polynomial:
+
+.. literalinclude:: ../../tests/expr/performance_loop3.spy
+
+This quadratic polynomial is treated as a nonlinear expression
+unless the expression is explicilty processed to identify quadratic
+terms. This *lazy* identification of of quadratic terms allows
+Pyomo to tailor the search for quadratic terms only when they are
+explicitly needed.
+
+Pyomo Utility Functions
+-----------------------
+
+Pyomo includes several similar functions that can be used to
+create expressions:
+
+:func:`prod `
+ A function to compute a product of Pyomo expressions.
+
+:func:`quicksum `
+ A function to efficiently compute a sum of Pyomo expressions.
+
+:func:`sum_product `
+ A function that computes a generalized dot product.
+
+prod
+~~~~
+
+The :func:`prod ` function is analogous to the builtin
+:func:`sum` function. Its main argument is a variable length
+argument list, :attr:`args`, which represents expressions that are multiplied
+together. For example:
+
+.. literalinclude:: ../../tests/expr/performance_prod.spy
+
+quicksum
+~~~~~~~~
+
+The behavior of the :func:`quicksum ` function is
+similar to the builtin :func:`sum` function, but this function often
+generates a more compact Pyomo expression. Its main argument is a
+variable length argument list, :attr:`args`, which represents
+expressions that are summed together. For example:
+
+.. literalinclude:: ../../tests/expr/performance_quicksum.spy
+
+The summation is customized based on the :attr:`start` and
+:attr:`linear` arguments. The :attr:`start` defines the initial
+value for summation, which defaults to zero. If :attr:`start` is
+a numeric value, then the :attr:`linear` argument determines how
+the sum is processed:
+
+* If :attr:`linear` is :const:`False`, then the terms in :attr:`args` are assumed to be nonlinear.
+* If :attr:`linear` is :const:`True`, then the terms in :attr:`args` are assumed to be linear.
+* If :attr:`linear` is :const:`None`, the first term in :attr:`args` is analyze to determine whether the terms are linear or nonlinear.
+
+This argument allows the :func:`quicksum `
+function to customize the expression representation used, and
+specifically a more compact representation is used for linear
+polynomials. The :func:`quicksum `
+function can be slower than the builtin :func:`sum` function,
+but this compact representation can generate problem representations
+more quickly.
+
+Consider the following example:
+
+.. literalinclude:: ../../tests/expr/quicksum_runtime.spy
+
+The sum consists of linear terms because the exponents are one.
+The following output illustrates that quicksum can identify this
+linear structure to generate expressions more quickly:
+
+.. literalinclude:: ../../tests/expr/quicksum.log
+ :language: none
+
+If :attr:`start` is not a numeric value, then the :func:`quicksum
+` sets the initial value to :attr:`start`
+and executes a simple loop to sum the terms. This allows the sum
+to be stored in an object that is passed into the function (e.g. the linear context manager
+:data:`linear_expression `).
+
+.. Warning::
+
+ By default, :attr:`linear` is :const:`None`. While this allows
+ for efficient expression generation in normal cases, there are
+ circumstances where the inspection of the first
+ term in :attr:`args` is misleading. Consider the following
+ example:
+
+ .. literalinclude:: ../../tests/expr/performance_warning.spy
+
+ The first term created by the generator is linear, but the
+ subsequent terms are nonlinear. Pyomo gracefully transitions
+ to a nonlinear sum, but in this case :func:`quicksum `
+ is doing additional work that is not useful.
+
+sum_product
+~~~~~~~~~~~
+
+The :func:`sum_product ` function supports
+a generalized dot product. The :attr:`args` argument contains one
+or more components that are used to create terms in the summation.
+If the :attr:`args` argument contains a single components, then its
+sequence of terms are summed together; the sum is equivalent to
+calling :func:`quicksum `. If two or more components are
+provided, then the result is the summation of their terms multiplied
+together. For example:
+
+.. literalinclude:: ../../tests/expr/performance_sum_product1.spy
+
+The :attr:`denom` argument specifies components whose terms are in
+the denominator. For example:
+
+.. literalinclude:: ../../tests/expr/performance_sum_product2.spy
+
+The terms summed by this function are explicitly specified, so
+:func:`sum_product ` can identify
+whether the resulting expression is linear, quadratic or nonlinear.
+Consequently, this function is typically faster than simple loops,
+and it generates compact representations of expressions..
+
+Finally, note that the :func:`dot_product `
+function is an alias for :func:`sum_product `.
+
diff --git a/doc/OnlineDocs/developer_reference/index.rst b/doc/OnlineDocs/developer_reference/index.rst
new file mode 100644
index 00000000000..89238fa2049
--- /dev/null
+++ b/doc/OnlineDocs/developer_reference/index.rst
@@ -0,0 +1,13 @@
+Developer Reference
+===================
+
+This section provides documentation about fundamental capabilities
+in Pyomo. This documentation serves as a reference for both (1)
+Pyomo developers and (2) advanced users who are developing Python
+scripts using Pyomo.
+
+.. toctree::
+ :maxdepth: 1
+
+ expressions/index.rst
+ opt/index.rst
diff --git a/doc/OnlineDocs/developer_reference/opt/index.rst b/doc/OnlineDocs/developer_reference/opt/index.rst
new file mode 100644
index 00000000000..59911091e9f
--- /dev/null
+++ b/doc/OnlineDocs/developer_reference/opt/index.rst
@@ -0,0 +1,14 @@
+.. |p| raw:: html
+
+
+
+Optimization Interfaces
+=======================
+
+.. warning::
+
+ This is draft documentation for Pyomo's optimization
+ interface classes. This includes both the core
+ interface classes as well as the solver interfaces
+ supported by Pyomo.
+
diff --git a/doc/OnlineDocs/index.rst b/doc/OnlineDocs/index.rst
index e639edd0cef..72e77ae1bb9 100644
--- a/doc/OnlineDocs/index.rst
+++ b/doc/OnlineDocs/index.rst
@@ -18,6 +18,7 @@ with a diverse set of optimization capabilities.
data/index.rst
scripting/index.rst
modeling_extensions/index.rst
+ developer_reference/index.rst
solvers/persistent_solvers.rst
library_reference/index.rst
problem_reference/index.rst
diff --git a/doc/OnlineDocs/library_reference/expressions/building.rst b/doc/OnlineDocs/library_reference/expressions/building.rst
new file mode 100644
index 00000000000..8ffcca9e310
--- /dev/null
+++ b/doc/OnlineDocs/library_reference/expressions/building.rst
@@ -0,0 +1,10 @@
+
+Utilities to Build Expressions
+==============================
+
+.. autofunction:: pyomo.core.util.prod
+.. autofunction:: pyomo.core.util.quicksum
+.. autofunction:: pyomo.core.util.sum_product
+.. autodata:: pyomo.core.util.summation
+.. autodata:: pyomo.core.util.dot_product
+
diff --git a/doc/OnlineDocs/library_reference/expressions/classes.rst b/doc/OnlineDocs/library_reference/expressions/classes.rst
new file mode 100644
index 00000000000..1e3f4143bdf
--- /dev/null
+++ b/doc/OnlineDocs/library_reference/expressions/classes.rst
@@ -0,0 +1,108 @@
+
+Core Classes
+============
+
+The following are the two core classes documented here:
+
+* :class:`NumericValue `
+* :class:`ExpressionBase `
+
+The remaining classes are the public classes for expressions, which
+developers may need to know about. The methods for these classes
+are not documented because they are described in the :class:`ExpressionBase
+` class.
+
+Sets with Expression Types
+--------------------------
+
+The following sets can be used to develop visitor patterns for
+Pyomo expressions.
+
+.. autodata:: pyomo.core.expr.numvalue.native_numeric_types
+.. autodata:: pyomo.core.expr.numvalue.native_types
+.. autodata:: pyomo.core.expr.numvalue.nonpyomo_leaf_types
+
+NumericValue and ExpressionBase
+-------------------------------
+
+.. autoclass:: pyomo.core.expr.numvalue.NumericValue
+ :members:
+ :special-members:
+ :private-members:
+
+.. autoclass:: pyomo.core.expr.current.ExpressionBase
+ :members:
+ :show-inheritance:
+ :special-members:
+ :private-members:
+
+Other Public Classes
+--------------------
+
+.. autoclass:: pyomo.core.expr.current.NegationExpression
+ :members:
+ :show-inheritance:
+ :undoc-members:
+ :private-members:
+
+.. autoclass:: pyomo.core.expr.current.ExternalFunctionExpression
+ :members:
+ :show-inheritance:
+ :undoc-members:
+ :private-members:
+
+.. autoclass:: pyomo.core.expr.current.ProductExpression
+ :members:
+ :show-inheritance:
+ :undoc-members:
+ :private-members:
+
+.. autoclass:: pyomo.core.expr.current.ReciprocalExpression
+ :members:
+ :show-inheritance:
+ :undoc-members:
+ :private-members:
+
+.. autoclass:: pyomo.core.expr.current.InequalityExpression
+ :members:
+ :show-inheritance:
+ :undoc-members:
+ :private-members:
+
+.. autoclass:: pyomo.core.expr.current.EqualityExpression
+ :members:
+ :show-inheritance:
+ :undoc-members:
+ :private-members:
+
+.. autoclass:: pyomo.core.expr.current.SumExpression
+ :members:
+ :show-inheritance:
+ :undoc-members:
+ :private-members:
+
+.. autoclass:: pyomo.core.expr.current.GetItemExpression
+ :members:
+ :show-inheritance:
+ :undoc-members:
+ :private-members:
+
+.. autoclass:: pyomo.core.expr.current.Expr_ifExpression
+ :members:
+ :show-inheritance:
+ :undoc-members:
+ :private-members:
+
+.. autoclass:: pyomo.core.expr.current.UnaryFunctionExpression
+ :members:
+ :show-inheritance:
+ :undoc-members:
+ :private-members:
+
+.. autoclass:: pyomo.core.expr.current.AbsExpression
+ :members:
+ :show-inheritance:
+ :undoc-members:
+ :private-members:
+
+
diff --git a/doc/OnlineDocs/library_reference/expressions/context_managers.rst b/doc/OnlineDocs/library_reference/expressions/context_managers.rst
new file mode 100644
index 00000000000..ae292f3b076
--- /dev/null
+++ b/doc/OnlineDocs/library_reference/expressions/context_managers.rst
@@ -0,0 +1,13 @@
+
+Context Managers
+================
+
+.. autoclass:: pyomo.core.expr.current.nonlinear_expression
+ :members:
+
+.. autoclass:: pyomo.core.expr.current.linear_expression
+ :members:
+
+.. autoclass:: pyomo.core.expr.current.clone_counter
+ :members:
+
diff --git a/doc/OnlineDocs/library_reference/expressions/index.rst b/doc/OnlineDocs/library_reference/expressions/index.rst
new file mode 100644
index 00000000000..388a7efa452
--- /dev/null
+++ b/doc/OnlineDocs/library_reference/expressions/index.rst
@@ -0,0 +1,13 @@
+
+Expression Reference
+====================
+
+.. toctree::
+ :maxdepth: 1
+
+ building.rst
+ managing.rst
+ context_managers.rst
+ classes.rst
+ visitors.rst
+
diff --git a/doc/OnlineDocs/library_reference/expressions/managing.rst b/doc/OnlineDocs/library_reference/expressions/managing.rst
new file mode 100644
index 00000000000..96325e674f7
--- /dev/null
+++ b/doc/OnlineDocs/library_reference/expressions/managing.rst
@@ -0,0 +1,18 @@
+
+Utilities to Manage and Analyze Expressions
+===========================================
+
+Functions
+~~~~~~~~~
+
+.. autofunction:: pyomo.core.expr.current.expression_to_string
+.. autofunction:: pyomo.core.expr.current.decompose_term
+.. autofunction:: pyomo.core.expr.current.clone_expression
+.. autofunction:: pyomo.core.expr.current.evaluate_expression
+.. autofunction:: pyomo.core.expr.current.identify_components
+.. autofunction:: pyomo.core.expr.current.identify_variables
+
+Classes
+~~~~~~~
+
+.. autoclass:: pyomo.core.expr.symbol_map.SymbolMap
diff --git a/doc/OnlineDocs/library_reference/expressions/visitors.rst b/doc/OnlineDocs/library_reference/expressions/visitors.rst
new file mode 100644
index 00000000000..e20eab0be92
--- /dev/null
+++ b/doc/OnlineDocs/library_reference/expressions/visitors.rst
@@ -0,0 +1,11 @@
+
+Visitor Classes
+===============
+
+.. autoclass:: pyomo.core.expr.current.SimpleExpressionVisitor
+ :members:
+.. autoclass:: pyomo.core.expr.current.ExpressionValueVisitor
+ :members:
+.. autoclass:: pyomo.core.expr.current.ExpressionReplacementVisitor
+ :members:
+
diff --git a/doc/OnlineDocs/library_reference/index.rst b/doc/OnlineDocs/library_reference/index.rst
index 3c974427e9e..9fcfcaad58d 100644
--- a/doc/OnlineDocs/library_reference/index.rst
+++ b/doc/OnlineDocs/library_reference/index.rst
@@ -1,14 +1,18 @@
Library Reference
=================
-Pyomo is being increasingly used as a library embedded within larger
-Python scripts or projects. This section describes the core library
-APIs for key elements of Pyomo useful to application developers.
+Pyomo is being increasingly used as a library to support Python
+scripts. This section describes library APIs for key elements of
+Pyomo's core library. This documentation serves as a reference for
+both (1) Pyomo developers and (2) advanced users who are developing
+Python scripts using Pyomo.
.. toctree::
:maxdepth: 1
+ expressions/index.rst
aml/index.rst
+ kernel/index.rst
data/index.rst
solvers/index.rst
diff --git a/doc/OnlineDocs/misc/functions.rst b/doc/OnlineDocs/misc/functions.rst
index 8f4a9a815fd..3f2032c9a11 100644
--- a/doc/OnlineDocs/misc/functions.rst
+++ b/doc/OnlineDocs/misc/functions.rst
@@ -13,7 +13,7 @@ are described further in this section.
\code{display} \index{display function@\code{display} function} & Display the properties of models and model components\\
\code{dot\_product} \index{dot\_product@\code{dot\_product} function} & Compute a generalized dot product\\
\code{sequence} \index{sequence@\code{sequence} function} & Compute a sequence of integers\\
-\code{summation} \index{summation@\code{summation} function} & Compute a generalized dot product\\
+\code{sum_product} \index{sum_product@\code{sum_product} function} & Compute a generalized dot product\\
\code{value} \index{value@\code{value} function} & Compute the value of a model component\\
\code{xsequence} \index{xsequence@\code{xsequence} function} & Compute a sequence of integers\\ \hline
\end{tabular}
@@ -23,7 +23,7 @@ are described further in this section.
\subsection{Generalized Dot Products}
-The \code{summation}\index{summation@\code{summation} function|textbf} function is a utility function that computes a generalized
+The \code{sum_product}\index{sum_product@\code{sum_product} function|textbf} function is a utility function that computes a generalized
dot product; the \code{dot\_product}\index{dot\_product@\code{dot\_product} function|textbf} is a synonym for this function.
This function creates an expression that represents the sum of elements of one or
more indexed components. We use the following components in our examples:
diff --git a/doc/OnlineDocs/tests/expr/design.py b/doc/OnlineDocs/tests/expr/design.py
new file mode 100644
index 00000000000..7cc8d9698c3
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/design.py
@@ -0,0 +1,54 @@
+from pyomo.environ import *
+
+#---------------------------------------------
+# @categories
+m = ConcreteModel()
+m.p = Param(default=10, mutable=False)
+m.q = Param(default=10, mutable=True)
+m.x = Var()
+m.y = Var(initialize=1)
+m.y.fixed = True
+# @categories
+m.pprint()
+
+#---------------------------------------------
+# @named_expression
+M = ConcreteModel()
+M.v = Var()
+M.w = Var()
+
+M.e = Expression(expr=2*M.v)
+f = M.e + 3 # f == 2*v + 3
+M.e += M.w # f == 2*v + 3 + w
+# @named_expression
+
+#---------------------------------------------
+# @cm1
+M = ConcreteModel()
+M.x = Var(range(5))
+
+s = 0
+for i in range(5):
+ s += M.x[i]
+
+with linear_expression() as e:
+ for i in range(5):
+ e += M.x[i]
+# @cm1
+print(s)
+print(e)
+
+
+#---------------------------------------------
+# @cm2
+M = ConcreteModel()
+M.x = Var(range(5))
+M.y = Var(range(5))
+
+with linear_expression() as e:
+ quicksum((M.x[i] for i in M.x), start=e)
+ quicksum((M.y[i] for i in M.y), start=e)
+# @cm2
+print("cm2")
+print(e)
+
diff --git a/doc/OnlineDocs/tests/expr/design.spy b/doc/OnlineDocs/tests/expr/design.spy
new file mode 100644
index 00000000000..39a1a4c9534
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/design.spy
@@ -0,0 +1,46 @@
+from pyomo.environ import *
+
+#---------------------------------------------
+m = ConcreteModel()
+m.p = Param(default=10, mutable=False)
+m.q = Param(default=10, mutable=True)
+m.x = Var()
+m.y = Var(initialize=1)
+m.y.fixed = True
+m.pprint()
+
+#---------------------------------------------
+M = ConcreteModel()
+M.v = Var()
+M.w = Var()
+
+M.e = Expression(expr=2*M.v)
+f = M.e + 3 # f == 2*v + 3
+M.e += M.w # f == 2*v + 3 + w
+
+#---------------------------------------------
+M = ConcreteModel()
+M.x = Var(range(5))
+
+s = 0
+for i in range(5):
+ s += M.x[i]
+
+with linear_expression() as e:
+ for i in range(5):
+ e += M.x[i]
+print(s)
+print(e)
+
+
+#---------------------------------------------
+M = ConcreteModel()
+M.x = Var(range(5))
+M.y = Var(range(5))
+
+with linear_expression() as e:
+ quicksum((M.x[i] for i in M.x), start=e)
+ quicksum((M.y[i] for i in M.y), start=e)
+print("cm2")
+print(e)
+
diff --git a/doc/OnlineDocs/tests/expr/design.txt b/doc/OnlineDocs/tests/expr/design.txt
new file mode 100644
index 00000000000..5ddc5290178
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/design.txt
@@ -0,0 +1,19 @@
+2 Param Declarations
+ p : Size=1, Index=None, Domain=Any, Default=10, Mutable=False
+ Key : Value
+ q : Size=1, Index=None, Domain=Any, Default=10, Mutable=True
+ Key : Value
+
+2 Var Declarations
+ x : Size=1, Index=None
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ None : None : None : None : False : True : Reals
+ y : Size=1, Index=None
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ None : None : 1 : None : True : False : Reals
+
+4 Declarations: p q x y
+x[0] + x[1] + x[2] + x[3] + x[4]
+x[0] + x[1] + x[2] + x[3] + x[4]
+cm2
+x[0] + x[1] + x[2] + x[3] + x[4] + y[0] + y[1] + y[2] + y[3] + y[4]
diff --git a/doc/OnlineDocs/tests/expr/design_categories.spy b/doc/OnlineDocs/tests/expr/design_categories.spy
new file mode 100644
index 00000000000..0f4736caffc
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/design_categories.spy
@@ -0,0 +1,6 @@
+m = ConcreteModel()
+m.p = Param(default=10, mutable=False)
+m.q = Param(default=10, mutable=True)
+m.x = Var()
+m.y = Var(initialize=1)
+m.y.fixed = True
diff --git a/doc/OnlineDocs/tests/expr/design_cm1.spy b/doc/OnlineDocs/tests/expr/design_cm1.spy
new file mode 100644
index 00000000000..493a4445bcc
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/design_cm1.spy
@@ -0,0 +1,10 @@
+M = ConcreteModel()
+M.x = Var(range(5))
+
+s = 0
+for i in range(5):
+ s += M.x[i]
+
+with linear_expression() as e:
+ for i in range(5):
+ e += M.x[i]
diff --git a/doc/OnlineDocs/tests/expr/design_cm2.spy b/doc/OnlineDocs/tests/expr/design_cm2.spy
new file mode 100644
index 00000000000..a16b96364f0
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/design_cm2.spy
@@ -0,0 +1,7 @@
+M = ConcreteModel()
+M.x = Var(range(5))
+M.y = Var(range(5))
+
+with linear_expression() as e:
+ quicksum((M.x[i] for i in M.x), start=e)
+ quicksum((M.y[i] for i in M.y), start=e)
diff --git a/doc/OnlineDocs/tests/expr/design_named_expression.spy b/doc/OnlineDocs/tests/expr/design_named_expression.spy
new file mode 100644
index 00000000000..f4acaa1b37f
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/design_named_expression.spy
@@ -0,0 +1,7 @@
+M = ConcreteModel()
+M.v = Var()
+M.w = Var()
+
+M.e = Expression(expr=2*M.v)
+f = M.e + 3 # f == 2*v + 3
+M.e += M.w # f == 2*v + 3 + w
diff --git a/doc/OnlineDocs/tests/expr/index.py b/doc/OnlineDocs/tests/expr/index.py
new file mode 100644
index 00000000000..1cfc954aa52
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/index.py
@@ -0,0 +1,11 @@
+from pyomo.environ import *
+
+#---------------------------------------------
+# @simple
+M = ConcreteModel()
+M.v = Var()
+
+e = M.v*2
+# @simple
+print(e)
+
diff --git a/doc/OnlineDocs/tests/expr/index.spy b/doc/OnlineDocs/tests/expr/index.spy
new file mode 100644
index 00000000000..89e4eccf39c
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/index.spy
@@ -0,0 +1,9 @@
+from pyomo.environ import *
+
+#---------------------------------------------
+M = ConcreteModel()
+M.v = Var()
+
+e = M.v*2
+print(e)
+
diff --git a/doc/OnlineDocs/tests/expr/index.txt b/doc/OnlineDocs/tests/expr/index.txt
new file mode 100644
index 00000000000..0119f1f32d3
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/index.txt
@@ -0,0 +1 @@
+2*v
diff --git a/doc/OnlineDocs/tests/expr/index_simple.spy b/doc/OnlineDocs/tests/expr/index_simple.spy
new file mode 100644
index 00000000000..d45703d7ed8
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/index_simple.spy
@@ -0,0 +1,4 @@
+M = ConcreteModel()
+M.v = Var()
+
+e = M.v*2
diff --git a/doc/OnlineDocs/tests/expr/managing.py b/doc/OnlineDocs/tests/expr/managing.py
new file mode 100644
index 00000000000..17de31ff3cf
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing.py
@@ -0,0 +1,246 @@
+from pyomo.environ import *
+from pyutilib.math import isclose
+import math
+import copy
+
+#---------------------------------------------
+# @ex1
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+
+e = sin(M.x) + 2*M.x
+
+# sin(x) + 2*x
+print(EXPR.expression_to_string(e))
+
+# sum(sin(x), prod(2, x))
+print(EXPR.expression_to_string(e, verbose=True))
+# @ex1
+
+#---------------------------------------------
+# @ex2
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+M.y = Var()
+
+e = sin(M.x) + 2*M.y
+
+# sin(x1) + 2*x2
+print(EXPR.expression_to_string(e, labeler=NumericLabeler('x')))
+# @ex2
+
+#---------------------------------------------
+# @ex3
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+M.y = Var()
+
+e = sin(M.x) + 2*M.y + M.x*M.y - 3
+
+# -3 + 2*y + sin(x) + x*y
+print(EXPR.expression_to_string(e, standardize=True))
+# @ex3
+
+#---------------------------------------------
+# @ex4
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+
+with EXPR.clone_counter() as counter:
+ start = counter.count
+ e1 = sin(M.x)
+ e2 = e1.clone()
+ total = counter.count - start
+ assert(total == 1)
+# @ex4
+
+#---------------------------------------------
+# @ex5
+M = ConcreteModel()
+M.x = Var()
+M.x.value = math.pi/2.0
+val = value(M.x)
+assert(isclose(val, math.pi/2.0))
+# @ex5
+# @ex6
+val = M.x()
+assert(isclose(val, math.pi/2.0))
+# @ex6
+
+#---------------------------------------------
+# @ex7
+M = ConcreteModel()
+M.x = Var()
+val = value(M.x, exception=False)
+assert(val is None)
+# @ex7
+
+#---------------------------------------------
+# @ex8
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+M.p = Param(mutable=True)
+
+e = M.p+M.x
+s = set([type(M.p)])
+assert(list(EXPR.identify_components(e, s)) == [M.p])
+# @ex8
+
+#---------------------------------------------
+# @ex9
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+M.y = Var()
+
+e = M.x+M.y
+M.y.value = 1
+M.y.fixed = True
+
+assert(set(id(v) for v in EXPR.identify_variables(e)) == set([id(M.x), id(M.y)]))
+assert(set(id(v) for v in EXPR.identify_variables(e, include_fixed=False)) == set([id(M.x)]))
+# @ex9
+
+#---------------------------------------------
+# @visitor1
+from pyomo.core.expr import current as EXPR
+
+class SizeofVisitor(EXPR.SimpleExpressionVisitor):
+
+ def __init__(self):
+ self.counter = 0
+
+ def visit(self, node):
+ self.counter += 1
+
+ def finalize(self):
+ return self.counter
+# @visitor1
+
+#---------------------------------------------
+# @visitor2
+def sizeof_expression(expr):
+ #
+ # Create the visitor object
+ #
+ visitor = SizeofVisitor()
+ #
+ # Compute the value using the :func:`xbfs` search method.
+ #
+ return visitor.xbfs(expr)
+# @visitor2
+
+#---------------------------------------------
+# @visitor3
+from pyomo.core.expr import current as EXPR
+
+class CloneVisitor(EXPR.ExpressionValueVisitor):
+
+ def __init__(self):
+ self.memo = {'__block_scope__': { id(None): False }}
+
+ def visit(self, node, values):
+ #
+ # Clone the interior node
+ #
+ return node.construct_clone(tuple(values), self.memo)
+
+ def visiting_potential_leaf(self, node):
+ #
+ # Clone leaf nodes in the expression tree
+ #
+ if node.__class__ in native_numeric_types or\
+ node.__class__ not in pyomo5_expression_types:\
+ return True, copy.deepcopy(node, self.memo)
+
+ return False, None
+# @visitor3
+
+#---------------------------------------------
+# @visitor4
+def clone_expression(expr):
+ #
+ # Create the visitor object
+ #
+ visitor = CloneVisitor()
+ #
+ # Clone the expression using the :func:`dfs_postorder_stack`
+ # search method.
+ #
+ return visitor.dfs_postorder_stack(expr)
+# @visitor4
+
+#---------------------------------------------
+# @visitor5
+from pyomo.core.expr import current as EXPR
+
+class ScalingVisitor(EXPR.ExpressionReplacementVisitor):
+
+ def __init__(self, scale):
+ super(ScalingVisitor, self).__init__()
+ self.scale = scale
+
+ def visiting_potential_leaf(self, node):
+ #
+ # Clone leaf nodes in the expression tree
+ #
+ if node.__class__ in native_numeric_types:
+ return True, node
+
+ if node.is_variable_type():
+ return True, self.scale[id(node)]*node
+
+ if isinstance(node, EXPR.LinearExpression):
+ node_ = copy.deepcopy(node)
+ node_.constant = node.constant
+ node_.linear_vars = copy.copy(node.linear_vars)
+ node_.linear_coefs = []
+ for i,v in enumerate(node.linear_vars):
+ node_.linear_coefs.append( node.linear_coefs[i]*self.scale[id(v)] )
+ return True, node_
+
+ return False, None
+# @visitor5
+
+#---------------------------------------------
+# @visitor6
+def scale_expression(expr, scale):
+ #
+ # Create the visitor object
+ #
+ visitor = ScalingVisitor(scale)
+ #
+ # Scale the expression using the :func:`dfs_postorder_stack`
+ # search method.
+ #
+ return visitor.dfs_postorder_stack(expr)
+# @visitor6
+
+#---------------------------------------------
+# @visitor7
+M = ConcreteModel()
+M.x = Var(range(5))
+M.p = Param(range(5), mutable=True)
+
+scale={}
+for i in M.x:
+ scale[id(M.x[i])] = M.p[i]
+
+e = quicksum(M.x[i] for i in M.x)
+f = scale_expression(e,scale)
+
+# p[0]*x[0] + p[1]*x[1] + p[2]*x[2] + p[3]*x[3] + p[4]*x[4]
+print(f)
+# @visitor7
+
diff --git a/doc/OnlineDocs/tests/expr/managing.spy b/doc/OnlineDocs/tests/expr/managing.spy
new file mode 100644
index 00000000000..a50a39a2b98
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing.spy
@@ -0,0 +1,210 @@
+from pyomo.environ import *
+import math
+import copy
+
+#---------------------------------------------
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+
+e = sin(M.x) + 2*M.x
+
+# sin(x) + 2*x
+print(EXPR.expression_to_string(e))
+
+# sum(sin(x), prod(2, x))
+print(EXPR.expression_to_string(e, verbose=True))
+
+#---------------------------------------------
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+M.y = Var()
+
+e = sin(M.x) + 2*M.y
+
+# sin(x1) + 2*x2
+print(EXPR.expression_to_string(e, labeler=NumericLabeler('x')))
+
+#---------------------------------------------
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+M.y = Var()
+
+e = sin(M.x) + 2*M.y + M.x*M.y - 3
+
+# -3 + 2*y + sin(x) + x*y
+print(EXPR.expression_to_string(e, standardize=True))
+
+#---------------------------------------------
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+
+with EXPR.clone_counter() as counter:
+ start = counter.count
+ e1 = sin(M.x)
+ e2 = e1.clone()
+ total = counter.count - start
+ assert(total == 1)
+
+#---------------------------------------------
+M = ConcreteModel()
+M.x = Var()
+M.x.value = math.pi/2.0
+val = value(M.x)
+assert(math.isclose(val, math.pi/2.0))
+val = M.x()
+assert(math.isclose(val, math.pi/2.0))
+
+#---------------------------------------------
+M = ConcreteModel()
+M.x = Var()
+val = value(M.x, exception=False)
+assert(val is None)
+
+#---------------------------------------------
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+M.p = Param(mutable=True)
+
+e = M.p+M.x
+s = set([type(M.p)])
+assert(list(EXPR.identify_components(e, s)) == [M.p])
+
+#---------------------------------------------
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+M.y = Var()
+
+e = M.x+M.y
+M.y.value = 1
+M.y.fixed = True
+
+assert(set(id(v) for v in EXPR.identify_variables(e)) == set([id(M.x), id(M.y)]))
+assert(set(id(v) for v in EXPR.identify_variables(e, include_fixed=False)) == set([id(M.x)]))
+
+#---------------------------------------------
+from pyomo.core.expr import current as EXPR
+
+class SizeofVisitor(EXPR.SimpleExpressionVisitor):
+
+ def __init__(self):
+ self.counter = 0
+
+ def visit(self, node):
+ self.counter += 1
+
+ def finalize(self):
+ return self.counter
+
+#---------------------------------------------
+def sizeof_expression(expr):
+ #
+ # Create the visitor object
+ #
+ visitor = SizeofVisitor()
+ #
+ # Compute the value using the :func:`xbfs` search method.
+ #
+ return visitor.xbfs(expr)
+
+#---------------------------------------------
+from pyomo.core.expr import current as EXPR
+
+class CloneVisitor(EXPR.ExpressionValueVisitor):
+
+ def __init__(self):
+ self.memo = {'__block_scope__': { id(None): False }}
+
+ def visit(self, node, values):
+ #
+ # Clone the interior node
+ #
+ return node.construct_clone(tuple(values), self.memo)
+
+ def visiting_potential_leaf(self, node):
+ #
+ # Clone leaf nodes in the expression tree
+ #
+ if node.__class__ in native_numeric_types or\
+ node.__class__ not in pyomo5_expression_types:\
+ return True, copy.deepcopy(node, self.memo)
+
+ return False, None
+
+#---------------------------------------------
+def clone_expression(expr):
+ #
+ # Create the visitor object
+ #
+ visitor = CloneVisitor()
+ #
+ # Clone the expression using the :func:`dfs_postorder_stack`
+ # search method.
+ #
+ return visitor.dfs_postorder_stack(expr)
+
+#---------------------------------------------
+from pyomo.core.expr import current as EXPR
+
+class ScalingVisitor(EXPR.ExpressionReplacementVisitor):
+
+ def __init__(self, scale):
+ super(ScalingVisitor, self).__init__()
+ self.scale = scale
+
+ def visiting_potential_leaf(self, node):
+ #
+ # Clone leaf nodes in the expression tree
+ #
+ if node.is_variable_type():
+ return True, self.scale[id(node)]*node
+
+ if isinstance(node, EXPR.LinearExpression):
+ node_ = copy.deepcopy(node)
+ node_.constant = node.constant
+ node_.linear_vars = copy.copy(node.linear_vars)
+ node_.linear_coefs = []
+ for i,v in enumerate(node.linear_vars):
+ node_.linear_coefs.append( node.linear_coefs[i]*self.scale[id(v)] )
+ return True, node_
+
+ return False, None
+
+#---------------------------------------------
+def scale_expression(expr, scale):
+ #
+ # Create the visitor object
+ #
+ visitor = ScalingVisitor(scale)
+ #
+ # Scale the expression using the :func:`dfs_postorder_stack`
+ # search method.
+ #
+ return visitor.dfs_postorder_stack(expr)
+
+#---------------------------------------------
+M = ConcreteModel()
+M.x = Var(range(5))
+M.p = Param(range(5), mutable=True)
+
+scale={}
+for i in M.x:
+ scale[id(M.x[i])] = M.p[i]
+
+e = quicksum(M.x[i] for i in M.x)
+f = scale_expression(e,scale)
+
+# p[0]*x[0] + p[1]*x[1] + p[2]*x[2] + p[3]*x[3] + p[4]*x[4]
+print(f)
+
diff --git a/doc/OnlineDocs/tests/expr/managing.txt b/doc/OnlineDocs/tests/expr/managing.txt
new file mode 100644
index 00000000000..5a22c846a8b
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing.txt
@@ -0,0 +1,5 @@
+sin(x) + 2*x
+sum(sin(x), prod(2, x))
+sin(x1) + 2*x2
+-3 + 2*y + x*y + sin(x)
+p[0]*x[0] + p[1]*x[1] + p[2]*x[2] + p[3]*x[3] + p[4]*x[4]
diff --git a/doc/OnlineDocs/tests/expr/managing_ex1.spy b/doc/OnlineDocs/tests/expr/managing_ex1.spy
new file mode 100644
index 00000000000..c63f96fd707
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_ex1.spy
@@ -0,0 +1,12 @@
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+
+e = sin(M.x) + 2*M.x
+
+# sin(x) + 2*x
+print(EXPR.expression_to_string(e))
+
+# sum(sin(x), prod(2, x))
+print(EXPR.expression_to_string(e, verbose=True))
diff --git a/doc/OnlineDocs/tests/expr/managing_ex2.spy b/doc/OnlineDocs/tests/expr/managing_ex2.spy
new file mode 100644
index 00000000000..dfdd0930b01
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_ex2.spy
@@ -0,0 +1,10 @@
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+M.y = Var()
+
+e = sin(M.x) + 2*M.y
+
+# sin(x1) + 2*x2
+print(EXPR.expression_to_string(e, labeler=NumericLabeler('x')))
diff --git a/doc/OnlineDocs/tests/expr/managing_ex3.spy b/doc/OnlineDocs/tests/expr/managing_ex3.spy
new file mode 100644
index 00000000000..48818390b1e
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_ex3.spy
@@ -0,0 +1,10 @@
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+M.y = Var()
+
+e = sin(M.x) + 2*M.y + M.x*M.y - 3
+
+# -3 + 2*y + sin(x) + x*y
+print(EXPR.expression_to_string(e, standardize=True))
diff --git a/doc/OnlineDocs/tests/expr/managing_ex4.spy b/doc/OnlineDocs/tests/expr/managing_ex4.spy
new file mode 100644
index 00000000000..379bd14ea5b
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_ex4.spy
@@ -0,0 +1,11 @@
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+
+with EXPR.clone_counter() as counter:
+ start = counter.count
+ e1 = sin(M.x)
+ e2 = e1.clone()
+ total = counter.count - start
+ assert(total == 1)
diff --git a/doc/OnlineDocs/tests/expr/managing_ex5.spy b/doc/OnlineDocs/tests/expr/managing_ex5.spy
new file mode 100644
index 00000000000..0911e39bc2d
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_ex5.spy
@@ -0,0 +1,5 @@
+M = ConcreteModel()
+M.x = Var()
+M.x.value = math.pi/2.0
+val = value(M.x)
+assert(math.isclose(val, math.pi/2.0))
diff --git a/doc/OnlineDocs/tests/expr/managing_ex6.spy b/doc/OnlineDocs/tests/expr/managing_ex6.spy
new file mode 100644
index 00000000000..cd669ff4400
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_ex6.spy
@@ -0,0 +1,2 @@
+val = M.x()
+assert(math.isclose(val, math.pi/2.0))
diff --git a/doc/OnlineDocs/tests/expr/managing_ex7.spy b/doc/OnlineDocs/tests/expr/managing_ex7.spy
new file mode 100644
index 00000000000..bc8fc56f0a9
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_ex7.spy
@@ -0,0 +1,4 @@
+M = ConcreteModel()
+M.x = Var()
+val = value(M.x, exception=False)
+assert(val is None)
diff --git a/doc/OnlineDocs/tests/expr/managing_ex8.spy b/doc/OnlineDocs/tests/expr/managing_ex8.spy
new file mode 100644
index 00000000000..e5e2093848c
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_ex8.spy
@@ -0,0 +1,9 @@
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+M.p = Param(mutable=True)
+
+e = M.p+M.x
+s = set([type(M.p)])
+assert(list(EXPR.identify_components(e, s)) == [M.p])
diff --git a/doc/OnlineDocs/tests/expr/managing_ex9.spy b/doc/OnlineDocs/tests/expr/managing_ex9.spy
new file mode 100644
index 00000000000..96a3f3caa4e
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_ex9.spy
@@ -0,0 +1,12 @@
+from pyomo.core.expr import current as EXPR
+
+M = ConcreteModel()
+M.x = Var()
+M.y = Var()
+
+e = M.x+M.y
+M.y.value = 1
+M.y.fixed = True
+
+assert(set(id(v) for v in EXPR.identify_variables(e)) == set([id(M.x), id(M.y)]))
+assert(set(id(v) for v in EXPR.identify_variables(e, include_fixed=False)) == set([id(M.x)]))
diff --git a/doc/OnlineDocs/tests/expr/managing_visitor1.spy b/doc/OnlineDocs/tests/expr/managing_visitor1.spy
new file mode 100644
index 00000000000..0fad30d9649
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_visitor1.spy
@@ -0,0 +1,12 @@
+from pyomo.core.expr import current as EXPR
+
+class SizeofVisitor(EXPR.SimpleExpressionVisitor):
+
+ def __init__(self):
+ self.counter = 0
+
+ def visit(self, node):
+ self.counter += 1
+
+ def finalize(self):
+ return self.counter
diff --git a/doc/OnlineDocs/tests/expr/managing_visitor2.spy b/doc/OnlineDocs/tests/expr/managing_visitor2.spy
new file mode 100644
index 00000000000..a247c016767
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_visitor2.spy
@@ -0,0 +1,9 @@
+def sizeof_expression(expr):
+ #
+ # Create the visitor object
+ #
+ visitor = SizeofVisitor()
+ #
+ # Compute the value using the :func:`xbfs` search method.
+ #
+ return visitor.xbfs(expr)
diff --git a/doc/OnlineDocs/tests/expr/managing_visitor3.spy b/doc/OnlineDocs/tests/expr/managing_visitor3.spy
new file mode 100644
index 00000000000..d2ad92a6824
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_visitor3.spy
@@ -0,0 +1,22 @@
+from pyomo.core.expr import current as EXPR
+
+class CloneVisitor(EXPR.ExpressionValueVisitor):
+
+ def __init__(self):
+ self.memo = {'__block_scope__': { id(None): False }}
+
+ def visit(self, node, values):
+ #
+ # Clone the interior node
+ #
+ return node.construct_clone(tuple(values), self.memo)
+
+ def visiting_potential_leaf(self, node):
+ #
+ # Clone leaf nodes in the expression tree
+ #
+ if node.__class__ in native_numeric_types or\
+ node.__class__ not in pyomo5_expression_types:\
+ return True, copy.deepcopy(node, self.memo)
+
+ return False, None
diff --git a/doc/OnlineDocs/tests/expr/managing_visitor4.spy b/doc/OnlineDocs/tests/expr/managing_visitor4.spy
new file mode 100644
index 00000000000..ae9a1e2ec62
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_visitor4.spy
@@ -0,0 +1,10 @@
+def clone_expression(expr):
+ #
+ # Create the visitor object
+ #
+ visitor = CloneVisitor()
+ #
+ # Clone the expression using the :func:`dfs_postorder_stack`
+ # search method.
+ #
+ return visitor.dfs_postorder_stack(expr)
diff --git a/doc/OnlineDocs/tests/expr/managing_visitor5.spy b/doc/OnlineDocs/tests/expr/managing_visitor5.spy
new file mode 100644
index 00000000000..28fe6556d34
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_visitor5.spy
@@ -0,0 +1,25 @@
+from pyomo.core.expr import current as EXPR
+
+class ScalingVisitor(EXPR.ExpressionReplacementVisitor):
+
+ def __init__(self, scale):
+ super(ScalingVisitor, self).__init__()
+ self.scale = scale
+
+ def visiting_potential_leaf(self, node):
+ #
+ # Clone leaf nodes in the expression tree
+ #
+ if node.is_variable_type():
+ return True, self.scale[id(node)]*node
+
+ if isinstance(node, EXPR.LinearExpression):
+ node_ = copy.deepcopy(node)
+ node_.constant = node.constant
+ node_.linear_vars = copy.copy(node.linear_vars)
+ node_.linear_coefs = []
+ for i,v in enumerate(node.linear_vars):
+ node_.linear_coefs.append( node.linear_coefs[i]*self.scale[id(v)] )
+ return True, node_
+
+ return False, None
diff --git a/doc/OnlineDocs/tests/expr/managing_visitor6.spy b/doc/OnlineDocs/tests/expr/managing_visitor6.spy
new file mode 100644
index 00000000000..e6e9ea0fd4e
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_visitor6.spy
@@ -0,0 +1,10 @@
+def scale_expression(expr, scale):
+ #
+ # Create the visitor object
+ #
+ visitor = ScalingVisitor(scale)
+ #
+ # Scale the expression using the :func:`dfs_postorder_stack`
+ # search method.
+ #
+ return visitor.dfs_postorder_stack(expr)
diff --git a/doc/OnlineDocs/tests/expr/managing_visitor7.spy b/doc/OnlineDocs/tests/expr/managing_visitor7.spy
new file mode 100644
index 00000000000..ec8e2ed4fdd
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/managing_visitor7.spy
@@ -0,0 +1,13 @@
+M = ConcreteModel()
+M.x = Var(range(5))
+M.p = Param(range(5), mutable=True)
+
+scale={}
+for i in M.x:
+ scale[id(M.x[i])] = M.p[i]
+
+e = quicksum(M.x[i] for i in M.x)
+f = scale_expression(e,scale)
+
+# p[0]*x[0] + p[1]*x[1] + p[2]*x[2] + p[3]*x[3] + p[4]*x[4]
+print(f)
diff --git a/doc/OnlineDocs/tests/expr/overview.py b/doc/OnlineDocs/tests/expr/overview.py
new file mode 100644
index 00000000000..7cd33925c6c
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/overview.py
@@ -0,0 +1,93 @@
+from pyomo.environ import *
+
+#---------------------------------------------
+# @example1
+M = ConcreteModel()
+M.x = Var(range(100))
+
+# This loop is fast.
+e = 0
+for i in range(100):
+ e = e + M.x[i]
+
+# This loop is slow.
+e = 0
+for i in range(100):
+ e = M.x[i] + e
+# @example1
+print(e)
+
+#---------------------------------------------
+# @example2
+M = ConcreteModel()
+M.p = Param(initialize=3)
+M.q = 1/M.p
+M.x = Var(range(100))
+
+# The value M.q is cloned every time it is used.
+e = 0
+for i in range(100):
+ e = e + M.x[i]*M.q
+# @example2
+print(e)
+
+#---------------------------------------------
+# @tree1
+M = ConcreteModel()
+M.v = Var()
+
+e = f = 2*M.v
+# @tree1
+print(e)
+
+#---------------------------------------------
+# @tree2
+M = ConcreteModel()
+M.v = Var()
+
+e = 2*M.v
+f = e + 3
+# @tree2
+print(e)
+print(f)
+
+#---------------------------------------------
+# @tree3
+M = ConcreteModel()
+M.v = Var()
+
+e = 2*M.v
+f = e + 3
+g = e + 4
+# @tree3
+print(e)
+print(f)
+print(g)
+
+#---------------------------------------------
+# @tree4
+M = ConcreteModel()
+M.v = Var()
+M.w = Var()
+
+e = 2*M.v
+f = e + 3
+
+e += M.w
+# @tree4
+print(e)
+print(f)
+
+#---------------------------------------------
+# @tree5
+M = ConcreteModel()
+M.v = Var()
+M.w = Var()
+
+M.e = Expression(expr=2*M.v)
+f = M.e + 3
+
+M.e += M.w
+# @tree5
+print(M.e)
+
diff --git a/doc/OnlineDocs/tests/expr/overview.spy b/doc/OnlineDocs/tests/expr/overview.spy
new file mode 100644
index 00000000000..3503acf9afe
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/overview.spy
@@ -0,0 +1,79 @@
+from pyomo.environ import *
+
+#---------------------------------------------
+M = ConcreteModel()
+M.x = Var(range(100))
+
+# This loop is fast.
+e = 0
+for i in range(100):
+ e = e + M.x[i]
+
+# This loop is slow.
+e = 0
+for i in range(100):
+ e = M.x[i] + e
+print(e)
+
+#---------------------------------------------
+M = ConcreteModel()
+M.p = Param(initialize=3)
+M.q = 1/M.p
+M.x = Var(range(100))
+
+# The value M.q is cloned every time it is used.
+e = 0
+for i in range(100):
+ e = e + M.x[i]*M.q
+print(e)
+
+#---------------------------------------------
+M = ConcreteModel()
+M.v = Var()
+
+e = f = 2*M.v
+print(e)
+
+#---------------------------------------------
+M = ConcreteModel()
+M.v = Var()
+
+e = 2*M.v
+f = e + 3
+print(e)
+print(f)
+
+#---------------------------------------------
+M = ConcreteModel()
+M.v = Var()
+
+e = 2*M.v
+f = e + 3
+g = e + 4
+print(e)
+print(f)
+print(g)
+
+#---------------------------------------------
+M = ConcreteModel()
+M.v = Var()
+M.w = Var()
+
+e = 2*M.v
+f = e + 3
+
+e += M.w
+print(e)
+print(f)
+
+#---------------------------------------------
+M = ConcreteModel()
+M.v = Var()
+M.w = Var()
+
+M.e = Expression(expr=2*M.v)
+f = M.e + 3
+
+M.e += M.w
+print(M.e)
+
diff --git a/doc/OnlineDocs/tests/expr/overview.txt b/doc/OnlineDocs/tests/expr/overview.txt
new file mode 100644
index 00000000000..528041e1ba1
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/overview.txt
@@ -0,0 +1,11 @@
+x[1] + x[0] + x[2] + x[3] + x[4] + x[5] + x[6] + x[7] + x[8] + x[9] + x[10] + x[11] + x[12] + x[13] + x[14] + x[15] + x[16] + x[17] + x[18] + x[19] + x[20] + x[21] + x[22] + x[23] + x[24] + x[25] + x[26] + x[27] + x[28] + x[29] + x[30] + x[31] + x[32] + x[33] + x[34] + x[35] + x[36] + x[37] + x[38] + x[39] + x[40] + x[41] + x[42] + x[43] + x[44] + x[45] + x[46] + x[47] + x[48] + x[49] + x[50] + x[51] + x[52] + x[53] + x[54] + x[55] + x[56] + x[57] + x[58] + x[59] + x[60] + x[61] + x[62] + x[63] + x[64] + x[65] + x[66] + x[67] + x[68] + x[69] + x[70] + x[71] + x[72] + x[73] + x[74] + x[75] + x[76] + x[77] + x[78] + x[79] + x[80] + x[81] + x[82] + x[83] + x[84] + x[85] + x[86] + x[87] + x[88] + x[89] + x[90] + x[91] + x[92] + x[93] + x[94] + x[95] + x[96] + x[97] + x[98] + x[99]
+0.3333333333333333*x[0] + 0.3333333333333333*x[1] + 0.3333333333333333*x[2] + 0.3333333333333333*x[3] + 0.3333333333333333*x[4] + 0.3333333333333333*x[5] + 0.3333333333333333*x[6] + 0.3333333333333333*x[7] + 0.3333333333333333*x[8] + 0.3333333333333333*x[9] + 0.3333333333333333*x[10] + 0.3333333333333333*x[11] + 0.3333333333333333*x[12] + 0.3333333333333333*x[13] + 0.3333333333333333*x[14] + 0.3333333333333333*x[15] + 0.3333333333333333*x[16] + 0.3333333333333333*x[17] + 0.3333333333333333*x[18] + 0.3333333333333333*x[19] + 0.3333333333333333*x[20] + 0.3333333333333333*x[21] + 0.3333333333333333*x[22] + 0.3333333333333333*x[23] + 0.3333333333333333*x[24] + 0.3333333333333333*x[25] + 0.3333333333333333*x[26] + 0.3333333333333333*x[27] + 0.3333333333333333*x[28] + 0.3333333333333333*x[29] + 0.3333333333333333*x[30] + 0.3333333333333333*x[31] + 0.3333333333333333*x[32] + 0.3333333333333333*x[33] + 0.3333333333333333*x[34] + 0.3333333333333333*x[35] + 0.3333333333333333*x[36] + 0.3333333333333333*x[37] + 0.3333333333333333*x[38] + 0.3333333333333333*x[39] + 0.3333333333333333*x[40] + 0.3333333333333333*x[41] + 0.3333333333333333*x[42] + 0.3333333333333333*x[43] + 0.3333333333333333*x[44] + 0.3333333333333333*x[45] + 0.3333333333333333*x[46] + 0.3333333333333333*x[47] + 0.3333333333333333*x[48] + 0.3333333333333333*x[49] + 0.3333333333333333*x[50] + 0.3333333333333333*x[51] + 0.3333333333333333*x[52] + 0.3333333333333333*x[53] + 0.3333333333333333*x[54] + 0.3333333333333333*x[55] + 0.3333333333333333*x[56] + 0.3333333333333333*x[57] + 0.3333333333333333*x[58] + 0.3333333333333333*x[59] + 0.3333333333333333*x[60] + 0.3333333333333333*x[61] + 0.3333333333333333*x[62] + 0.3333333333333333*x[63] + 0.3333333333333333*x[64] + 0.3333333333333333*x[65] + 0.3333333333333333*x[66] + 0.3333333333333333*x[67] + 0.3333333333333333*x[68] + 0.3333333333333333*x[69] + 0.3333333333333333*x[70] + 0.3333333333333333*x[71] + 0.3333333333333333*x[72] + 0.3333333333333333*x[73] + 0.3333333333333333*x[74] + 0.3333333333333333*x[75] + 0.3333333333333333*x[76] + 0.3333333333333333*x[77] + 0.3333333333333333*x[78] + 0.3333333333333333*x[79] + 0.3333333333333333*x[80] + 0.3333333333333333*x[81] + 0.3333333333333333*x[82] + 0.3333333333333333*x[83] + 0.3333333333333333*x[84] + 0.3333333333333333*x[85] + 0.3333333333333333*x[86] + 0.3333333333333333*x[87] + 0.3333333333333333*x[88] + 0.3333333333333333*x[89] + 0.3333333333333333*x[90] + 0.3333333333333333*x[91] + 0.3333333333333333*x[92] + 0.3333333333333333*x[93] + 0.3333333333333333*x[94] + 0.3333333333333333*x[95] + 0.3333333333333333*x[96] + 0.3333333333333333*x[97] + 0.3333333333333333*x[98] + 0.3333333333333333*x[99]
+2*v
+2*v
+2*v + 3
+2*v
+2*v + 3
+2*v + 4
+2*v + w
+2*v + 3
+e
diff --git a/doc/OnlineDocs/tests/expr/overview_example1.spy b/doc/OnlineDocs/tests/expr/overview_example1.spy
new file mode 100644
index 00000000000..dffc0c2f13d
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/overview_example1.spy
@@ -0,0 +1,12 @@
+M = ConcreteModel()
+M.x = Var(range(100))
+
+# This loop is fast.
+e = 0
+for i in range(100):
+ e = e + M.x[i]
+
+# This loop is slow.
+e = 0
+for i in range(100):
+ e = M.x[i] + e
diff --git a/doc/OnlineDocs/tests/expr/overview_example2.spy b/doc/OnlineDocs/tests/expr/overview_example2.spy
new file mode 100644
index 00000000000..02bbc3e1693
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/overview_example2.spy
@@ -0,0 +1,9 @@
+M = ConcreteModel()
+M.p = Param(initialize=3)
+M.q = 1/M.p
+M.x = Var(range(100))
+
+# The value M.q is cloned every time it is used.
+e = 0
+for i in range(100):
+ e = e + M.x[i]*M.q
diff --git a/doc/OnlineDocs/tests/expr/overview_tree1.spy b/doc/OnlineDocs/tests/expr/overview_tree1.spy
new file mode 100644
index 00000000000..095c7794145
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/overview_tree1.spy
@@ -0,0 +1,4 @@
+M = ConcreteModel()
+M.v = Var()
+
+e = f = 2*M.v
diff --git a/doc/OnlineDocs/tests/expr/overview_tree2.spy b/doc/OnlineDocs/tests/expr/overview_tree2.spy
new file mode 100644
index 00000000000..f6518cdb1c7
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/overview_tree2.spy
@@ -0,0 +1,5 @@
+M = ConcreteModel()
+M.v = Var()
+
+e = 2*M.v
+f = e + 3
diff --git a/doc/OnlineDocs/tests/expr/overview_tree3.spy b/doc/OnlineDocs/tests/expr/overview_tree3.spy
new file mode 100644
index 00000000000..3b324487243
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/overview_tree3.spy
@@ -0,0 +1,6 @@
+M = ConcreteModel()
+M.v = Var()
+
+e = 2*M.v
+f = e + 3
+g = e + 4
diff --git a/doc/OnlineDocs/tests/expr/overview_tree4.spy b/doc/OnlineDocs/tests/expr/overview_tree4.spy
new file mode 100644
index 00000000000..ab1ac9d0c29
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/overview_tree4.spy
@@ -0,0 +1,8 @@
+M = ConcreteModel()
+M.v = Var()
+M.w = Var()
+
+e = 2*M.v
+f = e + 3
+
+e += M.w
diff --git a/doc/OnlineDocs/tests/expr/overview_tree5.spy b/doc/OnlineDocs/tests/expr/overview_tree5.spy
new file mode 100644
index 00000000000..d5f6e46ebb8
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/overview_tree5.spy
@@ -0,0 +1,8 @@
+M = ConcreteModel()
+M.v = Var()
+M.w = Var()
+
+M.e = Expression(expr=2*M.v)
+f = M.e + 3
+
+M.e += M.w
diff --git a/doc/OnlineDocs/tests/expr/performance.py b/doc/OnlineDocs/tests/expr/performance.py
new file mode 100644
index 00000000000..7ece93c195e
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/performance.py
@@ -0,0 +1,98 @@
+from pyomo.environ import *
+
+#---------------------------------------------
+# @loop1
+M = ConcreteModel()
+M.x = Var(range(5))
+
+s = 0
+for i in range(5):
+ s = s + M.x[i]
+# @loop1
+print(s)
+
+#---------------------------------------------
+# @loop2
+s = sum(M.x[i] for i in range(5))
+# @loop2
+print(s)
+
+#---------------------------------------------
+# @loop3
+s = sum(M.x[i] for i in range(5))**2
+# @loop3
+print(s)
+
+#---------------------------------------------
+# @prod
+M = ConcreteModel()
+M.x = Var(range(5))
+M.z = Var()
+
+# The product M.x[0] * M.x[1] * ... * M.x[4]
+e1 = prod(M.x[i] for i in M.x)
+
+# The product M.x[0]*M.z
+e2 = prod([M.x[0], M.z])
+
+# The product M.z*(M.x[0] + ... + M.x[4])
+e3 = prod([sum(M.x[i] for i in M.x), M.z])
+# @prod
+print(e1)
+print(e2)
+print(e3)
+
+#---------------------------------------------
+# @quicksum
+M = ConcreteModel()
+M.x = Var(range(5))
+
+# Summation using the Python sum() function
+e1 = sum(M.x[i]**2 for i in M.x)
+
+# Summation using the Pyomo quicksum function
+e2 = quicksum(M.x[i]**2 for i in M.x)
+# @quicksum
+print(e1)
+print(e2)
+
+#---------------------------------------------
+# @warning
+M = ConcreteModel()
+M.x = Var(range(5))
+
+e = quicksum(M.x[i]**2 if i > 0 else M.x[i] for i in range(5))
+# @warning
+print(e)
+
+#---------------------------------------------
+# @sum_product1
+M = ConcreteModel()
+M.z = RangeSet(5)
+M.x = Var(range(10))
+M.y = Var(range(10))
+
+# Sum the elements of x
+e1 = sum_product(M.x)
+
+# Sum the product of elements in x and y
+e2 = sum_product(M.x, M.y)
+
+# Sum the product of elements in x and y, over the index set z
+e3 = sum_product(M.x, M.y, index=M.z)
+# @sum_product1
+print(e1)
+print(e2)
+print(e3)
+
+#---------------------------------------------
+# @sum_product2
+# Sum the product of x_i/y_i
+e1 = sum_product(M.x, denom=M.y)
+
+# Sum the product of 1/(x_i*y_i)
+e2 = sum_product(denom=(M.x, M.y))
+# @sum_product2
+print(e1)
+print(e2)
+
diff --git a/doc/OnlineDocs/tests/expr/performance.spy b/doc/OnlineDocs/tests/expr/performance.spy
new file mode 100644
index 00000000000..9c4d8e848df
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/performance.spy
@@ -0,0 +1,82 @@
+from pyomo.environ import *
+
+#---------------------------------------------
+M = ConcreteModel()
+M.x = Var(range(5))
+
+s = 0
+for i in range(5):
+ s = s + M.x[i]
+print(s)
+
+#---------------------------------------------
+s = sum(M.x[i] for i in range(5))
+print(s)
+
+#---------------------------------------------
+s = sum(M.x[i] for i in range(5))**2
+print(s)
+
+#---------------------------------------------
+M = ConcreteModel()
+M.x = Var(range(5))
+M.z = Var()
+
+# The product M.x[0] * M.x[1] * ... * M.x[4]
+e1 = prod(M.x[i] for i in M.x)
+
+# The product M.x[0]*M.z
+e2 = prod([M.x[0], M.z])
+
+# The product M.z*(M.x[0] + ... + M.x[4])
+e3 = prod([sum(M.x[i] for i in M.x), M.z])
+print(e1)
+print(e2)
+print(e3)
+
+#---------------------------------------------
+M = ConcreteModel()
+M.x = Var(range(5))
+
+# Summation using the Python sum() function
+e1 = sum(M.x[i]**2 for i in M.x)
+
+# Summation using the Pyomo quicksum function
+e2 = quicksum(M.x[i]**2 for i in M.x)
+print(e1)
+print(e2)
+
+#---------------------------------------------
+M = ConcreteModel()
+M.x = Var(range(5))
+
+e = quicksum(M.x[i]**2 if i > 0 else M.x[i] for i in range(5))
+print(e)
+
+#---------------------------------------------
+M = ConcreteModel()
+M.z = RangeSet(5)
+M.x = Var(range(10))
+M.y = Var(range(10))
+
+# Sum the elements of x
+e1 = sum_product(M.x)
+
+# Sum the product of elements in x and y
+e2 = sum_product(M.x, M.y)
+
+# Sum the product of elements in x and y, over the index set z
+e3 = sum_product(M.x, M.y, index=M.z)
+print(e1)
+print(e2)
+print(e3)
+
+#---------------------------------------------
+# Sum the product of x_i/y_i
+e1 = sum_product(M.x, denom=M.y)
+
+# Sum the product of 1/(x_i*y_i)
+e2 = sum_product(denom=(M.x, M.y))
+print(e1)
+print(e2)
+
diff --git a/doc/OnlineDocs/tests/expr/performance.txt b/doc/OnlineDocs/tests/expr/performance.txt
new file mode 100644
index 00000000000..c1387a51ce4
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/performance.txt
@@ -0,0 +1,14 @@
+x[0] + x[1] + x[2] + x[3] + x[4]
+x[0] + x[1] + x[2] + x[3] + x[4]
+(x[0] + x[1] + x[2] + x[3] + x[4])**2
+x[0]*x[1]*x[2]*x[3]*x[4]
+x[0]*z
+(x[0] + x[1] + x[2] + x[3] + x[4])*z
+x[0]**2 + x[1]**2 + x[2]**2 + x[3]**2 + x[4]**2
+x[0]**2 + x[1]**2 + x[2]**2 + x[3]**2 + x[4]**2
+x[0] + x[1]**2 + x[2]**2 + x[3]**2 + x[4]**2
+x[0] + x[1] + x[2] + x[3] + x[4] + x[5] + x[6] + x[7] + x[8] + x[9]
+x[0]*y[0] + x[1]*y[1] + x[2]*y[2] + x[3]*y[3] + x[4]*y[4] + x[5]*y[5] + x[6]*y[6] + x[7]*y[7] + x[8]*y[8] + x[9]*y[9]
+x[1]*y[1] + x[2]*y[2] + x[3]*y[3] + x[4]*y[4] + x[5]*y[5]
+x[0]*(1/y[0]) + x[1]*(1/y[1]) + x[2]*(1/y[2]) + x[3]*(1/y[3]) + x[4]*(1/y[4]) + x[5]*(1/y[5]) + x[6]*(1/y[6]) + x[7]*(1/y[7]) + x[8]*(1/y[8]) + x[9]*(1/y[9])
+(1/(x[0]*y[0])) + (1/(x[1]*y[1])) + (1/(x[2]*y[2])) + (1/(x[3]*y[3])) + (1/(x[4]*y[4])) + (1/(x[5]*y[5])) + (1/(x[6]*y[6])) + (1/(x[7]*y[7])) + (1/(x[8]*y[8])) + (1/(x[9]*y[9]))
diff --git a/doc/OnlineDocs/tests/expr/performance_loop1.spy b/doc/OnlineDocs/tests/expr/performance_loop1.spy
new file mode 100644
index 00000000000..a5da3fd3a97
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/performance_loop1.spy
@@ -0,0 +1,6 @@
+M = ConcreteModel()
+M.x = Var(range(5))
+
+s = 0
+for i in range(5):
+ s = s + M.x[i]
diff --git a/doc/OnlineDocs/tests/expr/performance_loop2.spy b/doc/OnlineDocs/tests/expr/performance_loop2.spy
new file mode 100644
index 00000000000..819fb6b1473
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/performance_loop2.spy
@@ -0,0 +1 @@
+s = sum(M.x[i] for i in range(5))
diff --git a/doc/OnlineDocs/tests/expr/performance_loop3.spy b/doc/OnlineDocs/tests/expr/performance_loop3.spy
new file mode 100644
index 00000000000..392c127ff81
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/performance_loop3.spy
@@ -0,0 +1 @@
+s = sum(M.x[i] for i in range(5))**2
diff --git a/doc/OnlineDocs/tests/expr/performance_prod.spy b/doc/OnlineDocs/tests/expr/performance_prod.spy
new file mode 100644
index 00000000000..8a3bd9ec6db
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/performance_prod.spy
@@ -0,0 +1,12 @@
+M = ConcreteModel()
+M.x = Var(range(5))
+M.z = Var()
+
+# The product M.x[0] * M.x[1] * ... * M.x[4]
+e1 = prod(M.x[i] for i in M.x)
+
+# The product M.x[0]*M.z
+e2 = prod([M.x[0], M.z])
+
+# The product M.z*(M.x[0] + ... + M.x[4])
+e3 = prod([sum(M.x[i] for i in M.x), M.z])
diff --git a/doc/OnlineDocs/tests/expr/performance_quicksum.spy b/doc/OnlineDocs/tests/expr/performance_quicksum.spy
new file mode 100644
index 00000000000..ace431cdd34
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/performance_quicksum.spy
@@ -0,0 +1,8 @@
+M = ConcreteModel()
+M.x = Var(range(5))
+
+# Summation using the Python sum() function
+e1 = sum(M.x[i]**2 for i in M.x)
+
+# Summation using the Pyomo quicksum function
+e2 = quicksum(M.x[i]**2 for i in M.x)
diff --git a/doc/OnlineDocs/tests/expr/performance_sum_product1.spy b/doc/OnlineDocs/tests/expr/performance_sum_product1.spy
new file mode 100644
index 00000000000..b8f3d8fdaf5
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/performance_sum_product1.spy
@@ -0,0 +1,13 @@
+M = ConcreteModel()
+M.z = RangeSet(5)
+M.x = Var(range(10))
+M.y = Var(range(10))
+
+# Sum the elements of x
+e1 = sum_product(M.x)
+
+# Sum the product of elements in x and y
+e2 = sum_product(M.x, M.y)
+
+# Sum the product of elements in x and y, over the index set z
+e3 = sum_product(M.x, M.y, index=M.z)
diff --git a/doc/OnlineDocs/tests/expr/performance_sum_product2.spy b/doc/OnlineDocs/tests/expr/performance_sum_product2.spy
new file mode 100644
index 00000000000..011bf506f85
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/performance_sum_product2.spy
@@ -0,0 +1,5 @@
+# Sum the product of x_i/y_i
+e1 = sum_product(M.x, denom=M.y)
+
+# Sum the product of 1/(x_i*y_i)
+e2 = sum_product(denom=(M.x, M.y))
diff --git a/doc/OnlineDocs/tests/expr/performance_warning.spy b/doc/OnlineDocs/tests/expr/performance_warning.spy
new file mode 100644
index 00000000000..57666325e5b
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/performance_warning.spy
@@ -0,0 +1,4 @@
+M = ConcreteModel()
+M.x = Var(range(5))
+
+e = quicksum(M.x[i]**2 if i > 0 else M.x[i] for i in range(5))
diff --git a/doc/OnlineDocs/tests/expr/quicksum.log b/doc/OnlineDocs/tests/expr/quicksum.log
new file mode 100644
index 00000000000..11e1f203654
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/quicksum.log
@@ -0,0 +1,4 @@
+sum: 1.447861
+repn: 0.870225
+quicksum: 1.388344
+repn: 0.864316
diff --git a/doc/OnlineDocs/tests/expr/quicksum.py b/doc/OnlineDocs/tests/expr/quicksum.py
new file mode 100644
index 00000000000..23b6c3473e3
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/quicksum.py
@@ -0,0 +1,27 @@
+from pyomo.environ import *
+from pyomo.repn import generate_standard_repn
+import time
+
+# @runtime
+M = ConcreteModel()
+M.A = RangeSet(100000)
+M.p = Param(M.A, mutable=True, initialize=1)
+M.x = Var(M.A)
+
+start = time.time()
+e = sum( (M.x[i] - 1)**M.p[i] for i in M.A)
+print("sum: %f" % (time.time() - start))
+
+start = time.time()
+generate_standard_repn(e)
+print("repn: %f" % (time.time() - start))
+
+start = time.time()
+e = quicksum( (M.x[i] - 1)**M.p[i] for i in M.A)
+print("quicksum: %f" % (time.time() - start))
+
+start = time.time()
+generate_standard_repn(e)
+print("repn: %f" % (time.time() - start))
+
+# @runtime
diff --git a/doc/OnlineDocs/tests/expr/quicksum.spy b/doc/OnlineDocs/tests/expr/quicksum.spy
new file mode 100644
index 00000000000..29d58478efa
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/quicksum.spy
@@ -0,0 +1,25 @@
+from pyomo.environ import *
+from pyomo.repn import generate_standard_repn
+import time
+
+M = ConcreteModel()
+M.A = RangeSet(100000)
+M.p = Param(M.A, mutable=True, initialize=1)
+M.x = Var(M.A)
+
+start = time.time()
+e = sum( (M.x[i] - 1)**M.p[i] for i in M.A)
+print("sum: %f" % (time.time() - start))
+
+start = time.time()
+generate_standard_repn(e)
+print("repn: %f" % (time.time() - start))
+
+start = time.time()
+e = quicksum( (M.x[i] - 1)**M.p[i] for i in M.A)
+print("quicksum: %f" % (time.time() - start))
+
+start = time.time()
+generate_standard_repn(e)
+print("repn: %f" % (time.time() - start))
+
diff --git a/doc/OnlineDocs/tests/expr/quicksum_runtime.spy b/doc/OnlineDocs/tests/expr/quicksum_runtime.spy
new file mode 100644
index 00000000000..4cad85d7453
--- /dev/null
+++ b/doc/OnlineDocs/tests/expr/quicksum_runtime.spy
@@ -0,0 +1,21 @@
+M = ConcreteModel()
+M.A = RangeSet(100000)
+M.p = Param(M.A, mutable=True, initialize=1)
+M.x = Var(M.A)
+
+start = time.time()
+e = sum( (M.x[i] - 1)**M.p[i] for i in M.A)
+print("sum: %f" % (time.time() - start))
+
+start = time.time()
+generate_standard_repn(e)
+print("repn: %f" % (time.time() - start))
+
+start = time.time()
+e = quicksum( (M.x[i] - 1)**M.p[i] for i in M.A)
+print("quicksum: %f" % (time.time() - start))
+
+start = time.time()
+generate_standard_repn(e)
+print("repn: %f" % (time.time() - start))
+
diff --git a/doc/OnlineDocs/tutorial/index.rst b/doc/OnlineDocs/tutorial/index.rst
index 2d2739e4960..3ddf4f20fea 100644
--- a/doc/OnlineDocs/tutorial/index.rst
+++ b/doc/OnlineDocs/tutorial/index.rst
@@ -52,8 +52,8 @@ and
c : Size=3, Index=a, Active=True
Key : Lower : Body : Upper : Active
1 : -Inf : y[1] - x[1] : 0.0 : True
- 2 : -Inf : y[2] - x[2] : 0.0 : True
- 3 : -Inf : y[3] - x[3] : 0.0 : True
+ 2 : -Inf : y[2] - x[2] : 0.0 : True
+ 3 : -Inf : y[3] - x[3] : 0.0 : True
The index specifies the set of *allowable members* of the component. In
the case of :class:`Var`, the constructor will
@@ -96,9 +96,9 @@ This set admits any hashable object as a member.
>>> m.c2[8] = m.x[2] == m.z * m.y[2]
>>> m.c2.pprint()
c2 : Size=2, Index=Any, Active=True
- Key : Lower : Body : Upper : Active
- 1 : 0.0 : x[1] - 5*z : 0.0 : True
- 8 : 0.0 : x[2] - z * y[2] : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 1 : 0.0 : x[1] - 5*z : 0.0 : True
+ 8 : 0.0 : x[2] - z*y[2] : 0.0 : True
.. note::
@@ -116,13 +116,13 @@ This set admits any hashable object as a member.
v : Size=2, Index=Any
Key : Lower : Value : Upper : Fixed : Stale : Domain
1 : None : None : None : False : True : Reals
- 2 : None : None : None : False : True : Reals
+ 2 : None : None : None : False : True : Reals
>>> m.c2.pprint()
c2 : Size=3, Index=Any, Active=True
- Key : Lower : Body : Upper : Active
- 1 : 0.0 : x[1] - 5*z : 0.0 : True
- 2 : 0.0 : v[1] + v[2] : 0.0 : True
- 8 : 0.0 : x[2] - z * y[2] : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 1 : 0.0 : x[1] - 5*z : 0.0 : True
+ 2 : 0.0 : v[1] + v[2] : 0.0 : True
+ 8 : 0.0 : x[2] - z*y[2] : 0.0 : True
The following illustrates how to use `Any` with Blocks.
diff --git a/examples/bilevel/interdiction.py b/examples/bilevel/interdiction.py
index 750fc1fdc0c..3fd0ab0f096 100644
--- a/examples/bilevel/interdiction.py
+++ b/examples/bilevel/interdiction.py
@@ -74,7 +74,7 @@ def o_rule(model):
model.o = Objective(rule=o_rule, sense=maximize)
# Limit the total interdiction cost
def interdictions_rule(model):
- return summation(model.r, model.x) <= model.Gamma
+ return sum_product(model.r, model.x) <= model.Gamma
model.interdictions = Constraint()
# Create a submodel. The argument indicates the upper-level
diff --git a/examples/dae/disease_DAE.py b/examples/dae/disease_DAE.py
index 04fc59178f9..b8d7ebcde20 100644
--- a/examples/dae/disease_DAE.py
+++ b/examples/dae/disease_DAE.py
@@ -227,7 +227,7 @@ def _scaled_beta(model, i):
model.con_city_varying_beta = Constraint(model.S_BETA, rule=_scaled_beta)
def _mean_patt(model):
- return (1.0, summation(model.beta_patt)/len(model.S_BETA))
+ return (1.0, sum_product(model.beta_patt)/len(model.S_BETA))
model.con_mean_patt = Constraint(rule=_mean_patt)
def _beta_c(model):
diff --git a/examples/doc/pyomobook/bilevel-ch/trilevel.txt b/examples/doc/pyomobook/bilevel-ch/trilevel.txt
index 72fb1bffae7..6e0e873707c 100644
--- a/examples/doc/pyomobook/bilevel-ch/trilevel.txt
+++ b/examples/doc/pyomobook/bilevel-ch/trilevel.txt
@@ -10,11 +10,11 @@
2 Constraint Declarations
c1 : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : - x - s.y : -3.0 : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : - x - s.y : -3.0 : True
c2 : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -10.0 : - 3*x + 2*s.y : +Inf : True
+ Key : Lower : Body : Upper : Active
+ None : -10.0 : -3*x + 2*s.y : +Inf : True
1 SubModel Declarations
s : Size=1, Index=None, Active=True
@@ -30,8 +30,8 @@
2 Constraint Declarations
c1 : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : - 2*x + s.y - 2*s.s.z : -1.0 : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : -2*x + s.y - 2*s.s.z : -1.0 : True
c2 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : -Inf : 2*x + s.y + 4*s.s.z : 14.0 : True
diff --git a/examples/doc/pyomobook/blocks-ch/blocks_gen.txt b/examples/doc/pyomobook/blocks-ch/blocks_gen.txt
index 947a0503159..4245e542475 100644
--- a/examples/doc/pyomobook/blocks-ch/blocks_gen.txt
+++ b/examples/doc/pyomobook/blocks-ch/blocks_gen.txt
@@ -48,11 +48,11 @@
1 Constraint Declarations
limit_ramp : Size=4, Index=TIME, Active=True
- Key : Lower : Body : Upper : Active
- 1 : -50.0 : Generator[G_EAST].Power[1] - Generator[G_EAST].Power[0] : Generator[G_EAST].RampLimit : True
- 2 : -50.0 : Generator[G_EAST].Power[2] - Generator[G_EAST].Power[1] : Generator[G_EAST].RampLimit : True
- 3 : -50.0 : Generator[G_EAST].Power[3] - Generator[G_EAST].Power[2] : Generator[G_EAST].RampLimit : True
- 4 : -50.0 : Generator[G_EAST].Power[4] - Generator[G_EAST].Power[3] : Generator[G_EAST].RampLimit : True
+ Key : Lower : Body : Upper : Active
+ 1 : -50.0 : Generator[G_EAST].Power[1] - Generator[G_EAST].Power[0] : 50.0 : True
+ 2 : -50.0 : Generator[G_EAST].Power[2] - Generator[G_EAST].Power[1] : 50.0 : True
+ 3 : -50.0 : Generator[G_EAST].Power[3] - Generator[G_EAST].Power[2] : 50.0 : True
+ 4 : -50.0 : Generator[G_EAST].Power[4] - Generator[G_EAST].Power[3] : 50.0 : True
8 Declarations: MaxPower RampLimit Power UnitOn limit_ramp CostCoef_index CostCoef Cost
Generator[G_MAIN] : Active=True
@@ -97,11 +97,11 @@
1 Constraint Declarations
limit_ramp : Size=4, Index=TIME, Active=True
- Key : Lower : Body : Upper : Active
- 1 : -50.0 : Generator[G_MAIN].Power[1] - Generator[G_MAIN].Power[0] : Generator[G_MAIN].RampLimit : True
- 2 : -50.0 : Generator[G_MAIN].Power[2] - Generator[G_MAIN].Power[1] : Generator[G_MAIN].RampLimit : True
- 3 : -50.0 : Generator[G_MAIN].Power[3] - Generator[G_MAIN].Power[2] : Generator[G_MAIN].RampLimit : True
- 4 : -50.0 : Generator[G_MAIN].Power[4] - Generator[G_MAIN].Power[3] : Generator[G_MAIN].RampLimit : True
+ Key : Lower : Body : Upper : Active
+ 1 : -50.0 : Generator[G_MAIN].Power[1] - Generator[G_MAIN].Power[0] : 50.0 : True
+ 2 : -50.0 : Generator[G_MAIN].Power[2] - Generator[G_MAIN].Power[1] : 50.0 : True
+ 3 : -50.0 : Generator[G_MAIN].Power[3] - Generator[G_MAIN].Power[2] : 50.0 : True
+ 4 : -50.0 : Generator[G_MAIN].Power[4] - Generator[G_MAIN].Power[3] : 50.0 : True
8 Declarations: MaxPower RampLimit Power UnitOn limit_ramp CostCoef_index CostCoef Cost
@@ -156,11 +156,11 @@
1 Constraint Declarations
limit_ramp : Size=4, Index=TIME, Active=True
- Key : Lower : Body : Upper : Active
- 1 : -50.0 : Generator[G_EAST].Power[1] - Generator[G_EAST].Power[0] : Generator[G_EAST].RampLimit : True
- 2 : -50.0 : Generator[G_EAST].Power[2] - Generator[G_EAST].Power[1] : Generator[G_EAST].RampLimit : True
- 3 : -50.0 : Generator[G_EAST].Power[3] - Generator[G_EAST].Power[2] : Generator[G_EAST].RampLimit : True
- 4 : -50.0 : Generator[G_EAST].Power[4] - Generator[G_EAST].Power[3] : Generator[G_EAST].RampLimit : True
+ Key : Lower : Body : Upper : Active
+ 1 : -50.0 : Generator[G_EAST].Power[1] - Generator[G_EAST].Power[0] : 50.0 : True
+ 2 : -50.0 : Generator[G_EAST].Power[2] - Generator[G_EAST].Power[1] : 50.0 : True
+ 3 : -50.0 : Generator[G_EAST].Power[3] - Generator[G_EAST].Power[2] : 50.0 : True
+ 4 : -50.0 : Generator[G_EAST].Power[4] - Generator[G_EAST].Power[3] : 50.0 : True
8 Declarations: MaxPower RampLimit Power UnitOn limit_ramp CostCoef_index CostCoef Cost
Generator[G_MAIN] : Active=True
@@ -205,11 +205,11 @@
1 Constraint Declarations
limit_ramp : Size=4, Index=TIME, Active=True
- Key : Lower : Body : Upper : Active
- 1 : -50.0 : Generator[G_MAIN].Power[1] - Generator[G_MAIN].Power[0] : Generator[G_MAIN].RampLimit : True
- 2 : -50.0 : Generator[G_MAIN].Power[2] - Generator[G_MAIN].Power[1] : Generator[G_MAIN].RampLimit : True
- 3 : -50.0 : Generator[G_MAIN].Power[3] - Generator[G_MAIN].Power[2] : Generator[G_MAIN].RampLimit : True
- 4 : -50.0 : Generator[G_MAIN].Power[4] - Generator[G_MAIN].Power[3] : Generator[G_MAIN].RampLimit : True
+ Key : Lower : Body : Upper : Active
+ 1 : -50.0 : Generator[G_MAIN].Power[1] - Generator[G_MAIN].Power[0] : 50.0 : True
+ 2 : -50.0 : Generator[G_MAIN].Power[2] - Generator[G_MAIN].Power[1] : 50.0 : True
+ 3 : -50.0 : Generator[G_MAIN].Power[3] - Generator[G_MAIN].Power[2] : 50.0 : True
+ 4 : -50.0 : Generator[G_MAIN].Power[4] - Generator[G_MAIN].Power[3] : 50.0 : True
8 Declarations: MaxPower RampLimit Power UnitOn limit_ramp CostCoef_index CostCoef Cost
diff --git a/examples/doc/pyomobook/blocks-ch/blocks_intro.txt b/examples/doc/pyomobook/blocks-ch/blocks_intro.txt
index 7606cd8b41d..c0404f8e668 100644
--- a/examples/doc/pyomobook/blocks-ch/blocks_intro.txt
+++ b/examples/doc/pyomobook/blocks-ch/blocks_intro.txt
@@ -48,66 +48,66 @@ b.b.x
1 Block Declarations
xyb : Size=3, Index=T, Active=True
- xyb[1] : Active=True
- 1 RangeSet Declarations
- I : Dim=0, Dimen=1, Size=1, Domain=Integers, Ordered=True, Bounds=(1, 1)
- Virtual
-
- 2 Var Declarations
- x : Size=1, Index=None
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- None : None : None : None : False : True : Reals
- y : Size=1, Index=xyb[1].I
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- 1 : None : None : None : False : True : Reals
-
- 1 Constraint Declarations
- c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + xyb[1].x + xyb[1].y[1] : 0.0 : True
-
- 4 Declarations: x I y c
- xyb[2] : Active=True
- 1 RangeSet Declarations
- I : Dim=0, Dimen=1, Size=2, Domain=Integers, Ordered=True, Bounds=(1, 2)
- Virtual
-
- 2 Var Declarations
- x : Size=1, Index=None
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- None : None : None : None : False : True : Reals
- y : Size=2, Index=xyb[2].I
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- 1 : None : None : None : False : True : Reals
- 2 : None : None : None : False : True : Reals
-
- 1 Constraint Declarations
- c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + xyb[2].x + xyb[2].y[1] + xyb[2].y[2] : 0.0 : True
-
- 4 Declarations: x I y c
- xyb[3] : Active=True
- 1 RangeSet Declarations
- I : Dim=0, Dimen=1, Size=3, Domain=Integers, Ordered=True, Bounds=(1, 3)
- Virtual
-
- 2 Var Declarations
- x : Size=1, Index=None
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- None : None : None : None : False : True : Reals
- y : Size=3, Index=xyb[3].I
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- 1 : None : None : None : False : True : Reals
- 2 : None : None : None : False : True : Reals
- 3 : None : None : None : False : True : Reals
-
- 1 Constraint Declarations
- c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + xyb[3].x + xyb[3].y[1] + xyb[3].y[2] + xyb[3].y[3] : 0.0 : True
-
- 4 Declarations: x I y c
+ xyb[1] : Active=True
+ 1 RangeSet Declarations
+ I : Dim=0, Dimen=1, Size=1, Domain=Integers, Ordered=True, Bounds=(1, 1)
+ Virtual
+
+ 2 Var Declarations
+ x : Size=1, Index=None
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ None : None : None : None : False : True : Reals
+ y : Size=1, Index=xyb[1].I
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ 1 : None : None : None : False : True : Reals
+
+ 1 Constraint Declarations
+ c : Size=1, Index=None, Active=True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : xyb[1].x - (1.0 - xyb[1].y[1]) : 0.0 : True
+
+ 4 Declarations: x I y c
+ xyb[2] : Active=True
+ 1 RangeSet Declarations
+ I : Dim=0, Dimen=1, Size=2, Domain=Integers, Ordered=True, Bounds=(1, 2)
+ Virtual
+
+ 2 Var Declarations
+ x : Size=1, Index=None
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ None : None : None : None : False : True : Reals
+ y : Size=2, Index=xyb[2].I
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ 1 : None : None : None : False : True : Reals
+ 2 : None : None : None : False : True : Reals
+
+ 1 Constraint Declarations
+ c : Size=1, Index=None, Active=True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : xyb[2].x - (1.0 - (xyb[2].y[1] + xyb[2].y[2])) : 0.0 : True
+
+ 4 Declarations: x I y c
+ xyb[3] : Active=True
+ 1 RangeSet Declarations
+ I : Dim=0, Dimen=1, Size=3, Domain=Integers, Ordered=True, Bounds=(1, 3)
+ Virtual
+
+ 2 Var Declarations
+ x : Size=1, Index=None
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ None : None : None : None : False : True : Reals
+ y : Size=3, Index=xyb[3].I
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ 1 : None : None : None : False : True : Reals
+ 2 : None : None : None : False : True : Reals
+ 3 : None : None : None : False : True : Reals
+
+ 1 Constraint Declarations
+ c : Size=1, Index=None, Active=True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : xyb[3].x - (1.0 - (xyb[3].y[1] + xyb[3].y[2] + xyb[3].y[3])) : 0.0 : True
+
+ 4 Declarations: x I y c
3 Declarations: P T xyb
1 RangeSet Declarations
@@ -121,71 +121,71 @@ b.b.x
1 Block Declarations
xyb : Size=3, Index=T, Active=True
- xyb[1] : Active=True
- 1 RangeSet Declarations
- I : Dim=0, Dimen=1, Size=1, Domain=Integers, Ordered=True, Bounds=(1, 1)
- Virtual
-
- 2 Var Declarations
- x : Size=1, Index=None
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- None : None : None : None : False : True : Reals
- y : Size=1, Index=xyb[1].I
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- 1 : None : 1.0 : None : False : False : Reals
-
- 1 Constraint Declarations
- c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + xyb[1].x + xyb[1].y[1] : 0.0 : True
-
- 4 Declarations: x I y c
- xyb[2] : Active=True
- 1 RangeSet Declarations
- I : Dim=0, Dimen=1, Size=2, Domain=Integers, Ordered=True, Bounds=(1, 2)
- Virtual
-
- 2 Var Declarations
- x : Size=1, Index=None
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- None : None : None : None : False : True : Reals
- y : Size=2, Index=xyb[2].I
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- 1 : None : 1.0 : None : False : False : Reals
- 2 : None : 1.0 : None : False : False : Reals
-
- 1 Constraint Declarations
- c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + xyb[2].x + xyb[2].y[1] + xyb[2].y[2] : 0.0 : True
-
- 4 Declarations: x I y c
- xyb[3] : Active=True
- 1 RangeSet Declarations
- I : Dim=0, Dimen=1, Size=3, Domain=Integers, Ordered=True, Bounds=(1, 3)
- Virtual
-
- 2 Var Declarations
- x : Size=1, Index=None
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- None : None : None : None : False : True : Reals
- y : Size=3, Index=xyb[3].I
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- 1 : None : 1.0 : None : False : False : Reals
- 2 : None : 1.0 : None : False : False : Reals
- 3 : None : 1.0 : None : False : False : Reals
-
- 1 Constraint Declarations
- c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + xyb[3].x + xyb[3].y[1] + xyb[3].y[2] + xyb[3].y[3] : 0.0 : True
-
- 4 Declarations: x I y c
+ xyb[1] : Active=True
+ 1 RangeSet Declarations
+ I : Dim=0, Dimen=1, Size=1, Domain=Integers, Ordered=True, Bounds=(1, 1)
+ Virtual
+
+ 2 Var Declarations
+ x : Size=1, Index=None
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ None : None : None : None : False : True : Reals
+ y : Size=1, Index=xyb[1].I
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ 1 : None : 1.0 : None : False : False : Reals
+
+ 1 Constraint Declarations
+ c : Size=1, Index=None, Active=True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : xyb[1].x - (1.0 - xyb[1].y[1]) : 0.0 : True
+
+ 4 Declarations: x I y c
+ xyb[2] : Active=True
+ 1 RangeSet Declarations
+ I : Dim=0, Dimen=1, Size=2, Domain=Integers, Ordered=True, Bounds=(1, 2)
+ Virtual
+
+ 2 Var Declarations
+ x : Size=1, Index=None
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ None : None : None : None : False : True : Reals
+ y : Size=2, Index=xyb[2].I
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ 1 : None : 1.0 : None : False : False : Reals
+ 2 : None : 1.0 : None : False : False : Reals
+
+ 1 Constraint Declarations
+ c : Size=1, Index=None, Active=True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : xyb[2].x - (1.0 - (xyb[2].y[1] + xyb[2].y[2])) : 0.0 : True
+
+ 4 Declarations: x I y c
+ xyb[3] : Active=True
+ 1 RangeSet Declarations
+ I : Dim=0, Dimen=1, Size=3, Domain=Integers, Ordered=True, Bounds=(1, 3)
+ Virtual
+
+ 2 Var Declarations
+ x : Size=1, Index=None
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ None : None : None : None : False : True : Reals
+ y : Size=3, Index=xyb[3].I
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ 1 : None : 1.0 : None : False : False : Reals
+ 2 : None : 1.0 : None : False : False : Reals
+ 3 : None : 1.0 : None : False : False : Reals
+
+ 1 Constraint Declarations
+ c : Size=1, Index=None, Active=True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : xyb[3].x - (1.0 - (xyb[3].y[1] + xyb[3].y[2] + xyb[3].y[3])) : 0.0 : True
+
+ 4 Declarations: x I y c
3 Declarations: P T xyb
--1.0 + xyb[1].x + xyb[1].y[1]
--1.0 + xyb[2].x + xyb[2].y[1] + xyb[2].y[2]
--1.0 + xyb[3].x + xyb[3].y[1] + xyb[3].y[2] + xyb[3].y[3]
+xyb[1].x - (1.0 - xyb[1].y[1])
+xyb[2].x - (1.0 - (xyb[2].y[1] + xyb[2].y[2]))
+xyb[3].x - (1.0 - (xyb[3].y[1] + xyb[3].y[2] + xyb[3].y[3]))
xyb[1].y[1] 1.000000
xyb[2].y[1] 1.000000
xyb[2].y[2] 1.000000
diff --git a/examples/doc/pyomobook/pyomo-components-ch/con_declaration.txt b/examples/doc/pyomobook/pyomo-components-ch/con_declaration.txt
index d8f5af811ca..32df6a77234 100644
--- a/examples/doc/pyomobook/pyomo-components-ch/con_declaration.txt
+++ b/examples/doc/pyomobook/pyomo-components-ch/con_declaration.txt
@@ -45,10 +45,10 @@
1 Constraint Declarations
CoverConstr : Size=3, Index=CoverConstr_index, Active=True
- Key : Lower : Body : Upper : Active
- 1 : 1.0 : y[1] : +Inf : True
- 2 : 2.9 : 3.1 * y[2] : +Inf : True
- 3 : 3.1 : 4.5 * y[3] : +Inf : True
+ Key : Lower : Body : Upper : Active
+ 1 : 1.0 : y[1] : +Inf : True
+ 2 : 2.9 : 3.1*y[2] : +Inf : True
+ 3 : 3.1 : 4.5*y[3] : +Inf : True
4 Declarations: y_index y CoverConstr_index CoverConstr
2 Set Declarations
diff --git a/examples/doc/pyomobook/pyomo-components-ch/examples.txt b/examples/doc/pyomobook/pyomo-components-ch/examples.txt
index dec48c6d88d..93364e38ff5 100644
--- a/examples/doc/pyomobook/pyomo-components-ch/examples.txt
+++ b/examples/doc/pyomobook/pyomo-components-ch/examples.txt
@@ -30,9 +30,9 @@ indexed1
Key : Lower : Body : Upper : Active
None : 0.0 : x : +Inf : True
d : Size=3, Index=A, Active=True
- Key : Lower : Body : Upper : Active
- 1 : -Inf : x : 0.0 : True
- 2 : -Inf : 2 * x : 0.0 : True
- 3 : -Inf : 3 * x : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 1 : -Inf : x : 0.0 : True
+ 2 : -Inf : 2*x : 0.0 : True
+ 3 : -Inf : 3*x : 0.0 : True
8 Declarations: A B x y_index y o c d
diff --git a/examples/doc/pyomobook/pyomo-components-ch/expr_declaration.txt b/examples/doc/pyomobook/pyomo-components-ch/expr_declaration.txt
index 3410b86ea96..648ac3af96d 100644
--- a/examples/doc/pyomobook/pyomo-components-ch/expr_declaration.txt
+++ b/examples/doc/pyomobook/pyomo-components-ch/expr_declaration.txt
@@ -12,10 +12,10 @@
2 Expression Declarations
e1 : Size=1, Index=None
Key : Expression
- None : 1 + x
+ None : x + 1
e2 : Size=1, Index=None
Key : Expression
- None : 2 + x
+ None : x + 2
3 Declarations: x e1 e2
2 Set Declarations
@@ -34,8 +34,8 @@
1 Expression Declarations
e : Size=2, Index=e_index
Key : Expression
- 2 : x[2]**2.0
- 3 : x[3]**2.0
+ 2 : x[2]**2
+ 3 : x[3]**2
4 Declarations: x_index x e_index e
1 Var Declarations
@@ -46,12 +46,12 @@
1 Expression Declarations
e : Size=1, Index=None
Key : Expression
- None : ( -1.0 + x )**2.0
+ None : (x - 1.0)**2
1 Objective Declarations
o : Size=1, Index=None, Active=True
Key : Active : Sense : Expression
- None : True : minimize : 0.1*( -1.0 + x )**2.0 + x
+ None : True : minimize : 0.1*((x - 1.0)**2) + x
1 Constraint Declarations
c : Size=1, Index=None, Active=True
@@ -73,12 +73,12 @@
1 Expression Declarations
e : Size=1, Index=None
Key : Expression
- None : ( -2.0 + x )**2.0
+ None : (x - 2.0)**2
1 Objective Declarations
o : Size=1, Index=None, Active=True
Key : Active : Sense : Expression
- None : True : minimize : 0.1*( -2.0 + x )**2.0 + x
+ None : True : minimize : 0.1*((x - 2.0)**2) + x
1 Constraint Declarations
c : Size=1, Index=None, Active=True
diff --git a/examples/doc/pyomobook/pyomo-components-ch/param_misc.txt b/examples/doc/pyomobook/pyomo-components-ch/param_misc.txt
index 0ac64cc4ef0..41fe9b8721c 100644
--- a/examples/doc/pyomobook/pyomo-components-ch/param_misc.txt
+++ b/examples/doc/pyomobook/pyomo-components-ch/param_misc.txt
@@ -43,6 +43,6 @@
1 Objective Declarations
o : Size=1, Index=None, Active=True
Key : Active : Sense : Expression
- None : True : minimize : p[1] * x[1] + p[2] * x[2] + p[3] * x[3]
+ None : True : minimize : p[1]*x[1] + p[2]*x[2] + p[3]*x[3]
4 Declarations: A p x o
diff --git a/examples/doc/pyomobook/python-ch/pyomodivide.py3.txt b/examples/doc/pyomobook/python-ch/pyomodivide.py3.txt
index 561966a0f5f..e426db32afd 100644
--- a/examples/doc/pyomobook/python-ch/pyomodivide.py3.txt
+++ b/examples/doc/pyomobook/python-ch/pyomodivide.py3.txt
@@ -12,11 +12,11 @@
1 Objective Declarations
MyObjective : Size=1, Index=None, Active=True
Key : Active : Sense : Expression
- None : True : maximize : 4 * aVar
+ None : True : maximize : 4*aVar
1 Constraint Declarations
MyConstraint : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : 0.25 * aVar : 0.8 : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : 0.25*aVar : 0.8 : True
5 Declarations: pParm wParm aVar MyConstraint MyObjective
diff --git a/examples/kernel/constraints.py b/examples/kernel/constraints.py
index 629d14d53ed..809efa4f690 100644
--- a/examples/kernel/constraints.py
+++ b/examples/kernel/constraints.py
@@ -44,9 +44,9 @@
# Range constraints
#
-c = pmo.constraint(0 <= v <= 1)
+c = pmo.constraint((0, v, 1))
-c = pmo.constraint(expr= 0 <= v <= 1)
+c = pmo.constraint(expr= (0, v, 1))
c = pmo.constraint(lb=0, body=v, ub=1)
diff --git a/examples/kernel/parameters.py b/examples/kernel/parameters.py
index 51343d7c5e0..09f98c638b5 100644
--- a/examples/kernel/parameters.py
+++ b/examples/kernel/parameters.py
@@ -16,7 +16,7 @@
assert pmo.value(p - 1) == 3
v = pmo.variable()
-c = pmo.constraint(p-1 <= v <= p+1)
+c = pmo.constraint((p-1, v, p+1))
assert pmo.value(c.lb) == 3
assert pmo.value(c.ub) == 5
diff --git a/examples/performance/dae/run_stochpdegas1_automatic.py b/examples/performance/dae/run_stochpdegas1_automatic.py
new file mode 100644
index 00000000000..577b35b4446
--- /dev/null
+++ b/examples/performance/dae/run_stochpdegas1_automatic.py
@@ -0,0 +1,81 @@
+import time
+
+from pyomo.environ import *
+from pyomo.dae import *
+from stochpdegas1_automatic import model
+
+start = time.time()
+instance = model.create_instance('stochpdegas_automatic.dat')
+
+# discretize model
+discretizer = TransformationFactory('dae.finite_difference')
+discretizer.apply_to(instance,nfe=1,wrt=instance.DIS,scheme='FORWARD')
+discretizer.apply_to(instance,nfe=47,wrt=instance.TIME,scheme='BACKWARD')
+
+# What it should be to match description in paper
+#discretizer.apply_to(instance,nfe=48,wrt=instance.TIME,scheme='BACKWARD')
+
+TimeStep = instance.TIME[2]-instance.TIME[1]
+
+def supcost_rule(m,k):
+ return sum(m.cs*m.s[k,j,t]*(TimeStep) for j in m.SUP for t in m.TIME.get_finite_elements())
+instance.supcost = Expression(instance.SCEN,rule=supcost_rule)
+
+def boostcost_rule(m,k):
+ return sum(m.ce*m.pow[k,j,t]*(TimeStep) for j in m.LINK_A for t in m.TIME.get_finite_elements())
+instance.boostcost = Expression(instance.SCEN,rule=boostcost_rule)
+
+def trackcost_rule(m,k):
+ return sum(m.cd*(m.dem[k,j,t]-m.stochd[k,j,t])**2.0 for j in m.DEM for t in m.TIME.get_finite_elements())
+instance.trackcost = Expression(instance.SCEN,rule=trackcost_rule)
+
+def sspcost_rule(m,k):
+ return sum(m.cT*(m.px[k,i,m.TIME.last(),j]-m.px[k,i,m.TIME.first(),j])**2.0 for i in m.LINK for j in m.DIS)
+instance.sspcost = Expression(instance.SCEN,rule=sspcost_rule)
+
+def ssfcost_rule(m,k):
+ return sum(m.cT*(m.fx[k,i,m.TIME.last(),j]-m.fx[k,i,m.TIME.first(),j])**2.0 for i in m.LINK for j in m.DIS)
+instance.ssfcost = Expression(instance.SCEN,rule=ssfcost_rule)
+
+def cost_rule(m,k):
+ return 1e-6*(m.supcost[k] + m.boostcost[k] + m.trackcost[k] + m.sspcost[k] + m.ssfcost[k])
+instance.cost = Expression(instance.SCEN,rule=cost_rule)
+
+def mcost_rule(m):
+ return (1.0/m.S)*sum(m.cost[k] for k in m.SCEN)
+instance.mcost = Expression(rule=mcost_rule)
+
+def eqcvar_rule(m,k):
+ return m.cost[k] - m.nu <= m.phi[k];
+instance.eqcvar = Constraint(instance.SCEN,rule=eqcvar_rule)
+
+def obj_rule(m):
+ return (1.0-m.cvar_lambda)*m.mcost + m.cvar_lambda*m.cvarcost
+instance.obj = Objective(rule=obj_rule)
+
+endTime = time.time()-start
+print('%f seconds required to construct' % endTime)
+
+
+import sys
+start = time.time()
+instance.write(sys.argv[1])
+endTime = time.time()-start
+print('%f seconds required to write file %s' % (endTime, sys.argv[1]))
+
+if False:
+ for i in instance.SCEN:
+ print("Scenario %s = %s" % (
+ i, sum(sum(0.5*value(instance.pow[i,j,k])
+ for j in instance.LINK_A)
+ for k in instance.TIME.get_finite_elements()) ))
+
+
+ solver=SolverFactory('ipopt')
+ results = solver.solve(instance,tee=True)
+
+ for i in instance.SCEN:
+ print("Scenario %s = %s" % (
+ i, sum(sum(0.5*value(instance.pow[i,j,k])
+ for j in instance.LINK_A)
+ for k in instance.TIME.get_finite_elements()) ))
diff --git a/examples/performance/dae/stochpdegas1_automatic.py b/examples/performance/dae/stochpdegas1_automatic.py
new file mode 100644
index 00000000000..f881197a17b
--- /dev/null
+++ b/examples/performance/dae/stochpdegas1_automatic.py
@@ -0,0 +1,294 @@
+# stochastic pde model for natural gas network
+# victor m. zavala / 2013
+
+#from __future__ import division
+
+from pyomo.environ import *
+from pyomo.dae import *
+
+model = AbstractModel()
+
+# sets
+model.TF = Param(within=NonNegativeReals)
+def _tinit(m):
+ return [0.5,value(m.TF)]
+ # What it should be to match description in paper
+ #return [0,value(m.TF)]
+model.TIME = ContinuousSet(initialize=_tinit)
+model.DIS = ContinuousSet(bounds=(0.0,1.0))
+model.S = Param(within=PositiveIntegers)
+model.SCEN = RangeSet(1,model.S)
+
+# links
+model.LINK = Set()
+model.lstartloc = Param(model.LINK)
+model.lendloc = Param(model.LINK)
+model.ldiam = Param(model.LINK,within=PositiveReals,mutable=True)
+model.llength = Param(model.LINK,within=PositiveReals,mutable=True)
+model.ltype = Param(model.LINK)
+
+def link_a_init_rule(m):
+ return (l for l in m.LINK if m.ltype[l] == "a")
+model.LINK_A = Set(initialize=link_a_init_rule)
+
+def link_p_init_rule(m):
+ return (l for l in m.LINK if m.ltype[l] == "p")
+model.LINK_P = Set(initialize=link_p_init_rule)
+
+# nodes
+model.NODE = Set()
+model.pmin = Param(model.NODE,within=PositiveReals,mutable=True)
+model.pmax = Param(model.NODE,within=PositiveReals,mutable=True)
+
+# supply
+model.SUP = Set()
+model.sloc = Param(model.SUP)
+model.smin = Param(model.SUP,within=NonNegativeReals,mutable=True)
+model.smax = Param(model.SUP,within=NonNegativeReals,mutable=True)
+model.scost = Param(model.SUP,within=NonNegativeReals)
+
+# demand
+model.DEM = Set()
+model.dloc = Param(model.DEM)
+model.d = Param(model.DEM, within=PositiveReals,mutable=True)
+
+# physical data
+model.eps = Param(initialize=0.025,within=PositiveReals)
+model.z = Param(initialize=0.80,within=PositiveReals)
+model.rhon = Param(initialize=0.72,within=PositiveReals)
+model.R = Param(initialize=8314.0,within=PositiveReals)
+model.M = Param(initialize=18.0,within=PositiveReals)
+model.pi = Param(initialize=3.14,within=PositiveReals)
+model.nu2 = Param(within=PositiveReals,mutable=True)
+model.lam = Param(model.LINK,within=PositiveReals,mutable=True)
+model.A = Param(model.LINK,within=NonNegativeReals,mutable=True)
+model.Tgas = Param(initialize=293.15,within=PositiveReals)
+model.Cp = Param(initialize=2.34,within=PositiveReals)
+model.Cv = Param(initialize=1.85,within=PositiveReals)
+model.gam = Param(initialize=model.Cp/model.Cv, within=PositiveReals)
+model.om = Param(initialize=(model.gam-1.0)/model.gam,within=PositiveReals)
+
+# scaling and constants
+model.ffac = Param(within=PositiveReals,initialize=(1.0e+6*model.rhon)/(24.0*3600.0))
+model.ffac2 = Param(within=PositiveReals,initialize=(3600.0)/(1.0e+4*model.rhon))
+model.pfac = Param(within=PositiveReals,initialize=1.0e+5)
+model.pfac2 = Param(within=PositiveReals,initialize=1.0e-5)
+model.dfac = Param(within=PositiveReals,initialize=1.0e-3)
+model.lfac = Param(within=PositiveReals,initialize=1.0e+3)
+
+model.c1 = Param(model.LINK,within=PositiveReals,mutable=True)
+model.c2 = Param(model.LINK,within=PositiveReals,mutable=True)
+model.c3 = Param(model.LINK,within=PositiveReals,mutable=True)
+model.c4 = Param(within=PositiveReals,mutable=True)
+
+# cost factors
+model.ce = Param(initialize=0.1,within=NonNegativeReals)
+model.cd = Param(initialize=1.0e+6,within=NonNegativeReals)
+model.cT = Param(initialize=1.0e+6,within=NonNegativeReals)
+model.cs = Param(initialize=0.0,within=NonNegativeReals)
+model.TDEC = Param(within=PositiveReals)
+
+# define stochastic info
+model.rand_d = Param(model.SCEN,model.DEM,within=NonNegativeReals,mutable=True)
+
+# convert units for input data
+def rescale_rule(m):
+
+ for i in m.LINK:
+ m.ldiam[i] = m.ldiam[i]*m.dfac
+ m.llength[i] = m.llength[i]*m.lfac
+ # m.dx[i] = m.llength[i]/float(m.DIS.last())
+
+ for i in m.SUP:
+ m.smin[i] = m.smin[i]*m.ffac*m.ffac2 # from scmx106/day to kg/s and then to scmx10-4/hr
+ m.smax[i] = m.smax[i]*m.ffac*m.ffac2 # from scmx106/day to kg/s and then to scmx10-4/hr
+
+ for i in m.DEM:
+ m.d[i] = m.d[i]*m.ffac*m.ffac2
+
+ for i in m.NODE:
+ m.pmin[i] = m.pmin[i]*m.pfac*m.pfac2 # from bar to Pascals and then to bar
+ m.pmax[i] = m.pmax[i]*m.pfac*m.pfac2 # from bar to Pascals and then to bar
+model.rescale = BuildAction(rule=rescale_rule)
+
+def compute_constants(m):
+
+ for i in m.LINK:
+ m.lam[i] = (2.0*log10(3.7*m.ldiam[i]/(m.eps*m.dfac)))**(-2.0)
+ m.A[i] = (1.0/4.0)*m.pi*m.ldiam[i]*m.ldiam[i]
+ m.nu2 = m.gam*m.z*m.R*m.Tgas/m.M
+ m.c1[i] = (m.pfac2/m.ffac2)*(m.nu2/m.A[i])
+ m.c2[i] = m.A[i]*(m.ffac2/m.pfac2)
+ m.c3[i] = m.A[i]*(m.pfac2/m.ffac2)*(8.0*m.lam[i]*m.nu2)/(m.pi*m.pi*(m.ldiam[i]**5.0))
+ m.c4 = (1/m.ffac2)*(m.Cp*m.Tgas)
+
+model.compute_constants = BuildAction(rule=compute_constants)
+
+# set stochastic demands
+def compute_demands_rule(m):
+
+ for k in m.SCEN:
+ for j in m.DEM:
+ if k == 2:
+ m.rand_d[k,j] = 1.1*m.d[j]
+ elif k == 1:
+ m.rand_d[k,j] = 1.2*m.d[j]
+ else:
+ m.rand_d[k,j] = 1.3*m.d[j]
+model.compute_demands = BuildAction(rule=compute_demands_rule)
+
+def stochd_init(m,k,j,t):
+ # What it should be to match description in paper
+ # if t < m.TDEC:
+ # return m.d[j]
+ # if t >= m.TDEC and t < m.TDEC+5:
+ # return m.rand_d[k,j]
+ # if t >= m.TDEC+5:
+ # return m.d[j]
+ if t < m.TDEC+1:
+ return m.d[j]
+ if t >= m.TDEC+1 and t < m.TDEC+1+4.5:
+ return m.rand_d[k,j]
+ if t >= m.TDEC+1+4.5:
+ return m.d[j]
+
+model.stochd = Param(model.SCEN,model.DEM,model.TIME,within=PositiveReals,mutable=True,default=stochd_init)
+
+# define temporal variables
+def p_bounds_rule(m,k,j,t):
+ return (value(m.pmin[j]),value(m.pmax[j]))
+model.p = Var(model.SCEN, model.NODE, model.TIME, bounds=p_bounds_rule, initialize=50.0)
+model.dp = Var(model.SCEN,model.LINK_A,model.TIME,bounds=(0.0,100.0), initialize=10.0)
+model.fin = Var(model.SCEN,model.LINK,model.TIME,bounds=(1.0,500.0),initialize=100.0)
+model.fout = Var(model.SCEN,model.LINK,model.TIME,bounds=(1.0,500.0),initialize=100.0)
+
+def s_bounds_rule(m,k,j,t):
+ return (0.01,value(m.smax[j]))
+model.s = Var(model.SCEN,model.SUP,model.TIME,bounds=s_bounds_rule,initialize=10.0)
+model.dem = Var(model.SCEN,model.DEM,model.TIME,initialize=100.0)
+model.pow = Var(model.SCEN,model.LINK_A,model.TIME,bounds=(0.0,3000.0),initialize=1000.0)
+model.slack = Var(model.SCEN,model.LINK,model.TIME,model.DIS,bounds=(0.0,None),initialize=10.0)
+
+# define spatio-temporal variables
+model.px = Var(model.SCEN,model.LINK,model.TIME,model.DIS,bounds=(10.0,100.0),initialize=50.0)
+model.fx = Var(model.SCEN,model.LINK,model.TIME,model.DIS,bounds=(1.0,100.0),initialize=100.0)
+
+# define derivatives
+model.dpxdt = DerivativeVar(model.px,wrt=model.TIME,initialize=0)
+model.dpxdx = DerivativeVar(model.px,wrt=model.DIS,initialize=0)
+model.dfxdt = DerivativeVar(model.fx,wrt=model.TIME,initialize=0)
+model.dfxdx = DerivativeVar(model.fx,wrt=model.DIS,initialize=0)
+
+# ----------- MODEL --------------
+
+# compressor equations
+def powereq_rule(m,j,i,t):
+ return m.pow[j,i,t] == m.c4*m.fin[j,i,t]*(((m.p[j,m.lstartloc[i],t]+m.dp[j,i,t])/m.p[j,m.lstartloc[i],t])**m.om - 1.0)
+model.powereq = Constraint(model.SCEN,model.LINK_A,model.TIME,rule=powereq_rule)
+
+# cvar model
+model.cvar_lambda = Param(within=NonNegativeReals)
+model.nu = Var(initialize=100.0)
+model.phi = Var(model.SCEN,bounds=(0.0,None),initialize=100.0)
+
+
+def cvarcost_rule(m):
+ return (1.0/m.S)*sum((m.phi[k]/(1.0-0.95) + m.nu) for k in m.SCEN)
+model.cvarcost = Expression(rule=cvarcost_rule)
+
+# node balances
+def nodeeq_rule(m,k,i,t):
+ return sum(m.fout[k,j,t] for j in m.LINK if m.lendloc[j]==i) + \
+ sum(m.s[k,j,t] for j in m.SUP if m.sloc[j]==i) - \
+ sum(m.fin[k,j,t] for j in m.LINK if m.lstartloc[j]==i) - \
+ sum(m.dem[k,j,t] for j in m.DEM if m.dloc[j]==i) == 0.0
+model.nodeeq = Constraint(model.SCEN,model.NODE,model.TIME,rule=nodeeq_rule)
+
+# boundary conditions flow
+def flow_start_rule(m,j,i,t):
+ return m.fx[j,i,t,m.DIS.first()] == m.fin[j,i,t]
+model.flow_start = Constraint(model.SCEN,model.LINK,model.TIME,rule=flow_start_rule)
+
+def flow_end_rule(m,j,i,t):
+ return m.fx[j,i,t,m.DIS.last()] == m.fout[j,i,t]
+model.flow_end = Constraint(model.SCEN,model.LINK,model.TIME,rule=flow_end_rule)
+
+# First PDE for gas network model
+def flow_rule(m,j,i,t,k):
+ if t == m.TIME.first() or k == m.DIS.last():
+ return Constraint.Skip # Do not apply pde at initial time or final location
+ return m.dpxdt[j,i,t,k]/3600 + m.c1[i]/m.llength[i]*m.dfxdx[j,i,t,k] == 0
+model.flow = Constraint(model.SCEN,model.LINK,model.TIME,model.DIS,rule=flow_rule)
+
+# Second PDE for gas network model
+def press_rule(m,j,i,t,k):
+ if t == m.TIME.first() or k == m.DIS.last():
+ return Constraint.Skip # Do not apply pde at initial time or final location
+ return m.dfxdt[j,i,t,k]/3600 == -m.c2[i]/m.llength[i]*m.dpxdx[j,i,t,k] - m.slack[j,i,t,k]
+model.press = Constraint(model.SCEN,model.LINK,model.TIME,model.DIS,rule=press_rule)
+
+def slackeq_rule(m,j,i,t,k):
+ if t == m.TIME.last():
+ return Constraint.Skip
+ return m.slack[j,i,t,k]*m.px[j,i,t,k] == m.c3[i]*m.fx[j,i,t,k]*m.fx[j,i,t,k]
+model.slackeq = Constraint(model.SCEN,model.LINK,model.TIME,model.DIS,rule=slackeq_rule)
+
+# boundary conditions pressure, passive links
+def presspas_start_rule(m,j,i,t):
+ return m.px[j,i,t,m.DIS.first()] == m.p[j,m.lstartloc[i],t]
+model.presspas_start = Constraint(model.SCEN,model.LINK_P,model.TIME,rule=presspas_start_rule)
+
+def presspas_end_rule(m,j,i,t):
+ return m.px[j,i,t,m.DIS.last()] == m.p[j,m.lendloc[i],t]
+model.presspas_end = Constraint(model.SCEN,model.LINK_P,model.TIME,rule=presspas_end_rule)
+
+# boundary conditions pressure, active links
+def pressact_start_rule(m,j,i,t):
+ return m.px[j,i,t,m.DIS.first()] == m.p[j,m.lstartloc[i],t]+m.dp[j,i,t]
+model.pressact_start = Constraint(model.SCEN,model.LINK_A,model.TIME,rule=pressact_start_rule)
+
+def pressact_end_rule(m,j,i,t):
+ return m.px[j,i,t,m.DIS.last()] == m.p[j,m.lendloc[i],t]
+model.pressact_end = Constraint(model.SCEN,model.LINK_A,model.TIME,rule=pressact_end_rule)
+
+# fix pressure at supply nodes
+def suppres_rule(m,k,j,t):
+ return m.p[k,m.sloc[j],t] == m.pmin[m.sloc[j]]
+model.suppres = Constraint(model.SCEN,model.SUP,model.TIME,rule=suppres_rule)
+
+# discharge pressure for compressors
+def dispress_rule(m,j,i,t):
+ return m.p[j,m.lstartloc[i],t]+m.dp[j,i,t] <= m.pmax[m.lstartloc[i]]
+model.dispress = Constraint(model.SCEN,model.LINK_A,model.TIME,rule=dispress_rule)
+
+# ss constraints
+def flow_ss_rule(m,j,i,k):
+ if k == m.DIS.last():
+ return Constraint.Skip
+ return m.dfxdx[j,i,m.TIME.first(),k]/m.llength[i] == 0.0
+model.flow_ss = Constraint(model.SCEN,model.LINK,model.DIS,rule=flow_ss_rule)
+
+def pres_ss_rule(m,j,i,k):
+ if k == m.DIS.last():
+ return Constraint.Skip
+ return 0.0 == - m.c2[i]/m.llength[i]*m.dpxdx[j,i,m.TIME.first(),k] - m.slack[j,i,m.TIME.first(),k];
+model.pres_ss = Constraint(model.SCEN,model.LINK,model.DIS,rule=pres_ss_rule)
+
+# non-anticipativity constraints
+def nonantdq_rule(m,j,i,t):
+ if j == 1:
+ return Constraint.Skip
+ if t >= m.TDEC+1:
+ return Constraint.Skip
+ return m.dp[j,i,t] == m.dp[1,i,t]
+
+model.nonantdq = Constraint(model.SCEN,model.LINK_A,model.TIME,rule=nonantdq_rule)
+
+def nonantde_rule(m,j,i,t):
+ if j == 1:
+ return Constraint.Skip
+ if t >= m.TDEC+1:
+ return Constraint.Skip
+ return m.dem[j,i,t] == m.dem[1,i,t]
+
+model.nonantde = Constraint(model.SCEN,model.DEM,model.TIME,rule=nonantde_rule)
diff --git a/examples/performance/dae/stochpdegas_automatic.dat b/examples/performance/dae/stochpdegas_automatic.dat
new file mode 100644
index 00000000000..e60d1af474c
--- /dev/null
+++ b/examples/performance/dae/stochpdegas_automatic.dat
@@ -0,0 +1,86 @@
+param TF := 24 ;
+param TDEC := 9.5 ;
+param S:= 1 ;
+param cvar_lambda:=0.0;
+
+# read link data
+set LINK :=
+l1
+l2
+l3
+l4
+l5
+l6
+l7
+l8
+l9
+l10
+l11
+l12
+;
+
+param : lstartloc lendloc ldiam llength ltype :=
+ l1 n1 n2 920.0 300.0 p
+ l2 n2 n3 920.0 100.0 a
+ l3 n3 n4 920.0 100.0 a
+ l4 n4 n5 920.0 100.0 a
+ l5 n5 n6 920.0 100.0 a
+ l6 n6 n7 920.0 100.0 a
+ l7 n7 n8 920.0 100.0 a
+ l8 n8 n9 920.0 100.0 a
+ l9 n9 n10 920.0 100.0 a
+ l10 n10 n11 920.0 100.0 a
+ l11 n11 n12 920.0 100.0 a
+ l12 n12 n13 920.0 300.0 p
+;
+
+# read node data
+set NODE :=
+n1
+n2
+n3
+n4
+n5
+n6
+n7
+n8
+n9
+n10
+n11
+n12
+n13
+;
+
+param : pmin pmax :=
+n1 57.0 70.0
+n2 34.0 70.0
+n3 34.0 70.0
+n4 34.0 70.0
+n5 34.0 70.0
+n6 34.0 70.0
+n7 34.0 70.0
+n8 34.0 70.0
+n9 34.0 70.0
+n10 34.0 70.0
+n11 34.0 70.0
+n12 34.0 70.0
+n13 39.0 41.0
+;
+
+# read supply data
+set SUP :=
+1
+;
+
+param : sloc smin smax :=
+1 n1 0.000 30
+;
+
+# read demand data
+set DEM :=
+1
+;
+
+param : dloc d :=
+1 n13 10
+;
diff --git a/examples/performance/jump/IEEE662.branch b/examples/performance/jump/IEEE662.branch
new file mode 100644
index 00000000000..b1044459fd8
--- /dev/null
+++ b/examples/performance/jump/IEEE662.branch
@@ -0,0 +1,1017 @@
+ 1 1 283 0 0.270000 0.349000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 2 1 362 0 0.035000 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 3 2 9 0 0.292000 0.386000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 4 2 289 0 0.002000 0.010000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 5 3 115 0 0.025400 0.031800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 6 3 212 0 0.027100 0.033900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 7 4 158 0 0.288800 0.361900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 8 4 330 0 0.233400 0.291900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 9 5 102 0 0.124600 0.156000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 10 5 289 0 0.333900 0.417900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 11 6 136 0 0.163200 0.189500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 12 6 269 0 0.092700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 13 7 55 0 0.197500 0.229300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 14 7 79 0 0.280100 0.333200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 15 8 43 0 0.018600 0.024300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 16 8 144 0 0.065900 0.164200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 17 8 151 0 0.018300 0.044700 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 18 8 255 0 0.030700 0.082400 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 19 8 267 0 0.020200 0.059200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 20 8 338 0 0.019000 0.023800 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 21 9 283 0 0.262000 0.339000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 22 10 59 0 0.201500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 23 10 133 0 0.040300 0.046800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 24 10 277 0 0.156000 0.525000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 25 11 154 0 0.301300 0.479100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 26 11 156 0 0.178000 0.222700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 27 12 30 0 0.125100 0.169700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 28 12 94 0 0.057600 0.072100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 29 13 110 0 0.265000 0.343000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 30 13 370 0 0.245000 0.317000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 31 14 94 0 0.064400 0.080600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 32 14 312 0 0.036600 0.079900 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 33 15 29 0 0.296200 0.369500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 34 15 106 0 0.506000 0.504700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 35 15 177 0 0.374700 0.469600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 36 15 211 0 0.828700 0.846900 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 37 16 67 0 0.136000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 38 16 352 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 39 17 284 0 0.294200 0.368600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 40 17 292 0 0.338500 0.420000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 41 18 318 0 0.137110 0.799561 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 42 18 365 0 0.016800 0.050100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 43 19 257 0 0.233700 0.271400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 44 19 302 0 0.338500 0.423800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 45 20 154 0 0.057400 0.142400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 46 20 181 0 0.018900 0.044800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 47 26 89 0 0.054000 0.136000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 48 26 344 0 0.100000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 49 27 32 0 0.276500 0.336500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 50 27 288 0 0.067800 0.086200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 51 28 39 0 0.503600 0.627200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 52 28 109 0 0.200000 0.250100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 53 29 238 0 0.407000 0.474000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 54 30 204 0 0.113000 0.152000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 55 30 244 0 0.025220 0.066400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 56 30 365 0 0.013750 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 57 31 258 0 0.182900 0.462700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 58 31 317 0 0.145100 0.367300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 59 33 38 0 0.118600 0.153200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 60 33 180 0 0.173000 0.216500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 61 34 64 0 0.144000 0.180200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 62 34 304 0 0.040200 0.061200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 63 35 189 0 0.368700 0.428800 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 64 35 194 0 0.272000 0.315900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 65 36 116 0 0.070500 0.178400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 66 36 117 0 0.112900 0.165500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 67 37 202 0 0.129000 0.161600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 68 37 342 0 0.284100 0.356000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 69 38 289 0 0.155900 0.195200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 70 39 58 0 0.088000 0.161000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 71 39 176 0 0.200000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 72 39 212 0 0.048400 0.060200 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 73 39 213 0 0.037000 0.062000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 74 39 252 0 0.308000 0.437000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 75 41 336 0 0.160700 0.214200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 76 41 356 0 0.061000 0.076300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 77 42 82 0 0.048000 0.061000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 78 42 352 0 0.099000 0.125000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 79 43 132 0 0.019600 0.025800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 80 44 131 0 0.030500 0.038200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 81 44 338 0 0.040700 0.050700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 82 45 156 0 0.247500 0.309500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 83 45 369 0 0.214700 0.268600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 84 51 119 0 0.056500 0.104100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 85 51 270 0 0.235800 0.291700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 86 52 335 0 0.011000 0.028000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 87 53 335 0 0.147100 0.184300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 88 53 363 0 0.394300 0.419400 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 89 54 81 0 0.213000 0.266000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 90 54 89 0 0.290200 0.413400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 91 54 186 0 0.272600 0.361100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 92 54 239 0 0.066500 0.082300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 93 55 266 0 0.278100 0.322900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 94 55 295 0 0.326400 0.404600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 95 56 95 0 0.152900 0.270300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 96 56 352 0 0.066800 0.157200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 97 57 233 0 0.359000 0.417000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 98 57 257 0 0.296000 0.371000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 99 58 362 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 100 59 268 0 0.225400 0.261800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 101 60 217 0 0.083000 0.114000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 102 60 236 0 0.096000 0.198000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 103 61 214 0 0.157200 0.196900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 104 61 343 0 0.091800 0.232400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 105 62 303 0 0.051900 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 106 62 343 0 0.076300 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 107 64 135 0 0.146900 0.172200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 108 65 262 0 0.065600 0.166000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 109 65 366 0 0.248300 0.374800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 110 66 166 0 0.282100 0.327600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 111 66 189 0 0.229700 0.266900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 112 66 191 0 0.357200 0.416900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 113 66 227 0 0.243000 0.326000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 114 67 243 0 0.221100 0.258500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 115 68 157 0 0.172900 0.272900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 116 68 293 0 0.211600 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 117 68 304 0 0.248400 0.378300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 118 68 360 0 0.264600 0.366300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 119 69 135 0 0.336000 0.549100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 120 69 358 0 0.144600 0.192400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 121 70 352 0 0.016400 0.037000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 122 71 186 0 0.260000 0.250000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 123 71 285 0 0.074000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 124 76 192 0 0.474401 0.484100 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 125 76 241 0 0.224500 0.216100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 126 77 140 0 0.091000 0.184000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 127 77 235 0 0.079000 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 128 79 183 0 0.308300 0.386300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 129 80 259 0 0.036000 0.172000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 130 80 320 0 0.023000 0.075000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 131 81 372 0 0.038900 0.050800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 132 82 356 0 0.096600 0.130800 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 133 83 32 1 0.139500 0.467100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 134 83 270 0 0.233000 0.559600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 135 83 333 0 0.079000 0.102000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 136 84 89 0 0.060000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 137 84 254 0 0.027000 0.042000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 138 85 89 0 0.045400 0.111400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 139 85 253 0 0.057200 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 140 86 144 0 0.067800 0.088900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 141 86 182 0 0.013400 0.033600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 142 87 162 0 0.021000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 143 87 182 0 0.027000 0.068000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 144 88 127 0 0.050000 0.086000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 145 88 140 0 0.076300 0.192800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 146 88 168 0 0.099000 0.128000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 147 88 278 0 0.024000 0.061000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 148 89 307 0 0.130000 0.324000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 149 90 295 0 0.436300 0.497300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 150 90 326 0 0.397000 0.468200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 151 91 145 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 152 92 182 0 0.143200 0.182300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 153 92 184 0 0.155200 0.194400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 154 93 276 0 0.115800 0.145000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 155 93 370 0 0.192500 0.241300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 156 95 287 0 0.019000 0.068200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 157 101 278 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 158 101 319 0 0.057000 0.141000 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 159 102 156 0 0.181400 0.226800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 160 104 145 0 0.056300 0.073000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 161 104 251 0 0.016700 0.029100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 162 105 179 0 0.118000 0.152000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 163 105 252 0 0.129000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 164 106 257 0 0.229700 0.287800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 165 108 207 0 0.070500 0.081900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 166 108 253 0 0.060400 0.075700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 167 109 369 0 0.110100 0.137800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 168 110 176 0 0.180000 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 169 113 277 0 0.296000 0.282000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 170 113 335 0 0.339000 0.381000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 171 114 213 0 0.022000 0.056000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 172 114 314 0 0.163000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 173 115 313 0 0.176300 0.224000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 174 116 288 0 0.092400 0.115700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 175 117 364 0 0.065600 0.085500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 176 119 216 0 0.133400 0.250800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 177 119 364 0 0.066400 0.168100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 178 120 266 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 179 128 282 0 0.137000 0.159100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 180 128 294 0 0.259300 0.324500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 181 129 290 0 0.058000 0.150000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 182 129 344 0 0.052000 0.064000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 183 131 320 0 0.117100 0.174000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 184 132 367 0 0.031100 0.070800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 185 133 242 0 0.199000 0.239000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 186 134 170 0 0.005900 0.016700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 187 134 244 0 0.020500 0.054900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 188 134 318 0 0.012200 0.038400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 189 135 153 0 0.069400 0.086800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 190 135 258 0 0.271300 0.426200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 191 136 342 0 0.216400 0.248300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 192 137 208 0 0.085000 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 193 137 240 0 0.187000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 194 138 280 0 0.322400 0.404000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 195 138 335 0 0.094200 0.146700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 196 139 258 0 0.221600 0.277700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 197 139 360 0 0.150900 0.188700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 198 140 336 0 0.178900 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 199 140 346 0 0.077700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 200 141 217 0 0.155500 0.301300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 201 141 290 0 0.028100 0.064600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 202 142 169 0 0.141000 0.163800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 203 142 245 0 0.198000 0.256200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 204 143 162 0 0.026000 0.044000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 205 143 256 0 0.084000 0.103000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 206 151 152 0 0.021000 0.052000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 207 151 255 0 0.027000 0.066000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 208 152 182 0 0.085200 0.181500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 209 153 169 0 0.266700 0.308000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 210 154 192 0 0.181900 0.256900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 211 154 195 0 0.115400 0.170200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 212 155 285 0 0.093000 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 213 155 333 0 0.067000 0.168000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 214 156 305 0 0.254000 0.334000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 215 157 201 0 0.171500 0.210600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 216 158 214 0 0.184700 0.232100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 217 160 195 0 0.296400 0.386200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 218 160 243 0 0.032700 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 219 163 184 0 0.181300 0.227200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 220 163 282 0 0.142600 0.178800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 221 164 352 0 0.214000 0.272000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 222 164 356 0 0.012000 0.015000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 223 166 363 0 0.100700 0.117000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 224 168 351 0 0.068000 0.083000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 225 170 318 0 0.018020 0.055090 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 226 170 352 0 0.015680 0.073070 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 227 177 264 0 0.306200 0.383800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 228 178 182 0 0.032600 0.072500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 229 178 332 0 0.259200 0.331900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 230 179 368 0 0.156000 0.191000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 231 180 243 0 0.076500 0.095800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 232 181 284 0 0.118900 0.149000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 233 183 276 0 0.195500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 234 183 368 0 0.172000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 235 186 239 0 0.206000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 236 186 285 0 0.260900 0.343300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 237 187 303 0 0.266700 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 238 188 281 0 0.058000 0.144000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 239 188 313 0 0.225400 0.280500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 240 188 330 0 0.078100 0.097700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 241 188 331 0 0.142400 0.340700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 242 190 285 0 0.180000 0.220000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 243 190 307 0 0.114000 0.284000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 244 191 269 0 0.094700 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 245 194 370 0 0.194300 0.241400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 246 201 245 0 0.128900 0.161500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 247 201 262 0 0.140000 0.588000 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 248 201 346 0 0.255900 0.397000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 249 201 353 0 0.219900 0.255800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 250 201 361 0 0.179500 0.209000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 251 202 291 0 0.044300 0.054600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 252 204 351 0 0.080000 0.098000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 253 205 259 0 0.133000 0.170000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 254 205 294 0 0.005000 0.024000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 255 206 244 0 0.020450 0.054930 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 256 206 352 0 0.024000 0.075000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 257 207 320 0 0.021000 0.135700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 258 208 325 0 0.017000 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 259 209 312 0 0.077200 0.096900 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 260 209 355 0 0.220000 0.276200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 261 211 265 0 0.359000 0.450400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 262 211 326 0 0.572300 0.716900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 263 215 219 0 0.135000 0.189900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 264 215 331 0 0.086900 0.219900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 265 216 290 0 0.058600 0.145900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 266 217 237 0 0.194100 0.229600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 267 217 306 0 0.080000 0.198000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 268 218 283 0 0.200000 0.256000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 269 218 343 0 0.043000 0.108000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 270 219 343 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 271 220 356 0 0.053200 0.131900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 272 226 294 0 0.051700 0.070100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 273 227 305 0 0.280500 0.377400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 274 229 312 0 0.058000 0.170000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 275 229 316 0 0.075000 0.185000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 276 231 263 0 0.020000 0.026000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 277 232 263 0 0.043400 0.054300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 278 233 264 0 0.397000 0.497000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 279 234 242 0 0.270000 0.329500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 280 234 257 0 0.078200 0.094000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 281 235 329 0 0.016000 0.040000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 282 236 263 0 0.080000 0.141000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 283 237 263 0 0.065000 0.112000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 284 238 309 0 0.285900 0.333100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 285 240 243 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 286 241 291 0 0.234500 0.225100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 287 243 366 0 0.363400 0.425500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 288 251 263 0 0.044000 0.057000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 289 254 341 0 0.037000 0.088000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 290 255 267 0 0.009000 0.020000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 291 255 360 0 0.204100 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 292 256 294 0 0.099000 0.248000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 293 256 311 0 0.029000 0.128000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 294 258 332 0 0.152900 0.209100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 295 259 261 0 0.057900 0.108900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 296 259 311 0 0.012000 0.017000 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 297 260 262 0 0.008200 0.020500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 298 260 356 0 0.100700 0.126200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 299 261 320 0 0.106200 0.139800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 300 262 329 0 0.161000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 301 262 359 0 0.130000 0.246600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 302 264 265 0 0.662900 0.830700 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 303 268 363 0 0.135300 0.157100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 304 269 292 0 0.268000 0.335800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 305 277 337 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 306 280 342 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 307 281 340 0 0.037000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 308 287 312 0 0.011200 0.037400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 309 289 355 0 0.215300 0.263900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 310 290 341 0 0.186000 0.241000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 311 291 292 0 0.298200 0.373700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 312 294 372 0 0.173300 0.218900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 313 295 301 0 0.274000 0.318200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 314 295 339 0 0.222000 0.234000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 315 301 371 0 0.211500 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 316 302 337 0 0.296000 0.363000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 317 309 339 0 0.249000 0.264000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 318 309 363 0 0.532800 0.529500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 319 312 325 0 0.063000 0.085000 0.007800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 320 314 340 0 0.058000 0.075000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 321 317 358 0 0.318500 0.370700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 322 320 367 0 0.012700 0.036100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 323 353 359 0 0.229700 0.266800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 324 353 361 0 0.040400 0.046900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 325 369 370 0 0.351500 0.442100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 326 370 371 0 0.358500 0.419200 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 327 390 2 2 0.010800 0.276300 0.000000 1.0301 1.0000 1.0000 0.00 0.00 0.00
+ 328 390 409 0 0.000400 0.002400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 329 390 410 0 0.001500 0.003400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 330 390 547 0 0.008300 0.053400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 331 391 392 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 332 391 392 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 333 391 445 0 0.002100 0.009600 0.140600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 334 391 448 0 0.003400 0.018130 0.138600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 335 391 454 0 0.000900 0.004300 0.063200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 336 394 493 0 0.006340 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 337 395 494 0 0.006350 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 338 396 10 2 0.007000 0.180000 0.000000 1.0097 1.0000 1.0000 0.00 0.00 0.00
+ 339 396 397 0 0.027000 0.103000 0.014400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 340 396 575 0 0.022100 0.084300 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 341 397 15 2 0.010900 0.272000 0.000000 1.0680 1.0000 1.0000 0.00 0.00 0.00
+ 342 397 458 0 0.028500 0.108600 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 343 398 30 2 0.004200 0.127000 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+ 344 398 30 2 0.004300 0.127300 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+ 345 398 457 0 0.013500 0.029950 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 346 398 485 0 0.004500 0.016100 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 347 398 527 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 348 398 527 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 349 398 547 0 0.011100 0.025700 0.013400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 350 398 568 0 0.008600 0.031400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 351 398 581 0 0.009100 0.033000 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 352 398 594 0 0.002340 0.010260 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 353 400 401 1 0.000300 0.010200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 354 400 403 1 0.000500 0.032900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 355 400 404 1 0.000800 0.031100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 356 400 502 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 357 400 503 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 358 400 591 0 0.000900 0.011000 0.192600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 359 400 591 0 0.000900 0.011000 0.385200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 360 401 508 0 0.002000 0.019500 0.044000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 361 403 36 2 0.006500 0.170200 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+ 362 403 36 2 0.006900 0.175600 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+ 363 403 566 0 0.002500 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 364 403 571 0 0.002890 0.009510 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 365 403 571 0 0.002320 0.009950 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 366 404 422 0 0.001400 0.013500 0.009000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 367 404 430 0 0.040200 0.090390 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 368 404 433 0 0.011290 0.039310 0.026600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 369 404 439 0 0.032600 0.090400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 370 404 451 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 371 404 452 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 372 404 572 0 0.002370 0.011230 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 373 406 39 2 0.006000 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+ 374 406 39 2 0.007200 0.180000 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+ 375 406 409 0 0.038200 0.088000 0.045600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 376 406 491 0 0.006000 0.103200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 377 406 550 0 0.012100 0.060000 0.018400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 378 406 578 0 0.001900 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 379 407 406 2 0.000500 0.025000 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+ 380 407 883 0 0.000400 0.003600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 381 412 413 1 0.000700 0.025000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 382 412 556 0 0.000300 0.001800 1.273000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 383 413 423 0 0.001500 0.006700 0.099200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 384 413 454 0 0.001500 0.006600 0.098000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 385 413 514 0 0.001300 0.005800 0.085600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 386 415 505 0 0.000400 0.002600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 387 415 568 0 0.001100 0.006700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 388 416 500 0 0.001600 0.006700 0.114800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 389 416 587 0 0.001900 0.009100 0.101200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 390 418 63 2 0.004400 0.127500 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+ 391 418 63 2 0.004400 0.125700 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+ 392 418 476 0 0.001600 0.008600 0.058200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 393 418 478 0 0.005700 0.033390 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 394 418 529 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 395 418 574 0 0.007250 0.028620 0.062800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 396 419 68 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 397 419 68 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 398 419 425 0 0.002500 0.016000 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 399 419 603 0 0.004300 0.028700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 400 422 565 0 0.000130 0.001300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 401 423 78 1 0.004200 0.140000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 402 423 78 1 0.004400 0.137300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 403 423 78 1 0.004800 0.137800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 404 423 500 0 0.001000 0.004600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 405 423 514 0 0.002400 0.011020 0.162200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 406 423 584 0 0.002700 0.012500 0.183400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 407 424 526 0 0.001600 0.019700 0.343200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 408 424 624 0 0.004400 0.063800 0.811600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 409 425 518 0 0.007300 0.042500 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 410 425 562 0 0.002400 0.015300 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 411 428 437 0 0.001800 0.018200 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 412 428 583 0 0.000500 0.004700 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 413 430 83 2 0.007700 0.186400 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+ 414 430 83 2 0.007700 0.186600 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+ 415 430 439 0 0.015800 0.052200 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 416 430 626 0 0.008680 0.046920 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 417 431 473 1 0.000500 0.011700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 418 431 794 0 0.020900 0.097700 0.038800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 419 433 89 2 0.007300 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 420 433 596 0 0.001110 0.003830 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 421 434 583 0 0.003300 0.007000 0.131800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 422 436 588 0 0.000300 0.025250 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 423 437 107 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+ 424 437 107 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+ 425 437 565 0 0.001400 0.013600 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 426 437 592 0 0.013000 0.076450 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 427 439 487 0 0.031000 0.118100 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 428 440 111 2 0.005420 0.130500 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+ 429 440 111 2 0.005400 0.129800 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+ 430 440 442 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 431 440 443 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 432 440 499 0 0.003130 0.013150 0.223600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 433 442 513 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 434 442 557 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 435 443 513 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 436 443 557 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 437 445 421 2 0.004600 0.117200 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+ 438 445 421 2 0.004600 0.117000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+ 439 445 421 2 0.003200 0.120000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+ 440 445 514 0 0.003400 0.015600 0.230200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 441 446 112 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 442 446 112 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 443 446 112 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 444 446 517 0 0.002320 0.058320 0.122600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 445 446 583 0 0.003200 0.012490 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 446 446 583 0 0.003150 0.027060 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 447 446 612 0 0.004300 0.015900 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 448 447 449 2 0.002000 0.120000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+ 449 447 535 0 0.001380 0.009250 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 450 447 587 0 0.000910 0.006060 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 451 448 449 2 0.002000 0.123000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+ 452 448 535 0 0.001370 0.009100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 453 454 130 1 0.004300 0.132700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+ 454 454 130 1 0.004500 0.133700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+ 455 454 130 1 0.004800 0.138300 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+ 456 454 500 0 0.000300 0.001140 0.016800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 457 454 587 0 0.003390 0.015460 0.227800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 458 455 135 2 0.007200 0.180000 0.000000 1.0581 1.0000 1.0000 0.00 0.00 0.00
+ 459 457 140 2 0.006700 0.179100 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+ 460 457 140 2 0.007700 0.180200 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+ 461 457 545 0 0.008100 0.031700 0.214600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 462 457 560 0 0.006600 0.026600 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 463 457 603 0 0.001500 0.015000 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 464 458 211 2 0.081000 0.288700 0.000000 1.0518 1.0000 1.0000 0.00 0.00 0.00
+ 465 458 542 0 0.065600 0.250200 0.035000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 466 460 145 1 0.005800 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 467 460 145 1 0.010600 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 468 460 145 1 0.006000 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 469 460 511 0 0.002500 0.024860 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 470 460 607 0 0.029880 0.124600 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 471 460 612 0 0.001990 0.008180 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 472 461 154 2 0.010900 0.275000 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+ 473 461 154 2 0.012600 0.274700 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+ 474 461 466 0 0.011400 0.040100 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 475 461 472 0 0.011200 0.025000 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 476 461 527 0 0.014620 0.053870 0.033000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 477 461 669 0 0.026280 0.105720 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 478 463 159 1 0.004200 0.133500 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 479 463 159 1 0.005800 0.180900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 480 463 159 1 0.004100 0.134300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 481 463 464 0 0.002800 0.016300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 482 463 533 0 0.001100 0.006400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 483 463 533 0 0.001100 0.006700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 484 464 509 0 0.005500 0.013600 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 485 464 538 0 0.001740 0.017600 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 486 466 578 0 0.035200 0.122600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 487 467 497 0 0.011000 0.477800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 488 467 538 0 0.001120 0.011370 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 489 467 571 0 0.002800 0.018200 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 490 468 575 2 0.002600 0.053600 0.000000 1.0641 1.0000 1.0000 0.00 0.00 0.00
+ 491 468 781 0 0.009300 0.057300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 492 469 491 0 0.042200 0.103400 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 493 470 475 0 0.016900 0.051800 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 494 470 579 0 0.006900 0.046300 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 495 472 541 0 0.041600 0.093800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 496 473 182 2 0.016000 0.260000 0.000000 0.8852 1.0000 1.0000 0.00 0.00 0.00
+ 497 473 512 0 0.015600 0.082000 0.134000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 498 473 518 0 0.008700 0.050800 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 499 475 183 2 0.010800 0.276300 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+ 500 475 542 0 0.057700 0.128100 0.016400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 501 476 185 1 0.005700 0.177300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 502 476 185 1 0.007000 0.181600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 503 476 185 1 0.007700 0.181800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 504 476 477 0 0.004300 0.015400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 505 476 513 0 0.009300 0.033600 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 506 476 574 0 0.006100 0.021700 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 507 477 513 0 0.005200 0.019000 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 508 477 517 0 0.006100 0.023200 0.148600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 509 478 479 2 0.026900 0.568700 0.000000 0.9992 1.0000 1.0000 0.00 0.00 0.00
+ 510 478 559 0 0.002100 0.012600 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 511 481 482 2 0.027400 0.568700 0.000000 1.0020 1.0000 1.0000 0.00 0.00 0.00
+ 512 481 513 0 0.006400 0.037400 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 513 481 559 0 0.002200 0.012700 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 514 484 574 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 515 484 594 0 0.002800 0.011600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 516 485 574 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 517 487 186 1 0.014700 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 518 487 488 1 0.015000 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 519 487 520 0 0.027910 0.098660 0.013600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 520 490 187 2 0.004200 0.126000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+ 521 490 187 2 0.004300 0.127000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+ 522 490 549 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 523 490 549 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 524 490 557 0 0.004600 0.026500 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 525 491 40 2 0.017700 0.287300 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+ 526 491 40 2 0.015700 0.282700 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+ 527 491 550 0 0.011900 0.058800 0.049000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 528 491 579 0 0.005300 0.025100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 529 493 509 0 0.001200 0.011500 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 530 494 534 0 0.001700 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 531 495 497 0 0.011400 0.485300 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 532 495 571 0 0.002500 0.016100 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 533 496 497 0 0.011300 0.489400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 534 496 571 0 0.002500 0.016400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 535 499 193 2 0.007200 0.178900 0.000000 1.0047 1.0000 1.0000 0.00 0.00 0.00
+ 536 499 557 0 0.006000 0.033100 0.083400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 537 502 591 0 0.001600 0.019900 0.346600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 538 502 889 0 0.001030 0.012210 0.218400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 539 503 602 0 0.002200 0.026960 0.467400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 540 503 891 0 0.001500 0.017500 0.312400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 541 505 581 0 0.001100 0.007000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 542 508 509 1 0.000500 0.025400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 543 508 586 0 0.000600 0.005900 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 544 509 210 1 0.006000 0.182200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 545 509 210 1 0.006900 0.184400 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 546 509 210 1 0.006100 0.181300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 547 509 210 1 0.011400 0.261700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 548 509 533 0 0.002100 0.014400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 549 509 566 0 0.004600 0.046200 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 550 509 605 0 0.010040 0.039610 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 551 511 217 1 0.006000 0.175100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 552 511 217 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 553 511 217 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 554 511 539 0 0.010200 0.037100 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 555 511 592 0 0.001500 0.007100 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 556 511 592 0 0.001000 0.006700 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 557 512 562 0 0.017700 0.064200 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 558 513 228 1 0.003600 0.132700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 559 513 228 1 0.003500 0.130800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 560 513 228 1 0.004000 0.139200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 561 513 514 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 562 513 514 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 563 513 515 1 0.013100 0.241100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 564 513 529 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 565 517 230 1 0.006000 0.188200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 566 517 230 1 0.006200 0.183100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 567 517 230 1 0.005700 0.192700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 568 517 230 1 0.006000 0.173600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 569 517 545 0 0.007600 0.028000 0.093800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 570 517 603 0 0.018000 0.085900 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 571 518 255 2 0.007600 0.165800 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+ 572 518 255 2 0.007200 0.169300 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+ 573 520 521 0 0.002810 0.018580 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 574 520 562 0 0.006460 0.018530 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 575 521 259 2 0.006200 0.177800 0.000000 0.9002 1.0000 1.0000 0.00 0.00 0.00
+ 576 523 262 2 0.007000 0.174700 0.000000 0.9707 1.0000 1.0000 0.00 0.00 0.00
+ 577 523 603 0 0.017800 0.118400 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 578 526 527 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 579 526 527 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 580 526 548 0 0.001920 0.021280 0.364800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 581 526 556 0 0.001400 0.017300 0.291200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 582 526 602 0 0.000990 0.012120 0.211400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 583 526 775 0 0.001750 0.020310 0.382000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 584 527 581 0 0.003800 0.014500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 585 527 581 0 0.002000 0.019400 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 586 529 279 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 587 529 279 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 588 529 279 1 0.006000 0.168900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 589 529 549 0 0.036400 0.214000 0.216000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 590 529 557 0 0.004600 0.028200 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 591 530 281 2 0.006800 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+ 592 530 550 0 0.000500 0.004800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 593 532 533 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 594 532 534 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 595 532 535 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 596 533 538 0 0.005700 0.040700 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 597 533 587 0 0.001700 0.056100 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 598 534 583 0 0.004100 0.023700 0.120800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 599 534 583 0 0.005300 0.029800 0.076400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 600 535 584 0 0.005400 0.030000 0.075800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 601 538 286 1 0.006500 0.223300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 602 538 286 1 0.006200 0.237800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 603 538 286 1 0.006300 0.240000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 604 538 571 0 0.003700 0.028800 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 605 539 290 2 0.004500 0.127200 0.000000 0.9930 1.0000 1.0000 0.00 0.00 0.00
+ 606 539 572 0 0.020400 0.074500 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 607 541 292 2 0.013200 0.277700 0.000000 1.0287 1.0000 1.0000 0.00 0.00 0.00
+ 608 541 575 0 0.037700 0.083700 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 609 542 295 2 0.010200 0.264700 0.000000 1.0958 1.0000 1.0000 0.00 0.00 0.00
+ 610 545 310 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+ 611 545 310 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+ 612 545 560 0 0.010500 0.038600 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 613 547 312 2 0.007200 0.177800 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+ 614 547 312 2 0.007200 0.180000 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+ 615 548 556 0 0.001700 0.020300 0.458200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 616 548 775 0 0.003400 0.039700 0.722600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 617 548 850 0 0.000100 0.001800 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 618 549 550 0 0.000900 0.099600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 619 549 550 0 0.000900 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 620 550 554 0 0.012400 0.070100 0.050200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 621 550 557 0 0.029650 0.210540 0.032200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 622 551 548 1 0.000500 0.027800 0.000000 1.0750 1.0000 1.0000 0.00 0.00 0.00
+ 623 554 559 0 0.004500 0.022600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 624 556 557 1 0.000500 0.021670 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 625 557 315 2 0.005600 0.177800 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+ 626 557 315 2 0.006000 0.179300 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+ 627 557 315 2 0.007700 0.186700 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+ 628 557 577 0 0.022000 0.129000 0.020000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 629 559 316 2 0.007700 0.178700 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+ 630 559 316 2 0.006200 0.173300 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+ 631 559 316 2 0.007800 0.185100 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+ 632 560 319 2 0.008300 0.180700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 633 560 319 2 0.007700 0.179100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 634 560 603 0 0.002300 0.029400 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 635 562 320 1 0.010500 0.278000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 636 562 320 1 0.010500 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 637 562 320 1 0.010800 0.272700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 638 562 592 0 0.015000 0.055300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 639 562 596 0 0.006400 0.022300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 640 562 597 0 0.005100 0.034600 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 641 565 327 2 0.027000 0.600000 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+ 642 566 328 2 0.027000 0.600000 0.000000 0.9693 1.0000 1.0000 0.00 0.00 0.00
+ 643 571 544 2 0.006200 0.182200 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+ 644 571 544 2 0.006100 0.174700 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+ 645 571 572 0 0.001100 0.093700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 646 571 572 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 647 571 605 0 0.003700 0.013900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 648 572 607 0 0.003300 0.011800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 649 574 334 2 0.007600 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+ 650 574 334 2 0.007800 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+ 651 574 334 2 0.007600 0.186700 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+ 652 575 335 2 0.010300 0.266000 0.000000 1.0328 1.0000 1.0000 0.00 0.00 0.00
+ 653 577 343 2 0.006300 0.180700 0.000000 0.9847 1.0000 1.0000 0.00 0.00 0.00
+ 654 578 579 0 0.001900 0.012500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 655 579 345 2 0.005800 0.179100 0.000000 1.0793 1.0000 1.0000 0.00 0.00 0.00
+ 656 581 352 1 0.005600 0.173800 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 657 581 352 1 0.005800 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 658 581 352 1 0.007100 0.178400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+ 659 583 354 1 0.011100 0.202200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 660 583 354 1 0.011300 0.206700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 661 583 354 1 0.011600 0.211800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 662 583 354 1 0.011400 0.208700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 663 583 354 1 0.009900 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 664 583 354 1 0.009800 0.177800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+ 665 583 584 0 0.000900 0.117000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 666 586 587 1 0.000500 0.025000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 667 587 588 1 0.004700 0.119200 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+ 668 587 588 1 0.004800 0.115100 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+ 669 591 592 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 670 591 592 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 671 591 780 0 0.002400 0.032200 0.920800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 672 592 597 0 0.002600 0.017500 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 673 596 599 0 0.009500 0.021300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 674 597 599 0 0.007700 0.029200 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 675 599 600 2 0.027000 0.560500 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+ 676 599 600 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+ 677 599 600 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+ 678 602 603 0 0.000500 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 679 605 606 2 0.027700 0.593300 0.000000 0.9640 1.0000 1.0000 0.00 0.00 0.00
+ 680 607 609 0 0.001400 0.008600 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 681 609 610 2 0.027600 0.602700 0.000000 0.9690 1.0000 1.0000 0.00 0.00 0.00
+ 682 612 373 2 0.007000 0.171100 0.000000 0.9240 1.0000 1.0000 0.00 0.00 0.00
+ 683 617 687 0 0.031900 0.075300 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 684 617 768 0 0.009200 0.021600 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 685 618 717 0 0.027800 0.045500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 686 618 727 0 0.057300 0.093900 0.019200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 687 619 658 0 0.028500 0.069900 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 688 619 683 0 0.022900 0.068400 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 689 620 637 0 0.007000 0.021300 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 690 620 663 0 0.025500 0.074100 0.019400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 691 621 761 0 0.068000 0.116000 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 692 621 782 0 0.060200 0.098800 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 693 622 727 0 0.091500 0.217600 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 694 622 756 0 0.032400 0.076400 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 695 622 765 0 0.030800 0.085400 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 696 623 767 0 0.027900 0.080400 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 697 623 799 0 0.053300 0.153400 0.040200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 698 624 625 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 699 624 709 0 0.002500 0.035400 0.458800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 700 624 745 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 701 624 745 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 702 624 773 0 0.001800 0.028300 0.321800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 703 624 780 0 0.002400 0.036600 0.836000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 704 625 695 0 0.001600 0.010400 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 705 625 715 0 0.010000 0.064800 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 706 625 730 0 0.010500 0.058800 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 707 625 755 0 0.004100 0.036500 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 708 625 763 0 0.015500 0.102000 0.027600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 709 625 787 0 0.014000 0.133500 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 710 630 728 0 0.005700 0.029800 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 711 630 795 0 0.001300 0.005300 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 712 631 697 0 0.047900 0.112800 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 713 631 793 0 0.035800 0.084300 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 714 632 730 0 0.029100 0.088000 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 715 632 766 0 0.051300 0.155300 0.037000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 716 633 641 0 0.016000 0.046000 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 717 633 653 0 0.014700 0.042400 0.011000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 718 634 787 0 0.051400 0.120200 0.030600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 719 635 649 0 0.015800 0.117300 0.034400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 720 635 695 0 0.019100 0.124100 0.034600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 721 635 764 0 0.009300 0.060200 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 722 635 774 0 0.008800 0.036900 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 723 635 797 0 0.004500 0.013300 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 724 636 650 0 0.017000 0.052100 0.048000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 725 636 729 0 0.023200 0.152200 0.041200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 726 636 762 0 0.016300 0.089000 0.023400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 727 636 800 0 0.023500 0.127200 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 728 637 778 0 0.039300 0.140900 0.035400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 729 638 656 0 0.051700 0.117300 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 730 638 746 0 0.003900 0.025600 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 731 639 747 0 0.013100 0.037800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 732 640 656 0 0.029000 0.086300 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 733 640 716 0 0.027100 0.078000 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 734 640 722 0 0.041300 0.119000 0.032000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 735 641 649 0 0.004300 0.046300 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 736 641 763 0 0.015700 0.103400 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 737 642 701 0 0.078700 0.154600 0.032600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 738 642 744 0 0.003500 0.013600 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 739 642 751 0 0.027100 0.146100 0.038400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 740 642 752 0 0.026400 0.079700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 741 642 788 0 0.044500 0.097200 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 742 642 794 0 0.017600 0.073100 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 743 643 698 0 0.046400 0.109700 0.027000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 744 643 768 0 0.057000 0.135400 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 745 643 798 0 0.048100 0.138700 0.036200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 746 644 666 0 0.004000 0.017400 0.004600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 747 644 686 0 0.002400 0.008100 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 748 645 667 0 0.000900 0.009400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 749 645 673 0 0.016900 0.033000 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 750 645 689 0 0.008200 0.018900 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 751 645 769 0 0.034900 0.100400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 752 645 778 0 0.006200 0.018800 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 753 649 683 0 0.010300 0.112200 0.034000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 754 649 764 0 0.019000 0.169300 0.049800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 755 649 774 0 0.007500 0.081300 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 756 650 744 0 0.008900 0.027800 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 757 651 723 0 0.028100 0.047400 0.009200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 758 651 779 0 0.083800 0.136700 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 759 652 666 0 0.064400 0.115200 0.024400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 760 652 690 0 0.007000 0.031300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 761 652 708 0 0.009800 0.098400 0.029800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 762 652 713 0 0.017100 0.071200 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 763 652 721 0 0.001600 0.016900 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 764 652 721 0 0.001500 0.015900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 765 653 654 0 0.027800 0.071900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 766 654 668 0 0.013000 0.084700 0.023000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 767 654 680 0 0.061700 0.114600 0.025400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 768 654 683 0 0.022000 0.143900 0.039000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 769 654 731 0 0.014300 0.051800 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 770 654 731 0 0.018900 0.049500 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 771 654 774 0 0.034600 0.146200 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 772 654 797 0 0.025000 0.168200 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 773 654 799 0 0.021500 0.065600 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 774 655 730 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 775 655 730 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 776 656 665 0 0.031700 0.139300 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 777 656 699 0 0.025100 0.159800 0.043600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 778 656 713 0 0.015300 0.063600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 779 656 741 0 0.001200 0.005100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 780 657 705 0 0.119000 0.269900 0.064400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 781 657 708 0 0.012400 0.065700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 782 658 680 0 0.027500 0.040100 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 783 658 694 0 0.009400 0.023100 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 784 658 723 0 0.072100 0.134100 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 785 662 711 0 0.006800 0.020700 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 786 662 739 0 0.011900 0.036000 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 787 663 676 0 0.023500 0.067700 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 788 664 696 0 0.002200 0.023700 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 789 664 776 0 0.003400 0.037100 0.011200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 790 665 706 0 0.049000 0.085100 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 791 665 711 0 0.050300 0.151200 0.036400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 792 665 788 0 0.011800 0.035100 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 793 666 746 0 0.006400 0.041400 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 794 666 776 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 795 666 776 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 796 666 795 0 0.041600 0.169100 0.045000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 797 668 700 0 0.001800 0.005400 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 798 673 793 0 0.026100 0.061600 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 799 674 787 0 0.004900 0.009800 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 800 675 687 0 0.036300 0.104500 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 801 675 747 0 0.008600 0.024800 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 802 676 736 0 0.008400 0.024300 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 803 681 693 0 0.008200 0.025000 0.006000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 804 681 696 0 0.004600 0.015500 0.003800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 805 682 752 0 0.002100 0.010400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 806 682 787 0 0.029500 0.093600 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 807 683 736 0 0.037300 0.122400 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 808 683 797 0 0.009000 0.029900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 809 686 696 0 0.015500 0.049500 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 810 686 708 0 0.038200 0.142300 0.085200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 811 687 714 0 0.037400 0.087200 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 812 687 757 0 0.038100 0.089800 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 813 688 455 2 0.001400 0.038000 0.000000 1.0675 1.0000 1.0000 0.00 0.00 0.00
+ 814 688 711 0 0.007460 0.044800 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 815 689 761 0 0.010300 0.038500 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 816 690 735 0 0.000500 0.003200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 817 693 739 0 0.007100 0.021500 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 818 696 669 1 0.000800 0.015500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 819 696 776 0 0.006500 0.061100 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 820 696 801 0 0.026200 0.109100 0.029200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 821 697 727 0 0.053500 0.124600 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 822 698 779 0 0.023400 0.045700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 823 699 795 0 0.019800 0.083100 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 824 700 799 0 0.005600 0.016900 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 825 701 787 0 0.016200 0.031800 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 826 705 765 0 0.043500 0.125300 0.032800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 827 706 787 0 0.067100 0.114700 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 828 708 761 0 0.007000 0.055000 0.019800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 829 708 781 0 0.005300 0.057300 0.017200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 830 709 718 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 831 709 718 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 832 709 773 0 0.000600 0.007100 0.137000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 833 709 775 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 834 709 775 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 835 712 761 0 0.006700 0.022600 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 836 712 778 0 0.011200 0.071500 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 837 714 727 0 0.034000 0.079100 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 838 715 726 0 0.005200 0.033800 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 839 717 782 0 0.081500 0.129600 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 840 718 773 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 841 718 773 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 842 722 736 0 0.017700 0.050900 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 843 722 764 0 0.015100 0.098900 0.026800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 844 724 725 0 0.000200 0.000500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 845 724 768 0 0.020500 0.062000 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 846 726 785 0 0.002000 0.013000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 847 728 761 0 0.005700 0.035600 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 848 730 755 0 0.004200 0.045100 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 849 730 785 0 0.011600 0.036300 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 850 730 787 0 0.032200 0.069100 0.047400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 851 730 787 0 0.023000 0.094500 0.024600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 852 735 761 0 0.003900 0.017400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 853 740 753 0 0.001400 0.004000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 854 740 782 0 0.035000 0.099900 0.026000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 855 745 894 0 0.000500 0.006300 0.095800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 856 745 902 0 0.003600 0.048000 0.582000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 857 748 754 0 0.064100 0.184800 0.048200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 858 748 756 0 0.042600 0.100400 0.025000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 859 751 800 0 0.021400 0.115700 0.030400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 860 754 757 0 0.030200 0.071200 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 861 761 796 0 0.015300 0.063700 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 862 762 800 0 0.008500 0.046400 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 863 766 797 0 0.006600 0.019300 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 864 767 779 0 0.033300 0.081600 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 865 773 774 1 0.000400 0.019000 0.000000 0.9850 1.0000 1.0000 0.00 0.00 0.00
+ 866 774 797 0 0.002300 0.024800 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 867 775 776 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 868 775 777 0 0.002400 0.036600 0.416000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 869 776 781 0 0.007890 0.086120 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 870 776 796 0 0.023000 0.151200 0.041000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 871 777 778 1 0.000400 0.185000 0.000000 1.0110 1.0000 1.0000 0.00 0.00 0.00
+ 872 778 792 0 0.003100 0.033500 0.010200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 873 779 798 0 0.050500 0.124000 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 874 792 796 0 0.026900 0.114000 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 875 796 801 0 0.028700 0.116900 0.031000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 876 800 626 1 0.001700 0.033700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 877 810 813 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 878 810 813 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 879 810 813 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 880 810 863 0 0.010550 0.076000 0.115000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 881 811 818 0 0.000600 0.006200 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 882 811 837 0 0.000490 0.004820 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 883 812 839 0 0.021800 0.151100 0.223800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 884 812 878 0 0.012700 0.090900 0.135400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 885 813 814 1 0.000700 0.021100 0.000000 1.0610 1.0000 1.0000 0.00 0.00 0.00
+ 886 813 837 0 0.003390 0.033600 0.219800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 887 813 867 0 0.003800 0.037800 0.246200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 888 813 869 1 0.000600 0.015100 0.000000 1.0720 1.0000 1.0000 0.00 0.00 0.00
+ 889 814 908 0 0.001000 0.007000 0.014000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 890 815 830 0 0.001780 0.012020 0.076600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 891 816 817 0 0.000300 0.013550 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 892 816 819 0 0.007700 0.053800 0.335000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 893 816 827 0 0.005900 0.040500 0.250800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 894 816 851 0 0.005500 0.054100 0.363600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 895 816 863 0 0.010800 0.100190 0.170400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 896 816 863 0 0.015000 0.105500 0.158000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 897 816 863 0 0.010500 0.100000 0.170000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 898 816 885 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 899 816 885 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 900 817 880 0 0.005800 0.028100 0.017000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 901 817 884 0 0.096500 0.366900 0.054000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 902 818 863 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 903 818 863 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 904 818 867 0 0.001040 0.009300 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 905 818 877 0 0.001700 0.011700 0.289600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 906 819 851 0 0.002900 0.028500 0.192000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 907 819 881 0 0.005400 0.036900 0.228600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 908 823 824 0 0.043000 0.303100 0.463000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 909 823 828 0 0.029100 0.226700 0.342800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 910 823 839 0 0.008500 0.058800 0.087000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 911 823 870 0 0.007300 0.050400 0.074000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 912 824 828 0 0.012000 0.083600 0.123600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 913 824 839 0 0.046800 0.336900 0.519800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 914 824 840 0 0.029400 0.230400 0.349400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 915 824 840 0 0.037600 0.263000 0.396000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 916 824 855 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 917 824 855 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 918 824 859 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 919 824 870 0 0.048900 0.349200 0.538000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 920 824 877 0 0.002000 0.015300 0.214000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 921 824 877 0 0.005700 0.045000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 922 824 877 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 923 824 877 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 924 825 832 0 0.001620 0.009700 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 925 825 843 0 0.001530 0.009400 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 926 826 841 0 0.013700 0.095700 0.141000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 927 826 864 0 0.011200 0.077200 0.482400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 928 826 864 0 0.011200 0.079000 0.471400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 929 827 863 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 930 827 863 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 931 827 868 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 932 827 868 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 933 829 838 0 0.002480 0.024470 0.164800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 934 830 840 0 0.003580 0.035200 0.239000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 935 830 878 0 0.004500 0.044250 0.301000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 936 831 858 0 0.017300 0.198800 0.700000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 937 831 864 0 0.009100 0.062300 0.385600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 938 831 868 0 0.008500 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 939 831 868 0 0.008600 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 940 832 854 0 0.002100 0.008300 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 941 836 845 0 0.004440 0.051440 3.597000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 942 836 858 1 0.000740 0.020400 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+ 943 836 876 0 0.002440 0.032620 2.236000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 944 837 863 0 0.001020 0.010050 0.066400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 945 838 868 0 0.003920 0.038140 0.258000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 946 839 840 0 0.012300 0.125500 0.194000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 947 839 859 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 948 839 878 0 0.007500 0.077300 0.119000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 949 840 878 0 0.023900 0.170800 0.255600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 950 841 866 0 0.014500 0.058010 0.094000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 951 841 866 0 0.007700 0.056910 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 952 842 586 1 0.000400 0.002500 0.000000 1.0450 1.0000 1.0000 0.00 0.00 0.00
+ 953 842 843 1 0.001200 0.039600 0.000000 1.0250 1.0000 1.0000 0.00 0.00 0.00
+ 954 842 882 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 955 844 854 0 0.062700 0.250000 0.067200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 956 844 854 0 0.102000 0.236000 0.060600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 957 844 880 0 0.085500 0.342000 0.091400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 958 844 884 0 0.080800 0.234400 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 959 845 849 1 0.000250 0.015400 0.000000 0.8800 1.0000 1.0000 0.00 0.00 0.00
+ 960 849 877 0 0.000420 0.006700 0.110800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 961 850 851 1 0.000200 0.024200 0.000000 0.9300 1.0000 1.0000 0.00 0.00 0.00
+ 962 851 852 0 0.000000 0.009400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 963 851 883 0 0.000500 0.006500 0.103800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 964 853 854 0 0.000400 0.017200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 965 853 881 0 0.000770 0.006480 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 966 856 907 0 0.001000 0.007000 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 967 857 877 0 0.000300 0.001700 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 968 858 866 0 0.029050 0.112070 0.195000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 969 858 866 0 0.014850 0.114140 0.193000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 970 863 865 0 0.000680 0.006680 0.399000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 971 863 867 0 0.001050 0.008370 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 972 864 877 0 0.025400 0.177700 0.270400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 973 864 877 0 0.024400 0.176700 0.271600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 974 869 903 0 0.001000 0.007000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 975 871 872 0 0.000170 0.012340 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 976 871 876 0 0.001840 0.024450 1.662000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 977 878 856 1 0.000000 0.083300 0.000000 1.0300 1.0000 1.0000 0.00 0.00 0.00
+ 978 878 879 1 0.000500 0.018200 0.000000 1.1030 1.0000 1.0000 0.00 0.00 0.00
+ 979 881 882 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 980 883 884 1 0.000330 0.013000 0.000000 1.0500 1.0000 1.0000 0.00 0.00 0.00
+ 981 883 885 0 0.009220 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 982 883 885 0 0.009200 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 983 889 890 0 0.000000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 984 889 898 0 0.001700 0.021000 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 985 891 898 0 0.001000 0.012300 0.150000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 986 894 895 0 0.000800 0.009800 0.120000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 987 895 899 0 0.001000 0.012000 0.160000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 988 895 900 0 0.004200 0.063000 0.200000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 989 895 902 0 0.003100 0.027000 0.050000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 990 895 902 0 0.001140 0.018000 0.270000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 991 896 897 0 0.100000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 992 896 899 0 0.000300 0.003800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 993 896 899 0 0.003000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 994 896 901 0 0.030000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 995 896 902 0 0.000400 0.005000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 996 896 903 0 0.014000 1.139997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 997 896 908 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 998 897 898 0 0.001800 0.023000 0.284000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+ 999 897 898 0 0.010000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1000 897 899 0 0.030000 0.999999 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1001 897 900 0 0.006000 0.068000 0.740000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1002 897 901 0 0.050000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1003 898 901 0 0.020000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1004 898 903 0 -0.200000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1005 898 907 0 -0.400000 2.500001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1006 898 908 0 0.083000 0.600000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1007 899 901 0 0.004200 0.050000 0.080000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1008 899 901 0 0.060000 0.700001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1009 899 903 0 0.030000 1.009997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1010 899 907 0 0.070000 1.830000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1011 900 901 0 0.001300 0.029000 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1012 900 902 0 0.002200 0.046410 0.400000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1013 901 902 0 0.004000 0.044000 0.500000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1014 901 908 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1015 903 907 0 -0.040450 0.278890 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1016 903 908 0 -0.000010 0.002750 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1017 907 908 0 -0.178800 0.710991 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
diff --git a/examples/performance/jump/IEEE662.bus b/examples/performance/jump/IEEE662.bus
new file mode 100644
index 00000000000..0814369e587
--- /dev/null
+++ b/examples/performance/jump/IEEE662.bus
@@ -0,0 +1,662 @@
+ 1 0 "ADAIR-------" 1.0193 0.00 0.00 0.00 0.00 0.00 2.18 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+ 2 0 "ADAMS-----40" 1.0140 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 3 0 "1AINSWORTH--" 1.0234 0.00 0.00 0.00 0.00 0.00 0.17 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+ 4 0 "ALGONAC-----" 1.0163 0.00 0.00 0.00 0.00 0.00 7.98 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+ 5 0 "ALMONT------" 0.9849 0.00 0.00 0.00 0.00 0.00 3.28 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+ 6 0 "ANDERSON----" 1.0018 0.00 0.00 0.00 0.00 0.00 0.59 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+ 7 0 "APPLEGATE---" 0.9866 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+ 8 0 "ARGO--------" 1.0307 0.00 0.00 0.00 0.00 0.00 23.02 3.93 0.0000 0.1200 0.0000 0.0000 0 0
+ 9 0 "ARMADA------" 1.0187 0.00 0.00 0.00 0.00 0.00 2.52 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+ 10 0 "ARROWHEAD-40" 1.0217 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 11 0 "ATTICA------" 0.9842 0.00 0.00 0.00 0.00 0.00 1.34 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+ 12 0 "AUBURN-HTS-1" 1.0049 0.00 0.00 0.00 0.00 0.00 6.50 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+ 13 0 "AVOCA-------" 0.9930 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+ 14 0 "AVON--------" 1.0051 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+ 15 0 "BAD-AXE-40--" 0.9987 0.00 0.00 0.00 0.00 0.00 6.13 2.12 0.0000 0.0660 0.0000 0.0000 0 0
+ 16 0 "BALDWIN--EQ1" 1.0224 0.00 0.00 0.00 0.00 0.00 8.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+ 17 0 "BARNES-LAKE-" 0.9888 0.00 0.00 0.00 0.00 0.00 2.20 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+ 18 0 "1BARTLETT-CP" 1.0119 0.00 0.00 0.00 0.00 0.00 7.40 5.87 0.0000 0.0000 0.0000 0.0000 0 0
+ 19 0 "BAYPORT-----" 0.9869 0.00 0.00 0.00 0.00 0.00 1.26 2.12 0.0000 0.0000 0.0000 0.0000 0 0
+ 20 0 "BEAVER------" 0.9956 0.00 0.00 0.00 0.00 0.00 0.17 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+ 26 0 "BELLEVILLE--" 1.0212 0.00 0.00 0.00 0.00 0.00 6.05 2.66 0.0000 0.0000 0.0000 0.0000 0 0
+ 27 0 "BERLIN-FUT74" 1.0348 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 28 0 "BERNARD-----" 0.9996 0.00 0.00 0.00 0.00 0.00 2.10 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+ 29 0 "BINGHAM--EQ1" 1.0029 0.00 0.00 0.00 0.00 0.00 3.28 1.49 0.0000 0.0480 0.0000 0.0000 0 0
+ 30 0 "BLOOMFIELD40" 1.0220 0.00 0.00 0.00 0.00 0.00 79.00 39.62 0.0000 0.0900 0.0000 0.0000 0 0
+ 31 0 "BOND,MADRID-" 1.0551 0.00 0.00 0.00 0.00 0.00 2.18 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+ 32 0 "BREST-------" 1.0358 0.00 0.00 0.00 0.00 0.00 5.04 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+ 33 0 "BREWER------" 1.0045 0.00 0.00 0.00 0.00 0.00 2.94 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+ 34 0 "BRIGHTON----" 1.0076 0.00 0.00 0.00 0.00 0.00 5.96 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+ 35 0 "BROWN-CITY--" 0.9725 0.00 0.00 0.00 0.00 0.00 3.28 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+ 36 0 "BROWNSTOWN40" 1.0348 0.00 0.00 0.00 0.00 0.00 36.46 24.76 0.0000 0.0000 0.0000 0.0000 0 0
+ 37 0 "BRAY--------" 0.9770 0.00 0.00 0.00 0.00 0.00 1.51 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+ 38 0 "BRUCE---EQ1-" 1.0034 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+ 39 0 "BUNCE-CRK-40" 1.0333 0.00 0.00 0.00 0.00 0.00 7.73 4.25 0.0000 0.0000 0.0000 0.0000 0 0
+ 40 2 "BUNCE-CRK-24" 1.0607 0.00 84.00 480.00 0.00 480.00 37.72 22.10 0.0000 0.0000 0.0000 0.0000 0 0
+ 41 0 "CALUMET-----" 0.9844 0.00 0.00 0.00 0.00 0.00 3.11 1.91 0.0000 0.0000 0.0000 0.0000 0 0
+ 42 0 "CAMDEN-2,5--" 1.0033 0.00 0.00 0.00 0.00 0.00 9.41 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+ 43 0 "CAMPUS-1----" 1.0279 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+ 44 0 "CAMPUS-2----" 1.0216 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+ 45 0 "CAPAC-------" 0.9880 0.00 0.00 0.00 0.00 0.00 3.11 1.38 0.0000 0.0660 0.0000 0.0000 0 0
+ 51 0 "CARLETON----" 1.0054 0.00 0.00 0.00 0.00 0.00 1.76 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+ 52 0 "CARO-1------" 1.0018 0.00 0.00 0.00 0.00 0.00 1.68 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+ 53 0 "CARO-T.E.C.-" 0.9962 0.00 0.00 0.00 0.00 0.00 1.76 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+ 54 0 "CARPENTER---" 1.0007 0.00 0.00 0.00 0.00 0.00 8.15 3.29 0.0000 0.1140 0.0000 0.0000 0 0
+ 55 0 "CARSONVILLE-" 0.9885 0.00 0.00 0.00 0.00 0.00 0.67 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+ 56 0 "CARTER------" 1.0069 0.00 0.00 0.00 0.00 0.00 15.04 7.54 0.0000 0.0000 0.0000 0.0000 0 0
+ 57 0 "CASEVILLE---" 0.9683 0.00 0.00 0.00 0.00 0.00 3.02 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+ 58 0 "CASEY-------" 1.0231 0.00 0.00 0.00 0.00 0.00 2.18 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+ 59 0 "CASS-CITY---" 1.0011 0.00 0.00 0.00 0.00 0.00 5.04 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+ 60 0 "CHERRY-HILL-" 0.9566 0.00 0.00 0.00 0.00 0.00 0.92 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+ 61 0 "CHESTERFLD-1" 1.0264 0.00 0.00 0.00 0.00 0.00 3.95 0.53 0.0000 0.0480 0.0000 0.0000 0 0
+ 62 0 "CHESTERFLD-2" 1.0088 0.00 0.00 0.00 0.00 0.00 8.48 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+ 63 0 "CHESTNUT-40-" 1.0150 0.00 0.00 0.00 0.00 0.00 75.20 29.50 0.0000 0.3600 0.0000 0.0000 0 0
+ 64 0 "CHILSON-----" 1.0175 0.00 0.00 0.00 0.00 0.00 1.51 0.85 0.0000 0.0660 0.0000 0.0000 0 0
+ 65 0 "CLARKSTON-2-" 1.0013 0.00 0.00 0.00 0.00 0.00 4.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+ 66 0 "CLIFFORD----" 0.9881 0.00 0.00 0.00 0.00 0.00 1.34 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+ 67 0 "COATS-------" 1.0093 0.00 0.00 0.00 0.00 0.00 3.36 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+ 68 0 "CODY-40-----" 1.0456 0.00 0.00 0.00 0.00 0.00 19.99 6.27 0.0000 0.1800 0.0000 0.0000 0 0
+ 69 0 "COLFAX---EQ1" 1.0885 0.00 14.00 40.00 0.00 0.00 4.87 2.55 0.0000 0.0480 0.0000 0.0000 0 0
+ 70 0 "COLLIER----1" 1.0327 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+ 71 0 "CLOTH-PR.-1-" 1.0059 0.00 0.00 0.00 0.00 0.00 3.00 -0.37 0.0000 0.0000 0.0000 0.0000 0 0
+ 76 0 "COLUMBIAVILE" 0.9871 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 77 0 "COMMERCE-LK-" 0.9872 0.00 0.00 0.00 0.00 0.00 6.05 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+ 78 0 "CORTLAND-24-" 1.0112 0.00 0.00 0.00 0.00 0.00 204.10 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 79 0 "CROSWELL-EQ1" 0.9883 0.00 0.00 0.00 0.00 0.00 5.96 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+ 80 0 "CROWN-1-----" 1.0243 0.00 0.00 0.00 0.00 0.00 10.16 0.32 0.0000 0.0900 0.0000 0.0000 0 0
+ 81 0 "CROWN-2-----" 0.9891 0.00 0.00 0.00 0.00 0.00 4.54 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+ 82 0 "CULVER------" 0.9954 0.00 0.00 0.00 0.00 0.00 8.57 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+ 83 0 "CUSTER-24---" 1.0216 0.00 14.00 40.00 0.00 0.00 61.40 33.15 0.0000 0.0000 0.0000 0.0000 0 0
+ 84 0 "DADE-1------" 1.0165 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+ 85 0 "DADE-2------" 1.0158 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+ 86 0 "DARWIN-1----" 1.0440 0.00 0.00 0.00 0.00 0.00 4.87 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+ 87 0 "DARWIN-2----" 1.0408 0.00 0.00 0.00 0.00 0.00 4.79 1.27 0.0000 0.0480 0.0000 0.0000 0 0
+ 88 0 "DAVIS---EQ1-" 0.9767 0.00 0.00 0.00 0.00 0.00 20.30 10.25 0.0000 0.0900 0.0000 0.0000 0 0
+ 89 0 "DAYTON-40---" 1.0256 0.00 5.00 10.00 0.00 0.00 5.71 2.97 0.0000 0.0660 0.0000 0.0000 0 0
+ 90 0 "DECKR-+-ASPN" 0.9878 0.00 0.00 0.00 0.00 0.00 2.52 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+ 91 0 "DEWEY-2-----" 0.9865 0.00 0.00 0.00 0.00 0.00 11.34 3.82 0.0000 0.0000 0.0000 0.0000 0 0
+ 92 0 "DEXTER---EQ1" 1.0348 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0480 0.0000 0.0000 0 0
+ 93 0 "DILLARD-1---" 0.9963 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+ 94 0 "DOVER-1-----" 1.0030 0.00 0.00 0.00 0.00 0.00 3.78 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+ 95 0 "DOVER-2-----" 0.9997 0.00 0.00 0.00 0.00 0.00 3.19 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+ 101 0 "DREXEL-2----" 0.9883 0.00 0.00 0.00 0.00 0.00 9.24 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+ 102 0 "DRYDEN------" 0.9797 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+ 104 0 "ECKLES-2----" 0.9704 0.00 0.00 0.00 0.00 0.00 4.62 -0.74 0.0000 0.0000 0.0000 0.0000 0 0
+ 105 0 "EDGEWATER---" 0.9989 0.00 0.00 0.00 0.00 0.00 1.30 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 106 0 "ELKTON------" 0.9804 0.00 0.00 0.00 0.00 0.00 3.36 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+ 107 0 "ELM-40------" 1.0242 0.00 0.00 0.00 0.00 0.00 107.77 79.00 0.0000 0.2850 0.0000 0.0000 0 0
+ 108 0 "EMERICK-1---" 1.0099 0.00 0.00 0.00 0.00 0.00 8.82 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+ 109 0 "EMMETT------" 0.9925 0.00 0.00 0.00 0.00 0.00 1.01 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+ 110 0 "ENGLISH-----" 1.0024 0.00 0.00 0.00 0.00 0.00 1.68 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+ 111 0 "ERIN40------" 1.0115 0.00 0.00 0.00 0.00 0.00 103.40 41.50 0.0000 0.1800 0.0000 0.0000 0 0
+ 112 0 "EVERGREEN-40" 1.0364 0.00 0.00 0.00 0.00 0.00 213.20 82.90 0.0000 0.5100 0.0000 0.0000 0 0
+ 113 0 "FAIRGROVE---" 1.0040 0.00 0.00 0.00 0.00 0.00 2.02 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+ 114 0 "FALCON-1----" 1.0232 0.00 0.00 0.00 0.00 0.00 9.32 6.12 0.0000 0.0000 0.0000 0.0000 0 0
+ 115 0 "FALCON-2----" 1.0207 0.00 0.00 0.00 0.00 0.00 7.56 4.99 0.0000 0.0000 0.0000 0.0000 0 0
+ 116 0 "FISHER------" 1.0370 0.00 0.00 0.00 0.00 0.00 5.96 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+ 117 0 "FLAT-ROCK-1-" 1.0195 0.00 0.00 0.00 0.00 0.00 1.68 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+ 119 0 "FLEMING-----" 1.0067 0.00 0.00 0.00 0.00 0.00 4.54 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+ 120 0 "FORESTER----" 0.9770 0.00 0.00 0.00 0.00 0.00 0.76 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+ 127 0 "FRANK2---EQ1" 0.9722 0.00 0.00 0.00 0.00 0.00 6.10 1.50 0.0000 0.0000 0.0000 0.0000 0 0
+ 128 0 "FREEDOM-----" 0.9954 0.00 0.00 0.00 0.00 0.00 1.10 0.12 0.0000 0.0000 0.0000 0.0000 0 0
+ 129 0 "FRENCHLND-2-" 1.0263 0.00 0.00 0.00 0.00 0.00 5.70 4.37 0.0000 0.1200 0.0000 0.0000 0 0
+ 130 0 "FRISBIE-24--" 1.0881 0.00 0.00 0.00 0.00 0.00 222.68 75.01 0.0000 0.0000 0.0000 0.0000 0 0
+ 131 0 "FULLER-1----" 1.0203 0.00 0.00 0.00 0.00 0.00 2.52 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+ 132 0 "FULLER-2----" 1.0257 0.00 0.00 0.00 0.00 0.00 2.44 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+ 133 0 "GAGETOWN----" 1.0203 0.00 0.00 0.00 0.00 0.00 1.18 0.42 0.0000 0.0480 0.0000 0.0000 0 0
+ 134 0 "1GARNER-CP--" 1.0195 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 135 0 "GENOA-40----" 1.0191 0.00 0.00 0.00 0.00 0.00 12.94 6.37 0.0000 0.1800 0.0000 0.0000 0 0
+ 136 0 "GLOBE-------" 0.9892 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+ 137 0 "GOODISON----" 0.9861 0.00 0.00 0.00 0.00 0.00 7.56 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+ 138 0 "GRAF--------" 0.9961 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+ 139 0 "HAMBURG-----" 1.0440 0.00 0.00 0.00 0.00 0.00 2.44 0.64 0.0000 0.0660 0.0000 0.0000 0 0
+ 140 0 "HANCOCK-40--" 1.0036 0.00 100.81 190.00 0.00 0.00 29.57 15.62 0.0000 0.0000 0.0000 0.0000 0 0
+ 141 0 "HANNAN-1---1" 1.0048 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+ 142 0 "HARTLAND----" 0.9948 0.00 0.00 0.00 0.00 0.00 2.18 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+ 143 0 "HEMLOCK-1---" 1.0293 0.00 0.00 0.00 0.00 0.00 6.00 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+ 144 0 "HEMLOCK-2---" 1.0364 0.00 0.00 0.00 0.00 0.00 6.97 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+ 145 2 "HINES-40----" 0.9900 0.00 0.00 120.00 0.00 18.00 115.58 95.12 0.0000 0.3600 0.0000 0.0000 0 0
+ 151 0 "HOBART-TAP--" 1.0363 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 152 0 "HOBART------" 1.0414 0.00 0.00 0.00 0.00 0.00 4.03 1.59 0.0000 0.0900 0.0000 0.0000 0 0
+ 153 0 "HOWELL-2----" 1.0160 0.00 0.00 0.00 0.00 0.00 3.95 1.81 0.0000 0.0660 0.0000 0.0000 0 0
+ 154 0 "HUNTERS-CR40" 1.0031 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 155 0 "IDA---------" 1.0107 0.00 0.00 0.00 0.00 0.00 1.90 -0.12 0.0000 0.0000 0.0000 0.0000 0 0
+ 156 0 "IMLAY-CITY--" 0.9775 0.00 0.00 0.00 0.00 0.00 4.70 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+ 157 0 "INLAND---EQ1" 1.0137 0.00 0.00 0.00 0.00 0.00 5.80 3.51 0.0000 0.0000 0.0000 0.0000 0 0
+ 158 0 "IRA---------" 1.0238 0.00 0.00 0.00 0.00 0.00 2.10 0.85 0.0000 0.0480 0.0000 0.0000 0 0
+ 159 0 "IRONTON-24--" 1.0193 0.00 0.00 0.00 0.00 0.00 177.80 67.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 160 0 "IRVING------" 0.9945 0.00 0.00 0.00 0.00 0.00 5.88 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 162 0 "JACKSON-RD.2" 1.0346 0.00 0.00 0.00 0.00 0.00 1.01 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+ 163 0 "JASPER------" 1.0041 0.00 0.00 0.00 0.00 0.00 0.34 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+ 164 0 "JORDAN-1----" 0.9922 0.00 0.00 0.00 0.00 0.00 1.85 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+ 166 0 "JOPLIN------" 0.9903 0.00 0.00 0.00 0.00 0.00 0.76 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+ 168 0 "KEEGO-2-----" 0.9789 0.00 0.00 0.00 0.00 0.00 1.10 0.37 0.0000 0.0000 0.0000 0.0000 0 0
+ 169 0 "KELLOGG-----" 0.9988 0.00 0.00 0.00 0.00 0.00 3.78 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+ 170 0 "1KENNETT-CP-" 1.0198 0.00 0.00 0.00 0.00 0.00 17.90 8.37 0.0000 0.0000 0.0000 0.0000 0 0
+ 176 0 "KIMBALL-----" 1.0128 0.00 0.00 0.00 0.00 0.00 3.36 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+ 177 0 "KINDE-------" 0.9840 0.00 0.00 0.00 0.00 0.00 1.01 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+ 178 0 "KING-SEELEY-" 1.0463 0.00 0.00 0.00 0.00 0.00 2.69 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+ 179 0 "LAKEPORT----" 1.0008 0.00 0.00 0.00 0.00 0.00 1.85 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+ 180 0 "LAKEVILLE---" 0.9976 0.00 0.00 0.00 0.00 0.00 1.09 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+ 181 0 "LAPEER------" 0.9933 0.00 0.00 0.00 0.00 0.00 3.78 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 182 0 "LARK-40-----" 1.0476 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 183 0 "LEE-40------" 1.0183 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+ 184 0 "LIMA--------" 1.0187 0.00 0.00 0.00 0.00 0.00 2.18 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+ 185 0 "LINCOLN-24--" 0.9866 0.00 0.00 0.00 0.00 0.00 148.43 124.57 0.0000 0.5700 0.0000 0.0000 0 0
+ 186 0 "LUZON-40----" 1.0040 0.00 0.00 0.00 0.00 0.00 21.67 12.01 0.0000 0.0900 0.0000 0.0000 0 0
+ 187 0 "MACOMB-40---" 1.0194 0.00 0.00 0.00 0.00 0.00 132.00 96.50 0.0000 0.3600 0.0000 0.0000 0 0
+ 188 0 "MARINE-CITY-" 1.0387 0.00 0.00 0.00 0.00 0.00 5.21 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+ 189 0 "MARLETTE----" 0.9794 0.00 0.00 0.00 0.00 0.00 5.29 1.70 0.0000 0.0480 0.0000 0.0000 0 0
+ 190 0 "MAYBEE------" 1.0091 0.00 0.00 0.00 0.00 0.00 1.26 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+ 191 0 "MAYVILLE----" 1.0032 0.00 0.00 0.00 0.00 0.00 2.02 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+ 192 0 "MEADOW---EQ1" 0.9943 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+ 193 0 "MEDINA-40---" 1.0197 0.00 0.00 0.00 0.00 0.00 45.80 21.50 0.0000 0.1800 0.0000 0.0000 0 0
+ 194 0 "MELVIN------" 0.9800 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+ 195 0 "METAMORA----" 0.9954 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 201 0 "MILFORD-----" 1.0033 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+ 202 0 "MILLINGTON--" 0.9808 0.00 0.00 0.00 0.00 0.00 2.35 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+ 204 0 "MOHAWK-2----" 0.9967 0.00 0.00 0.00 0.00 0.00 2.10 0.25 0.0000 0.0000 0.0000 0.0000 0 0
+ 205 0 "MONARCH-----" 1.0040 0.00 0.00 0.00 0.00 0.00 2.30 1.50 0.0000 0.0960 0.0000 0.0000 0 0
+ 206 0 "1MONTCALM-CP" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 207 0 "MOTT-2------" 1.0159 0.00 0.00 0.00 0.00 0.00 7.39 3.82 0.0000 0.0900 0.0000 0.0000 0 0
+ 208 0 "NATIONAL-1--" 0.9928 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+ 209 0 "NATIONAL-2--" 0.9997 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+ 210 0 "NAVARRE-24--" 1.0384 0.00 0.00 0.00 0.00 0.00 190.43 107.21 0.0000 0.8700 0.0000 0.0000 0 0
+ 211 0 "NEFF--------" 1.0012 0.00 0.00 0.00 0.00 0.00 5.71 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+ 212 0 "NELSON-MILS1" 1.0263 0.00 0.00 0.00 0.00 0.00 2.94 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+ 213 0 "NELSON-MILS2" 1.0270 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+ 214 0 "NEW-BALTMR-1" 1.0231 0.00 0.00 0.00 0.00 0.00 2.10 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+ 215 0 "NEW-BALTMR23" 1.0237 0.00 0.00 0.00 0.00 0.00 4.28 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+ 216 0 "NEW-BOSTON--" 1.0111 0.00 0.00 0.00 0.00 0.00 1.93 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+ 217 0 "NEWBURGH-40-" 0.9673 0.00 0.00 0.00 0.00 0.00 147.42 102.95 0.0000 0.3000 0.0000 0.0000 0 0
+ 218 0 "NEW-HAVEN-1-" 1.0179 0.00 0.00 0.00 0.00 0.00 3.44 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+ 219 0 "NEW-HAVEN-2-" 1.0220 0.00 0.00 0.00 0.00 0.00 2.69 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+ 220 0 "NIXON-2-----" 0.9768 0.00 0.00 0.00 0.00 0.00 11.09 5.52 0.0000 0.0000 0.0000 0.0000 0 0
+ 226 0 "NOBLE-------" 0.9863 0.00 0.00 0.00 0.00 0.00 16.97 9.14 0.0000 0.0000 0.0000 0.0000 0 0
+ 227 0 "NORTH-BRANCH" 0.9717 0.00 0.00 0.00 0.00 0.00 4.45 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 228 2 "NORTHEAST-24" 1.0104 0.00 80.00 0.00 0.00 48.00 230.24 141.20 0.0000 0.4800 0.0000 0.0000 0 0
+ 229 0 "NORTH-SRVCTR" 1.0050 0.00 0.00 0.00 0.00 0.00 5.80 4.36 0.0000 0.0000 0.0000 0.0000 0 0
+ 230 2 "NORTHWEST-40" 1.0044 0.00 0.00 0.00 0.00 18.00 209.70 76.40 0.0000 0.5480 0.0000 0.0000 0 0
+ 231 0 "NORWAY-1----" 0.9516 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+ 232 0 "NORWAY-2-EQ1" 0.9477 0.00 0.00 0.00 0.00 0.00 5.96 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+ 233 0 "OAK-BEACH---" 0.9701 0.00 0.00 0.00 0.00 0.00 0.84 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+ 234 0 "OLIVER------" 0.9870 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 235 0 "OLYMPA-FUT75" 0.9825 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 236 0 "OMAHA-1--EQ1" 0.9473 0.00 0.00 0.00 0.00 0.00 10.08 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+ 237 0 "OMAHA-2--EQ1" 0.9465 0.00 0.00 0.00 0.00 0.00 9.58 3.61 0.0000 0.0000 0.0000 0.0000 0 0
+ 238 0 "OPAL--------" 1.0050 0.00 0.00 0.00 0.00 0.00 0.92 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+ 239 0 "OREGON-1----" 0.9965 0.00 0.00 0.00 0.00 0.00 6.38 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+ 240 0 "ORION-------" 0.9925 0.00 0.00 0.00 0.00 0.00 5.46 2.02 0.0000 0.0660 0.0000 0.0000 0 0
+ 241 0 "OTTER-LAKE--" 0.9836 0.00 0.00 0.00 0.00 0.00 1.01 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+ 242 0 "OWENDALE----" 1.0049 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+ 243 0 "OXFORD------" 0.9965 0.00 0.00 0.00 0.00 0.00 6.89 3.72 0.0000 0.1200 0.0000 0.0000 0 0
+ 244 0 "1PADDOCK-CP-" 1.0220 0.00 0.00 0.00 0.00 0.00 4.30 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+ 245 0 "PAGE--------" 0.9930 0.00 0.00 0.00 0.00 0.00 9.58 5.63 0.0000 0.0660 0.0000 0.0000 0 0
+ 251 0 "PALMER-1----" 0.9643 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+ 252 0 "PARKER-ROAD-" 0.9995 0.00 0.00 0.00 0.00 0.00 6.64 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+ 253 0 "PAUL-1------" 1.0114 0.00 0.00 0.00 0.00 0.00 8.15 4.89 0.0000 0.0480 0.0000 0.0000 0 0
+ 254 0 "PAUL-2,3----" 1.0157 0.00 0.00 0.00 0.00 0.00 4.70 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+ 255 0 "PHOENIX-40--" 1.0379 0.00 0.00 0.00 0.00 0.00 36.71 20.82 0.0000 0.0000 0.0000 0.0000 0 0
+ 256 0 "PIEDMONT----" 1.0235 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 257 0 "PIGEON------" 0.9818 0.00 0.00 0.00 0.00 0.00 3.78 4.78 0.0000 0.0480 0.0000 0.0000 0 0
+ 258 0 "PINCKNEY----" 1.0442 0.00 0.00 0.00 0.00 0.00 3.86 1.70 0.0000 0.0900 0.0000 0.0000 0 0
+ 259 0 "PIONEER---40" 1.0270 0.00 0.00 0.00 0.00 0.00 19.10 10.12 0.0000 0.0000 0.0000 0.0000 0 0
+ 260 0 "PIPER---EQ1-" 1.0008 0.00 0.00 0.00 0.00 0.00 5.12 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+ 261 0 "PITSFLD--EQ1" 1.0164 0.00 0.00 0.00 0.00 0.00 9.66 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+ 262 0 "PLACID------" 1.0026 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 263 0 "PLYMOUTH----" 0.9523 0.00 0.00 0.00 0.00 0.00 12.10 7.44 0.0000 0.1560 0.0000 0.0000 0 0
+ 264 0 "PORT-AUSTIN-" 0.9754 0.00 0.00 0.00 0.00 0.00 3.02 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+ 265 0 "PORT-HOPE---" 0.9895 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+ 266 0 "PORT-SANILAC" 0.9808 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+ 267 0 "PRICE-1-----" 1.0353 0.00 0.00 0.00 0.00 0.00 4.37 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+ 268 0 "PROCTOR-----" 0.9955 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 269 0 "PUTNAM------" 1.0098 0.00 14.00 40.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 270 0 "QUEEN-------" 1.0065 0.00 0.00 0.00 0.00 0.00 3.53 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+ 276 0 "QUINCY------" 1.0030 0.00 0.00 0.00 0.00 0.00 1.34 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+ 277 0 "RANDOLPH----" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 278 0 "RAVINE---EQ1" 0.9764 0.00 0.00 0.00 0.00 0.00 8.90 3.62 0.0000 0.0000 0.0000 0.0000 0 0
+ 279 0 "RED-RUN-40--" 1.0203 0.00 0.00 0.00 0.00 0.00 140.87 71.29 0.0000 0.5400 0.0000 0.0000 0 0
+ 280 0 "REESE---EQ2-" 0.9799 0.00 0.00 0.00 0.00 0.00 5.96 2.23 0.0000 0.0480 0.0000 0.0000 0 0
+ 281 0 "REMER-40----" 1.0461 0.00 0.00 0.00 0.00 0.00 1.34 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 282 0 "RENO--------" 0.9937 0.00 0.00 0.00 0.00 0.00 4.80 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 283 0 "RICHMOND----" 1.0130 0.00 0.00 0.00 0.00 0.00 5.63 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+ 284 0 "RIFLE-------" 0.9886 0.00 0.00 0.00 0.00 0.00 6.13 2.97 0.0000 0.0480 0.0000 0.0000 0 0
+ 285 0 "RIVER-RAISIN" 1.0072 0.00 0.00 0.00 0.00 0.00 0.92 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+ 286 2 "RIVERVIEW-40" 1.0021 0.00 25.00 -100.00 -10.00 20.00 145.57 79.69 0.0000 0.3600 0.0000 0.0000 0 0
+ 287 0 "ROCHESTER-1-" 0.9995 0.00 0.00 0.00 0.00 0.00 6.55 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+ 288 0 "ROCKWOOD----" 1.0345 0.00 0.00 0.00 0.00 0.00 5.80 1.59 0.0000 0.0340 0.0000 0.0000 0 0
+ 289 0 "ROMEO---EQ1-" 1.0133 0.00 0.00 0.00 0.00 0.00 6.13 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+ 290 0 "ROMULUS---40" 1.0151 0.00 0.00 0.00 0.00 0.00 20.66 13.07 0.0000 0.1680 0.0000 0.0000 0 0
+ 291 0 "RUSH-TAP----" 0.9835 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 292 0 "RUSH-40-----" 1.0014 0.00 0.00 0.00 0.00 0.00 3.70 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+ 293 0 "SALEM-------" 1.0417 0.00 0.00 0.00 0.00 0.00 1.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+ 294 0 "SALINE------" 1.0017 0.00 0.00 0.00 0.00 0.00 9.10 4.87 0.0000 0.0960 0.0000 0.0000 0 0
+ 295 0 "SANDUSKY-40-" 1.0042 0.00 0.00 0.00 0.00 0.00 5.29 1.91 0.0000 0.0660 0.0000 0.0000 0 0
+ 301 0 "SAXON-------" 0.9916 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+ 302 0 "SEBEWAING---" 1.0083 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+ 303 0 "SELFRIDGE-1-" 1.0074 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+ 304 0 "SELKIRK-----" 1.0092 0.00 0.00 0.00 0.00 0.00 6.05 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+ 305 0 "SHAW--------" 0.9720 0.00 0.00 0.00 0.00 0.00 1.60 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+ 306 0 "SHELDON-1---" 0.9578 0.00 0.00 0.00 0.00 0.00 5.29 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+ 307 0 "SHERWOOD----" 1.0148 0.00 0.00 0.00 0.00 0.00 1.93 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+ 309 0 "SNOVER------" 0.9929 0.00 0.00 0.00 0.00 0.00 1.60 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+ 310 0 "SOUTHFLD-40-" 1.0066 0.00 0.00 0.00 0.00 0.00 99.54 81.89 0.0000 0.0900 0.0000 0.0000 0 0
+ 311 0 "STATE-1-----" 1.0247 0.00 0.00 0.00 0.00 0.00 5.60 3.25 0.0000 0.0000 0.0000 0.0000 0 0
+ 312 0 "SPOKANE-40--" 1.0014 0.00 0.00 0.00 0.00 0.00 36.54 16.57 0.0000 0.0000 0.0000 0.0000 0 0
+ 313 0 "ST-CLAIR-1--" 1.0259 0.00 0.00 0.00 0.00 0.00 2.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+ 314 0 "ST-CLAIR-2--" 1.0352 0.00 0.00 0.00 0.00 0.00 2.69 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+ 315 0 "STEPHENS-24-" 1.0074 0.00 0.00 0.00 0.00 0.00 164.30 105.69 0.0000 0.5700 0.0000 0.0000 0 0
+ 316 0 "STERLING-40-" 1.0210 0.00 0.00 0.00 0.00 0.00 101.14 45.79 0.0000 0.5400 0.0000 0.0000 0 0
+ 317 0 "STOCKBRIDGE-" 1.0701 0.00 0.00 0.00 0.00 0.00 1.09 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+ 318 0 "1STOCKWELLCP" 1.0172 0.00 0.00 0.00 0.00 0.00 10.90 6.75 0.0000 0.0000 0.0000 0.0000 0 0
+ 319 0 "SUNSET-40---" 1.0041 0.00 0.00 0.00 0.00 0.00 78.79 59.01 0.0000 0.5160 0.0000 0.0000 0 0
+ 320 2 "SUPERIOR-40-" 1.0189 0.00 0.00 0.00 0.00 118.00 61.49 48.74 0.0000 0.1800 0.0000 0.0000 0 0
+ 325 0 "TIENKEN-2---" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 326 0 "TALBOT---EQ1" 0.9854 0.00 0.00 0.00 0.00 0.00 2.35 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+ 327 0 "1TAYLOR-1-13" 1.0121 0.00 0.00 0.00 0.00 0.00 10.67 6.27 0.0000 0.0000 0.0000 0.0000 0 0
+ 328 0 "1TAYLOR-2-13" 1.0154 0.00 0.00 0.00 0.00 0.00 8.65 6.48 0.0000 0.0000 0.0000 0.0000 0 0
+ 329 0 "TEGGERDINE--" 0.9815 0.00 0.00 0.00 0.00 0.00 11.34 4.67 0.0000 0.0000 0.0000 0.0000 0 0
+ 330 0 "TEMPLE------" 1.0321 0.00 0.00 0.00 0.00 0.00 0.59 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+ 331 0 "TEXAS-------" 1.0281 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+ 332 0 "TODD--------" 1.0426 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+ 333 0 "TRINITY-2---" 1.0107 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+ 334 0 "TROY-40-----" 0.9963 0.00 0.00 0.00 0.00 0.00 178.92 77.64 0.0000 0.5400 0.0000 0.0000 0 0
+ 335 0 "TUSCOLA-40--" 1.0020 0.00 0.00 0.00 0.00 0.00 6.22 2.55 0.0000 0.0660 0.0000 0.0000 0 0
+ 336 0 "UNION-LAKE--" 0.9771 0.00 0.00 0.00 0.00 0.00 11.84 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+ 337 0 "UNIONVILLE--" 1.0120 0.00 0.00 0.00 0.00 0.00 1.26 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+ 338 0 "UNIVR-BUS1T6" 1.0250 0.00 0.00 0.00 0.00 0.00 11.17 8.71 0.0000 0.0000 0.0000 0.0000 0 0
+ 339 0 "URBAN-TEC---" 0.9887 0.00 0.00 0.00 0.00 0.00 5.12 3.19 0.0000 0.0000 0.0000 0.0000 0 0
+ 340 0 "UTAH--------" 1.0415 0.00 0.00 0.00 0.00 0.00 0.76 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+ 341 0 "VANBUREN-EQ1" 1.0128 0.00 0.00 0.00 0.00 0.00 1.51 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+ 342 0 "VASSAR-BIRCH" 0.9744 0.00 0.00 0.00 0.00 0.00 10.00 5.74 0.0000 0.0660 0.0000 0.0000 0 0
+ 343 0 "VICTOR-40---" 1.0234 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 344 0 "VALLEY------" 1.0268 0.00 6.00 20.00 0.00 0.00 0.90 0.62 0.0000 0.0000 0.0000 0.0000 0 0
+ 345 0 "WABASH-40---" 1.0066 0.00 0.00 0.00 0.00 0.00 46.70 26.25 0.0000 0.0000 0.0000 0.0000 0 0
+ 346 0 "WALLED-LAKE-" 0.9972 0.00 0.00 0.00 0.00 0.00 6.00 2.62 0.0000 0.0000 0.0000 0.0000 0 0
+ 351 0 "WALNUT-1,2--" 0.9814 0.00 0.00 0.00 0.00 0.00 9.60 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+ 352 0 "WALTON40-SUB" 1.0330 0.00 0.00 0.00 0.00 0.00 44.35 20.08 0.0000 0.1800 0.0000 0.0000 0 0
+ 353 0 "WARDLOW-----" 0.9956 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+ 354 2 "WARREN-24---" 1.0171 0.00 0.00 540.00 0.00 54.00 268.46 194.97 0.0000 0.9000 0.0000 0.0000 0 0
+ 355 0 "WASHNGTN-EQ1" 1.0002 0.00 0.00 0.00 0.00 0.00 8.57 4.36 0.0000 0.0660 0.0000 0.0000 0 0
+ 356 0 "WATERFORD---" 0.9903 0.00 0.00 0.00 0.00 0.00 17.81 5.52 0.0000 0.1800 0.0000 0.0000 0 0
+ 358 0 "WEBERVLE-EQ1" 1.0885 0.00 0.00 0.00 0.00 0.00 8.23 1.91 0.0000 0.1140 0.0000 0.0000 0 0
+ 359 0 "WHITE-LAKE--" 0.9941 0.00 0.00 0.00 0.00 0.00 4.70 1.59 0.0000 0.0000 0.0000 0.0000 0 0
+ 360 0 "WHITMORE-LK-" 1.0357 0.00 0.00 0.00 0.00 0.00 7.81 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+ 361 0 "WHITNY-FUT73" 1.0033 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 362 0 "WILEY-------" 1.0197 0.00 0.00 0.00 0.00 0.00 1.26 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+ 363 0 "WILMOTK-NGFD" 0.9922 0.00 0.00 0.00 0.00 0.00 0.84 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+ 364 0 "WILSON------" 1.0128 0.00 0.00 0.00 0.00 0.00 2.60 -0.21 0.0000 0.0000 0.0000 0.0000 0 0
+ 365 0 "1WILSON-CP--" 1.0157 0.00 0.00 0.00 0.00 0.00 8.60 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+ 366 0 "WOLFHILL----" 0.9897 0.00 0.00 0.00 0.00 0.00 4.96 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+ 367 0 "WOLVERINE-2-" 1.0200 0.00 0.00 0.00 0.00 0.00 5.12 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+ 368 0 "WORTH-------" 1.0069 0.00 0.00 0.00 0.00 0.00 2.18 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+ 369 0 "YALE-TAP----" 0.9902 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 370 0 "YALE--------" 0.9870 0.00 0.00 0.00 0.00 0.00 3.11 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+ 371 0 "YATES-------" 0.9871 0.00 0.00 0.00 0.00 0.00 1.34 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+ 372 0 "YORK--------" 0.9901 0.00 0.00 0.00 0.00 0.00 2.44 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+ 373 0 "YOST-40-----" 1.0354 0.00 0.00 0.00 0.00 0.00 48.55 26.29 0.0000 0.0480 0.0000 0.0000 0 0
+ 390 0 "2ADAMS-----1" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 391 0 "2ALFRED----1" 1.0468 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+ 392 0 "ALFRED-13---" 1.0489 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+ 394 0 "2AMHERST1.13" 1.0230 0.00 0.00 0.00 0.00 0.00 7.56 4.72 0.0000 0.0000 0.0000 0.0000 0 0
+ 395 0 "2AMHERST2.13" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 396 0 "2ARROWHEAD-1" 1.0315 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 397 0 "2BAD-AXE---1" 1.0460 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 398 0 "2BLOOMFLD--1" 1.0065 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 400 0 "2BROWNTN---3" 1.0081 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 401 0 "2BROWNTN---2" 1.0314 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 403 2 "2BROWNTN-N-1" 1.0263 0.00 0.00 -910.00 -91.00 338.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 404 0 "2BROWNTN-S-1" 1.0117 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 406 0 "2BUNCE-CK--1" 1.1567 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 407 0 "2B3N-DECO230" 1.0877 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 409 0 "2-BURNS-1--1" 1.0578 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 410 0 "2-BURNS-2--1" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 412 0 "2CANIFF----3" 1.0261 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 413 0 "2CANIFF----1" 1.0433 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 415 0 "2CATALINA-CP" 1.0064 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 416 0 "2CATO------1" 1.0403 0.00 0.00 0.00 0.00 0.00 57.14 27.68 0.0000 0.0000 0.0000 0.0000 0 0
+ 418 0 "2CHESTNUT--1" 1.0164 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 419 0 "2CODY------1" 0.9887 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 421 2 "2CONNER-G.24" 1.0404 0.00 285.00 1770.00 0.00 1770.00 436.28 182.01 0.0000 0.0000 0.0000 0.0000 0 0
+ 422 0 "2COOPER----1" 1.0059 0.00 0.00 0.00 0.00 0.00 1.34 2.31 0.0000 0.0000 0.0000 0.0000 0 0
+ 423 0 "2CORTLAND--1" 1.0392 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 424 0 "2COVENTRY--3" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 425 0 "2COVENTRY--1" 0.9810 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 428 0 "2CRESTWOOD-1" 1.0120 0.00 0.00 0.00 0.00 0.00 3.56 1.78 0.0000 0.0000 0.0000 0.0000 0 0
+ 430 0 "2CUSTER----1" 1.0051 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 431 0 "2C-3DECO-138" 0.9752 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 433 0 "2DAYTON----1" 0.9863 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 434 2 "2DELRAY-16-1" 1.0200 0.00 72.00 350.00 0.00 54.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 436 2 "2DELRAY-G.24" 1.0483 0.00 236.00 2320.00 0.00 2320.00 290.94 159.76 0.0000 0.0000 0.0000 0.0000 0 0
+ 437 0 "2ELM-------1" 1.0018 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 439 0 "2E.FERMI---1" 0.9983 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 440 0 "2ERIN------1" 1.0331 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 442 0 "2E-N-S-TAP11" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 443 0 "2E-N-S-TAP21" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 445 2 "2ESSEX-----1" 1.0543 0.00 274.00 0.00 0.00 140.00 0.00 0.00 0.0000 1.0800 0.0000 0.0000 0 0
+ 446 0 "2EVERGREEN-1" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 447 0 "2FLEETWD-1-1" 1.0428 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 448 0 "2FLEETWD-2-1" 1.0456 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 449 0 "2FLEETWD--13" 1.0161 0.00 0.00 0.00 0.00 0.00 12.02 5.78 0.0000 0.0000 0.0000 0.0000 0 0
+ 451 0 "2FOMOCO-C1-1" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+ 452 0 "2FOMOCO-C2-1" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+ 454 0 "2FRISBIE---1" 1.0414 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 455 0 "2GENOA-----1" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 457 0 "2HANCOCK---1" 1.0042 0.00 82.00 210.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 458 2 "2HARB.BEA.-1" 1.0597 0.00 114.00 -300.00 -30.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 460 0 "2HINES-----1" 0.9897 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 461 0 "2HUNTER-CK.1" 1.0432 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 463 0 "2IRONTON---1" 1.0310 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 464 0 "2IRN-NA-RV-1" 1.0272 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 466 0 "2IMLAY-1PUP1" 1.0685 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 467 0 "2JEFFERSON-1" 1.0257 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 468 0 "2KTT-DECO138" 1.0748 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 469 0 "2LK.HURON1P1" 1.1530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 470 0 "2LK.HURON2P1" 1.1335 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 472 0 "2LAPEER----1" 1.0390 0.00 0.00 0.00 0.00 0.00 7.83 2.85 0.0000 0.0000 0.0000 0.0000 0 0
+ 473 0 "2LARK------1" 0.9720 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 475 0 "2LEE-------1" 1.1215 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 476 0 "2LINCOLN---1" 1.0100 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 477 0 "2LN-NE-NW--1" 1.0129 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 478 0 "2LOGAN-1---1" 1.0326 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 479 0 "2LOGAN-1-.13" 1.0161 0.00 0.00 0.00 0.00 0.00 8.54 2.49 0.0000 0.0000 0.0000 0.0000 0 0
+ 481 0 "2LOGAN-2---1" 1.0362 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 482 0 "2LOGAN-2-.13" 1.0153 0.00 0.00 0.00 0.00 0.00 8.46 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+ 484 0 "2LONG-LK-1-1" 1.0035 0.00 0.00 0.00 0.00 0.00 7.12 1.69 0.0000 0.0000 0.0000 0.0000 0 0
+ 485 0 "2LONG-LK-2-1" 1.0046 0.00 0.00 0.00 0.00 0.00 6.68 1.25 0.0000 0.0000 0.0000 0.0000 0 0
+ 487 0 "2LUZON-----1" 0.9694 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 488 0 "2LUZON-W.40D" 0.9908 0.00 0.00 0.00 0.00 0.00 16.02 7.83 0.0000 0.0000 0.0000 0.0000 0 0
+ 490 0 "2MACOMB----1" 1.0576 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 491 2 "2MARYSVILLE1" 1.1521 0.00 84.00 0.00 0.00 60.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 493 0 "2MAXWELL-1-1" 1.0236 0.00 0.00 0.00 0.00 0.00 18.16 11.21 0.0000 0.0000 0.0000 0.0000 0 0
+ 494 0 "2MAXWELL-2-1" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 495 0 "2MCLOUTH-1-1" 1.0222 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+ 496 0 "2MCLOUTH-2-1" 1.0221 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+ 497 2 "2MCLOUTH-.24" 1.0350 0.00 0.00 670.00 -30.00 100.00 108.22 48.42 0.0000 0.0000 0.0000 0.0000 0 0
+ 499 0 "2MEDINA----1" 1.0358 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 500 0 "2MIDTOWN---1" 1.0409 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 502 2 "2MONRO-1,2-3" 1.0100 0.00 1290.95 -880.00 -182.00 803.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 503 2 "2MONRO-3,4-3" 1.0105 0.00 470.00 -910.00 -91.00 528.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 505 0 "2MTCALM-CP-1" 1.0065 0.00 0.00 0.00 0.00 0.00 78.59 31.06 0.0000 0.0000 0.0000 0.0000 0 0
+ 508 0 "2NAVARRE---2" 1.0244 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 509 0 "2NAVARRE---1" 1.0256 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 511 0 "2NEWBURGH--1" 0.9920 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 512 0 "2NOBLE-----1" 0.9773 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 513 0 "2NORTHEAST-1" 1.0287 0.00 54.00 140.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 514 0 "2N.E.STUB--1" 1.0437 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 515 2 "2N.E.FLIK.24" 1.0200 0.00 0.00 40.00 0.00 30.00 43.16 15.22 0.0000 0.0000 0.0000 0.0000 0 0
+ 517 0 "2NORTHWEST-1" 0.9962 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 518 0 "2PHOENIX---1" 0.9654 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 520 0 "2PIONEER-TP1" 0.9701 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 521 0 "2PIONEER---1" 0.9633 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 523 0 "2PLACID----1" 0.9882 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 526 0 "2PONTIAC---3" 1.0328 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 527 0 "2PONTIAC---1" 1.0213 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 529 0 "2RED-RUN---1" 1.0352 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+ 530 0 "2REMER-----1" 1.1466 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 532 0 "2R.R.EQZR.-1" 1.0352 0.00 0.00 0.00 0.00 0.00 60.52 37.47 0.0000 0.0000 0.0000 0.0000 0 0
+ 533 2 "2R.ROUGE-1-1" 1.0354 0.00 272.00 1880.00 0.00 188.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 534 2 "2R.ROUGE-2-1" 1.0442 0.00 257.00 1980.00 0.00 198.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 535 2 "2R.ROUGE-3-1" 1.0447 0.00 300.00 0.00 0.00 209.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 538 0 "2RIVERVU---1" 1.0241 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 539 0 "2ROMULUS---1" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 541 0 "2RUSH------1" 1.0284 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 542 0 "2SANDUSKY--1" 1.0989 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 544 0 "2SLOCUM----1" 1.0153 0.00 14.00 40.00 0.00 0.00 57.49 27.86 0.0000 0.0000 0.0000 0.0000 0 0
+ 545 0 "2SOUTHFLD--1" 0.9895 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 547 0 "2SPOKANE---1" 1.0200 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 548 2 "2ST-CLAIR--3" 1.0433 0.00 498.00 0.00 0.00 215.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 549 2 "2ST-CL.1-3-1" 1.1866 0.00 501.00 3220.00 0.00 322.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 550 2 "2ST-CL.4,5-1" 1.1467 0.00 463.00 0.00 0.00 315.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 551 2 "2ST-CL.6---1" 1.1194 0.00 322.00 0.00 0.00 190.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 554 0 "2STC-SP-STL1" 1.0639 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 556 0 "2STEPHENS--3" 1.0262 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 557 0 "2STEPHENS--1" 1.0420 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 559 0 "2STERLING--1" 1.0393 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 560 0 "2SUNSET----1" 0.9976 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 562 0 "2SUPERIOR--1" 0.9791 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 565 0 "2TAYLOR-1--1" 1.0054 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 566 0 "2TAYLOR--2-1" 1.0247 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 568 0 "2TEMPEST--CP" 1.0062 0.00 0.00 0.00 0.00 0.00 11.84 3.92 0.0000 0.0000 0.0000 0.0000 0 0
+ 571 2 "2TRENTN-NA-1" 1.0300 0.00 278.00 2220.00 0.00 225.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 572 2 "2TRENTN-SU-1" 1.0300 0.00 593.00 1450.00 0.00 303.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 574 0 "2TROY------1" 1.0029 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 575 0 "2TUSCOLA---1" 1.0236 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 577 0 "2VICTOR----1" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 578 0 "2WABASH-TAP1" 1.1463 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 579 0 "2WABASH----1" 1.1431 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 581 0 "2WALTON----1" 1.0096 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 583 0 "2WARREN----1" 1.0148 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 584 0 "2WARREN-7--1" 1.0400 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 586 0 "2WATERMAN--2" 1.0227 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 587 0 "2WATERMAN--1" 1.0418 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 588 0 "2WAT.EQZR.24" 1.0311 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 591 0 "2WAYNE-----3" 1.0091 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 592 0 "2WAYNE-----1" 0.9963 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 594 0 "2WHEELER---1" 1.0040 0.00 0.00 0.00 0.00 0.00 24.21 15.04 0.0000 0.0000 0.0000 0.0000 0 0
+ 596 0 "2WILLOW-1T-1" 0.9847 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 597 0 "2WILLOW-2T-1" 0.9880 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 599 0 "2WILLO-RUN-1" 0.9811 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 600 0 "2WILLOW--.13" 0.9992 0.00 0.00 0.00 0.00 0.00 41.83 23.67 0.0000 0.0000 0.0000 0.0000 0 0
+ 602 0 "2WIXOM-----3" 1.0194 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 603 0 "2WIXOM-----1" 1.0035 0.00 0.00 0.00 0.00 0.00 10.86 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+ 605 0 "2WOODHVN-1-1" 1.0278 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 606 0 "2WOODHVN1.13" 1.0229 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+ 607 0 "2WDHVN-TP2-1" 1.0248 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 609 0 "2WOODHVN-2-1" 1.0240 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 610 0 "2WOODHVN2.13" 1.0124 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+ 612 0 "2YOST------1" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+ 617 0 "3ALBA-TIE--1" 1.1233 0.00 0.00 0.00 0.00 0.00 2.50 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 618 0 "3ALCONA-D--1" 1.1170 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 619 0 "3ALGOMA----1" 1.0365 0.00 0.00 0.00 0.00 0.00 14.00 -1.10 0.0000 0.0000 0.0000 0.0000 0 0
+ 620 0 "3ALMA------1" 1.0441 0.00 0.00 0.00 0.00 0.00 21.40 2.10 0.0000 0.1000 0.0000 0.0000 0 0
+ 621 0 "3ALMEDA----1" 1.0459 0.00 0.00 0.00 0.00 0.00 14.10 4.30 0.0000 0.0215 0.0000 0.0000 0 0
+ 622 0 "3ALPENA----1" 1.1632 0.00 0.00 0.00 0.00 0.00 33.10 5.20 0.0000 0.2880 0.0000 0.0000 0 0
+ 623 0 "3AMBER-----1" 1.0260 0.00 0.00 0.00 0.00 0.00 19.00 15.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 624 0 "3ARGENTA---3" 1.0555 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 625 0 "3ARGENTA---1" 1.0537 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 626 0 "3A-1CPCO-120" 1.0327 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 630 0 "3BANGOR----1" 1.0383 0.00 0.00 0.00 0.00 0.00 8.60 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 631 0 "3BARD-RD---1" 1.0831 0.00 0.00 0.00 0.00 0.00 6.30 1.20 0.0000 0.0000 0.0000 0.0000 0 0
+ 632 0 "3BARRY-----1" 1.0416 0.00 0.00 0.00 0.00 0.00 27.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+ 633 0 "3BASS-CRK--1" 1.0389 0.00 0.00 0.00 0.00 0.00 17.80 3.20 0.0000 0.0000 0.0000 0.0000 0 0
+ 634 0 "3BATAVIA---1" 1.0467 0.00 0.00 0.00 0.00 0.00 23.20 0.10 0.0000 0.0800 0.0000 0.0000 0 0
+ 635 0 "3BEALS-RD.-1" 1.0462 0.00 0.00 0.00 0.00 0.00 146.80 48.60 0.0000 0.1500 0.0000 0.0000 0 0
+ 636 0 "3BEECHER---1" 1.0185 0.00 0.00 0.00 0.00 0.00 61.40 30.10 0.0000 0.0800 0.0000 0.0000 0 0
+ 637 0 "3BEGOLE----1" 1.0444 0.00 0.00 0.00 0.00 0.00 19.70 2.50 0.0000 0.1530 0.0000 0.0000 0 0
+ 638 0 "3BEVERIDGE-1" 1.0238 0.00 0.00 0.00 0.00 0.00 50.90 24.30 0.0000 0.1388 0.0000 0.0000 0 0
+ 639 2 "3BIG-ROCK--1" 1.1480 0.00 50.00 -140.00 -14.00 28.00 0.00 0.00 0.0000 0.0116 0.0000 0.0000 0 0
+ 640 0 "3BINGHAM---1" 1.0446 0.00 0.00 0.00 0.00 0.00 17.60 -7.80 0.0000 0.1928 0.0000 0.0000 0 0
+ 641 0 "3BLACK-RIV-1" 1.0462 0.00 0.00 0.00 0.00 0.00 49.90 8.50 0.0000 0.0000 0.0000 0.0000 0 0
+ 642 0 "3BLACKSTON-1" 1.0188 0.00 0.00 200.00 0.00 0.00 83.10 22.00 0.0000 0.0800 0.0000 0.0000 0 0
+ 643 0 "3BOARDMAN--1" 1.0825 0.00 2.00 0.00 0.00 0.00 27.80 16.10 0.0000 0.1042 0.0000 0.0000 0 0
+ 644 0 "3BUICK-STEW1" 1.0363 0.00 0.00 0.00 0.00 0.00 40.50 17.10 0.0000 0.0000 0.0000 0.0000 0 0
+ 645 0 "3BULLOCK---1" 1.0269 0.00 0.00 0.00 0.00 0.00 37.10 37.10 0.0000 0.1578 0.0000 0.0000 0 0
+ 649 2 "3CAMPBELL--1" 1.0554 0.00 584.00 0.00 0.00 390.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 650 0 "3CEMENT-CY-1" 1.0188 0.00 0.00 0.00 0.00 0.00 28.00 -0.20 0.0000 0.1000 0.0000 0.0000 0 0
+ 651 0 "3CHASE-----1" 1.0429 0.00 0.00 0.00 0.00 0.00 4.90 2.20 0.0000 0.0000 0.0000 0.0000 0 0
+ 652 0 "3CLAIRMONT-1" 1.0230 0.00 0.00 0.00 0.00 0.00 73.60 28.60 0.0000 0.1646 0.0000 0.0000 0 0
+ 653 0 "3CLEVELAND-1" 1.0356 0.00 0.00 0.00 0.00 0.00 32.90 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+ 654 2 "3COBB------1" 1.0400 0.00 476.00 40.00 0.00 421.00 79.30 35.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 655 0 "3CORK-ST.--1" 1.0494 0.00 0.00 0.00 0.00 0.00 17.00 7.20 0.0000 0.0000 0.0000 0.0000 0 0
+ 656 0 "3CORNELL---1" 1.0290 0.00 0.00 0.00 0.00 0.00 33.30 12.00 0.0000 0.1981 0.0000 0.0000 0 0
+ 657 0 "3COTTEGE-GR1" 1.0738 0.00 0.00 0.00 0.00 0.00 1.70 0.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 658 0 "3CROTON----1" 1.0342 0.00 29.00 0.00 0.00 0.00 10.40 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 662 0 "3DEAN-RD.--1" 1.0521 0.00 0.00 0.00 0.00 0.00 3.60 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 663 0 "3DEJA------1" 1.0414 0.00 0.00 0.00 0.00 0.00 13.80 -2.50 0.0000 0.0000 0.0000 0.0000 0 0
+ 664 0 "3DELANEY---1" 1.0469 0.00 0.00 0.00 0.00 0.00 64.80 25.10 0.0000 0.2698 0.0000 0.0000 0 0
+ 665 0 "3DELH1-----1" 1.0442 0.00 0.00 0.00 0.00 0.00 36.90 -10.00 0.0000 0.2783 0.0000 0.0000 0 0
+ 666 0 "3DORT------1" 1.0425 0.00 0.00 0.00 0.00 0.00 106.40 37.90 0.0000 0.4626 0.0000 0.0000 0 0
+ 667 0 "3DOW-CHLOR.1" 1.0243 0.00 0.00 0.00 0.00 0.00 49.00 24.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 668 0 "3DU-PONTE--1" 1.0355 0.00 0.00 0.00 0.00 0.00 2.20 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 669 0 "3D-4CPCO-120" 1.0444 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 673 0 "3EDENVILLE-1" 1.0405 0.00 0.00 0.00 0.00 0.00 7.10 -4.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 674 2 "3ELM-STREET1" 1.0444 0.00 29.00 0.00 0.00 7.00 32.70 23.30 0.0000 0.0000 0.0000 0.0000 0 0
+ 675 0 "3EMMET-----1" 1.1457 0.00 0.00 0.00 0.00 0.00 21.00 3.90 0.0000 0.0000 0.0000 0.0000 0 0
+ 676 0 "3EUREKA----1" 1.0398 0.00 0.00 0.00 0.00 0.00 21.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+ 680 0 "3FELCH-RD.-1" 1.0331 0.00 0.00 0.00 0.00 0.00 14.00 5.90 0.0000 0.0000 0.0000 0.0000 0 0
+ 681 0 "3FISHER----1" 1.0445 0.00 0.00 0.00 0.00 0.00 14.10 4.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 682 0 "3FOUNDRY---1" 1.0316 0.00 0.00 0.00 0.00 0.00 31.70 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+ 683 0 "3FOUR-MILE-1" 1.0406 0.00 2.00 0.00 0.00 0.00 111.80 32.80 0.0000 0.1000 0.0000 0.0000 0 0
+ 686 0 "3GARFIELD--1" 1.0354 0.00 0.00 0.00 0.00 0.00 72.20 32.00 0.0000 0.0353 0.0000 0.0000 0 0
+ 687 2 "3GAYLORD---1" 1.1519 0.00 60.00 0.00 0.00 15.00 10.10 1.90 0.0000 0.0826 0.0000 0.0000 0 0
+ 688 0 "3GENOA-----1" 1.0678 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 689 0 "3GLEANER---1" 1.0283 0.00 0.00 0.00 0.00 0.00 18.80 6.90 0.0000 0.0000 0.0000 0.0000 0 0
+ 690 0 "3GREY-IRON-1" 1.0221 0.00 0.00 0.00 0.00 0.00 53.50 17.50 0.0000 0.0000 0.0000 0.0000 0 0
+ 693 0 "3HALSEY----1" 1.0458 0.00 0.00 0.00 0.00 0.00 20.40 3.80 0.0000 0.1148 0.0000 0.0000 0 0
+ 694 0 "3HARDY-DAM-1" 1.0343 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 695 0 "3HAZELWOOD-1" 1.0525 0.00 0.00 0.00 0.00 0.00 39.10 7.20 0.0000 0.0400 0.0000 0.0000 0 0
+ 696 0 "3HEMPHILL--1" 1.0447 0.00 0.00 0.00 0.00 0.00 134.10 62.70 0.0000 0.6928 0.0000 0.0000 0 0
+ 697 0 "3HIGGINS---1" 1.1065 0.00 0.00 0.00 0.00 0.00 18.90 2.80 0.0000 0.0000 0.0000 0.0000 0 0
+ 698 0 "3HODENPYL--1" 1.0686 0.00 0.00 0.00 0.00 0.00 8.40 -0.80 0.0000 0.0000 0.0000 0.0000 0 0
+ 699 0 "3HOLLAN-RD-1" 1.0168 0.00 0.00 0.00 0.00 0.00 42.80 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+ 700 0 "3HOOKER----1" 1.0348 0.00 0.00 0.00 0.00 0.00 26.40 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 701 0 "3HUGHES-RD-1" 1.0377 0.00 0.00 0.00 0.00 0.00 21.80 4.80 0.0000 0.0000 0.0000 0.0000 0 0
+ 705 0 "3IOSCO-----1" 1.1238 0.00 19.00 0.00 0.00 0.00 12.80 5.70 0.0000 0.0263 0.0000 0.0000 0 0
+ 706 0 "3ISLAND-RD-1" 1.0435 0.00 0.00 0.00 0.00 0.00 29.20 -2.90 0.0000 0.1086 0.0000 0.0000 0 0
+ 708 2 "3KARN------1" 1.0563 0.00 498.00 0.00 0.00 337.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 709 0 "3KENOWA----3" 1.0865 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 711 0 "3LATSON----1" 1.0558 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 712 0 "3LAWNDALE--1" 1.0265 0.00 0.00 0.00 0.00 0.00 39.90 17.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 713 0 "3LAYTON----1" 1.0246 0.00 0.00 0.00 0.00 0.00 16.10 1.80 0.0000 0.0000 0.0000 0.0000 0 0
+ 714 0 "3LEWISTON--1" 1.1462 0.00 0.00 0.00 0.00 0.00 2.60 0.80 0.0000 0.0000 0.0000 0.0000 0 0
+ 715 0 "3LINBERGH--1" 1.0424 0.00 0.00 0.00 0.00 0.00 42.40 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 716 0 "3LOOK-GLAS-1" 1.0411 0.00 0.00 0.00 0.00 0.00 25.30 -3.20 0.0000 0.0000 0.0000 0.0000 0 0
+ 717 0 "3LOUD------1" 1.1048 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0040 0.0000 0.0000 0 0
+ 718 2 "3LUDINGTON-3" 1.0978 0.00 0.00 0.00 0.00 200.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 721 0 "3MALLEABLE-1" 1.0211 0.00 0.00 0.00 0.00 0.00 61.50 17.20 0.0000 0.0000 0.0000 0.0000 0 0
+ 722 0 "3MARQUETTE-1" 1.0444 0.00 2.00 0.00 0.00 0.00 17.80 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 723 0 "3MECOSTA---1" 1.0370 0.00 0.00 0.00 0.00 0.00 15.90 3.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 724 0 "3MEDUSA----1" 1.1103 0.00 0.00 0.00 0.00 0.00 11.50 1.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 725 0 "3MILES-RD.-1" 1.1103 0.00 0.00 0.00 0.00 0.00 7.70 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 726 0 "3MILHAM----1" 1.0437 0.00 0.00 0.00 0.00 0.00 36.30 9.60 0.0000 0.1413 0.0000 0.0000 0 0
+ 727 0 "3MIO-------1" 1.1407 0.00 9.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.2067 0.0000 0.0000 0 0
+ 728 0 "3MONITOR---1" 1.0319 0.00 0.00 0.00 0.00 0.00 41.40 14.30 0.0000 0.0503 0.0000 0.0000 0 0
+ 729 0 "3MOORE-RD--1" 0.9940 0.00 0.00 0.00 0.00 0.00 40.80 10.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 730 2 "3MORROW----1" 1.0500 0.00 130.00 0.00 0.00 168.00 80.20 31.20 0.0000 0.1836 0.0000 0.0000 0 0
+ 731 0 "3MUSKEGN-HT1" 1.0212 0.00 0.00 0.00 0.00 0.00 72.90 52.50 0.0000 0.0000 0.0000 0.0000 0 0
+ 735 0 "3NODULAR---1" 1.0228 0.00 0.00 0.00 0.00 0.00 34.40 16.80 0.0000 0.0000 0.0000 0.0000 0 0
+ 736 0 "3N.BELDING-1" 1.0422 0.00 0.00 0.00 0.00 0.00 20.70 -2.30 0.0000 0.1000 0.0000 0.0000 0 0
+ 739 0 "3OAKLAND---1" 1.0467 0.00 0.00 0.00 0.00 0.00 17.80 5.80 0.0000 0.0000 0.0000 0.0000 0 0
+ 740 0 "3OGEMAW----1" 1.0698 0.00 0.00 0.00 0.00 0.00 11.90 -7.50 0.0000 0.0000 0.0000 0.0000 0 0
+ 741 0 "3OWOSSO----1" 1.0282 0.00 0.00 0.00 0.00 0.00 29.20 10.40 0.0000 0.0000 0.0000 0.0000 0 0
+ 744 0 "3PAGE------1" 1.0180 0.00 0.00 0.00 0.00 0.00 45.80 5.40 0.0000 0.0800 0.0000 0.0000 0 0
+ 745 2 "3PALISADES-3" 1.0392 0.00 701.70 0.00 0.00 418.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 746 0 "3PASEDENA--1" 1.0263 0.00 0.00 0.00 0.00 0.00 48.70 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+ 747 0 "3PENN-DIXIE1" 1.1463 0.00 0.00 0.00 0.00 0.00 6.60 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 748 0 "3PT.CALCIT-1" 1.1721 0.00 0.00 0.00 0.00 0.00 9.40 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 751 0 "3RAISIN----1" 1.0280 0.00 0.00 0.00 0.00 0.00 21.10 8.80 0.0000 0.0000 0.0000 0.0000 0 0
+ 752 0 "3RICE-CREK-1" 1.0323 0.00 0.00 0.00 0.00 0.00 29.10 1.20 0.0000 0.2540 0.0000 0.0000 0 0
+ 753 0 "3RIFLE-RIV.1" 1.0698 0.00 0.00 0.00 0.00 0.00 2.40 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 754 2 "3RIGGSVIL--1" 1.1813 0.00 25.00 0.00 0.00 6.00 22.30 2.50 0.0000 0.1838 0.0000 0.0000 0 0
+ 755 0 "3RIVERVIEW-1" 1.0513 0.00 0.00 0.00 0.00 0.00 79.60 28.70 0.0000 0.3312 0.0000 0.0000 0 0
+ 756 0 "3ROCKPORT--1" 1.1679 0.00 0.00 0.00 0.00 0.00 1.00 0.20 0.0000 0.0000 0.0000 0.0000 0 0
+ 757 0 "3RONDO-----1" 1.1683 0.00 0.00 0.00 0.00 0.00 3.40 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+ 761 0 "3SAGNAW-R.-1" 1.0316 0.00 0.00 0.00 0.00 0.00 63.80 32.80 0.0000 0.1568 0.0000 0.0000 0 0
+ 762 0 "3SAMARIA---1" 1.0341 0.00 0.00 0.00 0.00 0.00 23.10 10.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 763 0 "3SCOTT-LK.-1" 1.0470 0.00 0.00 0.00 0.00 0.00 17.10 5.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 764 0 "3SPAULDING-1" 1.0412 0.00 0.00 0.00 0.00 0.00 70.40 16.20 0.0000 0.0800 0.0000 0.0000 0 0
+ 765 0 "3SPRUCE----1" 1.1468 0.00 0.00 0.00 0.00 0.00 4.40 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 766 0 "3STAMPG-PLT1" 1.0446 0.00 0.00 0.00 0.00 0.00 11.60 3.80 0.0000 0.0000 0.0000 0.0000 0 0
+ 767 0 "3STRONACH--1" 1.0397 0.00 0.00 0.00 0.00 0.00 21.20 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 768 0 "3STOVER----1" 1.1154 0.00 0.00 0.00 0.00 0.00 6.60 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+ 769 0 "3SUMMERTON-1" 1.0218 0.00 0.00 0.00 0.00 0.00 24.20 -2.10 0.0000 0.0000 0.0000 0.0000 0 0
+ 773 0 "3TALLMADGE-3" 1.0815 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 774 0 "3TALLMADGE-1" 1.0662 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 775 0 "3THETFORD--3" 1.0579 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 776 2 "3THETFORD--1" 1.0516 0.00 146.00 0.00 0.00 36.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 777 0 "3TITTABAW--3" 1.0615 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 778 0 "3TITTABAW--1" 1.0321 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 779 0 "3TIPPY-DAM-1" 1.0648 0.00 29.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.1255 0.0000 0.0000 0 0
+ 780 0 "3TOMPKINS--3" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 781 0 "3TUSC.TAP.-1" 1.0626 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 782 0 "3TWINING---1" 1.0667 0.00 0.00 0.00 0.00 0.00 8.70 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 785 0 "3UPJOHN----1" 1.0441 0.00 0.00 0.00 0.00 0.00 21.80 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 787 2 "3VERONA----1" 1.0467 0.00 29.00 0.00 0.00 7.00 78.70 10.40 0.0000 0.4710 0.0000 0.0000 0 0
+ 788 0 "3VEVAY-----1" 1.0358 0.00 0.00 0.00 0.00 0.00 18.30 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 792 0 "3WACKERLY--1" 1.0295 0.00 0.00 0.00 0.00 0.00 29.80 9.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 793 0 "3WARREN----1" 1.0665 0.00 0.00 0.00 0.00 0.00 19.20 14.60 0.0000 0.3967 0.0000 0.0000 0 0
+ 794 0 "3WASHTENAW-1" 1.0009 0.00 0.00 0.00 0.00 0.00 16.90 -3.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 795 2 "3WEADOCK-B-1" 1.0400 0.00 299.00 90.00 0.00 226.00 35.70 15.30 0.0000 0.0330 0.0000 0.0000 0 0
+ 796 2 "3WEADOCK-W-1" 1.0476 0.00 319.00 0.00 0.00 191.00 36.60 15.30 0.0000 0.0000 0.0000 0.0000 0 0
+ 797 0 "3WEALTHY---1" 1.0461 0.00 0.00 0.00 0.00 0.00 116.80 51.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 798 0 "3WEXFORD---1" 1.0784 0.00 0.00 0.00 0.00 0.00 24.60 -4.50 0.0000 0.0990 0.0000 0.0000 0 0
+ 799 0 "3WHITE-LK.-1" 1.0342 0.00 9.00 0.00 0.00 0.00 11.80 6.80 0.0000 0.0000 0.0000 0.0000 0 0
+ 800 2 "3WHITING---1" 1.0500 0.00 331.00 900.00 0.00 206.00 14.30 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 801 0 "3WILLARD---1" 1.0411 0.00 0.00 0.00 0.00 0.00 23.60 3.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 810 0 "4ALLANBURG-2" 1.1270 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 811 0 "4BEACH-----2" 1.0829 0.00 0.00 0.00 0.00 0.00 256.30 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 812 2 "4BEAUHARN--2" 1.1266 0.00 600.00 500.00 -25.00 50.00 19.70 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 813 2 "4BECK------2" 1.1280 0.00 1011.00 1890.00 -100.00 600.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 814 0 "4-BP-76-REG2" 1.0551 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 815 0 "4BROCKVILLE2" 1.0779 0.00 0.00 0.00 0.00 0.00 76.90 31.50 0.0000 0.0000 0.0000 0.0000 0 0
+ 816 0 "4BUCHANNAN-2" 1.0643 0.00 0.00 0.00 0.00 0.00 600.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 817 2 "4BUCHANNAN-1" 1.0472 0.00 0.00 -250.00 -25.00 200.00 326.80 52.40 0.0000 0.0000 0.0000 0.0000 0 0
+ 818 0 "4BURLINGTON2" 1.0779 0.00 0.00 0.00 0.00 0.00 900.00 300.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 819 0 "4CHATHAM---2" 1.0922 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 823 2 "4CHATS-FALL2" 1.1200 0.00 168.00 670.00 -30.00 70.00 7.00 3.30 0.0000 0.0000 0.0000 0.0000 0 0
+ 824 2 "4CHERRYWOOD2" 1.0770 0.00 1000.00 4190.00 -300.00 600.00 650.00 212.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 825 0 "4CRAWFORD--1" 1.0371 0.00 0.00 0.00 0.00 0.00 64.00 28.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 826 2 "4DESJOACH--2" 1.1740 0.00 370.00 590.00 -50.00 175.00 16.10 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 827 2 "4DETWEILER-2" 1.0550 0.00 0.00 230.00 -35.00 50.00 600.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 828 2 "4DOBBIN----2" 1.0510 0.00 222.00 -310.00 -50.00 75.00 160.00 65.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 829 2 "4DOUGLAS-PT2" 1.1000 0.00 200.00 370.00 -50.00 80.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 830 0 "4EASTON-JCT2" 1.0823 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 831 0 "4ESSA--230-2" 1.0904 0.00 0.00 0.00 0.00 0.00 211.00 57.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 832 0 "4ESSEX-115-1" 1.0395 0.00 0.00 0.00 0.00 0.00 84.00 -6.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 836 0 "4HANMER----5" 1.0071 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 -2.1000 0.0000 0.0000 0 0
+ 837 0 "4HANNON----2" 1.0931 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 838 0 "4HANOVER---2" 1.0859 0.00 0.00 0.00 0.00 0.00 172.20 38.20 0.0000 0.0000 0.0000 0.0000 0 0
+ 839 0 "4HAWTHORNE-2" 1.0613 0.00 0.00 0.00 0.00 0.00 400.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 840 0 "4HINCHBROOK2" 1.0640 0.00 0.00 0.00 0.00 0.00 300.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 841 2 "4HOLDEN----2" 1.1600 0.00 200.00 150.00 -50.00 90.00 96.00 25.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 842 0 "4KEITH-230-2" 1.0658 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 843 2 "4KEITH-115-1" 1.0383 0.00 60.00 -100.00 -10.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 844 0 "4KENT------1" 0.9963 0.00 0.00 0.00 0.00 0.00 122.80 29.80 0.0000 0.0000 0.0000 0.0000 0 0
+ 845 0 "4KLEINBURG-5" 0.9713 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 849 0 "4KLEINBURG-2" 1.0794 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 850 0 "4LAMBTON-345" 1.0434 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 851 0 "4LAMBTON---2" 1.1215 0.00 0.00 0.00 0.00 0.00 27.80 11.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 852 2 "4LAMBTON-.24" 1.1750 0.00 1450.00 7430.00 -500.00 1080.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 853 0 "4LAUZON----2" 1.0537 0.00 0.00 0.00 0.00 0.00 86.00 20.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 854 0 "4LAUZON----1" 1.0421 0.00 0.00 0.00 0.00 0.00 124.70 16.20 0.0000 0.0000 0.0000 0.0000 0 0
+ 855 0 "4LEASIDE---2" 1.0681 0.00 0.00 0.00 0.00 0.00 500.00 150.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 856 0 "4-L-33-P---2" 1.0530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 857 3 "4MANBY-----2" 1.0650 0.00 726.60 450.00 0.00 0.00 950.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 858 2 "4MARTINDALE2" 1.1071 0.00 435.00 -500.00 -50.00 100.00 627.00 98.50 0.0000 0.0000 0.0000 0.0000 0 0
+ 859 0 "4MERIVALE--2" 0.9920 0.00 0.00 0.00 0.00 0.00 244.00 95.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 863 0 "4MIDDLEPORT2" 1.1049 0.00 0.00 0.00 0.00 0.00 40.00 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 864 0 "4MINDEN----2" 1.1309 0.00 0.00 0.00 0.00 0.00 92.60 31.90 0.0000 0.0000 0.0000 0.0000 0 0
+ 865 2 "4NANTICO---2" 1.1570 0.00 1940.00 7680.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 866 2 "4NORTH-BAY-2" 1.1500 0.00 245.00 -110.00 -50.00 100.00 27.20 11.90 0.0000 0.0000 0.0000 0.0000 0 0
+ 867 0 "4NEALE-----2" 1.0954 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 868 0 "4ORANGEVIL-2" 1.0761 0.00 0.00 0.00 0.00 0.00 67.00 40.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 869 0 "4-PA-27-REG2" 1.0521 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 870 0 "4PAUGAN----2" 1.1278 0.00 0.00 0.00 0.00 0.00 8.30 2.50 0.0000 0.0000 0.0000 0.0000 0 0
+ 871 0 "4PINARD----5" 1.0473 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 872 2 "4PINARD----2" 1.0400 0.00 550.00 600.00 -300.00 300.00 0.00 0.00 0.0000 -1.0470 0.0000 0.0000 0 0
+ 876 0 "4PORCUPINE-5" 1.0447 0.00 0.00 0.00 0.00 0.00 90.00 32.10 0.0000 0.0000 0.0000 0.0000 0 0
+ 877 0 "4RICHVIEW--2" 1.0681 0.00 0.00 0.00 0.00 0.00 800.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 878 2 "4STLAWRENCE2" 1.1139 0.00 744.00 3000.00 -100.00 300.00 250.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 879 0 "4STLAWRENCE1" 1.0058 0.00 0.00 0.00 0.00 0.00 49.50 21.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 880 0 "4STTHOMAS--1" 1.0326 0.00 0.00 0.00 0.00 0.00 165.00 11.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 881 0 "4SANDWICH--2" 1.0611 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 882 0 "4SAND.WEST-2" 1.0622 0.00 0.00 0.00 0.00 0.00 114.80 51.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 883 0 "4SCOTT-----2" 1.0961 0.00 0.00 0.00 0.00 0.00 160.00 41.70 0.0000 0.0000 0.0000 0.0000 0 0
+ 884 0 "4SCOTT-----1" 1.0396 0.00 0.00 0.00 0.00 0.00 169.50 36.20 0.0000 0.0000 0.0000 0.0000 0 0
+ 885 0 "4WONDERLAND2" 1.0664 0.00 0.00 0.00 0.00 0.00 79.30 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 889 0 "5BAYSHORE-T3" 1.0112 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 890 2 "5BAYSHORE-T1" 1.0300 0.00 600.00 2680.00 -1000.00 1000.00 760.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 891 2 "5LEMOYNE--T3" 1.0120 0.00 0.00 1900.00 -1000.00 1000.00 175.00 90.80 0.0000 0.0000 0.0000 0.0000 0 0
+ 894 0 "5BENTON-HBR3" 1.0329 0.00 0.00 0.00 0.00 0.00 330.00 16.90 0.0000 0.0000 0.0000 0.0000 0 0
+ 895 2 "5D.C.COOK--3" 1.0300 0.00 2501.67 990.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 896 2 "5DUMONT----3" 1.0300 0.00 850.00 5270.00 -1000.00 1000.00 167.00 50.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 897 2 "5E.LIMA----3" 0.9900 0.00 80.00 860.00 -1000.00 1000.00 350.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 898 2 "5FOSTORIA--3" 1.0000 0.00 0.00 -490.00 -1000.00 1000.00 254.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 899 2 "5OLIVE-----3" 1.0200 0.00 0.00 -2130.00 -1000.00 1000.00 394.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 900 2 "5ROBISON-PK3" 0.9800 0.00 0.00 -630.00 -1000.00 1000.00 460.00 169.80 0.0000 0.0000 0.0000 0.0000 0 0
+ 901 2 "5SORENSON--3" 1.0000 0.00 163.00 850.00 -1000.00 1000.00 371.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+ 902 2 "5TWIN-BRCH-3" 1.0200 0.00 0.00 -1660.00 -1000.00 1000.00 700.00 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 903 2 "5LEWISTON-Y2" 1.0520 0.00 1209.10 -190.00 -200.00 420.00 654.10 -45.40 0.0000 0.0000 0.0000 0.0000 0 0
+ 907 2 "5MOSSES---Y2" 1.0500 0.00 400.00 620.00 0.00 130.00 505.90 96.60 0.0000 0.0000 0.0000 0.0000 0 0
+ 908 2 "5PACKARD--Y2" 1.0520 0.00 0.00 -160.00 -1000.00 100.00 641.40 -0.60 0.0000 0.0000 0.0000 0.0000 0 0
diff --git a/examples/performance/jump/IEEE6620.branch b/examples/performance/jump/IEEE6620.branch
new file mode 100644
index 00000000000..6e00644ed68
--- /dev/null
+++ b/examples/performance/jump/IEEE6620.branch
@@ -0,0 +1,10170 @@
+1 1 222 0 0.270000 0.349000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2 1 286 0 0.035000 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3 2 9 0 0.292000 0.386000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4 2 228 0 0.002000 0.010000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5 3 95 0 0.025400 0.031800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6 3 166 0 0.027100 0.033900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7 4 126 0 0.288800 0.361900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8 4 259 0 0.233400 0.291900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9 5 83 0 0.124600 0.156000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10 5 228 0 0.333900 0.417900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+11 6 109 0 0.163200 0.189500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+12 6 213 0 0.092700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+13 7 45 0 0.197500 0.229300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+14 7 65 0 0.280100 0.333200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+15 8 38 0 0.018600 0.024300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+16 8 117 0 0.065900 0.164200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+17 8 119 0 0.018300 0.044700 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+18 8 199 0 0.030700 0.082400 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+19 8 211 0 0.020200 0.059200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+20 8 267 0 0.019000 0.023800 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+21 9 222 0 0.262000 0.339000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+22 10 49 0 0.201500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+23 10 106 0 0.040300 0.046800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+24 10 216 0 0.156000 0.525000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+25 11 122 0 0.301300 0.479100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+26 11 124 0 0.178000 0.222700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+27 12 25 0 0.125100 0.169700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+28 12 80 0 0.057600 0.072100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+29 13 90 0 0.265000 0.343000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+30 13 294 0 0.245000 0.317000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+31 14 80 0 0.064400 0.080600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+32 14 245 0 0.036600 0.079900 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+33 15 24 0 0.296200 0.369500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+34 15 86 0 0.506000 0.504700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+35 15 137 0 0.374700 0.469600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+36 15 165 0 0.828700 0.846900 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+37 16 57 0 0.136000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+38 16 277 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+39 17 223 0 0.294200 0.368600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+40 17 231 0 0.338500 0.420000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+41 18 251 0 0.137110 0.799561 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+42 18 289 0 0.016800 0.050100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+43 19 201 0 0.233700 0.271400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+44 19 236 0 0.338500 0.423800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+45 20 122 0 0.057400 0.142400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+46 20 141 0 0.018900 0.044800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+47 21 75 0 0.054000 0.136000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+48 21 273 0 0.100000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+49 22 27 0 0.276500 0.336500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+50 22 227 0 0.067800 0.086200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+51 23 34 0 0.503600 0.627200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+52 23 89 0 0.200000 0.250100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+53 24 187 0 0.407000 0.474000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+54 25 158 0 0.113000 0.152000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+55 25 193 0 0.025220 0.066400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+56 25 289 0 0.013750 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+57 26 202 0 0.182900 0.462700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+58 26 250 0 0.145100 0.367300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+59 28 33 0 0.118600 0.153200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+60 28 140 0 0.173000 0.216500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+61 29 54 0 0.144000 0.180200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+62 29 238 0 0.040200 0.061200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+63 30 149 0 0.368700 0.428800 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+64 30 154 0 0.272000 0.315900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+65 31 96 0 0.070500 0.178400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+66 31 97 0 0.112900 0.165500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+67 32 157 0 0.129000 0.161600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+68 32 271 0 0.284100 0.356000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+69 33 228 0 0.155900 0.195200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+70 34 48 0 0.088000 0.161000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+71 34 136 0 0.200000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+72 34 166 0 0.048400 0.060200 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+73 34 167 0 0.037000 0.062000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+74 34 196 0 0.308000 0.437000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+75 36 265 0 0.160700 0.214200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+76 36 281 0 0.061000 0.076300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+77 37 68 0 0.048000 0.061000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+78 37 277 0 0.099000 0.125000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+79 38 105 0 0.019600 0.025800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+80 39 104 0 0.030500 0.038200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+81 39 267 0 0.040700 0.050700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+82 40 124 0 0.247500 0.309500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+83 40 293 0 0.214700 0.268600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+84 41 98 0 0.056500 0.104100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+85 41 214 0 0.235800 0.291700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+86 42 264 0 0.011000 0.028000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+87 43 264 0 0.147100 0.184300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+88 43 287 0 0.394300 0.419400 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+89 44 67 0 0.213000 0.266000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+90 44 75 0 0.290200 0.413400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+91 44 146 0 0.272600 0.361100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+92 44 188 0 0.066500 0.082300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+93 45 210 0 0.278100 0.322900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+94 45 234 0 0.326400 0.404600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+95 46 81 0 0.152900 0.270300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+96 46 277 0 0.066800 0.157200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+97 47 182 0 0.359000 0.417000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+98 47 201 0 0.296000 0.371000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+99 48 286 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+100 49 212 0 0.225400 0.261800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+101 50 171 0 0.083000 0.114000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+102 50 185 0 0.096000 0.198000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+103 51 168 0 0.157200 0.196900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+104 51 272 0 0.091800 0.232400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+105 52 237 0 0.051900 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+106 52 272 0 0.076300 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+107 54 108 0 0.146900 0.172200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+108 55 206 0 0.065600 0.166000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+109 55 290 0 0.248300 0.374800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+110 56 132 0 0.282100 0.327600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+111 56 149 0 0.229700 0.266900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+112 56 151 0 0.357200 0.416900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+113 56 176 0 0.243000 0.326000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+114 57 192 0 0.221100 0.258500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+115 58 125 0 0.172900 0.272900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+116 58 232 0 0.211600 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+117 58 238 0 0.248400 0.378300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+118 58 284 0 0.264600 0.366300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+119 59 108 0 0.336000 0.549100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+120 59 282 0 0.144600 0.192400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+121 60 277 0 0.016400 0.037000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+122 61 146 0 0.260000 0.250000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+123 61 224 0 0.074000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+124 62 152 0 0.474401 0.484100 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+125 62 190 0 0.224500 0.216100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+126 63 113 0 0.091000 0.184000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+127 63 184 0 0.079000 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+128 65 143 0 0.308300 0.386300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+129 66 203 0 0.036000 0.172000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+130 66 253 0 0.023000 0.075000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+131 67 296 0 0.038900 0.050800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+132 68 281 0 0.096600 0.130800 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+133 69 27 1 0.139500 0.467100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+134 69 214 0 0.233000 0.559600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+135 69 262 0 0.079000 0.102000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+136 70 75 0 0.060000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+137 70 198 0 0.027000 0.042000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+138 71 75 0 0.045400 0.111400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+139 71 197 0 0.057200 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+140 72 117 0 0.067800 0.088900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+141 72 142 0 0.013400 0.033600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+142 73 129 0 0.021000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+143 73 142 0 0.027000 0.068000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+144 74 100 0 0.050000 0.086000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+145 74 113 0 0.076300 0.192800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+146 74 133 0 0.099000 0.128000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+147 74 217 0 0.024000 0.061000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+148 75 241 0 0.130000 0.324000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+149 76 234 0 0.436300 0.497300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+150 76 255 0 0.397000 0.468200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+151 77 118 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+152 78 142 0 0.143200 0.182300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+153 78 144 0 0.155200 0.194400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+154 79 215 0 0.115800 0.145000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+155 79 294 0 0.192500 0.241300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+156 81 226 0 0.019000 0.068200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+157 82 217 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+158 82 252 0 0.057000 0.141000 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+159 83 124 0 0.181400 0.226800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+160 84 118 0 0.056300 0.073000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+161 84 195 0 0.016700 0.029100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+162 85 139 0 0.118000 0.152000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+163 85 196 0 0.129000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+164 86 201 0 0.229700 0.287800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+165 88 161 0 0.070500 0.081900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+166 88 197 0 0.060400 0.075700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+167 89 293 0 0.110100 0.137800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+168 90 136 0 0.180000 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+169 93 216 0 0.296000 0.282000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+170 93 264 0 0.339000 0.381000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+171 94 167 0 0.022000 0.056000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+172 94 247 0 0.163000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+173 95 246 0 0.176300 0.224000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+174 96 227 0 0.092400 0.115700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+175 97 288 0 0.065600 0.085500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+176 98 170 0 0.133400 0.250800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+177 98 288 0 0.066400 0.168100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+178 99 210 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+179 101 221 0 0.137000 0.159100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+180 101 233 0 0.259300 0.324500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+181 102 229 0 0.058000 0.150000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+182 102 273 0 0.052000 0.064000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+183 104 253 0 0.117100 0.174000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+184 105 291 0 0.031100 0.070800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+185 106 191 0 0.199000 0.239000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+186 107 135 0 0.005900 0.016700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+187 107 193 0 0.020500 0.054900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+188 107 251 0 0.012200 0.038400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+189 108 121 0 0.069400 0.086800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+190 108 202 0 0.271300 0.426200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+191 109 271 0 0.216400 0.248300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+192 110 162 0 0.085000 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+193 110 189 0 0.187000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+194 111 219 0 0.322400 0.404000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+195 111 264 0 0.094200 0.146700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+196 112 202 0 0.221600 0.277700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+197 112 284 0 0.150900 0.188700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+198 113 265 0 0.178900 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+199 113 275 0 0.077700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+200 114 171 0 0.155500 0.301300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+201 114 229 0 0.028100 0.064600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+202 115 134 0 0.141000 0.163800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+203 115 194 0 0.198000 0.256200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+204 116 129 0 0.026000 0.044000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+205 116 200 0 0.084000 0.103000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+206 119 120 0 0.021000 0.052000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+207 119 199 0 0.027000 0.066000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+208 120 142 0 0.085200 0.181500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+209 121 134 0 0.266700 0.308000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+210 122 152 0 0.181900 0.256900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+211 122 155 0 0.115400 0.170200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+212 123 224 0 0.093000 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+213 123 262 0 0.067000 0.168000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+214 124 239 0 0.254000 0.334000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+215 125 156 0 0.171500 0.210600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+216 126 168 0 0.184700 0.232100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+217 128 155 0 0.296400 0.386200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+218 128 192 0 0.032700 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+219 130 144 0 0.181300 0.227200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+220 130 221 0 0.142600 0.178800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+221 131 277 0 0.214000 0.272000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+222 131 281 0 0.012000 0.015000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+223 132 287 0 0.100700 0.117000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+224 133 276 0 0.068000 0.083000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+225 135 251 0 0.018020 0.055090 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+226 135 277 0 0.015680 0.073070 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+227 137 208 0 0.306200 0.383800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+228 138 142 0 0.032600 0.072500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+229 138 261 0 0.259200 0.331900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+230 139 292 0 0.156000 0.191000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+231 140 192 0 0.076500 0.095800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+232 141 223 0 0.118900 0.149000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+233 143 215 0 0.195500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+234 143 292 0 0.172000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+235 146 188 0 0.206000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+236 146 224 0 0.260900 0.343300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+237 147 237 0 0.266700 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+238 148 220 0 0.058000 0.144000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+239 148 246 0 0.225400 0.280500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+240 148 259 0 0.078100 0.097700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+241 148 260 0 0.142400 0.340700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+242 150 224 0 0.180000 0.220000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+243 150 241 0 0.114000 0.284000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+244 151 213 0 0.094700 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+245 154 294 0 0.194300 0.241400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+246 156 194 0 0.128900 0.161500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+247 156 206 0 0.140000 0.588000 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+248 156 275 0 0.255900 0.397000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+249 156 278 0 0.219900 0.255800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+250 156 285 0 0.179500 0.209000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+251 157 230 0 0.044300 0.054600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+252 158 276 0 0.080000 0.098000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+253 159 203 0 0.133000 0.170000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+254 159 233 0 0.005000 0.024000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+255 160 193 0 0.020450 0.054930 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+256 160 277 0 0.024000 0.075000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+257 161 253 0 0.021000 0.135700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+258 162 254 0 0.017000 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+259 163 245 0 0.077200 0.096900 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+260 163 280 0 0.220000 0.276200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+261 165 209 0 0.359000 0.450400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+262 165 255 0 0.572300 0.716900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+263 169 173 0 0.135000 0.189900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+264 169 260 0 0.086900 0.219900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+265 170 229 0 0.058600 0.145900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+266 171 186 0 0.194100 0.229600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+267 171 240 0 0.080000 0.198000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+268 172 222 0 0.200000 0.256000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+269 172 272 0 0.043000 0.108000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+270 173 272 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+271 174 281 0 0.053200 0.131900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+272 175 233 0 0.051700 0.070100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+273 176 239 0 0.280500 0.377400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+274 178 245 0 0.058000 0.170000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+275 178 249 0 0.075000 0.185000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+276 180 207 0 0.020000 0.026000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+277 181 207 0 0.043400 0.054300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+278 182 208 0 0.397000 0.497000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+279 183 191 0 0.270000 0.329500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+280 183 201 0 0.078200 0.094000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+281 184 258 0 0.016000 0.040000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+282 185 207 0 0.080000 0.141000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+283 186 207 0 0.065000 0.112000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+284 187 242 0 0.285900 0.333100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+285 189 192 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+286 190 230 0 0.234500 0.225100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+287 192 290 0 0.363400 0.425500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+288 195 207 0 0.044000 0.057000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+289 198 270 0 0.037000 0.088000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+290 199 211 0 0.009000 0.020000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+291 199 284 0 0.204100 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+292 200 233 0 0.099000 0.248000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+293 200 244 0 0.029000 0.128000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+294 202 261 0 0.152900 0.209100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+295 203 205 0 0.057900 0.108900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+296 203 244 0 0.012000 0.017000 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+297 204 206 0 0.008200 0.020500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+298 204 281 0 0.100700 0.126200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+299 205 253 0 0.106200 0.139800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+300 206 258 0 0.161000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+301 206 283 0 0.130000 0.246600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+302 208 209 0 0.662900 0.830700 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+303 212 287 0 0.135300 0.157100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+304 213 231 0 0.268000 0.335800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+305 216 266 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+306 219 271 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+307 220 269 0 0.037000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+308 226 245 0 0.011200 0.037400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+309 228 280 0 0.215300 0.263900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+310 229 270 0 0.186000 0.241000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+311 230 231 0 0.298200 0.373700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+312 233 296 0 0.173300 0.218900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+313 234 235 0 0.274000 0.318200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+314 234 268 0 0.222000 0.234000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+315 235 295 0 0.211500 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+316 236 266 0 0.296000 0.363000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+317 242 268 0 0.249000 0.264000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+318 242 287 0 0.532800 0.529500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+319 245 254 0 0.063000 0.085000 0.007800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+320 247 269 0 0.058000 0.075000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+321 250 282 0 0.318500 0.370700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+322 253 291 0 0.012700 0.036100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+323 278 283 0 0.229700 0.266800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+324 278 285 0 0.040400 0.046900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+325 293 294 0 0.351500 0.442100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+326 294 295 0 0.358500 0.419200 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+327 298 2 2 0.010800 0.276300 0.000000 1.0301 1.0000 1.0000 0.00 0.00 0.00
+328 298 312 0 0.000400 0.002400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+329 298 313 0 0.001500 0.003400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+330 298 407 0 0.008300 0.053400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+331 299 300 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+332 299 300 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+333 299 336 0 0.002100 0.009600 0.140600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+334 299 339 0 0.003400 0.018130 0.138600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+335 299 343 0 0.000900 0.004300 0.063200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+336 301 371 0 0.006340 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+337 302 372 0 0.006350 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+338 303 10 2 0.007000 0.180000 0.000000 1.0097 1.0000 1.0000 0.00 0.00 0.00
+339 303 304 0 0.027000 0.103000 0.014400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+340 303 424 0 0.022100 0.084300 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+341 304 15 2 0.010900 0.272000 0.000000 1.0680 1.0000 1.0000 0.00 0.00 0.00
+342 304 346 0 0.028500 0.108600 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+343 305 25 2 0.004200 0.127000 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+344 305 25 2 0.004300 0.127300 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+345 305 345 0 0.013500 0.029950 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+346 305 366 0 0.004500 0.016100 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+347 305 394 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+348 305 394 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+349 305 407 0 0.011100 0.025700 0.013400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+350 305 420 0 0.008600 0.031400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+351 305 428 0 0.009100 0.033000 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+352 305 436 0 0.002340 0.010260 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+353 306 307 1 0.000300 0.010200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+354 306 308 1 0.000500 0.032900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+355 306 309 1 0.000800 0.031100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+356 306 378 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+357 306 379 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+358 306 434 0 0.000900 0.011000 0.192600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+359 306 434 0 0.000900 0.011000 0.385200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+360 307 381 0 0.002000 0.019500 0.044000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+361 308 31 2 0.006500 0.170200 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+362 308 31 2 0.006900 0.175600 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+363 308 419 0 0.002500 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+364 308 421 0 0.002890 0.009510 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+365 308 421 0 0.002320 0.009950 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+366 309 321 0 0.001400 0.013500 0.009000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+367 309 326 0 0.040200 0.090390 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+368 309 328 0 0.011290 0.039310 0.026600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+369 309 332 0 0.032600 0.090400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+370 309 341 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+371 309 342 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+372 309 422 0 0.002370 0.011230 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+373 310 34 2 0.006000 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+374 310 34 2 0.007200 0.180000 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+375 310 312 0 0.038200 0.088000 0.045600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+376 310 370 0 0.006000 0.103200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+377 310 410 0 0.012100 0.060000 0.018400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+378 310 426 0 0.001900 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+379 311 310 2 0.000500 0.025000 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+380 311 645 0 0.000400 0.003600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+381 314 315 1 0.000700 0.025000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+382 314 413 0 0.000300 0.001800 1.273000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+383 315 322 0 0.001500 0.006700 0.099200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+384 315 343 0 0.001500 0.006600 0.098000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+385 315 386 0 0.001300 0.005800 0.085600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+386 316 380 0 0.000400 0.002600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+387 316 420 0 0.001100 0.006700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+388 317 377 0 0.001600 0.006700 0.114800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+389 317 432 0 0.001900 0.009100 0.101200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+390 318 53 2 0.004400 0.127500 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+391 318 53 2 0.004400 0.125700 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+392 318 359 0 0.001600 0.008600 0.058200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+393 318 361 0 0.005700 0.033390 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+394 318 395 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+395 318 423 0 0.007250 0.028620 0.062800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+396 319 58 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+397 319 58 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+398 319 324 0 0.002500 0.016000 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+399 319 442 0 0.004300 0.028700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+400 321 418 0 0.000130 0.001300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+401 322 64 1 0.004200 0.140000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+402 322 64 1 0.004400 0.137300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+403 322 64 1 0.004800 0.137800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+404 322 377 0 0.001000 0.004600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+405 322 386 0 0.002400 0.011020 0.162200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+406 322 430 0 0.002700 0.012500 0.183400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+407 323 393 0 0.001600 0.019700 0.343200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+408 323 456 0 0.004400 0.063800 0.811600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+409 324 389 0 0.007300 0.042500 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+410 324 417 0 0.002400 0.015300 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+411 325 331 0 0.001800 0.018200 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+412 325 429 0 0.000500 0.004700 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+413 326 69 2 0.007700 0.186400 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+414 326 69 2 0.007700 0.186600 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+415 326 332 0 0.015800 0.052200 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+416 326 458 0 0.008680 0.046920 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+417 327 357 1 0.000500 0.011700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+418 327 579 0 0.020900 0.097700 0.038800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+419 328 75 2 0.007300 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+420 328 437 0 0.001110 0.003830 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+421 329 429 0 0.003300 0.007000 0.131800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+422 330 433 0 0.000300 0.025250 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+423 331 87 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+424 331 87 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+425 331 418 0 0.001400 0.013600 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+426 331 435 0 0.013000 0.076450 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+427 332 367 0 0.031000 0.118100 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+428 333 91 2 0.005420 0.130500 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+429 333 91 2 0.005400 0.129800 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+430 333 334 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+431 333 335 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+432 333 376 0 0.003130 0.013150 0.223600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+433 334 385 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+434 334 414 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+435 335 385 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+436 335 414 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+437 336 320 2 0.004600 0.117200 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+438 336 320 2 0.004600 0.117000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+439 336 320 2 0.003200 0.120000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+440 336 386 0 0.003400 0.015600 0.230200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+441 337 92 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+442 337 92 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+443 337 92 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+444 337 388 0 0.002320 0.058320 0.122600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+445 337 429 0 0.003200 0.012490 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+446 337 429 0 0.003150 0.027060 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+447 337 448 0 0.004300 0.015900 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+448 338 340 2 0.002000 0.120000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+449 338 400 0 0.001380 0.009250 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+450 338 432 0 0.000910 0.006060 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+451 339 340 2 0.002000 0.123000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+452 339 400 0 0.001370 0.009100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+453 343 103 1 0.004300 0.132700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+454 343 103 1 0.004500 0.133700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+455 343 103 1 0.004800 0.138300 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+456 343 377 0 0.000300 0.001140 0.016800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+457 343 432 0 0.003390 0.015460 0.227800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+458 344 108 2 0.007200 0.180000 0.000000 1.0581 1.0000 1.0000 0.00 0.00 0.00
+459 345 113 2 0.006700 0.179100 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+460 345 113 2 0.007700 0.180200 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+461 345 406 0 0.008100 0.031700 0.214600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+462 345 416 0 0.006600 0.026600 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+463 345 442 0 0.001500 0.015000 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+464 346 165 2 0.081000 0.288700 0.000000 1.0518 1.0000 1.0000 0.00 0.00 0.00
+465 346 404 0 0.065600 0.250200 0.035000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+466 347 118 1 0.005800 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+467 347 118 1 0.010600 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+468 347 118 1 0.006000 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+469 347 383 0 0.002500 0.024860 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+470 347 445 0 0.029880 0.124600 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+471 347 448 0 0.001990 0.008180 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+472 348 122 2 0.010900 0.275000 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+473 348 122 2 0.012600 0.274700 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+474 348 351 0 0.011400 0.040100 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+475 348 356 0 0.011200 0.025000 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+476 348 394 0 0.014620 0.053870 0.033000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+477 348 492 0 0.026280 0.105720 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+478 349 127 1 0.004200 0.133500 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+479 349 127 1 0.005800 0.180900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+480 349 127 1 0.004100 0.134300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+481 349 350 0 0.002800 0.016300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+482 349 398 0 0.001100 0.006400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+483 349 398 0 0.001100 0.006700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+484 350 382 0 0.005500 0.013600 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+485 350 401 0 0.001740 0.017600 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+486 351 426 0 0.035200 0.122600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+487 352 375 0 0.011000 0.477800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+488 352 401 0 0.001120 0.011370 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+489 352 421 0 0.002800 0.018200 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+490 353 424 2 0.002600 0.053600 0.000000 1.0641 1.0000 1.0000 0.00 0.00 0.00
+491 353 572 0 0.009300 0.057300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+492 354 370 0 0.042200 0.103400 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+493 355 358 0 0.016900 0.051800 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+494 355 427 0 0.006900 0.046300 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+495 356 403 0 0.041600 0.093800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+496 357 142 2 0.016000 0.260000 0.000000 0.8852 1.0000 1.0000 0.00 0.00 0.00
+497 357 384 0 0.015600 0.082000 0.134000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+498 357 389 0 0.008700 0.050800 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+499 358 143 2 0.010800 0.276300 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+500 358 404 0 0.057700 0.128100 0.016400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+501 359 145 1 0.005700 0.177300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+502 359 145 1 0.007000 0.181600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+503 359 145 1 0.007700 0.181800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+504 359 360 0 0.004300 0.015400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+505 359 385 0 0.009300 0.033600 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+506 359 423 0 0.006100 0.021700 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+507 360 385 0 0.005200 0.019000 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+508 360 388 0 0.006100 0.023200 0.148600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+509 361 362 2 0.026900 0.568700 0.000000 0.9992 1.0000 1.0000 0.00 0.00 0.00
+510 361 415 0 0.002100 0.012600 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+511 363 364 2 0.027400 0.568700 0.000000 1.0020 1.0000 1.0000 0.00 0.00 0.00
+512 363 385 0 0.006400 0.037400 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+513 363 415 0 0.002200 0.012700 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+514 365 423 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+515 365 436 0 0.002800 0.011600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+516 366 423 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+517 367 146 1 0.014700 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+518 367 368 1 0.015000 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+519 367 390 0 0.027910 0.098660 0.013600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+520 369 147 2 0.004200 0.126000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+521 369 147 2 0.004300 0.127000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+522 369 409 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+523 369 409 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+524 369 414 0 0.004600 0.026500 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+525 370 35 2 0.017700 0.287300 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+526 370 35 2 0.015700 0.282700 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+527 370 410 0 0.011900 0.058800 0.049000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+528 370 427 0 0.005300 0.025100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+529 371 382 0 0.001200 0.011500 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+530 372 399 0 0.001700 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+531 373 375 0 0.011400 0.485300 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+532 373 421 0 0.002500 0.016100 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+533 374 375 0 0.011300 0.489400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+534 374 421 0 0.002500 0.016400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+535 376 153 2 0.007200 0.178900 0.000000 1.0047 1.0000 1.0000 0.00 0.00 0.00
+536 376 414 0 0.006000 0.033100 0.083400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+537 378 434 0 0.001600 0.019900 0.346600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+538 378 648 0 0.001030 0.012210 0.218400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+539 379 441 0 0.002200 0.026960 0.467400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+540 379 650 0 0.001500 0.017500 0.312400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+541 380 428 0 0.001100 0.007000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+542 381 382 1 0.000500 0.025400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+543 381 431 0 0.000600 0.005900 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+544 382 164 1 0.006000 0.182200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+545 382 164 1 0.006900 0.184400 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+546 382 164 1 0.006100 0.181300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+547 382 164 1 0.011400 0.261700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+548 382 398 0 0.002100 0.014400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+549 382 419 0 0.004600 0.046200 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+550 382 443 0 0.010040 0.039610 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+551 383 171 1 0.006000 0.175100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+552 383 171 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+553 383 171 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+554 383 402 0 0.010200 0.037100 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+555 383 435 0 0.001500 0.007100 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+556 383 435 0 0.001000 0.006700 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+557 384 417 0 0.017700 0.064200 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+558 385 177 1 0.003600 0.132700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+559 385 177 1 0.003500 0.130800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+560 385 177 1 0.004000 0.139200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+561 385 386 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+562 385 386 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+563 385 387 1 0.013100 0.241100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+564 385 395 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+565 388 179 1 0.006000 0.188200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+566 388 179 1 0.006200 0.183100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+567 388 179 1 0.005700 0.192700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+568 388 179 1 0.006000 0.173600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+569 388 406 0 0.007600 0.028000 0.093800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+570 388 442 0 0.018000 0.085900 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+571 389 199 2 0.007600 0.165800 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+572 389 199 2 0.007200 0.169300 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+573 390 391 0 0.002810 0.018580 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+574 390 417 0 0.006460 0.018530 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+575 391 203 2 0.006200 0.177800 0.000000 0.9002 1.0000 1.0000 0.00 0.00 0.00
+576 392 206 2 0.007000 0.174700 0.000000 0.9707 1.0000 1.0000 0.00 0.00 0.00
+577 392 442 0 0.017800 0.118400 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+578 393 394 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+579 393 394 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+580 393 408 0 0.001920 0.021280 0.364800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+581 393 413 0 0.001400 0.017300 0.291200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+582 393 441 0 0.000990 0.012120 0.211400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+583 393 566 0 0.001750 0.020310 0.382000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+584 394 428 0 0.003800 0.014500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+585 394 428 0 0.002000 0.019400 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+586 395 218 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+587 395 218 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+588 395 218 1 0.006000 0.168900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+589 395 409 0 0.036400 0.214000 0.216000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+590 395 414 0 0.004600 0.028200 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+591 396 220 2 0.006800 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+592 396 410 0 0.000500 0.004800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+593 397 398 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+594 397 399 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+595 397 400 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+596 398 401 0 0.005700 0.040700 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+597 398 432 0 0.001700 0.056100 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+598 399 429 0 0.004100 0.023700 0.120800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+599 399 429 0 0.005300 0.029800 0.076400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+600 400 430 0 0.005400 0.030000 0.075800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+601 401 225 1 0.006500 0.223300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+602 401 225 1 0.006200 0.237800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+603 401 225 1 0.006300 0.240000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+604 401 421 0 0.003700 0.028800 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+605 402 229 2 0.004500 0.127200 0.000000 0.9930 1.0000 1.0000 0.00 0.00 0.00
+606 402 422 0 0.020400 0.074500 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+607 403 231 2 0.013200 0.277700 0.000000 1.0287 1.0000 1.0000 0.00 0.00 0.00
+608 403 424 0 0.037700 0.083700 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+609 404 234 2 0.010200 0.264700 0.000000 1.0958 1.0000 1.0000 0.00 0.00 0.00
+610 406 243 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+611 406 243 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+612 406 416 0 0.010500 0.038600 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+613 407 245 2 0.007200 0.177800 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+614 407 245 2 0.007200 0.180000 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+615 408 413 0 0.001700 0.020300 0.458200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+616 408 566 0 0.003400 0.039700 0.722600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+617 408 618 0 0.000100 0.001800 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+618 409 410 0 0.000900 0.099600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+619 409 410 0 0.000900 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+620 410 412 0 0.012400 0.070100 0.050200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+621 410 414 0 0.029650 0.210540 0.032200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+622 411 408 1 0.000500 0.027800 0.000000 1.0750 1.0000 1.0000 0.00 0.00 0.00
+623 412 415 0 0.004500 0.022600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+624 413 414 1 0.000500 0.021670 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+625 414 248 2 0.005600 0.177800 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+626 414 248 2 0.006000 0.179300 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+627 414 248 2 0.007700 0.186700 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+628 414 425 0 0.022000 0.129000 0.020000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+629 415 249 2 0.007700 0.178700 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+630 415 249 2 0.006200 0.173300 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+631 415 249 2 0.007800 0.185100 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+632 416 252 2 0.008300 0.180700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+633 416 252 2 0.007700 0.179100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+634 416 442 0 0.002300 0.029400 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+635 417 253 1 0.010500 0.278000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+636 417 253 1 0.010500 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+637 417 253 1 0.010800 0.272700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+638 417 435 0 0.015000 0.055300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+639 417 437 0 0.006400 0.022300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+640 417 438 0 0.005100 0.034600 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+641 418 256 2 0.027000 0.600000 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+642 419 257 2 0.027000 0.600000 0.000000 0.9693 1.0000 1.0000 0.00 0.00 0.00
+643 421 405 2 0.006200 0.182200 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+644 421 405 2 0.006100 0.174700 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+645 421 422 0 0.001100 0.093700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+646 421 422 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+647 421 443 0 0.003700 0.013900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+648 422 445 0 0.003300 0.011800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+649 423 263 2 0.007600 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+650 423 263 2 0.007800 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+651 423 263 2 0.007600 0.186700 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+652 424 264 2 0.010300 0.266000 0.000000 1.0328 1.0000 1.0000 0.00 0.00 0.00
+653 425 272 2 0.006300 0.180700 0.000000 0.9847 1.0000 1.0000 0.00 0.00 0.00
+654 426 427 0 0.001900 0.012500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+655 427 274 2 0.005800 0.179100 0.000000 1.0793 1.0000 1.0000 0.00 0.00 0.00
+656 428 277 1 0.005600 0.173800 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+657 428 277 1 0.005800 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+658 428 277 1 0.007100 0.178400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+659 429 279 1 0.011100 0.202200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+660 429 279 1 0.011300 0.206700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+661 429 279 1 0.011600 0.211800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+662 429 279 1 0.011400 0.208700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+663 429 279 1 0.009900 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+664 429 279 1 0.009800 0.177800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+665 429 430 0 0.000900 0.117000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+666 431 432 1 0.000500 0.025000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+667 432 433 1 0.004700 0.119200 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+668 432 433 1 0.004800 0.115100 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+669 434 435 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+670 434 435 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+671 434 571 0 0.002400 0.032200 0.920800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+672 435 438 0 0.002600 0.017500 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+673 437 439 0 0.009500 0.021300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+674 438 439 0 0.007700 0.029200 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+675 439 440 2 0.027000 0.560500 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+676 439 440 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+677 439 440 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+678 441 442 0 0.000500 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+679 443 444 2 0.027700 0.593300 0.000000 0.9640 1.0000 1.0000 0.00 0.00 0.00
+680 445 446 0 0.001400 0.008600 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+681 446 447 2 0.027600 0.602700 0.000000 0.9690 1.0000 1.0000 0.00 0.00 0.00
+682 448 297 2 0.007000 0.171100 0.000000 0.9240 1.0000 1.0000 0.00 0.00 0.00
+683 449 502 0 0.031900 0.075300 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+684 449 562 0 0.009200 0.021600 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+685 450 525 0 0.027800 0.045500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+686 450 533 0 0.057300 0.093900 0.019200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+687 451 484 0 0.028500 0.069900 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+688 451 500 0 0.022900 0.068400 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+689 452 466 0 0.007000 0.021300 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+690 452 486 0 0.025500 0.074100 0.019400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+691 453 555 0 0.068000 0.116000 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+692 453 573 0 0.060200 0.098800 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+693 454 533 0 0.091500 0.217600 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+694 454 553 0 0.032400 0.076400 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+695 454 559 0 0.030800 0.085400 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+696 455 561 0 0.027900 0.080400 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+697 455 584 0 0.053300 0.153400 0.040200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+698 456 457 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+699 456 518 0 0.002500 0.035400 0.458800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+700 456 544 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+701 456 544 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+702 456 564 0 0.001800 0.028300 0.321800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+703 456 571 0 0.002400 0.036600 0.836000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+704 457 508 0 0.001600 0.010400 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+705 457 523 0 0.010000 0.064800 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+706 457 536 0 0.010500 0.058800 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+707 457 552 0 0.004100 0.036500 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+708 457 557 0 0.015500 0.102000 0.027600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+709 457 575 0 0.014000 0.133500 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+710 459 534 0 0.005700 0.029800 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+711 459 580 0 0.001300 0.005300 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+712 460 510 0 0.047900 0.112800 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+713 460 578 0 0.035800 0.084300 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+714 461 536 0 0.029100 0.088000 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+715 461 560 0 0.051300 0.155300 0.037000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+716 462 470 0 0.016000 0.046000 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+717 462 479 0 0.014700 0.042400 0.011000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+718 463 575 0 0.051400 0.120200 0.030600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+719 464 475 0 0.015800 0.117300 0.034400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+720 464 508 0 0.019100 0.124100 0.034600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+721 464 558 0 0.009300 0.060200 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+722 464 565 0 0.008800 0.036900 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+723 464 582 0 0.004500 0.013300 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+724 465 476 0 0.017000 0.052100 0.048000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+725 465 535 0 0.023200 0.152200 0.041200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+726 465 556 0 0.016300 0.089000 0.023400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+727 465 585 0 0.023500 0.127200 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+728 466 569 0 0.039300 0.140900 0.035400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+729 467 482 0 0.051700 0.117300 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+730 467 545 0 0.003900 0.025600 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+731 468 546 0 0.013100 0.037800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+732 469 482 0 0.029000 0.086300 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+733 469 524 0 0.027100 0.078000 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+734 469 528 0 0.041300 0.119000 0.032000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+735 470 475 0 0.004300 0.046300 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+736 470 557 0 0.015700 0.103400 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+737 471 514 0 0.078700 0.154600 0.032600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+738 471 543 0 0.003500 0.013600 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+739 471 548 0 0.027100 0.146100 0.038400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+740 471 549 0 0.026400 0.079700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+741 471 576 0 0.044500 0.097200 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+742 471 579 0 0.017600 0.073100 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+743 472 511 0 0.046400 0.109700 0.027000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+744 472 562 0 0.057000 0.135400 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+745 472 583 0 0.048100 0.138700 0.036200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+746 473 489 0 0.004000 0.017400 0.004600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+747 473 501 0 0.002400 0.008100 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+748 474 490 0 0.000900 0.009400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+749 474 493 0 0.016900 0.033000 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+750 474 504 0 0.008200 0.018900 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+751 474 563 0 0.034900 0.100400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+752 474 569 0 0.006200 0.018800 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+753 475 500 0 0.010300 0.112200 0.034000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+754 475 558 0 0.019000 0.169300 0.049800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+755 475 565 0 0.007500 0.081300 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+756 476 543 0 0.008900 0.027800 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+757 477 529 0 0.028100 0.047400 0.009200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+758 477 570 0 0.083800 0.136700 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+759 478 489 0 0.064400 0.115200 0.024400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+760 478 505 0 0.007000 0.031300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+761 478 517 0 0.009800 0.098400 0.029800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+762 478 521 0 0.017100 0.071200 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+763 478 527 0 0.001600 0.016900 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+764 478 527 0 0.001500 0.015900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+765 479 480 0 0.027800 0.071900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+766 480 491 0 0.013000 0.084700 0.023000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+767 480 497 0 0.061700 0.114600 0.025400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+768 480 500 0 0.022000 0.143900 0.039000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+769 480 537 0 0.014300 0.051800 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+770 480 537 0 0.018900 0.049500 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+771 480 565 0 0.034600 0.146200 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+772 480 582 0 0.025000 0.168200 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+773 480 584 0 0.021500 0.065600 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+774 481 536 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+775 481 536 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+776 482 488 0 0.031700 0.139300 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+777 482 512 0 0.025100 0.159800 0.043600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+778 482 521 0 0.015300 0.063600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+779 482 542 0 0.001200 0.005100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+780 483 515 0 0.119000 0.269900 0.064400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+781 483 517 0 0.012400 0.065700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+782 484 497 0 0.027500 0.040100 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+783 484 507 0 0.009400 0.023100 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+784 484 529 0 0.072100 0.134100 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+785 485 519 0 0.006800 0.020700 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+786 485 540 0 0.011900 0.036000 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+787 486 496 0 0.023500 0.067700 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+788 487 509 0 0.002200 0.023700 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+789 487 567 0 0.003400 0.037100 0.011200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+790 488 516 0 0.049000 0.085100 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+791 488 519 0 0.050300 0.151200 0.036400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+792 488 576 0 0.011800 0.035100 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+793 489 545 0 0.006400 0.041400 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+794 489 567 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+795 489 567 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+796 489 580 0 0.041600 0.169100 0.045000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+797 491 513 0 0.001800 0.005400 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+798 493 578 0 0.026100 0.061600 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+799 494 575 0 0.004900 0.009800 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+800 495 502 0 0.036300 0.104500 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+801 495 546 0 0.008600 0.024800 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+802 496 539 0 0.008400 0.024300 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+803 498 506 0 0.008200 0.025000 0.006000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+804 498 509 0 0.004600 0.015500 0.003800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+805 499 549 0 0.002100 0.010400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+806 499 575 0 0.029500 0.093600 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+807 500 539 0 0.037300 0.122400 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+808 500 582 0 0.009000 0.029900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+809 501 509 0 0.015500 0.049500 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+810 501 517 0 0.038200 0.142300 0.085200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+811 502 522 0 0.037400 0.087200 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+812 502 554 0 0.038100 0.089800 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+813 503 344 2 0.001400 0.038000 0.000000 1.0675 1.0000 1.0000 0.00 0.00 0.00
+814 503 519 0 0.007460 0.044800 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+815 504 555 0 0.010300 0.038500 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+816 505 538 0 0.000500 0.003200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+817 506 540 0 0.007100 0.021500 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+818 509 492 1 0.000800 0.015500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+819 509 567 0 0.006500 0.061100 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+820 509 586 0 0.026200 0.109100 0.029200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+821 510 533 0 0.053500 0.124600 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+822 511 570 0 0.023400 0.045700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+823 512 580 0 0.019800 0.083100 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+824 513 584 0 0.005600 0.016900 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+825 514 575 0 0.016200 0.031800 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+826 515 559 0 0.043500 0.125300 0.032800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+827 516 575 0 0.067100 0.114700 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+828 517 555 0 0.007000 0.055000 0.019800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+829 517 572 0 0.005300 0.057300 0.017200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+830 518 526 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+831 518 526 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+832 518 564 0 0.000600 0.007100 0.137000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+833 518 566 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+834 518 566 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+835 520 555 0 0.006700 0.022600 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+836 520 569 0 0.011200 0.071500 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+837 522 533 0 0.034000 0.079100 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+838 523 532 0 0.005200 0.033800 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+839 525 573 0 0.081500 0.129600 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+840 526 564 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+841 526 564 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+842 528 539 0 0.017700 0.050900 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+843 528 558 0 0.015100 0.098900 0.026800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+844 530 531 0 0.000200 0.000500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+845 530 562 0 0.020500 0.062000 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+846 532 574 0 0.002000 0.013000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+847 534 555 0 0.005700 0.035600 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+848 536 552 0 0.004200 0.045100 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+849 536 574 0 0.011600 0.036300 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+850 536 575 0 0.032200 0.069100 0.047400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+851 536 575 0 0.023000 0.094500 0.024600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+852 538 555 0 0.003900 0.017400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+853 541 550 0 0.001400 0.004000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+854 541 573 0 0.035000 0.099900 0.026000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+855 544 651 0 0.000500 0.006300 0.095800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+856 544 659 0 0.003600 0.048000 0.582000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+857 547 551 0 0.064100 0.184800 0.048200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+858 547 553 0 0.042600 0.100400 0.025000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+859 548 585 0 0.021400 0.115700 0.030400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+860 551 554 0 0.030200 0.071200 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+861 555 581 0 0.015300 0.063700 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+862 556 585 0 0.008500 0.046400 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+863 560 582 0 0.006600 0.019300 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+864 561 570 0 0.033300 0.081600 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+865 564 565 1 0.000400 0.019000 0.000000 0.9850 1.0000 1.0000 0.00 0.00 0.00
+866 565 582 0 0.002300 0.024800 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+867 566 567 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+868 566 568 0 0.002400 0.036600 0.416000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+869 567 572 0 0.007890 0.086120 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+870 567 581 0 0.023000 0.151200 0.041000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+871 568 569 1 0.000400 0.185000 0.000000 1.0110 1.0000 1.0000 0.00 0.00 0.00
+872 569 577 0 0.003100 0.033500 0.010200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+873 570 583 0 0.050500 0.124000 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+874 577 581 0 0.026900 0.114000 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+875 581 586 0 0.028700 0.116900 0.031000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+876 585 458 1 0.001700 0.033700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+877 587 590 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+878 587 590 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+879 587 590 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+880 587 628 0 0.010550 0.076000 0.115000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+881 588 595 0 0.000600 0.006200 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+882 588 608 0 0.000490 0.004820 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+883 589 610 0 0.021800 0.151100 0.223800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+884 589 640 0 0.012700 0.090900 0.135400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+885 590 591 1 0.000700 0.021100 0.000000 1.0610 1.0000 1.0000 0.00 0.00 0.00
+886 590 608 0 0.003390 0.033600 0.219800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+887 590 632 0 0.003800 0.037800 0.246200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+888 590 634 1 0.000600 0.015100 0.000000 1.0720 1.0000 1.0000 0.00 0.00 0.00
+889 591 662 0 0.001000 0.007000 0.014000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+890 592 604 0 0.001780 0.012020 0.076600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+891 593 594 0 0.000300 0.013550 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+892 593 596 0 0.007700 0.053800 0.335000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+893 593 601 0 0.005900 0.040500 0.250800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+894 593 619 0 0.005500 0.054100 0.363600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+895 593 628 0 0.010800 0.100190 0.170400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+896 593 628 0 0.015000 0.105500 0.158000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+897 593 628 0 0.010500 0.100000 0.170000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+898 593 647 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+899 593 647 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+900 594 642 0 0.005800 0.028100 0.017000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+901 594 646 0 0.096500 0.366900 0.054000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+902 595 628 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+903 595 628 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+904 595 632 0 0.001040 0.009300 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+905 595 639 0 0.001700 0.011700 0.289600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+906 596 619 0 0.002900 0.028500 0.192000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+907 596 643 0 0.005400 0.036900 0.228600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+908 597 598 0 0.043000 0.303100 0.463000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+909 597 602 0 0.029100 0.226700 0.342800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+910 597 610 0 0.008500 0.058800 0.087000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+911 597 635 0 0.007300 0.050400 0.074000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+912 598 602 0 0.012000 0.083600 0.123600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+913 598 610 0 0.046800 0.336900 0.519800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+914 598 611 0 0.029400 0.230400 0.349400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+915 598 611 0 0.037600 0.263000 0.396000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+916 598 623 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+917 598 623 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+918 598 627 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+919 598 635 0 0.048900 0.349200 0.538000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+920 598 639 0 0.002000 0.015300 0.214000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+921 598 639 0 0.005700 0.045000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+922 598 639 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+923 598 639 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+924 599 606 0 0.001620 0.009700 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+925 599 614 0 0.001530 0.009400 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+926 600 612 0 0.013700 0.095700 0.141000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+927 600 629 0 0.011200 0.077200 0.482400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+928 600 629 0 0.011200 0.079000 0.471400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+929 601 628 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+930 601 628 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+931 601 633 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+932 601 633 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+933 603 609 0 0.002480 0.024470 0.164800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+934 604 611 0 0.003580 0.035200 0.239000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+935 604 640 0 0.004500 0.044250 0.301000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+936 605 626 0 0.017300 0.198800 0.700000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+937 605 629 0 0.009100 0.062300 0.385600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+938 605 633 0 0.008500 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+939 605 633 0 0.008600 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+940 606 622 0 0.002100 0.008300 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+941 607 616 0 0.004440 0.051440 3.597000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+942 607 626 1 0.000740 0.020400 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+943 607 638 0 0.002440 0.032620 2.236000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+944 608 628 0 0.001020 0.010050 0.066400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+945 609 633 0 0.003920 0.038140 0.258000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+946 610 611 0 0.012300 0.125500 0.194000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+947 610 627 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+948 610 640 0 0.007500 0.077300 0.119000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+949 611 640 0 0.023900 0.170800 0.255600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+950 612 631 0 0.014500 0.058010 0.094000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+951 612 631 0 0.007700 0.056910 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+952 613 431 1 0.000400 0.002500 0.000000 1.0450 1.0000 1.0000 0.00 0.00 0.00
+953 613 614 1 0.001200 0.039600 0.000000 1.0250 1.0000 1.0000 0.00 0.00 0.00
+954 613 644 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+955 615 622 0 0.062700 0.250000 0.067200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+956 615 622 0 0.102000 0.236000 0.060600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+957 615 642 0 0.085500 0.342000 0.091400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+958 615 646 0 0.080800 0.234400 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+959 616 617 1 0.000250 0.015400 0.000000 0.8800 1.0000 1.0000 0.00 0.00 0.00
+960 617 639 0 0.000420 0.006700 0.110800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+961 618 619 1 0.000200 0.024200 0.000000 0.9300 1.0000 1.0000 0.00 0.00 0.00
+962 619 620 0 0.000000 0.009400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+963 619 645 0 0.000500 0.006500 0.103800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+964 621 622 0 0.000400 0.017200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+965 621 643 0 0.000770 0.006480 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+966 624 661 0 0.001000 0.007000 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+967 625 639 0 0.000300 0.001700 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+968 626 631 0 0.029050 0.112070 0.195000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+969 626 631 0 0.014850 0.114140 0.193000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+970 628 630 0 0.000680 0.006680 0.399000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+971 628 632 0 0.001050 0.008370 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+972 629 639 0 0.025400 0.177700 0.270400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+973 629 639 0 0.024400 0.176700 0.271600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+974 634 660 0 0.001000 0.007000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+975 636 637 0 0.000170 0.012340 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+976 636 638 0 0.001840 0.024450 1.662000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+977 640 624 1 0.000000 0.083300 0.000000 1.0300 1.0000 1.0000 0.00 0.00 0.00
+978 640 641 1 0.000500 0.018200 0.000000 1.1030 1.0000 1.0000 0.00 0.00 0.00
+979 643 644 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+980 645 646 1 0.000330 0.013000 0.000000 1.0500 1.0000 1.0000 0.00 0.00 0.00
+981 645 647 0 0.009220 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+982 645 647 0 0.009200 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+983 648 649 0 0.000000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+984 648 655 0 0.001700 0.021000 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+985 650 655 0 0.001000 0.012300 0.150000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+986 651 652 0 0.000800 0.009800 0.120000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+987 652 656 0 0.001000 0.012000 0.160000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+988 652 657 0 0.004200 0.063000 0.200000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+989 652 659 0 0.003100 0.027000 0.050000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+990 652 659 0 0.001140 0.018000 0.270000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+991 653 654 0 0.100000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+992 653 656 0 0.000300 0.003800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+993 653 656 0 0.003000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+994 653 658 0 0.030000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+995 653 659 0 0.000400 0.005000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+996 653 660 0 0.014000 1.139997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+997 653 662 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+998 654 655 0 0.001800 0.023000 0.284000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+999 654 655 0 0.010000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1000 654 656 0 0.030000 0.999999 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1001 654 657 0 0.006000 0.068000 0.740000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1002 654 658 0 0.050000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1003 655 658 0 0.020000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1004 655 660 0 -0.200000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1005 655 661 0 -0.400000 2.500001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1006 655 662 0 0.083000 0.600000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1007 656 658 0 0.004200 0.050000 0.080000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1008 656 658 0 0.060000 0.700001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1009 656 660 0 0.030000 1.009997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1010 656 661 0 0.070000 1.830000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1011 657 658 0 0.001300 0.029000 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1012 657 659 0 0.002200 0.046410 0.400000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1013 658 659 0 0.004000 0.044000 0.500000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1014 658 662 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1015 660 661 0 -0.040450 0.278890 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1016 660 662 0 -0.000010 0.002750 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1017 661 662 0 -0.178800 0.710991 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1018 663 884 0 0.270000 0.349000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1019 663 948 0 0.035000 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1020 664 671 0 0.292000 0.386000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1021 664 890 0 0.002000 0.010000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1022 665 757 0 0.025400 0.031800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1023 665 828 0 0.027100 0.033900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1024 666 788 0 0.288800 0.361900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1025 666 921 0 0.233400 0.291900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1026 667 745 0 0.124600 0.156000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1027 667 890 0 0.333900 0.417900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1028 668 771 0 0.163200 0.189500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1029 668 875 0 0.092700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1030 669 707 0 0.197500 0.229300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1031 669 727 0 0.280100 0.333200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1032 670 700 0 0.018600 0.024300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1033 670 779 0 0.065900 0.164200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1034 670 781 0 0.018300 0.044700 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1035 670 861 0 0.030700 0.082400 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1036 670 873 0 0.020200 0.059200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1037 670 929 0 0.019000 0.023800 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1038 671 884 0 0.262000 0.339000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1039 672 711 0 0.201500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1040 672 768 0 0.040300 0.046800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1041 672 878 0 0.156000 0.525000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1042 673 784 0 0.301300 0.479100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1043 673 786 0 0.178000 0.222700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1044 674 687 0 0.125100 0.169700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1045 674 742 0 0.057600 0.072100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1046 675 752 0 0.265000 0.343000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1047 675 956 0 0.245000 0.317000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1048 676 742 0 0.064400 0.080600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1049 676 907 0 0.036600 0.079900 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1050 677 686 0 0.296200 0.369500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1051 677 748 0 0.506000 0.504700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1052 677 799 0 0.374700 0.469600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1053 677 827 0 0.828700 0.846900 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1054 678 719 0 0.136000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1055 678 939 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1056 679 885 0 0.294200 0.368600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1057 679 893 0 0.338500 0.420000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1058 680 913 0 0.137110 0.799561 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1059 680 951 0 0.016800 0.050100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1060 681 863 0 0.233700 0.271400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1061 681 898 0 0.338500 0.423800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1062 682 784 0 0.057400 0.142400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1063 682 803 0 0.018900 0.044800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1064 683 737 0 0.054000 0.136000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1065 683 935 0 0.100000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1066 684 689 0 0.276500 0.336500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1067 684 889 0 0.067800 0.086200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1068 685 696 0 0.503600 0.627200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1069 685 751 0 0.200000 0.250100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1070 686 849 0 0.407000 0.474000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1071 687 820 0 0.113000 0.152000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1072 687 855 0 0.025220 0.066400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1073 687 951 0 0.013750 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1074 688 864 0 0.182900 0.462700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1075 688 912 0 0.145100 0.367300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1076 690 695 0 0.118600 0.153200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1077 690 802 0 0.173000 0.216500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1078 691 716 0 0.144000 0.180200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1079 691 900 0 0.040200 0.061200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1080 692 811 0 0.368700 0.428800 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1081 692 816 0 0.272000 0.315900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1082 693 758 0 0.070500 0.178400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1083 693 759 0 0.112900 0.165500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1084 694 819 0 0.129000 0.161600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1085 694 933 0 0.284100 0.356000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1086 695 890 0 0.155900 0.195200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1087 696 710 0 0.088000 0.161000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1088 696 798 0 0.200000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1089 696 828 0 0.048400 0.060200 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1090 696 829 0 0.037000 0.062000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1091 696 858 0 0.308000 0.437000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1092 698 927 0 0.160700 0.214200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1093 698 943 0 0.061000 0.076300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1094 699 730 0 0.048000 0.061000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1095 699 939 0 0.099000 0.125000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1096 700 767 0 0.019600 0.025800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1097 701 766 0 0.030500 0.038200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1098 701 929 0 0.040700 0.050700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1099 702 786 0 0.247500 0.309500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1100 702 955 0 0.214700 0.268600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1101 703 760 0 0.056500 0.104100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1102 703 876 0 0.235800 0.291700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1103 704 926 0 0.011000 0.028000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1104 705 926 0 0.147100 0.184300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1105 705 949 0 0.394300 0.419400 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1106 706 729 0 0.213000 0.266000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1107 706 737 0 0.290200 0.413400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1108 706 808 0 0.272600 0.361100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1109 706 850 0 0.066500 0.082300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1110 707 872 0 0.278100 0.322900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1111 707 896 0 0.326400 0.404600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1112 708 743 0 0.152900 0.270300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1113 708 939 0 0.066800 0.157200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1114 709 844 0 0.359000 0.417000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1115 709 863 0 0.296000 0.371000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1116 710 948 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1117 711 874 0 0.225400 0.261800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1118 712 833 0 0.083000 0.114000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1119 712 847 0 0.096000 0.198000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1120 713 830 0 0.157200 0.196900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1121 713 934 0 0.091800 0.232400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1122 714 899 0 0.051900 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1123 714 934 0 0.076300 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1124 716 770 0 0.146900 0.172200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1125 717 868 0 0.065600 0.166000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1126 717 952 0 0.248300 0.374800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1127 718 794 0 0.282100 0.327600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1128 718 811 0 0.229700 0.266900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1129 718 813 0 0.357200 0.416900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1130 718 838 0 0.243000 0.326000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1131 719 854 0 0.221100 0.258500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1132 720 787 0 0.172900 0.272900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1133 720 894 0 0.211600 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1134 720 900 0 0.248400 0.378300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1135 720 946 0 0.264600 0.366300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1136 721 770 0 0.336000 0.549100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1137 721 944 0 0.144600 0.192400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1138 722 939 0 0.016400 0.037000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1139 723 808 0 0.260000 0.250000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1140 723 886 0 0.074000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1141 724 814 0 0.474401 0.484100 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1142 724 852 0 0.224500 0.216100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1143 725 775 0 0.091000 0.184000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1144 725 846 0 0.079000 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1145 727 805 0 0.308300 0.386300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1146 728 865 0 0.036000 0.172000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1147 728 915 0 0.023000 0.075000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1148 729 958 0 0.038900 0.050800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1149 730 943 0 0.096600 0.130800 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1150 731 689 1 0.139500 0.467100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1151 731 876 0 0.233000 0.559600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1152 731 924 0 0.079000 0.102000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1153 732 737 0 0.060000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1154 732 860 0 0.027000 0.042000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1155 733 737 0 0.045400 0.111400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1156 733 859 0 0.057200 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1157 734 779 0 0.067800 0.088900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1158 734 804 0 0.013400 0.033600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1159 735 791 0 0.021000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1160 735 804 0 0.027000 0.068000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1161 736 762 0 0.050000 0.086000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1162 736 775 0 0.076300 0.192800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1163 736 795 0 0.099000 0.128000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1164 736 879 0 0.024000 0.061000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1165 737 903 0 0.130000 0.324000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1166 738 896 0 0.436300 0.497300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1167 738 917 0 0.397000 0.468200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1168 739 780 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1169 740 804 0 0.143200 0.182300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1170 740 806 0 0.155200 0.194400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1171 741 877 0 0.115800 0.145000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1172 741 956 0 0.192500 0.241300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1173 743 888 0 0.019000 0.068200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1174 744 879 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1175 744 914 0 0.057000 0.141000 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1176 745 786 0 0.181400 0.226800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1177 746 780 0 0.056300 0.073000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1178 746 857 0 0.016700 0.029100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1179 747 801 0 0.118000 0.152000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1180 747 858 0 0.129000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1181 748 863 0 0.229700 0.287800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1182 750 823 0 0.070500 0.081900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1183 750 859 0 0.060400 0.075700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1184 751 955 0 0.110100 0.137800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1185 752 798 0 0.180000 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1186 755 878 0 0.296000 0.282000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1187 755 926 0 0.339000 0.381000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1188 756 829 0 0.022000 0.056000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1189 756 909 0 0.163000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1190 757 908 0 0.176300 0.224000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1191 758 889 0 0.092400 0.115700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1192 759 950 0 0.065600 0.085500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1193 760 832 0 0.133400 0.250800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1194 760 950 0 0.066400 0.168100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1195 761 872 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1196 763 883 0 0.137000 0.159100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1197 763 895 0 0.259300 0.324500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1198 764 891 0 0.058000 0.150000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1199 764 935 0 0.052000 0.064000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1200 766 915 0 0.117100 0.174000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1201 767 953 0 0.031100 0.070800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1202 768 853 0 0.199000 0.239000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1203 769 797 0 0.005900 0.016700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1204 769 855 0 0.020500 0.054900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1205 769 913 0 0.012200 0.038400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1206 770 783 0 0.069400 0.086800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1207 770 864 0 0.271300 0.426200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1208 771 933 0 0.216400 0.248300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1209 772 824 0 0.085000 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1210 772 851 0 0.187000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1211 773 881 0 0.322400 0.404000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1212 773 926 0 0.094200 0.146700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1213 774 864 0 0.221600 0.277700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1214 774 946 0 0.150900 0.188700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1215 775 927 0 0.178900 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1216 775 937 0 0.077700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1217 776 833 0 0.155500 0.301300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1218 776 891 0 0.028100 0.064600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1219 777 796 0 0.141000 0.163800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1220 777 856 0 0.198000 0.256200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1221 778 791 0 0.026000 0.044000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1222 778 862 0 0.084000 0.103000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1223 781 782 0 0.021000 0.052000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1224 781 861 0 0.027000 0.066000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1225 782 804 0 0.085200 0.181500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1226 783 796 0 0.266700 0.308000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1227 784 814 0 0.181900 0.256900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1228 784 817 0 0.115400 0.170200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1229 785 886 0 0.093000 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1230 785 924 0 0.067000 0.168000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1231 786 901 0 0.254000 0.334000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1232 787 818 0 0.171500 0.210600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1233 788 830 0 0.184700 0.232100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1234 790 817 0 0.296400 0.386200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1235 790 854 0 0.032700 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1236 792 806 0 0.181300 0.227200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1237 792 883 0 0.142600 0.178800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1238 793 939 0 0.214000 0.272000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1239 793 943 0 0.012000 0.015000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1240 794 949 0 0.100700 0.117000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1241 795 938 0 0.068000 0.083000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1242 797 913 0 0.018020 0.055090 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1243 797 939 0 0.015680 0.073070 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1244 799 870 0 0.306200 0.383800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1245 800 804 0 0.032600 0.072500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1246 800 923 0 0.259200 0.331900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1247 801 954 0 0.156000 0.191000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1248 802 854 0 0.076500 0.095800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1249 803 885 0 0.118900 0.149000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1250 805 877 0 0.195500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1251 805 954 0 0.172000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1252 808 850 0 0.206000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1253 808 886 0 0.260900 0.343300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1254 809 899 0 0.266700 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1255 810 882 0 0.058000 0.144000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1256 810 908 0 0.225400 0.280500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1257 810 921 0 0.078100 0.097700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1258 810 922 0 0.142400 0.340700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1259 812 886 0 0.180000 0.220000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1260 812 903 0 0.114000 0.284000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1261 813 875 0 0.094700 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1262 816 956 0 0.194300 0.241400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1263 818 856 0 0.128900 0.161500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1264 818 868 0 0.140000 0.588000 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1265 818 937 0 0.255900 0.397000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1266 818 940 0 0.219900 0.255800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1267 818 947 0 0.179500 0.209000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1268 819 892 0 0.044300 0.054600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1269 820 938 0 0.080000 0.098000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1270 821 865 0 0.133000 0.170000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1271 821 895 0 0.005000 0.024000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1272 822 855 0 0.020450 0.054930 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1273 822 939 0 0.024000 0.075000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1274 823 915 0 0.021000 0.135700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1275 824 916 0 0.017000 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1276 825 907 0 0.077200 0.096900 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1277 825 942 0 0.220000 0.276200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1278 827 871 0 0.359000 0.450400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1279 827 917 0 0.572300 0.716900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1280 831 835 0 0.135000 0.189900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1281 831 922 0 0.086900 0.219900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1282 832 891 0 0.058600 0.145900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1283 833 848 0 0.194100 0.229600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1284 833 902 0 0.080000 0.198000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1285 834 884 0 0.200000 0.256000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1286 834 934 0 0.043000 0.108000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1287 835 934 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1288 836 943 0 0.053200 0.131900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1289 837 895 0 0.051700 0.070100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1290 838 901 0 0.280500 0.377400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1291 840 907 0 0.058000 0.170000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1292 840 911 0 0.075000 0.185000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1293 842 869 0 0.020000 0.026000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1294 843 869 0 0.043400 0.054300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1295 844 870 0 0.397000 0.497000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1296 845 853 0 0.270000 0.329500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1297 845 863 0 0.078200 0.094000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1298 846 920 0 0.016000 0.040000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1299 847 869 0 0.080000 0.141000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1300 848 869 0 0.065000 0.112000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1301 849 904 0 0.285900 0.333100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1302 851 854 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1303 852 892 0 0.234500 0.225100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1304 854 952 0 0.363400 0.425500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1305 857 869 0 0.044000 0.057000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1306 860 932 0 0.037000 0.088000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1307 861 873 0 0.009000 0.020000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1308 861 946 0 0.204100 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1309 862 895 0 0.099000 0.248000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1310 862 906 0 0.029000 0.128000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1311 864 923 0 0.152900 0.209100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1312 865 867 0 0.057900 0.108900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1313 865 906 0 0.012000 0.017000 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1314 866 868 0 0.008200 0.020500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1315 866 943 0 0.100700 0.126200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1316 867 915 0 0.106200 0.139800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1317 868 920 0 0.161000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1318 868 945 0 0.130000 0.246600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1319 870 871 0 0.662900 0.830700 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1320 874 949 0 0.135300 0.157100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1321 875 893 0 0.268000 0.335800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1322 878 928 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1323 881 933 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1324 882 931 0 0.037000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1325 888 907 0 0.011200 0.037400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1326 890 942 0 0.215300 0.263900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1327 891 932 0 0.186000 0.241000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1328 892 893 0 0.298200 0.373700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1329 895 958 0 0.173300 0.218900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1330 896 897 0 0.274000 0.318200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1331 896 930 0 0.222000 0.234000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1332 897 957 0 0.211500 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1333 898 928 0 0.296000 0.363000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1334 904 930 0 0.249000 0.264000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1335 904 949 0 0.532800 0.529500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1336 907 916 0 0.063000 0.085000 0.007800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1337 909 931 0 0.058000 0.075000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1338 912 944 0 0.318500 0.370700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1339 915 953 0 0.012700 0.036100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1340 940 945 0 0.229700 0.266800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1341 940 947 0 0.040400 0.046900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1342 955 956 0 0.351500 0.442100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1343 956 957 0 0.358500 0.419200 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1344 960 664 2 0.010800 0.276300 0.000000 1.0301 1.0000 1.0000 0.00 0.00 0.00
+1345 960 974 0 0.000400 0.002400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1346 960 975 0 0.001500 0.003400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1347 960 1069 0 0.008300 0.053400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1348 961 962 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1349 961 962 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1350 961 998 0 0.002100 0.009600 0.140600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1351 961 1001 0 0.003400 0.018130 0.138600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1352 961 1005 0 0.000900 0.004300 0.063200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1353 963 1033 0 0.006340 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1354 964 1034 0 0.006350 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1355 965 672 2 0.007000 0.180000 0.000000 1.0097 1.0000 1.0000 0.00 0.00 0.00
+1356 965 966 0 0.027000 0.103000 0.014400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1357 965 1086 0 0.022100 0.084300 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1358 966 677 2 0.010900 0.272000 0.000000 1.0680 1.0000 1.0000 0.00 0.00 0.00
+1359 966 1008 0 0.028500 0.108600 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1360 967 687 2 0.004200 0.127000 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+1361 967 687 2 0.004300 0.127300 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+1362 967 1007 0 0.013500 0.029950 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1363 967 1028 0 0.004500 0.016100 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1364 967 1056 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1365 967 1056 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1366 967 1069 0 0.011100 0.025700 0.013400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1367 967 1082 0 0.008600 0.031400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1368 967 1090 0 0.009100 0.033000 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1369 967 1098 0 0.002340 0.010260 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1370 968 969 1 0.000300 0.010200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1371 968 970 1 0.000500 0.032900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1372 968 971 1 0.000800 0.031100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1373 968 1040 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1374 968 1041 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1375 968 1096 0 0.000900 0.011000 0.192600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1376 968 1096 0 0.000900 0.011000 0.385200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1377 969 1043 0 0.002000 0.019500 0.044000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1378 970 693 2 0.006500 0.170200 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+1379 970 693 2 0.006900 0.175600 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+1380 970 1081 0 0.002500 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1381 970 1083 0 0.002890 0.009510 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1382 970 1083 0 0.002320 0.009950 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1383 971 983 0 0.001400 0.013500 0.009000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1384 971 988 0 0.040200 0.090390 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1385 971 990 0 0.011290 0.039310 0.026600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1386 971 994 0 0.032600 0.090400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1387 971 1003 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1388 971 1004 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1389 971 1084 0 0.002370 0.011230 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1390 972 696 2 0.006000 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+1391 972 696 2 0.007200 0.180000 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+1392 972 974 0 0.038200 0.088000 0.045600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1393 972 1032 0 0.006000 0.103200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1394 972 1072 0 0.012100 0.060000 0.018400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1395 972 1088 0 0.001900 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1396 973 972 2 0.000500 0.025000 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+1397 973 1307 0 0.000400 0.003600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1398 976 977 1 0.000700 0.025000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1399 976 1075 0 0.000300 0.001800 1.273000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1400 977 984 0 0.001500 0.006700 0.099200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1401 977 1005 0 0.001500 0.006600 0.098000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1402 977 1048 0 0.001300 0.005800 0.085600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1403 978 1042 0 0.000400 0.002600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1404 978 1082 0 0.001100 0.006700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1405 979 1039 0 0.001600 0.006700 0.114800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1406 979 1094 0 0.001900 0.009100 0.101200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1407 980 715 2 0.004400 0.127500 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+1408 980 715 2 0.004400 0.125700 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+1409 980 1021 0 0.001600 0.008600 0.058200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1410 980 1023 0 0.005700 0.033390 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1411 980 1057 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1412 980 1085 0 0.007250 0.028620 0.062800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1413 981 720 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1414 981 720 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1415 981 986 0 0.002500 0.016000 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1416 981 1104 0 0.004300 0.028700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1417 983 1080 0 0.000130 0.001300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1418 984 726 1 0.004200 0.140000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1419 984 726 1 0.004400 0.137300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1420 984 726 1 0.004800 0.137800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1421 984 1039 0 0.001000 0.004600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1422 984 1048 0 0.002400 0.011020 0.162200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1423 984 1092 0 0.002700 0.012500 0.183400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1424 985 1055 0 0.001600 0.019700 0.343200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1425 985 1118 0 0.004400 0.063800 0.811600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1426 986 1051 0 0.007300 0.042500 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1427 986 1079 0 0.002400 0.015300 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1428 987 993 0 0.001800 0.018200 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1429 987 1091 0 0.000500 0.004700 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1430 988 731 2 0.007700 0.186400 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+1431 988 731 2 0.007700 0.186600 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+1432 988 994 0 0.015800 0.052200 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1433 988 1120 0 0.008680 0.046920 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1434 989 1019 1 0.000500 0.011700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1435 989 1241 0 0.020900 0.097700 0.038800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1436 990 737 2 0.007300 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1437 990 1099 0 0.001110 0.003830 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1438 991 1091 0 0.003300 0.007000 0.131800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1439 992 1095 0 0.000300 0.025250 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1440 993 749 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+1441 993 749 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+1442 993 1080 0 0.001400 0.013600 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1443 993 1097 0 0.013000 0.076450 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1444 994 1029 0 0.031000 0.118100 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1445 995 753 2 0.005420 0.130500 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+1446 995 753 2 0.005400 0.129800 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+1447 995 996 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1448 995 997 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1449 995 1038 0 0.003130 0.013150 0.223600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1450 996 1047 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1451 996 1076 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1452 997 1047 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1453 997 1076 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1454 998 982 2 0.004600 0.117200 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+1455 998 982 2 0.004600 0.117000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+1456 998 982 2 0.003200 0.120000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+1457 998 1048 0 0.003400 0.015600 0.230200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1458 999 754 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1459 999 754 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1460 999 754 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1461 999 1050 0 0.002320 0.058320 0.122600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1462 999 1091 0 0.003200 0.012490 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1463 999 1091 0 0.003150 0.027060 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1464 999 1110 0 0.004300 0.015900 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1465 1000 1002 2 0.002000 0.120000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+1466 1000 1062 0 0.001380 0.009250 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1467 1000 1094 0 0.000910 0.006060 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1468 1001 1002 2 0.002000 0.123000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+1469 1001 1062 0 0.001370 0.009100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1470 1005 765 1 0.004300 0.132700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+1471 1005 765 1 0.004500 0.133700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+1472 1005 765 1 0.004800 0.138300 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+1473 1005 1039 0 0.000300 0.001140 0.016800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1474 1005 1094 0 0.003390 0.015460 0.227800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1475 1006 770 2 0.007200 0.180000 0.000000 1.0581 1.0000 1.0000 0.00 0.00 0.00
+1476 1007 775 2 0.006700 0.179100 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+1477 1007 775 2 0.007700 0.180200 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+1478 1007 1068 0 0.008100 0.031700 0.214600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1479 1007 1078 0 0.006600 0.026600 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1480 1007 1104 0 0.001500 0.015000 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1481 1008 827 2 0.081000 0.288700 0.000000 1.0518 1.0000 1.0000 0.00 0.00 0.00
+1482 1008 1066 0 0.065600 0.250200 0.035000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1483 1009 780 1 0.005800 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1484 1009 780 1 0.010600 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1485 1009 780 1 0.006000 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1486 1009 1045 0 0.002500 0.024860 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1487 1009 1107 0 0.029880 0.124600 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1488 1009 1110 0 0.001990 0.008180 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1489 1010 784 2 0.010900 0.275000 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+1490 1010 784 2 0.012600 0.274700 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+1491 1010 1013 0 0.011400 0.040100 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1492 1010 1018 0 0.011200 0.025000 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1493 1010 1056 0 0.014620 0.053870 0.033000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1494 1010 1154 0 0.026280 0.105720 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1495 1011 789 1 0.004200 0.133500 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1496 1011 789 1 0.005800 0.180900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1497 1011 789 1 0.004100 0.134300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1498 1011 1012 0 0.002800 0.016300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1499 1011 1060 0 0.001100 0.006400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1500 1011 1060 0 0.001100 0.006700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1501 1012 1044 0 0.005500 0.013600 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1502 1012 1063 0 0.001740 0.017600 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1503 1013 1088 0 0.035200 0.122600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1504 1014 1037 0 0.011000 0.477800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1505 1014 1063 0 0.001120 0.011370 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1506 1014 1083 0 0.002800 0.018200 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1507 1015 1086 2 0.002600 0.053600 0.000000 1.0641 1.0000 1.0000 0.00 0.00 0.00
+1508 1015 1234 0 0.009300 0.057300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1509 1016 1032 0 0.042200 0.103400 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1510 1017 1020 0 0.016900 0.051800 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1511 1017 1089 0 0.006900 0.046300 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1512 1018 1065 0 0.041600 0.093800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1513 1019 804 2 0.016000 0.260000 0.000000 0.8852 1.0000 1.0000 0.00 0.00 0.00
+1514 1019 1046 0 0.015600 0.082000 0.134000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1515 1019 1051 0 0.008700 0.050800 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1516 1020 805 2 0.010800 0.276300 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+1517 1020 1066 0 0.057700 0.128100 0.016400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1518 1021 807 1 0.005700 0.177300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1519 1021 807 1 0.007000 0.181600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1520 1021 807 1 0.007700 0.181800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1521 1021 1022 0 0.004300 0.015400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1522 1021 1047 0 0.009300 0.033600 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1523 1021 1085 0 0.006100 0.021700 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1524 1022 1047 0 0.005200 0.019000 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1525 1022 1050 0 0.006100 0.023200 0.148600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1526 1023 1024 2 0.026900 0.568700 0.000000 0.9992 1.0000 1.0000 0.00 0.00 0.00
+1527 1023 1077 0 0.002100 0.012600 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1528 1025 1026 2 0.027400 0.568700 0.000000 1.0020 1.0000 1.0000 0.00 0.00 0.00
+1529 1025 1047 0 0.006400 0.037400 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1530 1025 1077 0 0.002200 0.012700 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1531 1027 1085 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1532 1027 1098 0 0.002800 0.011600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1533 1028 1085 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1534 1029 808 1 0.014700 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1535 1029 1030 1 0.015000 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1536 1029 1052 0 0.027910 0.098660 0.013600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1537 1031 809 2 0.004200 0.126000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+1538 1031 809 2 0.004300 0.127000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+1539 1031 1071 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1540 1031 1071 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1541 1031 1076 0 0.004600 0.026500 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1542 1032 697 2 0.017700 0.287300 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+1543 1032 697 2 0.015700 0.282700 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+1544 1032 1072 0 0.011900 0.058800 0.049000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1545 1032 1089 0 0.005300 0.025100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1546 1033 1044 0 0.001200 0.011500 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1547 1034 1061 0 0.001700 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1548 1035 1037 0 0.011400 0.485300 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1549 1035 1083 0 0.002500 0.016100 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1550 1036 1037 0 0.011300 0.489400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1551 1036 1083 0 0.002500 0.016400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1552 1038 815 2 0.007200 0.178900 0.000000 1.0047 1.0000 1.0000 0.00 0.00 0.00
+1553 1038 1076 0 0.006000 0.033100 0.083400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1554 1040 1096 0 0.001600 0.019900 0.346600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1555 1040 1310 0 0.001030 0.012210 0.218400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1556 1041 1103 0 0.002200 0.026960 0.467400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1557 1041 1312 0 0.001500 0.017500 0.312400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1558 1042 1090 0 0.001100 0.007000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1559 1043 1044 1 0.000500 0.025400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1560 1043 1093 0 0.000600 0.005900 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1561 1044 826 1 0.006000 0.182200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1562 1044 826 1 0.006900 0.184400 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1563 1044 826 1 0.006100 0.181300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1564 1044 826 1 0.011400 0.261700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1565 1044 1060 0 0.002100 0.014400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1566 1044 1081 0 0.004600 0.046200 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1567 1044 1105 0 0.010040 0.039610 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1568 1045 833 1 0.006000 0.175100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1569 1045 833 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1570 1045 833 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1571 1045 1064 0 0.010200 0.037100 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1572 1045 1097 0 0.001500 0.007100 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1573 1045 1097 0 0.001000 0.006700 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1574 1046 1079 0 0.017700 0.064200 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1575 1047 839 1 0.003600 0.132700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1576 1047 839 1 0.003500 0.130800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1577 1047 839 1 0.004000 0.139200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1578 1047 1048 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1579 1047 1048 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1580 1047 1049 1 0.013100 0.241100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1581 1047 1057 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1582 1050 841 1 0.006000 0.188200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1583 1050 841 1 0.006200 0.183100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1584 1050 841 1 0.005700 0.192700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1585 1050 841 1 0.006000 0.173600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1586 1050 1068 0 0.007600 0.028000 0.093800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1587 1050 1104 0 0.018000 0.085900 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1588 1051 861 2 0.007600 0.165800 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+1589 1051 861 2 0.007200 0.169300 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+1590 1052 1053 0 0.002810 0.018580 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1591 1052 1079 0 0.006460 0.018530 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1592 1053 865 2 0.006200 0.177800 0.000000 0.9002 1.0000 1.0000 0.00 0.00 0.00
+1593 1054 868 2 0.007000 0.174700 0.000000 0.9707 1.0000 1.0000 0.00 0.00 0.00
+1594 1054 1104 0 0.017800 0.118400 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1595 1055 1056 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1596 1055 1056 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1597 1055 1070 0 0.001920 0.021280 0.364800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1598 1055 1075 0 0.001400 0.017300 0.291200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1599 1055 1103 0 0.000990 0.012120 0.211400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1600 1055 1228 0 0.001750 0.020310 0.382000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1601 1056 1090 0 0.003800 0.014500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1602 1056 1090 0 0.002000 0.019400 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1603 1057 880 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1604 1057 880 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1605 1057 880 1 0.006000 0.168900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1606 1057 1071 0 0.036400 0.214000 0.216000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1607 1057 1076 0 0.004600 0.028200 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1608 1058 882 2 0.006800 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+1609 1058 1072 0 0.000500 0.004800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1610 1059 1060 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1611 1059 1061 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1612 1059 1062 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1613 1060 1063 0 0.005700 0.040700 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1614 1060 1094 0 0.001700 0.056100 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1615 1061 1091 0 0.004100 0.023700 0.120800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1616 1061 1091 0 0.005300 0.029800 0.076400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1617 1062 1092 0 0.005400 0.030000 0.075800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1618 1063 887 1 0.006500 0.223300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1619 1063 887 1 0.006200 0.237800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1620 1063 887 1 0.006300 0.240000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1621 1063 1083 0 0.003700 0.028800 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1622 1064 891 2 0.004500 0.127200 0.000000 0.9930 1.0000 1.0000 0.00 0.00 0.00
+1623 1064 1084 0 0.020400 0.074500 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1624 1065 893 2 0.013200 0.277700 0.000000 1.0287 1.0000 1.0000 0.00 0.00 0.00
+1625 1065 1086 0 0.037700 0.083700 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1626 1066 896 2 0.010200 0.264700 0.000000 1.0958 1.0000 1.0000 0.00 0.00 0.00
+1627 1068 905 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+1628 1068 905 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+1629 1068 1078 0 0.010500 0.038600 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1630 1069 907 2 0.007200 0.177800 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+1631 1069 907 2 0.007200 0.180000 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+1632 1070 1075 0 0.001700 0.020300 0.458200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1633 1070 1228 0 0.003400 0.039700 0.722600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1634 1070 1280 0 0.000100 0.001800 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1635 1071 1072 0 0.000900 0.099600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1636 1071 1072 0 0.000900 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1637 1072 1074 0 0.012400 0.070100 0.050200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1638 1072 1076 0 0.029650 0.210540 0.032200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1639 1073 1070 1 0.000500 0.027800 0.000000 1.0750 1.0000 1.0000 0.00 0.00 0.00
+1640 1074 1077 0 0.004500 0.022600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1641 1075 1076 1 0.000500 0.021670 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1642 1076 910 2 0.005600 0.177800 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+1643 1076 910 2 0.006000 0.179300 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+1644 1076 910 2 0.007700 0.186700 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+1645 1076 1087 0 0.022000 0.129000 0.020000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1646 1077 911 2 0.007700 0.178700 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+1647 1077 911 2 0.006200 0.173300 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+1648 1077 911 2 0.007800 0.185100 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+1649 1078 914 2 0.008300 0.180700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1650 1078 914 2 0.007700 0.179100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1651 1078 1104 0 0.002300 0.029400 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1652 1079 915 1 0.010500 0.278000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1653 1079 915 1 0.010500 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1654 1079 915 1 0.010800 0.272700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1655 1079 1097 0 0.015000 0.055300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1656 1079 1099 0 0.006400 0.022300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1657 1079 1100 0 0.005100 0.034600 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1658 1080 918 2 0.027000 0.600000 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+1659 1081 919 2 0.027000 0.600000 0.000000 0.9693 1.0000 1.0000 0.00 0.00 0.00
+1660 1083 1067 2 0.006200 0.182200 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+1661 1083 1067 2 0.006100 0.174700 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+1662 1083 1084 0 0.001100 0.093700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1663 1083 1084 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1664 1083 1105 0 0.003700 0.013900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1665 1084 1107 0 0.003300 0.011800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1666 1085 925 2 0.007600 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+1667 1085 925 2 0.007800 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+1668 1085 925 2 0.007600 0.186700 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+1669 1086 926 2 0.010300 0.266000 0.000000 1.0328 1.0000 1.0000 0.00 0.00 0.00
+1670 1087 934 2 0.006300 0.180700 0.000000 0.9847 1.0000 1.0000 0.00 0.00 0.00
+1671 1088 1089 0 0.001900 0.012500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1672 1089 936 2 0.005800 0.179100 0.000000 1.0793 1.0000 1.0000 0.00 0.00 0.00
+1673 1090 939 1 0.005600 0.173800 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1674 1090 939 1 0.005800 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1675 1090 939 1 0.007100 0.178400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+1676 1091 941 1 0.011100 0.202200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1677 1091 941 1 0.011300 0.206700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1678 1091 941 1 0.011600 0.211800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1679 1091 941 1 0.011400 0.208700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1680 1091 941 1 0.009900 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1681 1091 941 1 0.009800 0.177800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+1682 1091 1092 0 0.000900 0.117000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1683 1093 1094 1 0.000500 0.025000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1684 1094 1095 1 0.004700 0.119200 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+1685 1094 1095 1 0.004800 0.115100 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+1686 1096 1097 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1687 1096 1097 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1688 1096 1233 0 0.002400 0.032200 0.920800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1689 1097 1100 0 0.002600 0.017500 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1690 1099 1101 0 0.009500 0.021300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1691 1100 1101 0 0.007700 0.029200 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1692 1101 1102 2 0.027000 0.560500 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+1693 1101 1102 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+1694 1101 1102 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+1695 1103 1104 0 0.000500 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1696 1105 1106 2 0.027700 0.593300 0.000000 0.9640 1.0000 1.0000 0.00 0.00 0.00
+1697 1107 1108 0 0.001400 0.008600 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1698 1108 1109 2 0.027600 0.602700 0.000000 0.9690 1.0000 1.0000 0.00 0.00 0.00
+1699 1110 959 2 0.007000 0.171100 0.000000 0.9240 1.0000 1.0000 0.00 0.00 0.00
+1700 1111 1164 0 0.031900 0.075300 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1701 1111 1224 0 0.009200 0.021600 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1702 1112 1187 0 0.027800 0.045500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1703 1112 1195 0 0.057300 0.093900 0.019200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1704 1113 1146 0 0.028500 0.069900 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1705 1113 1162 0 0.022900 0.068400 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1706 1114 1128 0 0.007000 0.021300 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1707 1114 1148 0 0.025500 0.074100 0.019400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1708 1115 1217 0 0.068000 0.116000 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1709 1115 1235 0 0.060200 0.098800 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1710 1116 1195 0 0.091500 0.217600 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1711 1116 1215 0 0.032400 0.076400 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1712 1116 1221 0 0.030800 0.085400 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1713 1117 1223 0 0.027900 0.080400 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1714 1117 1246 0 0.053300 0.153400 0.040200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1715 1118 1119 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1716 1118 1180 0 0.002500 0.035400 0.458800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1717 1118 1206 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1718 1118 1206 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1719 1118 1226 0 0.001800 0.028300 0.321800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1720 1118 1233 0 0.002400 0.036600 0.836000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1721 1119 1170 0 0.001600 0.010400 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1722 1119 1185 0 0.010000 0.064800 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1723 1119 1198 0 0.010500 0.058800 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1724 1119 1214 0 0.004100 0.036500 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1725 1119 1219 0 0.015500 0.102000 0.027600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1726 1119 1237 0 0.014000 0.133500 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1727 1121 1196 0 0.005700 0.029800 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1728 1121 1242 0 0.001300 0.005300 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1729 1122 1172 0 0.047900 0.112800 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1730 1122 1240 0 0.035800 0.084300 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1731 1123 1198 0 0.029100 0.088000 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1732 1123 1222 0 0.051300 0.155300 0.037000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1733 1124 1132 0 0.016000 0.046000 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1734 1124 1141 0 0.014700 0.042400 0.011000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1735 1125 1237 0 0.051400 0.120200 0.030600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1736 1126 1137 0 0.015800 0.117300 0.034400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1737 1126 1170 0 0.019100 0.124100 0.034600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1738 1126 1220 0 0.009300 0.060200 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1739 1126 1227 0 0.008800 0.036900 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1740 1126 1244 0 0.004500 0.013300 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1741 1127 1138 0 0.017000 0.052100 0.048000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1742 1127 1197 0 0.023200 0.152200 0.041200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1743 1127 1218 0 0.016300 0.089000 0.023400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1744 1127 1247 0 0.023500 0.127200 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1745 1128 1231 0 0.039300 0.140900 0.035400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1746 1129 1144 0 0.051700 0.117300 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1747 1129 1207 0 0.003900 0.025600 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1748 1130 1208 0 0.013100 0.037800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1749 1131 1144 0 0.029000 0.086300 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1750 1131 1186 0 0.027100 0.078000 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1751 1131 1190 0 0.041300 0.119000 0.032000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1752 1132 1137 0 0.004300 0.046300 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1753 1132 1219 0 0.015700 0.103400 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1754 1133 1176 0 0.078700 0.154600 0.032600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1755 1133 1205 0 0.003500 0.013600 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1756 1133 1210 0 0.027100 0.146100 0.038400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1757 1133 1211 0 0.026400 0.079700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1758 1133 1238 0 0.044500 0.097200 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1759 1133 1241 0 0.017600 0.073100 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1760 1134 1173 0 0.046400 0.109700 0.027000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1761 1134 1224 0 0.057000 0.135400 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1762 1134 1245 0 0.048100 0.138700 0.036200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1763 1135 1151 0 0.004000 0.017400 0.004600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1764 1135 1163 0 0.002400 0.008100 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1765 1136 1152 0 0.000900 0.009400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1766 1136 1155 0 0.016900 0.033000 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1767 1136 1166 0 0.008200 0.018900 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1768 1136 1225 0 0.034900 0.100400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1769 1136 1231 0 0.006200 0.018800 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1770 1137 1162 0 0.010300 0.112200 0.034000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1771 1137 1220 0 0.019000 0.169300 0.049800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1772 1137 1227 0 0.007500 0.081300 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1773 1138 1205 0 0.008900 0.027800 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1774 1139 1191 0 0.028100 0.047400 0.009200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1775 1139 1232 0 0.083800 0.136700 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1776 1140 1151 0 0.064400 0.115200 0.024400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1777 1140 1167 0 0.007000 0.031300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1778 1140 1179 0 0.009800 0.098400 0.029800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1779 1140 1183 0 0.017100 0.071200 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1780 1140 1189 0 0.001600 0.016900 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1781 1140 1189 0 0.001500 0.015900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1782 1141 1142 0 0.027800 0.071900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1783 1142 1153 0 0.013000 0.084700 0.023000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1784 1142 1159 0 0.061700 0.114600 0.025400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1785 1142 1162 0 0.022000 0.143900 0.039000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1786 1142 1199 0 0.014300 0.051800 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1787 1142 1199 0 0.018900 0.049500 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1788 1142 1227 0 0.034600 0.146200 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1789 1142 1244 0 0.025000 0.168200 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1790 1142 1246 0 0.021500 0.065600 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1791 1143 1198 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1792 1143 1198 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1793 1144 1150 0 0.031700 0.139300 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1794 1144 1174 0 0.025100 0.159800 0.043600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1795 1144 1183 0 0.015300 0.063600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1796 1144 1204 0 0.001200 0.005100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1797 1145 1177 0 0.119000 0.269900 0.064400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1798 1145 1179 0 0.012400 0.065700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1799 1146 1159 0 0.027500 0.040100 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1800 1146 1169 0 0.009400 0.023100 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1801 1146 1191 0 0.072100 0.134100 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1802 1147 1181 0 0.006800 0.020700 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1803 1147 1202 0 0.011900 0.036000 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1804 1148 1158 0 0.023500 0.067700 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1805 1149 1171 0 0.002200 0.023700 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1806 1149 1229 0 0.003400 0.037100 0.011200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1807 1150 1178 0 0.049000 0.085100 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1808 1150 1181 0 0.050300 0.151200 0.036400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1809 1150 1238 0 0.011800 0.035100 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1810 1151 1207 0 0.006400 0.041400 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1811 1151 1229 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1812 1151 1229 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1813 1151 1242 0 0.041600 0.169100 0.045000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1814 1153 1175 0 0.001800 0.005400 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1815 1155 1240 0 0.026100 0.061600 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1816 1156 1237 0 0.004900 0.009800 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1817 1157 1164 0 0.036300 0.104500 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1818 1157 1208 0 0.008600 0.024800 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1819 1158 1201 0 0.008400 0.024300 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1820 1160 1168 0 0.008200 0.025000 0.006000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1821 1160 1171 0 0.004600 0.015500 0.003800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1822 1161 1211 0 0.002100 0.010400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1823 1161 1237 0 0.029500 0.093600 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1824 1162 1201 0 0.037300 0.122400 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1825 1162 1244 0 0.009000 0.029900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1826 1163 1171 0 0.015500 0.049500 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1827 1163 1179 0 0.038200 0.142300 0.085200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1828 1164 1184 0 0.037400 0.087200 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1829 1164 1216 0 0.038100 0.089800 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1830 1165 1006 2 0.001400 0.038000 0.000000 1.0675 1.0000 1.0000 0.00 0.00 0.00
+1831 1165 1181 0 0.007460 0.044800 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1832 1166 1217 0 0.010300 0.038500 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1833 1167 1200 0 0.000500 0.003200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1834 1168 1202 0 0.007100 0.021500 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1835 1171 1154 1 0.000800 0.015500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1836 1171 1229 0 0.006500 0.061100 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1837 1171 1248 0 0.026200 0.109100 0.029200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1838 1172 1195 0 0.053500 0.124600 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1839 1173 1232 0 0.023400 0.045700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1840 1174 1242 0 0.019800 0.083100 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1841 1175 1246 0 0.005600 0.016900 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1842 1176 1237 0 0.016200 0.031800 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1843 1177 1221 0 0.043500 0.125300 0.032800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1844 1178 1237 0 0.067100 0.114700 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1845 1179 1217 0 0.007000 0.055000 0.019800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1846 1179 1234 0 0.005300 0.057300 0.017200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1847 1180 1188 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1848 1180 1188 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1849 1180 1226 0 0.000600 0.007100 0.137000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1850 1180 1228 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1851 1180 1228 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1852 1182 1217 0 0.006700 0.022600 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1853 1182 1231 0 0.011200 0.071500 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1854 1184 1195 0 0.034000 0.079100 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1855 1185 1194 0 0.005200 0.033800 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1856 1187 1235 0 0.081500 0.129600 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1857 1188 1226 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1858 1188 1226 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1859 1190 1201 0 0.017700 0.050900 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1860 1190 1220 0 0.015100 0.098900 0.026800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1861 1192 1193 0 0.000200 0.000500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1862 1192 1224 0 0.020500 0.062000 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1863 1194 1236 0 0.002000 0.013000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1864 1196 1217 0 0.005700 0.035600 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1865 1198 1214 0 0.004200 0.045100 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1866 1198 1236 0 0.011600 0.036300 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1867 1198 1237 0 0.032200 0.069100 0.047400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1868 1198 1237 0 0.023000 0.094500 0.024600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1869 1200 1217 0 0.003900 0.017400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1870 1203 1212 0 0.001400 0.004000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1871 1203 1235 0 0.035000 0.099900 0.026000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1872 1206 1313 0 0.000500 0.006300 0.095800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1873 1206 1321 0 0.003600 0.048000 0.582000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1874 1209 1213 0 0.064100 0.184800 0.048200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1875 1209 1215 0 0.042600 0.100400 0.025000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1876 1210 1247 0 0.021400 0.115700 0.030400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1877 1213 1216 0 0.030200 0.071200 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1878 1217 1243 0 0.015300 0.063700 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1879 1218 1247 0 0.008500 0.046400 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1880 1222 1244 0 0.006600 0.019300 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1881 1223 1232 0 0.033300 0.081600 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1882 1226 1227 1 0.000400 0.019000 0.000000 0.9850 1.0000 1.0000 0.00 0.00 0.00
+1883 1227 1244 0 0.002300 0.024800 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1884 1228 1229 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1885 1228 1230 0 0.002400 0.036600 0.416000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1886 1229 1234 0 0.007890 0.086120 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1887 1229 1243 0 0.023000 0.151200 0.041000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1888 1230 1231 1 0.000400 0.185000 0.000000 1.0110 1.0000 1.0000 0.00 0.00 0.00
+1889 1231 1239 0 0.003100 0.033500 0.010200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1890 1232 1245 0 0.050500 0.124000 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1891 1239 1243 0 0.026900 0.114000 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1892 1243 1248 0 0.028700 0.116900 0.031000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1893 1247 1120 1 0.001700 0.033700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1894 1249 1252 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1895 1249 1252 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1896 1249 1252 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1897 1249 1290 0 0.010550 0.076000 0.115000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1898 1250 1257 0 0.000600 0.006200 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1899 1250 1270 0 0.000490 0.004820 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1900 1251 1272 0 0.021800 0.151100 0.223800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1901 1251 1302 0 0.012700 0.090900 0.135400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1902 1252 1253 1 0.000700 0.021100 0.000000 1.0610 1.0000 1.0000 0.00 0.00 0.00
+1903 1252 1270 0 0.003390 0.033600 0.219800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1904 1252 1294 0 0.003800 0.037800 0.246200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1905 1252 1296 1 0.000600 0.015100 0.000000 1.0720 1.0000 1.0000 0.00 0.00 0.00
+1906 1253 1324 0 0.001000 0.007000 0.014000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1907 1254 1266 0 0.001780 0.012020 0.076600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1908 1255 1256 0 0.000300 0.013550 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1909 1255 1258 0 0.007700 0.053800 0.335000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1910 1255 1263 0 0.005900 0.040500 0.250800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1911 1255 1281 0 0.005500 0.054100 0.363600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1912 1255 1290 0 0.010800 0.100190 0.170400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1913 1255 1290 0 0.015000 0.105500 0.158000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1914 1255 1290 0 0.010500 0.100000 0.170000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1915 1255 1309 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1916 1255 1309 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1917 1256 1304 0 0.005800 0.028100 0.017000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1918 1256 1308 0 0.096500 0.366900 0.054000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1919 1257 1290 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1920 1257 1290 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1921 1257 1294 0 0.001040 0.009300 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1922 1257 1301 0 0.001700 0.011700 0.289600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1923 1258 1281 0 0.002900 0.028500 0.192000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1924 1258 1305 0 0.005400 0.036900 0.228600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1925 1259 1260 0 0.043000 0.303100 0.463000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1926 1259 1264 0 0.029100 0.226700 0.342800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1927 1259 1272 0 0.008500 0.058800 0.087000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1928 1259 1297 0 0.007300 0.050400 0.074000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1929 1260 1264 0 0.012000 0.083600 0.123600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1930 1260 1272 0 0.046800 0.336900 0.519800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1931 1260 1273 0 0.029400 0.230400 0.349400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1932 1260 1273 0 0.037600 0.263000 0.396000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1933 1260 1285 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1934 1260 1285 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1935 1260 1289 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1936 1260 1297 0 0.048900 0.349200 0.538000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1937 1260 1301 0 0.002000 0.015300 0.214000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1938 1260 1301 0 0.005700 0.045000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1939 1260 1301 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1940 1260 1301 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1941 1261 1268 0 0.001620 0.009700 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1942 1261 1276 0 0.001530 0.009400 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1943 1262 1274 0 0.013700 0.095700 0.141000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1944 1262 1291 0 0.011200 0.077200 0.482400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1945 1262 1291 0 0.011200 0.079000 0.471400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1946 1263 1290 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1947 1263 1290 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1948 1263 1295 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1949 1263 1295 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1950 1265 1271 0 0.002480 0.024470 0.164800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1951 1266 1273 0 0.003580 0.035200 0.239000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1952 1266 1302 0 0.004500 0.044250 0.301000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1953 1267 1288 0 0.017300 0.198800 0.700000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1954 1267 1291 0 0.009100 0.062300 0.385600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1955 1267 1295 0 0.008500 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1956 1267 1295 0 0.008600 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1957 1268 1284 0 0.002100 0.008300 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1958 1269 1278 0 0.004440 0.051440 3.597000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1959 1269 1288 1 0.000740 0.020400 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+1960 1269 1300 0 0.002440 0.032620 2.236000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1961 1270 1290 0 0.001020 0.010050 0.066400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1962 1271 1295 0 0.003920 0.038140 0.258000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1963 1272 1273 0 0.012300 0.125500 0.194000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1964 1272 1289 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1965 1272 1302 0 0.007500 0.077300 0.119000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1966 1273 1302 0 0.023900 0.170800 0.255600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1967 1274 1293 0 0.014500 0.058010 0.094000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1968 1274 1293 0 0.007700 0.056910 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1969 1275 1093 1 0.000400 0.002500 0.000000 1.0450 1.0000 1.0000 0.00 0.00 0.00
+1970 1275 1276 1 0.001200 0.039600 0.000000 1.0250 1.0000 1.0000 0.00 0.00 0.00
+1971 1275 1306 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1972 1277 1284 0 0.062700 0.250000 0.067200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1973 1277 1284 0 0.102000 0.236000 0.060600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1974 1277 1304 0 0.085500 0.342000 0.091400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1975 1277 1308 0 0.080800 0.234400 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1976 1278 1279 1 0.000250 0.015400 0.000000 0.8800 1.0000 1.0000 0.00 0.00 0.00
+1977 1279 1301 0 0.000420 0.006700 0.110800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1978 1280 1281 1 0.000200 0.024200 0.000000 0.9300 1.0000 1.0000 0.00 0.00 0.00
+1979 1281 1282 0 0.000000 0.009400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1980 1281 1307 0 0.000500 0.006500 0.103800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1981 1283 1284 0 0.000400 0.017200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1982 1283 1305 0 0.000770 0.006480 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1983 1286 1323 0 0.001000 0.007000 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1984 1287 1301 0 0.000300 0.001700 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1985 1288 1293 0 0.029050 0.112070 0.195000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1986 1288 1293 0 0.014850 0.114140 0.193000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1987 1290 1292 0 0.000680 0.006680 0.399000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1988 1290 1294 0 0.001050 0.008370 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1989 1291 1301 0 0.025400 0.177700 0.270400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1990 1291 1301 0 0.024400 0.176700 0.271600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1991 1296 1322 0 0.001000 0.007000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1992 1298 1299 0 0.000170 0.012340 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1993 1298 1300 0 0.001840 0.024450 1.662000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1994 1302 1286 1 0.000000 0.083300 0.000000 1.0300 1.0000 1.0000 0.00 0.00 0.00
+1995 1302 1303 1 0.000500 0.018200 0.000000 1.1030 1.0000 1.0000 0.00 0.00 0.00
+1996 1305 1306 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1997 1307 1308 1 0.000330 0.013000 0.000000 1.0500 1.0000 1.0000 0.00 0.00 0.00
+1998 1307 1309 0 0.009220 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+1999 1307 1309 0 0.009200 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2000 1310 1311 0 0.000000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2001 1310 1317 0 0.001700 0.021000 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2002 1312 1317 0 0.001000 0.012300 0.150000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2003 1313 1314 0 0.000800 0.009800 0.120000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2004 1314 1318 0 0.001000 0.012000 0.160000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2005 1314 1319 0 0.004200 0.063000 0.200000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2006 1314 1321 0 0.003100 0.027000 0.050000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2007 1314 1321 0 0.001140 0.018000 0.270000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2008 1315 1316 0 0.100000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2009 1315 1318 0 0.000300 0.003800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2010 1315 1318 0 0.003000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2011 1315 1320 0 0.030000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2012 1315 1321 0 0.000400 0.005000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2013 1315 1322 0 0.014000 1.139997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2014 1315 1324 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2015 1316 1317 0 0.001800 0.023000 0.284000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2016 1316 1317 0 0.010000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2017 1316 1318 0 0.030000 0.999999 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2018 1316 1319 0 0.006000 0.068000 0.740000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2019 1316 1320 0 0.050000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2020 1317 1320 0 0.020000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2021 1317 1322 0 -0.200000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2022 1317 1323 0 -0.400000 2.500001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2023 1317 1324 0 0.083000 0.600000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2024 1318 1320 0 0.004200 0.050000 0.080000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2025 1318 1320 0 0.060000 0.700001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2026 1318 1322 0 0.030000 1.009997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2027 1318 1323 0 0.070000 1.830000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2028 1319 1320 0 0.001300 0.029000 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2029 1319 1321 0 0.002200 0.046410 0.400000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2030 1320 1321 0 0.004000 0.044000 0.500000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2031 1320 1324 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2032 1322 1323 0 -0.040450 0.278890 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2033 1322 1324 0 -0.000010 0.002750 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2034 1323 1324 0 -0.178800 0.710991 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2035 1325 1546 0 0.270000 0.349000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2036 1325 1610 0 0.035000 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2037 1326 1333 0 0.292000 0.386000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2038 1326 1552 0 0.002000 0.010000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2039 1327 1419 0 0.025400 0.031800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2040 1327 1490 0 0.027100 0.033900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2041 1328 1450 0 0.288800 0.361900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2042 1328 1583 0 0.233400 0.291900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2043 1329 1407 0 0.124600 0.156000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2044 1329 1552 0 0.333900 0.417900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2045 1330 1433 0 0.163200 0.189500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2046 1330 1537 0 0.092700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2047 1331 1369 0 0.197500 0.229300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2048 1331 1389 0 0.280100 0.333200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2049 1332 1362 0 0.018600 0.024300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2050 1332 1441 0 0.065900 0.164200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2051 1332 1443 0 0.018300 0.044700 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2052 1332 1523 0 0.030700 0.082400 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2053 1332 1535 0 0.020200 0.059200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2054 1332 1591 0 0.019000 0.023800 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2055 1333 1546 0 0.262000 0.339000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2056 1334 1373 0 0.201500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2057 1334 1430 0 0.040300 0.046800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2058 1334 1540 0 0.156000 0.525000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2059 1335 1446 0 0.301300 0.479100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2060 1335 1448 0 0.178000 0.222700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2061 1336 1349 0 0.125100 0.169700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2062 1336 1404 0 0.057600 0.072100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2063 1337 1414 0 0.265000 0.343000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2064 1337 1618 0 0.245000 0.317000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2065 1338 1404 0 0.064400 0.080600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2066 1338 1569 0 0.036600 0.079900 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2067 1339 1348 0 0.296200 0.369500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2068 1339 1410 0 0.506000 0.504700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2069 1339 1461 0 0.374700 0.469600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2070 1339 1489 0 0.828700 0.846900 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2071 1340 1381 0 0.136000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2072 1340 1601 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2073 1341 1547 0 0.294200 0.368600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2074 1341 1555 0 0.338500 0.420000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2075 1342 1575 0 0.137110 0.799561 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2076 1342 1613 0 0.016800 0.050100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2077 1343 1525 0 0.233700 0.271400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2078 1343 1560 0 0.338500 0.423800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2079 1344 1446 0 0.057400 0.142400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2080 1344 1465 0 0.018900 0.044800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2081 1345 1399 0 0.054000 0.136000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2082 1345 1597 0 0.100000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2083 1346 1351 0 0.276500 0.336500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2084 1346 1551 0 0.067800 0.086200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2085 1347 1358 0 0.503600 0.627200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2086 1347 1413 0 0.200000 0.250100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2087 1348 1511 0 0.407000 0.474000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2088 1349 1482 0 0.113000 0.152000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2089 1349 1517 0 0.025220 0.066400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2090 1349 1613 0 0.013750 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2091 1350 1526 0 0.182900 0.462700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2092 1350 1574 0 0.145100 0.367300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2093 1352 1357 0 0.118600 0.153200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2094 1352 1464 0 0.173000 0.216500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2095 1353 1378 0 0.144000 0.180200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2096 1353 1562 0 0.040200 0.061200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2097 1354 1473 0 0.368700 0.428800 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2098 1354 1478 0 0.272000 0.315900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2099 1355 1420 0 0.070500 0.178400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2100 1355 1421 0 0.112900 0.165500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2101 1356 1481 0 0.129000 0.161600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2102 1356 1595 0 0.284100 0.356000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2103 1357 1552 0 0.155900 0.195200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2104 1358 1372 0 0.088000 0.161000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2105 1358 1460 0 0.200000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2106 1358 1490 0 0.048400 0.060200 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2107 1358 1491 0 0.037000 0.062000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2108 1358 1520 0 0.308000 0.437000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2109 1360 1589 0 0.160700 0.214200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2110 1360 1605 0 0.061000 0.076300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2111 1361 1392 0 0.048000 0.061000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2112 1361 1601 0 0.099000 0.125000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2113 1362 1429 0 0.019600 0.025800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2114 1363 1428 0 0.030500 0.038200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2115 1363 1591 0 0.040700 0.050700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2116 1364 1448 0 0.247500 0.309500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2117 1364 1617 0 0.214700 0.268600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2118 1365 1422 0 0.056500 0.104100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2119 1365 1538 0 0.235800 0.291700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2120 1366 1588 0 0.011000 0.028000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2121 1367 1588 0 0.147100 0.184300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2122 1367 1611 0 0.394300 0.419400 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2123 1368 1391 0 0.213000 0.266000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2124 1368 1399 0 0.290200 0.413400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2125 1368 1470 0 0.272600 0.361100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2126 1368 1512 0 0.066500 0.082300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2127 1369 1534 0 0.278100 0.322900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2128 1369 1558 0 0.326400 0.404600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2129 1370 1405 0 0.152900 0.270300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2130 1370 1601 0 0.066800 0.157200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2131 1371 1506 0 0.359000 0.417000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2132 1371 1525 0 0.296000 0.371000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2133 1372 1610 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2134 1373 1536 0 0.225400 0.261800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2135 1374 1495 0 0.083000 0.114000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2136 1374 1509 0 0.096000 0.198000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2137 1375 1492 0 0.157200 0.196900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2138 1375 1596 0 0.091800 0.232400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2139 1376 1561 0 0.051900 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2140 1376 1596 0 0.076300 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2141 1378 1432 0 0.146900 0.172200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2142 1379 1530 0 0.065600 0.166000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2143 1379 1614 0 0.248300 0.374800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2144 1380 1456 0 0.282100 0.327600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2145 1380 1473 0 0.229700 0.266900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2146 1380 1475 0 0.357200 0.416900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2147 1380 1500 0 0.243000 0.326000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2148 1381 1516 0 0.221100 0.258500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2149 1382 1449 0 0.172900 0.272900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2150 1382 1556 0 0.211600 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2151 1382 1562 0 0.248400 0.378300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2152 1382 1608 0 0.264600 0.366300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2153 1383 1432 0 0.336000 0.549100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2154 1383 1606 0 0.144600 0.192400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2155 1384 1601 0 0.016400 0.037000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2156 1385 1470 0 0.260000 0.250000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2157 1385 1548 0 0.074000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2158 1386 1476 0 0.474401 0.484100 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2159 1386 1514 0 0.224500 0.216100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2160 1387 1437 0 0.091000 0.184000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2161 1387 1508 0 0.079000 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2162 1389 1467 0 0.308300 0.386300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2163 1390 1527 0 0.036000 0.172000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2164 1390 1577 0 0.023000 0.075000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2165 1391 1620 0 0.038900 0.050800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2166 1392 1605 0 0.096600 0.130800 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2167 1393 1351 1 0.139500 0.467100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2168 1393 1538 0 0.233000 0.559600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2169 1393 1586 0 0.079000 0.102000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2170 1394 1399 0 0.060000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2171 1394 1522 0 0.027000 0.042000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2172 1395 1399 0 0.045400 0.111400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2173 1395 1521 0 0.057200 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2174 1396 1441 0 0.067800 0.088900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2175 1396 1466 0 0.013400 0.033600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2176 1397 1453 0 0.021000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2177 1397 1466 0 0.027000 0.068000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2178 1398 1424 0 0.050000 0.086000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2179 1398 1437 0 0.076300 0.192800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2180 1398 1457 0 0.099000 0.128000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2181 1398 1541 0 0.024000 0.061000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2182 1399 1565 0 0.130000 0.324000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2183 1400 1558 0 0.436300 0.497300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2184 1400 1579 0 0.397000 0.468200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2185 1401 1442 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2186 1402 1466 0 0.143200 0.182300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2187 1402 1468 0 0.155200 0.194400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2188 1403 1539 0 0.115800 0.145000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2189 1403 1618 0 0.192500 0.241300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2190 1405 1550 0 0.019000 0.068200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2191 1406 1541 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2192 1406 1576 0 0.057000 0.141000 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2193 1407 1448 0 0.181400 0.226800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2194 1408 1442 0 0.056300 0.073000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2195 1408 1519 0 0.016700 0.029100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2196 1409 1463 0 0.118000 0.152000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2197 1409 1520 0 0.129000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2198 1410 1525 0 0.229700 0.287800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2199 1412 1485 0 0.070500 0.081900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2200 1412 1521 0 0.060400 0.075700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2201 1413 1617 0 0.110100 0.137800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2202 1414 1460 0 0.180000 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2203 1417 1540 0 0.296000 0.282000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2204 1417 1588 0 0.339000 0.381000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2205 1418 1491 0 0.022000 0.056000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2206 1418 1571 0 0.163000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2207 1419 1570 0 0.176300 0.224000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2208 1420 1551 0 0.092400 0.115700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2209 1421 1612 0 0.065600 0.085500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2210 1422 1494 0 0.133400 0.250800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2211 1422 1612 0 0.066400 0.168100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2212 1423 1534 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2213 1425 1545 0 0.137000 0.159100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2214 1425 1557 0 0.259300 0.324500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2215 1426 1553 0 0.058000 0.150000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2216 1426 1597 0 0.052000 0.064000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2217 1428 1577 0 0.117100 0.174000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2218 1429 1615 0 0.031100 0.070800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2219 1430 1515 0 0.199000 0.239000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2220 1431 1459 0 0.005900 0.016700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2221 1431 1517 0 0.020500 0.054900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2222 1431 1575 0 0.012200 0.038400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2223 1432 1445 0 0.069400 0.086800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2224 1432 1526 0 0.271300 0.426200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2225 1433 1595 0 0.216400 0.248300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2226 1434 1486 0 0.085000 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2227 1434 1513 0 0.187000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2228 1435 1543 0 0.322400 0.404000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2229 1435 1588 0 0.094200 0.146700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2230 1436 1526 0 0.221600 0.277700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2231 1436 1608 0 0.150900 0.188700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2232 1437 1589 0 0.178900 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2233 1437 1599 0 0.077700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2234 1438 1495 0 0.155500 0.301300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2235 1438 1553 0 0.028100 0.064600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2236 1439 1458 0 0.141000 0.163800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2237 1439 1518 0 0.198000 0.256200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2238 1440 1453 0 0.026000 0.044000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2239 1440 1524 0 0.084000 0.103000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2240 1443 1444 0 0.021000 0.052000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2241 1443 1523 0 0.027000 0.066000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2242 1444 1466 0 0.085200 0.181500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2243 1445 1458 0 0.266700 0.308000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2244 1446 1476 0 0.181900 0.256900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2245 1446 1479 0 0.115400 0.170200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2246 1447 1548 0 0.093000 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2247 1447 1586 0 0.067000 0.168000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2248 1448 1563 0 0.254000 0.334000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2249 1449 1480 0 0.171500 0.210600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2250 1450 1492 0 0.184700 0.232100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2251 1452 1479 0 0.296400 0.386200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2252 1452 1516 0 0.032700 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2253 1454 1468 0 0.181300 0.227200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2254 1454 1545 0 0.142600 0.178800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2255 1455 1601 0 0.214000 0.272000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2256 1455 1605 0 0.012000 0.015000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2257 1456 1611 0 0.100700 0.117000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2258 1457 1600 0 0.068000 0.083000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2259 1459 1575 0 0.018020 0.055090 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2260 1459 1601 0 0.015680 0.073070 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2261 1461 1532 0 0.306200 0.383800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2262 1462 1466 0 0.032600 0.072500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2263 1462 1585 0 0.259200 0.331900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2264 1463 1616 0 0.156000 0.191000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2265 1464 1516 0 0.076500 0.095800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2266 1465 1547 0 0.118900 0.149000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2267 1467 1539 0 0.195500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2268 1467 1616 0 0.172000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2269 1470 1512 0 0.206000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2270 1470 1548 0 0.260900 0.343300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2271 1471 1561 0 0.266700 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2272 1472 1544 0 0.058000 0.144000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2273 1472 1570 0 0.225400 0.280500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2274 1472 1583 0 0.078100 0.097700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2275 1472 1584 0 0.142400 0.340700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2276 1474 1548 0 0.180000 0.220000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2277 1474 1565 0 0.114000 0.284000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2278 1475 1537 0 0.094700 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2279 1478 1618 0 0.194300 0.241400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2280 1480 1518 0 0.128900 0.161500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2281 1480 1530 0 0.140000 0.588000 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2282 1480 1599 0 0.255900 0.397000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2283 1480 1602 0 0.219900 0.255800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2284 1480 1609 0 0.179500 0.209000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2285 1481 1554 0 0.044300 0.054600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2286 1482 1600 0 0.080000 0.098000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2287 1483 1527 0 0.133000 0.170000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2288 1483 1557 0 0.005000 0.024000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2289 1484 1517 0 0.020450 0.054930 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2290 1484 1601 0 0.024000 0.075000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2291 1485 1577 0 0.021000 0.135700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2292 1486 1578 0 0.017000 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2293 1487 1569 0 0.077200 0.096900 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2294 1487 1604 0 0.220000 0.276200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2295 1489 1533 0 0.359000 0.450400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2296 1489 1579 0 0.572300 0.716900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2297 1493 1497 0 0.135000 0.189900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2298 1493 1584 0 0.086900 0.219900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2299 1494 1553 0 0.058600 0.145900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2300 1495 1510 0 0.194100 0.229600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2301 1495 1564 0 0.080000 0.198000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2302 1496 1546 0 0.200000 0.256000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2303 1496 1596 0 0.043000 0.108000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2304 1497 1596 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2305 1498 1605 0 0.053200 0.131900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2306 1499 1557 0 0.051700 0.070100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2307 1500 1563 0 0.280500 0.377400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2308 1502 1569 0 0.058000 0.170000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2309 1502 1573 0 0.075000 0.185000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2310 1504 1531 0 0.020000 0.026000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2311 1505 1531 0 0.043400 0.054300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2312 1506 1532 0 0.397000 0.497000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2313 1507 1515 0 0.270000 0.329500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2314 1507 1525 0 0.078200 0.094000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2315 1508 1582 0 0.016000 0.040000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2316 1509 1531 0 0.080000 0.141000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2317 1510 1531 0 0.065000 0.112000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2318 1511 1566 0 0.285900 0.333100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2319 1513 1516 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2320 1514 1554 0 0.234500 0.225100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2321 1516 1614 0 0.363400 0.425500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2322 1519 1531 0 0.044000 0.057000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2323 1522 1594 0 0.037000 0.088000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2324 1523 1535 0 0.009000 0.020000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2325 1523 1608 0 0.204100 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2326 1524 1557 0 0.099000 0.248000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2327 1524 1568 0 0.029000 0.128000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2328 1526 1585 0 0.152900 0.209100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2329 1527 1529 0 0.057900 0.108900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2330 1527 1568 0 0.012000 0.017000 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2331 1528 1530 0 0.008200 0.020500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2332 1528 1605 0 0.100700 0.126200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2333 1529 1577 0 0.106200 0.139800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2334 1530 1582 0 0.161000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2335 1530 1607 0 0.130000 0.246600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2336 1532 1533 0 0.662900 0.830700 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2337 1536 1611 0 0.135300 0.157100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2338 1537 1555 0 0.268000 0.335800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2339 1540 1590 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2340 1543 1595 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2341 1544 1593 0 0.037000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2342 1550 1569 0 0.011200 0.037400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2343 1552 1604 0 0.215300 0.263900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2344 1553 1594 0 0.186000 0.241000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2345 1554 1555 0 0.298200 0.373700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2346 1557 1620 0 0.173300 0.218900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2347 1558 1559 0 0.274000 0.318200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2348 1558 1592 0 0.222000 0.234000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2349 1559 1619 0 0.211500 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2350 1560 1590 0 0.296000 0.363000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2351 1566 1592 0 0.249000 0.264000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2352 1566 1611 0 0.532800 0.529500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2353 1569 1578 0 0.063000 0.085000 0.007800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2354 1571 1593 0 0.058000 0.075000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2355 1574 1606 0 0.318500 0.370700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2356 1577 1615 0 0.012700 0.036100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2357 1602 1607 0 0.229700 0.266800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2358 1602 1609 0 0.040400 0.046900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2359 1617 1618 0 0.351500 0.442100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2360 1618 1619 0 0.358500 0.419200 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2361 1622 1326 2 0.010800 0.276300 0.000000 1.0301 1.0000 1.0000 0.00 0.00 0.00
+2362 1622 1636 0 0.000400 0.002400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2363 1622 1637 0 0.001500 0.003400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2364 1622 1731 0 0.008300 0.053400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2365 1623 1624 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2366 1623 1624 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2367 1623 1660 0 0.002100 0.009600 0.140600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2368 1623 1663 0 0.003400 0.018130 0.138600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2369 1623 1667 0 0.000900 0.004300 0.063200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2370 1625 1695 0 0.006340 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2371 1626 1696 0 0.006350 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2372 1627 1334 2 0.007000 0.180000 0.000000 1.0097 1.0000 1.0000 0.00 0.00 0.00
+2373 1627 1628 0 0.027000 0.103000 0.014400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2374 1627 1748 0 0.022100 0.084300 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2375 1628 1339 2 0.010900 0.272000 0.000000 1.0680 1.0000 1.0000 0.00 0.00 0.00
+2376 1628 1670 0 0.028500 0.108600 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2377 1629 1349 2 0.004200 0.127000 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+2378 1629 1349 2 0.004300 0.127300 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+2379 1629 1669 0 0.013500 0.029950 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2380 1629 1690 0 0.004500 0.016100 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2381 1629 1718 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2382 1629 1718 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2383 1629 1731 0 0.011100 0.025700 0.013400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2384 1629 1744 0 0.008600 0.031400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2385 1629 1752 0 0.009100 0.033000 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2386 1629 1760 0 0.002340 0.010260 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2387 1630 1631 1 0.000300 0.010200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2388 1630 1632 1 0.000500 0.032900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2389 1630 1633 1 0.000800 0.031100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2390 1630 1702 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2391 1630 1703 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2392 1630 1758 0 0.000900 0.011000 0.192600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2393 1630 1758 0 0.000900 0.011000 0.385200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2394 1631 1705 0 0.002000 0.019500 0.044000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2395 1632 1355 2 0.006500 0.170200 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+2396 1632 1355 2 0.006900 0.175600 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+2397 1632 1743 0 0.002500 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2398 1632 1745 0 0.002890 0.009510 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2399 1632 1745 0 0.002320 0.009950 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2400 1633 1645 0 0.001400 0.013500 0.009000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2401 1633 1650 0 0.040200 0.090390 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2402 1633 1652 0 0.011290 0.039310 0.026600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2403 1633 1656 0 0.032600 0.090400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2404 1633 1665 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2405 1633 1666 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2406 1633 1746 0 0.002370 0.011230 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2407 1634 1358 2 0.006000 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+2408 1634 1358 2 0.007200 0.180000 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+2409 1634 1636 0 0.038200 0.088000 0.045600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2410 1634 1694 0 0.006000 0.103200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2411 1634 1734 0 0.012100 0.060000 0.018400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2412 1634 1750 0 0.001900 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2413 1635 1634 2 0.000500 0.025000 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+2414 1635 1969 0 0.000400 0.003600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2415 1638 1639 1 0.000700 0.025000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2416 1638 1737 0 0.000300 0.001800 1.273000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2417 1639 1646 0 0.001500 0.006700 0.099200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2418 1639 1667 0 0.001500 0.006600 0.098000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2419 1639 1710 0 0.001300 0.005800 0.085600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2420 1640 1704 0 0.000400 0.002600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2421 1640 1744 0 0.001100 0.006700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2422 1641 1701 0 0.001600 0.006700 0.114800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2423 1641 1756 0 0.001900 0.009100 0.101200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2424 1642 1377 2 0.004400 0.127500 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+2425 1642 1377 2 0.004400 0.125700 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+2426 1642 1683 0 0.001600 0.008600 0.058200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2427 1642 1685 0 0.005700 0.033390 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2428 1642 1719 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2429 1642 1747 0 0.007250 0.028620 0.062800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2430 1643 1382 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2431 1643 1382 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2432 1643 1648 0 0.002500 0.016000 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2433 1643 1766 0 0.004300 0.028700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2434 1645 1742 0 0.000130 0.001300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2435 1646 1388 1 0.004200 0.140000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2436 1646 1388 1 0.004400 0.137300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2437 1646 1388 1 0.004800 0.137800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2438 1646 1701 0 0.001000 0.004600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2439 1646 1710 0 0.002400 0.011020 0.162200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2440 1646 1754 0 0.002700 0.012500 0.183400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2441 1647 1717 0 0.001600 0.019700 0.343200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2442 1647 1780 0 0.004400 0.063800 0.811600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2443 1648 1713 0 0.007300 0.042500 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2444 1648 1741 0 0.002400 0.015300 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2445 1649 1655 0 0.001800 0.018200 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2446 1649 1753 0 0.000500 0.004700 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2447 1650 1393 2 0.007700 0.186400 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+2448 1650 1393 2 0.007700 0.186600 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+2449 1650 1656 0 0.015800 0.052200 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2450 1650 1782 0 0.008680 0.046920 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2451 1651 1681 1 0.000500 0.011700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2452 1651 1903 0 0.020900 0.097700 0.038800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2453 1652 1399 2 0.007300 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2454 1652 1761 0 0.001110 0.003830 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2455 1653 1753 0 0.003300 0.007000 0.131800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2456 1654 1757 0 0.000300 0.025250 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2457 1655 1411 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+2458 1655 1411 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+2459 1655 1742 0 0.001400 0.013600 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2460 1655 1759 0 0.013000 0.076450 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2461 1656 1691 0 0.031000 0.118100 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2462 1657 1415 2 0.005420 0.130500 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+2463 1657 1415 2 0.005400 0.129800 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+2464 1657 1658 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2465 1657 1659 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2466 1657 1700 0 0.003130 0.013150 0.223600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2467 1658 1709 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2468 1658 1738 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2469 1659 1709 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2470 1659 1738 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2471 1660 1644 2 0.004600 0.117200 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+2472 1660 1644 2 0.004600 0.117000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+2473 1660 1644 2 0.003200 0.120000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+2474 1660 1710 0 0.003400 0.015600 0.230200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2475 1661 1416 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2476 1661 1416 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2477 1661 1416 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2478 1661 1712 0 0.002320 0.058320 0.122600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2479 1661 1753 0 0.003200 0.012490 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2480 1661 1753 0 0.003150 0.027060 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2481 1661 1772 0 0.004300 0.015900 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2482 1662 1664 2 0.002000 0.120000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+2483 1662 1724 0 0.001380 0.009250 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2484 1662 1756 0 0.000910 0.006060 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2485 1663 1664 2 0.002000 0.123000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+2486 1663 1724 0 0.001370 0.009100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2487 1667 1427 1 0.004300 0.132700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+2488 1667 1427 1 0.004500 0.133700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+2489 1667 1427 1 0.004800 0.138300 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+2490 1667 1701 0 0.000300 0.001140 0.016800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2491 1667 1756 0 0.003390 0.015460 0.227800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2492 1668 1432 2 0.007200 0.180000 0.000000 1.0581 1.0000 1.0000 0.00 0.00 0.00
+2493 1669 1437 2 0.006700 0.179100 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+2494 1669 1437 2 0.007700 0.180200 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+2495 1669 1730 0 0.008100 0.031700 0.214600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2496 1669 1740 0 0.006600 0.026600 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2497 1669 1766 0 0.001500 0.015000 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2498 1670 1489 2 0.081000 0.288700 0.000000 1.0518 1.0000 1.0000 0.00 0.00 0.00
+2499 1670 1728 0 0.065600 0.250200 0.035000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2500 1671 1442 1 0.005800 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2501 1671 1442 1 0.010600 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2502 1671 1442 1 0.006000 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2503 1671 1707 0 0.002500 0.024860 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2504 1671 1769 0 0.029880 0.124600 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2505 1671 1772 0 0.001990 0.008180 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2506 1672 1446 2 0.010900 0.275000 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+2507 1672 1446 2 0.012600 0.274700 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+2508 1672 1675 0 0.011400 0.040100 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2509 1672 1680 0 0.011200 0.025000 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2510 1672 1718 0 0.014620 0.053870 0.033000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2511 1672 1816 0 0.026280 0.105720 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2512 1673 1451 1 0.004200 0.133500 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2513 1673 1451 1 0.005800 0.180900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2514 1673 1451 1 0.004100 0.134300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2515 1673 1674 0 0.002800 0.016300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2516 1673 1722 0 0.001100 0.006400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2517 1673 1722 0 0.001100 0.006700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2518 1674 1706 0 0.005500 0.013600 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2519 1674 1725 0 0.001740 0.017600 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2520 1675 1750 0 0.035200 0.122600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2521 1676 1699 0 0.011000 0.477800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2522 1676 1725 0 0.001120 0.011370 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2523 1676 1745 0 0.002800 0.018200 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2524 1677 1748 2 0.002600 0.053600 0.000000 1.0641 1.0000 1.0000 0.00 0.00 0.00
+2525 1677 1896 0 0.009300 0.057300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2526 1678 1694 0 0.042200 0.103400 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2527 1679 1682 0 0.016900 0.051800 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2528 1679 1751 0 0.006900 0.046300 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2529 1680 1727 0 0.041600 0.093800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2530 1681 1466 2 0.016000 0.260000 0.000000 0.8852 1.0000 1.0000 0.00 0.00 0.00
+2531 1681 1708 0 0.015600 0.082000 0.134000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2532 1681 1713 0 0.008700 0.050800 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2533 1682 1467 2 0.010800 0.276300 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+2534 1682 1728 0 0.057700 0.128100 0.016400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2535 1683 1469 1 0.005700 0.177300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2536 1683 1469 1 0.007000 0.181600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2537 1683 1469 1 0.007700 0.181800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2538 1683 1684 0 0.004300 0.015400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2539 1683 1709 0 0.009300 0.033600 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2540 1683 1747 0 0.006100 0.021700 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2541 1684 1709 0 0.005200 0.019000 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2542 1684 1712 0 0.006100 0.023200 0.148600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2543 1685 1686 2 0.026900 0.568700 0.000000 0.9992 1.0000 1.0000 0.00 0.00 0.00
+2544 1685 1739 0 0.002100 0.012600 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2545 1687 1688 2 0.027400 0.568700 0.000000 1.0020 1.0000 1.0000 0.00 0.00 0.00
+2546 1687 1709 0 0.006400 0.037400 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2547 1687 1739 0 0.002200 0.012700 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2548 1689 1747 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2549 1689 1760 0 0.002800 0.011600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2550 1690 1747 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2551 1691 1470 1 0.014700 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2552 1691 1692 1 0.015000 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2553 1691 1714 0 0.027910 0.098660 0.013600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2554 1693 1471 2 0.004200 0.126000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+2555 1693 1471 2 0.004300 0.127000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+2556 1693 1733 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2557 1693 1733 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2558 1693 1738 0 0.004600 0.026500 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2559 1694 1359 2 0.017700 0.287300 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+2560 1694 1359 2 0.015700 0.282700 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+2561 1694 1734 0 0.011900 0.058800 0.049000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2562 1694 1751 0 0.005300 0.025100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2563 1695 1706 0 0.001200 0.011500 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2564 1696 1723 0 0.001700 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2565 1697 1699 0 0.011400 0.485300 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2566 1697 1745 0 0.002500 0.016100 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2567 1698 1699 0 0.011300 0.489400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2568 1698 1745 0 0.002500 0.016400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2569 1700 1477 2 0.007200 0.178900 0.000000 1.0047 1.0000 1.0000 0.00 0.00 0.00
+2570 1700 1738 0 0.006000 0.033100 0.083400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2571 1702 1758 0 0.001600 0.019900 0.346600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2572 1702 1972 0 0.001030 0.012210 0.218400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2573 1703 1765 0 0.002200 0.026960 0.467400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2574 1703 1974 0 0.001500 0.017500 0.312400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2575 1704 1752 0 0.001100 0.007000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2576 1705 1706 1 0.000500 0.025400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2577 1705 1755 0 0.000600 0.005900 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2578 1706 1488 1 0.006000 0.182200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2579 1706 1488 1 0.006900 0.184400 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2580 1706 1488 1 0.006100 0.181300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2581 1706 1488 1 0.011400 0.261700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2582 1706 1722 0 0.002100 0.014400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2583 1706 1743 0 0.004600 0.046200 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2584 1706 1767 0 0.010040 0.039610 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2585 1707 1495 1 0.006000 0.175100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2586 1707 1495 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2587 1707 1495 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2588 1707 1726 0 0.010200 0.037100 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2589 1707 1759 0 0.001500 0.007100 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2590 1707 1759 0 0.001000 0.006700 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2591 1708 1741 0 0.017700 0.064200 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2592 1709 1501 1 0.003600 0.132700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2593 1709 1501 1 0.003500 0.130800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2594 1709 1501 1 0.004000 0.139200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2595 1709 1710 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2596 1709 1710 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2597 1709 1711 1 0.013100 0.241100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2598 1709 1719 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2599 1712 1503 1 0.006000 0.188200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2600 1712 1503 1 0.006200 0.183100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2601 1712 1503 1 0.005700 0.192700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2602 1712 1503 1 0.006000 0.173600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2603 1712 1730 0 0.007600 0.028000 0.093800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2604 1712 1766 0 0.018000 0.085900 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2605 1713 1523 2 0.007600 0.165800 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+2606 1713 1523 2 0.007200 0.169300 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+2607 1714 1715 0 0.002810 0.018580 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2608 1714 1741 0 0.006460 0.018530 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2609 1715 1527 2 0.006200 0.177800 0.000000 0.9002 1.0000 1.0000 0.00 0.00 0.00
+2610 1716 1530 2 0.007000 0.174700 0.000000 0.9707 1.0000 1.0000 0.00 0.00 0.00
+2611 1716 1766 0 0.017800 0.118400 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2612 1717 1718 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2613 1717 1718 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2614 1717 1732 0 0.001920 0.021280 0.364800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2615 1717 1737 0 0.001400 0.017300 0.291200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2616 1717 1765 0 0.000990 0.012120 0.211400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2617 1717 1890 0 0.001750 0.020310 0.382000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2618 1718 1752 0 0.003800 0.014500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2619 1718 1752 0 0.002000 0.019400 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2620 1719 1542 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2621 1719 1542 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2622 1719 1542 1 0.006000 0.168900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2623 1719 1733 0 0.036400 0.214000 0.216000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2624 1719 1738 0 0.004600 0.028200 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2625 1720 1544 2 0.006800 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+2626 1720 1734 0 0.000500 0.004800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2627 1721 1722 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2628 1721 1723 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2629 1721 1724 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2630 1722 1725 0 0.005700 0.040700 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2631 1722 1756 0 0.001700 0.056100 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2632 1723 1753 0 0.004100 0.023700 0.120800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2633 1723 1753 0 0.005300 0.029800 0.076400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2634 1724 1754 0 0.005400 0.030000 0.075800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2635 1725 1549 1 0.006500 0.223300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2636 1725 1549 1 0.006200 0.237800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2637 1725 1549 1 0.006300 0.240000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2638 1725 1745 0 0.003700 0.028800 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2639 1726 1553 2 0.004500 0.127200 0.000000 0.9930 1.0000 1.0000 0.00 0.00 0.00
+2640 1726 1746 0 0.020400 0.074500 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2641 1727 1555 2 0.013200 0.277700 0.000000 1.0287 1.0000 1.0000 0.00 0.00 0.00
+2642 1727 1748 0 0.037700 0.083700 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2643 1728 1558 2 0.010200 0.264700 0.000000 1.0958 1.0000 1.0000 0.00 0.00 0.00
+2644 1730 1567 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+2645 1730 1567 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+2646 1730 1740 0 0.010500 0.038600 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2647 1731 1569 2 0.007200 0.177800 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+2648 1731 1569 2 0.007200 0.180000 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+2649 1732 1737 0 0.001700 0.020300 0.458200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2650 1732 1890 0 0.003400 0.039700 0.722600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2651 1732 1942 0 0.000100 0.001800 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2652 1733 1734 0 0.000900 0.099600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2653 1733 1734 0 0.000900 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2654 1734 1736 0 0.012400 0.070100 0.050200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2655 1734 1738 0 0.029650 0.210540 0.032200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2656 1735 1732 1 0.000500 0.027800 0.000000 1.0750 1.0000 1.0000 0.00 0.00 0.00
+2657 1736 1739 0 0.004500 0.022600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2658 1737 1738 1 0.000500 0.021670 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2659 1738 1572 2 0.005600 0.177800 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+2660 1738 1572 2 0.006000 0.179300 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+2661 1738 1572 2 0.007700 0.186700 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+2662 1738 1749 0 0.022000 0.129000 0.020000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2663 1739 1573 2 0.007700 0.178700 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+2664 1739 1573 2 0.006200 0.173300 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+2665 1739 1573 2 0.007800 0.185100 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+2666 1740 1576 2 0.008300 0.180700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2667 1740 1576 2 0.007700 0.179100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2668 1740 1766 0 0.002300 0.029400 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2669 1741 1577 1 0.010500 0.278000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2670 1741 1577 1 0.010500 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2671 1741 1577 1 0.010800 0.272700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2672 1741 1759 0 0.015000 0.055300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2673 1741 1761 0 0.006400 0.022300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2674 1741 1762 0 0.005100 0.034600 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2675 1742 1580 2 0.027000 0.600000 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+2676 1743 1581 2 0.027000 0.600000 0.000000 0.9693 1.0000 1.0000 0.00 0.00 0.00
+2677 1745 1729 2 0.006200 0.182200 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+2678 1745 1729 2 0.006100 0.174700 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+2679 1745 1746 0 0.001100 0.093700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2680 1745 1746 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2681 1745 1767 0 0.003700 0.013900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2682 1746 1769 0 0.003300 0.011800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2683 1747 1587 2 0.007600 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+2684 1747 1587 2 0.007800 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+2685 1747 1587 2 0.007600 0.186700 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+2686 1748 1588 2 0.010300 0.266000 0.000000 1.0328 1.0000 1.0000 0.00 0.00 0.00
+2687 1749 1596 2 0.006300 0.180700 0.000000 0.9847 1.0000 1.0000 0.00 0.00 0.00
+2688 1750 1751 0 0.001900 0.012500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2689 1751 1598 2 0.005800 0.179100 0.000000 1.0793 1.0000 1.0000 0.00 0.00 0.00
+2690 1752 1601 1 0.005600 0.173800 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2691 1752 1601 1 0.005800 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2692 1752 1601 1 0.007100 0.178400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+2693 1753 1603 1 0.011100 0.202200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2694 1753 1603 1 0.011300 0.206700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2695 1753 1603 1 0.011600 0.211800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2696 1753 1603 1 0.011400 0.208700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2697 1753 1603 1 0.009900 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2698 1753 1603 1 0.009800 0.177800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+2699 1753 1754 0 0.000900 0.117000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2700 1755 1756 1 0.000500 0.025000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2701 1756 1757 1 0.004700 0.119200 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+2702 1756 1757 1 0.004800 0.115100 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+2703 1758 1759 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2704 1758 1759 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2705 1758 1895 0 0.002400 0.032200 0.920800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2706 1759 1762 0 0.002600 0.017500 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2707 1761 1763 0 0.009500 0.021300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2708 1762 1763 0 0.007700 0.029200 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2709 1763 1764 2 0.027000 0.560500 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+2710 1763 1764 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+2711 1763 1764 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+2712 1765 1766 0 0.000500 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2713 1767 1768 2 0.027700 0.593300 0.000000 0.9640 1.0000 1.0000 0.00 0.00 0.00
+2714 1769 1770 0 0.001400 0.008600 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2715 1770 1771 2 0.027600 0.602700 0.000000 0.9690 1.0000 1.0000 0.00 0.00 0.00
+2716 1772 1621 2 0.007000 0.171100 0.000000 0.9240 1.0000 1.0000 0.00 0.00 0.00
+2717 1773 1826 0 0.031900 0.075300 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2718 1773 1886 0 0.009200 0.021600 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2719 1774 1849 0 0.027800 0.045500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2720 1774 1857 0 0.057300 0.093900 0.019200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2721 1775 1808 0 0.028500 0.069900 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2722 1775 1824 0 0.022900 0.068400 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2723 1776 1790 0 0.007000 0.021300 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2724 1776 1810 0 0.025500 0.074100 0.019400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2725 1777 1879 0 0.068000 0.116000 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2726 1777 1897 0 0.060200 0.098800 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2727 1778 1857 0 0.091500 0.217600 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2728 1778 1877 0 0.032400 0.076400 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2729 1778 1883 0 0.030800 0.085400 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2730 1779 1885 0 0.027900 0.080400 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2731 1779 1908 0 0.053300 0.153400 0.040200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2732 1780 1781 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2733 1780 1842 0 0.002500 0.035400 0.458800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2734 1780 1868 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2735 1780 1868 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2736 1780 1888 0 0.001800 0.028300 0.321800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2737 1780 1895 0 0.002400 0.036600 0.836000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2738 1781 1832 0 0.001600 0.010400 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2739 1781 1847 0 0.010000 0.064800 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2740 1781 1860 0 0.010500 0.058800 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2741 1781 1876 0 0.004100 0.036500 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2742 1781 1881 0 0.015500 0.102000 0.027600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2743 1781 1899 0 0.014000 0.133500 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2744 1783 1858 0 0.005700 0.029800 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2745 1783 1904 0 0.001300 0.005300 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2746 1784 1834 0 0.047900 0.112800 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2747 1784 1902 0 0.035800 0.084300 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2748 1785 1860 0 0.029100 0.088000 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2749 1785 1884 0 0.051300 0.155300 0.037000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2750 1786 1794 0 0.016000 0.046000 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2751 1786 1803 0 0.014700 0.042400 0.011000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2752 1787 1899 0 0.051400 0.120200 0.030600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2753 1788 1799 0 0.015800 0.117300 0.034400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2754 1788 1832 0 0.019100 0.124100 0.034600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2755 1788 1882 0 0.009300 0.060200 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2756 1788 1889 0 0.008800 0.036900 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2757 1788 1906 0 0.004500 0.013300 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2758 1789 1800 0 0.017000 0.052100 0.048000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2759 1789 1859 0 0.023200 0.152200 0.041200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2760 1789 1880 0 0.016300 0.089000 0.023400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2761 1789 1909 0 0.023500 0.127200 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2762 1790 1893 0 0.039300 0.140900 0.035400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2763 1791 1806 0 0.051700 0.117300 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2764 1791 1869 0 0.003900 0.025600 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2765 1792 1870 0 0.013100 0.037800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2766 1793 1806 0 0.029000 0.086300 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2767 1793 1848 0 0.027100 0.078000 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2768 1793 1852 0 0.041300 0.119000 0.032000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2769 1794 1799 0 0.004300 0.046300 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2770 1794 1881 0 0.015700 0.103400 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2771 1795 1838 0 0.078700 0.154600 0.032600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2772 1795 1867 0 0.003500 0.013600 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2773 1795 1872 0 0.027100 0.146100 0.038400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2774 1795 1873 0 0.026400 0.079700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2775 1795 1900 0 0.044500 0.097200 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2776 1795 1903 0 0.017600 0.073100 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2777 1796 1835 0 0.046400 0.109700 0.027000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2778 1796 1886 0 0.057000 0.135400 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2779 1796 1907 0 0.048100 0.138700 0.036200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2780 1797 1813 0 0.004000 0.017400 0.004600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2781 1797 1825 0 0.002400 0.008100 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2782 1798 1814 0 0.000900 0.009400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2783 1798 1817 0 0.016900 0.033000 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2784 1798 1828 0 0.008200 0.018900 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2785 1798 1887 0 0.034900 0.100400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2786 1798 1893 0 0.006200 0.018800 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2787 1799 1824 0 0.010300 0.112200 0.034000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2788 1799 1882 0 0.019000 0.169300 0.049800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2789 1799 1889 0 0.007500 0.081300 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2790 1800 1867 0 0.008900 0.027800 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2791 1801 1853 0 0.028100 0.047400 0.009200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2792 1801 1894 0 0.083800 0.136700 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2793 1802 1813 0 0.064400 0.115200 0.024400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2794 1802 1829 0 0.007000 0.031300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2795 1802 1841 0 0.009800 0.098400 0.029800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2796 1802 1845 0 0.017100 0.071200 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2797 1802 1851 0 0.001600 0.016900 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2798 1802 1851 0 0.001500 0.015900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2799 1803 1804 0 0.027800 0.071900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2800 1804 1815 0 0.013000 0.084700 0.023000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2801 1804 1821 0 0.061700 0.114600 0.025400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2802 1804 1824 0 0.022000 0.143900 0.039000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2803 1804 1861 0 0.014300 0.051800 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2804 1804 1861 0 0.018900 0.049500 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2805 1804 1889 0 0.034600 0.146200 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2806 1804 1906 0 0.025000 0.168200 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2807 1804 1908 0 0.021500 0.065600 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2808 1805 1860 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2809 1805 1860 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2810 1806 1812 0 0.031700 0.139300 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2811 1806 1836 0 0.025100 0.159800 0.043600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2812 1806 1845 0 0.015300 0.063600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2813 1806 1866 0 0.001200 0.005100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2814 1807 1839 0 0.119000 0.269900 0.064400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2815 1807 1841 0 0.012400 0.065700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2816 1808 1821 0 0.027500 0.040100 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2817 1808 1831 0 0.009400 0.023100 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2818 1808 1853 0 0.072100 0.134100 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2819 1809 1843 0 0.006800 0.020700 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2820 1809 1864 0 0.011900 0.036000 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2821 1810 1820 0 0.023500 0.067700 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2822 1811 1833 0 0.002200 0.023700 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2823 1811 1891 0 0.003400 0.037100 0.011200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2824 1812 1840 0 0.049000 0.085100 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2825 1812 1843 0 0.050300 0.151200 0.036400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2826 1812 1900 0 0.011800 0.035100 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2827 1813 1869 0 0.006400 0.041400 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2828 1813 1891 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2829 1813 1891 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2830 1813 1904 0 0.041600 0.169100 0.045000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2831 1815 1837 0 0.001800 0.005400 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2832 1817 1902 0 0.026100 0.061600 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2833 1818 1899 0 0.004900 0.009800 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2834 1819 1826 0 0.036300 0.104500 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2835 1819 1870 0 0.008600 0.024800 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2836 1820 1863 0 0.008400 0.024300 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2837 1822 1830 0 0.008200 0.025000 0.006000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2838 1822 1833 0 0.004600 0.015500 0.003800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2839 1823 1873 0 0.002100 0.010400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2840 1823 1899 0 0.029500 0.093600 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2841 1824 1863 0 0.037300 0.122400 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2842 1824 1906 0 0.009000 0.029900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2843 1825 1833 0 0.015500 0.049500 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2844 1825 1841 0 0.038200 0.142300 0.085200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2845 1826 1846 0 0.037400 0.087200 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2846 1826 1878 0 0.038100 0.089800 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2847 1827 1668 2 0.001400 0.038000 0.000000 1.0675 1.0000 1.0000 0.00 0.00 0.00
+2848 1827 1843 0 0.007460 0.044800 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2849 1828 1879 0 0.010300 0.038500 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2850 1829 1862 0 0.000500 0.003200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2851 1830 1864 0 0.007100 0.021500 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2852 1833 1816 1 0.000800 0.015500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2853 1833 1891 0 0.006500 0.061100 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2854 1833 1910 0 0.026200 0.109100 0.029200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2855 1834 1857 0 0.053500 0.124600 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2856 1835 1894 0 0.023400 0.045700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2857 1836 1904 0 0.019800 0.083100 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2858 1837 1908 0 0.005600 0.016900 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2859 1838 1899 0 0.016200 0.031800 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2860 1839 1883 0 0.043500 0.125300 0.032800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2861 1840 1899 0 0.067100 0.114700 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2862 1841 1879 0 0.007000 0.055000 0.019800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2863 1841 1896 0 0.005300 0.057300 0.017200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2864 1842 1850 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2865 1842 1850 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2866 1842 1888 0 0.000600 0.007100 0.137000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2867 1842 1890 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2868 1842 1890 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2869 1844 1879 0 0.006700 0.022600 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2870 1844 1893 0 0.011200 0.071500 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2871 1846 1857 0 0.034000 0.079100 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2872 1847 1856 0 0.005200 0.033800 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2873 1849 1897 0 0.081500 0.129600 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2874 1850 1888 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2875 1850 1888 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2876 1852 1863 0 0.017700 0.050900 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2877 1852 1882 0 0.015100 0.098900 0.026800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2878 1854 1855 0 0.000200 0.000500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2879 1854 1886 0 0.020500 0.062000 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2880 1856 1898 0 0.002000 0.013000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2881 1858 1879 0 0.005700 0.035600 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2882 1860 1876 0 0.004200 0.045100 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2883 1860 1898 0 0.011600 0.036300 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2884 1860 1899 0 0.032200 0.069100 0.047400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2885 1860 1899 0 0.023000 0.094500 0.024600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2886 1862 1879 0 0.003900 0.017400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2887 1865 1874 0 0.001400 0.004000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2888 1865 1897 0 0.035000 0.099900 0.026000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2889 1868 1975 0 0.000500 0.006300 0.095800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2890 1868 1983 0 0.003600 0.048000 0.582000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2891 1871 1875 0 0.064100 0.184800 0.048200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2892 1871 1877 0 0.042600 0.100400 0.025000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2893 1872 1909 0 0.021400 0.115700 0.030400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2894 1875 1878 0 0.030200 0.071200 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2895 1879 1905 0 0.015300 0.063700 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2896 1880 1909 0 0.008500 0.046400 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2897 1884 1906 0 0.006600 0.019300 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2898 1885 1894 0 0.033300 0.081600 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2899 1888 1889 1 0.000400 0.019000 0.000000 0.9850 1.0000 1.0000 0.00 0.00 0.00
+2900 1889 1906 0 0.002300 0.024800 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2901 1890 1891 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2902 1890 1892 0 0.002400 0.036600 0.416000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2903 1891 1896 0 0.007890 0.086120 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2904 1891 1905 0 0.023000 0.151200 0.041000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2905 1892 1893 1 0.000400 0.185000 0.000000 1.0110 1.0000 1.0000 0.00 0.00 0.00
+2906 1893 1901 0 0.003100 0.033500 0.010200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2907 1894 1907 0 0.050500 0.124000 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2908 1901 1905 0 0.026900 0.114000 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2909 1905 1910 0 0.028700 0.116900 0.031000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2910 1909 1782 1 0.001700 0.033700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2911 1911 1914 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2912 1911 1914 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2913 1911 1914 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2914 1911 1952 0 0.010550 0.076000 0.115000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2915 1912 1919 0 0.000600 0.006200 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2916 1912 1932 0 0.000490 0.004820 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2917 1913 1934 0 0.021800 0.151100 0.223800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2918 1913 1964 0 0.012700 0.090900 0.135400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2919 1914 1915 1 0.000700 0.021100 0.000000 1.0610 1.0000 1.0000 0.00 0.00 0.00
+2920 1914 1932 0 0.003390 0.033600 0.219800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2921 1914 1956 0 0.003800 0.037800 0.246200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2922 1914 1958 1 0.000600 0.015100 0.000000 1.0720 1.0000 1.0000 0.00 0.00 0.00
+2923 1915 1986 0 0.001000 0.007000 0.014000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2924 1916 1928 0 0.001780 0.012020 0.076600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2925 1917 1918 0 0.000300 0.013550 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2926 1917 1920 0 0.007700 0.053800 0.335000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2927 1917 1925 0 0.005900 0.040500 0.250800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2928 1917 1943 0 0.005500 0.054100 0.363600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2929 1917 1952 0 0.010800 0.100190 0.170400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2930 1917 1952 0 0.015000 0.105500 0.158000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2931 1917 1952 0 0.010500 0.100000 0.170000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2932 1917 1971 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2933 1917 1971 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2934 1918 1966 0 0.005800 0.028100 0.017000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2935 1918 1970 0 0.096500 0.366900 0.054000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2936 1919 1952 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2937 1919 1952 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2938 1919 1956 0 0.001040 0.009300 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2939 1919 1963 0 0.001700 0.011700 0.289600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2940 1920 1943 0 0.002900 0.028500 0.192000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2941 1920 1967 0 0.005400 0.036900 0.228600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2942 1921 1922 0 0.043000 0.303100 0.463000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2943 1921 1926 0 0.029100 0.226700 0.342800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2944 1921 1934 0 0.008500 0.058800 0.087000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2945 1921 1959 0 0.007300 0.050400 0.074000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2946 1922 1926 0 0.012000 0.083600 0.123600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2947 1922 1934 0 0.046800 0.336900 0.519800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2948 1922 1935 0 0.029400 0.230400 0.349400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2949 1922 1935 0 0.037600 0.263000 0.396000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2950 1922 1947 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2951 1922 1947 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2952 1922 1951 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2953 1922 1959 0 0.048900 0.349200 0.538000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2954 1922 1963 0 0.002000 0.015300 0.214000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2955 1922 1963 0 0.005700 0.045000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2956 1922 1963 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2957 1922 1963 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2958 1923 1930 0 0.001620 0.009700 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2959 1923 1938 0 0.001530 0.009400 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2960 1924 1936 0 0.013700 0.095700 0.141000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2961 1924 1953 0 0.011200 0.077200 0.482400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2962 1924 1953 0 0.011200 0.079000 0.471400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2963 1925 1952 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2964 1925 1952 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2965 1925 1957 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2966 1925 1957 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2967 1927 1933 0 0.002480 0.024470 0.164800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2968 1928 1935 0 0.003580 0.035200 0.239000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2969 1928 1964 0 0.004500 0.044250 0.301000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2970 1929 1950 0 0.017300 0.198800 0.700000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2971 1929 1953 0 0.009100 0.062300 0.385600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2972 1929 1957 0 0.008500 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2973 1929 1957 0 0.008600 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2974 1930 1946 0 0.002100 0.008300 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2975 1931 1940 0 0.004440 0.051440 3.597000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2976 1931 1950 1 0.000740 0.020400 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+2977 1931 1962 0 0.002440 0.032620 2.236000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2978 1932 1952 0 0.001020 0.010050 0.066400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2979 1933 1957 0 0.003920 0.038140 0.258000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2980 1934 1935 0 0.012300 0.125500 0.194000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2981 1934 1951 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2982 1934 1964 0 0.007500 0.077300 0.119000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2983 1935 1964 0 0.023900 0.170800 0.255600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2984 1936 1955 0 0.014500 0.058010 0.094000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2985 1936 1955 0 0.007700 0.056910 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2986 1937 1755 1 0.000400 0.002500 0.000000 1.0450 1.0000 1.0000 0.00 0.00 0.00
+2987 1937 1938 1 0.001200 0.039600 0.000000 1.0250 1.0000 1.0000 0.00 0.00 0.00
+2988 1937 1968 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2989 1939 1946 0 0.062700 0.250000 0.067200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2990 1939 1946 0 0.102000 0.236000 0.060600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2991 1939 1966 0 0.085500 0.342000 0.091400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2992 1939 1970 0 0.080800 0.234400 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2993 1940 1941 1 0.000250 0.015400 0.000000 0.8800 1.0000 1.0000 0.00 0.00 0.00
+2994 1941 1963 0 0.000420 0.006700 0.110800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2995 1942 1943 1 0.000200 0.024200 0.000000 0.9300 1.0000 1.0000 0.00 0.00 0.00
+2996 1943 1944 0 0.000000 0.009400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2997 1943 1969 0 0.000500 0.006500 0.103800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2998 1945 1946 0 0.000400 0.017200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+2999 1945 1967 0 0.000770 0.006480 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3000 1948 1985 0 0.001000 0.007000 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3001 1949 1963 0 0.000300 0.001700 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3002 1950 1955 0 0.029050 0.112070 0.195000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3003 1950 1955 0 0.014850 0.114140 0.193000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3004 1952 1954 0 0.000680 0.006680 0.399000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3005 1952 1956 0 0.001050 0.008370 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3006 1953 1963 0 0.025400 0.177700 0.270400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3007 1953 1963 0 0.024400 0.176700 0.271600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3008 1958 1984 0 0.001000 0.007000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3009 1960 1961 0 0.000170 0.012340 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3010 1960 1962 0 0.001840 0.024450 1.662000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3011 1964 1948 1 0.000000 0.083300 0.000000 1.0300 1.0000 1.0000 0.00 0.00 0.00
+3012 1964 1965 1 0.000500 0.018200 0.000000 1.1030 1.0000 1.0000 0.00 0.00 0.00
+3013 1967 1968 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3014 1969 1970 1 0.000330 0.013000 0.000000 1.0500 1.0000 1.0000 0.00 0.00 0.00
+3015 1969 1971 0 0.009220 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3016 1969 1971 0 0.009200 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3017 1972 1973 0 0.000000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3018 1972 1979 0 0.001700 0.021000 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3019 1974 1979 0 0.001000 0.012300 0.150000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3020 1975 1976 0 0.000800 0.009800 0.120000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3021 1976 1980 0 0.001000 0.012000 0.160000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3022 1976 1981 0 0.004200 0.063000 0.200000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3023 1976 1983 0 0.003100 0.027000 0.050000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3024 1976 1983 0 0.001140 0.018000 0.270000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3025 1977 1978 0 0.100000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3026 1977 1980 0 0.000300 0.003800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3027 1977 1980 0 0.003000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3028 1977 1982 0 0.030000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3029 1977 1983 0 0.000400 0.005000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3030 1977 1984 0 0.014000 1.139997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3031 1977 1986 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3032 1978 1979 0 0.001800 0.023000 0.284000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3033 1978 1979 0 0.010000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3034 1978 1980 0 0.030000 0.999999 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3035 1978 1981 0 0.006000 0.068000 0.740000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3036 1978 1982 0 0.050000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3037 1979 1982 0 0.020000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3038 1979 1984 0 -0.200000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3039 1979 1985 0 -0.400000 2.500001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3040 1979 1986 0 0.083000 0.600000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3041 1980 1982 0 0.004200 0.050000 0.080000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3042 1980 1982 0 0.060000 0.700001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3043 1980 1984 0 0.030000 1.009997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3044 1980 1985 0 0.070000 1.830000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3045 1981 1982 0 0.001300 0.029000 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3046 1981 1983 0 0.002200 0.046410 0.400000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3047 1982 1983 0 0.004000 0.044000 0.500000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3048 1982 1986 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3049 1984 1985 0 -0.040450 0.278890 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3050 1984 1986 0 -0.000010 0.002750 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3051 1985 1986 0 -0.178800 0.710991 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3052 1987 2208 0 0.270000 0.349000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3053 1987 2272 0 0.035000 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3054 1988 1995 0 0.292000 0.386000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3055 1988 2214 0 0.002000 0.010000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3056 1989 2081 0 0.025400 0.031800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3057 1989 2152 0 0.027100 0.033900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3058 1990 2112 0 0.288800 0.361900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3059 1990 2245 0 0.233400 0.291900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3060 1991 2069 0 0.124600 0.156000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3061 1991 2214 0 0.333900 0.417900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3062 1992 2095 0 0.163200 0.189500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3063 1992 2199 0 0.092700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3064 1993 2031 0 0.197500 0.229300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3065 1993 2051 0 0.280100 0.333200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3066 1994 2024 0 0.018600 0.024300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3067 1994 2103 0 0.065900 0.164200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3068 1994 2105 0 0.018300 0.044700 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3069 1994 2185 0 0.030700 0.082400 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3070 1994 2197 0 0.020200 0.059200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3071 1994 2253 0 0.019000 0.023800 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3072 1995 2208 0 0.262000 0.339000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3073 1996 2035 0 0.201500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3074 1996 2092 0 0.040300 0.046800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3075 1996 2202 0 0.156000 0.525000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3076 1997 2108 0 0.301300 0.479100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3077 1997 2110 0 0.178000 0.222700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3078 1998 2011 0 0.125100 0.169700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3079 1998 2066 0 0.057600 0.072100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3080 1999 2076 0 0.265000 0.343000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3081 1999 2280 0 0.245000 0.317000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3082 2000 2066 0 0.064400 0.080600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3083 2000 2231 0 0.036600 0.079900 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3084 2001 2010 0 0.296200 0.369500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3085 2001 2072 0 0.506000 0.504700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3086 2001 2123 0 0.374700 0.469600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3087 2001 2151 0 0.828700 0.846900 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3088 2002 2043 0 0.136000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3089 2002 2263 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3090 2003 2209 0 0.294200 0.368600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3091 2003 2217 0 0.338500 0.420000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3092 2004 2237 0 0.137110 0.799561 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3093 2004 2275 0 0.016800 0.050100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3094 2005 2187 0 0.233700 0.271400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3095 2005 2222 0 0.338500 0.423800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3096 2006 2108 0 0.057400 0.142400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3097 2006 2127 0 0.018900 0.044800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3098 2007 2061 0 0.054000 0.136000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3099 2007 2259 0 0.100000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3100 2008 2013 0 0.276500 0.336500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3101 2008 2213 0 0.067800 0.086200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3102 2009 2020 0 0.503600 0.627200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3103 2009 2075 0 0.200000 0.250100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3104 2010 2173 0 0.407000 0.474000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3105 2011 2144 0 0.113000 0.152000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3106 2011 2179 0 0.025220 0.066400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3107 2011 2275 0 0.013750 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3108 2012 2188 0 0.182900 0.462700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3109 2012 2236 0 0.145100 0.367300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3110 2014 2019 0 0.118600 0.153200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3111 2014 2126 0 0.173000 0.216500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3112 2015 2040 0 0.144000 0.180200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3113 2015 2224 0 0.040200 0.061200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3114 2016 2135 0 0.368700 0.428800 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3115 2016 2140 0 0.272000 0.315900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3116 2017 2082 0 0.070500 0.178400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3117 2017 2083 0 0.112900 0.165500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3118 2018 2143 0 0.129000 0.161600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3119 2018 2257 0 0.284100 0.356000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3120 2019 2214 0 0.155900 0.195200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3121 2020 2034 0 0.088000 0.161000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3122 2020 2122 0 0.200000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3123 2020 2152 0 0.048400 0.060200 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3124 2020 2153 0 0.037000 0.062000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3125 2020 2182 0 0.308000 0.437000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3126 2022 2251 0 0.160700 0.214200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3127 2022 2267 0 0.061000 0.076300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3128 2023 2054 0 0.048000 0.061000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3129 2023 2263 0 0.099000 0.125000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3130 2024 2091 0 0.019600 0.025800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3131 2025 2090 0 0.030500 0.038200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3132 2025 2253 0 0.040700 0.050700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3133 2026 2110 0 0.247500 0.309500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3134 2026 2279 0 0.214700 0.268600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3135 2027 2084 0 0.056500 0.104100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3136 2027 2200 0 0.235800 0.291700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3137 2028 2250 0 0.011000 0.028000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3138 2029 2250 0 0.147100 0.184300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3139 2029 2273 0 0.394300 0.419400 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3140 2030 2053 0 0.213000 0.266000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3141 2030 2061 0 0.290200 0.413400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3142 2030 2132 0 0.272600 0.361100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3143 2030 2174 0 0.066500 0.082300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3144 2031 2196 0 0.278100 0.322900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3145 2031 2220 0 0.326400 0.404600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3146 2032 2067 0 0.152900 0.270300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3147 2032 2263 0 0.066800 0.157200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3148 2033 2168 0 0.359000 0.417000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3149 2033 2187 0 0.296000 0.371000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3150 2034 2272 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3151 2035 2198 0 0.225400 0.261800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3152 2036 2157 0 0.083000 0.114000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3153 2036 2171 0 0.096000 0.198000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3154 2037 2154 0 0.157200 0.196900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3155 2037 2258 0 0.091800 0.232400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3156 2038 2223 0 0.051900 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3157 2038 2258 0 0.076300 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3158 2040 2094 0 0.146900 0.172200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3159 2041 2192 0 0.065600 0.166000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3160 2041 2276 0 0.248300 0.374800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3161 2042 2118 0 0.282100 0.327600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3162 2042 2135 0 0.229700 0.266900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3163 2042 2137 0 0.357200 0.416900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3164 2042 2162 0 0.243000 0.326000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3165 2043 2178 0 0.221100 0.258500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3166 2044 2111 0 0.172900 0.272900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3167 2044 2218 0 0.211600 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3168 2044 2224 0 0.248400 0.378300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3169 2044 2270 0 0.264600 0.366300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3170 2045 2094 0 0.336000 0.549100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3171 2045 2268 0 0.144600 0.192400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3172 2046 2263 0 0.016400 0.037000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3173 2047 2132 0 0.260000 0.250000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3174 2047 2210 0 0.074000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3175 2048 2138 0 0.474401 0.484100 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3176 2048 2176 0 0.224500 0.216100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3177 2049 2099 0 0.091000 0.184000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3178 2049 2170 0 0.079000 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3179 2051 2129 0 0.308300 0.386300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3180 2052 2189 0 0.036000 0.172000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3181 2052 2239 0 0.023000 0.075000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3182 2053 2282 0 0.038900 0.050800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3183 2054 2267 0 0.096600 0.130800 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3184 2055 2013 1 0.139500 0.467100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3185 2055 2200 0 0.233000 0.559600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3186 2055 2248 0 0.079000 0.102000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3187 2056 2061 0 0.060000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3188 2056 2184 0 0.027000 0.042000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3189 2057 2061 0 0.045400 0.111400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3190 2057 2183 0 0.057200 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3191 2058 2103 0 0.067800 0.088900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3192 2058 2128 0 0.013400 0.033600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3193 2059 2115 0 0.021000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3194 2059 2128 0 0.027000 0.068000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3195 2060 2086 0 0.050000 0.086000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3196 2060 2099 0 0.076300 0.192800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3197 2060 2119 0 0.099000 0.128000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3198 2060 2203 0 0.024000 0.061000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3199 2061 2227 0 0.130000 0.324000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3200 2062 2220 0 0.436300 0.497300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3201 2062 2241 0 0.397000 0.468200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3202 2063 2104 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3203 2064 2128 0 0.143200 0.182300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3204 2064 2130 0 0.155200 0.194400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3205 2065 2201 0 0.115800 0.145000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3206 2065 2280 0 0.192500 0.241300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3207 2067 2212 0 0.019000 0.068200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3208 2068 2203 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3209 2068 2238 0 0.057000 0.141000 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3210 2069 2110 0 0.181400 0.226800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3211 2070 2104 0 0.056300 0.073000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3212 2070 2181 0 0.016700 0.029100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3213 2071 2125 0 0.118000 0.152000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3214 2071 2182 0 0.129000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3215 2072 2187 0 0.229700 0.287800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3216 2074 2147 0 0.070500 0.081900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3217 2074 2183 0 0.060400 0.075700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3218 2075 2279 0 0.110100 0.137800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3219 2076 2122 0 0.180000 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3220 2079 2202 0 0.296000 0.282000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3221 2079 2250 0 0.339000 0.381000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3222 2080 2153 0 0.022000 0.056000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3223 2080 2233 0 0.163000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3224 2081 2232 0 0.176300 0.224000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3225 2082 2213 0 0.092400 0.115700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3226 2083 2274 0 0.065600 0.085500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3227 2084 2156 0 0.133400 0.250800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3228 2084 2274 0 0.066400 0.168100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3229 2085 2196 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3230 2087 2207 0 0.137000 0.159100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3231 2087 2219 0 0.259300 0.324500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3232 2088 2215 0 0.058000 0.150000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3233 2088 2259 0 0.052000 0.064000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3234 2090 2239 0 0.117100 0.174000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3235 2091 2277 0 0.031100 0.070800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3236 2092 2177 0 0.199000 0.239000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3237 2093 2121 0 0.005900 0.016700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3238 2093 2179 0 0.020500 0.054900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3239 2093 2237 0 0.012200 0.038400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3240 2094 2107 0 0.069400 0.086800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3241 2094 2188 0 0.271300 0.426200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3242 2095 2257 0 0.216400 0.248300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3243 2096 2148 0 0.085000 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3244 2096 2175 0 0.187000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3245 2097 2205 0 0.322400 0.404000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3246 2097 2250 0 0.094200 0.146700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3247 2098 2188 0 0.221600 0.277700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3248 2098 2270 0 0.150900 0.188700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3249 2099 2251 0 0.178900 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3250 2099 2261 0 0.077700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3251 2100 2157 0 0.155500 0.301300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3252 2100 2215 0 0.028100 0.064600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3253 2101 2120 0 0.141000 0.163800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3254 2101 2180 0 0.198000 0.256200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3255 2102 2115 0 0.026000 0.044000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3256 2102 2186 0 0.084000 0.103000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3257 2105 2106 0 0.021000 0.052000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3258 2105 2185 0 0.027000 0.066000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3259 2106 2128 0 0.085200 0.181500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3260 2107 2120 0 0.266700 0.308000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3261 2108 2138 0 0.181900 0.256900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3262 2108 2141 0 0.115400 0.170200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3263 2109 2210 0 0.093000 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3264 2109 2248 0 0.067000 0.168000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3265 2110 2225 0 0.254000 0.334000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3266 2111 2142 0 0.171500 0.210600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3267 2112 2154 0 0.184700 0.232100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3268 2114 2141 0 0.296400 0.386200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3269 2114 2178 0 0.032700 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3270 2116 2130 0 0.181300 0.227200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3271 2116 2207 0 0.142600 0.178800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3272 2117 2263 0 0.214000 0.272000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3273 2117 2267 0 0.012000 0.015000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3274 2118 2273 0 0.100700 0.117000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3275 2119 2262 0 0.068000 0.083000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3276 2121 2237 0 0.018020 0.055090 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3277 2121 2263 0 0.015680 0.073070 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3278 2123 2194 0 0.306200 0.383800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3279 2124 2128 0 0.032600 0.072500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3280 2124 2247 0 0.259200 0.331900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3281 2125 2278 0 0.156000 0.191000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3282 2126 2178 0 0.076500 0.095800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3283 2127 2209 0 0.118900 0.149000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3284 2129 2201 0 0.195500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3285 2129 2278 0 0.172000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3286 2132 2174 0 0.206000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3287 2132 2210 0 0.260900 0.343300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3288 2133 2223 0 0.266700 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3289 2134 2206 0 0.058000 0.144000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3290 2134 2232 0 0.225400 0.280500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3291 2134 2245 0 0.078100 0.097700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3292 2134 2246 0 0.142400 0.340700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3293 2136 2210 0 0.180000 0.220000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3294 2136 2227 0 0.114000 0.284000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3295 2137 2199 0 0.094700 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3296 2140 2280 0 0.194300 0.241400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3297 2142 2180 0 0.128900 0.161500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3298 2142 2192 0 0.140000 0.588000 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3299 2142 2261 0 0.255900 0.397000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3300 2142 2264 0 0.219900 0.255800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3301 2142 2271 0 0.179500 0.209000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3302 2143 2216 0 0.044300 0.054600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3303 2144 2262 0 0.080000 0.098000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3304 2145 2189 0 0.133000 0.170000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3305 2145 2219 0 0.005000 0.024000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3306 2146 2179 0 0.020450 0.054930 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3307 2146 2263 0 0.024000 0.075000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3308 2147 2239 0 0.021000 0.135700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3309 2148 2240 0 0.017000 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3310 2149 2231 0 0.077200 0.096900 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3311 2149 2266 0 0.220000 0.276200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3312 2151 2195 0 0.359000 0.450400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3313 2151 2241 0 0.572300 0.716900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3314 2155 2159 0 0.135000 0.189900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3315 2155 2246 0 0.086900 0.219900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3316 2156 2215 0 0.058600 0.145900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3317 2157 2172 0 0.194100 0.229600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3318 2157 2226 0 0.080000 0.198000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3319 2158 2208 0 0.200000 0.256000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3320 2158 2258 0 0.043000 0.108000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3321 2159 2258 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3322 2160 2267 0 0.053200 0.131900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3323 2161 2219 0 0.051700 0.070100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3324 2162 2225 0 0.280500 0.377400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3325 2164 2231 0 0.058000 0.170000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3326 2164 2235 0 0.075000 0.185000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3327 2166 2193 0 0.020000 0.026000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3328 2167 2193 0 0.043400 0.054300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3329 2168 2194 0 0.397000 0.497000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3330 2169 2177 0 0.270000 0.329500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3331 2169 2187 0 0.078200 0.094000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3332 2170 2244 0 0.016000 0.040000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3333 2171 2193 0 0.080000 0.141000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3334 2172 2193 0 0.065000 0.112000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3335 2173 2228 0 0.285900 0.333100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3336 2175 2178 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3337 2176 2216 0 0.234500 0.225100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3338 2178 2276 0 0.363400 0.425500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3339 2181 2193 0 0.044000 0.057000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3340 2184 2256 0 0.037000 0.088000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3341 2185 2197 0 0.009000 0.020000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3342 2185 2270 0 0.204100 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3343 2186 2219 0 0.099000 0.248000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3344 2186 2230 0 0.029000 0.128000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3345 2188 2247 0 0.152900 0.209100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3346 2189 2191 0 0.057900 0.108900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3347 2189 2230 0 0.012000 0.017000 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3348 2190 2192 0 0.008200 0.020500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3349 2190 2267 0 0.100700 0.126200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3350 2191 2239 0 0.106200 0.139800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3351 2192 2244 0 0.161000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3352 2192 2269 0 0.130000 0.246600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3353 2194 2195 0 0.662900 0.830700 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3354 2198 2273 0 0.135300 0.157100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3355 2199 2217 0 0.268000 0.335800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3356 2202 2252 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3357 2205 2257 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3358 2206 2255 0 0.037000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3359 2212 2231 0 0.011200 0.037400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3360 2214 2266 0 0.215300 0.263900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3361 2215 2256 0 0.186000 0.241000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3362 2216 2217 0 0.298200 0.373700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3363 2219 2282 0 0.173300 0.218900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3364 2220 2221 0 0.274000 0.318200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3365 2220 2254 0 0.222000 0.234000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3366 2221 2281 0 0.211500 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3367 2222 2252 0 0.296000 0.363000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3368 2228 2254 0 0.249000 0.264000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3369 2228 2273 0 0.532800 0.529500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3370 2231 2240 0 0.063000 0.085000 0.007800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3371 2233 2255 0 0.058000 0.075000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3372 2236 2268 0 0.318500 0.370700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3373 2239 2277 0 0.012700 0.036100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3374 2264 2269 0 0.229700 0.266800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3375 2264 2271 0 0.040400 0.046900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3376 2279 2280 0 0.351500 0.442100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3377 2280 2281 0 0.358500 0.419200 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3378 2284 1988 2 0.010800 0.276300 0.000000 1.0301 1.0000 1.0000 0.00 0.00 0.00
+3379 2284 2298 0 0.000400 0.002400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3380 2284 2299 0 0.001500 0.003400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3381 2284 2393 0 0.008300 0.053400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3382 2285 2286 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3383 2285 2286 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3384 2285 2322 0 0.002100 0.009600 0.140600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3385 2285 2325 0 0.003400 0.018130 0.138600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3386 2285 2329 0 0.000900 0.004300 0.063200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3387 2287 2357 0 0.006340 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3388 2288 2358 0 0.006350 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3389 2289 1996 2 0.007000 0.180000 0.000000 1.0097 1.0000 1.0000 0.00 0.00 0.00
+3390 2289 2290 0 0.027000 0.103000 0.014400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3391 2289 2410 0 0.022100 0.084300 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3392 2290 2001 2 0.010900 0.272000 0.000000 1.0680 1.0000 1.0000 0.00 0.00 0.00
+3393 2290 2332 0 0.028500 0.108600 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3394 2291 2011 2 0.004200 0.127000 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+3395 2291 2011 2 0.004300 0.127300 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+3396 2291 2331 0 0.013500 0.029950 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3397 2291 2352 0 0.004500 0.016100 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3398 2291 2380 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3399 2291 2380 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3400 2291 2393 0 0.011100 0.025700 0.013400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3401 2291 2406 0 0.008600 0.031400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3402 2291 2414 0 0.009100 0.033000 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3403 2291 2422 0 0.002340 0.010260 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3404 2292 2293 1 0.000300 0.010200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3405 2292 2294 1 0.000500 0.032900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3406 2292 2295 1 0.000800 0.031100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3407 2292 2364 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3408 2292 2365 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3409 2292 2420 0 0.000900 0.011000 0.192600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3410 2292 2420 0 0.000900 0.011000 0.385200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3411 2293 2367 0 0.002000 0.019500 0.044000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3412 2294 2017 2 0.006500 0.170200 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+3413 2294 2017 2 0.006900 0.175600 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+3414 2294 2405 0 0.002500 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3415 2294 2407 0 0.002890 0.009510 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3416 2294 2407 0 0.002320 0.009950 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3417 2295 2307 0 0.001400 0.013500 0.009000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3418 2295 2312 0 0.040200 0.090390 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3419 2295 2314 0 0.011290 0.039310 0.026600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3420 2295 2318 0 0.032600 0.090400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3421 2295 2327 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3422 2295 2328 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3423 2295 2408 0 0.002370 0.011230 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3424 2296 2020 2 0.006000 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+3425 2296 2020 2 0.007200 0.180000 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+3426 2296 2298 0 0.038200 0.088000 0.045600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3427 2296 2356 0 0.006000 0.103200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3428 2296 2396 0 0.012100 0.060000 0.018400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3429 2296 2412 0 0.001900 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3430 2297 2296 2 0.000500 0.025000 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+3431 2297 2631 0 0.000400 0.003600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3432 2300 2301 1 0.000700 0.025000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3433 2300 2399 0 0.000300 0.001800 1.273000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3434 2301 2308 0 0.001500 0.006700 0.099200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3435 2301 2329 0 0.001500 0.006600 0.098000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3436 2301 2372 0 0.001300 0.005800 0.085600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3437 2302 2366 0 0.000400 0.002600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3438 2302 2406 0 0.001100 0.006700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3439 2303 2363 0 0.001600 0.006700 0.114800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3440 2303 2418 0 0.001900 0.009100 0.101200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3441 2304 2039 2 0.004400 0.127500 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+3442 2304 2039 2 0.004400 0.125700 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+3443 2304 2345 0 0.001600 0.008600 0.058200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3444 2304 2347 0 0.005700 0.033390 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3445 2304 2381 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3446 2304 2409 0 0.007250 0.028620 0.062800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3447 2305 2044 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3448 2305 2044 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3449 2305 2310 0 0.002500 0.016000 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3450 2305 2428 0 0.004300 0.028700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3451 2307 2404 0 0.000130 0.001300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3452 2308 2050 1 0.004200 0.140000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3453 2308 2050 1 0.004400 0.137300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3454 2308 2050 1 0.004800 0.137800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3455 2308 2363 0 0.001000 0.004600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3456 2308 2372 0 0.002400 0.011020 0.162200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3457 2308 2416 0 0.002700 0.012500 0.183400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3458 2309 2379 0 0.001600 0.019700 0.343200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3459 2309 2442 0 0.004400 0.063800 0.811600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3460 2310 2375 0 0.007300 0.042500 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3461 2310 2403 0 0.002400 0.015300 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3462 2311 2317 0 0.001800 0.018200 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3463 2311 2415 0 0.000500 0.004700 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3464 2312 2055 2 0.007700 0.186400 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+3465 2312 2055 2 0.007700 0.186600 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+3466 2312 2318 0 0.015800 0.052200 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3467 2312 2444 0 0.008680 0.046920 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3468 2313 2343 1 0.000500 0.011700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3469 2313 2565 0 0.020900 0.097700 0.038800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3470 2314 2061 2 0.007300 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3471 2314 2423 0 0.001110 0.003830 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3472 2315 2415 0 0.003300 0.007000 0.131800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3473 2316 2419 0 0.000300 0.025250 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3474 2317 2073 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+3475 2317 2073 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+3476 2317 2404 0 0.001400 0.013600 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3477 2317 2421 0 0.013000 0.076450 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3478 2318 2353 0 0.031000 0.118100 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3479 2319 2077 2 0.005420 0.130500 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+3480 2319 2077 2 0.005400 0.129800 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+3481 2319 2320 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3482 2319 2321 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3483 2319 2362 0 0.003130 0.013150 0.223600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3484 2320 2371 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3485 2320 2400 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3486 2321 2371 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3487 2321 2400 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3488 2322 2306 2 0.004600 0.117200 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+3489 2322 2306 2 0.004600 0.117000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+3490 2322 2306 2 0.003200 0.120000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+3491 2322 2372 0 0.003400 0.015600 0.230200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3492 2323 2078 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3493 2323 2078 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3494 2323 2078 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3495 2323 2374 0 0.002320 0.058320 0.122600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3496 2323 2415 0 0.003200 0.012490 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3497 2323 2415 0 0.003150 0.027060 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3498 2323 2434 0 0.004300 0.015900 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3499 2324 2326 2 0.002000 0.120000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+3500 2324 2386 0 0.001380 0.009250 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3501 2324 2418 0 0.000910 0.006060 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3502 2325 2326 2 0.002000 0.123000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+3503 2325 2386 0 0.001370 0.009100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3504 2329 2089 1 0.004300 0.132700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+3505 2329 2089 1 0.004500 0.133700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+3506 2329 2089 1 0.004800 0.138300 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+3507 2329 2363 0 0.000300 0.001140 0.016800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3508 2329 2418 0 0.003390 0.015460 0.227800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3509 2330 2094 2 0.007200 0.180000 0.000000 1.0581 1.0000 1.0000 0.00 0.00 0.00
+3510 2331 2099 2 0.006700 0.179100 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+3511 2331 2099 2 0.007700 0.180200 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+3512 2331 2392 0 0.008100 0.031700 0.214600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3513 2331 2402 0 0.006600 0.026600 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3514 2331 2428 0 0.001500 0.015000 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3515 2332 2151 2 0.081000 0.288700 0.000000 1.0518 1.0000 1.0000 0.00 0.00 0.00
+3516 2332 2390 0 0.065600 0.250200 0.035000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3517 2333 2104 1 0.005800 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3518 2333 2104 1 0.010600 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3519 2333 2104 1 0.006000 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3520 2333 2369 0 0.002500 0.024860 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3521 2333 2431 0 0.029880 0.124600 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3522 2333 2434 0 0.001990 0.008180 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3523 2334 2108 2 0.010900 0.275000 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+3524 2334 2108 2 0.012600 0.274700 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+3525 2334 2337 0 0.011400 0.040100 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3526 2334 2342 0 0.011200 0.025000 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3527 2334 2380 0 0.014620 0.053870 0.033000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3528 2334 2478 0 0.026280 0.105720 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3529 2335 2113 1 0.004200 0.133500 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3530 2335 2113 1 0.005800 0.180900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3531 2335 2113 1 0.004100 0.134300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3532 2335 2336 0 0.002800 0.016300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3533 2335 2384 0 0.001100 0.006400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3534 2335 2384 0 0.001100 0.006700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3535 2336 2368 0 0.005500 0.013600 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3536 2336 2387 0 0.001740 0.017600 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3537 2337 2412 0 0.035200 0.122600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3538 2338 2361 0 0.011000 0.477800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3539 2338 2387 0 0.001120 0.011370 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3540 2338 2407 0 0.002800 0.018200 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3541 2339 2410 2 0.002600 0.053600 0.000000 1.0641 1.0000 1.0000 0.00 0.00 0.00
+3542 2339 2558 0 0.009300 0.057300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3543 2340 2356 0 0.042200 0.103400 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3544 2341 2344 0 0.016900 0.051800 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3545 2341 2413 0 0.006900 0.046300 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3546 2342 2389 0 0.041600 0.093800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3547 2343 2128 2 0.016000 0.260000 0.000000 0.8852 1.0000 1.0000 0.00 0.00 0.00
+3548 2343 2370 0 0.015600 0.082000 0.134000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3549 2343 2375 0 0.008700 0.050800 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3550 2344 2129 2 0.010800 0.276300 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+3551 2344 2390 0 0.057700 0.128100 0.016400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3552 2345 2131 1 0.005700 0.177300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3553 2345 2131 1 0.007000 0.181600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3554 2345 2131 1 0.007700 0.181800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3555 2345 2346 0 0.004300 0.015400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3556 2345 2371 0 0.009300 0.033600 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3557 2345 2409 0 0.006100 0.021700 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3558 2346 2371 0 0.005200 0.019000 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3559 2346 2374 0 0.006100 0.023200 0.148600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3560 2347 2348 2 0.026900 0.568700 0.000000 0.9992 1.0000 1.0000 0.00 0.00 0.00
+3561 2347 2401 0 0.002100 0.012600 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3562 2349 2350 2 0.027400 0.568700 0.000000 1.0020 1.0000 1.0000 0.00 0.00 0.00
+3563 2349 2371 0 0.006400 0.037400 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3564 2349 2401 0 0.002200 0.012700 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3565 2351 2409 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3566 2351 2422 0 0.002800 0.011600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3567 2352 2409 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3568 2353 2132 1 0.014700 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3569 2353 2354 1 0.015000 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3570 2353 2376 0 0.027910 0.098660 0.013600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3571 2355 2133 2 0.004200 0.126000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+3572 2355 2133 2 0.004300 0.127000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+3573 2355 2395 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3574 2355 2395 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3575 2355 2400 0 0.004600 0.026500 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3576 2356 2021 2 0.017700 0.287300 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+3577 2356 2021 2 0.015700 0.282700 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+3578 2356 2396 0 0.011900 0.058800 0.049000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3579 2356 2413 0 0.005300 0.025100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3580 2357 2368 0 0.001200 0.011500 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3581 2358 2385 0 0.001700 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3582 2359 2361 0 0.011400 0.485300 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3583 2359 2407 0 0.002500 0.016100 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3584 2360 2361 0 0.011300 0.489400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3585 2360 2407 0 0.002500 0.016400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3586 2362 2139 2 0.007200 0.178900 0.000000 1.0047 1.0000 1.0000 0.00 0.00 0.00
+3587 2362 2400 0 0.006000 0.033100 0.083400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3588 2364 2420 0 0.001600 0.019900 0.346600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3589 2364 2634 0 0.001030 0.012210 0.218400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3590 2365 2427 0 0.002200 0.026960 0.467400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3591 2365 2636 0 0.001500 0.017500 0.312400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3592 2366 2414 0 0.001100 0.007000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3593 2367 2368 1 0.000500 0.025400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3594 2367 2417 0 0.000600 0.005900 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3595 2368 2150 1 0.006000 0.182200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3596 2368 2150 1 0.006900 0.184400 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3597 2368 2150 1 0.006100 0.181300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3598 2368 2150 1 0.011400 0.261700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3599 2368 2384 0 0.002100 0.014400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3600 2368 2405 0 0.004600 0.046200 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3601 2368 2429 0 0.010040 0.039610 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3602 2369 2157 1 0.006000 0.175100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3603 2369 2157 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3604 2369 2157 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3605 2369 2388 0 0.010200 0.037100 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3606 2369 2421 0 0.001500 0.007100 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3607 2369 2421 0 0.001000 0.006700 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3608 2370 2403 0 0.017700 0.064200 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3609 2371 2163 1 0.003600 0.132700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3610 2371 2163 1 0.003500 0.130800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3611 2371 2163 1 0.004000 0.139200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3612 2371 2372 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3613 2371 2372 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3614 2371 2373 1 0.013100 0.241100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3615 2371 2381 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3616 2374 2165 1 0.006000 0.188200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3617 2374 2165 1 0.006200 0.183100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3618 2374 2165 1 0.005700 0.192700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3619 2374 2165 1 0.006000 0.173600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3620 2374 2392 0 0.007600 0.028000 0.093800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3621 2374 2428 0 0.018000 0.085900 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3622 2375 2185 2 0.007600 0.165800 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+3623 2375 2185 2 0.007200 0.169300 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+3624 2376 2377 0 0.002810 0.018580 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3625 2376 2403 0 0.006460 0.018530 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3626 2377 2189 2 0.006200 0.177800 0.000000 0.9002 1.0000 1.0000 0.00 0.00 0.00
+3627 2378 2192 2 0.007000 0.174700 0.000000 0.9707 1.0000 1.0000 0.00 0.00 0.00
+3628 2378 2428 0 0.017800 0.118400 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3629 2379 2380 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3630 2379 2380 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3631 2379 2394 0 0.001920 0.021280 0.364800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3632 2379 2399 0 0.001400 0.017300 0.291200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3633 2379 2427 0 0.000990 0.012120 0.211400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3634 2379 2552 0 0.001750 0.020310 0.382000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3635 2380 2414 0 0.003800 0.014500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3636 2380 2414 0 0.002000 0.019400 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3637 2381 2204 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3638 2381 2204 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3639 2381 2204 1 0.006000 0.168900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3640 2381 2395 0 0.036400 0.214000 0.216000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3641 2381 2400 0 0.004600 0.028200 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3642 2382 2206 2 0.006800 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+3643 2382 2396 0 0.000500 0.004800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3644 2383 2384 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3645 2383 2385 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3646 2383 2386 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3647 2384 2387 0 0.005700 0.040700 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3648 2384 2418 0 0.001700 0.056100 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3649 2385 2415 0 0.004100 0.023700 0.120800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3650 2385 2415 0 0.005300 0.029800 0.076400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3651 2386 2416 0 0.005400 0.030000 0.075800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3652 2387 2211 1 0.006500 0.223300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3653 2387 2211 1 0.006200 0.237800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3654 2387 2211 1 0.006300 0.240000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3655 2387 2407 0 0.003700 0.028800 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3656 2388 2215 2 0.004500 0.127200 0.000000 0.9930 1.0000 1.0000 0.00 0.00 0.00
+3657 2388 2408 0 0.020400 0.074500 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3658 2389 2217 2 0.013200 0.277700 0.000000 1.0287 1.0000 1.0000 0.00 0.00 0.00
+3659 2389 2410 0 0.037700 0.083700 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3660 2390 2220 2 0.010200 0.264700 0.000000 1.0958 1.0000 1.0000 0.00 0.00 0.00
+3661 2392 2229 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+3662 2392 2229 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+3663 2392 2402 0 0.010500 0.038600 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3664 2393 2231 2 0.007200 0.177800 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+3665 2393 2231 2 0.007200 0.180000 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+3666 2394 2399 0 0.001700 0.020300 0.458200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3667 2394 2552 0 0.003400 0.039700 0.722600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3668 2394 2604 0 0.000100 0.001800 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3669 2395 2396 0 0.000900 0.099600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3670 2395 2396 0 0.000900 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3671 2396 2398 0 0.012400 0.070100 0.050200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3672 2396 2400 0 0.029650 0.210540 0.032200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3673 2397 2394 1 0.000500 0.027800 0.000000 1.0750 1.0000 1.0000 0.00 0.00 0.00
+3674 2398 2401 0 0.004500 0.022600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3675 2399 2400 1 0.000500 0.021670 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3676 2400 2234 2 0.005600 0.177800 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+3677 2400 2234 2 0.006000 0.179300 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+3678 2400 2234 2 0.007700 0.186700 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+3679 2400 2411 0 0.022000 0.129000 0.020000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3680 2401 2235 2 0.007700 0.178700 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+3681 2401 2235 2 0.006200 0.173300 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+3682 2401 2235 2 0.007800 0.185100 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+3683 2402 2238 2 0.008300 0.180700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3684 2402 2238 2 0.007700 0.179100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3685 2402 2428 0 0.002300 0.029400 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3686 2403 2239 1 0.010500 0.278000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3687 2403 2239 1 0.010500 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3688 2403 2239 1 0.010800 0.272700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3689 2403 2421 0 0.015000 0.055300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3690 2403 2423 0 0.006400 0.022300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3691 2403 2424 0 0.005100 0.034600 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3692 2404 2242 2 0.027000 0.600000 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+3693 2405 2243 2 0.027000 0.600000 0.000000 0.9693 1.0000 1.0000 0.00 0.00 0.00
+3694 2407 2391 2 0.006200 0.182200 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+3695 2407 2391 2 0.006100 0.174700 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+3696 2407 2408 0 0.001100 0.093700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3697 2407 2408 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3698 2407 2429 0 0.003700 0.013900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3699 2408 2431 0 0.003300 0.011800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3700 2409 2249 2 0.007600 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+3701 2409 2249 2 0.007800 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+3702 2409 2249 2 0.007600 0.186700 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+3703 2410 2250 2 0.010300 0.266000 0.000000 1.0328 1.0000 1.0000 0.00 0.00 0.00
+3704 2411 2258 2 0.006300 0.180700 0.000000 0.9847 1.0000 1.0000 0.00 0.00 0.00
+3705 2412 2413 0 0.001900 0.012500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3706 2413 2260 2 0.005800 0.179100 0.000000 1.0793 1.0000 1.0000 0.00 0.00 0.00
+3707 2414 2263 1 0.005600 0.173800 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3708 2414 2263 1 0.005800 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3709 2414 2263 1 0.007100 0.178400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+3710 2415 2265 1 0.011100 0.202200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3711 2415 2265 1 0.011300 0.206700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3712 2415 2265 1 0.011600 0.211800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3713 2415 2265 1 0.011400 0.208700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3714 2415 2265 1 0.009900 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3715 2415 2265 1 0.009800 0.177800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+3716 2415 2416 0 0.000900 0.117000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3717 2417 2418 1 0.000500 0.025000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3718 2418 2419 1 0.004700 0.119200 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+3719 2418 2419 1 0.004800 0.115100 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+3720 2420 2421 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3721 2420 2421 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3722 2420 2557 0 0.002400 0.032200 0.920800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3723 2421 2424 0 0.002600 0.017500 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3724 2423 2425 0 0.009500 0.021300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3725 2424 2425 0 0.007700 0.029200 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3726 2425 2426 2 0.027000 0.560500 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+3727 2425 2426 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+3728 2425 2426 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+3729 2427 2428 0 0.000500 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3730 2429 2430 2 0.027700 0.593300 0.000000 0.9640 1.0000 1.0000 0.00 0.00 0.00
+3731 2431 2432 0 0.001400 0.008600 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3732 2432 2433 2 0.027600 0.602700 0.000000 0.9690 1.0000 1.0000 0.00 0.00 0.00
+3733 2434 2283 2 0.007000 0.171100 0.000000 0.9240 1.0000 1.0000 0.00 0.00 0.00
+3734 2435 2488 0 0.031900 0.075300 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3735 2435 2548 0 0.009200 0.021600 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3736 2436 2511 0 0.027800 0.045500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3737 2436 2519 0 0.057300 0.093900 0.019200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3738 2437 2470 0 0.028500 0.069900 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3739 2437 2486 0 0.022900 0.068400 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3740 2438 2452 0 0.007000 0.021300 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3741 2438 2472 0 0.025500 0.074100 0.019400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3742 2439 2541 0 0.068000 0.116000 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3743 2439 2559 0 0.060200 0.098800 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3744 2440 2519 0 0.091500 0.217600 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3745 2440 2539 0 0.032400 0.076400 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3746 2440 2545 0 0.030800 0.085400 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3747 2441 2547 0 0.027900 0.080400 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3748 2441 2570 0 0.053300 0.153400 0.040200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3749 2442 2443 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3750 2442 2504 0 0.002500 0.035400 0.458800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3751 2442 2530 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3752 2442 2530 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3753 2442 2550 0 0.001800 0.028300 0.321800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3754 2442 2557 0 0.002400 0.036600 0.836000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3755 2443 2494 0 0.001600 0.010400 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3756 2443 2509 0 0.010000 0.064800 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3757 2443 2522 0 0.010500 0.058800 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3758 2443 2538 0 0.004100 0.036500 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3759 2443 2543 0 0.015500 0.102000 0.027600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3760 2443 2561 0 0.014000 0.133500 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3761 2445 2520 0 0.005700 0.029800 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3762 2445 2566 0 0.001300 0.005300 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3763 2446 2496 0 0.047900 0.112800 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3764 2446 2564 0 0.035800 0.084300 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3765 2447 2522 0 0.029100 0.088000 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3766 2447 2546 0 0.051300 0.155300 0.037000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3767 2448 2456 0 0.016000 0.046000 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3768 2448 2465 0 0.014700 0.042400 0.011000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3769 2449 2561 0 0.051400 0.120200 0.030600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3770 2450 2461 0 0.015800 0.117300 0.034400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3771 2450 2494 0 0.019100 0.124100 0.034600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3772 2450 2544 0 0.009300 0.060200 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3773 2450 2551 0 0.008800 0.036900 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3774 2450 2568 0 0.004500 0.013300 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3775 2451 2462 0 0.017000 0.052100 0.048000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3776 2451 2521 0 0.023200 0.152200 0.041200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3777 2451 2542 0 0.016300 0.089000 0.023400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3778 2451 2571 0 0.023500 0.127200 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3779 2452 2555 0 0.039300 0.140900 0.035400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3780 2453 2468 0 0.051700 0.117300 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3781 2453 2531 0 0.003900 0.025600 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3782 2454 2532 0 0.013100 0.037800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3783 2455 2468 0 0.029000 0.086300 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3784 2455 2510 0 0.027100 0.078000 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3785 2455 2514 0 0.041300 0.119000 0.032000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3786 2456 2461 0 0.004300 0.046300 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3787 2456 2543 0 0.015700 0.103400 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3788 2457 2500 0 0.078700 0.154600 0.032600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3789 2457 2529 0 0.003500 0.013600 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3790 2457 2534 0 0.027100 0.146100 0.038400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3791 2457 2535 0 0.026400 0.079700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3792 2457 2562 0 0.044500 0.097200 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3793 2457 2565 0 0.017600 0.073100 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3794 2458 2497 0 0.046400 0.109700 0.027000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3795 2458 2548 0 0.057000 0.135400 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3796 2458 2569 0 0.048100 0.138700 0.036200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3797 2459 2475 0 0.004000 0.017400 0.004600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3798 2459 2487 0 0.002400 0.008100 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3799 2460 2476 0 0.000900 0.009400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3800 2460 2479 0 0.016900 0.033000 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3801 2460 2490 0 0.008200 0.018900 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3802 2460 2549 0 0.034900 0.100400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3803 2460 2555 0 0.006200 0.018800 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3804 2461 2486 0 0.010300 0.112200 0.034000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3805 2461 2544 0 0.019000 0.169300 0.049800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3806 2461 2551 0 0.007500 0.081300 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3807 2462 2529 0 0.008900 0.027800 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3808 2463 2515 0 0.028100 0.047400 0.009200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3809 2463 2556 0 0.083800 0.136700 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3810 2464 2475 0 0.064400 0.115200 0.024400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3811 2464 2491 0 0.007000 0.031300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3812 2464 2503 0 0.009800 0.098400 0.029800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3813 2464 2507 0 0.017100 0.071200 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3814 2464 2513 0 0.001600 0.016900 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3815 2464 2513 0 0.001500 0.015900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3816 2465 2466 0 0.027800 0.071900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3817 2466 2477 0 0.013000 0.084700 0.023000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3818 2466 2483 0 0.061700 0.114600 0.025400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3819 2466 2486 0 0.022000 0.143900 0.039000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3820 2466 2523 0 0.014300 0.051800 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3821 2466 2523 0 0.018900 0.049500 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3822 2466 2551 0 0.034600 0.146200 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3823 2466 2568 0 0.025000 0.168200 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3824 2466 2570 0 0.021500 0.065600 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3825 2467 2522 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3826 2467 2522 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3827 2468 2474 0 0.031700 0.139300 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3828 2468 2498 0 0.025100 0.159800 0.043600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3829 2468 2507 0 0.015300 0.063600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3830 2468 2528 0 0.001200 0.005100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3831 2469 2501 0 0.119000 0.269900 0.064400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3832 2469 2503 0 0.012400 0.065700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3833 2470 2483 0 0.027500 0.040100 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3834 2470 2493 0 0.009400 0.023100 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3835 2470 2515 0 0.072100 0.134100 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3836 2471 2505 0 0.006800 0.020700 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3837 2471 2526 0 0.011900 0.036000 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3838 2472 2482 0 0.023500 0.067700 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3839 2473 2495 0 0.002200 0.023700 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3840 2473 2553 0 0.003400 0.037100 0.011200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3841 2474 2502 0 0.049000 0.085100 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3842 2474 2505 0 0.050300 0.151200 0.036400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3843 2474 2562 0 0.011800 0.035100 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3844 2475 2531 0 0.006400 0.041400 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3845 2475 2553 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3846 2475 2553 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3847 2475 2566 0 0.041600 0.169100 0.045000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3848 2477 2499 0 0.001800 0.005400 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3849 2479 2564 0 0.026100 0.061600 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3850 2480 2561 0 0.004900 0.009800 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3851 2481 2488 0 0.036300 0.104500 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3852 2481 2532 0 0.008600 0.024800 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3853 2482 2525 0 0.008400 0.024300 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3854 2484 2492 0 0.008200 0.025000 0.006000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3855 2484 2495 0 0.004600 0.015500 0.003800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3856 2485 2535 0 0.002100 0.010400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3857 2485 2561 0 0.029500 0.093600 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3858 2486 2525 0 0.037300 0.122400 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3859 2486 2568 0 0.009000 0.029900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3860 2487 2495 0 0.015500 0.049500 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3861 2487 2503 0 0.038200 0.142300 0.085200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3862 2488 2508 0 0.037400 0.087200 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3863 2488 2540 0 0.038100 0.089800 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3864 2489 2330 2 0.001400 0.038000 0.000000 1.0675 1.0000 1.0000 0.00 0.00 0.00
+3865 2489 2505 0 0.007460 0.044800 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3866 2490 2541 0 0.010300 0.038500 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3867 2491 2524 0 0.000500 0.003200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3868 2492 2526 0 0.007100 0.021500 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3869 2495 2478 1 0.000800 0.015500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3870 2495 2553 0 0.006500 0.061100 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3871 2495 2572 0 0.026200 0.109100 0.029200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3872 2496 2519 0 0.053500 0.124600 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3873 2497 2556 0 0.023400 0.045700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3874 2498 2566 0 0.019800 0.083100 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3875 2499 2570 0 0.005600 0.016900 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3876 2500 2561 0 0.016200 0.031800 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3877 2501 2545 0 0.043500 0.125300 0.032800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3878 2502 2561 0 0.067100 0.114700 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3879 2503 2541 0 0.007000 0.055000 0.019800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3880 2503 2558 0 0.005300 0.057300 0.017200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3881 2504 2512 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3882 2504 2512 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3883 2504 2550 0 0.000600 0.007100 0.137000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3884 2504 2552 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3885 2504 2552 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3886 2506 2541 0 0.006700 0.022600 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3887 2506 2555 0 0.011200 0.071500 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3888 2508 2519 0 0.034000 0.079100 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3889 2509 2518 0 0.005200 0.033800 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3890 2511 2559 0 0.081500 0.129600 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3891 2512 2550 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3892 2512 2550 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3893 2514 2525 0 0.017700 0.050900 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3894 2514 2544 0 0.015100 0.098900 0.026800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3895 2516 2517 0 0.000200 0.000500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3896 2516 2548 0 0.020500 0.062000 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3897 2518 2560 0 0.002000 0.013000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3898 2520 2541 0 0.005700 0.035600 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3899 2522 2538 0 0.004200 0.045100 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3900 2522 2560 0 0.011600 0.036300 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3901 2522 2561 0 0.032200 0.069100 0.047400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3902 2522 2561 0 0.023000 0.094500 0.024600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3903 2524 2541 0 0.003900 0.017400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3904 2527 2536 0 0.001400 0.004000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3905 2527 2559 0 0.035000 0.099900 0.026000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3906 2530 2637 0 0.000500 0.006300 0.095800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3907 2530 2645 0 0.003600 0.048000 0.582000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3908 2533 2537 0 0.064100 0.184800 0.048200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3909 2533 2539 0 0.042600 0.100400 0.025000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3910 2534 2571 0 0.021400 0.115700 0.030400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3911 2537 2540 0 0.030200 0.071200 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3912 2541 2567 0 0.015300 0.063700 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3913 2542 2571 0 0.008500 0.046400 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3914 2546 2568 0 0.006600 0.019300 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3915 2547 2556 0 0.033300 0.081600 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3916 2550 2551 1 0.000400 0.019000 0.000000 0.9850 1.0000 1.0000 0.00 0.00 0.00
+3917 2551 2568 0 0.002300 0.024800 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3918 2552 2553 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3919 2552 2554 0 0.002400 0.036600 0.416000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3920 2553 2558 0 0.007890 0.086120 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3921 2553 2567 0 0.023000 0.151200 0.041000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3922 2554 2555 1 0.000400 0.185000 0.000000 1.0110 1.0000 1.0000 0.00 0.00 0.00
+3923 2555 2563 0 0.003100 0.033500 0.010200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3924 2556 2569 0 0.050500 0.124000 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3925 2563 2567 0 0.026900 0.114000 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3926 2567 2572 0 0.028700 0.116900 0.031000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3927 2571 2444 1 0.001700 0.033700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3928 2573 2576 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3929 2573 2576 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3930 2573 2576 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3931 2573 2614 0 0.010550 0.076000 0.115000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3932 2574 2581 0 0.000600 0.006200 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3933 2574 2594 0 0.000490 0.004820 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3934 2575 2596 0 0.021800 0.151100 0.223800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3935 2575 2626 0 0.012700 0.090900 0.135400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3936 2576 2577 1 0.000700 0.021100 0.000000 1.0610 1.0000 1.0000 0.00 0.00 0.00
+3937 2576 2594 0 0.003390 0.033600 0.219800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3938 2576 2618 0 0.003800 0.037800 0.246200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3939 2576 2620 1 0.000600 0.015100 0.000000 1.0720 1.0000 1.0000 0.00 0.00 0.00
+3940 2577 2648 0 0.001000 0.007000 0.014000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3941 2578 2590 0 0.001780 0.012020 0.076600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3942 2579 2580 0 0.000300 0.013550 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3943 2579 2582 0 0.007700 0.053800 0.335000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3944 2579 2587 0 0.005900 0.040500 0.250800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3945 2579 2605 0 0.005500 0.054100 0.363600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3946 2579 2614 0 0.010800 0.100190 0.170400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3947 2579 2614 0 0.015000 0.105500 0.158000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3948 2579 2614 0 0.010500 0.100000 0.170000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3949 2579 2633 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3950 2579 2633 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3951 2580 2628 0 0.005800 0.028100 0.017000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3952 2580 2632 0 0.096500 0.366900 0.054000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3953 2581 2614 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3954 2581 2614 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3955 2581 2618 0 0.001040 0.009300 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3956 2581 2625 0 0.001700 0.011700 0.289600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3957 2582 2605 0 0.002900 0.028500 0.192000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3958 2582 2629 0 0.005400 0.036900 0.228600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3959 2583 2584 0 0.043000 0.303100 0.463000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3960 2583 2588 0 0.029100 0.226700 0.342800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3961 2583 2596 0 0.008500 0.058800 0.087000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3962 2583 2621 0 0.007300 0.050400 0.074000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3963 2584 2588 0 0.012000 0.083600 0.123600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3964 2584 2596 0 0.046800 0.336900 0.519800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3965 2584 2597 0 0.029400 0.230400 0.349400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3966 2584 2597 0 0.037600 0.263000 0.396000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3967 2584 2609 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3968 2584 2609 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3969 2584 2613 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3970 2584 2621 0 0.048900 0.349200 0.538000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3971 2584 2625 0 0.002000 0.015300 0.214000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3972 2584 2625 0 0.005700 0.045000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3973 2584 2625 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3974 2584 2625 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3975 2585 2592 0 0.001620 0.009700 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3976 2585 2600 0 0.001530 0.009400 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3977 2586 2598 0 0.013700 0.095700 0.141000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3978 2586 2615 0 0.011200 0.077200 0.482400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3979 2586 2615 0 0.011200 0.079000 0.471400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3980 2587 2614 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3981 2587 2614 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3982 2587 2619 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3983 2587 2619 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3984 2589 2595 0 0.002480 0.024470 0.164800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3985 2590 2597 0 0.003580 0.035200 0.239000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3986 2590 2626 0 0.004500 0.044250 0.301000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3987 2591 2612 0 0.017300 0.198800 0.700000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3988 2591 2615 0 0.009100 0.062300 0.385600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3989 2591 2619 0 0.008500 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3990 2591 2619 0 0.008600 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3991 2592 2608 0 0.002100 0.008300 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3992 2593 2602 0 0.004440 0.051440 3.597000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3993 2593 2612 1 0.000740 0.020400 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+3994 2593 2624 0 0.002440 0.032620 2.236000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3995 2594 2614 0 0.001020 0.010050 0.066400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3996 2595 2619 0 0.003920 0.038140 0.258000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3997 2596 2597 0 0.012300 0.125500 0.194000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3998 2596 2613 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+3999 2596 2626 0 0.007500 0.077300 0.119000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4000 2597 2626 0 0.023900 0.170800 0.255600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4001 2598 2617 0 0.014500 0.058010 0.094000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4002 2598 2617 0 0.007700 0.056910 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4003 2599 2417 1 0.000400 0.002500 0.000000 1.0450 1.0000 1.0000 0.00 0.00 0.00
+4004 2599 2600 1 0.001200 0.039600 0.000000 1.0250 1.0000 1.0000 0.00 0.00 0.00
+4005 2599 2630 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4006 2601 2608 0 0.062700 0.250000 0.067200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4007 2601 2608 0 0.102000 0.236000 0.060600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4008 2601 2628 0 0.085500 0.342000 0.091400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4009 2601 2632 0 0.080800 0.234400 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4010 2602 2603 1 0.000250 0.015400 0.000000 0.8800 1.0000 1.0000 0.00 0.00 0.00
+4011 2603 2625 0 0.000420 0.006700 0.110800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4012 2604 2605 1 0.000200 0.024200 0.000000 0.9300 1.0000 1.0000 0.00 0.00 0.00
+4013 2605 2606 0 0.000000 0.009400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4014 2605 2631 0 0.000500 0.006500 0.103800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4015 2607 2608 0 0.000400 0.017200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4016 2607 2629 0 0.000770 0.006480 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4017 2610 2647 0 0.001000 0.007000 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4018 2611 2625 0 0.000300 0.001700 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4019 2612 2617 0 0.029050 0.112070 0.195000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4020 2612 2617 0 0.014850 0.114140 0.193000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4021 2614 2616 0 0.000680 0.006680 0.399000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4022 2614 2618 0 0.001050 0.008370 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4023 2615 2625 0 0.025400 0.177700 0.270400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4024 2615 2625 0 0.024400 0.176700 0.271600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4025 2620 2646 0 0.001000 0.007000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4026 2622 2623 0 0.000170 0.012340 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4027 2622 2624 0 0.001840 0.024450 1.662000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4028 2626 2610 1 0.000000 0.083300 0.000000 1.0300 1.0000 1.0000 0.00 0.00 0.00
+4029 2626 2627 1 0.000500 0.018200 0.000000 1.1030 1.0000 1.0000 0.00 0.00 0.00
+4030 2629 2630 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4031 2631 2632 1 0.000330 0.013000 0.000000 1.0500 1.0000 1.0000 0.00 0.00 0.00
+4032 2631 2633 0 0.009220 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4033 2631 2633 0 0.009200 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4034 2634 2635 0 0.000000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4035 2634 2641 0 0.001700 0.021000 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4036 2636 2641 0 0.001000 0.012300 0.150000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4037 2637 2638 0 0.000800 0.009800 0.120000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4038 2638 2642 0 0.001000 0.012000 0.160000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4039 2638 2643 0 0.004200 0.063000 0.200000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4040 2638 2645 0 0.003100 0.027000 0.050000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4041 2638 2645 0 0.001140 0.018000 0.270000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4042 2639 2640 0 0.100000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4043 2639 2642 0 0.000300 0.003800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4044 2639 2642 0 0.003000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4045 2639 2644 0 0.030000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4046 2639 2645 0 0.000400 0.005000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4047 2639 2646 0 0.014000 1.139997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4048 2639 2648 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4049 2640 2641 0 0.001800 0.023000 0.284000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4050 2640 2641 0 0.010000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4051 2640 2642 0 0.030000 0.999999 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4052 2640 2643 0 0.006000 0.068000 0.740000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4053 2640 2644 0 0.050000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4054 2641 2644 0 0.020000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4055 2641 2646 0 -0.200000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4056 2641 2647 0 -0.400000 2.500001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4057 2641 2648 0 0.083000 0.600000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4058 2642 2644 0 0.004200 0.050000 0.080000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4059 2642 2644 0 0.060000 0.700001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4060 2642 2646 0 0.030000 1.009997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4061 2642 2647 0 0.070000 1.830000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4062 2643 2644 0 0.001300 0.029000 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4063 2643 2645 0 0.002200 0.046410 0.400000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4064 2644 2645 0 0.004000 0.044000 0.500000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4065 2644 2648 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4066 2646 2647 0 -0.040450 0.278890 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4067 2646 2648 0 -0.000010 0.002750 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4068 2647 2648 0 -0.178800 0.710991 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4069 2649 2870 0 0.270000 0.349000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4070 2649 2934 0 0.035000 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4071 2650 2657 0 0.292000 0.386000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4072 2650 2876 0 0.002000 0.010000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4073 2651 2743 0 0.025400 0.031800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4074 2651 2814 0 0.027100 0.033900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4075 2652 2774 0 0.288800 0.361900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4076 2652 2907 0 0.233400 0.291900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4077 2653 2731 0 0.124600 0.156000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4078 2653 2876 0 0.333900 0.417900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4079 2654 2757 0 0.163200 0.189500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4080 2654 2861 0 0.092700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4081 2655 2693 0 0.197500 0.229300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4082 2655 2713 0 0.280100 0.333200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4083 2656 2686 0 0.018600 0.024300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4084 2656 2765 0 0.065900 0.164200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4085 2656 2767 0 0.018300 0.044700 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4086 2656 2847 0 0.030700 0.082400 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4087 2656 2859 0 0.020200 0.059200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4088 2656 2915 0 0.019000 0.023800 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4089 2657 2870 0 0.262000 0.339000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4090 2658 2697 0 0.201500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4091 2658 2754 0 0.040300 0.046800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4092 2658 2864 0 0.156000 0.525000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4093 2659 2770 0 0.301300 0.479100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4094 2659 2772 0 0.178000 0.222700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4095 2660 2673 0 0.125100 0.169700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4096 2660 2728 0 0.057600 0.072100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4097 2661 2738 0 0.265000 0.343000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4098 2661 2942 0 0.245000 0.317000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4099 2662 2728 0 0.064400 0.080600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4100 2662 2893 0 0.036600 0.079900 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4101 2663 2672 0 0.296200 0.369500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4102 2663 2734 0 0.506000 0.504700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4103 2663 2785 0 0.374700 0.469600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4104 2663 2813 0 0.828700 0.846900 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4105 2664 2705 0 0.136000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4106 2664 2925 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4107 2665 2871 0 0.294200 0.368600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4108 2665 2879 0 0.338500 0.420000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4109 2666 2899 0 0.137110 0.799561 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4110 2666 2937 0 0.016800 0.050100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4111 2667 2849 0 0.233700 0.271400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4112 2667 2884 0 0.338500 0.423800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4113 2668 2770 0 0.057400 0.142400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4114 2668 2789 0 0.018900 0.044800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4115 2669 2723 0 0.054000 0.136000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4116 2669 2921 0 0.100000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4117 2670 2675 0 0.276500 0.336500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4118 2670 2875 0 0.067800 0.086200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4119 2671 2682 0 0.503600 0.627200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4120 2671 2737 0 0.200000 0.250100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4121 2672 2835 0 0.407000 0.474000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4122 2673 2806 0 0.113000 0.152000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4123 2673 2841 0 0.025220 0.066400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4124 2673 2937 0 0.013750 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4125 2674 2850 0 0.182900 0.462700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4126 2674 2898 0 0.145100 0.367300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4127 2676 2681 0 0.118600 0.153200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4128 2676 2788 0 0.173000 0.216500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4129 2677 2702 0 0.144000 0.180200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4130 2677 2886 0 0.040200 0.061200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4131 2678 2797 0 0.368700 0.428800 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4132 2678 2802 0 0.272000 0.315900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4133 2679 2744 0 0.070500 0.178400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4134 2679 2745 0 0.112900 0.165500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4135 2680 2805 0 0.129000 0.161600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4136 2680 2919 0 0.284100 0.356000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4137 2681 2876 0 0.155900 0.195200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4138 2682 2696 0 0.088000 0.161000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4139 2682 2784 0 0.200000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4140 2682 2814 0 0.048400 0.060200 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4141 2682 2815 0 0.037000 0.062000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4142 2682 2844 0 0.308000 0.437000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4143 2684 2913 0 0.160700 0.214200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4144 2684 2929 0 0.061000 0.076300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4145 2685 2716 0 0.048000 0.061000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4146 2685 2925 0 0.099000 0.125000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4147 2686 2753 0 0.019600 0.025800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4148 2687 2752 0 0.030500 0.038200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4149 2687 2915 0 0.040700 0.050700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4150 2688 2772 0 0.247500 0.309500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4151 2688 2941 0 0.214700 0.268600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4152 2689 2746 0 0.056500 0.104100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4153 2689 2862 0 0.235800 0.291700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4154 2690 2912 0 0.011000 0.028000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4155 2691 2912 0 0.147100 0.184300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4156 2691 2935 0 0.394300 0.419400 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4157 2692 2715 0 0.213000 0.266000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4158 2692 2723 0 0.290200 0.413400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4159 2692 2794 0 0.272600 0.361100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4160 2692 2836 0 0.066500 0.082300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4161 2693 2858 0 0.278100 0.322900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4162 2693 2882 0 0.326400 0.404600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4163 2694 2729 0 0.152900 0.270300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4164 2694 2925 0 0.066800 0.157200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4165 2695 2830 0 0.359000 0.417000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4166 2695 2849 0 0.296000 0.371000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4167 2696 2934 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4168 2697 2860 0 0.225400 0.261800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4169 2698 2819 0 0.083000 0.114000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4170 2698 2833 0 0.096000 0.198000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4171 2699 2816 0 0.157200 0.196900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4172 2699 2920 0 0.091800 0.232400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4173 2700 2885 0 0.051900 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4174 2700 2920 0 0.076300 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4175 2702 2756 0 0.146900 0.172200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4176 2703 2854 0 0.065600 0.166000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4177 2703 2938 0 0.248300 0.374800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4178 2704 2780 0 0.282100 0.327600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4179 2704 2797 0 0.229700 0.266900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4180 2704 2799 0 0.357200 0.416900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4181 2704 2824 0 0.243000 0.326000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4182 2705 2840 0 0.221100 0.258500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4183 2706 2773 0 0.172900 0.272900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4184 2706 2880 0 0.211600 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4185 2706 2886 0 0.248400 0.378300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4186 2706 2932 0 0.264600 0.366300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4187 2707 2756 0 0.336000 0.549100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4188 2707 2930 0 0.144600 0.192400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4189 2708 2925 0 0.016400 0.037000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4190 2709 2794 0 0.260000 0.250000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4191 2709 2872 0 0.074000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4192 2710 2800 0 0.474401 0.484100 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4193 2710 2838 0 0.224500 0.216100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4194 2711 2761 0 0.091000 0.184000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4195 2711 2832 0 0.079000 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4196 2713 2791 0 0.308300 0.386300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4197 2714 2851 0 0.036000 0.172000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4198 2714 2901 0 0.023000 0.075000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4199 2715 2944 0 0.038900 0.050800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4200 2716 2929 0 0.096600 0.130800 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4201 2717 2675 1 0.139500 0.467100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4202 2717 2862 0 0.233000 0.559600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4203 2717 2910 0 0.079000 0.102000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4204 2718 2723 0 0.060000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4205 2718 2846 0 0.027000 0.042000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4206 2719 2723 0 0.045400 0.111400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4207 2719 2845 0 0.057200 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4208 2720 2765 0 0.067800 0.088900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4209 2720 2790 0 0.013400 0.033600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4210 2721 2777 0 0.021000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4211 2721 2790 0 0.027000 0.068000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4212 2722 2748 0 0.050000 0.086000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4213 2722 2761 0 0.076300 0.192800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4214 2722 2781 0 0.099000 0.128000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4215 2722 2865 0 0.024000 0.061000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4216 2723 2889 0 0.130000 0.324000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4217 2724 2882 0 0.436300 0.497300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4218 2724 2903 0 0.397000 0.468200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4219 2725 2766 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4220 2726 2790 0 0.143200 0.182300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4221 2726 2792 0 0.155200 0.194400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4222 2727 2863 0 0.115800 0.145000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4223 2727 2942 0 0.192500 0.241300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4224 2729 2874 0 0.019000 0.068200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4225 2730 2865 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4226 2730 2900 0 0.057000 0.141000 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4227 2731 2772 0 0.181400 0.226800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4228 2732 2766 0 0.056300 0.073000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4229 2732 2843 0 0.016700 0.029100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4230 2733 2787 0 0.118000 0.152000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4231 2733 2844 0 0.129000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4232 2734 2849 0 0.229700 0.287800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4233 2736 2809 0 0.070500 0.081900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4234 2736 2845 0 0.060400 0.075700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4235 2737 2941 0 0.110100 0.137800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4236 2738 2784 0 0.180000 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4237 2741 2864 0 0.296000 0.282000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4238 2741 2912 0 0.339000 0.381000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4239 2742 2815 0 0.022000 0.056000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4240 2742 2895 0 0.163000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4241 2743 2894 0 0.176300 0.224000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4242 2744 2875 0 0.092400 0.115700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4243 2745 2936 0 0.065600 0.085500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4244 2746 2818 0 0.133400 0.250800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4245 2746 2936 0 0.066400 0.168100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4246 2747 2858 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4247 2749 2869 0 0.137000 0.159100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4248 2749 2881 0 0.259300 0.324500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4249 2750 2877 0 0.058000 0.150000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4250 2750 2921 0 0.052000 0.064000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4251 2752 2901 0 0.117100 0.174000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4252 2753 2939 0 0.031100 0.070800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4253 2754 2839 0 0.199000 0.239000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4254 2755 2783 0 0.005900 0.016700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4255 2755 2841 0 0.020500 0.054900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4256 2755 2899 0 0.012200 0.038400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4257 2756 2769 0 0.069400 0.086800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4258 2756 2850 0 0.271300 0.426200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4259 2757 2919 0 0.216400 0.248300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4260 2758 2810 0 0.085000 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4261 2758 2837 0 0.187000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4262 2759 2867 0 0.322400 0.404000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4263 2759 2912 0 0.094200 0.146700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4264 2760 2850 0 0.221600 0.277700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4265 2760 2932 0 0.150900 0.188700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4266 2761 2913 0 0.178900 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4267 2761 2923 0 0.077700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4268 2762 2819 0 0.155500 0.301300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4269 2762 2877 0 0.028100 0.064600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4270 2763 2782 0 0.141000 0.163800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4271 2763 2842 0 0.198000 0.256200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4272 2764 2777 0 0.026000 0.044000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4273 2764 2848 0 0.084000 0.103000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4274 2767 2768 0 0.021000 0.052000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4275 2767 2847 0 0.027000 0.066000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4276 2768 2790 0 0.085200 0.181500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4277 2769 2782 0 0.266700 0.308000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4278 2770 2800 0 0.181900 0.256900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4279 2770 2803 0 0.115400 0.170200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4280 2771 2872 0 0.093000 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4281 2771 2910 0 0.067000 0.168000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4282 2772 2887 0 0.254000 0.334000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4283 2773 2804 0 0.171500 0.210600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4284 2774 2816 0 0.184700 0.232100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4285 2776 2803 0 0.296400 0.386200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4286 2776 2840 0 0.032700 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4287 2778 2792 0 0.181300 0.227200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4288 2778 2869 0 0.142600 0.178800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4289 2779 2925 0 0.214000 0.272000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4290 2779 2929 0 0.012000 0.015000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4291 2780 2935 0 0.100700 0.117000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4292 2781 2924 0 0.068000 0.083000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4293 2783 2899 0 0.018020 0.055090 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4294 2783 2925 0 0.015680 0.073070 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4295 2785 2856 0 0.306200 0.383800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4296 2786 2790 0 0.032600 0.072500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4297 2786 2909 0 0.259200 0.331900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4298 2787 2940 0 0.156000 0.191000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4299 2788 2840 0 0.076500 0.095800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4300 2789 2871 0 0.118900 0.149000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4301 2791 2863 0 0.195500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4302 2791 2940 0 0.172000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4303 2794 2836 0 0.206000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4304 2794 2872 0 0.260900 0.343300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4305 2795 2885 0 0.266700 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4306 2796 2868 0 0.058000 0.144000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4307 2796 2894 0 0.225400 0.280500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4308 2796 2907 0 0.078100 0.097700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4309 2796 2908 0 0.142400 0.340700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4310 2798 2872 0 0.180000 0.220000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4311 2798 2889 0 0.114000 0.284000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4312 2799 2861 0 0.094700 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4313 2802 2942 0 0.194300 0.241400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4314 2804 2842 0 0.128900 0.161500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4315 2804 2854 0 0.140000 0.588000 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4316 2804 2923 0 0.255900 0.397000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4317 2804 2926 0 0.219900 0.255800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4318 2804 2933 0 0.179500 0.209000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4319 2805 2878 0 0.044300 0.054600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4320 2806 2924 0 0.080000 0.098000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4321 2807 2851 0 0.133000 0.170000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4322 2807 2881 0 0.005000 0.024000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4323 2808 2841 0 0.020450 0.054930 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4324 2808 2925 0 0.024000 0.075000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4325 2809 2901 0 0.021000 0.135700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4326 2810 2902 0 0.017000 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4327 2811 2893 0 0.077200 0.096900 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4328 2811 2928 0 0.220000 0.276200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4329 2813 2857 0 0.359000 0.450400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4330 2813 2903 0 0.572300 0.716900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4331 2817 2821 0 0.135000 0.189900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4332 2817 2908 0 0.086900 0.219900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4333 2818 2877 0 0.058600 0.145900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4334 2819 2834 0 0.194100 0.229600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4335 2819 2888 0 0.080000 0.198000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4336 2820 2870 0 0.200000 0.256000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4337 2820 2920 0 0.043000 0.108000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4338 2821 2920 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4339 2822 2929 0 0.053200 0.131900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4340 2823 2881 0 0.051700 0.070100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4341 2824 2887 0 0.280500 0.377400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4342 2826 2893 0 0.058000 0.170000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4343 2826 2897 0 0.075000 0.185000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4344 2828 2855 0 0.020000 0.026000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4345 2829 2855 0 0.043400 0.054300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4346 2830 2856 0 0.397000 0.497000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4347 2831 2839 0 0.270000 0.329500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4348 2831 2849 0 0.078200 0.094000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4349 2832 2906 0 0.016000 0.040000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4350 2833 2855 0 0.080000 0.141000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4351 2834 2855 0 0.065000 0.112000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4352 2835 2890 0 0.285900 0.333100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4353 2837 2840 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4354 2838 2878 0 0.234500 0.225100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4355 2840 2938 0 0.363400 0.425500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4356 2843 2855 0 0.044000 0.057000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4357 2846 2918 0 0.037000 0.088000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4358 2847 2859 0 0.009000 0.020000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4359 2847 2932 0 0.204100 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4360 2848 2881 0 0.099000 0.248000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4361 2848 2892 0 0.029000 0.128000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4362 2850 2909 0 0.152900 0.209100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4363 2851 2853 0 0.057900 0.108900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4364 2851 2892 0 0.012000 0.017000 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4365 2852 2854 0 0.008200 0.020500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4366 2852 2929 0 0.100700 0.126200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4367 2853 2901 0 0.106200 0.139800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4368 2854 2906 0 0.161000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4369 2854 2931 0 0.130000 0.246600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4370 2856 2857 0 0.662900 0.830700 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4371 2860 2935 0 0.135300 0.157100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4372 2861 2879 0 0.268000 0.335800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4373 2864 2914 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4374 2867 2919 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4375 2868 2917 0 0.037000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4376 2874 2893 0 0.011200 0.037400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4377 2876 2928 0 0.215300 0.263900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4378 2877 2918 0 0.186000 0.241000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4379 2878 2879 0 0.298200 0.373700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4380 2881 2944 0 0.173300 0.218900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4381 2882 2883 0 0.274000 0.318200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4382 2882 2916 0 0.222000 0.234000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4383 2883 2943 0 0.211500 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4384 2884 2914 0 0.296000 0.363000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4385 2890 2916 0 0.249000 0.264000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4386 2890 2935 0 0.532800 0.529500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4387 2893 2902 0 0.063000 0.085000 0.007800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4388 2895 2917 0 0.058000 0.075000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4389 2898 2930 0 0.318500 0.370700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4390 2901 2939 0 0.012700 0.036100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4391 2926 2931 0 0.229700 0.266800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4392 2926 2933 0 0.040400 0.046900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4393 2941 2942 0 0.351500 0.442100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4394 2942 2943 0 0.358500 0.419200 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4395 2946 2650 2 0.010800 0.276300 0.000000 1.0301 1.0000 1.0000 0.00 0.00 0.00
+4396 2946 2960 0 0.000400 0.002400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4397 2946 2961 0 0.001500 0.003400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4398 2946 3055 0 0.008300 0.053400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4399 2947 2948 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4400 2947 2948 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4401 2947 2984 0 0.002100 0.009600 0.140600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4402 2947 2987 0 0.003400 0.018130 0.138600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4403 2947 2991 0 0.000900 0.004300 0.063200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4404 2949 3019 0 0.006340 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4405 2950 3020 0 0.006350 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4406 2951 2658 2 0.007000 0.180000 0.000000 1.0097 1.0000 1.0000 0.00 0.00 0.00
+4407 2951 2952 0 0.027000 0.103000 0.014400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4408 2951 3072 0 0.022100 0.084300 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4409 2952 2663 2 0.010900 0.272000 0.000000 1.0680 1.0000 1.0000 0.00 0.00 0.00
+4410 2952 2994 0 0.028500 0.108600 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4411 2953 2673 2 0.004200 0.127000 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+4412 2953 2673 2 0.004300 0.127300 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+4413 2953 2993 0 0.013500 0.029950 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4414 2953 3014 0 0.004500 0.016100 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4415 2953 3042 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4416 2953 3042 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4417 2953 3055 0 0.011100 0.025700 0.013400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4418 2953 3068 0 0.008600 0.031400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4419 2953 3076 0 0.009100 0.033000 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4420 2953 3084 0 0.002340 0.010260 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4421 2954 2955 1 0.000300 0.010200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4422 2954 2956 1 0.000500 0.032900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4423 2954 2957 1 0.000800 0.031100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4424 2954 3026 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4425 2954 3027 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4426 2954 3082 0 0.000900 0.011000 0.192600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4427 2954 3082 0 0.000900 0.011000 0.385200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4428 2955 3029 0 0.002000 0.019500 0.044000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4429 2956 2679 2 0.006500 0.170200 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+4430 2956 2679 2 0.006900 0.175600 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+4431 2956 3067 0 0.002500 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4432 2956 3069 0 0.002890 0.009510 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4433 2956 3069 0 0.002320 0.009950 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4434 2957 2969 0 0.001400 0.013500 0.009000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4435 2957 2974 0 0.040200 0.090390 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4436 2957 2976 0 0.011290 0.039310 0.026600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4437 2957 2980 0 0.032600 0.090400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4438 2957 2989 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4439 2957 2990 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4440 2957 3070 0 0.002370 0.011230 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4441 2958 2682 2 0.006000 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+4442 2958 2682 2 0.007200 0.180000 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+4443 2958 2960 0 0.038200 0.088000 0.045600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4444 2958 3018 0 0.006000 0.103200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4445 2958 3058 0 0.012100 0.060000 0.018400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4446 2958 3074 0 0.001900 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4447 2959 2958 2 0.000500 0.025000 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+4448 2959 3293 0 0.000400 0.003600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4449 2962 2963 1 0.000700 0.025000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4450 2962 3061 0 0.000300 0.001800 1.273000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4451 2963 2970 0 0.001500 0.006700 0.099200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4452 2963 2991 0 0.001500 0.006600 0.098000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4453 2963 3034 0 0.001300 0.005800 0.085600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4454 2964 3028 0 0.000400 0.002600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4455 2964 3068 0 0.001100 0.006700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4456 2965 3025 0 0.001600 0.006700 0.114800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4457 2965 3080 0 0.001900 0.009100 0.101200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4458 2966 2701 2 0.004400 0.127500 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+4459 2966 2701 2 0.004400 0.125700 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+4460 2966 3007 0 0.001600 0.008600 0.058200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4461 2966 3009 0 0.005700 0.033390 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4462 2966 3043 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4463 2966 3071 0 0.007250 0.028620 0.062800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4464 2967 2706 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4465 2967 2706 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4466 2967 2972 0 0.002500 0.016000 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4467 2967 3090 0 0.004300 0.028700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4468 2969 3066 0 0.000130 0.001300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4469 2970 2712 1 0.004200 0.140000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4470 2970 2712 1 0.004400 0.137300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4471 2970 2712 1 0.004800 0.137800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4472 2970 3025 0 0.001000 0.004600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4473 2970 3034 0 0.002400 0.011020 0.162200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4474 2970 3078 0 0.002700 0.012500 0.183400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4475 2971 3041 0 0.001600 0.019700 0.343200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4476 2971 3104 0 0.004400 0.063800 0.811600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4477 2972 3037 0 0.007300 0.042500 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4478 2972 3065 0 0.002400 0.015300 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4479 2973 2979 0 0.001800 0.018200 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4480 2973 3077 0 0.000500 0.004700 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4481 2974 2717 2 0.007700 0.186400 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+4482 2974 2717 2 0.007700 0.186600 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+4483 2974 2980 0 0.015800 0.052200 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4484 2974 3106 0 0.008680 0.046920 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4485 2975 3005 1 0.000500 0.011700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4486 2975 3227 0 0.020900 0.097700 0.038800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4487 2976 2723 2 0.007300 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4488 2976 3085 0 0.001110 0.003830 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4489 2977 3077 0 0.003300 0.007000 0.131800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4490 2978 3081 0 0.000300 0.025250 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4491 2979 2735 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+4492 2979 2735 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+4493 2979 3066 0 0.001400 0.013600 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4494 2979 3083 0 0.013000 0.076450 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4495 2980 3015 0 0.031000 0.118100 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4496 2981 2739 2 0.005420 0.130500 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+4497 2981 2739 2 0.005400 0.129800 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+4498 2981 2982 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4499 2981 2983 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4500 2981 3024 0 0.003130 0.013150 0.223600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4501 2982 3033 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4502 2982 3062 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4503 2983 3033 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4504 2983 3062 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4505 2984 2968 2 0.004600 0.117200 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+4506 2984 2968 2 0.004600 0.117000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+4507 2984 2968 2 0.003200 0.120000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+4508 2984 3034 0 0.003400 0.015600 0.230200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4509 2985 2740 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4510 2985 2740 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4511 2985 2740 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4512 2985 3036 0 0.002320 0.058320 0.122600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4513 2985 3077 0 0.003200 0.012490 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4514 2985 3077 0 0.003150 0.027060 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4515 2985 3096 0 0.004300 0.015900 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4516 2986 2988 2 0.002000 0.120000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+4517 2986 3048 0 0.001380 0.009250 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4518 2986 3080 0 0.000910 0.006060 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4519 2987 2988 2 0.002000 0.123000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+4520 2987 3048 0 0.001370 0.009100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4521 2991 2751 1 0.004300 0.132700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+4522 2991 2751 1 0.004500 0.133700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+4523 2991 2751 1 0.004800 0.138300 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+4524 2991 3025 0 0.000300 0.001140 0.016800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4525 2991 3080 0 0.003390 0.015460 0.227800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4526 2992 2756 2 0.007200 0.180000 0.000000 1.0581 1.0000 1.0000 0.00 0.00 0.00
+4527 2993 2761 2 0.006700 0.179100 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+4528 2993 2761 2 0.007700 0.180200 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+4529 2993 3054 0 0.008100 0.031700 0.214600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4530 2993 3064 0 0.006600 0.026600 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4531 2993 3090 0 0.001500 0.015000 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4532 2994 2813 2 0.081000 0.288700 0.000000 1.0518 1.0000 1.0000 0.00 0.00 0.00
+4533 2994 3052 0 0.065600 0.250200 0.035000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4534 2995 2766 1 0.005800 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4535 2995 2766 1 0.010600 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4536 2995 2766 1 0.006000 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4537 2995 3031 0 0.002500 0.024860 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4538 2995 3093 0 0.029880 0.124600 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4539 2995 3096 0 0.001990 0.008180 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4540 2996 2770 2 0.010900 0.275000 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+4541 2996 2770 2 0.012600 0.274700 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+4542 2996 2999 0 0.011400 0.040100 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4543 2996 3004 0 0.011200 0.025000 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4544 2996 3042 0 0.014620 0.053870 0.033000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4545 2996 3140 0 0.026280 0.105720 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4546 2997 2775 1 0.004200 0.133500 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4547 2997 2775 1 0.005800 0.180900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4548 2997 2775 1 0.004100 0.134300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4549 2997 2998 0 0.002800 0.016300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4550 2997 3046 0 0.001100 0.006400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4551 2997 3046 0 0.001100 0.006700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4552 2998 3030 0 0.005500 0.013600 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4553 2998 3049 0 0.001740 0.017600 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4554 2999 3074 0 0.035200 0.122600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4555 3000 3023 0 0.011000 0.477800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4556 3000 3049 0 0.001120 0.011370 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4557 3000 3069 0 0.002800 0.018200 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4558 3001 3072 2 0.002600 0.053600 0.000000 1.0641 1.0000 1.0000 0.00 0.00 0.00
+4559 3001 3220 0 0.009300 0.057300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4560 3002 3018 0 0.042200 0.103400 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4561 3003 3006 0 0.016900 0.051800 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4562 3003 3075 0 0.006900 0.046300 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4563 3004 3051 0 0.041600 0.093800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4564 3005 2790 2 0.016000 0.260000 0.000000 0.8852 1.0000 1.0000 0.00 0.00 0.00
+4565 3005 3032 0 0.015600 0.082000 0.134000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4566 3005 3037 0 0.008700 0.050800 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4567 3006 2791 2 0.010800 0.276300 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+4568 3006 3052 0 0.057700 0.128100 0.016400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4569 3007 2793 1 0.005700 0.177300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4570 3007 2793 1 0.007000 0.181600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4571 3007 2793 1 0.007700 0.181800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4572 3007 3008 0 0.004300 0.015400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4573 3007 3033 0 0.009300 0.033600 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4574 3007 3071 0 0.006100 0.021700 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4575 3008 3033 0 0.005200 0.019000 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4576 3008 3036 0 0.006100 0.023200 0.148600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4577 3009 3010 2 0.026900 0.568700 0.000000 0.9992 1.0000 1.0000 0.00 0.00 0.00
+4578 3009 3063 0 0.002100 0.012600 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4579 3011 3012 2 0.027400 0.568700 0.000000 1.0020 1.0000 1.0000 0.00 0.00 0.00
+4580 3011 3033 0 0.006400 0.037400 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4581 3011 3063 0 0.002200 0.012700 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4582 3013 3071 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4583 3013 3084 0 0.002800 0.011600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4584 3014 3071 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4585 3015 2794 1 0.014700 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4586 3015 3016 1 0.015000 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4587 3015 3038 0 0.027910 0.098660 0.013600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4588 3017 2795 2 0.004200 0.126000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+4589 3017 2795 2 0.004300 0.127000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+4590 3017 3057 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4591 3017 3057 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4592 3017 3062 0 0.004600 0.026500 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4593 3018 2683 2 0.017700 0.287300 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+4594 3018 2683 2 0.015700 0.282700 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+4595 3018 3058 0 0.011900 0.058800 0.049000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4596 3018 3075 0 0.005300 0.025100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4597 3019 3030 0 0.001200 0.011500 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4598 3020 3047 0 0.001700 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4599 3021 3023 0 0.011400 0.485300 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4600 3021 3069 0 0.002500 0.016100 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4601 3022 3023 0 0.011300 0.489400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4602 3022 3069 0 0.002500 0.016400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4603 3024 2801 2 0.007200 0.178900 0.000000 1.0047 1.0000 1.0000 0.00 0.00 0.00
+4604 3024 3062 0 0.006000 0.033100 0.083400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4605 3026 3082 0 0.001600 0.019900 0.346600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4606 3026 3296 0 0.001030 0.012210 0.218400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4607 3027 3089 0 0.002200 0.026960 0.467400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4608 3027 3298 0 0.001500 0.017500 0.312400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4609 3028 3076 0 0.001100 0.007000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4610 3029 3030 1 0.000500 0.025400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4611 3029 3079 0 0.000600 0.005900 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4612 3030 2812 1 0.006000 0.182200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4613 3030 2812 1 0.006900 0.184400 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4614 3030 2812 1 0.006100 0.181300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4615 3030 2812 1 0.011400 0.261700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4616 3030 3046 0 0.002100 0.014400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4617 3030 3067 0 0.004600 0.046200 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4618 3030 3091 0 0.010040 0.039610 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4619 3031 2819 1 0.006000 0.175100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4620 3031 2819 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4621 3031 2819 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4622 3031 3050 0 0.010200 0.037100 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4623 3031 3083 0 0.001500 0.007100 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4624 3031 3083 0 0.001000 0.006700 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4625 3032 3065 0 0.017700 0.064200 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4626 3033 2825 1 0.003600 0.132700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4627 3033 2825 1 0.003500 0.130800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4628 3033 2825 1 0.004000 0.139200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4629 3033 3034 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4630 3033 3034 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4631 3033 3035 1 0.013100 0.241100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4632 3033 3043 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4633 3036 2827 1 0.006000 0.188200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4634 3036 2827 1 0.006200 0.183100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4635 3036 2827 1 0.005700 0.192700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4636 3036 2827 1 0.006000 0.173600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4637 3036 3054 0 0.007600 0.028000 0.093800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4638 3036 3090 0 0.018000 0.085900 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4639 3037 2847 2 0.007600 0.165800 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+4640 3037 2847 2 0.007200 0.169300 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+4641 3038 3039 0 0.002810 0.018580 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4642 3038 3065 0 0.006460 0.018530 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4643 3039 2851 2 0.006200 0.177800 0.000000 0.9002 1.0000 1.0000 0.00 0.00 0.00
+4644 3040 2854 2 0.007000 0.174700 0.000000 0.9707 1.0000 1.0000 0.00 0.00 0.00
+4645 3040 3090 0 0.017800 0.118400 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4646 3041 3042 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4647 3041 3042 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4648 3041 3056 0 0.001920 0.021280 0.364800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4649 3041 3061 0 0.001400 0.017300 0.291200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4650 3041 3089 0 0.000990 0.012120 0.211400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4651 3041 3214 0 0.001750 0.020310 0.382000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4652 3042 3076 0 0.003800 0.014500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4653 3042 3076 0 0.002000 0.019400 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4654 3043 2866 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4655 3043 2866 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4656 3043 2866 1 0.006000 0.168900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4657 3043 3057 0 0.036400 0.214000 0.216000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4658 3043 3062 0 0.004600 0.028200 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4659 3044 2868 2 0.006800 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+4660 3044 3058 0 0.000500 0.004800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4661 3045 3046 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4662 3045 3047 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4663 3045 3048 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4664 3046 3049 0 0.005700 0.040700 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4665 3046 3080 0 0.001700 0.056100 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4666 3047 3077 0 0.004100 0.023700 0.120800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4667 3047 3077 0 0.005300 0.029800 0.076400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4668 3048 3078 0 0.005400 0.030000 0.075800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4669 3049 2873 1 0.006500 0.223300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4670 3049 2873 1 0.006200 0.237800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4671 3049 2873 1 0.006300 0.240000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4672 3049 3069 0 0.003700 0.028800 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4673 3050 2877 2 0.004500 0.127200 0.000000 0.9930 1.0000 1.0000 0.00 0.00 0.00
+4674 3050 3070 0 0.020400 0.074500 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4675 3051 2879 2 0.013200 0.277700 0.000000 1.0287 1.0000 1.0000 0.00 0.00 0.00
+4676 3051 3072 0 0.037700 0.083700 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4677 3052 2882 2 0.010200 0.264700 0.000000 1.0958 1.0000 1.0000 0.00 0.00 0.00
+4678 3054 2891 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+4679 3054 2891 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+4680 3054 3064 0 0.010500 0.038600 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4681 3055 2893 2 0.007200 0.177800 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+4682 3055 2893 2 0.007200 0.180000 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+4683 3056 3061 0 0.001700 0.020300 0.458200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4684 3056 3214 0 0.003400 0.039700 0.722600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4685 3056 3266 0 0.000100 0.001800 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4686 3057 3058 0 0.000900 0.099600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4687 3057 3058 0 0.000900 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4688 3058 3060 0 0.012400 0.070100 0.050200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4689 3058 3062 0 0.029650 0.210540 0.032200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4690 3059 3056 1 0.000500 0.027800 0.000000 1.0750 1.0000 1.0000 0.00 0.00 0.00
+4691 3060 3063 0 0.004500 0.022600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4692 3061 3062 1 0.000500 0.021670 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4693 3062 2896 2 0.005600 0.177800 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+4694 3062 2896 2 0.006000 0.179300 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+4695 3062 2896 2 0.007700 0.186700 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+4696 3062 3073 0 0.022000 0.129000 0.020000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4697 3063 2897 2 0.007700 0.178700 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+4698 3063 2897 2 0.006200 0.173300 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+4699 3063 2897 2 0.007800 0.185100 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+4700 3064 2900 2 0.008300 0.180700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4701 3064 2900 2 0.007700 0.179100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4702 3064 3090 0 0.002300 0.029400 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4703 3065 2901 1 0.010500 0.278000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4704 3065 2901 1 0.010500 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4705 3065 2901 1 0.010800 0.272700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4706 3065 3083 0 0.015000 0.055300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4707 3065 3085 0 0.006400 0.022300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4708 3065 3086 0 0.005100 0.034600 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4709 3066 2904 2 0.027000 0.600000 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+4710 3067 2905 2 0.027000 0.600000 0.000000 0.9693 1.0000 1.0000 0.00 0.00 0.00
+4711 3069 3053 2 0.006200 0.182200 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+4712 3069 3053 2 0.006100 0.174700 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+4713 3069 3070 0 0.001100 0.093700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4714 3069 3070 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4715 3069 3091 0 0.003700 0.013900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4716 3070 3093 0 0.003300 0.011800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4717 3071 2911 2 0.007600 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+4718 3071 2911 2 0.007800 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+4719 3071 2911 2 0.007600 0.186700 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+4720 3072 2912 2 0.010300 0.266000 0.000000 1.0328 1.0000 1.0000 0.00 0.00 0.00
+4721 3073 2920 2 0.006300 0.180700 0.000000 0.9847 1.0000 1.0000 0.00 0.00 0.00
+4722 3074 3075 0 0.001900 0.012500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4723 3075 2922 2 0.005800 0.179100 0.000000 1.0793 1.0000 1.0000 0.00 0.00 0.00
+4724 3076 2925 1 0.005600 0.173800 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4725 3076 2925 1 0.005800 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4726 3076 2925 1 0.007100 0.178400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+4727 3077 2927 1 0.011100 0.202200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4728 3077 2927 1 0.011300 0.206700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4729 3077 2927 1 0.011600 0.211800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4730 3077 2927 1 0.011400 0.208700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4731 3077 2927 1 0.009900 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4732 3077 2927 1 0.009800 0.177800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+4733 3077 3078 0 0.000900 0.117000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4734 3079 3080 1 0.000500 0.025000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4735 3080 3081 1 0.004700 0.119200 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+4736 3080 3081 1 0.004800 0.115100 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+4737 3082 3083 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4738 3082 3083 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4739 3082 3219 0 0.002400 0.032200 0.920800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4740 3083 3086 0 0.002600 0.017500 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4741 3085 3087 0 0.009500 0.021300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4742 3086 3087 0 0.007700 0.029200 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4743 3087 3088 2 0.027000 0.560500 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+4744 3087 3088 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+4745 3087 3088 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+4746 3089 3090 0 0.000500 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4747 3091 3092 2 0.027700 0.593300 0.000000 0.9640 1.0000 1.0000 0.00 0.00 0.00
+4748 3093 3094 0 0.001400 0.008600 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4749 3094 3095 2 0.027600 0.602700 0.000000 0.9690 1.0000 1.0000 0.00 0.00 0.00
+4750 3096 2945 2 0.007000 0.171100 0.000000 0.9240 1.0000 1.0000 0.00 0.00 0.00
+4751 3097 3150 0 0.031900 0.075300 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4752 3097 3210 0 0.009200 0.021600 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4753 3098 3173 0 0.027800 0.045500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4754 3098 3181 0 0.057300 0.093900 0.019200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4755 3099 3132 0 0.028500 0.069900 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4756 3099 3148 0 0.022900 0.068400 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4757 3100 3114 0 0.007000 0.021300 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4758 3100 3134 0 0.025500 0.074100 0.019400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4759 3101 3203 0 0.068000 0.116000 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4760 3101 3221 0 0.060200 0.098800 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4761 3102 3181 0 0.091500 0.217600 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4762 3102 3201 0 0.032400 0.076400 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4763 3102 3207 0 0.030800 0.085400 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4764 3103 3209 0 0.027900 0.080400 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4765 3103 3232 0 0.053300 0.153400 0.040200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4766 3104 3105 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4767 3104 3166 0 0.002500 0.035400 0.458800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4768 3104 3192 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4769 3104 3192 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4770 3104 3212 0 0.001800 0.028300 0.321800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4771 3104 3219 0 0.002400 0.036600 0.836000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4772 3105 3156 0 0.001600 0.010400 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4773 3105 3171 0 0.010000 0.064800 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4774 3105 3184 0 0.010500 0.058800 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4775 3105 3200 0 0.004100 0.036500 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4776 3105 3205 0 0.015500 0.102000 0.027600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4777 3105 3223 0 0.014000 0.133500 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4778 3107 3182 0 0.005700 0.029800 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4779 3107 3228 0 0.001300 0.005300 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4780 3108 3158 0 0.047900 0.112800 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4781 3108 3226 0 0.035800 0.084300 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4782 3109 3184 0 0.029100 0.088000 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4783 3109 3208 0 0.051300 0.155300 0.037000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4784 3110 3118 0 0.016000 0.046000 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4785 3110 3127 0 0.014700 0.042400 0.011000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4786 3111 3223 0 0.051400 0.120200 0.030600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4787 3112 3123 0 0.015800 0.117300 0.034400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4788 3112 3156 0 0.019100 0.124100 0.034600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4789 3112 3206 0 0.009300 0.060200 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4790 3112 3213 0 0.008800 0.036900 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4791 3112 3230 0 0.004500 0.013300 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4792 3113 3124 0 0.017000 0.052100 0.048000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4793 3113 3183 0 0.023200 0.152200 0.041200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4794 3113 3204 0 0.016300 0.089000 0.023400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4795 3113 3233 0 0.023500 0.127200 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4796 3114 3217 0 0.039300 0.140900 0.035400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4797 3115 3130 0 0.051700 0.117300 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4798 3115 3193 0 0.003900 0.025600 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4799 3116 3194 0 0.013100 0.037800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4800 3117 3130 0 0.029000 0.086300 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4801 3117 3172 0 0.027100 0.078000 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4802 3117 3176 0 0.041300 0.119000 0.032000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4803 3118 3123 0 0.004300 0.046300 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4804 3118 3205 0 0.015700 0.103400 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4805 3119 3162 0 0.078700 0.154600 0.032600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4806 3119 3191 0 0.003500 0.013600 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4807 3119 3196 0 0.027100 0.146100 0.038400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4808 3119 3197 0 0.026400 0.079700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4809 3119 3224 0 0.044500 0.097200 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4810 3119 3227 0 0.017600 0.073100 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4811 3120 3159 0 0.046400 0.109700 0.027000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4812 3120 3210 0 0.057000 0.135400 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4813 3120 3231 0 0.048100 0.138700 0.036200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4814 3121 3137 0 0.004000 0.017400 0.004600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4815 3121 3149 0 0.002400 0.008100 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4816 3122 3138 0 0.000900 0.009400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4817 3122 3141 0 0.016900 0.033000 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4818 3122 3152 0 0.008200 0.018900 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4819 3122 3211 0 0.034900 0.100400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4820 3122 3217 0 0.006200 0.018800 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4821 3123 3148 0 0.010300 0.112200 0.034000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4822 3123 3206 0 0.019000 0.169300 0.049800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4823 3123 3213 0 0.007500 0.081300 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4824 3124 3191 0 0.008900 0.027800 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4825 3125 3177 0 0.028100 0.047400 0.009200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4826 3125 3218 0 0.083800 0.136700 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4827 3126 3137 0 0.064400 0.115200 0.024400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4828 3126 3153 0 0.007000 0.031300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4829 3126 3165 0 0.009800 0.098400 0.029800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4830 3126 3169 0 0.017100 0.071200 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4831 3126 3175 0 0.001600 0.016900 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4832 3126 3175 0 0.001500 0.015900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4833 3127 3128 0 0.027800 0.071900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4834 3128 3139 0 0.013000 0.084700 0.023000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4835 3128 3145 0 0.061700 0.114600 0.025400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4836 3128 3148 0 0.022000 0.143900 0.039000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4837 3128 3185 0 0.014300 0.051800 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4838 3128 3185 0 0.018900 0.049500 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4839 3128 3213 0 0.034600 0.146200 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4840 3128 3230 0 0.025000 0.168200 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4841 3128 3232 0 0.021500 0.065600 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4842 3129 3184 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4843 3129 3184 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4844 3130 3136 0 0.031700 0.139300 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4845 3130 3160 0 0.025100 0.159800 0.043600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4846 3130 3169 0 0.015300 0.063600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4847 3130 3190 0 0.001200 0.005100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4848 3131 3163 0 0.119000 0.269900 0.064400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4849 3131 3165 0 0.012400 0.065700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4850 3132 3145 0 0.027500 0.040100 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4851 3132 3155 0 0.009400 0.023100 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4852 3132 3177 0 0.072100 0.134100 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4853 3133 3167 0 0.006800 0.020700 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4854 3133 3188 0 0.011900 0.036000 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4855 3134 3144 0 0.023500 0.067700 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4856 3135 3157 0 0.002200 0.023700 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4857 3135 3215 0 0.003400 0.037100 0.011200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4858 3136 3164 0 0.049000 0.085100 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4859 3136 3167 0 0.050300 0.151200 0.036400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4860 3136 3224 0 0.011800 0.035100 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4861 3137 3193 0 0.006400 0.041400 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4862 3137 3215 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4863 3137 3215 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4864 3137 3228 0 0.041600 0.169100 0.045000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4865 3139 3161 0 0.001800 0.005400 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4866 3141 3226 0 0.026100 0.061600 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4867 3142 3223 0 0.004900 0.009800 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4868 3143 3150 0 0.036300 0.104500 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4869 3143 3194 0 0.008600 0.024800 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4870 3144 3187 0 0.008400 0.024300 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4871 3146 3154 0 0.008200 0.025000 0.006000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4872 3146 3157 0 0.004600 0.015500 0.003800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4873 3147 3197 0 0.002100 0.010400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4874 3147 3223 0 0.029500 0.093600 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4875 3148 3187 0 0.037300 0.122400 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4876 3148 3230 0 0.009000 0.029900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4877 3149 3157 0 0.015500 0.049500 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4878 3149 3165 0 0.038200 0.142300 0.085200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4879 3150 3170 0 0.037400 0.087200 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4880 3150 3202 0 0.038100 0.089800 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4881 3151 2992 2 0.001400 0.038000 0.000000 1.0675 1.0000 1.0000 0.00 0.00 0.00
+4882 3151 3167 0 0.007460 0.044800 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4883 3152 3203 0 0.010300 0.038500 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4884 3153 3186 0 0.000500 0.003200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4885 3154 3188 0 0.007100 0.021500 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4886 3157 3140 1 0.000800 0.015500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4887 3157 3215 0 0.006500 0.061100 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4888 3157 3234 0 0.026200 0.109100 0.029200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4889 3158 3181 0 0.053500 0.124600 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4890 3159 3218 0 0.023400 0.045700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4891 3160 3228 0 0.019800 0.083100 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4892 3161 3232 0 0.005600 0.016900 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4893 3162 3223 0 0.016200 0.031800 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4894 3163 3207 0 0.043500 0.125300 0.032800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4895 3164 3223 0 0.067100 0.114700 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4896 3165 3203 0 0.007000 0.055000 0.019800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4897 3165 3220 0 0.005300 0.057300 0.017200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4898 3166 3174 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4899 3166 3174 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4900 3166 3212 0 0.000600 0.007100 0.137000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4901 3166 3214 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4902 3166 3214 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4903 3168 3203 0 0.006700 0.022600 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4904 3168 3217 0 0.011200 0.071500 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4905 3170 3181 0 0.034000 0.079100 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4906 3171 3180 0 0.005200 0.033800 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4907 3173 3221 0 0.081500 0.129600 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4908 3174 3212 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4909 3174 3212 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4910 3176 3187 0 0.017700 0.050900 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4911 3176 3206 0 0.015100 0.098900 0.026800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4912 3178 3179 0 0.000200 0.000500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4913 3178 3210 0 0.020500 0.062000 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4914 3180 3222 0 0.002000 0.013000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4915 3182 3203 0 0.005700 0.035600 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4916 3184 3200 0 0.004200 0.045100 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4917 3184 3222 0 0.011600 0.036300 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4918 3184 3223 0 0.032200 0.069100 0.047400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4919 3184 3223 0 0.023000 0.094500 0.024600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4920 3186 3203 0 0.003900 0.017400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4921 3189 3198 0 0.001400 0.004000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4922 3189 3221 0 0.035000 0.099900 0.026000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4923 3192 3299 0 0.000500 0.006300 0.095800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4924 3192 3307 0 0.003600 0.048000 0.582000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4925 3195 3199 0 0.064100 0.184800 0.048200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4926 3195 3201 0 0.042600 0.100400 0.025000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4927 3196 3233 0 0.021400 0.115700 0.030400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4928 3199 3202 0 0.030200 0.071200 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4929 3203 3229 0 0.015300 0.063700 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4930 3204 3233 0 0.008500 0.046400 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4931 3208 3230 0 0.006600 0.019300 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4932 3209 3218 0 0.033300 0.081600 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4933 3212 3213 1 0.000400 0.019000 0.000000 0.9850 1.0000 1.0000 0.00 0.00 0.00
+4934 3213 3230 0 0.002300 0.024800 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4935 3214 3215 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4936 3214 3216 0 0.002400 0.036600 0.416000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4937 3215 3220 0 0.007890 0.086120 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4938 3215 3229 0 0.023000 0.151200 0.041000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4939 3216 3217 1 0.000400 0.185000 0.000000 1.0110 1.0000 1.0000 0.00 0.00 0.00
+4940 3217 3225 0 0.003100 0.033500 0.010200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4941 3218 3231 0 0.050500 0.124000 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4942 3225 3229 0 0.026900 0.114000 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4943 3229 3234 0 0.028700 0.116900 0.031000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4944 3233 3106 1 0.001700 0.033700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4945 3235 3238 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4946 3235 3238 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4947 3235 3238 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4948 3235 3276 0 0.010550 0.076000 0.115000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4949 3236 3243 0 0.000600 0.006200 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4950 3236 3256 0 0.000490 0.004820 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4951 3237 3258 0 0.021800 0.151100 0.223800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4952 3237 3288 0 0.012700 0.090900 0.135400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4953 3238 3239 1 0.000700 0.021100 0.000000 1.0610 1.0000 1.0000 0.00 0.00 0.00
+4954 3238 3256 0 0.003390 0.033600 0.219800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4955 3238 3280 0 0.003800 0.037800 0.246200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4956 3238 3282 1 0.000600 0.015100 0.000000 1.0720 1.0000 1.0000 0.00 0.00 0.00
+4957 3239 3310 0 0.001000 0.007000 0.014000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4958 3240 3252 0 0.001780 0.012020 0.076600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4959 3241 3242 0 0.000300 0.013550 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4960 3241 3244 0 0.007700 0.053800 0.335000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4961 3241 3249 0 0.005900 0.040500 0.250800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4962 3241 3267 0 0.005500 0.054100 0.363600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4963 3241 3276 0 0.010800 0.100190 0.170400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4964 3241 3276 0 0.015000 0.105500 0.158000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4965 3241 3276 0 0.010500 0.100000 0.170000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4966 3241 3295 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4967 3241 3295 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4968 3242 3290 0 0.005800 0.028100 0.017000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4969 3242 3294 0 0.096500 0.366900 0.054000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4970 3243 3276 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4971 3243 3276 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4972 3243 3280 0 0.001040 0.009300 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4973 3243 3287 0 0.001700 0.011700 0.289600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4974 3244 3267 0 0.002900 0.028500 0.192000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4975 3244 3291 0 0.005400 0.036900 0.228600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4976 3245 3246 0 0.043000 0.303100 0.463000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4977 3245 3250 0 0.029100 0.226700 0.342800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4978 3245 3258 0 0.008500 0.058800 0.087000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4979 3245 3283 0 0.007300 0.050400 0.074000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4980 3246 3250 0 0.012000 0.083600 0.123600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4981 3246 3258 0 0.046800 0.336900 0.519800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4982 3246 3259 0 0.029400 0.230400 0.349400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4983 3246 3259 0 0.037600 0.263000 0.396000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4984 3246 3271 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4985 3246 3271 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4986 3246 3275 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4987 3246 3283 0 0.048900 0.349200 0.538000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4988 3246 3287 0 0.002000 0.015300 0.214000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4989 3246 3287 0 0.005700 0.045000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4990 3246 3287 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4991 3246 3287 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4992 3247 3254 0 0.001620 0.009700 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4993 3247 3262 0 0.001530 0.009400 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4994 3248 3260 0 0.013700 0.095700 0.141000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4995 3248 3277 0 0.011200 0.077200 0.482400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4996 3248 3277 0 0.011200 0.079000 0.471400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4997 3249 3276 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4998 3249 3276 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+4999 3249 3281 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5000 3249 3281 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5001 3251 3257 0 0.002480 0.024470 0.164800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5002 3252 3259 0 0.003580 0.035200 0.239000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5003 3252 3288 0 0.004500 0.044250 0.301000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5004 3253 3274 0 0.017300 0.198800 0.700000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5005 3253 3277 0 0.009100 0.062300 0.385600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5006 3253 3281 0 0.008500 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5007 3253 3281 0 0.008600 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5008 3254 3270 0 0.002100 0.008300 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5009 3255 3264 0 0.004440 0.051440 3.597000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5010 3255 3274 1 0.000740 0.020400 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+5011 3255 3286 0 0.002440 0.032620 2.236000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5012 3256 3276 0 0.001020 0.010050 0.066400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5013 3257 3281 0 0.003920 0.038140 0.258000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5014 3258 3259 0 0.012300 0.125500 0.194000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5015 3258 3275 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5016 3258 3288 0 0.007500 0.077300 0.119000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5017 3259 3288 0 0.023900 0.170800 0.255600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5018 3260 3279 0 0.014500 0.058010 0.094000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5019 3260 3279 0 0.007700 0.056910 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5020 3261 3079 1 0.000400 0.002500 0.000000 1.0450 1.0000 1.0000 0.00 0.00 0.00
+5021 3261 3262 1 0.001200 0.039600 0.000000 1.0250 1.0000 1.0000 0.00 0.00 0.00
+5022 3261 3292 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5023 3263 3270 0 0.062700 0.250000 0.067200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5024 3263 3270 0 0.102000 0.236000 0.060600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5025 3263 3290 0 0.085500 0.342000 0.091400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5026 3263 3294 0 0.080800 0.234400 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5027 3264 3265 1 0.000250 0.015400 0.000000 0.8800 1.0000 1.0000 0.00 0.00 0.00
+5028 3265 3287 0 0.000420 0.006700 0.110800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5029 3266 3267 1 0.000200 0.024200 0.000000 0.9300 1.0000 1.0000 0.00 0.00 0.00
+5030 3267 3268 0 0.000000 0.009400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5031 3267 3293 0 0.000500 0.006500 0.103800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5032 3269 3270 0 0.000400 0.017200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5033 3269 3291 0 0.000770 0.006480 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5034 3272 3309 0 0.001000 0.007000 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5035 3273 3287 0 0.000300 0.001700 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5036 3274 3279 0 0.029050 0.112070 0.195000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5037 3274 3279 0 0.014850 0.114140 0.193000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5038 3276 3278 0 0.000680 0.006680 0.399000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5039 3276 3280 0 0.001050 0.008370 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5040 3277 3287 0 0.025400 0.177700 0.270400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5041 3277 3287 0 0.024400 0.176700 0.271600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5042 3282 3308 0 0.001000 0.007000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5043 3284 3285 0 0.000170 0.012340 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5044 3284 3286 0 0.001840 0.024450 1.662000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5045 3288 3272 1 0.000000 0.083300 0.000000 1.0300 1.0000 1.0000 0.00 0.00 0.00
+5046 3288 3289 1 0.000500 0.018200 0.000000 1.1030 1.0000 1.0000 0.00 0.00 0.00
+5047 3291 3292 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5048 3293 3294 1 0.000330 0.013000 0.000000 1.0500 1.0000 1.0000 0.00 0.00 0.00
+5049 3293 3295 0 0.009220 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5050 3293 3295 0 0.009200 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5051 3296 3297 0 0.000000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5052 3296 3303 0 0.001700 0.021000 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5053 3298 3303 0 0.001000 0.012300 0.150000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5054 3299 3300 0 0.000800 0.009800 0.120000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5055 3300 3304 0 0.001000 0.012000 0.160000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5056 3300 3305 0 0.004200 0.063000 0.200000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5057 3300 3307 0 0.003100 0.027000 0.050000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5058 3300 3307 0 0.001140 0.018000 0.270000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5059 3301 3302 0 0.100000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5060 3301 3304 0 0.000300 0.003800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5061 3301 3304 0 0.003000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5062 3301 3306 0 0.030000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5063 3301 3307 0 0.000400 0.005000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5064 3301 3308 0 0.014000 1.139997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5065 3301 3310 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5066 3302 3303 0 0.001800 0.023000 0.284000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5067 3302 3303 0 0.010000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5068 3302 3304 0 0.030000 0.999999 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5069 3302 3305 0 0.006000 0.068000 0.740000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5070 3302 3306 0 0.050000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5071 3303 3306 0 0.020000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5072 3303 3308 0 -0.200000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5073 3303 3309 0 -0.400000 2.500001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5074 3303 3310 0 0.083000 0.600000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5075 3304 3306 0 0.004200 0.050000 0.080000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5076 3304 3306 0 0.060000 0.700001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5077 3304 3308 0 0.030000 1.009997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5078 3304 3309 0 0.070000 1.830000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5079 3305 3306 0 0.001300 0.029000 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5080 3305 3307 0 0.002200 0.046410 0.400000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5081 3306 3307 0 0.004000 0.044000 0.500000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5082 3306 3310 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5083 3308 3309 0 -0.040450 0.278890 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5084 3308 3310 0 -0.000010 0.002750 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5085 3309 3310 0 -0.178800 0.710991 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5086 3311 3532 0 0.270000 0.349000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5087 3311 3596 0 0.035000 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5088 3312 3319 0 0.292000 0.386000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5089 3312 3538 0 0.002000 0.010000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5090 3313 3405 0 0.025400 0.031800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5091 3313 3476 0 0.027100 0.033900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5092 3314 3436 0 0.288800 0.361900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5093 3314 3569 0 0.233400 0.291900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5094 3315 3393 0 0.124600 0.156000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5095 3315 3538 0 0.333900 0.417900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5096 3316 3419 0 0.163200 0.189500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5097 3316 3523 0 0.092700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5098 3317 3355 0 0.197500 0.229300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5099 3317 3375 0 0.280100 0.333200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5100 3318 3348 0 0.018600 0.024300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5101 3318 3427 0 0.065900 0.164200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5102 3318 3429 0 0.018300 0.044700 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5103 3318 3509 0 0.030700 0.082400 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5104 3318 3521 0 0.020200 0.059200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5105 3318 3577 0 0.019000 0.023800 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5106 3319 3532 0 0.262000 0.339000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5107 3320 3359 0 0.201500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5108 3320 3416 0 0.040300 0.046800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5109 3320 3526 0 0.156000 0.525000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5110 3321 3432 0 0.301300 0.479100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5111 3321 3434 0 0.178000 0.222700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5112 3322 3335 0 0.125100 0.169700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5113 3322 3390 0 0.057600 0.072100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5114 3323 3400 0 0.265000 0.343000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5115 3323 3604 0 0.245000 0.317000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5116 3324 3390 0 0.064400 0.080600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5117 3324 3555 0 0.036600 0.079900 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5118 3325 3334 0 0.296200 0.369500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5119 3325 3396 0 0.506000 0.504700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5120 3325 3447 0 0.374700 0.469600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5121 3325 3475 0 0.828700 0.846900 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5122 3326 3367 0 0.136000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5123 3326 3587 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5124 3327 3533 0 0.294200 0.368600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5125 3327 3541 0 0.338500 0.420000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5126 3328 3561 0 0.137110 0.799561 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5127 3328 3599 0 0.016800 0.050100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5128 3329 3511 0 0.233700 0.271400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5129 3329 3546 0 0.338500 0.423800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5130 3330 3432 0 0.057400 0.142400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5131 3330 3451 0 0.018900 0.044800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5132 3331 3385 0 0.054000 0.136000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5133 3331 3583 0 0.100000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5134 3332 3337 0 0.276500 0.336500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5135 3332 3537 0 0.067800 0.086200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5136 3333 3344 0 0.503600 0.627200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5137 3333 3399 0 0.200000 0.250100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5138 3334 3497 0 0.407000 0.474000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5139 3335 3468 0 0.113000 0.152000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5140 3335 3503 0 0.025220 0.066400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5141 3335 3599 0 0.013750 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5142 3336 3512 0 0.182900 0.462700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5143 3336 3560 0 0.145100 0.367300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5144 3338 3343 0 0.118600 0.153200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5145 3338 3450 0 0.173000 0.216500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5146 3339 3364 0 0.144000 0.180200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5147 3339 3548 0 0.040200 0.061200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5148 3340 3459 0 0.368700 0.428800 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5149 3340 3464 0 0.272000 0.315900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5150 3341 3406 0 0.070500 0.178400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5151 3341 3407 0 0.112900 0.165500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5152 3342 3467 0 0.129000 0.161600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5153 3342 3581 0 0.284100 0.356000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5154 3343 3538 0 0.155900 0.195200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5155 3344 3358 0 0.088000 0.161000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5156 3344 3446 0 0.200000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5157 3344 3476 0 0.048400 0.060200 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5158 3344 3477 0 0.037000 0.062000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5159 3344 3506 0 0.308000 0.437000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5160 3346 3575 0 0.160700 0.214200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5161 3346 3591 0 0.061000 0.076300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5162 3347 3378 0 0.048000 0.061000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5163 3347 3587 0 0.099000 0.125000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5164 3348 3415 0 0.019600 0.025800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5165 3349 3414 0 0.030500 0.038200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5166 3349 3577 0 0.040700 0.050700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5167 3350 3434 0 0.247500 0.309500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5168 3350 3603 0 0.214700 0.268600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5169 3351 3408 0 0.056500 0.104100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5170 3351 3524 0 0.235800 0.291700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5171 3352 3574 0 0.011000 0.028000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5172 3353 3574 0 0.147100 0.184300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5173 3353 3597 0 0.394300 0.419400 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5174 3354 3377 0 0.213000 0.266000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5175 3354 3385 0 0.290200 0.413400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5176 3354 3456 0 0.272600 0.361100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5177 3354 3498 0 0.066500 0.082300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5178 3355 3520 0 0.278100 0.322900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5179 3355 3544 0 0.326400 0.404600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5180 3356 3391 0 0.152900 0.270300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5181 3356 3587 0 0.066800 0.157200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5182 3357 3492 0 0.359000 0.417000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5183 3357 3511 0 0.296000 0.371000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5184 3358 3596 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5185 3359 3522 0 0.225400 0.261800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5186 3360 3481 0 0.083000 0.114000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5187 3360 3495 0 0.096000 0.198000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5188 3361 3478 0 0.157200 0.196900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5189 3361 3582 0 0.091800 0.232400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5190 3362 3547 0 0.051900 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5191 3362 3582 0 0.076300 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5192 3364 3418 0 0.146900 0.172200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5193 3365 3516 0 0.065600 0.166000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5194 3365 3600 0 0.248300 0.374800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5195 3366 3442 0 0.282100 0.327600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5196 3366 3459 0 0.229700 0.266900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5197 3366 3461 0 0.357200 0.416900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5198 3366 3486 0 0.243000 0.326000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5199 3367 3502 0 0.221100 0.258500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5200 3368 3435 0 0.172900 0.272900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5201 3368 3542 0 0.211600 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5202 3368 3548 0 0.248400 0.378300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5203 3368 3594 0 0.264600 0.366300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5204 3369 3418 0 0.336000 0.549100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5205 3369 3592 0 0.144600 0.192400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5206 3370 3587 0 0.016400 0.037000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5207 3371 3456 0 0.260000 0.250000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5208 3371 3534 0 0.074000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5209 3372 3462 0 0.474401 0.484100 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5210 3372 3500 0 0.224500 0.216100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5211 3373 3423 0 0.091000 0.184000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5212 3373 3494 0 0.079000 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5213 3375 3453 0 0.308300 0.386300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5214 3376 3513 0 0.036000 0.172000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5215 3376 3563 0 0.023000 0.075000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5216 3377 3606 0 0.038900 0.050800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5217 3378 3591 0 0.096600 0.130800 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5218 3379 3337 1 0.139500 0.467100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5219 3379 3524 0 0.233000 0.559600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5220 3379 3572 0 0.079000 0.102000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5221 3380 3385 0 0.060000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5222 3380 3508 0 0.027000 0.042000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5223 3381 3385 0 0.045400 0.111400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5224 3381 3507 0 0.057200 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5225 3382 3427 0 0.067800 0.088900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5226 3382 3452 0 0.013400 0.033600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5227 3383 3439 0 0.021000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5228 3383 3452 0 0.027000 0.068000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5229 3384 3410 0 0.050000 0.086000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5230 3384 3423 0 0.076300 0.192800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5231 3384 3443 0 0.099000 0.128000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5232 3384 3527 0 0.024000 0.061000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5233 3385 3551 0 0.130000 0.324000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5234 3386 3544 0 0.436300 0.497300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5235 3386 3565 0 0.397000 0.468200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5236 3387 3428 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5237 3388 3452 0 0.143200 0.182300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5238 3388 3454 0 0.155200 0.194400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5239 3389 3525 0 0.115800 0.145000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5240 3389 3604 0 0.192500 0.241300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5241 3391 3536 0 0.019000 0.068200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5242 3392 3527 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5243 3392 3562 0 0.057000 0.141000 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5244 3393 3434 0 0.181400 0.226800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5245 3394 3428 0 0.056300 0.073000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5246 3394 3505 0 0.016700 0.029100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5247 3395 3449 0 0.118000 0.152000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5248 3395 3506 0 0.129000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5249 3396 3511 0 0.229700 0.287800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5250 3398 3471 0 0.070500 0.081900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5251 3398 3507 0 0.060400 0.075700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5252 3399 3603 0 0.110100 0.137800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5253 3400 3446 0 0.180000 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5254 3403 3526 0 0.296000 0.282000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5255 3403 3574 0 0.339000 0.381000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5256 3404 3477 0 0.022000 0.056000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5257 3404 3557 0 0.163000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5258 3405 3556 0 0.176300 0.224000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5259 3406 3537 0 0.092400 0.115700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5260 3407 3598 0 0.065600 0.085500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5261 3408 3480 0 0.133400 0.250800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5262 3408 3598 0 0.066400 0.168100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5263 3409 3520 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5264 3411 3531 0 0.137000 0.159100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5265 3411 3543 0 0.259300 0.324500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5266 3412 3539 0 0.058000 0.150000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5267 3412 3583 0 0.052000 0.064000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5268 3414 3563 0 0.117100 0.174000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5269 3415 3601 0 0.031100 0.070800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5270 3416 3501 0 0.199000 0.239000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5271 3417 3445 0 0.005900 0.016700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5272 3417 3503 0 0.020500 0.054900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5273 3417 3561 0 0.012200 0.038400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5274 3418 3431 0 0.069400 0.086800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5275 3418 3512 0 0.271300 0.426200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5276 3419 3581 0 0.216400 0.248300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5277 3420 3472 0 0.085000 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5278 3420 3499 0 0.187000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5279 3421 3529 0 0.322400 0.404000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5280 3421 3574 0 0.094200 0.146700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5281 3422 3512 0 0.221600 0.277700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5282 3422 3594 0 0.150900 0.188700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5283 3423 3575 0 0.178900 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5284 3423 3585 0 0.077700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5285 3424 3481 0 0.155500 0.301300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5286 3424 3539 0 0.028100 0.064600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5287 3425 3444 0 0.141000 0.163800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5288 3425 3504 0 0.198000 0.256200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5289 3426 3439 0 0.026000 0.044000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5290 3426 3510 0 0.084000 0.103000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5291 3429 3430 0 0.021000 0.052000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5292 3429 3509 0 0.027000 0.066000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5293 3430 3452 0 0.085200 0.181500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5294 3431 3444 0 0.266700 0.308000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5295 3432 3462 0 0.181900 0.256900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5296 3432 3465 0 0.115400 0.170200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5297 3433 3534 0 0.093000 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5298 3433 3572 0 0.067000 0.168000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5299 3434 3549 0 0.254000 0.334000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5300 3435 3466 0 0.171500 0.210600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5301 3436 3478 0 0.184700 0.232100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5302 3438 3465 0 0.296400 0.386200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5303 3438 3502 0 0.032700 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5304 3440 3454 0 0.181300 0.227200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5305 3440 3531 0 0.142600 0.178800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5306 3441 3587 0 0.214000 0.272000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5307 3441 3591 0 0.012000 0.015000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5308 3442 3597 0 0.100700 0.117000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5309 3443 3586 0 0.068000 0.083000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5310 3445 3561 0 0.018020 0.055090 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5311 3445 3587 0 0.015680 0.073070 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5312 3447 3518 0 0.306200 0.383800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5313 3448 3452 0 0.032600 0.072500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5314 3448 3571 0 0.259200 0.331900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5315 3449 3602 0 0.156000 0.191000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5316 3450 3502 0 0.076500 0.095800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5317 3451 3533 0 0.118900 0.149000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5318 3453 3525 0 0.195500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5319 3453 3602 0 0.172000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5320 3456 3498 0 0.206000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5321 3456 3534 0 0.260900 0.343300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5322 3457 3547 0 0.266700 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5323 3458 3530 0 0.058000 0.144000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5324 3458 3556 0 0.225400 0.280500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5325 3458 3569 0 0.078100 0.097700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5326 3458 3570 0 0.142400 0.340700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5327 3460 3534 0 0.180000 0.220000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5328 3460 3551 0 0.114000 0.284000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5329 3461 3523 0 0.094700 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5330 3464 3604 0 0.194300 0.241400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5331 3466 3504 0 0.128900 0.161500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5332 3466 3516 0 0.140000 0.588000 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5333 3466 3585 0 0.255900 0.397000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5334 3466 3588 0 0.219900 0.255800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5335 3466 3595 0 0.179500 0.209000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5336 3467 3540 0 0.044300 0.054600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5337 3468 3586 0 0.080000 0.098000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5338 3469 3513 0 0.133000 0.170000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5339 3469 3543 0 0.005000 0.024000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5340 3470 3503 0 0.020450 0.054930 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5341 3470 3587 0 0.024000 0.075000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5342 3471 3563 0 0.021000 0.135700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5343 3472 3564 0 0.017000 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5344 3473 3555 0 0.077200 0.096900 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5345 3473 3590 0 0.220000 0.276200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5346 3475 3519 0 0.359000 0.450400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5347 3475 3565 0 0.572300 0.716900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5348 3479 3483 0 0.135000 0.189900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5349 3479 3570 0 0.086900 0.219900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5350 3480 3539 0 0.058600 0.145900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5351 3481 3496 0 0.194100 0.229600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5352 3481 3550 0 0.080000 0.198000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5353 3482 3532 0 0.200000 0.256000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5354 3482 3582 0 0.043000 0.108000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5355 3483 3582 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5356 3484 3591 0 0.053200 0.131900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5357 3485 3543 0 0.051700 0.070100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5358 3486 3549 0 0.280500 0.377400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5359 3488 3555 0 0.058000 0.170000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5360 3488 3559 0 0.075000 0.185000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5361 3490 3517 0 0.020000 0.026000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5362 3491 3517 0 0.043400 0.054300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5363 3492 3518 0 0.397000 0.497000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5364 3493 3501 0 0.270000 0.329500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5365 3493 3511 0 0.078200 0.094000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5366 3494 3568 0 0.016000 0.040000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5367 3495 3517 0 0.080000 0.141000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5368 3496 3517 0 0.065000 0.112000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5369 3497 3552 0 0.285900 0.333100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5370 3499 3502 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5371 3500 3540 0 0.234500 0.225100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5372 3502 3600 0 0.363400 0.425500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5373 3505 3517 0 0.044000 0.057000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5374 3508 3580 0 0.037000 0.088000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5375 3509 3521 0 0.009000 0.020000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5376 3509 3594 0 0.204100 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5377 3510 3543 0 0.099000 0.248000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5378 3510 3554 0 0.029000 0.128000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5379 3512 3571 0 0.152900 0.209100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5380 3513 3515 0 0.057900 0.108900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5381 3513 3554 0 0.012000 0.017000 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5382 3514 3516 0 0.008200 0.020500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5383 3514 3591 0 0.100700 0.126200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5384 3515 3563 0 0.106200 0.139800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5385 3516 3568 0 0.161000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5386 3516 3593 0 0.130000 0.246600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5387 3518 3519 0 0.662900 0.830700 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5388 3522 3597 0 0.135300 0.157100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5389 3523 3541 0 0.268000 0.335800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5390 3526 3576 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5391 3529 3581 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5392 3530 3579 0 0.037000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5393 3536 3555 0 0.011200 0.037400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5394 3538 3590 0 0.215300 0.263900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5395 3539 3580 0 0.186000 0.241000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5396 3540 3541 0 0.298200 0.373700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5397 3543 3606 0 0.173300 0.218900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5398 3544 3545 0 0.274000 0.318200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5399 3544 3578 0 0.222000 0.234000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5400 3545 3605 0 0.211500 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5401 3546 3576 0 0.296000 0.363000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5402 3552 3578 0 0.249000 0.264000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5403 3552 3597 0 0.532800 0.529500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5404 3555 3564 0 0.063000 0.085000 0.007800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5405 3557 3579 0 0.058000 0.075000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5406 3560 3592 0 0.318500 0.370700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5407 3563 3601 0 0.012700 0.036100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5408 3588 3593 0 0.229700 0.266800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5409 3588 3595 0 0.040400 0.046900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5410 3603 3604 0 0.351500 0.442100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5411 3604 3605 0 0.358500 0.419200 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5412 3608 3312 2 0.010800 0.276300 0.000000 1.0301 1.0000 1.0000 0.00 0.00 0.00
+5413 3608 3622 0 0.000400 0.002400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5414 3608 3623 0 0.001500 0.003400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5415 3608 3717 0 0.008300 0.053400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5416 3609 3610 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5417 3609 3610 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5418 3609 3646 0 0.002100 0.009600 0.140600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5419 3609 3649 0 0.003400 0.018130 0.138600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5420 3609 3653 0 0.000900 0.004300 0.063200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5421 3611 3681 0 0.006340 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5422 3612 3682 0 0.006350 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5423 3613 3320 2 0.007000 0.180000 0.000000 1.0097 1.0000 1.0000 0.00 0.00 0.00
+5424 3613 3614 0 0.027000 0.103000 0.014400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5425 3613 3734 0 0.022100 0.084300 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5426 3614 3325 2 0.010900 0.272000 0.000000 1.0680 1.0000 1.0000 0.00 0.00 0.00
+5427 3614 3656 0 0.028500 0.108600 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5428 3615 3335 2 0.004200 0.127000 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+5429 3615 3335 2 0.004300 0.127300 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+5430 3615 3655 0 0.013500 0.029950 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5431 3615 3676 0 0.004500 0.016100 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5432 3615 3704 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5433 3615 3704 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5434 3615 3717 0 0.011100 0.025700 0.013400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5435 3615 3730 0 0.008600 0.031400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5436 3615 3738 0 0.009100 0.033000 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5437 3615 3746 0 0.002340 0.010260 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5438 3616 3617 1 0.000300 0.010200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5439 3616 3618 1 0.000500 0.032900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5440 3616 3619 1 0.000800 0.031100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5441 3616 3688 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5442 3616 3689 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5443 3616 3744 0 0.000900 0.011000 0.192600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5444 3616 3744 0 0.000900 0.011000 0.385200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5445 3617 3691 0 0.002000 0.019500 0.044000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5446 3618 3341 2 0.006500 0.170200 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+5447 3618 3341 2 0.006900 0.175600 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+5448 3618 3729 0 0.002500 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5449 3618 3731 0 0.002890 0.009510 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5450 3618 3731 0 0.002320 0.009950 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5451 3619 3631 0 0.001400 0.013500 0.009000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5452 3619 3636 0 0.040200 0.090390 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5453 3619 3638 0 0.011290 0.039310 0.026600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5454 3619 3642 0 0.032600 0.090400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5455 3619 3651 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5456 3619 3652 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5457 3619 3732 0 0.002370 0.011230 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5458 3620 3344 2 0.006000 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+5459 3620 3344 2 0.007200 0.180000 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+5460 3620 3622 0 0.038200 0.088000 0.045600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5461 3620 3680 0 0.006000 0.103200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5462 3620 3720 0 0.012100 0.060000 0.018400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5463 3620 3736 0 0.001900 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5464 3621 3620 2 0.000500 0.025000 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+5465 3621 3955 0 0.000400 0.003600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5466 3624 3625 1 0.000700 0.025000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5467 3624 3723 0 0.000300 0.001800 1.273000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5468 3625 3632 0 0.001500 0.006700 0.099200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5469 3625 3653 0 0.001500 0.006600 0.098000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5470 3625 3696 0 0.001300 0.005800 0.085600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5471 3626 3690 0 0.000400 0.002600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5472 3626 3730 0 0.001100 0.006700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5473 3627 3687 0 0.001600 0.006700 0.114800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5474 3627 3742 0 0.001900 0.009100 0.101200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5475 3628 3363 2 0.004400 0.127500 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+5476 3628 3363 2 0.004400 0.125700 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+5477 3628 3669 0 0.001600 0.008600 0.058200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5478 3628 3671 0 0.005700 0.033390 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5479 3628 3705 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5480 3628 3733 0 0.007250 0.028620 0.062800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5481 3629 3368 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5482 3629 3368 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5483 3629 3634 0 0.002500 0.016000 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5484 3629 3752 0 0.004300 0.028700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5485 3631 3728 0 0.000130 0.001300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5486 3632 3374 1 0.004200 0.140000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5487 3632 3374 1 0.004400 0.137300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5488 3632 3374 1 0.004800 0.137800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5489 3632 3687 0 0.001000 0.004600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5490 3632 3696 0 0.002400 0.011020 0.162200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5491 3632 3740 0 0.002700 0.012500 0.183400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5492 3633 3703 0 0.001600 0.019700 0.343200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5493 3633 3766 0 0.004400 0.063800 0.811600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5494 3634 3699 0 0.007300 0.042500 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5495 3634 3727 0 0.002400 0.015300 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5496 3635 3641 0 0.001800 0.018200 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5497 3635 3739 0 0.000500 0.004700 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5498 3636 3379 2 0.007700 0.186400 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+5499 3636 3379 2 0.007700 0.186600 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+5500 3636 3642 0 0.015800 0.052200 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5501 3636 3768 0 0.008680 0.046920 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5502 3637 3667 1 0.000500 0.011700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5503 3637 3889 0 0.020900 0.097700 0.038800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5504 3638 3385 2 0.007300 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5505 3638 3747 0 0.001110 0.003830 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5506 3639 3739 0 0.003300 0.007000 0.131800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5507 3640 3743 0 0.000300 0.025250 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5508 3641 3397 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+5509 3641 3397 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+5510 3641 3728 0 0.001400 0.013600 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5511 3641 3745 0 0.013000 0.076450 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5512 3642 3677 0 0.031000 0.118100 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5513 3643 3401 2 0.005420 0.130500 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+5514 3643 3401 2 0.005400 0.129800 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+5515 3643 3644 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5516 3643 3645 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5517 3643 3686 0 0.003130 0.013150 0.223600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5518 3644 3695 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5519 3644 3724 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5520 3645 3695 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5521 3645 3724 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5522 3646 3630 2 0.004600 0.117200 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+5523 3646 3630 2 0.004600 0.117000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+5524 3646 3630 2 0.003200 0.120000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+5525 3646 3696 0 0.003400 0.015600 0.230200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5526 3647 3402 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5527 3647 3402 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5528 3647 3402 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5529 3647 3698 0 0.002320 0.058320 0.122600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5530 3647 3739 0 0.003200 0.012490 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5531 3647 3739 0 0.003150 0.027060 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5532 3647 3758 0 0.004300 0.015900 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5533 3648 3650 2 0.002000 0.120000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+5534 3648 3710 0 0.001380 0.009250 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5535 3648 3742 0 0.000910 0.006060 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5536 3649 3650 2 0.002000 0.123000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+5537 3649 3710 0 0.001370 0.009100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5538 3653 3413 1 0.004300 0.132700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+5539 3653 3413 1 0.004500 0.133700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+5540 3653 3413 1 0.004800 0.138300 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+5541 3653 3687 0 0.000300 0.001140 0.016800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5542 3653 3742 0 0.003390 0.015460 0.227800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5543 3654 3418 2 0.007200 0.180000 0.000000 1.0581 1.0000 1.0000 0.00 0.00 0.00
+5544 3655 3423 2 0.006700 0.179100 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+5545 3655 3423 2 0.007700 0.180200 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+5546 3655 3716 0 0.008100 0.031700 0.214600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5547 3655 3726 0 0.006600 0.026600 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5548 3655 3752 0 0.001500 0.015000 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5549 3656 3475 2 0.081000 0.288700 0.000000 1.0518 1.0000 1.0000 0.00 0.00 0.00
+5550 3656 3714 0 0.065600 0.250200 0.035000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5551 3657 3428 1 0.005800 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5552 3657 3428 1 0.010600 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5553 3657 3428 1 0.006000 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5554 3657 3693 0 0.002500 0.024860 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5555 3657 3755 0 0.029880 0.124600 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5556 3657 3758 0 0.001990 0.008180 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5557 3658 3432 2 0.010900 0.275000 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+5558 3658 3432 2 0.012600 0.274700 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+5559 3658 3661 0 0.011400 0.040100 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5560 3658 3666 0 0.011200 0.025000 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5561 3658 3704 0 0.014620 0.053870 0.033000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5562 3658 3802 0 0.026280 0.105720 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5563 3659 3437 1 0.004200 0.133500 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5564 3659 3437 1 0.005800 0.180900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5565 3659 3437 1 0.004100 0.134300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5566 3659 3660 0 0.002800 0.016300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5567 3659 3708 0 0.001100 0.006400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5568 3659 3708 0 0.001100 0.006700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5569 3660 3692 0 0.005500 0.013600 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5570 3660 3711 0 0.001740 0.017600 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5571 3661 3736 0 0.035200 0.122600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5572 3662 3685 0 0.011000 0.477800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5573 3662 3711 0 0.001120 0.011370 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5574 3662 3731 0 0.002800 0.018200 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5575 3663 3734 2 0.002600 0.053600 0.000000 1.0641 1.0000 1.0000 0.00 0.00 0.00
+5576 3663 3882 0 0.009300 0.057300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5577 3664 3680 0 0.042200 0.103400 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5578 3665 3668 0 0.016900 0.051800 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5579 3665 3737 0 0.006900 0.046300 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5580 3666 3713 0 0.041600 0.093800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5581 3667 3452 2 0.016000 0.260000 0.000000 0.8852 1.0000 1.0000 0.00 0.00 0.00
+5582 3667 3694 0 0.015600 0.082000 0.134000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5583 3667 3699 0 0.008700 0.050800 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5584 3668 3453 2 0.010800 0.276300 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+5585 3668 3714 0 0.057700 0.128100 0.016400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5586 3669 3455 1 0.005700 0.177300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5587 3669 3455 1 0.007000 0.181600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5588 3669 3455 1 0.007700 0.181800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5589 3669 3670 0 0.004300 0.015400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5590 3669 3695 0 0.009300 0.033600 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5591 3669 3733 0 0.006100 0.021700 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5592 3670 3695 0 0.005200 0.019000 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5593 3670 3698 0 0.006100 0.023200 0.148600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5594 3671 3672 2 0.026900 0.568700 0.000000 0.9992 1.0000 1.0000 0.00 0.00 0.00
+5595 3671 3725 0 0.002100 0.012600 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5596 3673 3674 2 0.027400 0.568700 0.000000 1.0020 1.0000 1.0000 0.00 0.00 0.00
+5597 3673 3695 0 0.006400 0.037400 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5598 3673 3725 0 0.002200 0.012700 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5599 3675 3733 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5600 3675 3746 0 0.002800 0.011600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5601 3676 3733 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5602 3677 3456 1 0.014700 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5603 3677 3678 1 0.015000 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5604 3677 3700 0 0.027910 0.098660 0.013600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5605 3679 3457 2 0.004200 0.126000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+5606 3679 3457 2 0.004300 0.127000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+5607 3679 3719 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5608 3679 3719 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5609 3679 3724 0 0.004600 0.026500 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5610 3680 3345 2 0.017700 0.287300 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+5611 3680 3345 2 0.015700 0.282700 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+5612 3680 3720 0 0.011900 0.058800 0.049000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5613 3680 3737 0 0.005300 0.025100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5614 3681 3692 0 0.001200 0.011500 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5615 3682 3709 0 0.001700 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5616 3683 3685 0 0.011400 0.485300 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5617 3683 3731 0 0.002500 0.016100 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5618 3684 3685 0 0.011300 0.489400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5619 3684 3731 0 0.002500 0.016400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5620 3686 3463 2 0.007200 0.178900 0.000000 1.0047 1.0000 1.0000 0.00 0.00 0.00
+5621 3686 3724 0 0.006000 0.033100 0.083400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5622 3688 3744 0 0.001600 0.019900 0.346600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5623 3688 3958 0 0.001030 0.012210 0.218400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5624 3689 3751 0 0.002200 0.026960 0.467400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5625 3689 3960 0 0.001500 0.017500 0.312400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5626 3690 3738 0 0.001100 0.007000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5627 3691 3692 1 0.000500 0.025400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5628 3691 3741 0 0.000600 0.005900 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5629 3692 3474 1 0.006000 0.182200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5630 3692 3474 1 0.006900 0.184400 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5631 3692 3474 1 0.006100 0.181300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5632 3692 3474 1 0.011400 0.261700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5633 3692 3708 0 0.002100 0.014400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5634 3692 3729 0 0.004600 0.046200 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5635 3692 3753 0 0.010040 0.039610 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5636 3693 3481 1 0.006000 0.175100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5637 3693 3481 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5638 3693 3481 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5639 3693 3712 0 0.010200 0.037100 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5640 3693 3745 0 0.001500 0.007100 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5641 3693 3745 0 0.001000 0.006700 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5642 3694 3727 0 0.017700 0.064200 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5643 3695 3487 1 0.003600 0.132700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5644 3695 3487 1 0.003500 0.130800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5645 3695 3487 1 0.004000 0.139200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5646 3695 3696 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5647 3695 3696 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5648 3695 3697 1 0.013100 0.241100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5649 3695 3705 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5650 3698 3489 1 0.006000 0.188200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5651 3698 3489 1 0.006200 0.183100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5652 3698 3489 1 0.005700 0.192700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5653 3698 3489 1 0.006000 0.173600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5654 3698 3716 0 0.007600 0.028000 0.093800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5655 3698 3752 0 0.018000 0.085900 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5656 3699 3509 2 0.007600 0.165800 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+5657 3699 3509 2 0.007200 0.169300 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+5658 3700 3701 0 0.002810 0.018580 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5659 3700 3727 0 0.006460 0.018530 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5660 3701 3513 2 0.006200 0.177800 0.000000 0.9002 1.0000 1.0000 0.00 0.00 0.00
+5661 3702 3516 2 0.007000 0.174700 0.000000 0.9707 1.0000 1.0000 0.00 0.00 0.00
+5662 3702 3752 0 0.017800 0.118400 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5663 3703 3704 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5664 3703 3704 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5665 3703 3718 0 0.001920 0.021280 0.364800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5666 3703 3723 0 0.001400 0.017300 0.291200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5667 3703 3751 0 0.000990 0.012120 0.211400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5668 3703 3876 0 0.001750 0.020310 0.382000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5669 3704 3738 0 0.003800 0.014500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5670 3704 3738 0 0.002000 0.019400 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5671 3705 3528 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5672 3705 3528 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5673 3705 3528 1 0.006000 0.168900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5674 3705 3719 0 0.036400 0.214000 0.216000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5675 3705 3724 0 0.004600 0.028200 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5676 3706 3530 2 0.006800 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+5677 3706 3720 0 0.000500 0.004800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5678 3707 3708 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5679 3707 3709 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5680 3707 3710 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5681 3708 3711 0 0.005700 0.040700 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5682 3708 3742 0 0.001700 0.056100 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5683 3709 3739 0 0.004100 0.023700 0.120800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5684 3709 3739 0 0.005300 0.029800 0.076400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5685 3710 3740 0 0.005400 0.030000 0.075800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5686 3711 3535 1 0.006500 0.223300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5687 3711 3535 1 0.006200 0.237800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5688 3711 3535 1 0.006300 0.240000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5689 3711 3731 0 0.003700 0.028800 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5690 3712 3539 2 0.004500 0.127200 0.000000 0.9930 1.0000 1.0000 0.00 0.00 0.00
+5691 3712 3732 0 0.020400 0.074500 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5692 3713 3541 2 0.013200 0.277700 0.000000 1.0287 1.0000 1.0000 0.00 0.00 0.00
+5693 3713 3734 0 0.037700 0.083700 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5694 3714 3544 2 0.010200 0.264700 0.000000 1.0958 1.0000 1.0000 0.00 0.00 0.00
+5695 3716 3553 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+5696 3716 3553 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+5697 3716 3726 0 0.010500 0.038600 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5698 3717 3555 2 0.007200 0.177800 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+5699 3717 3555 2 0.007200 0.180000 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+5700 3718 3723 0 0.001700 0.020300 0.458200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5701 3718 3876 0 0.003400 0.039700 0.722600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5702 3718 3928 0 0.000100 0.001800 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5703 3719 3720 0 0.000900 0.099600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5704 3719 3720 0 0.000900 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5705 3720 3722 0 0.012400 0.070100 0.050200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5706 3720 3724 0 0.029650 0.210540 0.032200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5707 3721 3718 1 0.000500 0.027800 0.000000 1.0750 1.0000 1.0000 0.00 0.00 0.00
+5708 3722 3725 0 0.004500 0.022600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5709 3723 3724 1 0.000500 0.021670 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5710 3724 3558 2 0.005600 0.177800 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+5711 3724 3558 2 0.006000 0.179300 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+5712 3724 3558 2 0.007700 0.186700 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+5713 3724 3735 0 0.022000 0.129000 0.020000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5714 3725 3559 2 0.007700 0.178700 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+5715 3725 3559 2 0.006200 0.173300 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+5716 3725 3559 2 0.007800 0.185100 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+5717 3726 3562 2 0.008300 0.180700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5718 3726 3562 2 0.007700 0.179100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5719 3726 3752 0 0.002300 0.029400 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5720 3727 3563 1 0.010500 0.278000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5721 3727 3563 1 0.010500 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5722 3727 3563 1 0.010800 0.272700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5723 3727 3745 0 0.015000 0.055300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5724 3727 3747 0 0.006400 0.022300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5725 3727 3748 0 0.005100 0.034600 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5726 3728 3566 2 0.027000 0.600000 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+5727 3729 3567 2 0.027000 0.600000 0.000000 0.9693 1.0000 1.0000 0.00 0.00 0.00
+5728 3731 3715 2 0.006200 0.182200 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+5729 3731 3715 2 0.006100 0.174700 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+5730 3731 3732 0 0.001100 0.093700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5731 3731 3732 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5732 3731 3753 0 0.003700 0.013900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5733 3732 3755 0 0.003300 0.011800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5734 3733 3573 2 0.007600 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+5735 3733 3573 2 0.007800 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+5736 3733 3573 2 0.007600 0.186700 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+5737 3734 3574 2 0.010300 0.266000 0.000000 1.0328 1.0000 1.0000 0.00 0.00 0.00
+5738 3735 3582 2 0.006300 0.180700 0.000000 0.9847 1.0000 1.0000 0.00 0.00 0.00
+5739 3736 3737 0 0.001900 0.012500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5740 3737 3584 2 0.005800 0.179100 0.000000 1.0793 1.0000 1.0000 0.00 0.00 0.00
+5741 3738 3587 1 0.005600 0.173800 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5742 3738 3587 1 0.005800 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5743 3738 3587 1 0.007100 0.178400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+5744 3739 3589 1 0.011100 0.202200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5745 3739 3589 1 0.011300 0.206700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5746 3739 3589 1 0.011600 0.211800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5747 3739 3589 1 0.011400 0.208700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5748 3739 3589 1 0.009900 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5749 3739 3589 1 0.009800 0.177800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+5750 3739 3740 0 0.000900 0.117000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5751 3741 3742 1 0.000500 0.025000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5752 3742 3743 1 0.004700 0.119200 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+5753 3742 3743 1 0.004800 0.115100 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+5754 3744 3745 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5755 3744 3745 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5756 3744 3881 0 0.002400 0.032200 0.920800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5757 3745 3748 0 0.002600 0.017500 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5758 3747 3749 0 0.009500 0.021300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5759 3748 3749 0 0.007700 0.029200 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5760 3749 3750 2 0.027000 0.560500 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+5761 3749 3750 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+5762 3749 3750 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+5763 3751 3752 0 0.000500 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5764 3753 3754 2 0.027700 0.593300 0.000000 0.9640 1.0000 1.0000 0.00 0.00 0.00
+5765 3755 3756 0 0.001400 0.008600 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5766 3756 3757 2 0.027600 0.602700 0.000000 0.9690 1.0000 1.0000 0.00 0.00 0.00
+5767 3758 3607 2 0.007000 0.171100 0.000000 0.9240 1.0000 1.0000 0.00 0.00 0.00
+5768 3759 3812 0 0.031900 0.075300 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5769 3759 3872 0 0.009200 0.021600 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5770 3760 3835 0 0.027800 0.045500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5771 3760 3843 0 0.057300 0.093900 0.019200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5772 3761 3794 0 0.028500 0.069900 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5773 3761 3810 0 0.022900 0.068400 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5774 3762 3776 0 0.007000 0.021300 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5775 3762 3796 0 0.025500 0.074100 0.019400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5776 3763 3865 0 0.068000 0.116000 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5777 3763 3883 0 0.060200 0.098800 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5778 3764 3843 0 0.091500 0.217600 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5779 3764 3863 0 0.032400 0.076400 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5780 3764 3869 0 0.030800 0.085400 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5781 3765 3871 0 0.027900 0.080400 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5782 3765 3894 0 0.053300 0.153400 0.040200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5783 3766 3767 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5784 3766 3828 0 0.002500 0.035400 0.458800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5785 3766 3854 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5786 3766 3854 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5787 3766 3874 0 0.001800 0.028300 0.321800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5788 3766 3881 0 0.002400 0.036600 0.836000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5789 3767 3818 0 0.001600 0.010400 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5790 3767 3833 0 0.010000 0.064800 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5791 3767 3846 0 0.010500 0.058800 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5792 3767 3862 0 0.004100 0.036500 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5793 3767 3867 0 0.015500 0.102000 0.027600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5794 3767 3885 0 0.014000 0.133500 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5795 3769 3844 0 0.005700 0.029800 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5796 3769 3890 0 0.001300 0.005300 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5797 3770 3820 0 0.047900 0.112800 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5798 3770 3888 0 0.035800 0.084300 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5799 3771 3846 0 0.029100 0.088000 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5800 3771 3870 0 0.051300 0.155300 0.037000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5801 3772 3780 0 0.016000 0.046000 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5802 3772 3789 0 0.014700 0.042400 0.011000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5803 3773 3885 0 0.051400 0.120200 0.030600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5804 3774 3785 0 0.015800 0.117300 0.034400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5805 3774 3818 0 0.019100 0.124100 0.034600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5806 3774 3868 0 0.009300 0.060200 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5807 3774 3875 0 0.008800 0.036900 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5808 3774 3892 0 0.004500 0.013300 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5809 3775 3786 0 0.017000 0.052100 0.048000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5810 3775 3845 0 0.023200 0.152200 0.041200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5811 3775 3866 0 0.016300 0.089000 0.023400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5812 3775 3895 0 0.023500 0.127200 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5813 3776 3879 0 0.039300 0.140900 0.035400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5814 3777 3792 0 0.051700 0.117300 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5815 3777 3855 0 0.003900 0.025600 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5816 3778 3856 0 0.013100 0.037800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5817 3779 3792 0 0.029000 0.086300 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5818 3779 3834 0 0.027100 0.078000 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5819 3779 3838 0 0.041300 0.119000 0.032000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5820 3780 3785 0 0.004300 0.046300 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5821 3780 3867 0 0.015700 0.103400 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5822 3781 3824 0 0.078700 0.154600 0.032600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5823 3781 3853 0 0.003500 0.013600 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5824 3781 3858 0 0.027100 0.146100 0.038400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5825 3781 3859 0 0.026400 0.079700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5826 3781 3886 0 0.044500 0.097200 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5827 3781 3889 0 0.017600 0.073100 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5828 3782 3821 0 0.046400 0.109700 0.027000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5829 3782 3872 0 0.057000 0.135400 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5830 3782 3893 0 0.048100 0.138700 0.036200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5831 3783 3799 0 0.004000 0.017400 0.004600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5832 3783 3811 0 0.002400 0.008100 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5833 3784 3800 0 0.000900 0.009400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5834 3784 3803 0 0.016900 0.033000 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5835 3784 3814 0 0.008200 0.018900 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5836 3784 3873 0 0.034900 0.100400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5837 3784 3879 0 0.006200 0.018800 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5838 3785 3810 0 0.010300 0.112200 0.034000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5839 3785 3868 0 0.019000 0.169300 0.049800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5840 3785 3875 0 0.007500 0.081300 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5841 3786 3853 0 0.008900 0.027800 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5842 3787 3839 0 0.028100 0.047400 0.009200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5843 3787 3880 0 0.083800 0.136700 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5844 3788 3799 0 0.064400 0.115200 0.024400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5845 3788 3815 0 0.007000 0.031300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5846 3788 3827 0 0.009800 0.098400 0.029800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5847 3788 3831 0 0.017100 0.071200 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5848 3788 3837 0 0.001600 0.016900 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5849 3788 3837 0 0.001500 0.015900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5850 3789 3790 0 0.027800 0.071900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5851 3790 3801 0 0.013000 0.084700 0.023000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5852 3790 3807 0 0.061700 0.114600 0.025400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5853 3790 3810 0 0.022000 0.143900 0.039000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5854 3790 3847 0 0.014300 0.051800 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5855 3790 3847 0 0.018900 0.049500 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5856 3790 3875 0 0.034600 0.146200 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5857 3790 3892 0 0.025000 0.168200 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5858 3790 3894 0 0.021500 0.065600 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5859 3791 3846 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5860 3791 3846 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5861 3792 3798 0 0.031700 0.139300 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5862 3792 3822 0 0.025100 0.159800 0.043600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5863 3792 3831 0 0.015300 0.063600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5864 3792 3852 0 0.001200 0.005100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5865 3793 3825 0 0.119000 0.269900 0.064400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5866 3793 3827 0 0.012400 0.065700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5867 3794 3807 0 0.027500 0.040100 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5868 3794 3817 0 0.009400 0.023100 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5869 3794 3839 0 0.072100 0.134100 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5870 3795 3829 0 0.006800 0.020700 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5871 3795 3850 0 0.011900 0.036000 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5872 3796 3806 0 0.023500 0.067700 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5873 3797 3819 0 0.002200 0.023700 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5874 3797 3877 0 0.003400 0.037100 0.011200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5875 3798 3826 0 0.049000 0.085100 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5876 3798 3829 0 0.050300 0.151200 0.036400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5877 3798 3886 0 0.011800 0.035100 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5878 3799 3855 0 0.006400 0.041400 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5879 3799 3877 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5880 3799 3877 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5881 3799 3890 0 0.041600 0.169100 0.045000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5882 3801 3823 0 0.001800 0.005400 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5883 3803 3888 0 0.026100 0.061600 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5884 3804 3885 0 0.004900 0.009800 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5885 3805 3812 0 0.036300 0.104500 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5886 3805 3856 0 0.008600 0.024800 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5887 3806 3849 0 0.008400 0.024300 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5888 3808 3816 0 0.008200 0.025000 0.006000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5889 3808 3819 0 0.004600 0.015500 0.003800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5890 3809 3859 0 0.002100 0.010400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5891 3809 3885 0 0.029500 0.093600 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5892 3810 3849 0 0.037300 0.122400 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5893 3810 3892 0 0.009000 0.029900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5894 3811 3819 0 0.015500 0.049500 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5895 3811 3827 0 0.038200 0.142300 0.085200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5896 3812 3832 0 0.037400 0.087200 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5897 3812 3864 0 0.038100 0.089800 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5898 3813 3654 2 0.001400 0.038000 0.000000 1.0675 1.0000 1.0000 0.00 0.00 0.00
+5899 3813 3829 0 0.007460 0.044800 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5900 3814 3865 0 0.010300 0.038500 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5901 3815 3848 0 0.000500 0.003200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5902 3816 3850 0 0.007100 0.021500 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5903 3819 3802 1 0.000800 0.015500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5904 3819 3877 0 0.006500 0.061100 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5905 3819 3896 0 0.026200 0.109100 0.029200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5906 3820 3843 0 0.053500 0.124600 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5907 3821 3880 0 0.023400 0.045700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5908 3822 3890 0 0.019800 0.083100 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5909 3823 3894 0 0.005600 0.016900 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5910 3824 3885 0 0.016200 0.031800 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5911 3825 3869 0 0.043500 0.125300 0.032800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5912 3826 3885 0 0.067100 0.114700 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5913 3827 3865 0 0.007000 0.055000 0.019800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5914 3827 3882 0 0.005300 0.057300 0.017200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5915 3828 3836 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5916 3828 3836 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5917 3828 3874 0 0.000600 0.007100 0.137000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5918 3828 3876 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5919 3828 3876 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5920 3830 3865 0 0.006700 0.022600 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5921 3830 3879 0 0.011200 0.071500 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5922 3832 3843 0 0.034000 0.079100 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5923 3833 3842 0 0.005200 0.033800 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5924 3835 3883 0 0.081500 0.129600 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5925 3836 3874 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5926 3836 3874 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5927 3838 3849 0 0.017700 0.050900 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5928 3838 3868 0 0.015100 0.098900 0.026800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5929 3840 3841 0 0.000200 0.000500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5930 3840 3872 0 0.020500 0.062000 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5931 3842 3884 0 0.002000 0.013000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5932 3844 3865 0 0.005700 0.035600 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5933 3846 3862 0 0.004200 0.045100 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5934 3846 3884 0 0.011600 0.036300 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5935 3846 3885 0 0.032200 0.069100 0.047400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5936 3846 3885 0 0.023000 0.094500 0.024600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5937 3848 3865 0 0.003900 0.017400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5938 3851 3860 0 0.001400 0.004000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5939 3851 3883 0 0.035000 0.099900 0.026000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5940 3854 3961 0 0.000500 0.006300 0.095800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5941 3854 3969 0 0.003600 0.048000 0.582000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5942 3857 3861 0 0.064100 0.184800 0.048200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5943 3857 3863 0 0.042600 0.100400 0.025000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5944 3858 3895 0 0.021400 0.115700 0.030400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5945 3861 3864 0 0.030200 0.071200 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5946 3865 3891 0 0.015300 0.063700 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5947 3866 3895 0 0.008500 0.046400 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5948 3870 3892 0 0.006600 0.019300 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5949 3871 3880 0 0.033300 0.081600 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5950 3874 3875 1 0.000400 0.019000 0.000000 0.9850 1.0000 1.0000 0.00 0.00 0.00
+5951 3875 3892 0 0.002300 0.024800 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5952 3876 3877 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5953 3876 3878 0 0.002400 0.036600 0.416000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5954 3877 3882 0 0.007890 0.086120 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5955 3877 3891 0 0.023000 0.151200 0.041000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5956 3878 3879 1 0.000400 0.185000 0.000000 1.0110 1.0000 1.0000 0.00 0.00 0.00
+5957 3879 3887 0 0.003100 0.033500 0.010200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5958 3880 3893 0 0.050500 0.124000 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5959 3887 3891 0 0.026900 0.114000 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5960 3891 3896 0 0.028700 0.116900 0.031000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5961 3895 3768 1 0.001700 0.033700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5962 3897 3900 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5963 3897 3900 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5964 3897 3900 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5965 3897 3938 0 0.010550 0.076000 0.115000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5966 3898 3905 0 0.000600 0.006200 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5967 3898 3918 0 0.000490 0.004820 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5968 3899 3920 0 0.021800 0.151100 0.223800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5969 3899 3950 0 0.012700 0.090900 0.135400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5970 3900 3901 1 0.000700 0.021100 0.000000 1.0610 1.0000 1.0000 0.00 0.00 0.00
+5971 3900 3918 0 0.003390 0.033600 0.219800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5972 3900 3942 0 0.003800 0.037800 0.246200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5973 3900 3944 1 0.000600 0.015100 0.000000 1.0720 1.0000 1.0000 0.00 0.00 0.00
+5974 3901 3972 0 0.001000 0.007000 0.014000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5975 3902 3914 0 0.001780 0.012020 0.076600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5976 3903 3904 0 0.000300 0.013550 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5977 3903 3906 0 0.007700 0.053800 0.335000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5978 3903 3911 0 0.005900 0.040500 0.250800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5979 3903 3929 0 0.005500 0.054100 0.363600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5980 3903 3938 0 0.010800 0.100190 0.170400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5981 3903 3938 0 0.015000 0.105500 0.158000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5982 3903 3938 0 0.010500 0.100000 0.170000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5983 3903 3957 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5984 3903 3957 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5985 3904 3952 0 0.005800 0.028100 0.017000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5986 3904 3956 0 0.096500 0.366900 0.054000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5987 3905 3938 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5988 3905 3938 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5989 3905 3942 0 0.001040 0.009300 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5990 3905 3949 0 0.001700 0.011700 0.289600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5991 3906 3929 0 0.002900 0.028500 0.192000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5992 3906 3953 0 0.005400 0.036900 0.228600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5993 3907 3908 0 0.043000 0.303100 0.463000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5994 3907 3912 0 0.029100 0.226700 0.342800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5995 3907 3920 0 0.008500 0.058800 0.087000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5996 3907 3945 0 0.007300 0.050400 0.074000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5997 3908 3912 0 0.012000 0.083600 0.123600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5998 3908 3920 0 0.046800 0.336900 0.519800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+5999 3908 3921 0 0.029400 0.230400 0.349400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6000 3908 3921 0 0.037600 0.263000 0.396000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6001 3908 3933 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6002 3908 3933 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6003 3908 3937 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6004 3908 3945 0 0.048900 0.349200 0.538000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6005 3908 3949 0 0.002000 0.015300 0.214000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6006 3908 3949 0 0.005700 0.045000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6007 3908 3949 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6008 3908 3949 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6009 3909 3916 0 0.001620 0.009700 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6010 3909 3924 0 0.001530 0.009400 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6011 3910 3922 0 0.013700 0.095700 0.141000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6012 3910 3939 0 0.011200 0.077200 0.482400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6013 3910 3939 0 0.011200 0.079000 0.471400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6014 3911 3938 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6015 3911 3938 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6016 3911 3943 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6017 3911 3943 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6018 3913 3919 0 0.002480 0.024470 0.164800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6019 3914 3921 0 0.003580 0.035200 0.239000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6020 3914 3950 0 0.004500 0.044250 0.301000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6021 3915 3936 0 0.017300 0.198800 0.700000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6022 3915 3939 0 0.009100 0.062300 0.385600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6023 3915 3943 0 0.008500 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6024 3915 3943 0 0.008600 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6025 3916 3932 0 0.002100 0.008300 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6026 3917 3926 0 0.004440 0.051440 3.597000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6027 3917 3936 1 0.000740 0.020400 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+6028 3917 3948 0 0.002440 0.032620 2.236000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6029 3918 3938 0 0.001020 0.010050 0.066400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6030 3919 3943 0 0.003920 0.038140 0.258000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6031 3920 3921 0 0.012300 0.125500 0.194000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6032 3920 3937 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6033 3920 3950 0 0.007500 0.077300 0.119000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6034 3921 3950 0 0.023900 0.170800 0.255600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6035 3922 3941 0 0.014500 0.058010 0.094000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6036 3922 3941 0 0.007700 0.056910 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6037 3923 3741 1 0.000400 0.002500 0.000000 1.0450 1.0000 1.0000 0.00 0.00 0.00
+6038 3923 3924 1 0.001200 0.039600 0.000000 1.0250 1.0000 1.0000 0.00 0.00 0.00
+6039 3923 3954 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6040 3925 3932 0 0.062700 0.250000 0.067200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6041 3925 3932 0 0.102000 0.236000 0.060600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6042 3925 3952 0 0.085500 0.342000 0.091400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6043 3925 3956 0 0.080800 0.234400 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6044 3926 3927 1 0.000250 0.015400 0.000000 0.8800 1.0000 1.0000 0.00 0.00 0.00
+6045 3927 3949 0 0.000420 0.006700 0.110800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6046 3928 3929 1 0.000200 0.024200 0.000000 0.9300 1.0000 1.0000 0.00 0.00 0.00
+6047 3929 3930 0 0.000000 0.009400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6048 3929 3955 0 0.000500 0.006500 0.103800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6049 3931 3932 0 0.000400 0.017200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6050 3931 3953 0 0.000770 0.006480 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6051 3934 3971 0 0.001000 0.007000 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6052 3935 3949 0 0.000300 0.001700 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6053 3936 3941 0 0.029050 0.112070 0.195000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6054 3936 3941 0 0.014850 0.114140 0.193000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6055 3938 3940 0 0.000680 0.006680 0.399000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6056 3938 3942 0 0.001050 0.008370 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6057 3939 3949 0 0.025400 0.177700 0.270400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6058 3939 3949 0 0.024400 0.176700 0.271600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6059 3944 3970 0 0.001000 0.007000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6060 3946 3947 0 0.000170 0.012340 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6061 3946 3948 0 0.001840 0.024450 1.662000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6062 3950 3934 1 0.000000 0.083300 0.000000 1.0300 1.0000 1.0000 0.00 0.00 0.00
+6063 3950 3951 1 0.000500 0.018200 0.000000 1.1030 1.0000 1.0000 0.00 0.00 0.00
+6064 3953 3954 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6065 3955 3956 1 0.000330 0.013000 0.000000 1.0500 1.0000 1.0000 0.00 0.00 0.00
+6066 3955 3957 0 0.009220 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6067 3955 3957 0 0.009200 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6068 3958 3959 0 0.000000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6069 3958 3965 0 0.001700 0.021000 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6070 3960 3965 0 0.001000 0.012300 0.150000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6071 3961 3962 0 0.000800 0.009800 0.120000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6072 3962 3966 0 0.001000 0.012000 0.160000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6073 3962 3967 0 0.004200 0.063000 0.200000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6074 3962 3969 0 0.003100 0.027000 0.050000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6075 3962 3969 0 0.001140 0.018000 0.270000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6076 3963 3964 0 0.100000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6077 3963 3966 0 0.000300 0.003800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6078 3963 3966 0 0.003000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6079 3963 3968 0 0.030000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6080 3963 3969 0 0.000400 0.005000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6081 3963 3970 0 0.014000 1.139997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6082 3963 3972 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6083 3964 3965 0 0.001800 0.023000 0.284000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6084 3964 3965 0 0.010000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6085 3964 3966 0 0.030000 0.999999 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6086 3964 3967 0 0.006000 0.068000 0.740000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6087 3964 3968 0 0.050000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6088 3965 3968 0 0.020000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6089 3965 3970 0 -0.200000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6090 3965 3971 0 -0.400000 2.500001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6091 3965 3972 0 0.083000 0.600000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6092 3966 3968 0 0.004200 0.050000 0.080000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6093 3966 3968 0 0.060000 0.700001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6094 3966 3970 0 0.030000 1.009997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6095 3966 3971 0 0.070000 1.830000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6096 3967 3968 0 0.001300 0.029000 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6097 3967 3969 0 0.002200 0.046410 0.400000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6098 3968 3969 0 0.004000 0.044000 0.500000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6099 3968 3972 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6100 3970 3971 0 -0.040450 0.278890 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6101 3970 3972 0 -0.000010 0.002750 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6102 3971 3972 0 -0.178800 0.710991 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6103 3973 4194 0 0.270000 0.349000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6104 3973 4258 0 0.035000 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6105 3974 3981 0 0.292000 0.386000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6106 3974 4200 0 0.002000 0.010000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6107 3975 4067 0 0.025400 0.031800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6108 3975 4138 0 0.027100 0.033900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6109 3976 4098 0 0.288800 0.361900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6110 3976 4231 0 0.233400 0.291900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6111 3977 4055 0 0.124600 0.156000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6112 3977 4200 0 0.333900 0.417900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6113 3978 4081 0 0.163200 0.189500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6114 3978 4185 0 0.092700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6115 3979 4017 0 0.197500 0.229300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6116 3979 4037 0 0.280100 0.333200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6117 3980 4010 0 0.018600 0.024300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6118 3980 4089 0 0.065900 0.164200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6119 3980 4091 0 0.018300 0.044700 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6120 3980 4171 0 0.030700 0.082400 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6121 3980 4183 0 0.020200 0.059200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6122 3980 4239 0 0.019000 0.023800 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6123 3981 4194 0 0.262000 0.339000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6124 3982 4021 0 0.201500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6125 3982 4078 0 0.040300 0.046800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6126 3982 4188 0 0.156000 0.525000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6127 3983 4094 0 0.301300 0.479100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6128 3983 4096 0 0.178000 0.222700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6129 3984 3997 0 0.125100 0.169700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6130 3984 4052 0 0.057600 0.072100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6131 3985 4062 0 0.265000 0.343000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6132 3985 4266 0 0.245000 0.317000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6133 3986 4052 0 0.064400 0.080600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6134 3986 4217 0 0.036600 0.079900 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6135 3987 3996 0 0.296200 0.369500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6136 3987 4058 0 0.506000 0.504700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6137 3987 4109 0 0.374700 0.469600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6138 3987 4137 0 0.828700 0.846900 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6139 3988 4029 0 0.136000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6140 3988 4249 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6141 3989 4195 0 0.294200 0.368600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6142 3989 4203 0 0.338500 0.420000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6143 3990 4223 0 0.137110 0.799561 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6144 3990 4261 0 0.016800 0.050100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6145 3991 4173 0 0.233700 0.271400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6146 3991 4208 0 0.338500 0.423800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6147 3992 4094 0 0.057400 0.142400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6148 3992 4113 0 0.018900 0.044800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6149 3993 4047 0 0.054000 0.136000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6150 3993 4245 0 0.100000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6151 3994 3999 0 0.276500 0.336500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6152 3994 4199 0 0.067800 0.086200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6153 3995 4006 0 0.503600 0.627200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6154 3995 4061 0 0.200000 0.250100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6155 3996 4159 0 0.407000 0.474000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6156 3997 4130 0 0.113000 0.152000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6157 3997 4165 0 0.025220 0.066400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6158 3997 4261 0 0.013750 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6159 3998 4174 0 0.182900 0.462700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6160 3998 4222 0 0.145100 0.367300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6161 4000 4005 0 0.118600 0.153200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6162 4000 4112 0 0.173000 0.216500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6163 4001 4026 0 0.144000 0.180200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6164 4001 4210 0 0.040200 0.061200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6165 4002 4121 0 0.368700 0.428800 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6166 4002 4126 0 0.272000 0.315900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6167 4003 4068 0 0.070500 0.178400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6168 4003 4069 0 0.112900 0.165500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6169 4004 4129 0 0.129000 0.161600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6170 4004 4243 0 0.284100 0.356000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6171 4005 4200 0 0.155900 0.195200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6172 4006 4020 0 0.088000 0.161000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6173 4006 4108 0 0.200000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6174 4006 4138 0 0.048400 0.060200 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6175 4006 4139 0 0.037000 0.062000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6176 4006 4168 0 0.308000 0.437000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6177 4008 4237 0 0.160700 0.214200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6178 4008 4253 0 0.061000 0.076300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6179 4009 4040 0 0.048000 0.061000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6180 4009 4249 0 0.099000 0.125000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6181 4010 4077 0 0.019600 0.025800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6182 4011 4076 0 0.030500 0.038200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6183 4011 4239 0 0.040700 0.050700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6184 4012 4096 0 0.247500 0.309500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6185 4012 4265 0 0.214700 0.268600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6186 4013 4070 0 0.056500 0.104100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6187 4013 4186 0 0.235800 0.291700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6188 4014 4236 0 0.011000 0.028000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6189 4015 4236 0 0.147100 0.184300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6190 4015 4259 0 0.394300 0.419400 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6191 4016 4039 0 0.213000 0.266000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6192 4016 4047 0 0.290200 0.413400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6193 4016 4118 0 0.272600 0.361100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6194 4016 4160 0 0.066500 0.082300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6195 4017 4182 0 0.278100 0.322900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6196 4017 4206 0 0.326400 0.404600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6197 4018 4053 0 0.152900 0.270300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6198 4018 4249 0 0.066800 0.157200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6199 4019 4154 0 0.359000 0.417000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6200 4019 4173 0 0.296000 0.371000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6201 4020 4258 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6202 4021 4184 0 0.225400 0.261800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6203 4022 4143 0 0.083000 0.114000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6204 4022 4157 0 0.096000 0.198000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6205 4023 4140 0 0.157200 0.196900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6206 4023 4244 0 0.091800 0.232400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6207 4024 4209 0 0.051900 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6208 4024 4244 0 0.076300 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6209 4026 4080 0 0.146900 0.172200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6210 4027 4178 0 0.065600 0.166000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6211 4027 4262 0 0.248300 0.374800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6212 4028 4104 0 0.282100 0.327600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6213 4028 4121 0 0.229700 0.266900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6214 4028 4123 0 0.357200 0.416900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6215 4028 4148 0 0.243000 0.326000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6216 4029 4164 0 0.221100 0.258500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6217 4030 4097 0 0.172900 0.272900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6218 4030 4204 0 0.211600 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6219 4030 4210 0 0.248400 0.378300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6220 4030 4256 0 0.264600 0.366300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6221 4031 4080 0 0.336000 0.549100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6222 4031 4254 0 0.144600 0.192400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6223 4032 4249 0 0.016400 0.037000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6224 4033 4118 0 0.260000 0.250000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6225 4033 4196 0 0.074000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6226 4034 4124 0 0.474401 0.484100 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6227 4034 4162 0 0.224500 0.216100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6228 4035 4085 0 0.091000 0.184000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6229 4035 4156 0 0.079000 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6230 4037 4115 0 0.308300 0.386300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6231 4038 4175 0 0.036000 0.172000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6232 4038 4225 0 0.023000 0.075000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6233 4039 4268 0 0.038900 0.050800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6234 4040 4253 0 0.096600 0.130800 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6235 4041 3999 1 0.139500 0.467100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6236 4041 4186 0 0.233000 0.559600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6237 4041 4234 0 0.079000 0.102000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6238 4042 4047 0 0.060000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6239 4042 4170 0 0.027000 0.042000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6240 4043 4047 0 0.045400 0.111400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6241 4043 4169 0 0.057200 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6242 4044 4089 0 0.067800 0.088900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6243 4044 4114 0 0.013400 0.033600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6244 4045 4101 0 0.021000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6245 4045 4114 0 0.027000 0.068000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6246 4046 4072 0 0.050000 0.086000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6247 4046 4085 0 0.076300 0.192800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6248 4046 4105 0 0.099000 0.128000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6249 4046 4189 0 0.024000 0.061000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6250 4047 4213 0 0.130000 0.324000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6251 4048 4206 0 0.436300 0.497300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6252 4048 4227 0 0.397000 0.468200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6253 4049 4090 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6254 4050 4114 0 0.143200 0.182300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6255 4050 4116 0 0.155200 0.194400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6256 4051 4187 0 0.115800 0.145000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6257 4051 4266 0 0.192500 0.241300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6258 4053 4198 0 0.019000 0.068200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6259 4054 4189 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6260 4054 4224 0 0.057000 0.141000 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6261 4055 4096 0 0.181400 0.226800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6262 4056 4090 0 0.056300 0.073000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6263 4056 4167 0 0.016700 0.029100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6264 4057 4111 0 0.118000 0.152000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6265 4057 4168 0 0.129000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6266 4058 4173 0 0.229700 0.287800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6267 4060 4133 0 0.070500 0.081900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6268 4060 4169 0 0.060400 0.075700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6269 4061 4265 0 0.110100 0.137800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6270 4062 4108 0 0.180000 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6271 4065 4188 0 0.296000 0.282000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6272 4065 4236 0 0.339000 0.381000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6273 4066 4139 0 0.022000 0.056000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6274 4066 4219 0 0.163000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6275 4067 4218 0 0.176300 0.224000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6276 4068 4199 0 0.092400 0.115700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6277 4069 4260 0 0.065600 0.085500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6278 4070 4142 0 0.133400 0.250800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6279 4070 4260 0 0.066400 0.168100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6280 4071 4182 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6281 4073 4193 0 0.137000 0.159100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6282 4073 4205 0 0.259300 0.324500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6283 4074 4201 0 0.058000 0.150000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6284 4074 4245 0 0.052000 0.064000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6285 4076 4225 0 0.117100 0.174000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6286 4077 4263 0 0.031100 0.070800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6287 4078 4163 0 0.199000 0.239000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6288 4079 4107 0 0.005900 0.016700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6289 4079 4165 0 0.020500 0.054900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6290 4079 4223 0 0.012200 0.038400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6291 4080 4093 0 0.069400 0.086800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6292 4080 4174 0 0.271300 0.426200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6293 4081 4243 0 0.216400 0.248300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6294 4082 4134 0 0.085000 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6295 4082 4161 0 0.187000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6296 4083 4191 0 0.322400 0.404000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6297 4083 4236 0 0.094200 0.146700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6298 4084 4174 0 0.221600 0.277700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6299 4084 4256 0 0.150900 0.188700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6300 4085 4237 0 0.178900 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6301 4085 4247 0 0.077700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6302 4086 4143 0 0.155500 0.301300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6303 4086 4201 0 0.028100 0.064600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6304 4087 4106 0 0.141000 0.163800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6305 4087 4166 0 0.198000 0.256200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6306 4088 4101 0 0.026000 0.044000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6307 4088 4172 0 0.084000 0.103000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6308 4091 4092 0 0.021000 0.052000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6309 4091 4171 0 0.027000 0.066000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6310 4092 4114 0 0.085200 0.181500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6311 4093 4106 0 0.266700 0.308000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6312 4094 4124 0 0.181900 0.256900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6313 4094 4127 0 0.115400 0.170200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6314 4095 4196 0 0.093000 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6315 4095 4234 0 0.067000 0.168000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6316 4096 4211 0 0.254000 0.334000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6317 4097 4128 0 0.171500 0.210600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6318 4098 4140 0 0.184700 0.232100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6319 4100 4127 0 0.296400 0.386200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6320 4100 4164 0 0.032700 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6321 4102 4116 0 0.181300 0.227200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6322 4102 4193 0 0.142600 0.178800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6323 4103 4249 0 0.214000 0.272000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6324 4103 4253 0 0.012000 0.015000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6325 4104 4259 0 0.100700 0.117000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6326 4105 4248 0 0.068000 0.083000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6327 4107 4223 0 0.018020 0.055090 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6328 4107 4249 0 0.015680 0.073070 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6329 4109 4180 0 0.306200 0.383800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6330 4110 4114 0 0.032600 0.072500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6331 4110 4233 0 0.259200 0.331900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6332 4111 4264 0 0.156000 0.191000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6333 4112 4164 0 0.076500 0.095800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6334 4113 4195 0 0.118900 0.149000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6335 4115 4187 0 0.195500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6336 4115 4264 0 0.172000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6337 4118 4160 0 0.206000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6338 4118 4196 0 0.260900 0.343300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6339 4119 4209 0 0.266700 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6340 4120 4192 0 0.058000 0.144000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6341 4120 4218 0 0.225400 0.280500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6342 4120 4231 0 0.078100 0.097700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6343 4120 4232 0 0.142400 0.340700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6344 4122 4196 0 0.180000 0.220000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6345 4122 4213 0 0.114000 0.284000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6346 4123 4185 0 0.094700 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6347 4126 4266 0 0.194300 0.241400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6348 4128 4166 0 0.128900 0.161500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6349 4128 4178 0 0.140000 0.588000 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6350 4128 4247 0 0.255900 0.397000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6351 4128 4250 0 0.219900 0.255800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6352 4128 4257 0 0.179500 0.209000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6353 4129 4202 0 0.044300 0.054600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6354 4130 4248 0 0.080000 0.098000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6355 4131 4175 0 0.133000 0.170000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6356 4131 4205 0 0.005000 0.024000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6357 4132 4165 0 0.020450 0.054930 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6358 4132 4249 0 0.024000 0.075000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6359 4133 4225 0 0.021000 0.135700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6360 4134 4226 0 0.017000 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6361 4135 4217 0 0.077200 0.096900 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6362 4135 4252 0 0.220000 0.276200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6363 4137 4181 0 0.359000 0.450400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6364 4137 4227 0 0.572300 0.716900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6365 4141 4145 0 0.135000 0.189900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6366 4141 4232 0 0.086900 0.219900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6367 4142 4201 0 0.058600 0.145900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6368 4143 4158 0 0.194100 0.229600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6369 4143 4212 0 0.080000 0.198000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6370 4144 4194 0 0.200000 0.256000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6371 4144 4244 0 0.043000 0.108000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6372 4145 4244 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6373 4146 4253 0 0.053200 0.131900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6374 4147 4205 0 0.051700 0.070100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6375 4148 4211 0 0.280500 0.377400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6376 4150 4217 0 0.058000 0.170000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6377 4150 4221 0 0.075000 0.185000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6378 4152 4179 0 0.020000 0.026000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6379 4153 4179 0 0.043400 0.054300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6380 4154 4180 0 0.397000 0.497000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6381 4155 4163 0 0.270000 0.329500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6382 4155 4173 0 0.078200 0.094000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6383 4156 4230 0 0.016000 0.040000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6384 4157 4179 0 0.080000 0.141000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6385 4158 4179 0 0.065000 0.112000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6386 4159 4214 0 0.285900 0.333100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6387 4161 4164 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6388 4162 4202 0 0.234500 0.225100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6389 4164 4262 0 0.363400 0.425500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6390 4167 4179 0 0.044000 0.057000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6391 4170 4242 0 0.037000 0.088000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6392 4171 4183 0 0.009000 0.020000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6393 4171 4256 0 0.204100 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6394 4172 4205 0 0.099000 0.248000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6395 4172 4216 0 0.029000 0.128000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6396 4174 4233 0 0.152900 0.209100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6397 4175 4177 0 0.057900 0.108900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6398 4175 4216 0 0.012000 0.017000 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6399 4176 4178 0 0.008200 0.020500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6400 4176 4253 0 0.100700 0.126200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6401 4177 4225 0 0.106200 0.139800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6402 4178 4230 0 0.161000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6403 4178 4255 0 0.130000 0.246600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6404 4180 4181 0 0.662900 0.830700 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6405 4184 4259 0 0.135300 0.157100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6406 4185 4203 0 0.268000 0.335800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6407 4188 4238 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6408 4191 4243 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6409 4192 4241 0 0.037000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6410 4198 4217 0 0.011200 0.037400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6411 4200 4252 0 0.215300 0.263900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6412 4201 4242 0 0.186000 0.241000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6413 4202 4203 0 0.298200 0.373700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6414 4205 4268 0 0.173300 0.218900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6415 4206 4207 0 0.274000 0.318200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6416 4206 4240 0 0.222000 0.234000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6417 4207 4267 0 0.211500 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6418 4208 4238 0 0.296000 0.363000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6419 4214 4240 0 0.249000 0.264000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6420 4214 4259 0 0.532800 0.529500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6421 4217 4226 0 0.063000 0.085000 0.007800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6422 4219 4241 0 0.058000 0.075000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6423 4222 4254 0 0.318500 0.370700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6424 4225 4263 0 0.012700 0.036100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6425 4250 4255 0 0.229700 0.266800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6426 4250 4257 0 0.040400 0.046900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6427 4265 4266 0 0.351500 0.442100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6428 4266 4267 0 0.358500 0.419200 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6429 4270 3974 2 0.010800 0.276300 0.000000 1.0301 1.0000 1.0000 0.00 0.00 0.00
+6430 4270 4284 0 0.000400 0.002400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6431 4270 4285 0 0.001500 0.003400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6432 4270 4379 0 0.008300 0.053400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6433 4271 4272 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6434 4271 4272 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6435 4271 4308 0 0.002100 0.009600 0.140600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6436 4271 4311 0 0.003400 0.018130 0.138600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6437 4271 4315 0 0.000900 0.004300 0.063200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6438 4273 4343 0 0.006340 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6439 4274 4344 0 0.006350 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6440 4275 3982 2 0.007000 0.180000 0.000000 1.0097 1.0000 1.0000 0.00 0.00 0.00
+6441 4275 4276 0 0.027000 0.103000 0.014400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6442 4275 4396 0 0.022100 0.084300 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6443 4276 3987 2 0.010900 0.272000 0.000000 1.0680 1.0000 1.0000 0.00 0.00 0.00
+6444 4276 4318 0 0.028500 0.108600 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6445 4277 3997 2 0.004200 0.127000 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+6446 4277 3997 2 0.004300 0.127300 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+6447 4277 4317 0 0.013500 0.029950 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6448 4277 4338 0 0.004500 0.016100 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6449 4277 4366 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6450 4277 4366 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6451 4277 4379 0 0.011100 0.025700 0.013400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6452 4277 4392 0 0.008600 0.031400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6453 4277 4400 0 0.009100 0.033000 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6454 4277 4408 0 0.002340 0.010260 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6455 4278 4279 1 0.000300 0.010200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6456 4278 4280 1 0.000500 0.032900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6457 4278 4281 1 0.000800 0.031100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6458 4278 4350 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6459 4278 4351 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6460 4278 4406 0 0.000900 0.011000 0.192600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6461 4278 4406 0 0.000900 0.011000 0.385200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6462 4279 4353 0 0.002000 0.019500 0.044000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6463 4280 4003 2 0.006500 0.170200 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+6464 4280 4003 2 0.006900 0.175600 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+6465 4280 4391 0 0.002500 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6466 4280 4393 0 0.002890 0.009510 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6467 4280 4393 0 0.002320 0.009950 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6468 4281 4293 0 0.001400 0.013500 0.009000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6469 4281 4298 0 0.040200 0.090390 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6470 4281 4300 0 0.011290 0.039310 0.026600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6471 4281 4304 0 0.032600 0.090400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6472 4281 4313 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6473 4281 4314 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6474 4281 4394 0 0.002370 0.011230 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6475 4282 4006 2 0.006000 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+6476 4282 4006 2 0.007200 0.180000 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+6477 4282 4284 0 0.038200 0.088000 0.045600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6478 4282 4342 0 0.006000 0.103200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6479 4282 4382 0 0.012100 0.060000 0.018400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6480 4282 4398 0 0.001900 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6481 4283 4282 2 0.000500 0.025000 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+6482 4283 4617 0 0.000400 0.003600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6483 4286 4287 1 0.000700 0.025000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6484 4286 4385 0 0.000300 0.001800 1.273000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6485 4287 4294 0 0.001500 0.006700 0.099200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6486 4287 4315 0 0.001500 0.006600 0.098000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6487 4287 4358 0 0.001300 0.005800 0.085600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6488 4288 4352 0 0.000400 0.002600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6489 4288 4392 0 0.001100 0.006700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6490 4289 4349 0 0.001600 0.006700 0.114800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6491 4289 4404 0 0.001900 0.009100 0.101200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6492 4290 4025 2 0.004400 0.127500 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+6493 4290 4025 2 0.004400 0.125700 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+6494 4290 4331 0 0.001600 0.008600 0.058200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6495 4290 4333 0 0.005700 0.033390 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6496 4290 4367 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6497 4290 4395 0 0.007250 0.028620 0.062800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6498 4291 4030 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6499 4291 4030 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6500 4291 4296 0 0.002500 0.016000 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6501 4291 4414 0 0.004300 0.028700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6502 4293 4390 0 0.000130 0.001300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6503 4294 4036 1 0.004200 0.140000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6504 4294 4036 1 0.004400 0.137300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6505 4294 4036 1 0.004800 0.137800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6506 4294 4349 0 0.001000 0.004600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6507 4294 4358 0 0.002400 0.011020 0.162200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6508 4294 4402 0 0.002700 0.012500 0.183400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6509 4295 4365 0 0.001600 0.019700 0.343200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6510 4295 4428 0 0.004400 0.063800 0.811600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6511 4296 4361 0 0.007300 0.042500 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6512 4296 4389 0 0.002400 0.015300 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6513 4297 4303 0 0.001800 0.018200 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6514 4297 4401 0 0.000500 0.004700 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6515 4298 4041 2 0.007700 0.186400 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+6516 4298 4041 2 0.007700 0.186600 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+6517 4298 4304 0 0.015800 0.052200 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6518 4298 4430 0 0.008680 0.046920 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6519 4299 4329 1 0.000500 0.011700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6520 4299 4551 0 0.020900 0.097700 0.038800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6521 4300 4047 2 0.007300 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6522 4300 4409 0 0.001110 0.003830 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6523 4301 4401 0 0.003300 0.007000 0.131800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6524 4302 4405 0 0.000300 0.025250 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6525 4303 4059 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+6526 4303 4059 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+6527 4303 4390 0 0.001400 0.013600 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6528 4303 4407 0 0.013000 0.076450 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6529 4304 4339 0 0.031000 0.118100 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6530 4305 4063 2 0.005420 0.130500 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+6531 4305 4063 2 0.005400 0.129800 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+6532 4305 4306 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6533 4305 4307 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6534 4305 4348 0 0.003130 0.013150 0.223600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6535 4306 4357 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6536 4306 4386 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6537 4307 4357 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6538 4307 4386 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6539 4308 4292 2 0.004600 0.117200 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+6540 4308 4292 2 0.004600 0.117000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+6541 4308 4292 2 0.003200 0.120000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+6542 4308 4358 0 0.003400 0.015600 0.230200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6543 4309 4064 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6544 4309 4064 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6545 4309 4064 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6546 4309 4360 0 0.002320 0.058320 0.122600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6547 4309 4401 0 0.003200 0.012490 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6548 4309 4401 0 0.003150 0.027060 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6549 4309 4420 0 0.004300 0.015900 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6550 4310 4312 2 0.002000 0.120000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+6551 4310 4372 0 0.001380 0.009250 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6552 4310 4404 0 0.000910 0.006060 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6553 4311 4312 2 0.002000 0.123000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+6554 4311 4372 0 0.001370 0.009100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6555 4315 4075 1 0.004300 0.132700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+6556 4315 4075 1 0.004500 0.133700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+6557 4315 4075 1 0.004800 0.138300 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+6558 4315 4349 0 0.000300 0.001140 0.016800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6559 4315 4404 0 0.003390 0.015460 0.227800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6560 4316 4080 2 0.007200 0.180000 0.000000 1.0581 1.0000 1.0000 0.00 0.00 0.00
+6561 4317 4085 2 0.006700 0.179100 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+6562 4317 4085 2 0.007700 0.180200 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+6563 4317 4378 0 0.008100 0.031700 0.214600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6564 4317 4388 0 0.006600 0.026600 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6565 4317 4414 0 0.001500 0.015000 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6566 4318 4137 2 0.081000 0.288700 0.000000 1.0518 1.0000 1.0000 0.00 0.00 0.00
+6567 4318 4376 0 0.065600 0.250200 0.035000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6568 4319 4090 1 0.005800 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6569 4319 4090 1 0.010600 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6570 4319 4090 1 0.006000 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6571 4319 4355 0 0.002500 0.024860 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6572 4319 4417 0 0.029880 0.124600 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6573 4319 4420 0 0.001990 0.008180 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6574 4320 4094 2 0.010900 0.275000 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+6575 4320 4094 2 0.012600 0.274700 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+6576 4320 4323 0 0.011400 0.040100 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6577 4320 4328 0 0.011200 0.025000 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6578 4320 4366 0 0.014620 0.053870 0.033000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6579 4320 4464 0 0.026280 0.105720 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6580 4321 4099 1 0.004200 0.133500 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6581 4321 4099 1 0.005800 0.180900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6582 4321 4099 1 0.004100 0.134300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6583 4321 4322 0 0.002800 0.016300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6584 4321 4370 0 0.001100 0.006400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6585 4321 4370 0 0.001100 0.006700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6586 4322 4354 0 0.005500 0.013600 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6587 4322 4373 0 0.001740 0.017600 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6588 4323 4398 0 0.035200 0.122600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6589 4324 4347 0 0.011000 0.477800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6590 4324 4373 0 0.001120 0.011370 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6591 4324 4393 0 0.002800 0.018200 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6592 4325 4396 2 0.002600 0.053600 0.000000 1.0641 1.0000 1.0000 0.00 0.00 0.00
+6593 4325 4544 0 0.009300 0.057300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6594 4326 4342 0 0.042200 0.103400 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6595 4327 4330 0 0.016900 0.051800 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6596 4327 4399 0 0.006900 0.046300 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6597 4328 4375 0 0.041600 0.093800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6598 4329 4114 2 0.016000 0.260000 0.000000 0.8852 1.0000 1.0000 0.00 0.00 0.00
+6599 4329 4356 0 0.015600 0.082000 0.134000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6600 4329 4361 0 0.008700 0.050800 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6601 4330 4115 2 0.010800 0.276300 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+6602 4330 4376 0 0.057700 0.128100 0.016400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6603 4331 4117 1 0.005700 0.177300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6604 4331 4117 1 0.007000 0.181600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6605 4331 4117 1 0.007700 0.181800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6606 4331 4332 0 0.004300 0.015400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6607 4331 4357 0 0.009300 0.033600 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6608 4331 4395 0 0.006100 0.021700 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6609 4332 4357 0 0.005200 0.019000 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6610 4332 4360 0 0.006100 0.023200 0.148600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6611 4333 4334 2 0.026900 0.568700 0.000000 0.9992 1.0000 1.0000 0.00 0.00 0.00
+6612 4333 4387 0 0.002100 0.012600 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6613 4335 4336 2 0.027400 0.568700 0.000000 1.0020 1.0000 1.0000 0.00 0.00 0.00
+6614 4335 4357 0 0.006400 0.037400 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6615 4335 4387 0 0.002200 0.012700 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6616 4337 4395 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6617 4337 4408 0 0.002800 0.011600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6618 4338 4395 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6619 4339 4118 1 0.014700 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6620 4339 4340 1 0.015000 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6621 4339 4362 0 0.027910 0.098660 0.013600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6622 4341 4119 2 0.004200 0.126000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+6623 4341 4119 2 0.004300 0.127000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+6624 4341 4381 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6625 4341 4381 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6626 4341 4386 0 0.004600 0.026500 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6627 4342 4007 2 0.017700 0.287300 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+6628 4342 4007 2 0.015700 0.282700 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+6629 4342 4382 0 0.011900 0.058800 0.049000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6630 4342 4399 0 0.005300 0.025100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6631 4343 4354 0 0.001200 0.011500 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6632 4344 4371 0 0.001700 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6633 4345 4347 0 0.011400 0.485300 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6634 4345 4393 0 0.002500 0.016100 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6635 4346 4347 0 0.011300 0.489400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6636 4346 4393 0 0.002500 0.016400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6637 4348 4125 2 0.007200 0.178900 0.000000 1.0047 1.0000 1.0000 0.00 0.00 0.00
+6638 4348 4386 0 0.006000 0.033100 0.083400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6639 4350 4406 0 0.001600 0.019900 0.346600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6640 4350 4620 0 0.001030 0.012210 0.218400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6641 4351 4413 0 0.002200 0.026960 0.467400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6642 4351 4622 0 0.001500 0.017500 0.312400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6643 4352 4400 0 0.001100 0.007000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6644 4353 4354 1 0.000500 0.025400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6645 4353 4403 0 0.000600 0.005900 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6646 4354 4136 1 0.006000 0.182200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6647 4354 4136 1 0.006900 0.184400 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6648 4354 4136 1 0.006100 0.181300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6649 4354 4136 1 0.011400 0.261700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6650 4354 4370 0 0.002100 0.014400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6651 4354 4391 0 0.004600 0.046200 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6652 4354 4415 0 0.010040 0.039610 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6653 4355 4143 1 0.006000 0.175100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6654 4355 4143 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6655 4355 4143 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6656 4355 4374 0 0.010200 0.037100 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6657 4355 4407 0 0.001500 0.007100 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6658 4355 4407 0 0.001000 0.006700 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6659 4356 4389 0 0.017700 0.064200 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6660 4357 4149 1 0.003600 0.132700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6661 4357 4149 1 0.003500 0.130800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6662 4357 4149 1 0.004000 0.139200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6663 4357 4358 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6664 4357 4358 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6665 4357 4359 1 0.013100 0.241100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6666 4357 4367 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6667 4360 4151 1 0.006000 0.188200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6668 4360 4151 1 0.006200 0.183100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6669 4360 4151 1 0.005700 0.192700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6670 4360 4151 1 0.006000 0.173600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6671 4360 4378 0 0.007600 0.028000 0.093800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6672 4360 4414 0 0.018000 0.085900 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6673 4361 4171 2 0.007600 0.165800 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+6674 4361 4171 2 0.007200 0.169300 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+6675 4362 4363 0 0.002810 0.018580 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6676 4362 4389 0 0.006460 0.018530 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6677 4363 4175 2 0.006200 0.177800 0.000000 0.9002 1.0000 1.0000 0.00 0.00 0.00
+6678 4364 4178 2 0.007000 0.174700 0.000000 0.9707 1.0000 1.0000 0.00 0.00 0.00
+6679 4364 4414 0 0.017800 0.118400 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6680 4365 4366 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6681 4365 4366 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6682 4365 4380 0 0.001920 0.021280 0.364800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6683 4365 4385 0 0.001400 0.017300 0.291200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6684 4365 4413 0 0.000990 0.012120 0.211400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6685 4365 4538 0 0.001750 0.020310 0.382000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6686 4366 4400 0 0.003800 0.014500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6687 4366 4400 0 0.002000 0.019400 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6688 4367 4190 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6689 4367 4190 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6690 4367 4190 1 0.006000 0.168900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6691 4367 4381 0 0.036400 0.214000 0.216000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6692 4367 4386 0 0.004600 0.028200 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6693 4368 4192 2 0.006800 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+6694 4368 4382 0 0.000500 0.004800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6695 4369 4370 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6696 4369 4371 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6697 4369 4372 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6698 4370 4373 0 0.005700 0.040700 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6699 4370 4404 0 0.001700 0.056100 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6700 4371 4401 0 0.004100 0.023700 0.120800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6701 4371 4401 0 0.005300 0.029800 0.076400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6702 4372 4402 0 0.005400 0.030000 0.075800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6703 4373 4197 1 0.006500 0.223300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6704 4373 4197 1 0.006200 0.237800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6705 4373 4197 1 0.006300 0.240000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6706 4373 4393 0 0.003700 0.028800 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6707 4374 4201 2 0.004500 0.127200 0.000000 0.9930 1.0000 1.0000 0.00 0.00 0.00
+6708 4374 4394 0 0.020400 0.074500 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6709 4375 4203 2 0.013200 0.277700 0.000000 1.0287 1.0000 1.0000 0.00 0.00 0.00
+6710 4375 4396 0 0.037700 0.083700 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6711 4376 4206 2 0.010200 0.264700 0.000000 1.0958 1.0000 1.0000 0.00 0.00 0.00
+6712 4378 4215 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+6713 4378 4215 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+6714 4378 4388 0 0.010500 0.038600 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6715 4379 4217 2 0.007200 0.177800 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+6716 4379 4217 2 0.007200 0.180000 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+6717 4380 4385 0 0.001700 0.020300 0.458200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6718 4380 4538 0 0.003400 0.039700 0.722600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6719 4380 4590 0 0.000100 0.001800 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6720 4381 4382 0 0.000900 0.099600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6721 4381 4382 0 0.000900 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6722 4382 4384 0 0.012400 0.070100 0.050200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6723 4382 4386 0 0.029650 0.210540 0.032200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6724 4383 4380 1 0.000500 0.027800 0.000000 1.0750 1.0000 1.0000 0.00 0.00 0.00
+6725 4384 4387 0 0.004500 0.022600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6726 4385 4386 1 0.000500 0.021670 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6727 4386 4220 2 0.005600 0.177800 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+6728 4386 4220 2 0.006000 0.179300 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+6729 4386 4220 2 0.007700 0.186700 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+6730 4386 4397 0 0.022000 0.129000 0.020000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6731 4387 4221 2 0.007700 0.178700 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+6732 4387 4221 2 0.006200 0.173300 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+6733 4387 4221 2 0.007800 0.185100 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+6734 4388 4224 2 0.008300 0.180700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6735 4388 4224 2 0.007700 0.179100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6736 4388 4414 0 0.002300 0.029400 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6737 4389 4225 1 0.010500 0.278000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6738 4389 4225 1 0.010500 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6739 4389 4225 1 0.010800 0.272700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6740 4389 4407 0 0.015000 0.055300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6741 4389 4409 0 0.006400 0.022300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6742 4389 4410 0 0.005100 0.034600 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6743 4390 4228 2 0.027000 0.600000 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+6744 4391 4229 2 0.027000 0.600000 0.000000 0.9693 1.0000 1.0000 0.00 0.00 0.00
+6745 4393 4377 2 0.006200 0.182200 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+6746 4393 4377 2 0.006100 0.174700 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+6747 4393 4394 0 0.001100 0.093700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6748 4393 4394 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6749 4393 4415 0 0.003700 0.013900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6750 4394 4417 0 0.003300 0.011800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6751 4395 4235 2 0.007600 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+6752 4395 4235 2 0.007800 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+6753 4395 4235 2 0.007600 0.186700 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+6754 4396 4236 2 0.010300 0.266000 0.000000 1.0328 1.0000 1.0000 0.00 0.00 0.00
+6755 4397 4244 2 0.006300 0.180700 0.000000 0.9847 1.0000 1.0000 0.00 0.00 0.00
+6756 4398 4399 0 0.001900 0.012500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6757 4399 4246 2 0.005800 0.179100 0.000000 1.0793 1.0000 1.0000 0.00 0.00 0.00
+6758 4400 4249 1 0.005600 0.173800 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6759 4400 4249 1 0.005800 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6760 4400 4249 1 0.007100 0.178400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+6761 4401 4251 1 0.011100 0.202200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6762 4401 4251 1 0.011300 0.206700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6763 4401 4251 1 0.011600 0.211800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6764 4401 4251 1 0.011400 0.208700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6765 4401 4251 1 0.009900 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6766 4401 4251 1 0.009800 0.177800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+6767 4401 4402 0 0.000900 0.117000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6768 4403 4404 1 0.000500 0.025000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6769 4404 4405 1 0.004700 0.119200 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+6770 4404 4405 1 0.004800 0.115100 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+6771 4406 4407 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6772 4406 4407 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6773 4406 4543 0 0.002400 0.032200 0.920800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6774 4407 4410 0 0.002600 0.017500 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6775 4409 4411 0 0.009500 0.021300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6776 4410 4411 0 0.007700 0.029200 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6777 4411 4412 2 0.027000 0.560500 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+6778 4411 4412 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+6779 4411 4412 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+6780 4413 4414 0 0.000500 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6781 4415 4416 2 0.027700 0.593300 0.000000 0.9640 1.0000 1.0000 0.00 0.00 0.00
+6782 4417 4418 0 0.001400 0.008600 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6783 4418 4419 2 0.027600 0.602700 0.000000 0.9690 1.0000 1.0000 0.00 0.00 0.00
+6784 4420 4269 2 0.007000 0.171100 0.000000 0.9240 1.0000 1.0000 0.00 0.00 0.00
+6785 4421 4474 0 0.031900 0.075300 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6786 4421 4534 0 0.009200 0.021600 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6787 4422 4497 0 0.027800 0.045500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6788 4422 4505 0 0.057300 0.093900 0.019200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6789 4423 4456 0 0.028500 0.069900 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6790 4423 4472 0 0.022900 0.068400 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6791 4424 4438 0 0.007000 0.021300 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6792 4424 4458 0 0.025500 0.074100 0.019400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6793 4425 4527 0 0.068000 0.116000 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6794 4425 4545 0 0.060200 0.098800 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6795 4426 4505 0 0.091500 0.217600 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6796 4426 4525 0 0.032400 0.076400 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6797 4426 4531 0 0.030800 0.085400 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6798 4427 4533 0 0.027900 0.080400 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6799 4427 4556 0 0.053300 0.153400 0.040200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6800 4428 4429 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6801 4428 4490 0 0.002500 0.035400 0.458800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6802 4428 4516 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6803 4428 4516 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6804 4428 4536 0 0.001800 0.028300 0.321800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6805 4428 4543 0 0.002400 0.036600 0.836000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6806 4429 4480 0 0.001600 0.010400 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6807 4429 4495 0 0.010000 0.064800 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6808 4429 4508 0 0.010500 0.058800 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6809 4429 4524 0 0.004100 0.036500 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6810 4429 4529 0 0.015500 0.102000 0.027600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6811 4429 4547 0 0.014000 0.133500 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6812 4431 4506 0 0.005700 0.029800 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6813 4431 4552 0 0.001300 0.005300 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6814 4432 4482 0 0.047900 0.112800 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6815 4432 4550 0 0.035800 0.084300 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6816 4433 4508 0 0.029100 0.088000 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6817 4433 4532 0 0.051300 0.155300 0.037000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6818 4434 4442 0 0.016000 0.046000 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6819 4434 4451 0 0.014700 0.042400 0.011000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6820 4435 4547 0 0.051400 0.120200 0.030600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6821 4436 4447 0 0.015800 0.117300 0.034400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6822 4436 4480 0 0.019100 0.124100 0.034600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6823 4436 4530 0 0.009300 0.060200 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6824 4436 4537 0 0.008800 0.036900 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6825 4436 4554 0 0.004500 0.013300 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6826 4437 4448 0 0.017000 0.052100 0.048000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6827 4437 4507 0 0.023200 0.152200 0.041200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6828 4437 4528 0 0.016300 0.089000 0.023400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6829 4437 4557 0 0.023500 0.127200 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6830 4438 4541 0 0.039300 0.140900 0.035400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6831 4439 4454 0 0.051700 0.117300 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6832 4439 4517 0 0.003900 0.025600 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6833 4440 4518 0 0.013100 0.037800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6834 4441 4454 0 0.029000 0.086300 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6835 4441 4496 0 0.027100 0.078000 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6836 4441 4500 0 0.041300 0.119000 0.032000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6837 4442 4447 0 0.004300 0.046300 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6838 4442 4529 0 0.015700 0.103400 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6839 4443 4486 0 0.078700 0.154600 0.032600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6840 4443 4515 0 0.003500 0.013600 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6841 4443 4520 0 0.027100 0.146100 0.038400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6842 4443 4521 0 0.026400 0.079700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6843 4443 4548 0 0.044500 0.097200 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6844 4443 4551 0 0.017600 0.073100 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6845 4444 4483 0 0.046400 0.109700 0.027000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6846 4444 4534 0 0.057000 0.135400 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6847 4444 4555 0 0.048100 0.138700 0.036200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6848 4445 4461 0 0.004000 0.017400 0.004600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6849 4445 4473 0 0.002400 0.008100 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6850 4446 4462 0 0.000900 0.009400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6851 4446 4465 0 0.016900 0.033000 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6852 4446 4476 0 0.008200 0.018900 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6853 4446 4535 0 0.034900 0.100400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6854 4446 4541 0 0.006200 0.018800 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6855 4447 4472 0 0.010300 0.112200 0.034000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6856 4447 4530 0 0.019000 0.169300 0.049800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6857 4447 4537 0 0.007500 0.081300 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6858 4448 4515 0 0.008900 0.027800 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6859 4449 4501 0 0.028100 0.047400 0.009200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6860 4449 4542 0 0.083800 0.136700 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6861 4450 4461 0 0.064400 0.115200 0.024400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6862 4450 4477 0 0.007000 0.031300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6863 4450 4489 0 0.009800 0.098400 0.029800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6864 4450 4493 0 0.017100 0.071200 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6865 4450 4499 0 0.001600 0.016900 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6866 4450 4499 0 0.001500 0.015900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6867 4451 4452 0 0.027800 0.071900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6868 4452 4463 0 0.013000 0.084700 0.023000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6869 4452 4469 0 0.061700 0.114600 0.025400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6870 4452 4472 0 0.022000 0.143900 0.039000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6871 4452 4509 0 0.014300 0.051800 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6872 4452 4509 0 0.018900 0.049500 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6873 4452 4537 0 0.034600 0.146200 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6874 4452 4554 0 0.025000 0.168200 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6875 4452 4556 0 0.021500 0.065600 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6876 4453 4508 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6877 4453 4508 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6878 4454 4460 0 0.031700 0.139300 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6879 4454 4484 0 0.025100 0.159800 0.043600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6880 4454 4493 0 0.015300 0.063600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6881 4454 4514 0 0.001200 0.005100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6882 4455 4487 0 0.119000 0.269900 0.064400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6883 4455 4489 0 0.012400 0.065700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6884 4456 4469 0 0.027500 0.040100 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6885 4456 4479 0 0.009400 0.023100 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6886 4456 4501 0 0.072100 0.134100 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6887 4457 4491 0 0.006800 0.020700 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6888 4457 4512 0 0.011900 0.036000 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6889 4458 4468 0 0.023500 0.067700 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6890 4459 4481 0 0.002200 0.023700 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6891 4459 4539 0 0.003400 0.037100 0.011200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6892 4460 4488 0 0.049000 0.085100 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6893 4460 4491 0 0.050300 0.151200 0.036400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6894 4460 4548 0 0.011800 0.035100 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6895 4461 4517 0 0.006400 0.041400 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6896 4461 4539 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6897 4461 4539 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6898 4461 4552 0 0.041600 0.169100 0.045000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6899 4463 4485 0 0.001800 0.005400 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6900 4465 4550 0 0.026100 0.061600 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6901 4466 4547 0 0.004900 0.009800 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6902 4467 4474 0 0.036300 0.104500 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6903 4467 4518 0 0.008600 0.024800 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6904 4468 4511 0 0.008400 0.024300 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6905 4470 4478 0 0.008200 0.025000 0.006000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6906 4470 4481 0 0.004600 0.015500 0.003800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6907 4471 4521 0 0.002100 0.010400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6908 4471 4547 0 0.029500 0.093600 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6909 4472 4511 0 0.037300 0.122400 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6910 4472 4554 0 0.009000 0.029900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6911 4473 4481 0 0.015500 0.049500 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6912 4473 4489 0 0.038200 0.142300 0.085200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6913 4474 4494 0 0.037400 0.087200 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6914 4474 4526 0 0.038100 0.089800 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6915 4475 4316 2 0.001400 0.038000 0.000000 1.0675 1.0000 1.0000 0.00 0.00 0.00
+6916 4475 4491 0 0.007460 0.044800 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6917 4476 4527 0 0.010300 0.038500 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6918 4477 4510 0 0.000500 0.003200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6919 4478 4512 0 0.007100 0.021500 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6920 4481 4464 1 0.000800 0.015500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6921 4481 4539 0 0.006500 0.061100 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6922 4481 4558 0 0.026200 0.109100 0.029200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6923 4482 4505 0 0.053500 0.124600 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6924 4483 4542 0 0.023400 0.045700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6925 4484 4552 0 0.019800 0.083100 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6926 4485 4556 0 0.005600 0.016900 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6927 4486 4547 0 0.016200 0.031800 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6928 4487 4531 0 0.043500 0.125300 0.032800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6929 4488 4547 0 0.067100 0.114700 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6930 4489 4527 0 0.007000 0.055000 0.019800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6931 4489 4544 0 0.005300 0.057300 0.017200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6932 4490 4498 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6933 4490 4498 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6934 4490 4536 0 0.000600 0.007100 0.137000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6935 4490 4538 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6936 4490 4538 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6937 4492 4527 0 0.006700 0.022600 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6938 4492 4541 0 0.011200 0.071500 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6939 4494 4505 0 0.034000 0.079100 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6940 4495 4504 0 0.005200 0.033800 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6941 4497 4545 0 0.081500 0.129600 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6942 4498 4536 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6943 4498 4536 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6944 4500 4511 0 0.017700 0.050900 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6945 4500 4530 0 0.015100 0.098900 0.026800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6946 4502 4503 0 0.000200 0.000500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6947 4502 4534 0 0.020500 0.062000 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6948 4504 4546 0 0.002000 0.013000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6949 4506 4527 0 0.005700 0.035600 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6950 4508 4524 0 0.004200 0.045100 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6951 4508 4546 0 0.011600 0.036300 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6952 4508 4547 0 0.032200 0.069100 0.047400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6953 4508 4547 0 0.023000 0.094500 0.024600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6954 4510 4527 0 0.003900 0.017400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6955 4513 4522 0 0.001400 0.004000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6956 4513 4545 0 0.035000 0.099900 0.026000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6957 4516 4623 0 0.000500 0.006300 0.095800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6958 4516 4631 0 0.003600 0.048000 0.582000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6959 4519 4523 0 0.064100 0.184800 0.048200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6960 4519 4525 0 0.042600 0.100400 0.025000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6961 4520 4557 0 0.021400 0.115700 0.030400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6962 4523 4526 0 0.030200 0.071200 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6963 4527 4553 0 0.015300 0.063700 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6964 4528 4557 0 0.008500 0.046400 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6965 4532 4554 0 0.006600 0.019300 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6966 4533 4542 0 0.033300 0.081600 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6967 4536 4537 1 0.000400 0.019000 0.000000 0.9850 1.0000 1.0000 0.00 0.00 0.00
+6968 4537 4554 0 0.002300 0.024800 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6969 4538 4539 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6970 4538 4540 0 0.002400 0.036600 0.416000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6971 4539 4544 0 0.007890 0.086120 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6972 4539 4553 0 0.023000 0.151200 0.041000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6973 4540 4541 1 0.000400 0.185000 0.000000 1.0110 1.0000 1.0000 0.00 0.00 0.00
+6974 4541 4549 0 0.003100 0.033500 0.010200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6975 4542 4555 0 0.050500 0.124000 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6976 4549 4553 0 0.026900 0.114000 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6977 4553 4558 0 0.028700 0.116900 0.031000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6978 4557 4430 1 0.001700 0.033700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6979 4559 4562 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6980 4559 4562 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6981 4559 4562 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6982 4559 4600 0 0.010550 0.076000 0.115000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6983 4560 4567 0 0.000600 0.006200 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6984 4560 4580 0 0.000490 0.004820 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6985 4561 4582 0 0.021800 0.151100 0.223800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6986 4561 4612 0 0.012700 0.090900 0.135400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6987 4562 4563 1 0.000700 0.021100 0.000000 1.0610 1.0000 1.0000 0.00 0.00 0.00
+6988 4562 4580 0 0.003390 0.033600 0.219800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6989 4562 4604 0 0.003800 0.037800 0.246200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6990 4562 4606 1 0.000600 0.015100 0.000000 1.0720 1.0000 1.0000 0.00 0.00 0.00
+6991 4563 4634 0 0.001000 0.007000 0.014000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6992 4564 4576 0 0.001780 0.012020 0.076600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6993 4565 4566 0 0.000300 0.013550 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6994 4565 4568 0 0.007700 0.053800 0.335000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6995 4565 4573 0 0.005900 0.040500 0.250800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6996 4565 4591 0 0.005500 0.054100 0.363600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6997 4565 4600 0 0.010800 0.100190 0.170400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6998 4565 4600 0 0.015000 0.105500 0.158000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+6999 4565 4600 0 0.010500 0.100000 0.170000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7000 4565 4619 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7001 4565 4619 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7002 4566 4614 0 0.005800 0.028100 0.017000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7003 4566 4618 0 0.096500 0.366900 0.054000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7004 4567 4600 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7005 4567 4600 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7006 4567 4604 0 0.001040 0.009300 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7007 4567 4611 0 0.001700 0.011700 0.289600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7008 4568 4591 0 0.002900 0.028500 0.192000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7009 4568 4615 0 0.005400 0.036900 0.228600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7010 4569 4570 0 0.043000 0.303100 0.463000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7011 4569 4574 0 0.029100 0.226700 0.342800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7012 4569 4582 0 0.008500 0.058800 0.087000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7013 4569 4607 0 0.007300 0.050400 0.074000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7014 4570 4574 0 0.012000 0.083600 0.123600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7015 4570 4582 0 0.046800 0.336900 0.519800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7016 4570 4583 0 0.029400 0.230400 0.349400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7017 4570 4583 0 0.037600 0.263000 0.396000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7018 4570 4595 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7019 4570 4595 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7020 4570 4599 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7021 4570 4607 0 0.048900 0.349200 0.538000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7022 4570 4611 0 0.002000 0.015300 0.214000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7023 4570 4611 0 0.005700 0.045000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7024 4570 4611 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7025 4570 4611 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7026 4571 4578 0 0.001620 0.009700 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7027 4571 4586 0 0.001530 0.009400 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7028 4572 4584 0 0.013700 0.095700 0.141000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7029 4572 4601 0 0.011200 0.077200 0.482400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7030 4572 4601 0 0.011200 0.079000 0.471400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7031 4573 4600 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7032 4573 4600 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7033 4573 4605 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7034 4573 4605 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7035 4575 4581 0 0.002480 0.024470 0.164800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7036 4576 4583 0 0.003580 0.035200 0.239000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7037 4576 4612 0 0.004500 0.044250 0.301000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7038 4577 4598 0 0.017300 0.198800 0.700000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7039 4577 4601 0 0.009100 0.062300 0.385600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7040 4577 4605 0 0.008500 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7041 4577 4605 0 0.008600 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7042 4578 4594 0 0.002100 0.008300 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7043 4579 4588 0 0.004440 0.051440 3.597000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7044 4579 4598 1 0.000740 0.020400 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+7045 4579 4610 0 0.002440 0.032620 2.236000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7046 4580 4600 0 0.001020 0.010050 0.066400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7047 4581 4605 0 0.003920 0.038140 0.258000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7048 4582 4583 0 0.012300 0.125500 0.194000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7049 4582 4599 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7050 4582 4612 0 0.007500 0.077300 0.119000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7051 4583 4612 0 0.023900 0.170800 0.255600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7052 4584 4603 0 0.014500 0.058010 0.094000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7053 4584 4603 0 0.007700 0.056910 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7054 4585 4403 1 0.000400 0.002500 0.000000 1.0450 1.0000 1.0000 0.00 0.00 0.00
+7055 4585 4586 1 0.001200 0.039600 0.000000 1.0250 1.0000 1.0000 0.00 0.00 0.00
+7056 4585 4616 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7057 4587 4594 0 0.062700 0.250000 0.067200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7058 4587 4594 0 0.102000 0.236000 0.060600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7059 4587 4614 0 0.085500 0.342000 0.091400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7060 4587 4618 0 0.080800 0.234400 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7061 4588 4589 1 0.000250 0.015400 0.000000 0.8800 1.0000 1.0000 0.00 0.00 0.00
+7062 4589 4611 0 0.000420 0.006700 0.110800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7063 4590 4591 1 0.000200 0.024200 0.000000 0.9300 1.0000 1.0000 0.00 0.00 0.00
+7064 4591 4592 0 0.000000 0.009400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7065 4591 4617 0 0.000500 0.006500 0.103800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7066 4593 4594 0 0.000400 0.017200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7067 4593 4615 0 0.000770 0.006480 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7068 4596 4633 0 0.001000 0.007000 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7069 4597 4611 0 0.000300 0.001700 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7070 4598 4603 0 0.029050 0.112070 0.195000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7071 4598 4603 0 0.014850 0.114140 0.193000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7072 4600 4602 0 0.000680 0.006680 0.399000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7073 4600 4604 0 0.001050 0.008370 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7074 4601 4611 0 0.025400 0.177700 0.270400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7075 4601 4611 0 0.024400 0.176700 0.271600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7076 4606 4632 0 0.001000 0.007000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7077 4608 4609 0 0.000170 0.012340 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7078 4608 4610 0 0.001840 0.024450 1.662000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7079 4612 4596 1 0.000000 0.083300 0.000000 1.0300 1.0000 1.0000 0.00 0.00 0.00
+7080 4612 4613 1 0.000500 0.018200 0.000000 1.1030 1.0000 1.0000 0.00 0.00 0.00
+7081 4615 4616 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7082 4617 4618 1 0.000330 0.013000 0.000000 1.0500 1.0000 1.0000 0.00 0.00 0.00
+7083 4617 4619 0 0.009220 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7084 4617 4619 0 0.009200 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7085 4620 4621 0 0.000000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7086 4620 4627 0 0.001700 0.021000 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7087 4622 4627 0 0.001000 0.012300 0.150000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7088 4623 4624 0 0.000800 0.009800 0.120000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7089 4624 4628 0 0.001000 0.012000 0.160000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7090 4624 4629 0 0.004200 0.063000 0.200000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7091 4624 4631 0 0.003100 0.027000 0.050000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7092 4624 4631 0 0.001140 0.018000 0.270000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7093 4625 4626 0 0.100000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7094 4625 4628 0 0.000300 0.003800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7095 4625 4628 0 0.003000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7096 4625 4630 0 0.030000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7097 4625 4631 0 0.000400 0.005000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7098 4625 4632 0 0.014000 1.139997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7099 4625 4634 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7100 4626 4627 0 0.001800 0.023000 0.284000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7101 4626 4627 0 0.010000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7102 4626 4628 0 0.030000 0.999999 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7103 4626 4629 0 0.006000 0.068000 0.740000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7104 4626 4630 0 0.050000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7105 4627 4630 0 0.020000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7106 4627 4632 0 -0.200000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7107 4627 4633 0 -0.400000 2.500001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7108 4627 4634 0 0.083000 0.600000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7109 4628 4630 0 0.004200 0.050000 0.080000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7110 4628 4630 0 0.060000 0.700001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7111 4628 4632 0 0.030000 1.009997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7112 4628 4633 0 0.070000 1.830000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7113 4629 4630 0 0.001300 0.029000 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7114 4629 4631 0 0.002200 0.046410 0.400000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7115 4630 4631 0 0.004000 0.044000 0.500000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7116 4630 4634 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7117 4632 4633 0 -0.040450 0.278890 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7118 4632 4634 0 -0.000010 0.002750 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7119 4633 4634 0 -0.178800 0.710991 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7120 4635 4856 0 0.270000 0.349000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7121 4635 4920 0 0.035000 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7122 4636 4643 0 0.292000 0.386000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7123 4636 4862 0 0.002000 0.010000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7124 4637 4729 0 0.025400 0.031800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7125 4637 4800 0 0.027100 0.033900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7126 4638 4760 0 0.288800 0.361900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7127 4638 4893 0 0.233400 0.291900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7128 4639 4717 0 0.124600 0.156000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7129 4639 4862 0 0.333900 0.417900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7130 4640 4743 0 0.163200 0.189500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7131 4640 4847 0 0.092700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7132 4641 4679 0 0.197500 0.229300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7133 4641 4699 0 0.280100 0.333200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7134 4642 4672 0 0.018600 0.024300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7135 4642 4751 0 0.065900 0.164200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7136 4642 4753 0 0.018300 0.044700 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7137 4642 4833 0 0.030700 0.082400 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7138 4642 4845 0 0.020200 0.059200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7139 4642 4901 0 0.019000 0.023800 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7140 4643 4856 0 0.262000 0.339000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7141 4644 4683 0 0.201500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7142 4644 4740 0 0.040300 0.046800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7143 4644 4850 0 0.156000 0.525000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7144 4645 4756 0 0.301300 0.479100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7145 4645 4758 0 0.178000 0.222700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7146 4646 4659 0 0.125100 0.169700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7147 4646 4714 0 0.057600 0.072100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7148 4647 4724 0 0.265000 0.343000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7149 4647 4928 0 0.245000 0.317000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7150 4648 4714 0 0.064400 0.080600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7151 4648 4879 0 0.036600 0.079900 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7152 4649 4658 0 0.296200 0.369500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7153 4649 4720 0 0.506000 0.504700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7154 4649 4771 0 0.374700 0.469600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7155 4649 4799 0 0.828700 0.846900 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7156 4650 4691 0 0.136000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7157 4650 4911 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7158 4651 4857 0 0.294200 0.368600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7159 4651 4865 0 0.338500 0.420000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7160 4652 4885 0 0.137110 0.799561 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7161 4652 4923 0 0.016800 0.050100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7162 4653 4835 0 0.233700 0.271400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7163 4653 4870 0 0.338500 0.423800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7164 4654 4756 0 0.057400 0.142400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7165 4654 4775 0 0.018900 0.044800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7166 4655 4709 0 0.054000 0.136000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7167 4655 4907 0 0.100000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7168 4656 4661 0 0.276500 0.336500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7169 4656 4861 0 0.067800 0.086200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7170 4657 4668 0 0.503600 0.627200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7171 4657 4723 0 0.200000 0.250100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7172 4658 4821 0 0.407000 0.474000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7173 4659 4792 0 0.113000 0.152000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7174 4659 4827 0 0.025220 0.066400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7175 4659 4923 0 0.013750 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7176 4660 4836 0 0.182900 0.462700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7177 4660 4884 0 0.145100 0.367300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7178 4662 4667 0 0.118600 0.153200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7179 4662 4774 0 0.173000 0.216500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7180 4663 4688 0 0.144000 0.180200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7181 4663 4872 0 0.040200 0.061200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7182 4664 4783 0 0.368700 0.428800 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7183 4664 4788 0 0.272000 0.315900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7184 4665 4730 0 0.070500 0.178400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7185 4665 4731 0 0.112900 0.165500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7186 4666 4791 0 0.129000 0.161600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7187 4666 4905 0 0.284100 0.356000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7188 4667 4862 0 0.155900 0.195200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7189 4668 4682 0 0.088000 0.161000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7190 4668 4770 0 0.200000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7191 4668 4800 0 0.048400 0.060200 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7192 4668 4801 0 0.037000 0.062000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7193 4668 4830 0 0.308000 0.437000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7194 4670 4899 0 0.160700 0.214200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7195 4670 4915 0 0.061000 0.076300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7196 4671 4702 0 0.048000 0.061000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7197 4671 4911 0 0.099000 0.125000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7198 4672 4739 0 0.019600 0.025800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7199 4673 4738 0 0.030500 0.038200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7200 4673 4901 0 0.040700 0.050700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7201 4674 4758 0 0.247500 0.309500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7202 4674 4927 0 0.214700 0.268600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7203 4675 4732 0 0.056500 0.104100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7204 4675 4848 0 0.235800 0.291700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7205 4676 4898 0 0.011000 0.028000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7206 4677 4898 0 0.147100 0.184300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7207 4677 4921 0 0.394300 0.419400 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7208 4678 4701 0 0.213000 0.266000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7209 4678 4709 0 0.290200 0.413400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7210 4678 4780 0 0.272600 0.361100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7211 4678 4822 0 0.066500 0.082300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7212 4679 4844 0 0.278100 0.322900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7213 4679 4868 0 0.326400 0.404600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7214 4680 4715 0 0.152900 0.270300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7215 4680 4911 0 0.066800 0.157200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7216 4681 4816 0 0.359000 0.417000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7217 4681 4835 0 0.296000 0.371000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7218 4682 4920 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7219 4683 4846 0 0.225400 0.261800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7220 4684 4805 0 0.083000 0.114000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7221 4684 4819 0 0.096000 0.198000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7222 4685 4802 0 0.157200 0.196900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7223 4685 4906 0 0.091800 0.232400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7224 4686 4871 0 0.051900 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7225 4686 4906 0 0.076300 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7226 4688 4742 0 0.146900 0.172200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7227 4689 4840 0 0.065600 0.166000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7228 4689 4924 0 0.248300 0.374800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7229 4690 4766 0 0.282100 0.327600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7230 4690 4783 0 0.229700 0.266900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7231 4690 4785 0 0.357200 0.416900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7232 4690 4810 0 0.243000 0.326000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7233 4691 4826 0 0.221100 0.258500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7234 4692 4759 0 0.172900 0.272900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7235 4692 4866 0 0.211600 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7236 4692 4872 0 0.248400 0.378300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7237 4692 4918 0 0.264600 0.366300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7238 4693 4742 0 0.336000 0.549100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7239 4693 4916 0 0.144600 0.192400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7240 4694 4911 0 0.016400 0.037000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7241 4695 4780 0 0.260000 0.250000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7242 4695 4858 0 0.074000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7243 4696 4786 0 0.474401 0.484100 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7244 4696 4824 0 0.224500 0.216100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7245 4697 4747 0 0.091000 0.184000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7246 4697 4818 0 0.079000 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7247 4699 4777 0 0.308300 0.386300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7248 4700 4837 0 0.036000 0.172000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7249 4700 4887 0 0.023000 0.075000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7250 4701 4930 0 0.038900 0.050800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7251 4702 4915 0 0.096600 0.130800 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7252 4703 4661 1 0.139500 0.467100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7253 4703 4848 0 0.233000 0.559600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7254 4703 4896 0 0.079000 0.102000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7255 4704 4709 0 0.060000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7256 4704 4832 0 0.027000 0.042000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7257 4705 4709 0 0.045400 0.111400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7258 4705 4831 0 0.057200 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7259 4706 4751 0 0.067800 0.088900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7260 4706 4776 0 0.013400 0.033600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7261 4707 4763 0 0.021000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7262 4707 4776 0 0.027000 0.068000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7263 4708 4734 0 0.050000 0.086000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7264 4708 4747 0 0.076300 0.192800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7265 4708 4767 0 0.099000 0.128000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7266 4708 4851 0 0.024000 0.061000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7267 4709 4875 0 0.130000 0.324000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7268 4710 4868 0 0.436300 0.497300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7269 4710 4889 0 0.397000 0.468200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7270 4711 4752 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7271 4712 4776 0 0.143200 0.182300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7272 4712 4778 0 0.155200 0.194400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7273 4713 4849 0 0.115800 0.145000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7274 4713 4928 0 0.192500 0.241300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7275 4715 4860 0 0.019000 0.068200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7276 4716 4851 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7277 4716 4886 0 0.057000 0.141000 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7278 4717 4758 0 0.181400 0.226800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7279 4718 4752 0 0.056300 0.073000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7280 4718 4829 0 0.016700 0.029100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7281 4719 4773 0 0.118000 0.152000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7282 4719 4830 0 0.129000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7283 4720 4835 0 0.229700 0.287800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7284 4722 4795 0 0.070500 0.081900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7285 4722 4831 0 0.060400 0.075700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7286 4723 4927 0 0.110100 0.137800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7287 4724 4770 0 0.180000 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7288 4727 4850 0 0.296000 0.282000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7289 4727 4898 0 0.339000 0.381000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7290 4728 4801 0 0.022000 0.056000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7291 4728 4881 0 0.163000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7292 4729 4880 0 0.176300 0.224000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7293 4730 4861 0 0.092400 0.115700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7294 4731 4922 0 0.065600 0.085500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7295 4732 4804 0 0.133400 0.250800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7296 4732 4922 0 0.066400 0.168100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7297 4733 4844 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7298 4735 4855 0 0.137000 0.159100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7299 4735 4867 0 0.259300 0.324500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7300 4736 4863 0 0.058000 0.150000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7301 4736 4907 0 0.052000 0.064000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7302 4738 4887 0 0.117100 0.174000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7303 4739 4925 0 0.031100 0.070800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7304 4740 4825 0 0.199000 0.239000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7305 4741 4769 0 0.005900 0.016700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7306 4741 4827 0 0.020500 0.054900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7307 4741 4885 0 0.012200 0.038400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7308 4742 4755 0 0.069400 0.086800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7309 4742 4836 0 0.271300 0.426200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7310 4743 4905 0 0.216400 0.248300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7311 4744 4796 0 0.085000 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7312 4744 4823 0 0.187000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7313 4745 4853 0 0.322400 0.404000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7314 4745 4898 0 0.094200 0.146700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7315 4746 4836 0 0.221600 0.277700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7316 4746 4918 0 0.150900 0.188700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7317 4747 4899 0 0.178900 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7318 4747 4909 0 0.077700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7319 4748 4805 0 0.155500 0.301300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7320 4748 4863 0 0.028100 0.064600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7321 4749 4768 0 0.141000 0.163800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7322 4749 4828 0 0.198000 0.256200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7323 4750 4763 0 0.026000 0.044000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7324 4750 4834 0 0.084000 0.103000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7325 4753 4754 0 0.021000 0.052000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7326 4753 4833 0 0.027000 0.066000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7327 4754 4776 0 0.085200 0.181500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7328 4755 4768 0 0.266700 0.308000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7329 4756 4786 0 0.181900 0.256900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7330 4756 4789 0 0.115400 0.170200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7331 4757 4858 0 0.093000 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7332 4757 4896 0 0.067000 0.168000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7333 4758 4873 0 0.254000 0.334000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7334 4759 4790 0 0.171500 0.210600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7335 4760 4802 0 0.184700 0.232100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7336 4762 4789 0 0.296400 0.386200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7337 4762 4826 0 0.032700 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7338 4764 4778 0 0.181300 0.227200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7339 4764 4855 0 0.142600 0.178800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7340 4765 4911 0 0.214000 0.272000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7341 4765 4915 0 0.012000 0.015000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7342 4766 4921 0 0.100700 0.117000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7343 4767 4910 0 0.068000 0.083000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7344 4769 4885 0 0.018020 0.055090 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7345 4769 4911 0 0.015680 0.073070 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7346 4771 4842 0 0.306200 0.383800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7347 4772 4776 0 0.032600 0.072500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7348 4772 4895 0 0.259200 0.331900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7349 4773 4926 0 0.156000 0.191000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7350 4774 4826 0 0.076500 0.095800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7351 4775 4857 0 0.118900 0.149000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7352 4777 4849 0 0.195500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7353 4777 4926 0 0.172000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7354 4780 4822 0 0.206000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7355 4780 4858 0 0.260900 0.343300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7356 4781 4871 0 0.266700 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7357 4782 4854 0 0.058000 0.144000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7358 4782 4880 0 0.225400 0.280500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7359 4782 4893 0 0.078100 0.097700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7360 4782 4894 0 0.142400 0.340700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7361 4784 4858 0 0.180000 0.220000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7362 4784 4875 0 0.114000 0.284000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7363 4785 4847 0 0.094700 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7364 4788 4928 0 0.194300 0.241400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7365 4790 4828 0 0.128900 0.161500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7366 4790 4840 0 0.140000 0.588000 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7367 4790 4909 0 0.255900 0.397000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7368 4790 4912 0 0.219900 0.255800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7369 4790 4919 0 0.179500 0.209000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7370 4791 4864 0 0.044300 0.054600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7371 4792 4910 0 0.080000 0.098000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7372 4793 4837 0 0.133000 0.170000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7373 4793 4867 0 0.005000 0.024000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7374 4794 4827 0 0.020450 0.054930 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7375 4794 4911 0 0.024000 0.075000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7376 4795 4887 0 0.021000 0.135700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7377 4796 4888 0 0.017000 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7378 4797 4879 0 0.077200 0.096900 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7379 4797 4914 0 0.220000 0.276200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7380 4799 4843 0 0.359000 0.450400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7381 4799 4889 0 0.572300 0.716900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7382 4803 4807 0 0.135000 0.189900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7383 4803 4894 0 0.086900 0.219900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7384 4804 4863 0 0.058600 0.145900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7385 4805 4820 0 0.194100 0.229600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7386 4805 4874 0 0.080000 0.198000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7387 4806 4856 0 0.200000 0.256000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7388 4806 4906 0 0.043000 0.108000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7389 4807 4906 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7390 4808 4915 0 0.053200 0.131900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7391 4809 4867 0 0.051700 0.070100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7392 4810 4873 0 0.280500 0.377400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7393 4812 4879 0 0.058000 0.170000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7394 4812 4883 0 0.075000 0.185000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7395 4814 4841 0 0.020000 0.026000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7396 4815 4841 0 0.043400 0.054300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7397 4816 4842 0 0.397000 0.497000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7398 4817 4825 0 0.270000 0.329500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7399 4817 4835 0 0.078200 0.094000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7400 4818 4892 0 0.016000 0.040000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7401 4819 4841 0 0.080000 0.141000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7402 4820 4841 0 0.065000 0.112000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7403 4821 4876 0 0.285900 0.333100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7404 4823 4826 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7405 4824 4864 0 0.234500 0.225100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7406 4826 4924 0 0.363400 0.425500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7407 4829 4841 0 0.044000 0.057000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7408 4832 4904 0 0.037000 0.088000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7409 4833 4845 0 0.009000 0.020000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7410 4833 4918 0 0.204100 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7411 4834 4867 0 0.099000 0.248000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7412 4834 4878 0 0.029000 0.128000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7413 4836 4895 0 0.152900 0.209100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7414 4837 4839 0 0.057900 0.108900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7415 4837 4878 0 0.012000 0.017000 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7416 4838 4840 0 0.008200 0.020500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7417 4838 4915 0 0.100700 0.126200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7418 4839 4887 0 0.106200 0.139800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7419 4840 4892 0 0.161000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7420 4840 4917 0 0.130000 0.246600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7421 4842 4843 0 0.662900 0.830700 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7422 4846 4921 0 0.135300 0.157100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7423 4847 4865 0 0.268000 0.335800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7424 4850 4900 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7425 4853 4905 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7426 4854 4903 0 0.037000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7427 4860 4879 0 0.011200 0.037400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7428 4862 4914 0 0.215300 0.263900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7429 4863 4904 0 0.186000 0.241000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7430 4864 4865 0 0.298200 0.373700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7431 4867 4930 0 0.173300 0.218900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7432 4868 4869 0 0.274000 0.318200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7433 4868 4902 0 0.222000 0.234000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7434 4869 4929 0 0.211500 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7435 4870 4900 0 0.296000 0.363000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7436 4876 4902 0 0.249000 0.264000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7437 4876 4921 0 0.532800 0.529500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7438 4879 4888 0 0.063000 0.085000 0.007800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7439 4881 4903 0 0.058000 0.075000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7440 4884 4916 0 0.318500 0.370700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7441 4887 4925 0 0.012700 0.036100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7442 4912 4917 0 0.229700 0.266800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7443 4912 4919 0 0.040400 0.046900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7444 4927 4928 0 0.351500 0.442100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7445 4928 4929 0 0.358500 0.419200 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7446 4932 4636 2 0.010800 0.276300 0.000000 1.0301 1.0000 1.0000 0.00 0.00 0.00
+7447 4932 4946 0 0.000400 0.002400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7448 4932 4947 0 0.001500 0.003400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7449 4932 5041 0 0.008300 0.053400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7450 4933 4934 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7451 4933 4934 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7452 4933 4970 0 0.002100 0.009600 0.140600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7453 4933 4973 0 0.003400 0.018130 0.138600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7454 4933 4977 0 0.000900 0.004300 0.063200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7455 4935 5005 0 0.006340 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7456 4936 5006 0 0.006350 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7457 4937 4644 2 0.007000 0.180000 0.000000 1.0097 1.0000 1.0000 0.00 0.00 0.00
+7458 4937 4938 0 0.027000 0.103000 0.014400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7459 4937 5058 0 0.022100 0.084300 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7460 4938 4649 2 0.010900 0.272000 0.000000 1.0680 1.0000 1.0000 0.00 0.00 0.00
+7461 4938 4980 0 0.028500 0.108600 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7462 4939 4659 2 0.004200 0.127000 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+7463 4939 4659 2 0.004300 0.127300 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+7464 4939 4979 0 0.013500 0.029950 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7465 4939 5000 0 0.004500 0.016100 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7466 4939 5028 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7467 4939 5028 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7468 4939 5041 0 0.011100 0.025700 0.013400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7469 4939 5054 0 0.008600 0.031400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7470 4939 5062 0 0.009100 0.033000 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7471 4939 5070 0 0.002340 0.010260 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7472 4940 4941 1 0.000300 0.010200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7473 4940 4942 1 0.000500 0.032900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7474 4940 4943 1 0.000800 0.031100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7475 4940 5012 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7476 4940 5013 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7477 4940 5068 0 0.000900 0.011000 0.192600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7478 4940 5068 0 0.000900 0.011000 0.385200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7479 4941 5015 0 0.002000 0.019500 0.044000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7480 4942 4665 2 0.006500 0.170200 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+7481 4942 4665 2 0.006900 0.175600 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+7482 4942 5053 0 0.002500 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7483 4942 5055 0 0.002890 0.009510 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7484 4942 5055 0 0.002320 0.009950 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7485 4943 4955 0 0.001400 0.013500 0.009000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7486 4943 4960 0 0.040200 0.090390 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7487 4943 4962 0 0.011290 0.039310 0.026600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7488 4943 4966 0 0.032600 0.090400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7489 4943 4975 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7490 4943 4976 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7491 4943 5056 0 0.002370 0.011230 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7492 4944 4668 2 0.006000 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+7493 4944 4668 2 0.007200 0.180000 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+7494 4944 4946 0 0.038200 0.088000 0.045600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7495 4944 5004 0 0.006000 0.103200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7496 4944 5044 0 0.012100 0.060000 0.018400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7497 4944 5060 0 0.001900 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7498 4945 4944 2 0.000500 0.025000 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+7499 4945 5279 0 0.000400 0.003600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7500 4948 4949 1 0.000700 0.025000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7501 4948 5047 0 0.000300 0.001800 1.273000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7502 4949 4956 0 0.001500 0.006700 0.099200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7503 4949 4977 0 0.001500 0.006600 0.098000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7504 4949 5020 0 0.001300 0.005800 0.085600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7505 4950 5014 0 0.000400 0.002600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7506 4950 5054 0 0.001100 0.006700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7507 4951 5011 0 0.001600 0.006700 0.114800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7508 4951 5066 0 0.001900 0.009100 0.101200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7509 4952 4687 2 0.004400 0.127500 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+7510 4952 4687 2 0.004400 0.125700 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+7511 4952 4993 0 0.001600 0.008600 0.058200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7512 4952 4995 0 0.005700 0.033390 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7513 4952 5029 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7514 4952 5057 0 0.007250 0.028620 0.062800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7515 4953 4692 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7516 4953 4692 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7517 4953 4958 0 0.002500 0.016000 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7518 4953 5076 0 0.004300 0.028700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7519 4955 5052 0 0.000130 0.001300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7520 4956 4698 1 0.004200 0.140000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7521 4956 4698 1 0.004400 0.137300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7522 4956 4698 1 0.004800 0.137800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7523 4956 5011 0 0.001000 0.004600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7524 4956 5020 0 0.002400 0.011020 0.162200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7525 4956 5064 0 0.002700 0.012500 0.183400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7526 4957 5027 0 0.001600 0.019700 0.343200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7527 4957 5090 0 0.004400 0.063800 0.811600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7528 4958 5023 0 0.007300 0.042500 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7529 4958 5051 0 0.002400 0.015300 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7530 4959 4965 0 0.001800 0.018200 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7531 4959 5063 0 0.000500 0.004700 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7532 4960 4703 2 0.007700 0.186400 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+7533 4960 4703 2 0.007700 0.186600 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+7534 4960 4966 0 0.015800 0.052200 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7535 4960 5092 0 0.008680 0.046920 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7536 4961 4991 1 0.000500 0.011700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7537 4961 5213 0 0.020900 0.097700 0.038800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7538 4962 4709 2 0.007300 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7539 4962 5071 0 0.001110 0.003830 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7540 4963 5063 0 0.003300 0.007000 0.131800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7541 4964 5067 0 0.000300 0.025250 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7542 4965 4721 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+7543 4965 4721 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+7544 4965 5052 0 0.001400 0.013600 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7545 4965 5069 0 0.013000 0.076450 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7546 4966 5001 0 0.031000 0.118100 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7547 4967 4725 2 0.005420 0.130500 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+7548 4967 4725 2 0.005400 0.129800 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+7549 4967 4968 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7550 4967 4969 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7551 4967 5010 0 0.003130 0.013150 0.223600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7552 4968 5019 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7553 4968 5048 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7554 4969 5019 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7555 4969 5048 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7556 4970 4954 2 0.004600 0.117200 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+7557 4970 4954 2 0.004600 0.117000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+7558 4970 4954 2 0.003200 0.120000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+7559 4970 5020 0 0.003400 0.015600 0.230200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7560 4971 4726 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7561 4971 4726 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7562 4971 4726 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7563 4971 5022 0 0.002320 0.058320 0.122600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7564 4971 5063 0 0.003200 0.012490 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7565 4971 5063 0 0.003150 0.027060 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7566 4971 5082 0 0.004300 0.015900 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7567 4972 4974 2 0.002000 0.120000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+7568 4972 5034 0 0.001380 0.009250 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7569 4972 5066 0 0.000910 0.006060 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7570 4973 4974 2 0.002000 0.123000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+7571 4973 5034 0 0.001370 0.009100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7572 4977 4737 1 0.004300 0.132700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+7573 4977 4737 1 0.004500 0.133700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+7574 4977 4737 1 0.004800 0.138300 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+7575 4977 5011 0 0.000300 0.001140 0.016800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7576 4977 5066 0 0.003390 0.015460 0.227800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7577 4978 4742 2 0.007200 0.180000 0.000000 1.0581 1.0000 1.0000 0.00 0.00 0.00
+7578 4979 4747 2 0.006700 0.179100 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+7579 4979 4747 2 0.007700 0.180200 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+7580 4979 5040 0 0.008100 0.031700 0.214600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7581 4979 5050 0 0.006600 0.026600 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7582 4979 5076 0 0.001500 0.015000 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7583 4980 4799 2 0.081000 0.288700 0.000000 1.0518 1.0000 1.0000 0.00 0.00 0.00
+7584 4980 5038 0 0.065600 0.250200 0.035000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7585 4981 4752 1 0.005800 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7586 4981 4752 1 0.010600 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7587 4981 4752 1 0.006000 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7588 4981 5017 0 0.002500 0.024860 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7589 4981 5079 0 0.029880 0.124600 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7590 4981 5082 0 0.001990 0.008180 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7591 4982 4756 2 0.010900 0.275000 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+7592 4982 4756 2 0.012600 0.274700 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+7593 4982 4985 0 0.011400 0.040100 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7594 4982 4990 0 0.011200 0.025000 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7595 4982 5028 0 0.014620 0.053870 0.033000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7596 4982 5126 0 0.026280 0.105720 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7597 4983 4761 1 0.004200 0.133500 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7598 4983 4761 1 0.005800 0.180900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7599 4983 4761 1 0.004100 0.134300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7600 4983 4984 0 0.002800 0.016300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7601 4983 5032 0 0.001100 0.006400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7602 4983 5032 0 0.001100 0.006700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7603 4984 5016 0 0.005500 0.013600 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7604 4984 5035 0 0.001740 0.017600 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7605 4985 5060 0 0.035200 0.122600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7606 4986 5009 0 0.011000 0.477800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7607 4986 5035 0 0.001120 0.011370 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7608 4986 5055 0 0.002800 0.018200 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7609 4987 5058 2 0.002600 0.053600 0.000000 1.0641 1.0000 1.0000 0.00 0.00 0.00
+7610 4987 5206 0 0.009300 0.057300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7611 4988 5004 0 0.042200 0.103400 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7612 4989 4992 0 0.016900 0.051800 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7613 4989 5061 0 0.006900 0.046300 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7614 4990 5037 0 0.041600 0.093800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7615 4991 4776 2 0.016000 0.260000 0.000000 0.8852 1.0000 1.0000 0.00 0.00 0.00
+7616 4991 5018 0 0.015600 0.082000 0.134000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7617 4991 5023 0 0.008700 0.050800 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7618 4992 4777 2 0.010800 0.276300 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+7619 4992 5038 0 0.057700 0.128100 0.016400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7620 4993 4779 1 0.005700 0.177300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7621 4993 4779 1 0.007000 0.181600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7622 4993 4779 1 0.007700 0.181800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7623 4993 4994 0 0.004300 0.015400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7624 4993 5019 0 0.009300 0.033600 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7625 4993 5057 0 0.006100 0.021700 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7626 4994 5019 0 0.005200 0.019000 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7627 4994 5022 0 0.006100 0.023200 0.148600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7628 4995 4996 2 0.026900 0.568700 0.000000 0.9992 1.0000 1.0000 0.00 0.00 0.00
+7629 4995 5049 0 0.002100 0.012600 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7630 4997 4998 2 0.027400 0.568700 0.000000 1.0020 1.0000 1.0000 0.00 0.00 0.00
+7631 4997 5019 0 0.006400 0.037400 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7632 4997 5049 0 0.002200 0.012700 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7633 4999 5057 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7634 4999 5070 0 0.002800 0.011600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7635 5000 5057 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7636 5001 4780 1 0.014700 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7637 5001 5002 1 0.015000 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7638 5001 5024 0 0.027910 0.098660 0.013600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7639 5003 4781 2 0.004200 0.126000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+7640 5003 4781 2 0.004300 0.127000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+7641 5003 5043 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7642 5003 5043 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7643 5003 5048 0 0.004600 0.026500 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7644 5004 4669 2 0.017700 0.287300 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+7645 5004 4669 2 0.015700 0.282700 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+7646 5004 5044 0 0.011900 0.058800 0.049000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7647 5004 5061 0 0.005300 0.025100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7648 5005 5016 0 0.001200 0.011500 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7649 5006 5033 0 0.001700 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7650 5007 5009 0 0.011400 0.485300 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7651 5007 5055 0 0.002500 0.016100 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7652 5008 5009 0 0.011300 0.489400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7653 5008 5055 0 0.002500 0.016400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7654 5010 4787 2 0.007200 0.178900 0.000000 1.0047 1.0000 1.0000 0.00 0.00 0.00
+7655 5010 5048 0 0.006000 0.033100 0.083400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7656 5012 5068 0 0.001600 0.019900 0.346600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7657 5012 5282 0 0.001030 0.012210 0.218400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7658 5013 5075 0 0.002200 0.026960 0.467400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7659 5013 5284 0 0.001500 0.017500 0.312400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7660 5014 5062 0 0.001100 0.007000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7661 5015 5016 1 0.000500 0.025400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7662 5015 5065 0 0.000600 0.005900 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7663 5016 4798 1 0.006000 0.182200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7664 5016 4798 1 0.006900 0.184400 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7665 5016 4798 1 0.006100 0.181300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7666 5016 4798 1 0.011400 0.261700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7667 5016 5032 0 0.002100 0.014400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7668 5016 5053 0 0.004600 0.046200 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7669 5016 5077 0 0.010040 0.039610 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7670 5017 4805 1 0.006000 0.175100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7671 5017 4805 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7672 5017 4805 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7673 5017 5036 0 0.010200 0.037100 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7674 5017 5069 0 0.001500 0.007100 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7675 5017 5069 0 0.001000 0.006700 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7676 5018 5051 0 0.017700 0.064200 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7677 5019 4811 1 0.003600 0.132700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7678 5019 4811 1 0.003500 0.130800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7679 5019 4811 1 0.004000 0.139200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7680 5019 5020 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7681 5019 5020 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7682 5019 5021 1 0.013100 0.241100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7683 5019 5029 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7684 5022 4813 1 0.006000 0.188200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7685 5022 4813 1 0.006200 0.183100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7686 5022 4813 1 0.005700 0.192700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7687 5022 4813 1 0.006000 0.173600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7688 5022 5040 0 0.007600 0.028000 0.093800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7689 5022 5076 0 0.018000 0.085900 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7690 5023 4833 2 0.007600 0.165800 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+7691 5023 4833 2 0.007200 0.169300 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+7692 5024 5025 0 0.002810 0.018580 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7693 5024 5051 0 0.006460 0.018530 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7694 5025 4837 2 0.006200 0.177800 0.000000 0.9002 1.0000 1.0000 0.00 0.00 0.00
+7695 5026 4840 2 0.007000 0.174700 0.000000 0.9707 1.0000 1.0000 0.00 0.00 0.00
+7696 5026 5076 0 0.017800 0.118400 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7697 5027 5028 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7698 5027 5028 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7699 5027 5042 0 0.001920 0.021280 0.364800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7700 5027 5047 0 0.001400 0.017300 0.291200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7701 5027 5075 0 0.000990 0.012120 0.211400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7702 5027 5200 0 0.001750 0.020310 0.382000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7703 5028 5062 0 0.003800 0.014500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7704 5028 5062 0 0.002000 0.019400 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7705 5029 4852 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7706 5029 4852 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7707 5029 4852 1 0.006000 0.168900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7708 5029 5043 0 0.036400 0.214000 0.216000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7709 5029 5048 0 0.004600 0.028200 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7710 5030 4854 2 0.006800 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+7711 5030 5044 0 0.000500 0.004800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7712 5031 5032 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7713 5031 5033 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7714 5031 5034 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7715 5032 5035 0 0.005700 0.040700 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7716 5032 5066 0 0.001700 0.056100 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7717 5033 5063 0 0.004100 0.023700 0.120800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7718 5033 5063 0 0.005300 0.029800 0.076400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7719 5034 5064 0 0.005400 0.030000 0.075800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7720 5035 4859 1 0.006500 0.223300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7721 5035 4859 1 0.006200 0.237800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7722 5035 4859 1 0.006300 0.240000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7723 5035 5055 0 0.003700 0.028800 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7724 5036 4863 2 0.004500 0.127200 0.000000 0.9930 1.0000 1.0000 0.00 0.00 0.00
+7725 5036 5056 0 0.020400 0.074500 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7726 5037 4865 2 0.013200 0.277700 0.000000 1.0287 1.0000 1.0000 0.00 0.00 0.00
+7727 5037 5058 0 0.037700 0.083700 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7728 5038 4868 2 0.010200 0.264700 0.000000 1.0958 1.0000 1.0000 0.00 0.00 0.00
+7729 5040 4877 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+7730 5040 4877 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+7731 5040 5050 0 0.010500 0.038600 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7732 5041 4879 2 0.007200 0.177800 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+7733 5041 4879 2 0.007200 0.180000 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+7734 5042 5047 0 0.001700 0.020300 0.458200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7735 5042 5200 0 0.003400 0.039700 0.722600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7736 5042 5252 0 0.000100 0.001800 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7737 5043 5044 0 0.000900 0.099600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7738 5043 5044 0 0.000900 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7739 5044 5046 0 0.012400 0.070100 0.050200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7740 5044 5048 0 0.029650 0.210540 0.032200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7741 5045 5042 1 0.000500 0.027800 0.000000 1.0750 1.0000 1.0000 0.00 0.00 0.00
+7742 5046 5049 0 0.004500 0.022600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7743 5047 5048 1 0.000500 0.021670 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7744 5048 4882 2 0.005600 0.177800 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+7745 5048 4882 2 0.006000 0.179300 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+7746 5048 4882 2 0.007700 0.186700 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+7747 5048 5059 0 0.022000 0.129000 0.020000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7748 5049 4883 2 0.007700 0.178700 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+7749 5049 4883 2 0.006200 0.173300 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+7750 5049 4883 2 0.007800 0.185100 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+7751 5050 4886 2 0.008300 0.180700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7752 5050 4886 2 0.007700 0.179100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7753 5050 5076 0 0.002300 0.029400 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7754 5051 4887 1 0.010500 0.278000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7755 5051 4887 1 0.010500 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7756 5051 4887 1 0.010800 0.272700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7757 5051 5069 0 0.015000 0.055300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7758 5051 5071 0 0.006400 0.022300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7759 5051 5072 0 0.005100 0.034600 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7760 5052 4890 2 0.027000 0.600000 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+7761 5053 4891 2 0.027000 0.600000 0.000000 0.9693 1.0000 1.0000 0.00 0.00 0.00
+7762 5055 5039 2 0.006200 0.182200 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+7763 5055 5039 2 0.006100 0.174700 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+7764 5055 5056 0 0.001100 0.093700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7765 5055 5056 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7766 5055 5077 0 0.003700 0.013900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7767 5056 5079 0 0.003300 0.011800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7768 5057 4897 2 0.007600 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+7769 5057 4897 2 0.007800 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+7770 5057 4897 2 0.007600 0.186700 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+7771 5058 4898 2 0.010300 0.266000 0.000000 1.0328 1.0000 1.0000 0.00 0.00 0.00
+7772 5059 4906 2 0.006300 0.180700 0.000000 0.9847 1.0000 1.0000 0.00 0.00 0.00
+7773 5060 5061 0 0.001900 0.012500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7774 5061 4908 2 0.005800 0.179100 0.000000 1.0793 1.0000 1.0000 0.00 0.00 0.00
+7775 5062 4911 1 0.005600 0.173800 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7776 5062 4911 1 0.005800 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7777 5062 4911 1 0.007100 0.178400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+7778 5063 4913 1 0.011100 0.202200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7779 5063 4913 1 0.011300 0.206700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7780 5063 4913 1 0.011600 0.211800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7781 5063 4913 1 0.011400 0.208700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7782 5063 4913 1 0.009900 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7783 5063 4913 1 0.009800 0.177800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+7784 5063 5064 0 0.000900 0.117000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7785 5065 5066 1 0.000500 0.025000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7786 5066 5067 1 0.004700 0.119200 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+7787 5066 5067 1 0.004800 0.115100 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+7788 5068 5069 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7789 5068 5069 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7790 5068 5205 0 0.002400 0.032200 0.920800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7791 5069 5072 0 0.002600 0.017500 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7792 5071 5073 0 0.009500 0.021300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7793 5072 5073 0 0.007700 0.029200 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7794 5073 5074 2 0.027000 0.560500 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+7795 5073 5074 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+7796 5073 5074 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+7797 5075 5076 0 0.000500 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7798 5077 5078 2 0.027700 0.593300 0.000000 0.9640 1.0000 1.0000 0.00 0.00 0.00
+7799 5079 5080 0 0.001400 0.008600 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7800 5080 5081 2 0.027600 0.602700 0.000000 0.9690 1.0000 1.0000 0.00 0.00 0.00
+7801 5082 4931 2 0.007000 0.171100 0.000000 0.9240 1.0000 1.0000 0.00 0.00 0.00
+7802 5083 5136 0 0.031900 0.075300 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7803 5083 5196 0 0.009200 0.021600 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7804 5084 5159 0 0.027800 0.045500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7805 5084 5167 0 0.057300 0.093900 0.019200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7806 5085 5118 0 0.028500 0.069900 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7807 5085 5134 0 0.022900 0.068400 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7808 5086 5100 0 0.007000 0.021300 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7809 5086 5120 0 0.025500 0.074100 0.019400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7810 5087 5189 0 0.068000 0.116000 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7811 5087 5207 0 0.060200 0.098800 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7812 5088 5167 0 0.091500 0.217600 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7813 5088 5187 0 0.032400 0.076400 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7814 5088 5193 0 0.030800 0.085400 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7815 5089 5195 0 0.027900 0.080400 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7816 5089 5218 0 0.053300 0.153400 0.040200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7817 5090 5091 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7818 5090 5152 0 0.002500 0.035400 0.458800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7819 5090 5178 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7820 5090 5178 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7821 5090 5198 0 0.001800 0.028300 0.321800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7822 5090 5205 0 0.002400 0.036600 0.836000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7823 5091 5142 0 0.001600 0.010400 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7824 5091 5157 0 0.010000 0.064800 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7825 5091 5170 0 0.010500 0.058800 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7826 5091 5186 0 0.004100 0.036500 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7827 5091 5191 0 0.015500 0.102000 0.027600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7828 5091 5209 0 0.014000 0.133500 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7829 5093 5168 0 0.005700 0.029800 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7830 5093 5214 0 0.001300 0.005300 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7831 5094 5144 0 0.047900 0.112800 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7832 5094 5212 0 0.035800 0.084300 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7833 5095 5170 0 0.029100 0.088000 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7834 5095 5194 0 0.051300 0.155300 0.037000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7835 5096 5104 0 0.016000 0.046000 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7836 5096 5113 0 0.014700 0.042400 0.011000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7837 5097 5209 0 0.051400 0.120200 0.030600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7838 5098 5109 0 0.015800 0.117300 0.034400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7839 5098 5142 0 0.019100 0.124100 0.034600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7840 5098 5192 0 0.009300 0.060200 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7841 5098 5199 0 0.008800 0.036900 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7842 5098 5216 0 0.004500 0.013300 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7843 5099 5110 0 0.017000 0.052100 0.048000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7844 5099 5169 0 0.023200 0.152200 0.041200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7845 5099 5190 0 0.016300 0.089000 0.023400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7846 5099 5219 0 0.023500 0.127200 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7847 5100 5203 0 0.039300 0.140900 0.035400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7848 5101 5116 0 0.051700 0.117300 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7849 5101 5179 0 0.003900 0.025600 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7850 5102 5180 0 0.013100 0.037800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7851 5103 5116 0 0.029000 0.086300 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7852 5103 5158 0 0.027100 0.078000 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7853 5103 5162 0 0.041300 0.119000 0.032000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7854 5104 5109 0 0.004300 0.046300 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7855 5104 5191 0 0.015700 0.103400 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7856 5105 5148 0 0.078700 0.154600 0.032600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7857 5105 5177 0 0.003500 0.013600 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7858 5105 5182 0 0.027100 0.146100 0.038400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7859 5105 5183 0 0.026400 0.079700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7860 5105 5210 0 0.044500 0.097200 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7861 5105 5213 0 0.017600 0.073100 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7862 5106 5145 0 0.046400 0.109700 0.027000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7863 5106 5196 0 0.057000 0.135400 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7864 5106 5217 0 0.048100 0.138700 0.036200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7865 5107 5123 0 0.004000 0.017400 0.004600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7866 5107 5135 0 0.002400 0.008100 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7867 5108 5124 0 0.000900 0.009400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7868 5108 5127 0 0.016900 0.033000 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7869 5108 5138 0 0.008200 0.018900 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7870 5108 5197 0 0.034900 0.100400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7871 5108 5203 0 0.006200 0.018800 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7872 5109 5134 0 0.010300 0.112200 0.034000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7873 5109 5192 0 0.019000 0.169300 0.049800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7874 5109 5199 0 0.007500 0.081300 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7875 5110 5177 0 0.008900 0.027800 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7876 5111 5163 0 0.028100 0.047400 0.009200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7877 5111 5204 0 0.083800 0.136700 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7878 5112 5123 0 0.064400 0.115200 0.024400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7879 5112 5139 0 0.007000 0.031300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7880 5112 5151 0 0.009800 0.098400 0.029800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7881 5112 5155 0 0.017100 0.071200 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7882 5112 5161 0 0.001600 0.016900 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7883 5112 5161 0 0.001500 0.015900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7884 5113 5114 0 0.027800 0.071900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7885 5114 5125 0 0.013000 0.084700 0.023000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7886 5114 5131 0 0.061700 0.114600 0.025400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7887 5114 5134 0 0.022000 0.143900 0.039000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7888 5114 5171 0 0.014300 0.051800 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7889 5114 5171 0 0.018900 0.049500 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7890 5114 5199 0 0.034600 0.146200 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7891 5114 5216 0 0.025000 0.168200 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7892 5114 5218 0 0.021500 0.065600 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7893 5115 5170 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7894 5115 5170 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7895 5116 5122 0 0.031700 0.139300 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7896 5116 5146 0 0.025100 0.159800 0.043600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7897 5116 5155 0 0.015300 0.063600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7898 5116 5176 0 0.001200 0.005100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7899 5117 5149 0 0.119000 0.269900 0.064400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7900 5117 5151 0 0.012400 0.065700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7901 5118 5131 0 0.027500 0.040100 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7902 5118 5141 0 0.009400 0.023100 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7903 5118 5163 0 0.072100 0.134100 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7904 5119 5153 0 0.006800 0.020700 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7905 5119 5174 0 0.011900 0.036000 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7906 5120 5130 0 0.023500 0.067700 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7907 5121 5143 0 0.002200 0.023700 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7908 5121 5201 0 0.003400 0.037100 0.011200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7909 5122 5150 0 0.049000 0.085100 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7910 5122 5153 0 0.050300 0.151200 0.036400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7911 5122 5210 0 0.011800 0.035100 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7912 5123 5179 0 0.006400 0.041400 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7913 5123 5201 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7914 5123 5201 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7915 5123 5214 0 0.041600 0.169100 0.045000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7916 5125 5147 0 0.001800 0.005400 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7917 5127 5212 0 0.026100 0.061600 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7918 5128 5209 0 0.004900 0.009800 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7919 5129 5136 0 0.036300 0.104500 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7920 5129 5180 0 0.008600 0.024800 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7921 5130 5173 0 0.008400 0.024300 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7922 5132 5140 0 0.008200 0.025000 0.006000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7923 5132 5143 0 0.004600 0.015500 0.003800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7924 5133 5183 0 0.002100 0.010400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7925 5133 5209 0 0.029500 0.093600 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7926 5134 5173 0 0.037300 0.122400 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7927 5134 5216 0 0.009000 0.029900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7928 5135 5143 0 0.015500 0.049500 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7929 5135 5151 0 0.038200 0.142300 0.085200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7930 5136 5156 0 0.037400 0.087200 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7931 5136 5188 0 0.038100 0.089800 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7932 5137 4978 2 0.001400 0.038000 0.000000 1.0675 1.0000 1.0000 0.00 0.00 0.00
+7933 5137 5153 0 0.007460 0.044800 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7934 5138 5189 0 0.010300 0.038500 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7935 5139 5172 0 0.000500 0.003200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7936 5140 5174 0 0.007100 0.021500 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7937 5143 5126 1 0.000800 0.015500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7938 5143 5201 0 0.006500 0.061100 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7939 5143 5220 0 0.026200 0.109100 0.029200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7940 5144 5167 0 0.053500 0.124600 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7941 5145 5204 0 0.023400 0.045700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7942 5146 5214 0 0.019800 0.083100 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7943 5147 5218 0 0.005600 0.016900 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7944 5148 5209 0 0.016200 0.031800 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7945 5149 5193 0 0.043500 0.125300 0.032800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7946 5150 5209 0 0.067100 0.114700 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7947 5151 5189 0 0.007000 0.055000 0.019800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7948 5151 5206 0 0.005300 0.057300 0.017200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7949 5152 5160 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7950 5152 5160 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7951 5152 5198 0 0.000600 0.007100 0.137000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7952 5152 5200 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7953 5152 5200 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7954 5154 5189 0 0.006700 0.022600 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7955 5154 5203 0 0.011200 0.071500 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7956 5156 5167 0 0.034000 0.079100 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7957 5157 5166 0 0.005200 0.033800 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7958 5159 5207 0 0.081500 0.129600 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7959 5160 5198 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7960 5160 5198 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7961 5162 5173 0 0.017700 0.050900 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7962 5162 5192 0 0.015100 0.098900 0.026800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7963 5164 5165 0 0.000200 0.000500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7964 5164 5196 0 0.020500 0.062000 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7965 5166 5208 0 0.002000 0.013000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7966 5168 5189 0 0.005700 0.035600 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7967 5170 5186 0 0.004200 0.045100 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7968 5170 5208 0 0.011600 0.036300 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7969 5170 5209 0 0.032200 0.069100 0.047400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7970 5170 5209 0 0.023000 0.094500 0.024600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7971 5172 5189 0 0.003900 0.017400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7972 5175 5184 0 0.001400 0.004000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7973 5175 5207 0 0.035000 0.099900 0.026000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7974 5178 5285 0 0.000500 0.006300 0.095800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7975 5178 5293 0 0.003600 0.048000 0.582000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7976 5181 5185 0 0.064100 0.184800 0.048200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7977 5181 5187 0 0.042600 0.100400 0.025000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7978 5182 5219 0 0.021400 0.115700 0.030400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7979 5185 5188 0 0.030200 0.071200 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7980 5189 5215 0 0.015300 0.063700 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7981 5190 5219 0 0.008500 0.046400 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7982 5194 5216 0 0.006600 0.019300 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7983 5195 5204 0 0.033300 0.081600 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7984 5198 5199 1 0.000400 0.019000 0.000000 0.9850 1.0000 1.0000 0.00 0.00 0.00
+7985 5199 5216 0 0.002300 0.024800 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7986 5200 5201 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7987 5200 5202 0 0.002400 0.036600 0.416000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7988 5201 5206 0 0.007890 0.086120 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7989 5201 5215 0 0.023000 0.151200 0.041000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7990 5202 5203 1 0.000400 0.185000 0.000000 1.0110 1.0000 1.0000 0.00 0.00 0.00
+7991 5203 5211 0 0.003100 0.033500 0.010200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7992 5204 5217 0 0.050500 0.124000 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7993 5211 5215 0 0.026900 0.114000 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7994 5215 5220 0 0.028700 0.116900 0.031000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7995 5219 5092 1 0.001700 0.033700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7996 5221 5224 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7997 5221 5224 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7998 5221 5224 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+7999 5221 5262 0 0.010550 0.076000 0.115000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8000 5222 5229 0 0.000600 0.006200 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8001 5222 5242 0 0.000490 0.004820 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8002 5223 5244 0 0.021800 0.151100 0.223800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8003 5223 5274 0 0.012700 0.090900 0.135400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8004 5224 5225 1 0.000700 0.021100 0.000000 1.0610 1.0000 1.0000 0.00 0.00 0.00
+8005 5224 5242 0 0.003390 0.033600 0.219800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8006 5224 5266 0 0.003800 0.037800 0.246200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8007 5224 5268 1 0.000600 0.015100 0.000000 1.0720 1.0000 1.0000 0.00 0.00 0.00
+8008 5225 5296 0 0.001000 0.007000 0.014000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8009 5226 5238 0 0.001780 0.012020 0.076600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8010 5227 5228 0 0.000300 0.013550 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8011 5227 5230 0 0.007700 0.053800 0.335000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8012 5227 5235 0 0.005900 0.040500 0.250800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8013 5227 5253 0 0.005500 0.054100 0.363600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8014 5227 5262 0 0.010800 0.100190 0.170400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8015 5227 5262 0 0.015000 0.105500 0.158000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8016 5227 5262 0 0.010500 0.100000 0.170000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8017 5227 5281 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8018 5227 5281 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8019 5228 5276 0 0.005800 0.028100 0.017000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8020 5228 5280 0 0.096500 0.366900 0.054000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8021 5229 5262 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8022 5229 5262 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8023 5229 5266 0 0.001040 0.009300 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8024 5229 5273 0 0.001700 0.011700 0.289600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8025 5230 5253 0 0.002900 0.028500 0.192000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8026 5230 5277 0 0.005400 0.036900 0.228600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8027 5231 5232 0 0.043000 0.303100 0.463000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8028 5231 5236 0 0.029100 0.226700 0.342800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8029 5231 5244 0 0.008500 0.058800 0.087000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8030 5231 5269 0 0.007300 0.050400 0.074000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8031 5232 5236 0 0.012000 0.083600 0.123600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8032 5232 5244 0 0.046800 0.336900 0.519800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8033 5232 5245 0 0.029400 0.230400 0.349400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8034 5232 5245 0 0.037600 0.263000 0.396000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8035 5232 5257 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8036 5232 5257 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8037 5232 5261 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8038 5232 5269 0 0.048900 0.349200 0.538000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8039 5232 5273 0 0.002000 0.015300 0.214000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8040 5232 5273 0 0.005700 0.045000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8041 5232 5273 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8042 5232 5273 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8043 5233 5240 0 0.001620 0.009700 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8044 5233 5248 0 0.001530 0.009400 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8045 5234 5246 0 0.013700 0.095700 0.141000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8046 5234 5263 0 0.011200 0.077200 0.482400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8047 5234 5263 0 0.011200 0.079000 0.471400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8048 5235 5262 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8049 5235 5262 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8050 5235 5267 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8051 5235 5267 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8052 5237 5243 0 0.002480 0.024470 0.164800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8053 5238 5245 0 0.003580 0.035200 0.239000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8054 5238 5274 0 0.004500 0.044250 0.301000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8055 5239 5260 0 0.017300 0.198800 0.700000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8056 5239 5263 0 0.009100 0.062300 0.385600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8057 5239 5267 0 0.008500 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8058 5239 5267 0 0.008600 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8059 5240 5256 0 0.002100 0.008300 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8060 5241 5250 0 0.004440 0.051440 3.597000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8061 5241 5260 1 0.000740 0.020400 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+8062 5241 5272 0 0.002440 0.032620 2.236000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8063 5242 5262 0 0.001020 0.010050 0.066400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8064 5243 5267 0 0.003920 0.038140 0.258000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8065 5244 5245 0 0.012300 0.125500 0.194000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8066 5244 5261 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8067 5244 5274 0 0.007500 0.077300 0.119000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8068 5245 5274 0 0.023900 0.170800 0.255600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8069 5246 5265 0 0.014500 0.058010 0.094000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8070 5246 5265 0 0.007700 0.056910 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8071 5247 5065 1 0.000400 0.002500 0.000000 1.0450 1.0000 1.0000 0.00 0.00 0.00
+8072 5247 5248 1 0.001200 0.039600 0.000000 1.0250 1.0000 1.0000 0.00 0.00 0.00
+8073 5247 5278 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8074 5249 5256 0 0.062700 0.250000 0.067200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8075 5249 5256 0 0.102000 0.236000 0.060600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8076 5249 5276 0 0.085500 0.342000 0.091400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8077 5249 5280 0 0.080800 0.234400 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8078 5250 5251 1 0.000250 0.015400 0.000000 0.8800 1.0000 1.0000 0.00 0.00 0.00
+8079 5251 5273 0 0.000420 0.006700 0.110800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8080 5252 5253 1 0.000200 0.024200 0.000000 0.9300 1.0000 1.0000 0.00 0.00 0.00
+8081 5253 5254 0 0.000000 0.009400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8082 5253 5279 0 0.000500 0.006500 0.103800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8083 5255 5256 0 0.000400 0.017200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8084 5255 5277 0 0.000770 0.006480 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8085 5258 5295 0 0.001000 0.007000 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8086 5259 5273 0 0.000300 0.001700 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8087 5260 5265 0 0.029050 0.112070 0.195000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8088 5260 5265 0 0.014850 0.114140 0.193000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8089 5262 5264 0 0.000680 0.006680 0.399000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8090 5262 5266 0 0.001050 0.008370 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8091 5263 5273 0 0.025400 0.177700 0.270400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8092 5263 5273 0 0.024400 0.176700 0.271600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8093 5268 5294 0 0.001000 0.007000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8094 5270 5271 0 0.000170 0.012340 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8095 5270 5272 0 0.001840 0.024450 1.662000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8096 5274 5258 1 0.000000 0.083300 0.000000 1.0300 1.0000 1.0000 0.00 0.00 0.00
+8097 5274 5275 1 0.000500 0.018200 0.000000 1.1030 1.0000 1.0000 0.00 0.00 0.00
+8098 5277 5278 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8099 5279 5280 1 0.000330 0.013000 0.000000 1.0500 1.0000 1.0000 0.00 0.00 0.00
+8100 5279 5281 0 0.009220 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8101 5279 5281 0 0.009200 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8102 5282 5283 0 0.000000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8103 5282 5289 0 0.001700 0.021000 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8104 5284 5289 0 0.001000 0.012300 0.150000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8105 5285 5286 0 0.000800 0.009800 0.120000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8106 5286 5290 0 0.001000 0.012000 0.160000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8107 5286 5291 0 0.004200 0.063000 0.200000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8108 5286 5293 0 0.003100 0.027000 0.050000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8109 5286 5293 0 0.001140 0.018000 0.270000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8110 5287 5288 0 0.100000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8111 5287 5290 0 0.000300 0.003800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8112 5287 5290 0 0.003000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8113 5287 5292 0 0.030000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8114 5287 5293 0 0.000400 0.005000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8115 5287 5294 0 0.014000 1.139997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8116 5287 5296 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8117 5288 5289 0 0.001800 0.023000 0.284000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8118 5288 5289 0 0.010000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8119 5288 5290 0 0.030000 0.999999 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8120 5288 5291 0 0.006000 0.068000 0.740000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8121 5288 5292 0 0.050000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8122 5289 5292 0 0.020000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8123 5289 5294 0 -0.200000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8124 5289 5295 0 -0.400000 2.500001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8125 5289 5296 0 0.083000 0.600000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8126 5290 5292 0 0.004200 0.050000 0.080000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8127 5290 5292 0 0.060000 0.700001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8128 5290 5294 0 0.030000 1.009997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8129 5290 5295 0 0.070000 1.830000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8130 5291 5292 0 0.001300 0.029000 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8131 5291 5293 0 0.002200 0.046410 0.400000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8132 5292 5293 0 0.004000 0.044000 0.500000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8133 5292 5296 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8134 5294 5295 0 -0.040450 0.278890 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8135 5294 5296 0 -0.000010 0.002750 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8136 5295 5296 0 -0.178800 0.710991 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8137 5297 5518 0 0.270000 0.349000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8138 5297 5582 0 0.035000 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8139 5298 5305 0 0.292000 0.386000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8140 5298 5524 0 0.002000 0.010000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8141 5299 5391 0 0.025400 0.031800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8142 5299 5462 0 0.027100 0.033900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8143 5300 5422 0 0.288800 0.361900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8144 5300 5555 0 0.233400 0.291900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8145 5301 5379 0 0.124600 0.156000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8146 5301 5524 0 0.333900 0.417900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8147 5302 5405 0 0.163200 0.189500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8148 5302 5509 0 0.092700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8149 5303 5341 0 0.197500 0.229300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8150 5303 5361 0 0.280100 0.333200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8151 5304 5334 0 0.018600 0.024300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8152 5304 5413 0 0.065900 0.164200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8153 5304 5415 0 0.018300 0.044700 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8154 5304 5495 0 0.030700 0.082400 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8155 5304 5507 0 0.020200 0.059200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8156 5304 5563 0 0.019000 0.023800 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8157 5305 5518 0 0.262000 0.339000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8158 5306 5345 0 0.201500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8159 5306 5402 0 0.040300 0.046800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8160 5306 5512 0 0.156000 0.525000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8161 5307 5418 0 0.301300 0.479100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8162 5307 5420 0 0.178000 0.222700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8163 5308 5321 0 0.125100 0.169700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8164 5308 5376 0 0.057600 0.072100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8165 5309 5386 0 0.265000 0.343000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8166 5309 5590 0 0.245000 0.317000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8167 5310 5376 0 0.064400 0.080600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8168 5310 5541 0 0.036600 0.079900 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8169 5311 5320 0 0.296200 0.369500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8170 5311 5382 0 0.506000 0.504700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8171 5311 5433 0 0.374700 0.469600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8172 5311 5461 0 0.828700 0.846900 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8173 5312 5353 0 0.136000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8174 5312 5573 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8175 5313 5519 0 0.294200 0.368600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8176 5313 5527 0 0.338500 0.420000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8177 5314 5547 0 0.137110 0.799561 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8178 5314 5585 0 0.016800 0.050100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8179 5315 5497 0 0.233700 0.271400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8180 5315 5532 0 0.338500 0.423800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8181 5316 5418 0 0.057400 0.142400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8182 5316 5437 0 0.018900 0.044800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8183 5317 5371 0 0.054000 0.136000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8184 5317 5569 0 0.100000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8185 5318 5323 0 0.276500 0.336500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8186 5318 5523 0 0.067800 0.086200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8187 5319 5330 0 0.503600 0.627200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8188 5319 5385 0 0.200000 0.250100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8189 5320 5483 0 0.407000 0.474000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8190 5321 5454 0 0.113000 0.152000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8191 5321 5489 0 0.025220 0.066400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8192 5321 5585 0 0.013750 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8193 5322 5498 0 0.182900 0.462700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8194 5322 5546 0 0.145100 0.367300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8195 5324 5329 0 0.118600 0.153200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8196 5324 5436 0 0.173000 0.216500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8197 5325 5350 0 0.144000 0.180200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8198 5325 5534 0 0.040200 0.061200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8199 5326 5445 0 0.368700 0.428800 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8200 5326 5450 0 0.272000 0.315900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8201 5327 5392 0 0.070500 0.178400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8202 5327 5393 0 0.112900 0.165500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8203 5328 5453 0 0.129000 0.161600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8204 5328 5567 0 0.284100 0.356000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8205 5329 5524 0 0.155900 0.195200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8206 5330 5344 0 0.088000 0.161000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8207 5330 5432 0 0.200000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8208 5330 5462 0 0.048400 0.060200 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8209 5330 5463 0 0.037000 0.062000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8210 5330 5492 0 0.308000 0.437000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8211 5332 5561 0 0.160700 0.214200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8212 5332 5577 0 0.061000 0.076300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8213 5333 5364 0 0.048000 0.061000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8214 5333 5573 0 0.099000 0.125000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8215 5334 5401 0 0.019600 0.025800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8216 5335 5400 0 0.030500 0.038200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8217 5335 5563 0 0.040700 0.050700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8218 5336 5420 0 0.247500 0.309500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8219 5336 5589 0 0.214700 0.268600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8220 5337 5394 0 0.056500 0.104100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8221 5337 5510 0 0.235800 0.291700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8222 5338 5560 0 0.011000 0.028000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8223 5339 5560 0 0.147100 0.184300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8224 5339 5583 0 0.394300 0.419400 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8225 5340 5363 0 0.213000 0.266000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8226 5340 5371 0 0.290200 0.413400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8227 5340 5442 0 0.272600 0.361100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8228 5340 5484 0 0.066500 0.082300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8229 5341 5506 0 0.278100 0.322900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8230 5341 5530 0 0.326400 0.404600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8231 5342 5377 0 0.152900 0.270300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8232 5342 5573 0 0.066800 0.157200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8233 5343 5478 0 0.359000 0.417000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8234 5343 5497 0 0.296000 0.371000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8235 5344 5582 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8236 5345 5508 0 0.225400 0.261800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8237 5346 5467 0 0.083000 0.114000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8238 5346 5481 0 0.096000 0.198000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8239 5347 5464 0 0.157200 0.196900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8240 5347 5568 0 0.091800 0.232400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8241 5348 5533 0 0.051900 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8242 5348 5568 0 0.076300 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8243 5350 5404 0 0.146900 0.172200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8244 5351 5502 0 0.065600 0.166000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8245 5351 5586 0 0.248300 0.374800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8246 5352 5428 0 0.282100 0.327600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8247 5352 5445 0 0.229700 0.266900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8248 5352 5447 0 0.357200 0.416900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8249 5352 5472 0 0.243000 0.326000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8250 5353 5488 0 0.221100 0.258500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8251 5354 5421 0 0.172900 0.272900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8252 5354 5528 0 0.211600 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8253 5354 5534 0 0.248400 0.378300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8254 5354 5580 0 0.264600 0.366300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8255 5355 5404 0 0.336000 0.549100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8256 5355 5578 0 0.144600 0.192400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8257 5356 5573 0 0.016400 0.037000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8258 5357 5442 0 0.260000 0.250000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8259 5357 5520 0 0.074000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8260 5358 5448 0 0.474401 0.484100 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8261 5358 5486 0 0.224500 0.216100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8262 5359 5409 0 0.091000 0.184000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8263 5359 5480 0 0.079000 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8264 5361 5439 0 0.308300 0.386300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8265 5362 5499 0 0.036000 0.172000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8266 5362 5549 0 0.023000 0.075000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8267 5363 5592 0 0.038900 0.050800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8268 5364 5577 0 0.096600 0.130800 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8269 5365 5323 1 0.139500 0.467100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8270 5365 5510 0 0.233000 0.559600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8271 5365 5558 0 0.079000 0.102000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8272 5366 5371 0 0.060000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8273 5366 5494 0 0.027000 0.042000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8274 5367 5371 0 0.045400 0.111400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8275 5367 5493 0 0.057200 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8276 5368 5413 0 0.067800 0.088900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8277 5368 5438 0 0.013400 0.033600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8278 5369 5425 0 0.021000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8279 5369 5438 0 0.027000 0.068000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8280 5370 5396 0 0.050000 0.086000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8281 5370 5409 0 0.076300 0.192800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8282 5370 5429 0 0.099000 0.128000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8283 5370 5513 0 0.024000 0.061000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8284 5371 5537 0 0.130000 0.324000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8285 5372 5530 0 0.436300 0.497300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8286 5372 5551 0 0.397000 0.468200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8287 5373 5414 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8288 5374 5438 0 0.143200 0.182300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8289 5374 5440 0 0.155200 0.194400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8290 5375 5511 0 0.115800 0.145000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8291 5375 5590 0 0.192500 0.241300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8292 5377 5522 0 0.019000 0.068200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8293 5378 5513 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8294 5378 5548 0 0.057000 0.141000 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8295 5379 5420 0 0.181400 0.226800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8296 5380 5414 0 0.056300 0.073000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8297 5380 5491 0 0.016700 0.029100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8298 5381 5435 0 0.118000 0.152000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8299 5381 5492 0 0.129000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8300 5382 5497 0 0.229700 0.287800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8301 5384 5457 0 0.070500 0.081900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8302 5384 5493 0 0.060400 0.075700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8303 5385 5589 0 0.110100 0.137800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8304 5386 5432 0 0.180000 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8305 5389 5512 0 0.296000 0.282000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8306 5389 5560 0 0.339000 0.381000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8307 5390 5463 0 0.022000 0.056000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8308 5390 5543 0 0.163000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8309 5391 5542 0 0.176300 0.224000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8310 5392 5523 0 0.092400 0.115700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8311 5393 5584 0 0.065600 0.085500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8312 5394 5466 0 0.133400 0.250800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8313 5394 5584 0 0.066400 0.168100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8314 5395 5506 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8315 5397 5517 0 0.137000 0.159100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8316 5397 5529 0 0.259300 0.324500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8317 5398 5525 0 0.058000 0.150000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8318 5398 5569 0 0.052000 0.064000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8319 5400 5549 0 0.117100 0.174000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8320 5401 5587 0 0.031100 0.070800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8321 5402 5487 0 0.199000 0.239000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8322 5403 5431 0 0.005900 0.016700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8323 5403 5489 0 0.020500 0.054900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8324 5403 5547 0 0.012200 0.038400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8325 5404 5417 0 0.069400 0.086800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8326 5404 5498 0 0.271300 0.426200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8327 5405 5567 0 0.216400 0.248300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8328 5406 5458 0 0.085000 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8329 5406 5485 0 0.187000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8330 5407 5515 0 0.322400 0.404000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8331 5407 5560 0 0.094200 0.146700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8332 5408 5498 0 0.221600 0.277700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8333 5408 5580 0 0.150900 0.188700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8334 5409 5561 0 0.178900 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8335 5409 5571 0 0.077700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8336 5410 5467 0 0.155500 0.301300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8337 5410 5525 0 0.028100 0.064600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8338 5411 5430 0 0.141000 0.163800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8339 5411 5490 0 0.198000 0.256200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8340 5412 5425 0 0.026000 0.044000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8341 5412 5496 0 0.084000 0.103000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8342 5415 5416 0 0.021000 0.052000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8343 5415 5495 0 0.027000 0.066000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8344 5416 5438 0 0.085200 0.181500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8345 5417 5430 0 0.266700 0.308000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8346 5418 5448 0 0.181900 0.256900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8347 5418 5451 0 0.115400 0.170200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8348 5419 5520 0 0.093000 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8349 5419 5558 0 0.067000 0.168000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8350 5420 5535 0 0.254000 0.334000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8351 5421 5452 0 0.171500 0.210600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8352 5422 5464 0 0.184700 0.232100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8353 5424 5451 0 0.296400 0.386200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8354 5424 5488 0 0.032700 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8355 5426 5440 0 0.181300 0.227200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8356 5426 5517 0 0.142600 0.178800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8357 5427 5573 0 0.214000 0.272000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8358 5427 5577 0 0.012000 0.015000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8359 5428 5583 0 0.100700 0.117000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8360 5429 5572 0 0.068000 0.083000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8361 5431 5547 0 0.018020 0.055090 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8362 5431 5573 0 0.015680 0.073070 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8363 5433 5504 0 0.306200 0.383800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8364 5434 5438 0 0.032600 0.072500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8365 5434 5557 0 0.259200 0.331900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8366 5435 5588 0 0.156000 0.191000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8367 5436 5488 0 0.076500 0.095800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8368 5437 5519 0 0.118900 0.149000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8369 5439 5511 0 0.195500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8370 5439 5588 0 0.172000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8371 5442 5484 0 0.206000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8372 5442 5520 0 0.260900 0.343300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8373 5443 5533 0 0.266700 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8374 5444 5516 0 0.058000 0.144000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8375 5444 5542 0 0.225400 0.280500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8376 5444 5555 0 0.078100 0.097700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8377 5444 5556 0 0.142400 0.340700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8378 5446 5520 0 0.180000 0.220000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8379 5446 5537 0 0.114000 0.284000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8380 5447 5509 0 0.094700 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8381 5450 5590 0 0.194300 0.241400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8382 5452 5490 0 0.128900 0.161500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8383 5452 5502 0 0.140000 0.588000 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8384 5452 5571 0 0.255900 0.397000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8385 5452 5574 0 0.219900 0.255800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8386 5452 5581 0 0.179500 0.209000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8387 5453 5526 0 0.044300 0.054600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8388 5454 5572 0 0.080000 0.098000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8389 5455 5499 0 0.133000 0.170000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8390 5455 5529 0 0.005000 0.024000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8391 5456 5489 0 0.020450 0.054930 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8392 5456 5573 0 0.024000 0.075000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8393 5457 5549 0 0.021000 0.135700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8394 5458 5550 0 0.017000 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8395 5459 5541 0 0.077200 0.096900 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8396 5459 5576 0 0.220000 0.276200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8397 5461 5505 0 0.359000 0.450400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8398 5461 5551 0 0.572300 0.716900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8399 5465 5469 0 0.135000 0.189900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8400 5465 5556 0 0.086900 0.219900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8401 5466 5525 0 0.058600 0.145900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8402 5467 5482 0 0.194100 0.229600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8403 5467 5536 0 0.080000 0.198000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8404 5468 5518 0 0.200000 0.256000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8405 5468 5568 0 0.043000 0.108000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8406 5469 5568 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8407 5470 5577 0 0.053200 0.131900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8408 5471 5529 0 0.051700 0.070100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8409 5472 5535 0 0.280500 0.377400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8410 5474 5541 0 0.058000 0.170000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8411 5474 5545 0 0.075000 0.185000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8412 5476 5503 0 0.020000 0.026000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8413 5477 5503 0 0.043400 0.054300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8414 5478 5504 0 0.397000 0.497000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8415 5479 5487 0 0.270000 0.329500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8416 5479 5497 0 0.078200 0.094000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8417 5480 5554 0 0.016000 0.040000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8418 5481 5503 0 0.080000 0.141000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8419 5482 5503 0 0.065000 0.112000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8420 5483 5538 0 0.285900 0.333100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8421 5485 5488 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8422 5486 5526 0 0.234500 0.225100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8423 5488 5586 0 0.363400 0.425500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8424 5491 5503 0 0.044000 0.057000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8425 5494 5566 0 0.037000 0.088000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8426 5495 5507 0 0.009000 0.020000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8427 5495 5580 0 0.204100 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8428 5496 5529 0 0.099000 0.248000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8429 5496 5540 0 0.029000 0.128000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8430 5498 5557 0 0.152900 0.209100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8431 5499 5501 0 0.057900 0.108900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8432 5499 5540 0 0.012000 0.017000 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8433 5500 5502 0 0.008200 0.020500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8434 5500 5577 0 0.100700 0.126200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8435 5501 5549 0 0.106200 0.139800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8436 5502 5554 0 0.161000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8437 5502 5579 0 0.130000 0.246600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8438 5504 5505 0 0.662900 0.830700 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8439 5508 5583 0 0.135300 0.157100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8440 5509 5527 0 0.268000 0.335800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8441 5512 5562 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8442 5515 5567 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8443 5516 5565 0 0.037000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8444 5522 5541 0 0.011200 0.037400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8445 5524 5576 0 0.215300 0.263900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8446 5525 5566 0 0.186000 0.241000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8447 5526 5527 0 0.298200 0.373700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8448 5529 5592 0 0.173300 0.218900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8449 5530 5531 0 0.274000 0.318200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8450 5530 5564 0 0.222000 0.234000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8451 5531 5591 0 0.211500 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8452 5532 5562 0 0.296000 0.363000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8453 5538 5564 0 0.249000 0.264000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8454 5538 5583 0 0.532800 0.529500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8455 5541 5550 0 0.063000 0.085000 0.007800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8456 5543 5565 0 0.058000 0.075000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8457 5546 5578 0 0.318500 0.370700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8458 5549 5587 0 0.012700 0.036100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8459 5574 5579 0 0.229700 0.266800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8460 5574 5581 0 0.040400 0.046900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8461 5589 5590 0 0.351500 0.442100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8462 5590 5591 0 0.358500 0.419200 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8463 5594 5298 2 0.010800 0.276300 0.000000 1.0301 1.0000 1.0000 0.00 0.00 0.00
+8464 5594 5608 0 0.000400 0.002400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8465 5594 5609 0 0.001500 0.003400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8466 5594 5703 0 0.008300 0.053400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8467 5595 5596 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8468 5595 5596 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8469 5595 5632 0 0.002100 0.009600 0.140600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8470 5595 5635 0 0.003400 0.018130 0.138600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8471 5595 5639 0 0.000900 0.004300 0.063200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8472 5597 5667 0 0.006340 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8473 5598 5668 0 0.006350 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8474 5599 5306 2 0.007000 0.180000 0.000000 1.0097 1.0000 1.0000 0.00 0.00 0.00
+8475 5599 5600 0 0.027000 0.103000 0.014400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8476 5599 5720 0 0.022100 0.084300 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8477 5600 5311 2 0.010900 0.272000 0.000000 1.0680 1.0000 1.0000 0.00 0.00 0.00
+8478 5600 5642 0 0.028500 0.108600 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8479 5601 5321 2 0.004200 0.127000 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+8480 5601 5321 2 0.004300 0.127300 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+8481 5601 5641 0 0.013500 0.029950 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8482 5601 5662 0 0.004500 0.016100 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8483 5601 5690 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8484 5601 5690 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8485 5601 5703 0 0.011100 0.025700 0.013400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8486 5601 5716 0 0.008600 0.031400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8487 5601 5724 0 0.009100 0.033000 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8488 5601 5732 0 0.002340 0.010260 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8489 5602 5603 1 0.000300 0.010200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8490 5602 5604 1 0.000500 0.032900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8491 5602 5605 1 0.000800 0.031100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8492 5602 5674 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8493 5602 5675 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8494 5602 5730 0 0.000900 0.011000 0.192600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8495 5602 5730 0 0.000900 0.011000 0.385200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8496 5603 5677 0 0.002000 0.019500 0.044000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8497 5604 5327 2 0.006500 0.170200 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+8498 5604 5327 2 0.006900 0.175600 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+8499 5604 5715 0 0.002500 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8500 5604 5717 0 0.002890 0.009510 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8501 5604 5717 0 0.002320 0.009950 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8502 5605 5617 0 0.001400 0.013500 0.009000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8503 5605 5622 0 0.040200 0.090390 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8504 5605 5624 0 0.011290 0.039310 0.026600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8505 5605 5628 0 0.032600 0.090400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8506 5605 5637 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8507 5605 5638 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8508 5605 5718 0 0.002370 0.011230 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8509 5606 5330 2 0.006000 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+8510 5606 5330 2 0.007200 0.180000 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+8511 5606 5608 0 0.038200 0.088000 0.045600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8512 5606 5666 0 0.006000 0.103200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8513 5606 5706 0 0.012100 0.060000 0.018400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8514 5606 5722 0 0.001900 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8515 5607 5606 2 0.000500 0.025000 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+8516 5607 5941 0 0.000400 0.003600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8517 5610 5611 1 0.000700 0.025000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8518 5610 5709 0 0.000300 0.001800 1.273000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8519 5611 5618 0 0.001500 0.006700 0.099200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8520 5611 5639 0 0.001500 0.006600 0.098000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8521 5611 5682 0 0.001300 0.005800 0.085600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8522 5612 5676 0 0.000400 0.002600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8523 5612 5716 0 0.001100 0.006700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8524 5613 5673 0 0.001600 0.006700 0.114800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8525 5613 5728 0 0.001900 0.009100 0.101200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8526 5614 5349 2 0.004400 0.127500 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+8527 5614 5349 2 0.004400 0.125700 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+8528 5614 5655 0 0.001600 0.008600 0.058200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8529 5614 5657 0 0.005700 0.033390 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8530 5614 5691 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8531 5614 5719 0 0.007250 0.028620 0.062800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8532 5615 5354 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8533 5615 5354 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8534 5615 5620 0 0.002500 0.016000 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8535 5615 5738 0 0.004300 0.028700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8536 5617 5714 0 0.000130 0.001300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8537 5618 5360 1 0.004200 0.140000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8538 5618 5360 1 0.004400 0.137300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8539 5618 5360 1 0.004800 0.137800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8540 5618 5673 0 0.001000 0.004600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8541 5618 5682 0 0.002400 0.011020 0.162200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8542 5618 5726 0 0.002700 0.012500 0.183400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8543 5619 5689 0 0.001600 0.019700 0.343200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8544 5619 5752 0 0.004400 0.063800 0.811600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8545 5620 5685 0 0.007300 0.042500 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8546 5620 5713 0 0.002400 0.015300 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8547 5621 5627 0 0.001800 0.018200 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8548 5621 5725 0 0.000500 0.004700 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8549 5622 5365 2 0.007700 0.186400 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+8550 5622 5365 2 0.007700 0.186600 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+8551 5622 5628 0 0.015800 0.052200 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8552 5622 5754 0 0.008680 0.046920 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8553 5623 5653 1 0.000500 0.011700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8554 5623 5875 0 0.020900 0.097700 0.038800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8555 5624 5371 2 0.007300 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8556 5624 5733 0 0.001110 0.003830 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8557 5625 5725 0 0.003300 0.007000 0.131800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8558 5626 5729 0 0.000300 0.025250 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8559 5627 5383 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+8560 5627 5383 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+8561 5627 5714 0 0.001400 0.013600 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8562 5627 5731 0 0.013000 0.076450 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8563 5628 5663 0 0.031000 0.118100 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8564 5629 5387 2 0.005420 0.130500 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+8565 5629 5387 2 0.005400 0.129800 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+8566 5629 5630 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8567 5629 5631 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8568 5629 5672 0 0.003130 0.013150 0.223600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8569 5630 5681 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8570 5630 5710 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8571 5631 5681 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8572 5631 5710 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8573 5632 5616 2 0.004600 0.117200 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+8574 5632 5616 2 0.004600 0.117000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+8575 5632 5616 2 0.003200 0.120000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+8576 5632 5682 0 0.003400 0.015600 0.230200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8577 5633 5388 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8578 5633 5388 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8579 5633 5388 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8580 5633 5684 0 0.002320 0.058320 0.122600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8581 5633 5725 0 0.003200 0.012490 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8582 5633 5725 0 0.003150 0.027060 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8583 5633 5744 0 0.004300 0.015900 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8584 5634 5636 2 0.002000 0.120000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+8585 5634 5696 0 0.001380 0.009250 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8586 5634 5728 0 0.000910 0.006060 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8587 5635 5636 2 0.002000 0.123000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+8588 5635 5696 0 0.001370 0.009100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8589 5639 5399 1 0.004300 0.132700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+8590 5639 5399 1 0.004500 0.133700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+8591 5639 5399 1 0.004800 0.138300 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+8592 5639 5673 0 0.000300 0.001140 0.016800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8593 5639 5728 0 0.003390 0.015460 0.227800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8594 5640 5404 2 0.007200 0.180000 0.000000 1.0581 1.0000 1.0000 0.00 0.00 0.00
+8595 5641 5409 2 0.006700 0.179100 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+8596 5641 5409 2 0.007700 0.180200 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+8597 5641 5702 0 0.008100 0.031700 0.214600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8598 5641 5712 0 0.006600 0.026600 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8599 5641 5738 0 0.001500 0.015000 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8600 5642 5461 2 0.081000 0.288700 0.000000 1.0518 1.0000 1.0000 0.00 0.00 0.00
+8601 5642 5700 0 0.065600 0.250200 0.035000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8602 5643 5414 1 0.005800 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8603 5643 5414 1 0.010600 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8604 5643 5414 1 0.006000 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8605 5643 5679 0 0.002500 0.024860 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8606 5643 5741 0 0.029880 0.124600 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8607 5643 5744 0 0.001990 0.008180 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8608 5644 5418 2 0.010900 0.275000 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+8609 5644 5418 2 0.012600 0.274700 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+8610 5644 5647 0 0.011400 0.040100 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8611 5644 5652 0 0.011200 0.025000 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8612 5644 5690 0 0.014620 0.053870 0.033000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8613 5644 5788 0 0.026280 0.105720 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8614 5645 5423 1 0.004200 0.133500 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8615 5645 5423 1 0.005800 0.180900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8616 5645 5423 1 0.004100 0.134300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8617 5645 5646 0 0.002800 0.016300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8618 5645 5694 0 0.001100 0.006400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8619 5645 5694 0 0.001100 0.006700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8620 5646 5678 0 0.005500 0.013600 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8621 5646 5697 0 0.001740 0.017600 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8622 5647 5722 0 0.035200 0.122600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8623 5648 5671 0 0.011000 0.477800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8624 5648 5697 0 0.001120 0.011370 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8625 5648 5717 0 0.002800 0.018200 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8626 5649 5720 2 0.002600 0.053600 0.000000 1.0641 1.0000 1.0000 0.00 0.00 0.00
+8627 5649 5868 0 0.009300 0.057300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8628 5650 5666 0 0.042200 0.103400 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8629 5651 5654 0 0.016900 0.051800 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8630 5651 5723 0 0.006900 0.046300 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8631 5652 5699 0 0.041600 0.093800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8632 5653 5438 2 0.016000 0.260000 0.000000 0.8852 1.0000 1.0000 0.00 0.00 0.00
+8633 5653 5680 0 0.015600 0.082000 0.134000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8634 5653 5685 0 0.008700 0.050800 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8635 5654 5439 2 0.010800 0.276300 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+8636 5654 5700 0 0.057700 0.128100 0.016400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8637 5655 5441 1 0.005700 0.177300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8638 5655 5441 1 0.007000 0.181600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8639 5655 5441 1 0.007700 0.181800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8640 5655 5656 0 0.004300 0.015400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8641 5655 5681 0 0.009300 0.033600 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8642 5655 5719 0 0.006100 0.021700 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8643 5656 5681 0 0.005200 0.019000 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8644 5656 5684 0 0.006100 0.023200 0.148600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8645 5657 5658 2 0.026900 0.568700 0.000000 0.9992 1.0000 1.0000 0.00 0.00 0.00
+8646 5657 5711 0 0.002100 0.012600 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8647 5659 5660 2 0.027400 0.568700 0.000000 1.0020 1.0000 1.0000 0.00 0.00 0.00
+8648 5659 5681 0 0.006400 0.037400 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8649 5659 5711 0 0.002200 0.012700 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8650 5661 5719 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8651 5661 5732 0 0.002800 0.011600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8652 5662 5719 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8653 5663 5442 1 0.014700 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8654 5663 5664 1 0.015000 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8655 5663 5686 0 0.027910 0.098660 0.013600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8656 5665 5443 2 0.004200 0.126000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+8657 5665 5443 2 0.004300 0.127000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+8658 5665 5705 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8659 5665 5705 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8660 5665 5710 0 0.004600 0.026500 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8661 5666 5331 2 0.017700 0.287300 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+8662 5666 5331 2 0.015700 0.282700 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+8663 5666 5706 0 0.011900 0.058800 0.049000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8664 5666 5723 0 0.005300 0.025100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8665 5667 5678 0 0.001200 0.011500 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8666 5668 5695 0 0.001700 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8667 5669 5671 0 0.011400 0.485300 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8668 5669 5717 0 0.002500 0.016100 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8669 5670 5671 0 0.011300 0.489400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8670 5670 5717 0 0.002500 0.016400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8671 5672 5449 2 0.007200 0.178900 0.000000 1.0047 1.0000 1.0000 0.00 0.00 0.00
+8672 5672 5710 0 0.006000 0.033100 0.083400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8673 5674 5730 0 0.001600 0.019900 0.346600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8674 5674 5944 0 0.001030 0.012210 0.218400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8675 5675 5737 0 0.002200 0.026960 0.467400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8676 5675 5946 0 0.001500 0.017500 0.312400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8677 5676 5724 0 0.001100 0.007000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8678 5677 5678 1 0.000500 0.025400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8679 5677 5727 0 0.000600 0.005900 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8680 5678 5460 1 0.006000 0.182200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8681 5678 5460 1 0.006900 0.184400 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8682 5678 5460 1 0.006100 0.181300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8683 5678 5460 1 0.011400 0.261700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8684 5678 5694 0 0.002100 0.014400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8685 5678 5715 0 0.004600 0.046200 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8686 5678 5739 0 0.010040 0.039610 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8687 5679 5467 1 0.006000 0.175100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8688 5679 5467 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8689 5679 5467 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8690 5679 5698 0 0.010200 0.037100 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8691 5679 5731 0 0.001500 0.007100 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8692 5679 5731 0 0.001000 0.006700 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8693 5680 5713 0 0.017700 0.064200 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8694 5681 5473 1 0.003600 0.132700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8695 5681 5473 1 0.003500 0.130800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8696 5681 5473 1 0.004000 0.139200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8697 5681 5682 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8698 5681 5682 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8699 5681 5683 1 0.013100 0.241100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8700 5681 5691 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8701 5684 5475 1 0.006000 0.188200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8702 5684 5475 1 0.006200 0.183100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8703 5684 5475 1 0.005700 0.192700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8704 5684 5475 1 0.006000 0.173600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8705 5684 5702 0 0.007600 0.028000 0.093800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8706 5684 5738 0 0.018000 0.085900 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8707 5685 5495 2 0.007600 0.165800 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+8708 5685 5495 2 0.007200 0.169300 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+8709 5686 5687 0 0.002810 0.018580 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8710 5686 5713 0 0.006460 0.018530 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8711 5687 5499 2 0.006200 0.177800 0.000000 0.9002 1.0000 1.0000 0.00 0.00 0.00
+8712 5688 5502 2 0.007000 0.174700 0.000000 0.9707 1.0000 1.0000 0.00 0.00 0.00
+8713 5688 5738 0 0.017800 0.118400 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8714 5689 5690 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8715 5689 5690 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8716 5689 5704 0 0.001920 0.021280 0.364800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8717 5689 5709 0 0.001400 0.017300 0.291200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8718 5689 5737 0 0.000990 0.012120 0.211400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8719 5689 5862 0 0.001750 0.020310 0.382000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8720 5690 5724 0 0.003800 0.014500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8721 5690 5724 0 0.002000 0.019400 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8722 5691 5514 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8723 5691 5514 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8724 5691 5514 1 0.006000 0.168900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8725 5691 5705 0 0.036400 0.214000 0.216000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8726 5691 5710 0 0.004600 0.028200 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8727 5692 5516 2 0.006800 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+8728 5692 5706 0 0.000500 0.004800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8729 5693 5694 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8730 5693 5695 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8731 5693 5696 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8732 5694 5697 0 0.005700 0.040700 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8733 5694 5728 0 0.001700 0.056100 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8734 5695 5725 0 0.004100 0.023700 0.120800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8735 5695 5725 0 0.005300 0.029800 0.076400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8736 5696 5726 0 0.005400 0.030000 0.075800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8737 5697 5521 1 0.006500 0.223300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8738 5697 5521 1 0.006200 0.237800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8739 5697 5521 1 0.006300 0.240000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8740 5697 5717 0 0.003700 0.028800 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8741 5698 5525 2 0.004500 0.127200 0.000000 0.9930 1.0000 1.0000 0.00 0.00 0.00
+8742 5698 5718 0 0.020400 0.074500 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8743 5699 5527 2 0.013200 0.277700 0.000000 1.0287 1.0000 1.0000 0.00 0.00 0.00
+8744 5699 5720 0 0.037700 0.083700 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8745 5700 5530 2 0.010200 0.264700 0.000000 1.0958 1.0000 1.0000 0.00 0.00 0.00
+8746 5702 5539 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+8747 5702 5539 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+8748 5702 5712 0 0.010500 0.038600 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8749 5703 5541 2 0.007200 0.177800 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+8750 5703 5541 2 0.007200 0.180000 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+8751 5704 5709 0 0.001700 0.020300 0.458200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8752 5704 5862 0 0.003400 0.039700 0.722600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8753 5704 5914 0 0.000100 0.001800 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8754 5705 5706 0 0.000900 0.099600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8755 5705 5706 0 0.000900 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8756 5706 5708 0 0.012400 0.070100 0.050200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8757 5706 5710 0 0.029650 0.210540 0.032200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8758 5707 5704 1 0.000500 0.027800 0.000000 1.0750 1.0000 1.0000 0.00 0.00 0.00
+8759 5708 5711 0 0.004500 0.022600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8760 5709 5710 1 0.000500 0.021670 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8761 5710 5544 2 0.005600 0.177800 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+8762 5710 5544 2 0.006000 0.179300 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+8763 5710 5544 2 0.007700 0.186700 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+8764 5710 5721 0 0.022000 0.129000 0.020000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8765 5711 5545 2 0.007700 0.178700 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+8766 5711 5545 2 0.006200 0.173300 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+8767 5711 5545 2 0.007800 0.185100 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+8768 5712 5548 2 0.008300 0.180700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8769 5712 5548 2 0.007700 0.179100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8770 5712 5738 0 0.002300 0.029400 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8771 5713 5549 1 0.010500 0.278000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8772 5713 5549 1 0.010500 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8773 5713 5549 1 0.010800 0.272700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8774 5713 5731 0 0.015000 0.055300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8775 5713 5733 0 0.006400 0.022300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8776 5713 5734 0 0.005100 0.034600 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8777 5714 5552 2 0.027000 0.600000 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+8778 5715 5553 2 0.027000 0.600000 0.000000 0.9693 1.0000 1.0000 0.00 0.00 0.00
+8779 5717 5701 2 0.006200 0.182200 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+8780 5717 5701 2 0.006100 0.174700 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+8781 5717 5718 0 0.001100 0.093700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8782 5717 5718 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8783 5717 5739 0 0.003700 0.013900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8784 5718 5741 0 0.003300 0.011800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8785 5719 5559 2 0.007600 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+8786 5719 5559 2 0.007800 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+8787 5719 5559 2 0.007600 0.186700 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+8788 5720 5560 2 0.010300 0.266000 0.000000 1.0328 1.0000 1.0000 0.00 0.00 0.00
+8789 5721 5568 2 0.006300 0.180700 0.000000 0.9847 1.0000 1.0000 0.00 0.00 0.00
+8790 5722 5723 0 0.001900 0.012500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8791 5723 5570 2 0.005800 0.179100 0.000000 1.0793 1.0000 1.0000 0.00 0.00 0.00
+8792 5724 5573 1 0.005600 0.173800 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8793 5724 5573 1 0.005800 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8794 5724 5573 1 0.007100 0.178400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+8795 5725 5575 1 0.011100 0.202200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8796 5725 5575 1 0.011300 0.206700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8797 5725 5575 1 0.011600 0.211800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8798 5725 5575 1 0.011400 0.208700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8799 5725 5575 1 0.009900 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8800 5725 5575 1 0.009800 0.177800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+8801 5725 5726 0 0.000900 0.117000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8802 5727 5728 1 0.000500 0.025000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8803 5728 5729 1 0.004700 0.119200 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+8804 5728 5729 1 0.004800 0.115100 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+8805 5730 5731 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8806 5730 5731 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8807 5730 5867 0 0.002400 0.032200 0.920800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8808 5731 5734 0 0.002600 0.017500 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8809 5733 5735 0 0.009500 0.021300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8810 5734 5735 0 0.007700 0.029200 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8811 5735 5736 2 0.027000 0.560500 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+8812 5735 5736 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+8813 5735 5736 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+8814 5737 5738 0 0.000500 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8815 5739 5740 2 0.027700 0.593300 0.000000 0.9640 1.0000 1.0000 0.00 0.00 0.00
+8816 5741 5742 0 0.001400 0.008600 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8817 5742 5743 2 0.027600 0.602700 0.000000 0.9690 1.0000 1.0000 0.00 0.00 0.00
+8818 5744 5593 2 0.007000 0.171100 0.000000 0.9240 1.0000 1.0000 0.00 0.00 0.00
+8819 5745 5798 0 0.031900 0.075300 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8820 5745 5858 0 0.009200 0.021600 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8821 5746 5821 0 0.027800 0.045500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8822 5746 5829 0 0.057300 0.093900 0.019200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8823 5747 5780 0 0.028500 0.069900 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8824 5747 5796 0 0.022900 0.068400 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8825 5748 5762 0 0.007000 0.021300 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8826 5748 5782 0 0.025500 0.074100 0.019400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8827 5749 5851 0 0.068000 0.116000 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8828 5749 5869 0 0.060200 0.098800 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8829 5750 5829 0 0.091500 0.217600 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8830 5750 5849 0 0.032400 0.076400 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8831 5750 5855 0 0.030800 0.085400 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8832 5751 5857 0 0.027900 0.080400 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8833 5751 5880 0 0.053300 0.153400 0.040200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8834 5752 5753 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8835 5752 5814 0 0.002500 0.035400 0.458800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8836 5752 5840 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8837 5752 5840 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8838 5752 5860 0 0.001800 0.028300 0.321800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8839 5752 5867 0 0.002400 0.036600 0.836000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8840 5753 5804 0 0.001600 0.010400 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8841 5753 5819 0 0.010000 0.064800 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8842 5753 5832 0 0.010500 0.058800 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8843 5753 5848 0 0.004100 0.036500 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8844 5753 5853 0 0.015500 0.102000 0.027600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8845 5753 5871 0 0.014000 0.133500 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8846 5755 5830 0 0.005700 0.029800 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8847 5755 5876 0 0.001300 0.005300 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8848 5756 5806 0 0.047900 0.112800 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8849 5756 5874 0 0.035800 0.084300 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8850 5757 5832 0 0.029100 0.088000 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8851 5757 5856 0 0.051300 0.155300 0.037000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8852 5758 5766 0 0.016000 0.046000 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8853 5758 5775 0 0.014700 0.042400 0.011000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8854 5759 5871 0 0.051400 0.120200 0.030600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8855 5760 5771 0 0.015800 0.117300 0.034400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8856 5760 5804 0 0.019100 0.124100 0.034600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8857 5760 5854 0 0.009300 0.060200 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8858 5760 5861 0 0.008800 0.036900 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8859 5760 5878 0 0.004500 0.013300 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8860 5761 5772 0 0.017000 0.052100 0.048000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8861 5761 5831 0 0.023200 0.152200 0.041200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8862 5761 5852 0 0.016300 0.089000 0.023400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8863 5761 5881 0 0.023500 0.127200 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8864 5762 5865 0 0.039300 0.140900 0.035400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8865 5763 5778 0 0.051700 0.117300 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8866 5763 5841 0 0.003900 0.025600 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8867 5764 5842 0 0.013100 0.037800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8868 5765 5778 0 0.029000 0.086300 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8869 5765 5820 0 0.027100 0.078000 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8870 5765 5824 0 0.041300 0.119000 0.032000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8871 5766 5771 0 0.004300 0.046300 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8872 5766 5853 0 0.015700 0.103400 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8873 5767 5810 0 0.078700 0.154600 0.032600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8874 5767 5839 0 0.003500 0.013600 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8875 5767 5844 0 0.027100 0.146100 0.038400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8876 5767 5845 0 0.026400 0.079700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8877 5767 5872 0 0.044500 0.097200 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8878 5767 5875 0 0.017600 0.073100 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8879 5768 5807 0 0.046400 0.109700 0.027000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8880 5768 5858 0 0.057000 0.135400 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8881 5768 5879 0 0.048100 0.138700 0.036200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8882 5769 5785 0 0.004000 0.017400 0.004600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8883 5769 5797 0 0.002400 0.008100 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8884 5770 5786 0 0.000900 0.009400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8885 5770 5789 0 0.016900 0.033000 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8886 5770 5800 0 0.008200 0.018900 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8887 5770 5859 0 0.034900 0.100400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8888 5770 5865 0 0.006200 0.018800 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8889 5771 5796 0 0.010300 0.112200 0.034000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8890 5771 5854 0 0.019000 0.169300 0.049800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8891 5771 5861 0 0.007500 0.081300 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8892 5772 5839 0 0.008900 0.027800 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8893 5773 5825 0 0.028100 0.047400 0.009200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8894 5773 5866 0 0.083800 0.136700 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8895 5774 5785 0 0.064400 0.115200 0.024400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8896 5774 5801 0 0.007000 0.031300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8897 5774 5813 0 0.009800 0.098400 0.029800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8898 5774 5817 0 0.017100 0.071200 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8899 5774 5823 0 0.001600 0.016900 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8900 5774 5823 0 0.001500 0.015900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8901 5775 5776 0 0.027800 0.071900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8902 5776 5787 0 0.013000 0.084700 0.023000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8903 5776 5793 0 0.061700 0.114600 0.025400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8904 5776 5796 0 0.022000 0.143900 0.039000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8905 5776 5833 0 0.014300 0.051800 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8906 5776 5833 0 0.018900 0.049500 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8907 5776 5861 0 0.034600 0.146200 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8908 5776 5878 0 0.025000 0.168200 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8909 5776 5880 0 0.021500 0.065600 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8910 5777 5832 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8911 5777 5832 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8912 5778 5784 0 0.031700 0.139300 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8913 5778 5808 0 0.025100 0.159800 0.043600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8914 5778 5817 0 0.015300 0.063600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8915 5778 5838 0 0.001200 0.005100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8916 5779 5811 0 0.119000 0.269900 0.064400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8917 5779 5813 0 0.012400 0.065700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8918 5780 5793 0 0.027500 0.040100 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8919 5780 5803 0 0.009400 0.023100 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8920 5780 5825 0 0.072100 0.134100 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8921 5781 5815 0 0.006800 0.020700 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8922 5781 5836 0 0.011900 0.036000 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8923 5782 5792 0 0.023500 0.067700 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8924 5783 5805 0 0.002200 0.023700 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8925 5783 5863 0 0.003400 0.037100 0.011200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8926 5784 5812 0 0.049000 0.085100 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8927 5784 5815 0 0.050300 0.151200 0.036400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8928 5784 5872 0 0.011800 0.035100 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8929 5785 5841 0 0.006400 0.041400 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8930 5785 5863 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8931 5785 5863 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8932 5785 5876 0 0.041600 0.169100 0.045000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8933 5787 5809 0 0.001800 0.005400 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8934 5789 5874 0 0.026100 0.061600 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8935 5790 5871 0 0.004900 0.009800 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8936 5791 5798 0 0.036300 0.104500 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8937 5791 5842 0 0.008600 0.024800 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8938 5792 5835 0 0.008400 0.024300 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8939 5794 5802 0 0.008200 0.025000 0.006000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8940 5794 5805 0 0.004600 0.015500 0.003800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8941 5795 5845 0 0.002100 0.010400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8942 5795 5871 0 0.029500 0.093600 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8943 5796 5835 0 0.037300 0.122400 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8944 5796 5878 0 0.009000 0.029900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8945 5797 5805 0 0.015500 0.049500 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8946 5797 5813 0 0.038200 0.142300 0.085200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8947 5798 5818 0 0.037400 0.087200 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8948 5798 5850 0 0.038100 0.089800 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8949 5799 5640 2 0.001400 0.038000 0.000000 1.0675 1.0000 1.0000 0.00 0.00 0.00
+8950 5799 5815 0 0.007460 0.044800 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8951 5800 5851 0 0.010300 0.038500 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8952 5801 5834 0 0.000500 0.003200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8953 5802 5836 0 0.007100 0.021500 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8954 5805 5788 1 0.000800 0.015500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8955 5805 5863 0 0.006500 0.061100 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8956 5805 5882 0 0.026200 0.109100 0.029200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8957 5806 5829 0 0.053500 0.124600 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8958 5807 5866 0 0.023400 0.045700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8959 5808 5876 0 0.019800 0.083100 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8960 5809 5880 0 0.005600 0.016900 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8961 5810 5871 0 0.016200 0.031800 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8962 5811 5855 0 0.043500 0.125300 0.032800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8963 5812 5871 0 0.067100 0.114700 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8964 5813 5851 0 0.007000 0.055000 0.019800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8965 5813 5868 0 0.005300 0.057300 0.017200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8966 5814 5822 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8967 5814 5822 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8968 5814 5860 0 0.000600 0.007100 0.137000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8969 5814 5862 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8970 5814 5862 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8971 5816 5851 0 0.006700 0.022600 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8972 5816 5865 0 0.011200 0.071500 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8973 5818 5829 0 0.034000 0.079100 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8974 5819 5828 0 0.005200 0.033800 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8975 5821 5869 0 0.081500 0.129600 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8976 5822 5860 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8977 5822 5860 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8978 5824 5835 0 0.017700 0.050900 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8979 5824 5854 0 0.015100 0.098900 0.026800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8980 5826 5827 0 0.000200 0.000500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8981 5826 5858 0 0.020500 0.062000 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8982 5828 5870 0 0.002000 0.013000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8983 5830 5851 0 0.005700 0.035600 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8984 5832 5848 0 0.004200 0.045100 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8985 5832 5870 0 0.011600 0.036300 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8986 5832 5871 0 0.032200 0.069100 0.047400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8987 5832 5871 0 0.023000 0.094500 0.024600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8988 5834 5851 0 0.003900 0.017400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8989 5837 5846 0 0.001400 0.004000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8990 5837 5869 0 0.035000 0.099900 0.026000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8991 5840 5947 0 0.000500 0.006300 0.095800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8992 5840 5955 0 0.003600 0.048000 0.582000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8993 5843 5847 0 0.064100 0.184800 0.048200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8994 5843 5849 0 0.042600 0.100400 0.025000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8995 5844 5881 0 0.021400 0.115700 0.030400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8996 5847 5850 0 0.030200 0.071200 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8997 5851 5877 0 0.015300 0.063700 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8998 5852 5881 0 0.008500 0.046400 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+8999 5856 5878 0 0.006600 0.019300 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9000 5857 5866 0 0.033300 0.081600 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9001 5860 5861 1 0.000400 0.019000 0.000000 0.9850 1.0000 1.0000 0.00 0.00 0.00
+9002 5861 5878 0 0.002300 0.024800 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9003 5862 5863 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9004 5862 5864 0 0.002400 0.036600 0.416000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9005 5863 5868 0 0.007890 0.086120 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9006 5863 5877 0 0.023000 0.151200 0.041000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9007 5864 5865 1 0.000400 0.185000 0.000000 1.0110 1.0000 1.0000 0.00 0.00 0.00
+9008 5865 5873 0 0.003100 0.033500 0.010200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9009 5866 5879 0 0.050500 0.124000 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9010 5873 5877 0 0.026900 0.114000 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9011 5877 5882 0 0.028700 0.116900 0.031000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9012 5881 5754 1 0.001700 0.033700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9013 5883 5886 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9014 5883 5886 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9015 5883 5886 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9016 5883 5924 0 0.010550 0.076000 0.115000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9017 5884 5891 0 0.000600 0.006200 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9018 5884 5904 0 0.000490 0.004820 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9019 5885 5906 0 0.021800 0.151100 0.223800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9020 5885 5936 0 0.012700 0.090900 0.135400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9021 5886 5887 1 0.000700 0.021100 0.000000 1.0610 1.0000 1.0000 0.00 0.00 0.00
+9022 5886 5904 0 0.003390 0.033600 0.219800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9023 5886 5928 0 0.003800 0.037800 0.246200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9024 5886 5930 1 0.000600 0.015100 0.000000 1.0720 1.0000 1.0000 0.00 0.00 0.00
+9025 5887 5958 0 0.001000 0.007000 0.014000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9026 5888 5900 0 0.001780 0.012020 0.076600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9027 5889 5890 0 0.000300 0.013550 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9028 5889 5892 0 0.007700 0.053800 0.335000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9029 5889 5897 0 0.005900 0.040500 0.250800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9030 5889 5915 0 0.005500 0.054100 0.363600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9031 5889 5924 0 0.010800 0.100190 0.170400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9032 5889 5924 0 0.015000 0.105500 0.158000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9033 5889 5924 0 0.010500 0.100000 0.170000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9034 5889 5943 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9035 5889 5943 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9036 5890 5938 0 0.005800 0.028100 0.017000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9037 5890 5942 0 0.096500 0.366900 0.054000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9038 5891 5924 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9039 5891 5924 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9040 5891 5928 0 0.001040 0.009300 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9041 5891 5935 0 0.001700 0.011700 0.289600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9042 5892 5915 0 0.002900 0.028500 0.192000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9043 5892 5939 0 0.005400 0.036900 0.228600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9044 5893 5894 0 0.043000 0.303100 0.463000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9045 5893 5898 0 0.029100 0.226700 0.342800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9046 5893 5906 0 0.008500 0.058800 0.087000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9047 5893 5931 0 0.007300 0.050400 0.074000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9048 5894 5898 0 0.012000 0.083600 0.123600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9049 5894 5906 0 0.046800 0.336900 0.519800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9050 5894 5907 0 0.029400 0.230400 0.349400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9051 5894 5907 0 0.037600 0.263000 0.396000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9052 5894 5919 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9053 5894 5919 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9054 5894 5923 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9055 5894 5931 0 0.048900 0.349200 0.538000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9056 5894 5935 0 0.002000 0.015300 0.214000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9057 5894 5935 0 0.005700 0.045000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9058 5894 5935 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9059 5894 5935 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9060 5895 5902 0 0.001620 0.009700 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9061 5895 5910 0 0.001530 0.009400 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9062 5896 5908 0 0.013700 0.095700 0.141000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9063 5896 5925 0 0.011200 0.077200 0.482400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9064 5896 5925 0 0.011200 0.079000 0.471400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9065 5897 5924 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9066 5897 5924 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9067 5897 5929 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9068 5897 5929 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9069 5899 5905 0 0.002480 0.024470 0.164800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9070 5900 5907 0 0.003580 0.035200 0.239000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9071 5900 5936 0 0.004500 0.044250 0.301000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9072 5901 5922 0 0.017300 0.198800 0.700000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9073 5901 5925 0 0.009100 0.062300 0.385600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9074 5901 5929 0 0.008500 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9075 5901 5929 0 0.008600 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9076 5902 5918 0 0.002100 0.008300 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9077 5903 5912 0 0.004440 0.051440 3.597000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9078 5903 5922 1 0.000740 0.020400 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+9079 5903 5934 0 0.002440 0.032620 2.236000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9080 5904 5924 0 0.001020 0.010050 0.066400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9081 5905 5929 0 0.003920 0.038140 0.258000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9082 5906 5907 0 0.012300 0.125500 0.194000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9083 5906 5923 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9084 5906 5936 0 0.007500 0.077300 0.119000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9085 5907 5936 0 0.023900 0.170800 0.255600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9086 5908 5927 0 0.014500 0.058010 0.094000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9087 5908 5927 0 0.007700 0.056910 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9088 5909 5727 1 0.000400 0.002500 0.000000 1.0450 1.0000 1.0000 0.00 0.00 0.00
+9089 5909 5910 1 0.001200 0.039600 0.000000 1.0250 1.0000 1.0000 0.00 0.00 0.00
+9090 5909 5940 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9091 5911 5918 0 0.062700 0.250000 0.067200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9092 5911 5918 0 0.102000 0.236000 0.060600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9093 5911 5938 0 0.085500 0.342000 0.091400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9094 5911 5942 0 0.080800 0.234400 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9095 5912 5913 1 0.000250 0.015400 0.000000 0.8800 1.0000 1.0000 0.00 0.00 0.00
+9096 5913 5935 0 0.000420 0.006700 0.110800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9097 5914 5915 1 0.000200 0.024200 0.000000 0.9300 1.0000 1.0000 0.00 0.00 0.00
+9098 5915 5916 0 0.000000 0.009400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9099 5915 5941 0 0.000500 0.006500 0.103800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9100 5917 5918 0 0.000400 0.017200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9101 5917 5939 0 0.000770 0.006480 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9102 5920 5957 0 0.001000 0.007000 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9103 5921 5935 0 0.000300 0.001700 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9104 5922 5927 0 0.029050 0.112070 0.195000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9105 5922 5927 0 0.014850 0.114140 0.193000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9106 5924 5926 0 0.000680 0.006680 0.399000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9107 5924 5928 0 0.001050 0.008370 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9108 5925 5935 0 0.025400 0.177700 0.270400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9109 5925 5935 0 0.024400 0.176700 0.271600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9110 5930 5956 0 0.001000 0.007000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9111 5932 5933 0 0.000170 0.012340 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9112 5932 5934 0 0.001840 0.024450 1.662000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9113 5936 5920 1 0.000000 0.083300 0.000000 1.0300 1.0000 1.0000 0.00 0.00 0.00
+9114 5936 5937 1 0.000500 0.018200 0.000000 1.1030 1.0000 1.0000 0.00 0.00 0.00
+9115 5939 5940 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9116 5941 5942 1 0.000330 0.013000 0.000000 1.0500 1.0000 1.0000 0.00 0.00 0.00
+9117 5941 5943 0 0.009220 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9118 5941 5943 0 0.009200 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9119 5944 5945 0 0.000000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9120 5944 5951 0 0.001700 0.021000 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9121 5946 5951 0 0.001000 0.012300 0.150000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9122 5947 5948 0 0.000800 0.009800 0.120000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9123 5948 5952 0 0.001000 0.012000 0.160000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9124 5948 5953 0 0.004200 0.063000 0.200000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9125 5948 5955 0 0.003100 0.027000 0.050000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9126 5948 5955 0 0.001140 0.018000 0.270000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9127 5949 5950 0 0.100000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9128 5949 5952 0 0.000300 0.003800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9129 5949 5952 0 0.003000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9130 5949 5954 0 0.030000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9131 5949 5955 0 0.000400 0.005000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9132 5949 5956 0 0.014000 1.139997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9133 5949 5958 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9134 5950 5951 0 0.001800 0.023000 0.284000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9135 5950 5951 0 0.010000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9136 5950 5952 0 0.030000 0.999999 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9137 5950 5953 0 0.006000 0.068000 0.740000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9138 5950 5954 0 0.050000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9139 5951 5954 0 0.020000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9140 5951 5956 0 -0.200000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9141 5951 5957 0 -0.400000 2.500001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9142 5951 5958 0 0.083000 0.600000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9143 5952 5954 0 0.004200 0.050000 0.080000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9144 5952 5954 0 0.060000 0.700001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9145 5952 5956 0 0.030000 1.009997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9146 5952 5957 0 0.070000 1.830000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9147 5953 5954 0 0.001300 0.029000 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9148 5953 5955 0 0.002200 0.046410 0.400000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9149 5954 5955 0 0.004000 0.044000 0.500000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9150 5954 5958 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9151 5956 5957 0 -0.040450 0.278890 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9152 5956 5958 0 -0.000010 0.002750 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9153 5957 5958 0 -0.178800 0.710991 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9154 5959 6180 0 0.270000 0.349000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9155 5959 6244 0 0.035000 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9156 5960 5967 0 0.292000 0.386000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9157 5960 6186 0 0.002000 0.010000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9158 5961 6053 0 0.025400 0.031800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9159 5961 6124 0 0.027100 0.033900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9160 5962 6084 0 0.288800 0.361900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9161 5962 6217 0 0.233400 0.291900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9162 5963 6041 0 0.124600 0.156000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9163 5963 6186 0 0.333900 0.417900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9164 5964 6067 0 0.163200 0.189500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9165 5964 6171 0 0.092700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9166 5965 6003 0 0.197500 0.229300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9167 5965 6023 0 0.280100 0.333200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9168 5966 5996 0 0.018600 0.024300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9169 5966 6075 0 0.065900 0.164200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9170 5966 6077 0 0.018300 0.044700 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9171 5966 6157 0 0.030700 0.082400 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9172 5966 6169 0 0.020200 0.059200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9173 5966 6225 0 0.019000 0.023800 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9174 5967 6180 0 0.262000 0.339000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9175 5968 6007 0 0.201500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9176 5968 6064 0 0.040300 0.046800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9177 5968 6174 0 0.156000 0.525000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9178 5969 6080 0 0.301300 0.479100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9179 5969 6082 0 0.178000 0.222700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9180 5970 5983 0 0.125100 0.169700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9181 5970 6038 0 0.057600 0.072100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9182 5971 6048 0 0.265000 0.343000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9183 5971 6252 0 0.245000 0.317000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9184 5972 6038 0 0.064400 0.080600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9185 5972 6203 0 0.036600 0.079900 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9186 5973 5982 0 0.296200 0.369500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9187 5973 6044 0 0.506000 0.504700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9188 5973 6095 0 0.374700 0.469600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9189 5973 6123 0 0.828700 0.846900 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9190 5974 6015 0 0.136000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9191 5974 6235 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9192 5975 6181 0 0.294200 0.368600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9193 5975 6189 0 0.338500 0.420000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9194 5976 6209 0 0.137110 0.799561 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9195 5976 6247 0 0.016800 0.050100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9196 5977 6159 0 0.233700 0.271400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9197 5977 6194 0 0.338500 0.423800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9198 5978 6080 0 0.057400 0.142400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9199 5978 6099 0 0.018900 0.044800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9200 5979 6033 0 0.054000 0.136000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9201 5979 6231 0 0.100000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9202 5980 5985 0 0.276500 0.336500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9203 5980 6185 0 0.067800 0.086200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9204 5981 5992 0 0.503600 0.627200 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9205 5981 6047 0 0.200000 0.250100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9206 5982 6145 0 0.407000 0.474000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9207 5983 6116 0 0.113000 0.152000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9208 5983 6151 0 0.025220 0.066400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9209 5983 6247 0 0.013750 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9210 5984 6160 0 0.182900 0.462700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9211 5984 6208 0 0.145100 0.367300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9212 5986 5991 0 0.118600 0.153200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9213 5986 6098 0 0.173000 0.216500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9214 5987 6012 0 0.144000 0.180200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9215 5987 6196 0 0.040200 0.061200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9216 5988 6107 0 0.368700 0.428800 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9217 5988 6112 0 0.272000 0.315900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9218 5989 6054 0 0.070500 0.178400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9219 5989 6055 0 0.112900 0.165500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9220 5990 6115 0 0.129000 0.161600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9221 5990 6229 0 0.284100 0.356000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9222 5991 6186 0 0.155900 0.195200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9223 5992 6006 0 0.088000 0.161000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9224 5992 6094 0 0.200000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9225 5992 6124 0 0.048400 0.060200 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9226 5992 6125 0 0.037000 0.062000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9227 5992 6154 0 0.308000 0.437000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9228 5994 6223 0 0.160700 0.214200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9229 5994 6239 0 0.061000 0.076300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9230 5995 6026 0 0.048000 0.061000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9231 5995 6235 0 0.099000 0.125000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9232 5996 6063 0 0.019600 0.025800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9233 5997 6062 0 0.030500 0.038200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9234 5997 6225 0 0.040700 0.050700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9235 5998 6082 0 0.247500 0.309500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9236 5998 6251 0 0.214700 0.268600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9237 5999 6056 0 0.056500 0.104100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9238 5999 6172 0 0.235800 0.291700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9239 6000 6222 0 0.011000 0.028000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9240 6001 6222 0 0.147100 0.184300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9241 6001 6245 0 0.394300 0.419400 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9242 6002 6025 0 0.213000 0.266000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9243 6002 6033 0 0.290200 0.413400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9244 6002 6104 0 0.272600 0.361100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9245 6002 6146 0 0.066500 0.082300 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9246 6003 6168 0 0.278100 0.322900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9247 6003 6192 0 0.326400 0.404600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9248 6004 6039 0 0.152900 0.270300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9249 6004 6235 0 0.066800 0.157200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9250 6005 6140 0 0.359000 0.417000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9251 6005 6159 0 0.296000 0.371000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9252 6006 6244 0 0.080000 0.200000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9253 6007 6170 0 0.225400 0.261800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9254 6008 6129 0 0.083000 0.114000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9255 6008 6143 0 0.096000 0.198000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9256 6009 6126 0 0.157200 0.196900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9257 6009 6230 0 0.091800 0.232400 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9258 6010 6195 0 0.051900 0.088000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9259 6010 6230 0 0.076300 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9260 6012 6066 0 0.146900 0.172200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9261 6013 6164 0 0.065600 0.166000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9262 6013 6248 0 0.248300 0.374800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9263 6014 6090 0 0.282100 0.327600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9264 6014 6107 0 0.229700 0.266900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9265 6014 6109 0 0.357200 0.416900 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9266 6014 6134 0 0.243000 0.326000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9267 6015 6150 0 0.221100 0.258500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9268 6016 6083 0 0.172900 0.272900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9269 6016 6190 0 0.211600 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9270 6016 6196 0 0.248400 0.378300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9271 6016 6242 0 0.264600 0.366300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9272 6017 6066 0 0.336000 0.549100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9273 6017 6240 0 0.144600 0.192400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9274 6018 6235 0 0.016400 0.037000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9275 6019 6104 0 0.260000 0.250000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9276 6019 6182 0 0.074000 0.122000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9277 6020 6110 0 0.474401 0.484100 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9278 6020 6148 0 0.224500 0.216100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9279 6021 6071 0 0.091000 0.184000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9280 6021 6142 0 0.079000 0.193000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9281 6023 6101 0 0.308300 0.386300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9282 6024 6161 0 0.036000 0.172000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9283 6024 6211 0 0.023000 0.075000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9284 6025 6254 0 0.038900 0.050800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9285 6026 6239 0 0.096600 0.130800 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9286 6027 5985 1 0.139500 0.467100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9287 6027 6172 0 0.233000 0.559600 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9288 6027 6220 0 0.079000 0.102000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9289 6028 6033 0 0.060000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9290 6028 6156 0 0.027000 0.042000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9291 6029 6033 0 0.045400 0.111400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9292 6029 6155 0 0.057200 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9293 6030 6075 0 0.067800 0.088900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9294 6030 6100 0 0.013400 0.033600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9295 6031 6087 0 0.021000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9296 6031 6100 0 0.027000 0.068000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9297 6032 6058 0 0.050000 0.086000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9298 6032 6071 0 0.076300 0.192800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9299 6032 6091 0 0.099000 0.128000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9300 6032 6175 0 0.024000 0.061000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9301 6033 6199 0 0.130000 0.324000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9302 6034 6192 0 0.436300 0.497300 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9303 6034 6213 0 0.397000 0.468200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9304 6035 6076 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9305 6036 6100 0 0.143200 0.182300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9306 6036 6102 0 0.155200 0.194400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9307 6037 6173 0 0.115800 0.145000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9308 6037 6252 0 0.192500 0.241300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9309 6039 6184 0 0.019000 0.068200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9310 6040 6175 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9311 6040 6210 0 0.057000 0.141000 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9312 6041 6082 0 0.181400 0.226800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9313 6042 6076 0 0.056300 0.073000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9314 6042 6153 0 0.016700 0.029100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9315 6043 6097 0 0.118000 0.152000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9316 6043 6154 0 0.129000 0.167000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9317 6044 6159 0 0.229700 0.287800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9318 6046 6119 0 0.070500 0.081900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9319 6046 6155 0 0.060400 0.075700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9320 6047 6251 0 0.110100 0.137800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9321 6048 6094 0 0.180000 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9322 6051 6174 0 0.296000 0.282000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9323 6051 6222 0 0.339000 0.381000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9324 6052 6125 0 0.022000 0.056000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9325 6052 6205 0 0.163000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9326 6053 6204 0 0.176300 0.224000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9327 6054 6185 0 0.092400 0.115700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9328 6055 6246 0 0.065600 0.085500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9329 6056 6128 0 0.133400 0.250800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9330 6056 6246 0 0.066400 0.168100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9331 6057 6168 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9332 6059 6179 0 0.137000 0.159100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9333 6059 6191 0 0.259300 0.324500 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9334 6060 6187 0 0.058000 0.150000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9335 6060 6231 0 0.052000 0.064000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9336 6062 6211 0 0.117100 0.174000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9337 6063 6249 0 0.031100 0.070800 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9338 6064 6149 0 0.199000 0.239000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9339 6065 6093 0 0.005900 0.016700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9340 6065 6151 0 0.020500 0.054900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9341 6065 6209 0 0.012200 0.038400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9342 6066 6079 0 0.069400 0.086800 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9343 6066 6160 0 0.271300 0.426200 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9344 6067 6229 0 0.216400 0.248300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9345 6068 6120 0 0.085000 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9346 6068 6147 0 0.187000 0.242000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9347 6069 6177 0 0.322400 0.404000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9348 6069 6222 0 0.094200 0.146700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9349 6070 6160 0 0.221600 0.277700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9350 6070 6242 0 0.150900 0.188700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9351 6071 6223 0 0.178900 0.233000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9352 6071 6233 0 0.077700 0.107600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9353 6072 6129 0 0.155500 0.301300 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9354 6072 6187 0 0.028100 0.064600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9355 6073 6092 0 0.141000 0.163800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9356 6073 6152 0 0.198000 0.256200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9357 6074 6087 0 0.026000 0.044000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9358 6074 6158 0 0.084000 0.103000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9359 6077 6078 0 0.021000 0.052000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9360 6077 6157 0 0.027000 0.066000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9361 6078 6100 0 0.085200 0.181500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9362 6079 6092 0 0.266700 0.308000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9363 6080 6110 0 0.181900 0.256900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9364 6080 6113 0 0.115400 0.170200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9365 6081 6182 0 0.093000 0.120000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9366 6081 6220 0 0.067000 0.168000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9367 6082 6197 0 0.254000 0.334000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9368 6083 6114 0 0.171500 0.210600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9369 6084 6126 0 0.184700 0.232100 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9370 6086 6113 0 0.296400 0.386200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9371 6086 6150 0 0.032700 0.041000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9372 6088 6102 0 0.181300 0.227200 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9373 6088 6179 0 0.142600 0.178800 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9374 6089 6235 0 0.214000 0.272000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9375 6089 6239 0 0.012000 0.015000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9376 6090 6245 0 0.100700 0.117000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9377 6091 6234 0 0.068000 0.083000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9378 6093 6209 0 0.018020 0.055090 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9379 6093 6235 0 0.015680 0.073070 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9380 6095 6166 0 0.306200 0.383800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9381 6096 6100 0 0.032600 0.072500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9382 6096 6219 0 0.259200 0.331900 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9383 6097 6250 0 0.156000 0.191000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9384 6098 6150 0 0.076500 0.095800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9385 6099 6181 0 0.118900 0.149000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9386 6101 6173 0 0.195500 0.244900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9387 6101 6250 0 0.172000 0.211000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9388 6104 6146 0 0.206000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9389 6104 6182 0 0.260900 0.343300 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9390 6105 6195 0 0.266700 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9391 6106 6178 0 0.058000 0.144000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9392 6106 6204 0 0.225400 0.280500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9393 6106 6217 0 0.078100 0.097700 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9394 6106 6218 0 0.142400 0.340700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9395 6108 6182 0 0.180000 0.220000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9396 6108 6199 0 0.114000 0.284000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9397 6109 6171 0 0.094700 0.110000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9398 6112 6252 0 0.194300 0.241400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9399 6114 6152 0 0.128900 0.161500 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9400 6114 6164 0 0.140000 0.588000 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9401 6114 6233 0 0.255900 0.397000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9402 6114 6236 0 0.219900 0.255800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9403 6114 6243 0 0.179500 0.209000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9404 6115 6188 0 0.044300 0.054600 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9405 6116 6234 0 0.080000 0.098000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9406 6117 6161 0 0.133000 0.170000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9407 6117 6191 0 0.005000 0.024000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9408 6118 6151 0 0.020450 0.054930 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9409 6118 6235 0 0.024000 0.075000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9410 6119 6211 0 0.021000 0.135700 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9411 6120 6212 0 0.017000 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9412 6121 6203 0 0.077200 0.096900 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9413 6121 6238 0 0.220000 0.276200 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9414 6123 6167 0 0.359000 0.450400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9415 6123 6213 0 0.572300 0.716900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9416 6127 6131 0 0.135000 0.189900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9417 6127 6218 0 0.086900 0.219900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9418 6128 6187 0 0.058600 0.145900 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9419 6129 6144 0 0.194100 0.229600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9420 6129 6198 0 0.080000 0.198000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9421 6130 6180 0 0.200000 0.256000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9422 6130 6230 0 0.043000 0.108000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9423 6131 6230 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9424 6132 6239 0 0.053200 0.131900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9425 6133 6191 0 0.051700 0.070100 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9426 6134 6197 0 0.280500 0.377400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9427 6136 6203 0 0.058000 0.170000 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9428 6136 6207 0 0.075000 0.185000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9429 6138 6165 0 0.020000 0.026000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9430 6139 6165 0 0.043400 0.054300 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9431 6140 6166 0 0.397000 0.497000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9432 6141 6149 0 0.270000 0.329500 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9433 6141 6159 0 0.078200 0.094000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9434 6142 6216 0 0.016000 0.040000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9435 6143 6165 0 0.080000 0.141000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9436 6144 6165 0 0.065000 0.112000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9437 6145 6200 0 0.285900 0.333100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9438 6147 6150 0 0.128000 0.160000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9439 6148 6188 0 0.234500 0.225100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9440 6150 6248 0 0.363400 0.425500 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9441 6153 6165 0 0.044000 0.057000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9442 6156 6228 0 0.037000 0.088000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9443 6157 6169 0 0.009000 0.020000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9444 6157 6242 0 0.204100 0.360100 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9445 6158 6191 0 0.099000 0.248000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9446 6158 6202 0 0.029000 0.128000 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9447 6160 6219 0 0.152900 0.209100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9448 6161 6163 0 0.057900 0.108900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9449 6161 6202 0 0.012000 0.017000 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9450 6162 6164 0 0.008200 0.020500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9451 6162 6239 0 0.100700 0.126200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9452 6163 6211 0 0.106200 0.139800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9453 6164 6216 0 0.161000 0.279000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9454 6164 6241 0 0.130000 0.246600 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9455 6166 6167 0 0.662900 0.830700 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9456 6170 6245 0 0.135300 0.157100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9457 6171 6189 0 0.268000 0.335800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9458 6174 6224 0 0.016400 0.041500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9459 6177 6229 0 0.302200 0.378700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9460 6178 6227 0 0.037000 0.052000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9461 6184 6203 0 0.011200 0.037400 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9462 6186 6238 0 0.215300 0.263900 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9463 6187 6228 0 0.186000 0.241000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9464 6188 6189 0 0.298200 0.373700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9465 6191 6254 0 0.173300 0.218900 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9466 6192 6193 0 0.274000 0.318200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9467 6192 6226 0 0.222000 0.234000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9468 6193 6253 0 0.211500 0.245700 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9469 6194 6224 0 0.296000 0.363000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9470 6200 6226 0 0.249000 0.264000 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9471 6200 6245 0 0.532800 0.529500 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9472 6203 6212 0 0.063000 0.085000 0.007800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9473 6205 6227 0 0.058000 0.075000 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9474 6208 6240 0 0.318500 0.370700 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9475 6211 6249 0 0.012700 0.036100 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9476 6236 6241 0 0.229700 0.266800 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9477 6236 6243 0 0.040400 0.046900 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9478 6251 6252 0 0.351500 0.442100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9479 6252 6253 0 0.358500 0.419200 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9480 6256 5960 2 0.010800 0.276300 0.000000 1.0301 1.0000 1.0000 0.00 0.00 0.00
+9481 6256 6270 0 0.000400 0.002400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9482 6256 6271 0 0.001500 0.003400 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9483 6256 6365 0 0.008300 0.053400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9484 6257 6258 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9485 6257 6258 1 0.013800 0.300000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9486 6257 6294 0 0.002100 0.009600 0.140600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9487 6257 6297 0 0.003400 0.018130 0.138600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9488 6257 6301 0 0.000900 0.004300 0.063200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9489 6259 6329 0 0.006340 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9490 6260 6330 0 0.006350 0.003210 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9491 6261 5968 2 0.007000 0.180000 0.000000 1.0097 1.0000 1.0000 0.00 0.00 0.00
+9492 6261 6262 0 0.027000 0.103000 0.014400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9493 6261 6382 0 0.022100 0.084300 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9494 6262 5973 2 0.010900 0.272000 0.000000 1.0680 1.0000 1.0000 0.00 0.00 0.00
+9495 6262 6304 0 0.028500 0.108600 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9496 6263 5983 2 0.004200 0.127000 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+9497 6263 5983 2 0.004300 0.127300 0.000000 0.9499 1.0000 1.0000 0.00 0.00 0.00
+9498 6263 6303 0 0.013500 0.029950 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9499 6263 6324 0 0.004500 0.016100 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9500 6263 6352 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9501 6263 6352 0 0.007030 0.046770 0.008000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9502 6263 6365 0 0.011100 0.025700 0.013400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9503 6263 6378 0 0.008600 0.031400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9504 6263 6386 0 0.009100 0.033000 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9505 6263 6394 0 0.002340 0.010260 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9506 6264 6265 1 0.000300 0.010200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9507 6264 6266 1 0.000500 0.032900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9508 6264 6267 1 0.000800 0.031100 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9509 6264 6336 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9510 6264 6337 0 0.000700 0.008900 0.155000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9511 6264 6392 0 0.000900 0.011000 0.192600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9512 6264 6392 0 0.000900 0.011000 0.385200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9513 6265 6339 0 0.002000 0.019500 0.044000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9514 6266 5989 2 0.006500 0.170200 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+9515 6266 5989 2 0.006900 0.175600 0.000000 0.9724 1.0000 1.0000 0.00 0.00 0.00
+9516 6266 6377 0 0.002500 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9517 6266 6379 0 0.002890 0.009510 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9518 6266 6379 0 0.002320 0.009950 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9519 6267 6279 0 0.001400 0.013500 0.009000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9520 6267 6284 0 0.040200 0.090390 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9521 6267 6286 0 0.011290 0.039310 0.026600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9522 6267 6290 0 0.032600 0.090400 0.012400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9523 6267 6299 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9524 6267 6300 0 0.000860 0.004930 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9525 6267 6380 0 0.002370 0.011230 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9526 6268 5992 2 0.006000 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+9527 6268 5992 2 0.007200 0.180000 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+9528 6268 6270 0 0.038200 0.088000 0.045600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9529 6268 6328 0 0.006000 0.103200 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9530 6268 6368 0 0.012100 0.060000 0.018400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9531 6268 6384 0 0.001900 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9532 6269 6268 2 0.000500 0.025000 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+9533 6269 6603 0 0.000400 0.003600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9534 6272 6273 1 0.000700 0.025000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9535 6272 6371 0 0.000300 0.001800 1.273000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9536 6273 6280 0 0.001500 0.006700 0.099200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9537 6273 6301 0 0.001500 0.006600 0.098000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9538 6273 6344 0 0.001300 0.005800 0.085600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9539 6274 6338 0 0.000400 0.002600 0.000400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9540 6274 6378 0 0.001100 0.006700 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9541 6275 6335 0 0.001600 0.006700 0.114800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9542 6275 6390 0 0.001900 0.009100 0.101200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9543 6276 6011 2 0.004400 0.127500 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+9544 6276 6011 2 0.004400 0.125700 0.000000 1.0034 1.0000 1.0000 0.00 0.00 0.00
+9545 6276 6317 0 0.001600 0.008600 0.058200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9546 6276 6319 0 0.005700 0.033390 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9547 6276 6353 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9548 6276 6381 0 0.007250 0.028620 0.062800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9549 6277 6016 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9550 6277 6016 1 0.009100 0.272000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9551 6277 6282 0 0.002500 0.016000 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9552 6277 6400 0 0.004300 0.028700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9553 6279 6376 0 0.000130 0.001300 0.000600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9554 6280 6022 1 0.004200 0.140000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9555 6280 6022 1 0.004400 0.137300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9556 6280 6022 1 0.004800 0.137800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9557 6280 6335 0 0.001000 0.004600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9558 6280 6344 0 0.002400 0.011020 0.162200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9559 6280 6388 0 0.002700 0.012500 0.183400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9560 6281 6351 0 0.001600 0.019700 0.343200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9561 6281 6414 0 0.004400 0.063800 0.811600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9562 6282 6347 0 0.007300 0.042500 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9563 6282 6375 0 0.002400 0.015300 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9564 6283 6289 0 0.001800 0.018200 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9565 6283 6387 0 0.000500 0.004700 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9566 6284 6027 2 0.007700 0.186400 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+9567 6284 6027 2 0.007700 0.186600 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+9568 6284 6290 0 0.015800 0.052200 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9569 6284 6416 0 0.008680 0.046920 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9570 6285 6315 1 0.000500 0.011700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9571 6285 6537 0 0.020900 0.097700 0.038800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9572 6286 6033 2 0.007300 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9573 6286 6395 0 0.001110 0.003830 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9574 6287 6387 0 0.003300 0.007000 0.131800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9575 6288 6391 0 0.000300 0.025250 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9576 6289 6045 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+9577 6289 6045 2 0.004300 0.127000 0.000000 0.9460 1.0000 1.0000 0.00 0.00 0.00
+9578 6289 6376 0 0.001400 0.013600 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9579 6289 6393 0 0.013000 0.076450 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9580 6290 6325 0 0.031000 0.118100 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9581 6291 6049 2 0.005420 0.130500 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+9582 6291 6049 2 0.005400 0.129800 0.000000 1.0018 1.0000 1.0000 0.00 0.00 0.00
+9583 6291 6292 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9584 6291 6293 0 0.003080 0.017530 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9585 6291 6334 0 0.003130 0.013150 0.223600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9586 6292 6343 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9587 6292 6372 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9588 6293 6343 0 0.000780 0.007900 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9589 6293 6372 0 0.000930 0.009380 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9590 6294 6278 2 0.004600 0.117200 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+9591 6294 6278 2 0.004600 0.117000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+9592 6294 6278 2 0.003200 0.120000 0.000000 1.0080 1.0000 1.0000 0.00 0.00 0.00
+9593 6294 6344 0 0.003400 0.015600 0.230200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9594 6295 6050 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9595 6295 6050 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9596 6295 6050 1 0.004300 0.127000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9597 6295 6346 0 0.002320 0.058320 0.122600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9598 6295 6387 0 0.003200 0.012490 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9599 6295 6387 0 0.003150 0.027060 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9600 6295 6406 0 0.004300 0.015900 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9601 6296 6298 2 0.002000 0.120000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+9602 6296 6358 0 0.001380 0.009250 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9603 6296 6390 0 0.000910 0.006060 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9604 6297 6298 2 0.002000 0.123000 0.000000 1.0240 1.0000 1.0000 0.00 0.00 0.00
+9605 6297 6358 0 0.001370 0.009100 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9606 6301 6061 1 0.004300 0.132700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+9607 6301 6061 1 0.004500 0.133700 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+9608 6301 6061 1 0.004800 0.138300 0.000000 0.9250 1.0000 1.0000 0.00 0.00 0.00
+9609 6301 6335 0 0.000300 0.001140 0.016800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9610 6301 6390 0 0.003390 0.015460 0.227800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9611 6302 6066 2 0.007200 0.180000 0.000000 1.0581 1.0000 1.0000 0.00 0.00 0.00
+9612 6303 6071 2 0.006700 0.179100 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+9613 6303 6071 2 0.007700 0.180200 0.000000 1.0087 1.0000 1.0000 0.00 0.00 0.00
+9614 6303 6364 0 0.008100 0.031700 0.214600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9615 6303 6374 0 0.006600 0.026600 0.005800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9616 6303 6400 0 0.001500 0.015000 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9617 6304 6123 2 0.081000 0.288700 0.000000 1.0518 1.0000 1.0000 0.00 0.00 0.00
+9618 6304 6362 0 0.065600 0.250200 0.035000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9619 6305 6076 1 0.005800 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9620 6305 6076 1 0.010600 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9621 6305 6076 1 0.006000 0.184400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9622 6305 6341 0 0.002500 0.024860 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9623 6305 6403 0 0.029880 0.124600 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9624 6305 6406 0 0.001990 0.008180 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9625 6306 6080 2 0.010900 0.275000 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+9626 6306 6080 2 0.012600 0.274700 0.000000 1.0401 1.0000 1.0000 0.00 0.00 0.00
+9627 6306 6309 0 0.011400 0.040100 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9628 6306 6314 0 0.011200 0.025000 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9629 6306 6352 0 0.014620 0.053870 0.033000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9630 6306 6450 0 0.026280 0.105720 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9631 6307 6085 1 0.004200 0.133500 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9632 6307 6085 1 0.005800 0.180900 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9633 6307 6085 1 0.004100 0.134300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9634 6307 6308 0 0.002800 0.016300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9635 6307 6356 0 0.001100 0.006400 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9636 6307 6356 0 0.001100 0.006700 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9637 6308 6340 0 0.005500 0.013600 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9638 6308 6359 0 0.001740 0.017600 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9639 6309 6384 0 0.035200 0.122600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9640 6310 6333 0 0.011000 0.477800 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9641 6310 6359 0 0.001120 0.011370 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9642 6310 6379 0 0.002800 0.018200 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9643 6311 6382 2 0.002600 0.053600 0.000000 1.0641 1.0000 1.0000 0.00 0.00 0.00
+9644 6311 6530 0 0.009300 0.057300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9645 6312 6328 0 0.042200 0.103400 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9646 6313 6316 0 0.016900 0.051800 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9647 6313 6385 0 0.006900 0.046300 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9648 6314 6361 0 0.041600 0.093800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9649 6315 6100 2 0.016000 0.260000 0.000000 0.8852 1.0000 1.0000 0.00 0.00 0.00
+9650 6315 6342 0 0.015600 0.082000 0.134000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9651 6315 6347 0 0.008700 0.050800 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9652 6316 6101 2 0.010800 0.276300 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+9653 6316 6362 0 0.057700 0.128100 0.016400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9654 6317 6103 1 0.005700 0.177300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9655 6317 6103 1 0.007000 0.181600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9656 6317 6103 1 0.007700 0.181800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9657 6317 6318 0 0.004300 0.015400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9658 6317 6343 0 0.009300 0.033600 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9659 6317 6381 0 0.006100 0.021700 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9660 6318 6343 0 0.005200 0.019000 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9661 6318 6346 0 0.006100 0.023200 0.148600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9662 6319 6320 2 0.026900 0.568700 0.000000 0.9992 1.0000 1.0000 0.00 0.00 0.00
+9663 6319 6373 0 0.002100 0.012600 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9664 6321 6322 2 0.027400 0.568700 0.000000 1.0020 1.0000 1.0000 0.00 0.00 0.00
+9665 6321 6343 0 0.006400 0.037400 0.006200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9666 6321 6373 0 0.002200 0.012700 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9667 6323 6381 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9668 6323 6394 0 0.002800 0.011600 0.007400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9669 6324 6381 0 0.006400 0.023100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9670 6325 6104 1 0.014700 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9671 6325 6326 1 0.015000 0.326700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9672 6325 6348 0 0.027910 0.098660 0.013600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9673 6327 6105 2 0.004200 0.126000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+9674 6327 6105 2 0.004300 0.127000 0.000000 0.9950 1.0000 1.0000 0.00 0.00 0.00
+9675 6327 6367 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9676 6327 6367 0 0.026100 0.152700 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9677 6327 6372 0 0.004600 0.026500 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9678 6328 5993 2 0.017700 0.287300 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+9679 6328 5993 2 0.015700 0.282700 0.000000 1.1250 1.0000 1.0000 0.00 0.00 0.00
+9680 6328 6368 0 0.011900 0.058800 0.049000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9681 6328 6385 0 0.005300 0.025100 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9682 6329 6340 0 0.001200 0.011500 0.002600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9683 6330 6357 0 0.001700 0.012500 0.002000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9684 6331 6333 0 0.011400 0.485300 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9685 6331 6379 0 0.002500 0.016100 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9686 6332 6333 0 0.011300 0.489400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9687 6332 6379 0 0.002500 0.016400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9688 6334 6111 2 0.007200 0.178900 0.000000 1.0047 1.0000 1.0000 0.00 0.00 0.00
+9689 6334 6372 0 0.006000 0.033100 0.083400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9690 6336 6392 0 0.001600 0.019900 0.346600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9691 6336 6606 0 0.001030 0.012210 0.218400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9692 6337 6399 0 0.002200 0.026960 0.467400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9693 6337 6608 0 0.001500 0.017500 0.312400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9694 6338 6386 0 0.001100 0.007000 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9695 6339 6340 1 0.000500 0.025400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9696 6339 6389 0 0.000600 0.005900 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9697 6340 6122 1 0.006000 0.182200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9698 6340 6122 1 0.006900 0.184400 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9699 6340 6122 1 0.006100 0.181300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9700 6340 6122 1 0.011400 0.261700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9701 6340 6356 0 0.002100 0.014400 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9702 6340 6377 0 0.004600 0.046200 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9703 6340 6401 0 0.010040 0.039610 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9704 6341 6129 1 0.006000 0.175100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9705 6341 6129 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9706 6341 6129 1 0.006000 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9707 6341 6360 0 0.010200 0.037100 0.005600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9708 6341 6393 0 0.001500 0.007100 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9709 6341 6393 0 0.001000 0.006700 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9710 6342 6375 0 0.017700 0.064200 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9711 6343 6135 1 0.003600 0.132700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9712 6343 6135 1 0.003500 0.130800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9713 6343 6135 1 0.004000 0.139200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9714 6343 6344 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9715 6343 6344 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9716 6343 6345 1 0.013100 0.241100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9717 6343 6353 0 0.004300 0.025300 0.004200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9718 6346 6137 1 0.006000 0.188200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9719 6346 6137 1 0.006200 0.183100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9720 6346 6137 1 0.005700 0.192700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9721 6346 6137 1 0.006000 0.173600 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9722 6346 6364 0 0.007600 0.028000 0.093800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9723 6346 6400 0 0.018000 0.085900 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9724 6347 6157 2 0.007600 0.165800 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+9725 6347 6157 2 0.007200 0.169300 0.000000 0.9064 1.0000 1.0000 0.00 0.00 0.00
+9726 6348 6349 0 0.002810 0.018580 0.003200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9727 6348 6375 0 0.006460 0.018530 0.002400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9728 6349 6161 2 0.006200 0.177800 0.000000 0.9002 1.0000 1.0000 0.00 0.00 0.00
+9729 6350 6164 2 0.007000 0.174700 0.000000 0.9707 1.0000 1.0000 0.00 0.00 0.00
+9730 6350 6400 0 0.017800 0.118400 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9731 6351 6352 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9732 6351 6352 1 0.000380 0.021730 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9733 6351 6366 0 0.001920 0.021280 0.364800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9734 6351 6371 0 0.001400 0.017300 0.291200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9735 6351 6399 0 0.000990 0.012120 0.211400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9736 6351 6524 0 0.001750 0.020310 0.382000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9737 6352 6386 0 0.003800 0.014500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9738 6352 6386 0 0.002000 0.019400 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9739 6353 6176 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9740 6353 6176 1 0.007200 0.178900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9741 6353 6176 1 0.006000 0.168900 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9742 6353 6367 0 0.036400 0.214000 0.216000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9743 6353 6372 0 0.004600 0.028200 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9744 6354 6178 2 0.006800 0.166700 0.000000 1.1000 1.0000 1.0000 0.00 0.00 0.00
+9745 6354 6368 0 0.000500 0.004800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9746 6355 6356 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9747 6355 6357 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9748 6355 6358 0 0.000500 0.050000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9749 6356 6359 0 0.005700 0.040700 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9750 6356 6390 0 0.001700 0.056100 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9751 6357 6387 0 0.004100 0.023700 0.120800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9752 6357 6387 0 0.005300 0.029800 0.076400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9753 6358 6388 0 0.005400 0.030000 0.075800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9754 6359 6183 1 0.006500 0.223300 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9755 6359 6183 1 0.006200 0.237800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9756 6359 6183 1 0.006300 0.240000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9757 6359 6379 0 0.003700 0.028800 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9758 6360 6187 2 0.004500 0.127200 0.000000 0.9930 1.0000 1.0000 0.00 0.00 0.00
+9759 6360 6380 0 0.020400 0.074500 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9760 6361 6189 2 0.013200 0.277700 0.000000 1.0287 1.0000 1.0000 0.00 0.00 0.00
+9761 6361 6382 0 0.037700 0.083700 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9762 6362 6192 2 0.010200 0.264700 0.000000 1.0958 1.0000 1.0000 0.00 0.00 0.00
+9763 6364 6201 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+9764 6364 6201 2 0.004300 0.127100 0.000000 0.9366 1.0000 1.0000 0.00 0.00 0.00
+9765 6364 6374 0 0.010500 0.038600 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9766 6365 6203 2 0.007200 0.177800 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+9767 6365 6203 2 0.007200 0.180000 0.000000 1.0081 1.0000 1.0000 0.00 0.00 0.00
+9768 6366 6371 0 0.001700 0.020300 0.458200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9769 6366 6524 0 0.003400 0.039700 0.722600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9770 6366 6576 0 0.000100 0.001800 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9771 6367 6368 0 0.000900 0.099600 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9772 6367 6368 0 0.000900 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9773 6368 6370 0 0.012400 0.070100 0.050200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9774 6368 6372 0 0.029650 0.210540 0.032200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9775 6369 6366 1 0.000500 0.027800 0.000000 1.0750 1.0000 1.0000 0.00 0.00 0.00
+9776 6370 6373 0 0.004500 0.022600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9777 6371 6372 1 0.000500 0.021670 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9778 6372 6206 2 0.005600 0.177800 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+9779 6372 6206 2 0.006000 0.179300 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+9780 6372 6206 2 0.007700 0.186700 0.000000 0.9979 1.0000 1.0000 0.00 0.00 0.00
+9781 6372 6383 0 0.022000 0.129000 0.020000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9782 6373 6207 2 0.007700 0.178700 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+9783 6373 6207 2 0.006200 0.173300 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+9784 6373 6207 2 0.007800 0.185100 0.000000 1.0155 1.0000 1.0000 0.00 0.00 0.00
+9785 6374 6210 2 0.008300 0.180700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9786 6374 6210 2 0.007700 0.179100 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9787 6374 6400 0 0.002300 0.029400 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9788 6375 6211 1 0.010500 0.278000 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9789 6375 6211 1 0.010500 0.276300 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9790 6375 6211 1 0.010800 0.272700 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9791 6375 6393 0 0.015000 0.055300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9792 6375 6395 0 0.006400 0.022300 0.015200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9793 6375 6396 0 0.005100 0.034600 0.011800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9794 6376 6214 2 0.027000 0.600000 0.000000 0.9540 1.0000 1.0000 0.00 0.00 0.00
+9795 6377 6215 2 0.027000 0.600000 0.000000 0.9693 1.0000 1.0000 0.00 0.00 0.00
+9796 6379 6363 2 0.006200 0.182200 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+9797 6379 6363 2 0.006100 0.174700 0.000000 0.9920 1.0000 1.0000 0.00 0.00 0.00
+9798 6379 6380 0 0.001100 0.093700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9799 6379 6380 0 0.000800 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9800 6379 6401 0 0.003700 0.013900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9801 6380 6403 0 0.003300 0.011800 0.001800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9802 6381 6221 2 0.007600 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+9803 6381 6221 2 0.007800 0.185800 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+9804 6381 6221 2 0.007600 0.186700 0.000000 0.9814 1.0000 1.0000 0.00 0.00 0.00
+9805 6382 6222 2 0.010300 0.266000 0.000000 1.0328 1.0000 1.0000 0.00 0.00 0.00
+9806 6383 6230 2 0.006300 0.180700 0.000000 0.9847 1.0000 1.0000 0.00 0.00 0.00
+9807 6384 6385 0 0.001900 0.012500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9808 6385 6232 2 0.005800 0.179100 0.000000 1.0793 1.0000 1.0000 0.00 0.00 0.00
+9809 6386 6235 1 0.005600 0.173800 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9810 6386 6235 1 0.005800 0.175100 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9811 6386 6235 1 0.007100 0.178400 0.000000 0.9500 1.0000 1.0000 0.00 0.00 0.00
+9812 6387 6237 1 0.011100 0.202200 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9813 6387 6237 1 0.011300 0.206700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9814 6387 6237 1 0.011600 0.211800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9815 6387 6237 1 0.011400 0.208700 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9816 6387 6237 1 0.009900 0.180000 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9817 6387 6237 1 0.009800 0.177800 0.000000 0.9750 1.0000 1.0000 0.00 0.00 0.00
+9818 6387 6388 0 0.000900 0.117000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9819 6389 6390 1 0.000500 0.025000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9820 6390 6391 1 0.004700 0.119200 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+9821 6390 6391 1 0.004800 0.115100 0.000000 1.1500 1.0000 1.0000 0.00 0.00 0.00
+9822 6392 6393 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9823 6392 6393 1 0.000400 0.021770 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9824 6392 6529 0 0.002400 0.032200 0.920800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9825 6393 6396 0 0.002600 0.017500 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9826 6395 6397 0 0.009500 0.021300 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9827 6396 6397 0 0.007700 0.029200 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9828 6397 6398 2 0.027000 0.560500 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+9829 6397 6398 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+9830 6397 6398 2 0.027000 0.570000 0.000000 0.9339 1.0000 1.0000 0.00 0.00 0.00
+9831 6399 6400 0 0.000500 0.022000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9832 6401 6402 2 0.027700 0.593300 0.000000 0.9640 1.0000 1.0000 0.00 0.00 0.00
+9833 6403 6404 0 0.001400 0.008600 0.001400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9834 6404 6405 2 0.027600 0.602700 0.000000 0.9690 1.0000 1.0000 0.00 0.00 0.00
+9835 6406 6255 2 0.007000 0.171100 0.000000 0.9240 1.0000 1.0000 0.00 0.00 0.00
+9836 6407 6460 0 0.031900 0.075300 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9837 6407 6520 0 0.009200 0.021600 0.005400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9838 6408 6483 0 0.027800 0.045500 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9839 6408 6491 0 0.057300 0.093900 0.019200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9840 6409 6442 0 0.028500 0.069900 0.015000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9841 6409 6458 0 0.022900 0.068400 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9842 6410 6424 0 0.007000 0.021300 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9843 6410 6444 0 0.025500 0.074100 0.019400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9844 6411 6513 0 0.068000 0.116000 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9845 6411 6531 0 0.060200 0.098800 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9846 6412 6491 0 0.091500 0.217600 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9847 6412 6511 0 0.032400 0.076400 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9848 6412 6517 0 0.030800 0.085400 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9849 6413 6519 0 0.027900 0.080400 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9850 6413 6542 0 0.053300 0.153400 0.040200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9851 6414 6415 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9852 6414 6476 0 0.002500 0.035400 0.458800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9853 6414 6502 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9854 6414 6502 0 0.001610 0.024700 0.280800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9855 6414 6522 0 0.001800 0.028300 0.321800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9856 6414 6529 0 0.002400 0.036600 0.836000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9857 6415 6466 0 0.001600 0.010400 0.003000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9858 6415 6481 0 0.010000 0.064800 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9859 6415 6494 0 0.010500 0.058800 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9860 6415 6510 0 0.004100 0.036500 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9861 6415 6515 0 0.015500 0.102000 0.027600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9862 6415 6533 0 0.014000 0.133500 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9863 6417 6492 0 0.005700 0.029800 0.008200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9864 6417 6538 0 0.001300 0.005300 0.001600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9865 6418 6468 0 0.047900 0.112800 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9866 6418 6536 0 0.035800 0.084300 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9867 6419 6494 0 0.029100 0.088000 0.021000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9868 6419 6518 0 0.051300 0.155300 0.037000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9869 6420 6428 0 0.016000 0.046000 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9870 6420 6437 0 0.014700 0.042400 0.011000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9871 6421 6533 0 0.051400 0.120200 0.030600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9872 6422 6433 0 0.015800 0.117300 0.034400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9873 6422 6466 0 0.019100 0.124100 0.034600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9874 6422 6516 0 0.009300 0.060200 0.016600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9875 6422 6523 0 0.008800 0.036900 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9876 6422 6540 0 0.004500 0.013300 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9877 6423 6434 0 0.017000 0.052100 0.048000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9878 6423 6493 0 0.023200 0.152200 0.041200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9879 6423 6514 0 0.016300 0.089000 0.023400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9880 6423 6543 0 0.023500 0.127200 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9881 6424 6527 0 0.039300 0.140900 0.035400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9882 6425 6440 0 0.051700 0.117300 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9883 6425 6503 0 0.003900 0.025600 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9884 6426 6504 0 0.013100 0.037800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9885 6427 6440 0 0.029000 0.086300 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9886 6427 6482 0 0.027100 0.078000 0.020400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9887 6427 6486 0 0.041300 0.119000 0.032000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9888 6428 6433 0 0.004300 0.046300 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9889 6428 6515 0 0.015700 0.103400 0.028000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9890 6429 6472 0 0.078700 0.154600 0.032600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9891 6429 6501 0 0.003500 0.013600 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9892 6429 6506 0 0.027100 0.146100 0.038400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9893 6429 6507 0 0.026400 0.079700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9894 6429 6534 0 0.044500 0.097200 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9895 6429 6537 0 0.017600 0.073100 0.020600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9896 6430 6469 0 0.046400 0.109700 0.027000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9897 6430 6520 0 0.057000 0.135400 0.033200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9898 6430 6541 0 0.048100 0.138700 0.036200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9899 6431 6447 0 0.004000 0.017400 0.004600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9900 6431 6459 0 0.002400 0.008100 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9901 6432 6448 0 0.000900 0.009400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9902 6432 6451 0 0.016900 0.033000 0.007000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9903 6432 6462 0 0.008200 0.018900 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9904 6432 6521 0 0.034900 0.100400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9905 6432 6527 0 0.006200 0.018800 0.004400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9906 6433 6458 0 0.010300 0.112200 0.034000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9907 6433 6516 0 0.019000 0.169300 0.049800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9908 6433 6523 0 0.007500 0.081300 0.024800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9909 6434 6501 0 0.008900 0.027800 0.022800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9910 6435 6487 0 0.028100 0.047400 0.009200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9911 6435 6528 0 0.083800 0.136700 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9912 6436 6447 0 0.064400 0.115200 0.024400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9913 6436 6463 0 0.007000 0.031300 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9914 6436 6475 0 0.009800 0.098400 0.029800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9915 6436 6479 0 0.017100 0.071200 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9916 6436 6485 0 0.001600 0.016900 0.005200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9917 6436 6485 0 0.001500 0.015900 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9918 6437 6438 0 0.027800 0.071900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9919 6438 6449 0 0.013000 0.084700 0.023000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9920 6438 6455 0 0.061700 0.114600 0.025400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9921 6438 6458 0 0.022000 0.143900 0.039000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9922 6438 6495 0 0.014300 0.051800 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9923 6438 6495 0 0.018900 0.049500 0.011600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9924 6438 6523 0 0.034600 0.146200 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9925 6438 6540 0 0.025000 0.168200 0.046000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9926 6438 6542 0 0.021500 0.065600 0.015600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9927 6439 6494 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9928 6439 6494 0 0.001800 0.012000 0.003400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9929 6440 6446 0 0.031700 0.139300 0.036600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9930 6440 6470 0 0.025100 0.159800 0.043600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9931 6440 6479 0 0.015300 0.063600 0.016000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9932 6440 6500 0 0.001200 0.005100 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9933 6441 6473 0 0.119000 0.269900 0.064400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9934 6441 6475 0 0.012400 0.065700 0.019000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9935 6442 6455 0 0.027500 0.040100 0.008400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9936 6442 6465 0 0.009400 0.023100 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9937 6442 6487 0 0.072100 0.134100 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9938 6443 6477 0 0.006800 0.020700 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9939 6443 6498 0 0.011900 0.036000 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9940 6444 6454 0 0.023500 0.067700 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9941 6445 6467 0 0.002200 0.023700 0.007200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9942 6445 6525 0 0.003400 0.037100 0.011200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9943 6446 6474 0 0.049000 0.085100 0.018000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9944 6446 6477 0 0.050300 0.151200 0.036400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9945 6446 6534 0 0.011800 0.035100 0.008600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9946 6447 6503 0 0.006400 0.041400 0.011400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9947 6447 6525 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9948 6447 6525 0 0.002500 0.022500 0.006800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9949 6447 6538 0 0.041600 0.169100 0.045000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9950 6449 6471 0 0.001800 0.005400 0.001200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9951 6451 6536 0 0.026100 0.061600 0.015400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9952 6452 6533 0 0.004900 0.009800 0.002200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9953 6453 6460 0 0.036300 0.104500 0.027400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9954 6453 6504 0 0.008600 0.024800 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9955 6454 6497 0 0.008400 0.024300 0.006400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9956 6456 6464 0 0.008200 0.025000 0.006000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9957 6456 6467 0 0.004600 0.015500 0.003800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9958 6457 6507 0 0.002100 0.010400 0.002800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9959 6457 6533 0 0.029500 0.093600 0.022600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9960 6458 6497 0 0.037300 0.122400 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9961 6458 6540 0 0.009000 0.029900 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9962 6459 6467 0 0.015500 0.049500 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9963 6459 6475 0 0.038200 0.142300 0.085200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9964 6460 6480 0 0.037400 0.087200 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9965 6460 6512 0 0.038100 0.089800 0.022400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9966 6461 6302 2 0.001400 0.038000 0.000000 1.0675 1.0000 1.0000 0.00 0.00 0.00
+9967 6461 6477 0 0.007460 0.044800 0.012600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9968 6462 6513 0 0.010300 0.038500 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9969 6463 6496 0 0.000500 0.003200 0.000800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9970 6464 6498 0 0.007100 0.021500 0.005000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9971 6467 6450 1 0.000800 0.015500 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9972 6467 6525 0 0.006500 0.061100 0.018200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9973 6467 6544 0 0.026200 0.109100 0.029200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9974 6468 6491 0 0.053500 0.124600 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9975 6469 6528 0 0.023400 0.045700 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9976 6470 6538 0 0.019800 0.083100 0.019600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9977 6471 6542 0 0.005600 0.016900 0.004000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9978 6472 6533 0 0.016200 0.031800 0.006600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9979 6473 6517 0 0.043500 0.125300 0.032800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9980 6474 6533 0 0.067100 0.114700 0.023800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9981 6475 6513 0 0.007000 0.055000 0.019800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9982 6475 6530 0 0.005300 0.057300 0.017200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9983 6476 6484 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9984 6476 6484 0 0.003100 0.036000 0.694400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9985 6476 6522 0 0.000600 0.007100 0.137000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9986 6476 6524 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9987 6476 6524 0 0.004700 0.071600 0.813600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9988 6478 6513 0 0.006700 0.022600 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9989 6478 6527 0 0.011200 0.071500 0.022200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9990 6480 6491 0 0.034000 0.079100 0.020200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9991 6481 6490 0 0.005200 0.033800 0.009400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9992 6483 6531 0 0.081500 0.129600 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9993 6484 6522 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9994 6484 6522 0 0.003100 0.036300 0.701600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9995 6486 6497 0 0.017700 0.050900 0.012800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9996 6486 6516 0 0.015100 0.098900 0.026800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9997 6488 6489 0 0.000200 0.000500 0.000200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9998 6488 6520 0 0.020500 0.062000 0.014600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+9999 6490 6532 0 0.002000 0.013000 0.003600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10000 6492 6513 0 0.005700 0.035600 0.009800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10001 6494 6510 0 0.004200 0.045100 0.013800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10002 6494 6532 0 0.011600 0.036300 0.009600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10003 6494 6533 0 0.032200 0.069100 0.047400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10004 6494 6533 0 0.023000 0.094500 0.024600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10005 6496 6513 0 0.003900 0.017400 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10006 6499 6508 0 0.001400 0.004000 0.001000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10007 6499 6531 0 0.035000 0.099900 0.026000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10008 6502 6609 0 0.000500 0.006300 0.095800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10009 6502 6617 0 0.003600 0.048000 0.582000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10010 6505 6509 0 0.064100 0.184800 0.048200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10011 6505 6511 0 0.042600 0.100400 0.025000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10012 6506 6543 0 0.021400 0.115700 0.030400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10013 6509 6512 0 0.030200 0.071200 0.017600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10014 6513 6539 0 0.015300 0.063700 0.016200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10015 6514 6543 0 0.008500 0.046400 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10016 6518 6540 0 0.006600 0.019300 0.004800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10017 6519 6528 0 0.033300 0.081600 0.018800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10018 6522 6523 1 0.000400 0.019000 0.000000 0.9850 1.0000 1.0000 0.00 0.00 0.00
+10019 6523 6540 0 0.002300 0.024800 0.007600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10020 6524 6525 1 0.000200 0.009200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10021 6524 6526 0 0.002400 0.036600 0.416000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10022 6525 6530 0 0.007890 0.086120 0.025600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10023 6525 6539 0 0.023000 0.151200 0.041000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10024 6526 6527 1 0.000400 0.185000 0.000000 1.0110 1.0000 1.0000 0.00 0.00 0.00
+10025 6527 6535 0 0.003100 0.033500 0.010200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10026 6528 6541 0 0.050500 0.124000 0.028400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10027 6535 6539 0 0.026900 0.114000 0.030000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10028 6539 6544 0 0.028700 0.116900 0.031000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10029 6543 6416 1 0.001700 0.033700 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10030 6545 6548 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10031 6545 6548 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10032 6545 6548 0 0.001600 0.016400 0.026200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10033 6545 6586 0 0.010550 0.076000 0.115000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10034 6546 6553 0 0.000600 0.006200 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10035 6546 6566 0 0.000490 0.004820 0.031600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10036 6547 6568 0 0.021800 0.151100 0.223800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10037 6547 6598 0 0.012700 0.090900 0.135400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10038 6548 6549 1 0.000700 0.021100 0.000000 1.0610 1.0000 1.0000 0.00 0.00 0.00
+10039 6548 6566 0 0.003390 0.033600 0.219800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10040 6548 6590 0 0.003800 0.037800 0.246200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10041 6548 6592 1 0.000600 0.015100 0.000000 1.0720 1.0000 1.0000 0.00 0.00 0.00
+10042 6549 6620 0 0.001000 0.007000 0.014000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10043 6550 6562 0 0.001780 0.012020 0.076600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10044 6551 6552 0 0.000300 0.013550 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10045 6551 6554 0 0.007700 0.053800 0.335000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10046 6551 6559 0 0.005900 0.040500 0.250800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10047 6551 6577 0 0.005500 0.054100 0.363600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10048 6551 6586 0 0.010800 0.100190 0.170400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10049 6551 6586 0 0.015000 0.105500 0.158000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10050 6551 6586 0 0.010500 0.100000 0.170000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10051 6551 6605 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10052 6551 6605 0 0.000760 0.007360 0.012200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10053 6552 6600 0 0.005800 0.028100 0.017000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10054 6552 6604 0 0.096500 0.366900 0.054000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10055 6553 6586 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10056 6553 6586 0 0.003600 0.029100 0.046400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10057 6553 6590 0 0.001040 0.009300 0.060400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10058 6553 6597 0 0.001700 0.011700 0.289600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10059 6554 6577 0 0.002900 0.028500 0.192000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10060 6554 6601 0 0.005400 0.036900 0.228600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10061 6555 6556 0 0.043000 0.303100 0.463000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10062 6555 6560 0 0.029100 0.226700 0.342800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10063 6555 6568 0 0.008500 0.058800 0.087000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10064 6555 6593 0 0.007300 0.050400 0.074000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10065 6556 6560 0 0.012000 0.083600 0.123600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10066 6556 6568 0 0.046800 0.336900 0.519800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10067 6556 6569 0 0.029400 0.230400 0.349400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10068 6556 6569 0 0.037600 0.263000 0.396000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10069 6556 6581 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10070 6556 6581 0 0.001300 0.008900 0.119600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10071 6556 6585 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10072 6556 6593 0 0.048900 0.349200 0.538000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10073 6556 6597 0 0.002000 0.015300 0.214000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10074 6556 6597 0 0.005700 0.045000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10075 6556 6597 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10076 6556 6597 0 0.004500 0.044200 0.072000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10077 6557 6564 0 0.001620 0.009700 0.012000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10078 6557 6572 0 0.001530 0.009400 0.010800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10079 6558 6570 0 0.013700 0.095700 0.141000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10080 6558 6587 0 0.011200 0.077200 0.482400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10081 6558 6587 0 0.011200 0.079000 0.471400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10082 6559 6586 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10083 6559 6586 0 0.005420 0.053000 0.088000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10084 6559 6591 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10085 6559 6591 0 0.009800 0.067200 0.104000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10086 6561 6567 0 0.002480 0.024470 0.164800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10087 6562 6569 0 0.003580 0.035200 0.239000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10088 6562 6598 0 0.004500 0.044250 0.301000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10089 6563 6584 0 0.017300 0.198800 0.700000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10090 6563 6587 0 0.009100 0.062300 0.385600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10091 6563 6591 0 0.008500 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10092 6563 6591 0 0.008600 0.058500 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10093 6564 6580 0 0.002100 0.008300 0.008800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10094 6565 6574 0 0.004440 0.051440 3.597000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10095 6565 6584 1 0.000740 0.020400 0.000000 0.9000 1.0000 1.0000 0.00 0.00 0.00
+10096 6565 6596 0 0.002440 0.032620 2.236000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10097 6566 6586 0 0.001020 0.010050 0.066400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10098 6567 6591 0 0.003920 0.038140 0.258000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10099 6568 6569 0 0.012300 0.125500 0.194000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10100 6568 6585 0 0.023400 0.113500 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10101 6568 6598 0 0.007500 0.077300 0.119000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10102 6569 6598 0 0.023900 0.170800 0.255600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10103 6570 6589 0 0.014500 0.058010 0.094000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10104 6570 6589 0 0.007700 0.056910 0.096000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10105 6571 6389 1 0.000400 0.002500 0.000000 1.0450 1.0000 1.0000 0.00 0.00 0.00
+10106 6571 6572 1 0.001200 0.039600 0.000000 1.0250 1.0000 1.0000 0.00 0.00 0.00
+10107 6571 6602 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10108 6573 6580 0 0.062700 0.250000 0.067200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10109 6573 6580 0 0.102000 0.236000 0.060600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10110 6573 6600 0 0.085500 0.342000 0.091400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10111 6573 6604 0 0.080800 0.234400 0.029000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10112 6574 6575 1 0.000250 0.015400 0.000000 0.8800 1.0000 1.0000 0.00 0.00 0.00
+10113 6575 6597 0 0.000420 0.006700 0.110800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10114 6576 6577 1 0.000200 0.024200 0.000000 0.9300 1.0000 1.0000 0.00 0.00 0.00
+10115 6577 6578 0 0.000000 0.009400 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10116 6577 6603 0 0.000500 0.006500 0.103800 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10117 6579 6580 0 0.000400 0.017200 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10118 6579 6601 0 0.000770 0.006480 0.042000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10119 6582 6619 0 0.001000 0.007000 0.013000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10120 6583 6597 0 0.000300 0.001700 0.040000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10121 6584 6589 0 0.029050 0.112070 0.195000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10122 6584 6589 0 0.014850 0.114140 0.193000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10123 6586 6588 0 0.000680 0.006680 0.399000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10124 6586 6590 0 0.001050 0.008370 0.054200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10125 6587 6597 0 0.025400 0.177700 0.270400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10126 6587 6597 0 0.024400 0.176700 0.271600 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10127 6592 6618 0 0.001000 0.007000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10128 6594 6595 0 0.000170 0.012340 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10129 6594 6596 0 0.001840 0.024450 1.662000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10130 6598 6582 1 0.000000 0.083300 0.000000 1.0300 1.0000 1.0000 0.00 0.00 0.00
+10131 6598 6599 1 0.000500 0.018200 0.000000 1.1030 1.0000 1.0000 0.00 0.00 0.00
+10132 6601 6602 0 0.000570 0.003930 0.026400 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10133 6603 6604 1 0.000330 0.013000 0.000000 1.0500 1.0000 1.0000 0.00 0.00 0.00
+10134 6603 6605 0 0.009220 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10135 6603 6605 0 0.009200 0.090710 0.155200 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10136 6606 6607 0 0.000000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10137 6606 6613 0 0.001700 0.021000 0.260000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10138 6608 6613 0 0.001000 0.012300 0.150000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10139 6609 6610 0 0.000800 0.009800 0.120000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10140 6610 6614 0 0.001000 0.012000 0.160000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10141 6610 6615 0 0.004200 0.063000 0.200000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10142 6610 6617 0 0.003100 0.027000 0.050000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10143 6610 6617 0 0.001140 0.018000 0.270000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10144 6611 6612 0 0.100000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10145 6611 6614 0 0.000300 0.003800 0.010000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10146 6611 6614 0 0.003000 0.030000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10147 6611 6616 0 0.030000 0.100000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10148 6611 6617 0 0.000400 0.005000 0.070000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10149 6611 6618 0 0.014000 1.139997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10150 6611 6620 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10151 6612 6613 0 0.001800 0.023000 0.284000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10152 6612 6613 0 0.010000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10153 6612 6614 0 0.030000 0.999999 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10154 6612 6615 0 0.006000 0.068000 0.740000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10155 6612 6616 0 0.050000 0.200000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10156 6613 6616 0 0.020000 0.400000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10157 6613 6618 0 -0.200000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10158 6613 6619 0 -0.400000 2.500001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10159 6613 6620 0 0.083000 0.600000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10160 6614 6616 0 0.004200 0.050000 0.080000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10161 6614 6616 0 0.060000 0.700001 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10162 6614 6618 0 0.030000 1.009997 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10163 6614 6619 0 0.070000 1.830000 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10164 6615 6616 0 0.001300 0.029000 0.090000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10165 6615 6617 0 0.002200 0.046410 0.400000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10166 6616 6617 0 0.004000 0.044000 0.500000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10167 6616 6620 0 0.220000 1.339998 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10168 6618 6619 0 -0.040450 0.278890 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10169 6618 6620 0 -0.000010 0.002750 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
+10170 6619 6620 0 -0.178800 0.710991 0.000000 1.0000 1.0000 1.0000 0.00 0.00 0.00
diff --git a/examples/performance/jump/IEEE6620.bus b/examples/performance/jump/IEEE6620.bus
new file mode 100644
index 00000000000..f1f544ae40a
--- /dev/null
+++ b/examples/performance/jump/IEEE6620.bus
@@ -0,0 +1,6620 @@
+1 0 """ADAIR-------""" 1.0193 0.00 0.00 0.00 0.00 0.00 2.18 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2 0 """ADAMS-----40""" 1.0140 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+3 0 """1AINSWORTH--""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.17 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4 0 """ALGONAC-----""" 1.0163 0.00 0.00 0.00 0.00 0.00 7.98 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+5 0 """ALMONT------""" 0.9849 0.00 0.00 0.00 0.00 0.00 3.28 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+6 0 """ANDERSON----""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.59 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+7 0 """APPLEGATE---""" 0.9866 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+8 0 """ARGO--------""" 1.0307 0.00 0.00 0.00 0.00 0.00 23.02 3.93 0.0000 0.1200 0.0000 0.0000 0 0
+9 0 """ARMADA------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.52 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+10 0 """ARROWHEAD-40""" 1.0217 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+11 0 """ATTICA------""" 0.9842 0.00 0.00 0.00 0.00 0.00 1.34 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+12 0 """AUBURN-HTS-1""" 1.0049 0.00 0.00 0.00 0.00 0.00 6.50 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+13 0 """AVOCA-------""" 0.9930 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+14 0 """AVON--------""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+15 0 """BAD-AXE-40--""" 0.9987 0.00 0.00 0.00 0.00 0.00 6.13 2.12 0.0000 0.0660 0.0000 0.0000 0 0
+16 0 """BALDWIN--EQ1""" 1.0224 0.00 0.00 0.00 0.00 0.00 8.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+17 0 """BARNES-LAKE-""" 0.9888 0.00 0.00 0.00 0.00 0.00 2.20 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+18 0 """1BARTLETT-CP""" 1.0119 0.00 0.00 0.00 0.00 0.00 7.40 5.87 0.0000 0.0000 0.0000 0.0000 0 0
+19 0 """BAYPORT-----""" 0.9869 0.00 0.00 0.00 0.00 0.00 1.26 2.12 0.0000 0.0000 0.0000 0.0000 0 0
+20 0 """BEAVER------""" 0.9956 0.00 0.00 0.00 0.00 0.00 0.17 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+21 0 """BELLEVILLE--""" 1.0212 0.00 0.00 0.00 0.00 0.00 6.05 2.66 0.0000 0.0000 0.0000 0.0000 0 0
+22 0 """BERLIN-FUT74""" 1.0348 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+23 0 """BERNARD-----""" 0.9996 0.00 0.00 0.00 0.00 0.00 2.10 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+24 0 """BINGHAM--EQ1""" 1.0029 0.00 0.00 0.00 0.00 0.00 3.28 1.49 0.0000 0.0480 0.0000 0.0000 0 0
+25 0 """BLOOMFIELD40""" 1.0220 0.00 0.00 0.00 0.00 0.00 79.00 39.62 0.0000 0.0900 0.0000 0.0000 0 0
+26 0 """BOND,MADRID-""" 1.0551 0.00 0.00 0.00 0.00 0.00 2.18 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+27 0 """BREST-------""" 1.0358 0.00 0.00 0.00 0.00 0.00 5.04 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+28 0 """BREWER------""" 1.0045 0.00 0.00 0.00 0.00 0.00 2.94 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+29 0 """BRIGHTON----""" 1.0076 0.00 0.00 0.00 0.00 0.00 5.96 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+30 0 """BROWN-CITY--""" 0.9725 0.00 0.00 0.00 0.00 0.00 3.28 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+31 0 """BROWNSTOWN40""" 1.0348 0.00 0.00 0.00 0.00 0.00 36.46 24.76 0.0000 0.0000 0.0000 0.0000 0 0
+32 0 """BRAY--------""" 0.9770 0.00 0.00 0.00 0.00 0.00 1.51 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+33 0 """BRUCE---EQ1-""" 1.0034 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+34 0 """BUNCE-CRK-40""" 1.0333 0.00 0.00 0.00 0.00 0.00 7.73 4.25 0.0000 0.0000 0.0000 0.0000 0 0
+35 2 """BUNCE-CRK-24""" 1.0607 0.00 84.00 480.00 0.00 480.00 37.72 22.10 0.0000 0.0000 0.0000 0.0000 0 0
+36 0 """CALUMET-----""" 0.9844 0.00 0.00 0.00 0.00 0.00 3.11 1.91 0.0000 0.0000 0.0000 0.0000 0 0
+37 0 """CAMDEN-2,5--""" 1.0033 0.00 0.00 0.00 0.00 0.00 9.41 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+38 0 """CAMPUS-1----""" 1.0279 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+39 0 """CAMPUS-2----""" 1.0216 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+40 0 """CAPAC-------""" 0.9880 0.00 0.00 0.00 0.00 0.00 3.11 1.38 0.0000 0.0660 0.0000 0.0000 0 0
+41 0 """CARLETON----""" 1.0054 0.00 0.00 0.00 0.00 0.00 1.76 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+42 0 """CARO-1------""" 1.0018 0.00 0.00 0.00 0.00 0.00 1.68 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+43 0 """CARO-T.E.C.-""" 0.9962 0.00 0.00 0.00 0.00 0.00 1.76 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+44 0 """CARPENTER---""" 1.0007 0.00 0.00 0.00 0.00 0.00 8.15 3.29 0.0000 0.1140 0.0000 0.0000 0 0
+45 0 """CARSONVILLE-""" 0.9885 0.00 0.00 0.00 0.00 0.00 0.67 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+46 0 """CARTER------""" 1.0069 0.00 0.00 0.00 0.00 0.00 15.04 7.54 0.0000 0.0000 0.0000 0.0000 0 0
+47 0 """CASEVILLE---""" 0.9683 0.00 0.00 0.00 0.00 0.00 3.02 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+48 0 """CASEY-------""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.18 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+49 0 """CASS-CITY---""" 1.0011 0.00 0.00 0.00 0.00 0.00 5.04 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+50 0 """CHERRY-HILL-""" 0.9566 0.00 0.00 0.00 0.00 0.00 0.92 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+51 0 """CHESTERFLD-1""" 1.0264 0.00 0.00 0.00 0.00 0.00 3.95 0.53 0.0000 0.0480 0.0000 0.0000 0 0
+52 0 """CHESTERFLD-2""" 1.0088 0.00 0.00 0.00 0.00 0.00 8.48 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+53 0 """CHESTNUT-40-""" 1.0150 0.00 0.00 0.00 0.00 0.00 75.20 29.50 0.0000 0.3600 0.0000 0.0000 0 0
+54 0 """CHILSON-----""" 1.0175 0.00 0.00 0.00 0.00 0.00 1.51 0.85 0.0000 0.0660 0.0000 0.0000 0 0
+55 0 """CLARKSTON-2-""" 1.0013 0.00 0.00 0.00 0.00 0.00 4.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+56 0 """CLIFFORD----""" 0.9881 0.00 0.00 0.00 0.00 0.00 1.34 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+57 0 """COATS-------""" 1.0093 0.00 0.00 0.00 0.00 0.00 3.36 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+58 0 """CODY-40-----""" 1.0456 0.00 0.00 0.00 0.00 0.00 19.99 6.27 0.0000 0.1800 0.0000 0.0000 0 0
+59 0 """COLFAX---EQ1""" 1.0885 0.00 14.00 40.00 0.00 0.00 4.87 2.55 0.0000 0.0480 0.0000 0.0000 0 0
+60 0 """COLLIER----1""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+61 0 """CLOTH-PR.-1-""" 1.0059 0.00 0.00 0.00 0.00 0.00 3.00 -0.37 0.0000 0.0000 0.0000 0.0000 0 0
+62 0 """COLUMBIAVILE""" 0.9871 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+63 0 """COMMERCE-LK-""" 0.9872 0.00 0.00 0.00 0.00 0.00 6.05 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+64 0 """CORTLAND-24-""" 1.0112 0.00 0.00 0.00 0.00 0.00 204.10 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+65 0 """CROSWELL-EQ1""" 0.9883 0.00 0.00 0.00 0.00 0.00 5.96 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+66 0 """CROWN-1-----""" 1.0243 0.00 0.00 0.00 0.00 0.00 10.16 0.32 0.0000 0.0900 0.0000 0.0000 0 0
+67 0 """CROWN-2-----""" 0.9891 0.00 0.00 0.00 0.00 0.00 4.54 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+68 0 """CULVER------""" 0.9954 0.00 0.00 0.00 0.00 0.00 8.57 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+69 0 """CUSTER-24---""" 1.0216 0.00 14.00 40.00 0.00 0.00 61.40 33.15 0.0000 0.0000 0.0000 0.0000 0 0
+70 0 """DADE-1------""" 1.0165 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+71 0 """DADE-2------""" 1.0158 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+72 0 """DARWIN-1----""" 1.0440 0.00 0.00 0.00 0.00 0.00 4.87 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+73 0 """DARWIN-2----""" 1.0408 0.00 0.00 0.00 0.00 0.00 4.79 1.27 0.0000 0.0480 0.0000 0.0000 0 0
+74 0 """DAVIS---EQ1-""" 0.9767 0.00 0.00 0.00 0.00 0.00 20.30 10.25 0.0000 0.0900 0.0000 0.0000 0 0
+75 0 """DAYTON-40---""" 1.0256 0.00 5.00 10.00 0.00 0.00 5.71 2.97 0.0000 0.0660 0.0000 0.0000 0 0
+76 0 """DECKR-+-ASPN""" 0.9878 0.00 0.00 0.00 0.00 0.00 2.52 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+77 0 """DEWEY-2-----""" 0.9865 0.00 0.00 0.00 0.00 0.00 11.34 3.82 0.0000 0.0000 0.0000 0.0000 0 0
+78 0 """DEXTER---EQ1""" 1.0348 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0480 0.0000 0.0000 0 0
+79 0 """DILLARD-1---""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+80 0 """DOVER-1-----""" 1.0030 0.00 0.00 0.00 0.00 0.00 3.78 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+81 0 """DOVER-2-----""" 0.9997 0.00 0.00 0.00 0.00 0.00 3.19 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+82 0 """DREXEL-2----""" 0.9883 0.00 0.00 0.00 0.00 0.00 9.24 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+83 0 """DRYDEN------""" 0.9797 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+84 0 """ECKLES-2----""" 0.9704 0.00 0.00 0.00 0.00 0.00 4.62 -0.74 0.0000 0.0000 0.0000 0.0000 0 0
+85 0 """EDGEWATER---""" 0.9989 0.00 0.00 0.00 0.00 0.00 1.30 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+86 0 """ELKTON------""" 0.9804 0.00 0.00 0.00 0.00 0.00 3.36 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+87 0 """ELM-40------""" 1.0242 0.00 0.00 0.00 0.00 0.00 107.77 79.00 0.0000 0.2850 0.0000 0.0000 0 0
+88 0 """EMERICK-1---""" 1.0099 0.00 0.00 0.00 0.00 0.00 8.82 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+89 0 """EMMETT------""" 0.9925 0.00 0.00 0.00 0.00 0.00 1.01 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+90 0 """ENGLISH-----""" 1.0024 0.00 0.00 0.00 0.00 0.00 1.68 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+91 0 """ERIN40------""" 1.0115 0.00 0.00 0.00 0.00 0.00 103.40 41.50 0.0000 0.1800 0.0000 0.0000 0 0
+92 0 """EVERGREEN-40""" 1.0364 0.00 0.00 0.00 0.00 0.00 213.20 82.90 0.0000 0.5100 0.0000 0.0000 0 0
+93 0 """FAIRGROVE---""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.02 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+94 0 """FALCON-1----""" 1.0232 0.00 0.00 0.00 0.00 0.00 9.32 6.12 0.0000 0.0000 0.0000 0.0000 0 0
+95 0 """FALCON-2----""" 1.0207 0.00 0.00 0.00 0.00 0.00 7.56 4.99 0.0000 0.0000 0.0000 0.0000 0 0
+96 0 """FISHER------""" 1.0370 0.00 0.00 0.00 0.00 0.00 5.96 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+97 0 """FLAT-ROCK-1-""" 1.0195 0.00 0.00 0.00 0.00 0.00 1.68 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+98 0 """FLEMING-----""" 1.0067 0.00 0.00 0.00 0.00 0.00 4.54 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+99 0 """FORESTER----""" 0.9770 0.00 0.00 0.00 0.00 0.00 0.76 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+100 0 """FRANK2---EQ1""" 0.9722 0.00 0.00 0.00 0.00 0.00 6.10 1.50 0.0000 0.0000 0.0000 0.0000 0 0
+101 0 """FREEDOM-----""" 0.9954 0.00 0.00 0.00 0.00 0.00 1.10 0.12 0.0000 0.0000 0.0000 0.0000 0 0
+102 0 """FRENCHLND-2-""" 1.0263 0.00 0.00 0.00 0.00 0.00 5.70 4.37 0.0000 0.1200 0.0000 0.0000 0 0
+103 0 """FRISBIE-24--""" 1.0881 0.00 0.00 0.00 0.00 0.00 222.68 75.01 0.0000 0.0000 0.0000 0.0000 0 0
+104 0 """FULLER-1----""" 1.0203 0.00 0.00 0.00 0.00 0.00 2.52 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+105 0 """FULLER-2----""" 1.0257 0.00 0.00 0.00 0.00 0.00 2.44 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+106 0 """GAGETOWN----""" 1.0203 0.00 0.00 0.00 0.00 0.00 1.18 0.42 0.0000 0.0480 0.0000 0.0000 0 0
+107 0 """1GARNER-CP--""" 1.0195 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+108 0 """GENOA-40----""" 1.0191 0.00 0.00 0.00 0.00 0.00 12.94 6.37 0.0000 0.1800 0.0000 0.0000 0 0
+109 0 """GLOBE-------""" 0.9892 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+110 0 """GOODISON----""" 0.9861 0.00 0.00 0.00 0.00 0.00 7.56 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+111 0 """GRAF--------""" 0.9961 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+112 0 """HAMBURG-----""" 1.0440 0.00 0.00 0.00 0.00 0.00 2.44 0.64 0.0000 0.0660 0.0000 0.0000 0 0
+113 0 """HANCOCK-40--""" 1.0036 0.00 100.81 190.00 0.00 0.00 29.57 15.62 0.0000 0.0000 0.0000 0.0000 0 0
+114 0 """HANNAN-1---1""" 1.0048 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+115 0 """HARTLAND----""" 0.9948 0.00 0.00 0.00 0.00 0.00 2.18 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+116 0 """HEMLOCK-1---""" 1.0293 0.00 0.00 0.00 0.00 0.00 6.00 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+117 0 """HEMLOCK-2---""" 1.0364 0.00 0.00 0.00 0.00 0.00 6.97 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+118 2 """HINES-40----""" 0.9900 0.00 0.00 120.00 0.00 18.00 115.58 95.12 0.0000 0.3600 0.0000 0.0000 0 0
+119 0 """HOBART-TAP--""" 1.0363 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+120 0 """HOBART------""" 1.0414 0.00 0.00 0.00 0.00 0.00 4.03 1.59 0.0000 0.0900 0.0000 0.0000 0 0
+121 0 """HOWELL-2----""" 1.0160 0.00 0.00 0.00 0.00 0.00 3.95 1.81 0.0000 0.0660 0.0000 0.0000 0 0
+122 0 """HUNTERS-CR40""" 1.0031 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+123 0 """IDA---------""" 1.0107 0.00 0.00 0.00 0.00 0.00 1.90 -0.12 0.0000 0.0000 0.0000 0.0000 0 0
+124 0 """IMLAY-CITY--""" 0.9775 0.00 0.00 0.00 0.00 0.00 4.70 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+125 0 """INLAND---EQ1""" 1.0137 0.00 0.00 0.00 0.00 0.00 5.80 3.51 0.0000 0.0000 0.0000 0.0000 0 0
+126 0 """IRA---------""" 1.0238 0.00 0.00 0.00 0.00 0.00 2.10 0.85 0.0000 0.0480 0.0000 0.0000 0 0
+127 0 """IRONTON-24--""" 1.0193 0.00 0.00 0.00 0.00 0.00 177.80 67.00 0.0000 0.0000 0.0000 0.0000 0 0
+128 0 """IRVING------""" 0.9945 0.00 0.00 0.00 0.00 0.00 5.88 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+129 0 """JACKSON-RD.2""" 1.0346 0.00 0.00 0.00 0.00 0.00 1.01 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+130 0 """JASPER------""" 1.0041 0.00 0.00 0.00 0.00 0.00 0.34 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+131 0 """JORDAN-1----""" 0.9922 0.00 0.00 0.00 0.00 0.00 1.85 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+132 0 """JOPLIN------""" 0.9903 0.00 0.00 0.00 0.00 0.00 0.76 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+133 0 """KEEGO-2-----""" 0.9789 0.00 0.00 0.00 0.00 0.00 1.10 0.37 0.0000 0.0000 0.0000 0.0000 0 0
+134 0 """KELLOGG-----""" 0.9988 0.00 0.00 0.00 0.00 0.00 3.78 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+135 0 """1KENNETT-CP-""" 1.0198 0.00 0.00 0.00 0.00 0.00 17.90 8.37 0.0000 0.0000 0.0000 0.0000 0 0
+136 0 """KIMBALL-----""" 1.0128 0.00 0.00 0.00 0.00 0.00 3.36 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+137 0 """KINDE-------""" 0.9840 0.00 0.00 0.00 0.00 0.00 1.01 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+138 0 """KING-SEELEY-""" 1.0463 0.00 0.00 0.00 0.00 0.00 2.69 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+139 0 """LAKEPORT----""" 1.0008 0.00 0.00 0.00 0.00 0.00 1.85 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+140 0 """LAKEVILLE---""" 0.9976 0.00 0.00 0.00 0.00 0.00 1.09 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+141 0 """LAPEER------""" 0.9933 0.00 0.00 0.00 0.00 0.00 3.78 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+142 0 """LARK-40-----""" 1.0476 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+143 0 """LEE-40------""" 1.0183 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+144 0 """LIMA--------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.18 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+145 0 """LINCOLN-24--""" 0.9866 0.00 0.00 0.00 0.00 0.00 148.43 124.57 0.0000 0.5700 0.0000 0.0000 0 0
+146 0 """LUZON-40----""" 1.0040 0.00 0.00 0.00 0.00 0.00 21.67 12.01 0.0000 0.0900 0.0000 0.0000 0 0
+147 0 """MACOMB-40---""" 1.0194 0.00 0.00 0.00 0.00 0.00 132.00 96.50 0.0000 0.3600 0.0000 0.0000 0 0
+148 0 """MARINE-CITY-""" 1.0387 0.00 0.00 0.00 0.00 0.00 5.21 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+149 0 """MARLETTE----""" 0.9794 0.00 0.00 0.00 0.00 0.00 5.29 1.70 0.0000 0.0480 0.0000 0.0000 0 0
+150 0 """MAYBEE------""" 1.0091 0.00 0.00 0.00 0.00 0.00 1.26 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+151 0 """MAYVILLE----""" 1.0032 0.00 0.00 0.00 0.00 0.00 2.02 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+152 0 """MEADOW---EQ1""" 0.9943 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+153 0 """MEDINA-40---""" 1.0197 0.00 0.00 0.00 0.00 0.00 45.80 21.50 0.0000 0.1800 0.0000 0.0000 0 0
+154 0 """MELVIN------""" 0.9800 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+155 0 """METAMORA----""" 0.9954 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+156 0 """MILFORD-----""" 1.0033 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+157 0 """MILLINGTON--""" 0.9808 0.00 0.00 0.00 0.00 0.00 2.35 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+158 0 """MOHAWK-2----""" 0.9967 0.00 0.00 0.00 0.00 0.00 2.10 0.25 0.0000 0.0000 0.0000 0.0000 0 0
+159 0 """MONARCH-----""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.30 1.50 0.0000 0.0960 0.0000 0.0000 0 0
+160 0 """1MONTCALM-CP""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+161 0 """MOTT-2------""" 1.0159 0.00 0.00 0.00 0.00 0.00 7.39 3.82 0.0000 0.0900 0.0000 0.0000 0 0
+162 0 """NATIONAL-1--""" 0.9928 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+163 0 """NATIONAL-2--""" 0.9997 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+164 0 """NAVARRE-24--""" 1.0384 0.00 0.00 0.00 0.00 0.00 190.43 107.21 0.0000 0.8700 0.0000 0.0000 0 0
+165 0 """NEFF--------""" 1.0012 0.00 0.00 0.00 0.00 0.00 5.71 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+166 0 """NELSON-MILS1""" 1.0263 0.00 0.00 0.00 0.00 0.00 2.94 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+167 0 """NELSON-MILS2""" 1.0270 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+168 0 """NEW-BALTMR-1""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.10 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+169 0 """NEW-BALTMR23""" 1.0237 0.00 0.00 0.00 0.00 0.00 4.28 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+170 0 """NEW-BOSTON--""" 1.0111 0.00 0.00 0.00 0.00 0.00 1.93 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+171 0 """NEWBURGH-40-""" 0.9673 0.00 0.00 0.00 0.00 0.00 147.42 102.95 0.0000 0.3000 0.0000 0.0000 0 0
+172 0 """NEW-HAVEN-1-""" 1.0179 0.00 0.00 0.00 0.00 0.00 3.44 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+173 0 """NEW-HAVEN-2-""" 1.0220 0.00 0.00 0.00 0.00 0.00 2.69 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+174 0 """NIXON-2-----""" 0.9768 0.00 0.00 0.00 0.00 0.00 11.09 5.52 0.0000 0.0000 0.0000 0.0000 0 0
+175 0 """NOBLE-------""" 0.9863 0.00 0.00 0.00 0.00 0.00 16.97 9.14 0.0000 0.0000 0.0000 0.0000 0 0
+176 0 """NORTH-BRANCH""" 0.9717 0.00 0.00 0.00 0.00 0.00 4.45 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+177 2 """NORTHEAST-24""" 1.0104 0.00 80.00 0.00 0.00 48.00 230.24 141.20 0.0000 0.4800 0.0000 0.0000 0 0
+178 0 """NORTH-SRVCTR""" 1.0050 0.00 0.00 0.00 0.00 0.00 5.80 4.36 0.0000 0.0000 0.0000 0.0000 0 0
+179 2 """NORTHWEST-40""" 1.0044 0.00 0.00 0.00 0.00 18.00 209.70 76.40 0.0000 0.5480 0.0000 0.0000 0 0
+180 0 """NORWAY-1----""" 0.9516 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+181 0 """NORWAY-2-EQ1""" 0.9477 0.00 0.00 0.00 0.00 0.00 5.96 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+182 0 """OAK-BEACH---""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.84 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+183 0 """OLIVER------""" 0.9870 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+184 0 """OLYMPA-FUT75""" 0.9825 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+185 0 """OMAHA-1--EQ1""" 0.9473 0.00 0.00 0.00 0.00 0.00 10.08 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+186 0 """OMAHA-2--EQ1""" 0.9465 0.00 0.00 0.00 0.00 0.00 9.58 3.61 0.0000 0.0000 0.0000 0.0000 0 0
+187 0 """OPAL--------""" 1.0050 0.00 0.00 0.00 0.00 0.00 0.92 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+188 0 """OREGON-1----""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.38 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+189 0 """ORION-------""" 0.9925 0.00 0.00 0.00 0.00 0.00 5.46 2.02 0.0000 0.0660 0.0000 0.0000 0 0
+190 0 """OTTER-LAKE--""" 0.9836 0.00 0.00 0.00 0.00 0.00 1.01 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+191 0 """OWENDALE----""" 1.0049 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+192 0 """OXFORD------""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.89 3.72 0.0000 0.1200 0.0000 0.0000 0 0
+193 0 """1PADDOCK-CP-""" 1.0220 0.00 0.00 0.00 0.00 0.00 4.30 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+194 0 """PAGE--------""" 0.9930 0.00 0.00 0.00 0.00 0.00 9.58 5.63 0.0000 0.0660 0.0000 0.0000 0 0
+195 0 """PALMER-1----""" 0.9643 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+196 0 """PARKER-ROAD-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.64 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+197 0 """PAUL-1------""" 1.0114 0.00 0.00 0.00 0.00 0.00 8.15 4.89 0.0000 0.0480 0.0000 0.0000 0 0
+198 0 """PAUL-2,3----""" 1.0157 0.00 0.00 0.00 0.00 0.00 4.70 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+199 0 """PHOENIX-40--""" 1.0379 0.00 0.00 0.00 0.00 0.00 36.71 20.82 0.0000 0.0000 0.0000 0.0000 0 0
+200 0 """PIEDMONT----""" 1.0235 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+201 0 """PIGEON------""" 0.9818 0.00 0.00 0.00 0.00 0.00 3.78 4.78 0.0000 0.0480 0.0000 0.0000 0 0
+202 0 """PINCKNEY----""" 1.0442 0.00 0.00 0.00 0.00 0.00 3.86 1.70 0.0000 0.0900 0.0000 0.0000 0 0
+203 0 """PIONEER---40""" 1.0270 0.00 0.00 0.00 0.00 0.00 19.10 10.12 0.0000 0.0000 0.0000 0.0000 0 0
+204 0 """PIPER---EQ1-""" 1.0008 0.00 0.00 0.00 0.00 0.00 5.12 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+205 0 """PITSFLD--EQ1""" 1.0164 0.00 0.00 0.00 0.00 0.00 9.66 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+206 0 """PLACID------""" 1.0026 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+207 0 """PLYMOUTH----""" 0.9523 0.00 0.00 0.00 0.00 0.00 12.10 7.44 0.0000 0.1560 0.0000 0.0000 0 0
+208 0 """PORT-AUSTIN-""" 0.9754 0.00 0.00 0.00 0.00 0.00 3.02 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+209 0 """PORT-HOPE---""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+210 0 """PORT-SANILAC""" 0.9808 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+211 0 """PRICE-1-----""" 1.0353 0.00 0.00 0.00 0.00 0.00 4.37 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+212 0 """PROCTOR-----""" 0.9955 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+213 0 """PUTNAM------""" 1.0098 0.00 14.00 40.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+214 0 """QUEEN-------""" 1.0065 0.00 0.00 0.00 0.00 0.00 3.53 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+215 0 """QUINCY------""" 1.0030 0.00 0.00 0.00 0.00 0.00 1.34 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+216 0 """RANDOLPH----""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+217 0 """RAVINE---EQ1""" 0.9764 0.00 0.00 0.00 0.00 0.00 8.90 3.62 0.0000 0.0000 0.0000 0.0000 0 0
+218 0 """RED-RUN-40--""" 1.0203 0.00 0.00 0.00 0.00 0.00 140.87 71.29 0.0000 0.5400 0.0000 0.0000 0 0
+219 0 """REESE---EQ2-""" 0.9799 0.00 0.00 0.00 0.00 0.00 5.96 2.23 0.0000 0.0480 0.0000 0.0000 0 0
+220 0 """REMER-40----""" 1.0461 0.00 0.00 0.00 0.00 0.00 1.34 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+221 0 """RENO--------""" 0.9937 0.00 0.00 0.00 0.00 0.00 4.80 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+222 0 """RICHMOND----""" 1.0130 0.00 0.00 0.00 0.00 0.00 5.63 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+223 0 """RIFLE-------""" 0.9886 0.00 0.00 0.00 0.00 0.00 6.13 2.97 0.0000 0.0480 0.0000 0.0000 0 0
+224 0 """RIVER-RAISIN""" 1.0072 0.00 0.00 0.00 0.00 0.00 0.92 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+225 2 """RIVERVIEW-40""" 1.0021 0.00 25.00 -100.00 -10.00 20.00 145.57 79.69 0.0000 0.3600 0.0000 0.0000 0 0
+226 0 """ROCHESTER-1-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.55 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+227 0 """ROCKWOOD----""" 1.0345 0.00 0.00 0.00 0.00 0.00 5.80 1.59 0.0000 0.0340 0.0000 0.0000 0 0
+228 0 """ROMEO---EQ1-""" 1.0133 0.00 0.00 0.00 0.00 0.00 6.13 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+229 0 """ROMULUS---40""" 1.0151 0.00 0.00 0.00 0.00 0.00 20.66 13.07 0.0000 0.1680 0.0000 0.0000 0 0
+230 0 """RUSH-TAP----""" 0.9835 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+231 0 """RUSH-40-----""" 1.0014 0.00 0.00 0.00 0.00 0.00 3.70 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+232 0 """SALEM-------""" 1.0417 0.00 0.00 0.00 0.00 0.00 1.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+233 0 """SALINE------""" 1.0017 0.00 0.00 0.00 0.00 0.00 9.10 4.87 0.0000 0.0960 0.0000 0.0000 0 0
+234 0 """SANDUSKY-40-""" 1.0042 0.00 0.00 0.00 0.00 0.00 5.29 1.91 0.0000 0.0660 0.0000 0.0000 0 0
+235 0 """SAXON-------""" 0.9916 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+236 0 """SEBEWAING---""" 1.0083 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+237 0 """SELFRIDGE-1-""" 1.0074 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+238 0 """SELKIRK-----""" 1.0092 0.00 0.00 0.00 0.00 0.00 6.05 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+239 0 """SHAW--------""" 0.9720 0.00 0.00 0.00 0.00 0.00 1.60 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+240 0 """SHELDON-1---""" 0.9578 0.00 0.00 0.00 0.00 0.00 5.29 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+241 0 """SHERWOOD----""" 1.0148 0.00 0.00 0.00 0.00 0.00 1.93 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+242 0 """SNOVER------""" 0.9929 0.00 0.00 0.00 0.00 0.00 1.60 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+243 0 """SOUTHFLD-40-""" 1.0066 0.00 0.00 0.00 0.00 0.00 99.54 81.89 0.0000 0.0900 0.0000 0.0000 0 0
+244 0 """STATE-1-----""" 1.0247 0.00 0.00 0.00 0.00 0.00 5.60 3.25 0.0000 0.0000 0.0000 0.0000 0 0
+245 0 """SPOKANE-40--""" 1.0014 0.00 0.00 0.00 0.00 0.00 36.54 16.57 0.0000 0.0000 0.0000 0.0000 0 0
+246 0 """ST-CLAIR-1--""" 1.0259 0.00 0.00 0.00 0.00 0.00 2.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+247 0 """ST-CLAIR-2--""" 1.0352 0.00 0.00 0.00 0.00 0.00 2.69 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+248 0 """STEPHENS-24-""" 1.0074 0.00 0.00 0.00 0.00 0.00 164.30 105.69 0.0000 0.5700 0.0000 0.0000 0 0
+249 0 """STERLING-40-""" 1.0210 0.00 0.00 0.00 0.00 0.00 101.14 45.79 0.0000 0.5400 0.0000 0.0000 0 0
+250 0 """STOCKBRIDGE-""" 1.0701 0.00 0.00 0.00 0.00 0.00 1.09 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+251 0 """1STOCKWELLCP""" 1.0172 0.00 0.00 0.00 0.00 0.00 10.90 6.75 0.0000 0.0000 0.0000 0.0000 0 0
+252 0 """SUNSET-40---""" 1.0041 0.00 0.00 0.00 0.00 0.00 78.79 59.01 0.0000 0.5160 0.0000 0.0000 0 0
+253 2 """SUPERIOR-40-""" 1.0189 0.00 0.00 0.00 0.00 118.00 61.49 48.74 0.0000 0.1800 0.0000 0.0000 0 0
+254 0 """TIENKEN-2---""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+255 0 """TALBOT---EQ1""" 0.9854 0.00 0.00 0.00 0.00 0.00 2.35 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+256 0 """1TAYLOR-1-13""" 1.0121 0.00 0.00 0.00 0.00 0.00 10.67 6.27 0.0000 0.0000 0.0000 0.0000 0 0
+257 0 """1TAYLOR-2-13""" 1.0154 0.00 0.00 0.00 0.00 0.00 8.65 6.48 0.0000 0.0000 0.0000 0.0000 0 0
+258 0 """TEGGERDINE--""" 0.9815 0.00 0.00 0.00 0.00 0.00 11.34 4.67 0.0000 0.0000 0.0000 0.0000 0 0
+259 0 """TEMPLE------""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.59 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+260 0 """TEXAS-------""" 1.0281 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+261 0 """TODD--------""" 1.0426 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+262 0 """TRINITY-2---""" 1.0107 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+263 0 """TROY-40-----""" 0.9963 0.00 0.00 0.00 0.00 0.00 178.92 77.64 0.0000 0.5400 0.0000 0.0000 0 0
+264 0 """TUSCOLA-40--""" 1.0020 0.00 0.00 0.00 0.00 0.00 6.22 2.55 0.0000 0.0660 0.0000 0.0000 0 0
+265 0 """UNION-LAKE--""" 0.9771 0.00 0.00 0.00 0.00 0.00 11.84 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+266 0 """UNIONVILLE--""" 1.0120 0.00 0.00 0.00 0.00 0.00 1.26 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+267 0 """UNIVR-BUS1T6""" 1.0250 0.00 0.00 0.00 0.00 0.00 11.17 8.71 0.0000 0.0000 0.0000 0.0000 0 0
+268 0 """URBAN-TEC---""" 0.9887 0.00 0.00 0.00 0.00 0.00 5.12 3.19 0.0000 0.0000 0.0000 0.0000 0 0
+269 0 """UTAH--------""" 1.0415 0.00 0.00 0.00 0.00 0.00 0.76 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+270 0 """VANBUREN-EQ1""" 1.0128 0.00 0.00 0.00 0.00 0.00 1.51 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+271 0 """VASSAR-BIRCH""" 0.9744 0.00 0.00 0.00 0.00 0.00 10.00 5.74 0.0000 0.0660 0.0000 0.0000 0 0
+272 0 """VICTOR-40---""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+273 0 """VALLEY------""" 1.0268 0.00 6.00 20.00 0.00 0.00 0.90 0.62 0.0000 0.0000 0.0000 0.0000 0 0
+274 0 """WABASH-40---""" 1.0066 0.00 0.00 0.00 0.00 0.00 46.70 26.25 0.0000 0.0000 0.0000 0.0000 0 0
+275 0 """WALLED-LAKE-""" 0.9972 0.00 0.00 0.00 0.00 0.00 6.00 2.62 0.0000 0.0000 0.0000 0.0000 0 0
+276 0 """WALNUT-1,2--""" 0.9814 0.00 0.00 0.00 0.00 0.00 9.60 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+277 0 """WALTON40-SUB""" 1.0330 0.00 0.00 0.00 0.00 0.00 44.35 20.08 0.0000 0.1800 0.0000 0.0000 0 0
+278 0 """WARDLOW-----""" 0.9956 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+279 2 """WARREN-24---""" 1.0171 0.00 0.00 540.00 0.00 54.00 268.46 194.97 0.0000 0.9000 0.0000 0.0000 0 0
+280 0 """WASHNGTN-EQ1""" 1.0002 0.00 0.00 0.00 0.00 0.00 8.57 4.36 0.0000 0.0660 0.0000 0.0000 0 0
+281 0 """WATERFORD---""" 0.9903 0.00 0.00 0.00 0.00 0.00 17.81 5.52 0.0000 0.1800 0.0000 0.0000 0 0
+282 0 """WEBERVLE-EQ1""" 1.0885 0.00 0.00 0.00 0.00 0.00 8.23 1.91 0.0000 0.1140 0.0000 0.0000 0 0
+283 0 """WHITE-LAKE--""" 0.9941 0.00 0.00 0.00 0.00 0.00 4.70 1.59 0.0000 0.0000 0.0000 0.0000 0 0
+284 0 """WHITMORE-LK-""" 1.0357 0.00 0.00 0.00 0.00 0.00 7.81 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+285 0 """WHITNY-FUT73""" 1.0033 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+286 0 """WILEY-------""" 1.0197 0.00 0.00 0.00 0.00 0.00 1.26 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+287 0 """WILMOTK-NGFD""" 0.9922 0.00 0.00 0.00 0.00 0.00 0.84 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+288 0 """WILSON------""" 1.0128 0.00 0.00 0.00 0.00 0.00 2.60 -0.21 0.0000 0.0000 0.0000 0.0000 0 0
+289 0 """1WILSON-CP--""" 1.0157 0.00 0.00 0.00 0.00 0.00 8.60 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+290 0 """WOLFHILL----""" 0.9897 0.00 0.00 0.00 0.00 0.00 4.96 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+291 0 """WOLVERINE-2-""" 1.0200 0.00 0.00 0.00 0.00 0.00 5.12 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+292 0 """WORTH-------""" 1.0069 0.00 0.00 0.00 0.00 0.00 2.18 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+293 0 """YALE-TAP----""" 0.9902 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+294 0 """YALE--------""" 0.9870 0.00 0.00 0.00 0.00 0.00 3.11 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+295 0 """YATES-------""" 0.9871 0.00 0.00 0.00 0.00 0.00 1.34 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+296 0 """YORK--------""" 0.9901 0.00 0.00 0.00 0.00 0.00 2.44 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+297 0 """YOST-40-----""" 1.0354 0.00 0.00 0.00 0.00 0.00 48.55 26.29 0.0000 0.0480 0.0000 0.0000 0 0
+298 0 """2ADAMS-----1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+299 0 """2ALFRED----1""" 1.0468 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+300 0 """ALFRED-13---""" 1.0489 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+301 0 """2AMHERST1.13""" 1.0230 0.00 0.00 0.00 0.00 0.00 7.56 4.72 0.0000 0.0000 0.0000 0.0000 0 0
+302 0 """2AMHERST2.13""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+303 0 """2ARROWHEAD-1""" 1.0315 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+304 0 """2BAD-AXE---1""" 1.0460 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+305 0 """2BLOOMFLD--1""" 1.0065 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+306 0 """2BROWNTN---3""" 1.0081 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+307 0 """2BROWNTN---2""" 1.0314 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+308 2 """2BROWNTN-N-1""" 1.0263 0.00 0.00 -910.00 -91.00 338.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+309 0 """2BROWNTN-S-1""" 1.0117 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+310 0 """2BUNCE-CK--1""" 1.1567 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+311 0 """2B3N-DECO230""" 1.0877 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+312 0 """2-BURNS-1--1""" 1.0578 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+313 0 """2-BURNS-2--1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+314 0 """2CANIFF----3""" 1.0261 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+315 0 """2CANIFF----1""" 1.0433 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+316 0 """2CATALINA-CP""" 1.0064 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+317 0 """2CATO------1""" 1.0403 0.00 0.00 0.00 0.00 0.00 57.14 27.68 0.0000 0.0000 0.0000 0.0000 0 0
+318 0 """2CHESTNUT--1""" 1.0164 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+319 0 """2CODY------1""" 0.9887 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+320 2 """2CONNER-G.24""" 1.0404 0.00 285.00 1770.00 0.00 1770.00 436.28 182.01 0.0000 0.0000 0.0000 0.0000 0 0
+321 0 """2COOPER----1""" 1.0059 0.00 0.00 0.00 0.00 0.00 1.34 2.31 0.0000 0.0000 0.0000 0.0000 0 0
+322 0 """2CORTLAND--1""" 1.0392 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+323 0 """2COVENTRY--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+324 0 """2COVENTRY--1""" 0.9810 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+325 0 """2CRESTWOOD-1""" 1.0120 0.00 0.00 0.00 0.00 0.00 3.56 1.78 0.0000 0.0000 0.0000 0.0000 0 0
+326 0 """2CUSTER----1""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+327 0 """2C-3DECO-138""" 0.9752 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+328 0 """2DAYTON----1""" 0.9863 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+329 2 """2DELRAY-16-1""" 1.0200 0.00 72.00 350.00 0.00 54.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+330 2 """2DELRAY-G.24""" 1.0483 0.00 236.00 2320.00 0.00 2320.00 290.94 159.76 0.0000 0.0000 0.0000 0.0000 0 0
+331 0 """2ELM-------1""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+332 0 """2E.FERMI---1""" 0.9983 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+333 0 """2ERIN------1""" 1.0331 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+334 0 """2E-N-S-TAP11""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+335 0 """2E-N-S-TAP21""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+336 2 """2ESSEX-----1""" 1.0543 0.00 274.00 0.00 0.00 140.00 0.00 0.00 0.0000 1.0800 0.0000 0.0000 0 0
+337 0 """2EVERGREEN-1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+338 0 """2FLEETWD-1-1""" 1.0428 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+339 0 """2FLEETWD-2-1""" 1.0456 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+340 0 """2FLEETWD--13""" 1.0161 0.00 0.00 0.00 0.00 0.00 12.02 5.78 0.0000 0.0000 0.0000 0.0000 0 0
+341 0 """2FOMOCO-C1-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+342 0 """2FOMOCO-C2-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+343 0 """2FRISBIE---1""" 1.0414 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+344 0 """2GENOA-----1""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+345 0 """2HANCOCK---1""" 1.0042 0.00 82.00 210.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+346 2 """2HARB.BEA.-1""" 1.0597 0.00 114.00 -300.00 -30.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+347 0 """2HINES-----1""" 0.9897 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+348 0 """2HUNTER-CK.1""" 1.0432 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+349 0 """2IRONTON---1""" 1.0310 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+350 0 """2IRN-NA-RV-1""" 1.0272 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+351 0 """2IMLAY-1PUP1""" 1.0685 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+352 0 """2JEFFERSON-1""" 1.0257 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+353 0 """2KTT-DECO138""" 1.0748 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+354 0 """2LK.HURON1P1""" 1.1530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+355 0 """2LK.HURON2P1""" 1.1335 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+356 0 """2LAPEER----1""" 1.0390 0.00 0.00 0.00 0.00 0.00 7.83 2.85 0.0000 0.0000 0.0000 0.0000 0 0
+357 0 """2LARK------1""" 0.9720 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+358 0 """2LEE-------1""" 1.1215 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+359 0 """2LINCOLN---1""" 1.0100 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+360 0 """2LN-NE-NW--1""" 1.0129 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+361 0 """2LOGAN-1---1""" 1.0326 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+362 0 """2LOGAN-1-.13""" 1.0161 0.00 0.00 0.00 0.00 0.00 8.54 2.49 0.0000 0.0000 0.0000 0.0000 0 0
+363 0 """2LOGAN-2---1""" 1.0362 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+364 0 """2LOGAN-2-.13""" 1.0153 0.00 0.00 0.00 0.00 0.00 8.46 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+365 0 """2LONG-LK-1-1""" 1.0035 0.00 0.00 0.00 0.00 0.00 7.12 1.69 0.0000 0.0000 0.0000 0.0000 0 0
+366 0 """2LONG-LK-2-1""" 1.0046 0.00 0.00 0.00 0.00 0.00 6.68 1.25 0.0000 0.0000 0.0000 0.0000 0 0
+367 0 """2LUZON-----1""" 0.9694 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+368 0 """2LUZON-W.40D""" 0.9908 0.00 0.00 0.00 0.00 0.00 16.02 7.83 0.0000 0.0000 0.0000 0.0000 0 0
+369 0 """2MACOMB----1""" 1.0576 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+370 2 """2MARYSVILLE1""" 1.1521 0.00 84.00 0.00 0.00 60.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+371 0 """2MAXWELL-1-1""" 1.0236 0.00 0.00 0.00 0.00 0.00 18.16 11.21 0.0000 0.0000 0.0000 0.0000 0 0
+372 0 """2MAXWELL-2-1""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+373 0 """2MCLOUTH-1-1""" 1.0222 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+374 0 """2MCLOUTH-2-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+375 2 """2MCLOUTH-.24""" 1.0350 0.00 0.00 670.00 -30.00 100.00 108.22 48.42 0.0000 0.0000 0.0000 0.0000 0 0
+376 0 """2MEDINA----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+377 0 """2MIDTOWN---1""" 1.0409 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+378 2 """2MONRO-1,2-3""" 1.0100 0.00 1290.95 -880.00 -182.00 803.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+379 2 """2MONRO-3,4-3""" 1.0105 0.00 470.00 -910.00 -91.00 528.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+380 0 """2MTCALM-CP-1""" 1.0065 0.00 0.00 0.00 0.00 0.00 78.59 31.06 0.0000 0.0000 0.0000 0.0000 0 0
+381 0 """2NAVARRE---2""" 1.0244 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+382 0 """2NAVARRE---1""" 1.0256 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+383 0 """2NEWBURGH--1""" 0.9920 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+384 0 """2NOBLE-----1""" 0.9773 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+385 0 """2NORTHEAST-1""" 1.0287 0.00 54.00 140.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+386 0 """2N.E.STUB--1""" 1.0437 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+387 2 """2N.E.FLIK.24""" 1.0200 0.00 0.00 40.00 0.00 30.00 43.16 15.22 0.0000 0.0000 0.0000 0.0000 0 0
+388 0 """2NORTHWEST-1""" 0.9962 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+389 0 """2PHOENIX---1""" 0.9654 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+390 0 """2PIONEER-TP1""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+391 0 """2PIONEER---1""" 0.9633 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+392 0 """2PLACID----1""" 0.9882 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+393 0 """2PONTIAC---3""" 1.0328 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+394 0 """2PONTIAC---1""" 1.0213 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+395 0 """2RED-RUN---1""" 1.0352 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+396 0 """2REMER-----1""" 1.1466 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+397 0 """2R.R.EQZR.-1""" 1.0352 0.00 0.00 0.00 0.00 0.00 60.52 37.47 0.0000 0.0000 0.0000 0.0000 0 0
+398 2 """2R.ROUGE-1-1""" 1.0354 0.00 272.00 1880.00 0.00 188.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+399 2 """2R.ROUGE-2-1""" 1.0442 0.00 257.00 1980.00 0.00 198.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+400 2 """2R.ROUGE-3-1""" 1.0447 0.00 300.00 0.00 0.00 209.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+401 0 """2RIVERVU---1""" 1.0241 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+402 0 """2ROMULUS---1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+403 0 """2RUSH------1""" 1.0284 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+404 0 """2SANDUSKY--1""" 1.0989 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+405 0 """2SLOCUM----1""" 1.0153 0.00 14.00 40.00 0.00 0.00 57.49 27.86 0.0000 0.0000 0.0000 0.0000 0 0
+406 0 """2SOUTHFLD--1""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+407 0 """2SPOKANE---1""" 1.0200 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+408 2 """2ST-CLAIR--3""" 1.0433 0.00 498.00 0.00 0.00 215.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+409 2 """2ST-CL.1-3-1""" 1.1866 0.00 501.00 3220.00 0.00 322.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+410 2 """2ST-CL.4,5-1""" 1.1467 0.00 463.00 0.00 0.00 315.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+411 2 """2ST-CL.6---1""" 1.1194 0.00 322.00 0.00 0.00 190.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+412 0 """2STC-SP-STL1""" 1.0639 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+413 0 """2STEPHENS--3""" 1.0262 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+414 0 """2STEPHENS--1""" 1.0420 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+415 0 """2STERLING--1""" 1.0393 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+416 0 """2SUNSET----1""" 0.9976 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+417 0 """2SUPERIOR--1""" 0.9791 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+418 0 """2TAYLOR-1--1""" 1.0054 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+419 0 """2TAYLOR--2-1""" 1.0247 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+420 0 """2TEMPEST--CP""" 1.0062 0.00 0.00 0.00 0.00 0.00 11.84 3.92 0.0000 0.0000 0.0000 0.0000 0 0
+421 2 """2TRENTN-NA-1""" 1.0300 0.00 278.00 2220.00 0.00 225.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+422 2 """2TRENTN-SU-1""" 1.0300 0.00 593.00 1450.00 0.00 303.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+423 0 """2TROY------1""" 1.0029 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+424 0 """2TUSCOLA---1""" 1.0236 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+425 0 """2VICTOR----1""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+426 0 """2WABASH-TAP1""" 1.1463 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+427 0 """2WABASH----1""" 1.1431 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+428 0 """2WALTON----1""" 1.0096 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+429 0 """2WARREN----1""" 1.0148 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+430 0 """2WARREN-7--1""" 1.0400 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+431 0 """2WATERMAN--2""" 1.0227 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+432 0 """2WATERMAN--1""" 1.0418 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+433 0 """2WAT.EQZR.24""" 1.0311 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+434 0 """2WAYNE-----3""" 1.0091 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+435 0 """2WAYNE-----1""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+436 0 """2WHEELER---1""" 1.0040 0.00 0.00 0.00 0.00 0.00 24.21 15.04 0.0000 0.0000 0.0000 0.0000 0 0
+437 0 """2WILLOW-1T-1""" 0.9847 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+438 0 """2WILLOW-2T-1""" 0.9880 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+439 0 """2WILLO-RUN-1""" 0.9811 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+440 0 """2WILLOW--.13""" 0.9992 0.00 0.00 0.00 0.00 0.00 41.83 23.67 0.0000 0.0000 0.0000 0.0000 0 0
+441 0 """2WIXOM-----3""" 1.0194 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+442 0 """2WIXOM-----1""" 1.0035 0.00 0.00 0.00 0.00 0.00 10.86 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+443 0 """2WOODHVN-1-1""" 1.0278 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+444 0 """2WOODHVN1.13""" 1.0229 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+445 0 """2WDHVN-TP2-1""" 1.0248 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+446 0 """2WOODHVN-2-1""" 1.0240 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+447 0 """2WOODHVN2.13""" 1.0124 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+448 0 """2YOST------1""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+449 0 """3ALBA-TIE--1""" 1.1233 0.00 0.00 0.00 0.00 0.00 2.50 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+450 0 """3ALCONA-D--1""" 1.1170 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+451 0 """3ALGOMA----1""" 1.0365 0.00 0.00 0.00 0.00 0.00 14.00 -1.10 0.0000 0.0000 0.0000 0.0000 0 0
+452 0 """3ALMA------1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.40 2.10 0.0000 0.1000 0.0000 0.0000 0 0
+453 0 """3ALMEDA----1""" 1.0459 0.00 0.00 0.00 0.00 0.00 14.10 4.30 0.0000 0.0215 0.0000 0.0000 0 0
+454 0 """3ALPENA----1""" 1.1632 0.00 0.00 0.00 0.00 0.00 33.10 5.20 0.0000 0.2880 0.0000 0.0000 0 0
+455 0 """3AMBER-----1""" 1.0260 0.00 0.00 0.00 0.00 0.00 19.00 15.60 0.0000 0.0000 0.0000 0.0000 0 0
+456 0 """3ARGENTA---3""" 1.0555 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+457 0 """3ARGENTA---1""" 1.0537 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+458 0 """3A-1CPCO-120""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+459 0 """3BANGOR----1""" 1.0383 0.00 0.00 0.00 0.00 0.00 8.60 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+460 0 """3BARD-RD---1""" 1.0831 0.00 0.00 0.00 0.00 0.00 6.30 1.20 0.0000 0.0000 0.0000 0.0000 0 0
+461 0 """3BARRY-----1""" 1.0416 0.00 0.00 0.00 0.00 0.00 27.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+462 0 """3BASS-CRK--1""" 1.0389 0.00 0.00 0.00 0.00 0.00 17.80 3.20 0.0000 0.0000 0.0000 0.0000 0 0
+463 0 """3BATAVIA---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 23.20 0.10 0.0000 0.0800 0.0000 0.0000 0 0
+464 0 """3BEALS-RD.-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 146.80 48.60 0.0000 0.1500 0.0000 0.0000 0 0
+465 0 """3BEECHER---1""" 1.0185 0.00 0.00 0.00 0.00 0.00 61.40 30.10 0.0000 0.0800 0.0000 0.0000 0 0
+466 0 """3BEGOLE----1""" 1.0444 0.00 0.00 0.00 0.00 0.00 19.70 2.50 0.0000 0.1530 0.0000 0.0000 0 0
+467 0 """3BEVERIDGE-1""" 1.0238 0.00 0.00 0.00 0.00 0.00 50.90 24.30 0.0000 0.1388 0.0000 0.0000 0 0
+468 2 """3BIG-ROCK--1""" 1.1480 0.00 50.00 -140.00 -14.00 28.00 0.00 0.00 0.0000 0.0116 0.0000 0.0000 0 0
+469 0 """3BINGHAM---1""" 1.0446 0.00 0.00 0.00 0.00 0.00 17.60 -7.80 0.0000 0.1928 0.0000 0.0000 0 0
+470 0 """3BLACK-RIV-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 49.90 8.50 0.0000 0.0000 0.0000 0.0000 0 0
+471 0 """3BLACKSTON-1""" 1.0188 0.00 0.00 200.00 0.00 0.00 83.10 22.00 0.0000 0.0800 0.0000 0.0000 0 0
+472 0 """3BOARDMAN--1""" 1.0825 0.00 2.00 0.00 0.00 0.00 27.80 16.10 0.0000 0.1042 0.0000 0.0000 0 0
+473 0 """3BUICK-STEW1""" 1.0363 0.00 0.00 0.00 0.00 0.00 40.50 17.10 0.0000 0.0000 0.0000 0.0000 0 0
+474 0 """3BULLOCK---1""" 1.0269 0.00 0.00 0.00 0.00 0.00 37.10 37.10 0.0000 0.1578 0.0000 0.0000 0 0
+475 2 """3CAMPBELL--1""" 1.0554 0.00 584.00 0.00 0.00 390.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+476 0 """3CEMENT-CY-1""" 1.0188 0.00 0.00 0.00 0.00 0.00 28.00 -0.20 0.0000 0.1000 0.0000 0.0000 0 0
+477 0 """3CHASE-----1""" 1.0429 0.00 0.00 0.00 0.00 0.00 4.90 2.20 0.0000 0.0000 0.0000 0.0000 0 0
+478 0 """3CLAIRMONT-1""" 1.0230 0.00 0.00 0.00 0.00 0.00 73.60 28.60 0.0000 0.1646 0.0000 0.0000 0 0
+479 0 """3CLEVELAND-1""" 1.0356 0.00 0.00 0.00 0.00 0.00 32.90 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+480 2 """3COBB------1""" 1.0400 0.00 476.00 40.00 0.00 421.00 79.30 35.60 0.0000 0.0000 0.0000 0.0000 0 0
+481 0 """3CORK-ST.--1""" 1.0494 0.00 0.00 0.00 0.00 0.00 17.00 7.20 0.0000 0.0000 0.0000 0.0000 0 0
+482 0 """3CORNELL---1""" 1.0290 0.00 0.00 0.00 0.00 0.00 33.30 12.00 0.0000 0.1981 0.0000 0.0000 0 0
+483 0 """3COTTEGE-GR1""" 1.0738 0.00 0.00 0.00 0.00 0.00 1.70 0.70 0.0000 0.0000 0.0000 0.0000 0 0
+484 0 """3CROTON----1""" 1.0342 0.00 29.00 0.00 0.00 0.00 10.40 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+485 0 """3DEAN-RD.--1""" 1.0521 0.00 0.00 0.00 0.00 0.00 3.60 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+486 0 """3DEJA------1""" 1.0414 0.00 0.00 0.00 0.00 0.00 13.80 -2.50 0.0000 0.0000 0.0000 0.0000 0 0
+487 0 """3DELANEY---1""" 1.0469 0.00 0.00 0.00 0.00 0.00 64.80 25.10 0.0000 0.2698 0.0000 0.0000 0 0
+488 0 """3DELH1-----1""" 1.0442 0.00 0.00 0.00 0.00 0.00 36.90 -10.00 0.0000 0.2783 0.0000 0.0000 0 0
+489 0 """3DORT------1""" 1.0425 0.00 0.00 0.00 0.00 0.00 106.40 37.90 0.0000 0.4626 0.0000 0.0000 0 0
+490 0 """3DOW-CHLOR.1""" 1.0243 0.00 0.00 0.00 0.00 0.00 49.00 24.00 0.0000 0.0000 0.0000 0.0000 0 0
+491 0 """3DU-PONTE--1""" 1.0355 0.00 0.00 0.00 0.00 0.00 2.20 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+492 0 """3D-4CPCO-120""" 1.0444 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+493 0 """3EDENVILLE-1""" 1.0405 0.00 0.00 0.00 0.00 0.00 7.10 -4.70 0.0000 0.0000 0.0000 0.0000 0 0
+494 2 """3ELM-STREET1""" 1.0444 0.00 29.00 0.00 0.00 7.00 32.70 23.30 0.0000 0.0000 0.0000 0.0000 0 0
+495 0 """3EMMET-----1""" 1.1457 0.00 0.00 0.00 0.00 0.00 21.00 3.90 0.0000 0.0000 0.0000 0.0000 0 0
+496 0 """3EUREKA----1""" 1.0398 0.00 0.00 0.00 0.00 0.00 21.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+497 0 """3FELCH-RD.-1""" 1.0331 0.00 0.00 0.00 0.00 0.00 14.00 5.90 0.0000 0.0000 0.0000 0.0000 0 0
+498 0 """3FISHER----1""" 1.0445 0.00 0.00 0.00 0.00 0.00 14.10 4.60 0.0000 0.0000 0.0000 0.0000 0 0
+499 0 """3FOUNDRY---1""" 1.0316 0.00 0.00 0.00 0.00 0.00 31.70 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+500 0 """3FOUR-MILE-1""" 1.0406 0.00 2.00 0.00 0.00 0.00 111.80 32.80 0.0000 0.1000 0.0000 0.0000 0 0
+501 0 """3GARFIELD--1""" 1.0354 0.00 0.00 0.00 0.00 0.00 72.20 32.00 0.0000 0.0353 0.0000 0.0000 0 0
+502 2 """3GAYLORD---1""" 1.1519 0.00 60.00 0.00 0.00 15.00 10.10 1.90 0.0000 0.0826 0.0000 0.0000 0 0
+503 0 """3GENOA-----1""" 1.0678 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+504 0 """3GLEANER---1""" 1.0283 0.00 0.00 0.00 0.00 0.00 18.80 6.90 0.0000 0.0000 0.0000 0.0000 0 0
+505 0 """3GREY-IRON-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 53.50 17.50 0.0000 0.0000 0.0000 0.0000 0 0
+506 0 """3HALSEY----1""" 1.0458 0.00 0.00 0.00 0.00 0.00 20.40 3.80 0.0000 0.1148 0.0000 0.0000 0 0
+507 0 """3HARDY-DAM-1""" 1.0343 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+508 0 """3HAZELWOOD-1""" 1.0525 0.00 0.00 0.00 0.00 0.00 39.10 7.20 0.0000 0.0400 0.0000 0.0000 0 0
+509 0 """3HEMPHILL--1""" 1.0447 0.00 0.00 0.00 0.00 0.00 134.10 62.70 0.0000 0.6928 0.0000 0.0000 0 0
+510 0 """3HIGGINS---1""" 1.1065 0.00 0.00 0.00 0.00 0.00 18.90 2.80 0.0000 0.0000 0.0000 0.0000 0 0
+511 0 """3HODENPYL--1""" 1.0686 0.00 0.00 0.00 0.00 0.00 8.40 -0.80 0.0000 0.0000 0.0000 0.0000 0 0
+512 0 """3HOLLAN-RD-1""" 1.0168 0.00 0.00 0.00 0.00 0.00 42.80 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+513 0 """3HOOKER----1""" 1.0348 0.00 0.00 0.00 0.00 0.00 26.40 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+514 0 """3HUGHES-RD-1""" 1.0377 0.00 0.00 0.00 0.00 0.00 21.80 4.80 0.0000 0.0000 0.0000 0.0000 0 0
+515 0 """3IOSCO-----1""" 1.1238 0.00 19.00 0.00 0.00 0.00 12.80 5.70 0.0000 0.0263 0.0000 0.0000 0 0
+516 0 """3ISLAND-RD-1""" 1.0435 0.00 0.00 0.00 0.00 0.00 29.20 -2.90 0.0000 0.1086 0.0000 0.0000 0 0
+517 2 """3KARN------1""" 1.0563 0.00 498.00 0.00 0.00 337.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+518 0 """3KENOWA----3""" 1.0865 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+519 0 """3LATSON----1""" 1.0558 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+520 0 """3LAWNDALE--1""" 1.0265 0.00 0.00 0.00 0.00 0.00 39.90 17.00 0.0000 0.0000 0.0000 0.0000 0 0
+521 0 """3LAYTON----1""" 1.0246 0.00 0.00 0.00 0.00 0.00 16.10 1.80 0.0000 0.0000 0.0000 0.0000 0 0
+522 0 """3LEWISTON--1""" 1.1462 0.00 0.00 0.00 0.00 0.00 2.60 0.80 0.0000 0.0000 0.0000 0.0000 0 0
+523 0 """3LINBERGH--1""" 1.0424 0.00 0.00 0.00 0.00 0.00 42.40 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+524 0 """3LOOK-GLAS-1""" 1.0411 0.00 0.00 0.00 0.00 0.00 25.30 -3.20 0.0000 0.0000 0.0000 0.0000 0 0
+525 0 """3LOUD------1""" 1.1048 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0040 0.0000 0.0000 0 0
+526 2 """3LUDINGTON-3""" 1.0978 0.00 0.00 0.00 0.00 200.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+527 0 """3MALLEABLE-1""" 1.0211 0.00 0.00 0.00 0.00 0.00 61.50 17.20 0.0000 0.0000 0.0000 0.0000 0 0
+528 0 """3MARQUETTE-1""" 1.0444 0.00 2.00 0.00 0.00 0.00 17.80 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+529 0 """3MECOSTA---1""" 1.0370 0.00 0.00 0.00 0.00 0.00 15.90 3.60 0.0000 0.0000 0.0000 0.0000 0 0
+530 0 """3MEDUSA----1""" 1.1103 0.00 0.00 0.00 0.00 0.00 11.50 1.60 0.0000 0.0000 0.0000 0.0000 0 0
+531 0 """3MILES-RD.-1""" 1.1103 0.00 0.00 0.00 0.00 0.00 7.70 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+532 0 """3MILHAM----1""" 1.0437 0.00 0.00 0.00 0.00 0.00 36.30 9.60 0.0000 0.1413 0.0000 0.0000 0 0
+533 0 """3MIO-------1""" 1.1407 0.00 9.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.2067 0.0000 0.0000 0 0
+534 0 """3MONITOR---1""" 1.0319 0.00 0.00 0.00 0.00 0.00 41.40 14.30 0.0000 0.0503 0.0000 0.0000 0 0
+535 0 """3MOORE-RD--1""" 0.9940 0.00 0.00 0.00 0.00 0.00 40.80 10.60 0.0000 0.0000 0.0000 0.0000 0 0
+536 2 """3MORROW----1""" 1.0500 0.00 130.00 0.00 0.00 168.00 80.20 31.20 0.0000 0.1836 0.0000 0.0000 0 0
+537 0 """3MUSKEGN-HT1""" 1.0212 0.00 0.00 0.00 0.00 0.00 72.90 52.50 0.0000 0.0000 0.0000 0.0000 0 0
+538 0 """3NODULAR---1""" 1.0228 0.00 0.00 0.00 0.00 0.00 34.40 16.80 0.0000 0.0000 0.0000 0.0000 0 0
+539 0 """3N.BELDING-1""" 1.0422 0.00 0.00 0.00 0.00 0.00 20.70 -2.30 0.0000 0.1000 0.0000 0.0000 0 0
+540 0 """3OAKLAND---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 17.80 5.80 0.0000 0.0000 0.0000 0.0000 0 0
+541 0 """3OGEMAW----1""" 1.0698 0.00 0.00 0.00 0.00 0.00 11.90 -7.50 0.0000 0.0000 0.0000 0.0000 0 0
+542 0 """3OWOSSO----1""" 1.0282 0.00 0.00 0.00 0.00 0.00 29.20 10.40 0.0000 0.0000 0.0000 0.0000 0 0
+543 0 """3PAGE------1""" 1.0180 0.00 0.00 0.00 0.00 0.00 45.80 5.40 0.0000 0.0800 0.0000 0.0000 0 0
+544 2 """3PALISADES-3""" 1.0392 0.00 701.70 0.00 0.00 418.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+545 0 """3PASEDENA--1""" 1.0263 0.00 0.00 0.00 0.00 0.00 48.70 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+546 0 """3PENN-DIXIE1""" 1.1463 0.00 0.00 0.00 0.00 0.00 6.60 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+547 0 """3PT.CALCIT-1""" 1.1721 0.00 0.00 0.00 0.00 0.00 9.40 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+548 0 """3RAISIN----1""" 1.0280 0.00 0.00 0.00 0.00 0.00 21.10 8.80 0.0000 0.0000 0.0000 0.0000 0 0
+549 0 """3RICE-CREK-1""" 1.0323 0.00 0.00 0.00 0.00 0.00 29.10 1.20 0.0000 0.2540 0.0000 0.0000 0 0
+550 0 """3RIFLE-RIV.1""" 1.0698 0.00 0.00 0.00 0.00 0.00 2.40 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+551 2 """3RIGGSVIL--1""" 1.1813 0.00 25.00 0.00 0.00 6.00 22.30 2.50 0.0000 0.1838 0.0000 0.0000 0 0
+552 0 """3RIVERVIEW-1""" 1.0513 0.00 0.00 0.00 0.00 0.00 79.60 28.70 0.0000 0.3312 0.0000 0.0000 0 0
+553 0 """3ROCKPORT--1""" 1.1679 0.00 0.00 0.00 0.00 0.00 1.00 0.20 0.0000 0.0000 0.0000 0.0000 0 0
+554 0 """3RONDO-----1""" 1.1683 0.00 0.00 0.00 0.00 0.00 3.40 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+555 0 """3SAGNAW-R.-1""" 1.0316 0.00 0.00 0.00 0.00 0.00 63.80 32.80 0.0000 0.1568 0.0000 0.0000 0 0
+556 0 """3SAMARIA---1""" 1.0341 0.00 0.00 0.00 0.00 0.00 23.10 10.70 0.0000 0.0000 0.0000 0.0000 0 0
+557 0 """3SCOTT-LK.-1""" 1.0470 0.00 0.00 0.00 0.00 0.00 17.10 5.70 0.0000 0.0000 0.0000 0.0000 0 0
+558 0 """3SPAULDING-1""" 1.0412 0.00 0.00 0.00 0.00 0.00 70.40 16.20 0.0000 0.0800 0.0000 0.0000 0 0
+559 0 """3SPRUCE----1""" 1.1468 0.00 0.00 0.00 0.00 0.00 4.40 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+560 0 """3STAMPG-PLT1""" 1.0446 0.00 0.00 0.00 0.00 0.00 11.60 3.80 0.0000 0.0000 0.0000 0.0000 0 0
+561 0 """3STRONACH--1""" 1.0397 0.00 0.00 0.00 0.00 0.00 21.20 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+562 0 """3STOVER----1""" 1.1154 0.00 0.00 0.00 0.00 0.00 6.60 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+563 0 """3SUMMERTON-1""" 1.0218 0.00 0.00 0.00 0.00 0.00 24.20 -2.10 0.0000 0.0000 0.0000 0.0000 0 0
+564 0 """3TALLMADGE-3""" 1.0815 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+565 0 """3TALLMADGE-1""" 1.0662 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+566 0 """3THETFORD--3""" 1.0579 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+567 2 """3THETFORD--1""" 1.0516 0.00 146.00 0.00 0.00 36.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+568 0 """3TITTABAW--3""" 1.0615 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+569 0 """3TITTABAW--1""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+570 0 """3TIPPY-DAM-1""" 1.0648 0.00 29.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.1255 0.0000 0.0000 0 0
+571 0 """3TOMPKINS--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+572 0 """3TUSC.TAP.-1""" 1.0626 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+573 0 """3TWINING---1""" 1.0667 0.00 0.00 0.00 0.00 0.00 8.70 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+574 0 """3UPJOHN----1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.80 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+575 2 """3VERONA----1""" 1.0467 0.00 29.00 0.00 0.00 7.00 78.70 10.40 0.0000 0.4710 0.0000 0.0000 0 0
+576 0 """3VEVAY-----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 18.30 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+577 0 """3WACKERLY--1""" 1.0295 0.00 0.00 0.00 0.00 0.00 29.80 9.70 0.0000 0.0000 0.0000 0.0000 0 0
+578 0 """3WARREN----1""" 1.0665 0.00 0.00 0.00 0.00 0.00 19.20 14.60 0.0000 0.3967 0.0000 0.0000 0 0
+579 0 """3WASHTENAW-1""" 1.0009 0.00 0.00 0.00 0.00 0.00 16.90 -3.00 0.0000 0.0000 0.0000 0.0000 0 0
+580 2 """3WEADOCK-B-1""" 1.0400 0.00 299.00 90.00 0.00 226.00 35.70 15.30 0.0000 0.0330 0.0000 0.0000 0 0
+581 2 """3WEADOCK-W-1""" 1.0476 0.00 319.00 0.00 0.00 191.00 36.60 15.30 0.0000 0.0000 0.0000 0.0000 0 0
+582 0 """3WEALTHY---1""" 1.0461 0.00 0.00 0.00 0.00 0.00 116.80 51.00 0.0000 0.0000 0.0000 0.0000 0 0
+583 0 """3WEXFORD---1""" 1.0784 0.00 0.00 0.00 0.00 0.00 24.60 -4.50 0.0000 0.0990 0.0000 0.0000 0 0
+584 0 """3WHITE-LK.-1""" 1.0342 0.00 9.00 0.00 0.00 0.00 11.80 6.80 0.0000 0.0000 0.0000 0.0000 0 0
+585 2 """3WHITING---1""" 1.0500 0.00 331.00 900.00 0.00 206.00 14.30 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+586 0 """3WILLARD---1""" 1.0411 0.00 0.00 0.00 0.00 0.00 23.60 3.70 0.0000 0.0000 0.0000 0.0000 0 0
+587 0 """4ALLANBURG-2""" 1.1270 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+588 0 """4BEACH-----2""" 1.0829 0.00 0.00 0.00 0.00 0.00 256.30 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+589 2 """4BEAUHARN--2""" 1.1266 0.00 600.00 500.00 -25.00 50.00 19.70 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+590 2 """4BECK------2""" 1.1280 0.00 1011.00 1890.00 -100.00 600.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+591 0 """4-BP-76-REG2""" 1.0551 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+592 0 """4BROCKVILLE2""" 1.0779 0.00 0.00 0.00 0.00 0.00 76.90 31.50 0.0000 0.0000 0.0000 0.0000 0 0
+593 0 """4BUCHANNAN-2""" 1.0643 0.00 0.00 0.00 0.00 0.00 600.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+594 2 """4BUCHANNAN-1""" 1.0472 0.00 0.00 -250.00 -25.00 200.00 326.80 52.40 0.0000 0.0000 0.0000 0.0000 0 0
+595 0 """4BURLINGTON2""" 1.0779 0.00 0.00 0.00 0.00 0.00 900.00 300.00 0.0000 0.0000 0.0000 0.0000 0 0
+596 0 """4CHATHAM---2""" 1.0922 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+597 2 """4CHATS-FALL2""" 1.1200 0.00 168.00 670.00 -30.00 70.00 7.00 3.30 0.0000 0.0000 0.0000 0.0000 0 0
+598 2 """4CHERRYWOOD2""" 1.0770 0.00 1000.00 4190.00 -300.00 600.00 650.00 212.60 0.0000 0.0000 0.0000 0.0000 0 0
+599 0 """4CRAWFORD--1""" 1.0371 0.00 0.00 0.00 0.00 0.00 64.00 28.00 0.0000 0.0000 0.0000 0.0000 0 0
+600 2 """4DESJOACH--2""" 1.1740 0.00 370.00 590.00 -50.00 175.00 16.10 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+601 2 """4DETWEILER-2""" 1.0550 0.00 0.00 230.00 -35.00 50.00 600.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+602 2 """4DOBBIN----2""" 1.0510 0.00 222.00 -310.00 -50.00 75.00 160.00 65.60 0.0000 0.0000 0.0000 0.0000 0 0
+603 2 """4DOUGLAS-PT2""" 1.1000 0.00 200.00 370.00 -50.00 80.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+604 0 """4EASTON-JCT2""" 1.0823 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+605 0 """4ESSA--230-2""" 1.0904 0.00 0.00 0.00 0.00 0.00 211.00 57.00 0.0000 0.0000 0.0000 0.0000 0 0
+606 0 """4ESSEX-115-1""" 1.0395 0.00 0.00 0.00 0.00 0.00 84.00 -6.00 0.0000 0.0000 0.0000 0.0000 0 0
+607 0 """4HANMER----5""" 1.0071 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 -2.1000 0.0000 0.0000 0 0
+608 0 """4HANNON----2""" 1.0931 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+609 0 """4HANOVER---2""" 1.0859 0.00 0.00 0.00 0.00 0.00 172.20 38.20 0.0000 0.0000 0.0000 0.0000 0 0
+610 0 """4HAWTHORNE-2""" 1.0613 0.00 0.00 0.00 0.00 0.00 400.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+611 0 """4HINCHBROOK2""" 1.0640 0.00 0.00 0.00 0.00 0.00 300.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+612 2 """4HOLDEN----2""" 1.1600 0.00 200.00 150.00 -50.00 90.00 96.00 25.00 0.0000 0.0000 0.0000 0.0000 0 0
+613 0 """4KEITH-230-2""" 1.0658 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+614 2 """4KEITH-115-1""" 1.0383 0.00 60.00 -100.00 -10.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+615 0 """4KENT------1""" 0.9963 0.00 0.00 0.00 0.00 0.00 122.80 29.80 0.0000 0.0000 0.0000 0.0000 0 0
+616 0 """4KLEINBURG-5""" 0.9713 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+617 0 """4KLEINBURG-2""" 1.0794 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+618 0 """4LAMBTON-345""" 1.0434 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+619 0 """4LAMBTON---2""" 1.1215 0.00 0.00 0.00 0.00 0.00 27.80 11.70 0.0000 0.0000 0.0000 0.0000 0 0
+620 2 """4LAMBTON-.24""" 1.1750 0.00 1450.00 7430.00 -500.00 1080.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+621 0 """4LAUZON----2""" 1.0537 0.00 0.00 0.00 0.00 0.00 86.00 20.00 0.0000 0.0000 0.0000 0.0000 0 0
+622 0 """4LAUZON----1""" 1.0421 0.00 0.00 0.00 0.00 0.00 124.70 16.20 0.0000 0.0000 0.0000 0.0000 0 0
+623 0 """4LEASIDE---2""" 1.0681 0.00 0.00 0.00 0.00 0.00 500.00 150.00 0.0000 0.0000 0.0000 0.0000 0 0
+624 0 """4-L-33-P---2""" 1.0530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+625 3 """4MANBY-----2""" 1.0650 0.00 726.60 450.00 0.00 0.00 950.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+626 2 """4MARTINDALE2""" 1.1071 0.00 435.00 -500.00 -50.00 100.00 627.00 98.50 0.0000 0.0000 0.0000 0.0000 0 0
+627 0 """4MERIVALE--2""" 0.9920 0.00 0.00 0.00 0.00 0.00 244.00 95.00 0.0000 0.0000 0.0000 0.0000 0 0
+628 0 """4MIDDLEPORT2""" 1.1049 0.00 0.00 0.00 0.00 0.00 40.00 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+629 0 """4MINDEN----2""" 1.1309 0.00 0.00 0.00 0.00 0.00 92.60 31.90 0.0000 0.0000 0.0000 0.0000 0 0
+630 2 """4NANTICO---2""" 1.1570 0.00 1940.00 7680.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+631 2 """4NORTH-BAY-2""" 1.1500 0.00 245.00 -110.00 -50.00 100.00 27.20 11.90 0.0000 0.0000 0.0000 0.0000 0 0
+632 0 """4NEALE-----2""" 1.0954 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+633 0 """4ORANGEVIL-2""" 1.0761 0.00 0.00 0.00 0.00 0.00 67.00 40.00 0.0000 0.0000 0.0000 0.0000 0 0
+634 0 """4-PA-27-REG2""" 1.0521 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+635 0 """4PAUGAN----2""" 1.1278 0.00 0.00 0.00 0.00 0.00 8.30 2.50 0.0000 0.0000 0.0000 0.0000 0 0
+636 0 """4PINARD----5""" 1.0473 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+637 2 """4PINARD----2""" 1.0400 0.00 550.00 600.00 -300.00 300.00 0.00 0.00 0.0000 -1.0470 0.0000 0.0000 0 0
+638 0 """4PORCUPINE-5""" 1.0447 0.00 0.00 0.00 0.00 0.00 90.00 32.10 0.0000 0.0000 0.0000 0.0000 0 0
+639 0 """4RICHVIEW--2""" 1.0681 0.00 0.00 0.00 0.00 0.00 800.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+640 2 """4STLAWRENCE2""" 1.1139 0.00 744.00 3000.00 -100.00 300.00 250.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+641 0 """4STLAWRENCE1""" 1.0058 0.00 0.00 0.00 0.00 0.00 49.50 21.00 0.0000 0.0000 0.0000 0.0000 0 0
+642 0 """4STTHOMAS--1""" 1.0326 0.00 0.00 0.00 0.00 0.00 165.00 11.00 0.0000 0.0000 0.0000 0.0000 0 0
+643 0 """4SANDWICH--2""" 1.0611 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+644 0 """4SAND.WEST-2""" 1.0622 0.00 0.00 0.00 0.00 0.00 114.80 51.60 0.0000 0.0000 0.0000 0.0000 0 0
+645 0 """4SCOTT-----2""" 1.0961 0.00 0.00 0.00 0.00 0.00 160.00 41.70 0.0000 0.0000 0.0000 0.0000 0 0
+646 0 """4SCOTT-----1""" 1.0396 0.00 0.00 0.00 0.00 0.00 169.50 36.20 0.0000 0.0000 0.0000 0.0000 0 0
+647 0 """4WONDERLAND2""" 1.0664 0.00 0.00 0.00 0.00 0.00 79.30 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+648 0 """5BAYSHORE-T3""" 1.0112 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+649 2 """5BAYSHORE-T1""" 1.0300 0.00 600.00 2680.00 -1000.00 1000.00 760.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+650 2 """5LEMOYNE--T3""" 1.0120 0.00 0.00 1900.00 -1000.00 1000.00 175.00 90.80 0.0000 0.0000 0.0000 0.0000 0 0
+651 0 """5BENTON-HBR3""" 1.0329 0.00 0.00 0.00 0.00 0.00 330.00 16.90 0.0000 0.0000 0.0000 0.0000 0 0
+652 2 """5D.C.COOK--3""" 1.0300 0.00 2501.67 990.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+653 2 """5DUMONT----3""" 1.0300 0.00 850.00 5270.00 -1000.00 1000.00 167.00 50.00 0.0000 0.0000 0.0000 0.0000 0 0
+654 2 """5E.LIMA----3""" 0.9900 0.00 80.00 860.00 -1000.00 1000.00 350.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+655 2 """5FOSTORIA--3""" 1.0000 0.00 0.00 -490.00 -1000.00 1000.00 254.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+656 2 """5OLIVE-----3""" 1.0200 0.00 0.00 -2130.00 -1000.00 1000.00 394.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+657 2 """5ROBISON-PK3""" 0.9800 0.00 0.00 -630.00 -1000.00 1000.00 460.00 169.80 0.0000 0.0000 0.0000 0.0000 0 0
+658 2 """5SORENSON--3""" 1.0000 0.00 163.00 850.00 -1000.00 1000.00 371.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+659 2 """5TWIN-BRCH-3""" 1.0200 0.00 0.00 -1660.00 -1000.00 1000.00 700.00 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+660 2 """5LEWISTON-Y2""" 1.0520 0.00 1209.10 -190.00 -200.00 420.00 654.10 -45.40 0.0000 0.0000 0.0000 0.0000 0 0
+661 2 """5MOSSES---Y2""" 1.0500 0.00 400.00 620.00 0.00 130.00 505.90 96.60 0.0000 0.0000 0.0000 0.0000 0 0
+662 2 """5PACKARD--Y2""" 1.0520 0.00 0.00 -160.00 -1000.00 100.00 641.40 -0.60 0.0000 0.0000 0.0000 0.0000 0 0
+663 0 """ADAIR-------""" 1.0193 0.00 0.00 0.00 0.00 0.00 2.18 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+664 0 """ADAMS-----40""" 1.0140 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+665 0 """1AINSWORTH--""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.17 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+666 0 """ALGONAC-----""" 1.0163 0.00 0.00 0.00 0.00 0.00 7.98 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+667 0 """ALMONT------""" 0.9849 0.00 0.00 0.00 0.00 0.00 3.28 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+668 0 """ANDERSON----""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.59 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+669 0 """APPLEGATE---""" 0.9866 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+670 0 """ARGO--------""" 1.0307 0.00 0.00 0.00 0.00 0.00 23.02 3.93 0.0000 0.1200 0.0000 0.0000 0 0
+671 0 """ARMADA------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.52 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+672 0 """ARROWHEAD-40""" 1.0217 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+673 0 """ATTICA------""" 0.9842 0.00 0.00 0.00 0.00 0.00 1.34 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+674 0 """AUBURN-HTS-1""" 1.0049 0.00 0.00 0.00 0.00 0.00 6.50 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+675 0 """AVOCA-------""" 0.9930 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+676 0 """AVON--------""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+677 0 """BAD-AXE-40--""" 0.9987 0.00 0.00 0.00 0.00 0.00 6.13 2.12 0.0000 0.0660 0.0000 0.0000 0 0
+678 0 """BALDWIN--EQ1""" 1.0224 0.00 0.00 0.00 0.00 0.00 8.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+679 0 """BARNES-LAKE-""" 0.9888 0.00 0.00 0.00 0.00 0.00 2.20 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+680 0 """1BARTLETT-CP""" 1.0119 0.00 0.00 0.00 0.00 0.00 7.40 5.87 0.0000 0.0000 0.0000 0.0000 0 0
+681 0 """BAYPORT-----""" 0.9869 0.00 0.00 0.00 0.00 0.00 1.26 2.12 0.0000 0.0000 0.0000 0.0000 0 0
+682 0 """BEAVER------""" 0.9956 0.00 0.00 0.00 0.00 0.00 0.17 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+683 0 """BELLEVILLE--""" 1.0212 0.00 0.00 0.00 0.00 0.00 6.05 2.66 0.0000 0.0000 0.0000 0.0000 0 0
+684 0 """BERLIN-FUT74""" 1.0348 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+685 0 """BERNARD-----""" 0.9996 0.00 0.00 0.00 0.00 0.00 2.10 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+686 0 """BINGHAM--EQ1""" 1.0029 0.00 0.00 0.00 0.00 0.00 3.28 1.49 0.0000 0.0480 0.0000 0.0000 0 0
+687 0 """BLOOMFIELD40""" 1.0220 0.00 0.00 0.00 0.00 0.00 79.00 39.62 0.0000 0.0900 0.0000 0.0000 0 0
+688 0 """BOND,MADRID-""" 1.0551 0.00 0.00 0.00 0.00 0.00 2.18 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+689 0 """BREST-------""" 1.0358 0.00 0.00 0.00 0.00 0.00 5.04 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+690 0 """BREWER------""" 1.0045 0.00 0.00 0.00 0.00 0.00 2.94 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+691 0 """BRIGHTON----""" 1.0076 0.00 0.00 0.00 0.00 0.00 5.96 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+692 0 """BROWN-CITY--""" 0.9725 0.00 0.00 0.00 0.00 0.00 3.28 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+693 0 """BROWNSTOWN40""" 1.0348 0.00 0.00 0.00 0.00 0.00 36.46 24.76 0.0000 0.0000 0.0000 0.0000 0 0
+694 0 """BRAY--------""" 0.9770 0.00 0.00 0.00 0.00 0.00 1.51 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+695 0 """BRUCE---EQ1-""" 1.0034 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+696 0 """BUNCE-CRK-40""" 1.0333 0.00 0.00 0.00 0.00 0.00 7.73 4.25 0.0000 0.0000 0.0000 0.0000 0 0
+697 2 """BUNCE-CRK-24""" 1.0607 0.00 84.00 480.00 0.00 480.00 37.72 22.10 0.0000 0.0000 0.0000 0.0000 0 0
+698 0 """CALUMET-----""" 0.9844 0.00 0.00 0.00 0.00 0.00 3.11 1.91 0.0000 0.0000 0.0000 0.0000 0 0
+699 0 """CAMDEN-2,5--""" 1.0033 0.00 0.00 0.00 0.00 0.00 9.41 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+700 0 """CAMPUS-1----""" 1.0279 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+701 0 """CAMPUS-2----""" 1.0216 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+702 0 """CAPAC-------""" 0.9880 0.00 0.00 0.00 0.00 0.00 3.11 1.38 0.0000 0.0660 0.0000 0.0000 0 0
+703 0 """CARLETON----""" 1.0054 0.00 0.00 0.00 0.00 0.00 1.76 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+704 0 """CARO-1------""" 1.0018 0.00 0.00 0.00 0.00 0.00 1.68 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+705 0 """CARO-T.E.C.-""" 0.9962 0.00 0.00 0.00 0.00 0.00 1.76 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+706 0 """CARPENTER---""" 1.0007 0.00 0.00 0.00 0.00 0.00 8.15 3.29 0.0000 0.1140 0.0000 0.0000 0 0
+707 0 """CARSONVILLE-""" 0.9885 0.00 0.00 0.00 0.00 0.00 0.67 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+708 0 """CARTER------""" 1.0069 0.00 0.00 0.00 0.00 0.00 15.04 7.54 0.0000 0.0000 0.0000 0.0000 0 0
+709 0 """CASEVILLE---""" 0.9683 0.00 0.00 0.00 0.00 0.00 3.02 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+710 0 """CASEY-------""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.18 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+711 0 """CASS-CITY---""" 1.0011 0.00 0.00 0.00 0.00 0.00 5.04 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+712 0 """CHERRY-HILL-""" 0.9566 0.00 0.00 0.00 0.00 0.00 0.92 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+713 0 """CHESTERFLD-1""" 1.0264 0.00 0.00 0.00 0.00 0.00 3.95 0.53 0.0000 0.0480 0.0000 0.0000 0 0
+714 0 """CHESTERFLD-2""" 1.0088 0.00 0.00 0.00 0.00 0.00 8.48 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+715 0 """CHESTNUT-40-""" 1.0150 0.00 0.00 0.00 0.00 0.00 75.20 29.50 0.0000 0.3600 0.0000 0.0000 0 0
+716 0 """CHILSON-----""" 1.0175 0.00 0.00 0.00 0.00 0.00 1.51 0.85 0.0000 0.0660 0.0000 0.0000 0 0
+717 0 """CLARKSTON-2-""" 1.0013 0.00 0.00 0.00 0.00 0.00 4.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+718 0 """CLIFFORD----""" 0.9881 0.00 0.00 0.00 0.00 0.00 1.34 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+719 0 """COATS-------""" 1.0093 0.00 0.00 0.00 0.00 0.00 3.36 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+720 0 """CODY-40-----""" 1.0456 0.00 0.00 0.00 0.00 0.00 19.99 6.27 0.0000 0.1800 0.0000 0.0000 0 0
+721 0 """COLFAX---EQ1""" 1.0885 0.00 14.00 40.00 0.00 0.00 4.87 2.55 0.0000 0.0480 0.0000 0.0000 0 0
+722 0 """COLLIER----1""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+723 0 """CLOTH-PR.-1-""" 1.0059 0.00 0.00 0.00 0.00 0.00 3.00 -0.37 0.0000 0.0000 0.0000 0.0000 0 0
+724 0 """COLUMBIAVILE""" 0.9871 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+725 0 """COMMERCE-LK-""" 0.9872 0.00 0.00 0.00 0.00 0.00 6.05 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+726 0 """CORTLAND-24-""" 1.0112 0.00 0.00 0.00 0.00 0.00 204.10 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+727 0 """CROSWELL-EQ1""" 0.9883 0.00 0.00 0.00 0.00 0.00 5.96 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+728 0 """CROWN-1-----""" 1.0243 0.00 0.00 0.00 0.00 0.00 10.16 0.32 0.0000 0.0900 0.0000 0.0000 0 0
+729 0 """CROWN-2-----""" 0.9891 0.00 0.00 0.00 0.00 0.00 4.54 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+730 0 """CULVER------""" 0.9954 0.00 0.00 0.00 0.00 0.00 8.57 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+731 0 """CUSTER-24---""" 1.0216 0.00 14.00 40.00 0.00 0.00 61.40 33.15 0.0000 0.0000 0.0000 0.0000 0 0
+732 0 """DADE-1------""" 1.0165 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+733 0 """DADE-2------""" 1.0158 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+734 0 """DARWIN-1----""" 1.0440 0.00 0.00 0.00 0.00 0.00 4.87 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+735 0 """DARWIN-2----""" 1.0408 0.00 0.00 0.00 0.00 0.00 4.79 1.27 0.0000 0.0480 0.0000 0.0000 0 0
+736 0 """DAVIS---EQ1-""" 0.9767 0.00 0.00 0.00 0.00 0.00 20.30 10.25 0.0000 0.0900 0.0000 0.0000 0 0
+737 0 """DAYTON-40---""" 1.0256 0.00 5.00 10.00 0.00 0.00 5.71 2.97 0.0000 0.0660 0.0000 0.0000 0 0
+738 0 """DECKR-+-ASPN""" 0.9878 0.00 0.00 0.00 0.00 0.00 2.52 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+739 0 """DEWEY-2-----""" 0.9865 0.00 0.00 0.00 0.00 0.00 11.34 3.82 0.0000 0.0000 0.0000 0.0000 0 0
+740 0 """DEXTER---EQ1""" 1.0348 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0480 0.0000 0.0000 0 0
+741 0 """DILLARD-1---""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+742 0 """DOVER-1-----""" 1.0030 0.00 0.00 0.00 0.00 0.00 3.78 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+743 0 """DOVER-2-----""" 0.9997 0.00 0.00 0.00 0.00 0.00 3.19 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+744 0 """DREXEL-2----""" 0.9883 0.00 0.00 0.00 0.00 0.00 9.24 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+745 0 """DRYDEN------""" 0.9797 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+746 0 """ECKLES-2----""" 0.9704 0.00 0.00 0.00 0.00 0.00 4.62 -0.74 0.0000 0.0000 0.0000 0.0000 0 0
+747 0 """EDGEWATER---""" 0.9989 0.00 0.00 0.00 0.00 0.00 1.30 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+748 0 """ELKTON------""" 0.9804 0.00 0.00 0.00 0.00 0.00 3.36 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+749 0 """ELM-40------""" 1.0242 0.00 0.00 0.00 0.00 0.00 107.77 79.00 0.0000 0.2850 0.0000 0.0000 0 0
+750 0 """EMERICK-1---""" 1.0099 0.00 0.00 0.00 0.00 0.00 8.82 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+751 0 """EMMETT------""" 0.9925 0.00 0.00 0.00 0.00 0.00 1.01 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+752 0 """ENGLISH-----""" 1.0024 0.00 0.00 0.00 0.00 0.00 1.68 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+753 0 """ERIN40------""" 1.0115 0.00 0.00 0.00 0.00 0.00 103.40 41.50 0.0000 0.1800 0.0000 0.0000 0 0
+754 0 """EVERGREEN-40""" 1.0364 0.00 0.00 0.00 0.00 0.00 213.20 82.90 0.0000 0.5100 0.0000 0.0000 0 0
+755 0 """FAIRGROVE---""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.02 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+756 0 """FALCON-1----""" 1.0232 0.00 0.00 0.00 0.00 0.00 9.32 6.12 0.0000 0.0000 0.0000 0.0000 0 0
+757 0 """FALCON-2----""" 1.0207 0.00 0.00 0.00 0.00 0.00 7.56 4.99 0.0000 0.0000 0.0000 0.0000 0 0
+758 0 """FISHER------""" 1.0370 0.00 0.00 0.00 0.00 0.00 5.96 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+759 0 """FLAT-ROCK-1-""" 1.0195 0.00 0.00 0.00 0.00 0.00 1.68 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+760 0 """FLEMING-----""" 1.0067 0.00 0.00 0.00 0.00 0.00 4.54 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+761 0 """FORESTER----""" 0.9770 0.00 0.00 0.00 0.00 0.00 0.76 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+762 0 """FRANK2---EQ1""" 0.9722 0.00 0.00 0.00 0.00 0.00 6.10 1.50 0.0000 0.0000 0.0000 0.0000 0 0
+763 0 """FREEDOM-----""" 0.9954 0.00 0.00 0.00 0.00 0.00 1.10 0.12 0.0000 0.0000 0.0000 0.0000 0 0
+764 0 """FRENCHLND-2-""" 1.0263 0.00 0.00 0.00 0.00 0.00 5.70 4.37 0.0000 0.1200 0.0000 0.0000 0 0
+765 0 """FRISBIE-24--""" 1.0881 0.00 0.00 0.00 0.00 0.00 222.68 75.01 0.0000 0.0000 0.0000 0.0000 0 0
+766 0 """FULLER-1----""" 1.0203 0.00 0.00 0.00 0.00 0.00 2.52 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+767 0 """FULLER-2----""" 1.0257 0.00 0.00 0.00 0.00 0.00 2.44 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+768 0 """GAGETOWN----""" 1.0203 0.00 0.00 0.00 0.00 0.00 1.18 0.42 0.0000 0.0480 0.0000 0.0000 0 0
+769 0 """1GARNER-CP--""" 1.0195 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+770 0 """GENOA-40----""" 1.0191 0.00 0.00 0.00 0.00 0.00 12.94 6.37 0.0000 0.1800 0.0000 0.0000 0 0
+771 0 """GLOBE-------""" 0.9892 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+772 0 """GOODISON----""" 0.9861 0.00 0.00 0.00 0.00 0.00 7.56 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+773 0 """GRAF--------""" 0.9961 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+774 0 """HAMBURG-----""" 1.0440 0.00 0.00 0.00 0.00 0.00 2.44 0.64 0.0000 0.0660 0.0000 0.0000 0 0
+775 0 """HANCOCK-40--""" 1.0036 0.00 100.81 190.00 0.00 0.00 29.57 15.62 0.0000 0.0000 0.0000 0.0000 0 0
+776 0 """HANNAN-1---1""" 1.0048 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+777 0 """HARTLAND----""" 0.9948 0.00 0.00 0.00 0.00 0.00 2.18 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+778 0 """HEMLOCK-1---""" 1.0293 0.00 0.00 0.00 0.00 0.00 6.00 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+779 0 """HEMLOCK-2---""" 1.0364 0.00 0.00 0.00 0.00 0.00 6.97 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+780 2 """HINES-40----""" 0.9900 0.00 0.00 120.00 0.00 18.00 115.58 95.12 0.0000 0.3600 0.0000 0.0000 0 0
+781 0 """HOBART-TAP--""" 1.0363 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+782 0 """HOBART------""" 1.0414 0.00 0.00 0.00 0.00 0.00 4.03 1.59 0.0000 0.0900 0.0000 0.0000 0 0
+783 0 """HOWELL-2----""" 1.0160 0.00 0.00 0.00 0.00 0.00 3.95 1.81 0.0000 0.0660 0.0000 0.0000 0 0
+784 0 """HUNTERS-CR40""" 1.0031 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+785 0 """IDA---------""" 1.0107 0.00 0.00 0.00 0.00 0.00 1.90 -0.12 0.0000 0.0000 0.0000 0.0000 0 0
+786 0 """IMLAY-CITY--""" 0.9775 0.00 0.00 0.00 0.00 0.00 4.70 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+787 0 """INLAND---EQ1""" 1.0137 0.00 0.00 0.00 0.00 0.00 5.80 3.51 0.0000 0.0000 0.0000 0.0000 0 0
+788 0 """IRA---------""" 1.0238 0.00 0.00 0.00 0.00 0.00 2.10 0.85 0.0000 0.0480 0.0000 0.0000 0 0
+789 0 """IRONTON-24--""" 1.0193 0.00 0.00 0.00 0.00 0.00 177.80 67.00 0.0000 0.0000 0.0000 0.0000 0 0
+790 0 """IRVING------""" 0.9945 0.00 0.00 0.00 0.00 0.00 5.88 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+791 0 """JACKSON-RD.2""" 1.0346 0.00 0.00 0.00 0.00 0.00 1.01 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+792 0 """JASPER------""" 1.0041 0.00 0.00 0.00 0.00 0.00 0.34 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+793 0 """JORDAN-1----""" 0.9922 0.00 0.00 0.00 0.00 0.00 1.85 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+794 0 """JOPLIN------""" 0.9903 0.00 0.00 0.00 0.00 0.00 0.76 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+795 0 """KEEGO-2-----""" 0.9789 0.00 0.00 0.00 0.00 0.00 1.10 0.37 0.0000 0.0000 0.0000 0.0000 0 0
+796 0 """KELLOGG-----""" 0.9988 0.00 0.00 0.00 0.00 0.00 3.78 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+797 0 """1KENNETT-CP-""" 1.0198 0.00 0.00 0.00 0.00 0.00 17.90 8.37 0.0000 0.0000 0.0000 0.0000 0 0
+798 0 """KIMBALL-----""" 1.0128 0.00 0.00 0.00 0.00 0.00 3.36 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+799 0 """KINDE-------""" 0.9840 0.00 0.00 0.00 0.00 0.00 1.01 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+800 0 """KING-SEELEY-""" 1.0463 0.00 0.00 0.00 0.00 0.00 2.69 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+801 0 """LAKEPORT----""" 1.0008 0.00 0.00 0.00 0.00 0.00 1.85 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+802 0 """LAKEVILLE---""" 0.9976 0.00 0.00 0.00 0.00 0.00 1.09 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+803 0 """LAPEER------""" 0.9933 0.00 0.00 0.00 0.00 0.00 3.78 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+804 0 """LARK-40-----""" 1.0476 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+805 0 """LEE-40------""" 1.0183 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+806 0 """LIMA--------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.18 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+807 0 """LINCOLN-24--""" 0.9866 0.00 0.00 0.00 0.00 0.00 148.43 124.57 0.0000 0.5700 0.0000 0.0000 0 0
+808 0 """LUZON-40----""" 1.0040 0.00 0.00 0.00 0.00 0.00 21.67 12.01 0.0000 0.0900 0.0000 0.0000 0 0
+809 0 """MACOMB-40---""" 1.0194 0.00 0.00 0.00 0.00 0.00 132.00 96.50 0.0000 0.3600 0.0000 0.0000 0 0
+810 0 """MARINE-CITY-""" 1.0387 0.00 0.00 0.00 0.00 0.00 5.21 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+811 0 """MARLETTE----""" 0.9794 0.00 0.00 0.00 0.00 0.00 5.29 1.70 0.0000 0.0480 0.0000 0.0000 0 0
+812 0 """MAYBEE------""" 1.0091 0.00 0.00 0.00 0.00 0.00 1.26 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+813 0 """MAYVILLE----""" 1.0032 0.00 0.00 0.00 0.00 0.00 2.02 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+814 0 """MEADOW---EQ1""" 0.9943 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+815 0 """MEDINA-40---""" 1.0197 0.00 0.00 0.00 0.00 0.00 45.80 21.50 0.0000 0.1800 0.0000 0.0000 0 0
+816 0 """MELVIN------""" 0.9800 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+817 0 """METAMORA----""" 0.9954 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+818 0 """MILFORD-----""" 1.0033 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+819 0 """MILLINGTON--""" 0.9808 0.00 0.00 0.00 0.00 0.00 2.35 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+820 0 """MOHAWK-2----""" 0.9967 0.00 0.00 0.00 0.00 0.00 2.10 0.25 0.0000 0.0000 0.0000 0.0000 0 0
+821 0 """MONARCH-----""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.30 1.50 0.0000 0.0960 0.0000 0.0000 0 0
+822 0 """1MONTCALM-CP""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+823 0 """MOTT-2------""" 1.0159 0.00 0.00 0.00 0.00 0.00 7.39 3.82 0.0000 0.0900 0.0000 0.0000 0 0
+824 0 """NATIONAL-1--""" 0.9928 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+825 0 """NATIONAL-2--""" 0.9997 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+826 0 """NAVARRE-24--""" 1.0384 0.00 0.00 0.00 0.00 0.00 190.43 107.21 0.0000 0.8700 0.0000 0.0000 0 0
+827 0 """NEFF--------""" 1.0012 0.00 0.00 0.00 0.00 0.00 5.71 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+828 0 """NELSON-MILS1""" 1.0263 0.00 0.00 0.00 0.00 0.00 2.94 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+829 0 """NELSON-MILS2""" 1.0270 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+830 0 """NEW-BALTMR-1""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.10 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+831 0 """NEW-BALTMR23""" 1.0237 0.00 0.00 0.00 0.00 0.00 4.28 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+832 0 """NEW-BOSTON--""" 1.0111 0.00 0.00 0.00 0.00 0.00 1.93 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+833 0 """NEWBURGH-40-""" 0.9673 0.00 0.00 0.00 0.00 0.00 147.42 102.95 0.0000 0.3000 0.0000 0.0000 0 0
+834 0 """NEW-HAVEN-1-""" 1.0179 0.00 0.00 0.00 0.00 0.00 3.44 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+835 0 """NEW-HAVEN-2-""" 1.0220 0.00 0.00 0.00 0.00 0.00 2.69 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+836 0 """NIXON-2-----""" 0.9768 0.00 0.00 0.00 0.00 0.00 11.09 5.52 0.0000 0.0000 0.0000 0.0000 0 0
+837 0 """NOBLE-------""" 0.9863 0.00 0.00 0.00 0.00 0.00 16.97 9.14 0.0000 0.0000 0.0000 0.0000 0 0
+838 0 """NORTH-BRANCH""" 0.9717 0.00 0.00 0.00 0.00 0.00 4.45 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+839 2 """NORTHEAST-24""" 1.0104 0.00 80.00 0.00 0.00 48.00 230.24 141.20 0.0000 0.4800 0.0000 0.0000 0 0
+840 0 """NORTH-SRVCTR""" 1.0050 0.00 0.00 0.00 0.00 0.00 5.80 4.36 0.0000 0.0000 0.0000 0.0000 0 0
+841 2 """NORTHWEST-40""" 1.0044 0.00 0.00 0.00 0.00 18.00 209.70 76.40 0.0000 0.5480 0.0000 0.0000 0 0
+842 0 """NORWAY-1----""" 0.9516 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+843 0 """NORWAY-2-EQ1""" 0.9477 0.00 0.00 0.00 0.00 0.00 5.96 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+844 0 """OAK-BEACH---""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.84 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+845 0 """OLIVER------""" 0.9870 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+846 0 """OLYMPA-FUT75""" 0.9825 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+847 0 """OMAHA-1--EQ1""" 0.9473 0.00 0.00 0.00 0.00 0.00 10.08 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+848 0 """OMAHA-2--EQ1""" 0.9465 0.00 0.00 0.00 0.00 0.00 9.58 3.61 0.0000 0.0000 0.0000 0.0000 0 0
+849 0 """OPAL--------""" 1.0050 0.00 0.00 0.00 0.00 0.00 0.92 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+850 0 """OREGON-1----""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.38 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+851 0 """ORION-------""" 0.9925 0.00 0.00 0.00 0.00 0.00 5.46 2.02 0.0000 0.0660 0.0000 0.0000 0 0
+852 0 """OTTER-LAKE--""" 0.9836 0.00 0.00 0.00 0.00 0.00 1.01 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+853 0 """OWENDALE----""" 1.0049 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+854 0 """OXFORD------""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.89 3.72 0.0000 0.1200 0.0000 0.0000 0 0
+855 0 """1PADDOCK-CP-""" 1.0220 0.00 0.00 0.00 0.00 0.00 4.30 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+856 0 """PAGE--------""" 0.9930 0.00 0.00 0.00 0.00 0.00 9.58 5.63 0.0000 0.0660 0.0000 0.0000 0 0
+857 0 """PALMER-1----""" 0.9643 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+858 0 """PARKER-ROAD-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.64 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+859 0 """PAUL-1------""" 1.0114 0.00 0.00 0.00 0.00 0.00 8.15 4.89 0.0000 0.0480 0.0000 0.0000 0 0
+860 0 """PAUL-2,3----""" 1.0157 0.00 0.00 0.00 0.00 0.00 4.70 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+861 0 """PHOENIX-40--""" 1.0379 0.00 0.00 0.00 0.00 0.00 36.71 20.82 0.0000 0.0000 0.0000 0.0000 0 0
+862 0 """PIEDMONT----""" 1.0235 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+863 0 """PIGEON------""" 0.9818 0.00 0.00 0.00 0.00 0.00 3.78 4.78 0.0000 0.0480 0.0000 0.0000 0 0
+864 0 """PINCKNEY----""" 1.0442 0.00 0.00 0.00 0.00 0.00 3.86 1.70 0.0000 0.0900 0.0000 0.0000 0 0
+865 0 """PIONEER---40""" 1.0270 0.00 0.00 0.00 0.00 0.00 19.10 10.12 0.0000 0.0000 0.0000 0.0000 0 0
+866 0 """PIPER---EQ1-""" 1.0008 0.00 0.00 0.00 0.00 0.00 5.12 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+867 0 """PITSFLD--EQ1""" 1.0164 0.00 0.00 0.00 0.00 0.00 9.66 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+868 0 """PLACID------""" 1.0026 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+869 0 """PLYMOUTH----""" 0.9523 0.00 0.00 0.00 0.00 0.00 12.10 7.44 0.0000 0.1560 0.0000 0.0000 0 0
+870 0 """PORT-AUSTIN-""" 0.9754 0.00 0.00 0.00 0.00 0.00 3.02 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+871 0 """PORT-HOPE---""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+872 0 """PORT-SANILAC""" 0.9808 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+873 0 """PRICE-1-----""" 1.0353 0.00 0.00 0.00 0.00 0.00 4.37 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+874 0 """PROCTOR-----""" 0.9955 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+875 0 """PUTNAM------""" 1.0098 0.00 14.00 40.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+876 0 """QUEEN-------""" 1.0065 0.00 0.00 0.00 0.00 0.00 3.53 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+877 0 """QUINCY------""" 1.0030 0.00 0.00 0.00 0.00 0.00 1.34 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+878 0 """RANDOLPH----""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+879 0 """RAVINE---EQ1""" 0.9764 0.00 0.00 0.00 0.00 0.00 8.90 3.62 0.0000 0.0000 0.0000 0.0000 0 0
+880 0 """RED-RUN-40--""" 1.0203 0.00 0.00 0.00 0.00 0.00 140.87 71.29 0.0000 0.5400 0.0000 0.0000 0 0
+881 0 """REESE---EQ2-""" 0.9799 0.00 0.00 0.00 0.00 0.00 5.96 2.23 0.0000 0.0480 0.0000 0.0000 0 0
+882 0 """REMER-40----""" 1.0461 0.00 0.00 0.00 0.00 0.00 1.34 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+883 0 """RENO--------""" 0.9937 0.00 0.00 0.00 0.00 0.00 4.80 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+884 0 """RICHMOND----""" 1.0130 0.00 0.00 0.00 0.00 0.00 5.63 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+885 0 """RIFLE-------""" 0.9886 0.00 0.00 0.00 0.00 0.00 6.13 2.97 0.0000 0.0480 0.0000 0.0000 0 0
+886 0 """RIVER-RAISIN""" 1.0072 0.00 0.00 0.00 0.00 0.00 0.92 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+887 2 """RIVERVIEW-40""" 1.0021 0.00 25.00 -100.00 -10.00 20.00 145.57 79.69 0.0000 0.3600 0.0000 0.0000 0 0
+888 0 """ROCHESTER-1-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.55 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+889 0 """ROCKWOOD----""" 1.0345 0.00 0.00 0.00 0.00 0.00 5.80 1.59 0.0000 0.0340 0.0000 0.0000 0 0
+890 0 """ROMEO---EQ1-""" 1.0133 0.00 0.00 0.00 0.00 0.00 6.13 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+891 0 """ROMULUS---40""" 1.0151 0.00 0.00 0.00 0.00 0.00 20.66 13.07 0.0000 0.1680 0.0000 0.0000 0 0
+892 0 """RUSH-TAP----""" 0.9835 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+893 0 """RUSH-40-----""" 1.0014 0.00 0.00 0.00 0.00 0.00 3.70 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+894 0 """SALEM-------""" 1.0417 0.00 0.00 0.00 0.00 0.00 1.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+895 0 """SALINE------""" 1.0017 0.00 0.00 0.00 0.00 0.00 9.10 4.87 0.0000 0.0960 0.0000 0.0000 0 0
+896 0 """SANDUSKY-40-""" 1.0042 0.00 0.00 0.00 0.00 0.00 5.29 1.91 0.0000 0.0660 0.0000 0.0000 0 0
+897 0 """SAXON-------""" 0.9916 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+898 0 """SEBEWAING---""" 1.0083 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+899 0 """SELFRIDGE-1-""" 1.0074 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+900 0 """SELKIRK-----""" 1.0092 0.00 0.00 0.00 0.00 0.00 6.05 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+901 0 """SHAW--------""" 0.9720 0.00 0.00 0.00 0.00 0.00 1.60 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+902 0 """SHELDON-1---""" 0.9578 0.00 0.00 0.00 0.00 0.00 5.29 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+903 0 """SHERWOOD----""" 1.0148 0.00 0.00 0.00 0.00 0.00 1.93 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+904 0 """SNOVER------""" 0.9929 0.00 0.00 0.00 0.00 0.00 1.60 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+905 0 """SOUTHFLD-40-""" 1.0066 0.00 0.00 0.00 0.00 0.00 99.54 81.89 0.0000 0.0900 0.0000 0.0000 0 0
+906 0 """STATE-1-----""" 1.0247 0.00 0.00 0.00 0.00 0.00 5.60 3.25 0.0000 0.0000 0.0000 0.0000 0 0
+907 0 """SPOKANE-40--""" 1.0014 0.00 0.00 0.00 0.00 0.00 36.54 16.57 0.0000 0.0000 0.0000 0.0000 0 0
+908 0 """ST-CLAIR-1--""" 1.0259 0.00 0.00 0.00 0.00 0.00 2.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+909 0 """ST-CLAIR-2--""" 1.0352 0.00 0.00 0.00 0.00 0.00 2.69 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+910 0 """STEPHENS-24-""" 1.0074 0.00 0.00 0.00 0.00 0.00 164.30 105.69 0.0000 0.5700 0.0000 0.0000 0 0
+911 0 """STERLING-40-""" 1.0210 0.00 0.00 0.00 0.00 0.00 101.14 45.79 0.0000 0.5400 0.0000 0.0000 0 0
+912 0 """STOCKBRIDGE-""" 1.0701 0.00 0.00 0.00 0.00 0.00 1.09 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+913 0 """1STOCKWELLCP""" 1.0172 0.00 0.00 0.00 0.00 0.00 10.90 6.75 0.0000 0.0000 0.0000 0.0000 0 0
+914 0 """SUNSET-40---""" 1.0041 0.00 0.00 0.00 0.00 0.00 78.79 59.01 0.0000 0.5160 0.0000 0.0000 0 0
+915 2 """SUPERIOR-40-""" 1.0189 0.00 0.00 0.00 0.00 118.00 61.49 48.74 0.0000 0.1800 0.0000 0.0000 0 0
+916 0 """TIENKEN-2---""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+917 0 """TALBOT---EQ1""" 0.9854 0.00 0.00 0.00 0.00 0.00 2.35 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+918 0 """1TAYLOR-1-13""" 1.0121 0.00 0.00 0.00 0.00 0.00 10.67 6.27 0.0000 0.0000 0.0000 0.0000 0 0
+919 0 """1TAYLOR-2-13""" 1.0154 0.00 0.00 0.00 0.00 0.00 8.65 6.48 0.0000 0.0000 0.0000 0.0000 0 0
+920 0 """TEGGERDINE--""" 0.9815 0.00 0.00 0.00 0.00 0.00 11.34 4.67 0.0000 0.0000 0.0000 0.0000 0 0
+921 0 """TEMPLE------""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.59 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+922 0 """TEXAS-------""" 1.0281 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+923 0 """TODD--------""" 1.0426 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+924 0 """TRINITY-2---""" 1.0107 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+925 0 """TROY-40-----""" 0.9963 0.00 0.00 0.00 0.00 0.00 178.92 77.64 0.0000 0.5400 0.0000 0.0000 0 0
+926 0 """TUSCOLA-40--""" 1.0020 0.00 0.00 0.00 0.00 0.00 6.22 2.55 0.0000 0.0660 0.0000 0.0000 0 0
+927 0 """UNION-LAKE--""" 0.9771 0.00 0.00 0.00 0.00 0.00 11.84 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+928 0 """UNIONVILLE--""" 1.0120 0.00 0.00 0.00 0.00 0.00 1.26 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+929 0 """UNIVR-BUS1T6""" 1.0250 0.00 0.00 0.00 0.00 0.00 11.17 8.71 0.0000 0.0000 0.0000 0.0000 0 0
+930 0 """URBAN-TEC---""" 0.9887 0.00 0.00 0.00 0.00 0.00 5.12 3.19 0.0000 0.0000 0.0000 0.0000 0 0
+931 0 """UTAH--------""" 1.0415 0.00 0.00 0.00 0.00 0.00 0.76 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+932 0 """VANBUREN-EQ1""" 1.0128 0.00 0.00 0.00 0.00 0.00 1.51 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+933 0 """VASSAR-BIRCH""" 0.9744 0.00 0.00 0.00 0.00 0.00 10.00 5.74 0.0000 0.0660 0.0000 0.0000 0 0
+934 0 """VICTOR-40---""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+935 0 """VALLEY------""" 1.0268 0.00 6.00 20.00 0.00 0.00 0.90 0.62 0.0000 0.0000 0.0000 0.0000 0 0
+936 0 """WABASH-40---""" 1.0066 0.00 0.00 0.00 0.00 0.00 46.70 26.25 0.0000 0.0000 0.0000 0.0000 0 0
+937 0 """WALLED-LAKE-""" 0.9972 0.00 0.00 0.00 0.00 0.00 6.00 2.62 0.0000 0.0000 0.0000 0.0000 0 0
+938 0 """WALNUT-1,2--""" 0.9814 0.00 0.00 0.00 0.00 0.00 9.60 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+939 0 """WALTON40-SUB""" 1.0330 0.00 0.00 0.00 0.00 0.00 44.35 20.08 0.0000 0.1800 0.0000 0.0000 0 0
+940 0 """WARDLOW-----""" 0.9956 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+941 2 """WARREN-24---""" 1.0171 0.00 0.00 540.00 0.00 54.00 268.46 194.97 0.0000 0.9000 0.0000 0.0000 0 0
+942 0 """WASHNGTN-EQ1""" 1.0002 0.00 0.00 0.00 0.00 0.00 8.57 4.36 0.0000 0.0660 0.0000 0.0000 0 0
+943 0 """WATERFORD---""" 0.9903 0.00 0.00 0.00 0.00 0.00 17.81 5.52 0.0000 0.1800 0.0000 0.0000 0 0
+944 0 """WEBERVLE-EQ1""" 1.0885 0.00 0.00 0.00 0.00 0.00 8.23 1.91 0.0000 0.1140 0.0000 0.0000 0 0
+945 0 """WHITE-LAKE--""" 0.9941 0.00 0.00 0.00 0.00 0.00 4.70 1.59 0.0000 0.0000 0.0000 0.0000 0 0
+946 0 """WHITMORE-LK-""" 1.0357 0.00 0.00 0.00 0.00 0.00 7.81 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+947 0 """WHITNY-FUT73""" 1.0033 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+948 0 """WILEY-------""" 1.0197 0.00 0.00 0.00 0.00 0.00 1.26 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+949 0 """WILMOTK-NGFD""" 0.9922 0.00 0.00 0.00 0.00 0.00 0.84 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+950 0 """WILSON------""" 1.0128 0.00 0.00 0.00 0.00 0.00 2.60 -0.21 0.0000 0.0000 0.0000 0.0000 0 0
+951 0 """1WILSON-CP--""" 1.0157 0.00 0.00 0.00 0.00 0.00 8.60 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+952 0 """WOLFHILL----""" 0.9897 0.00 0.00 0.00 0.00 0.00 4.96 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+953 0 """WOLVERINE-2-""" 1.0200 0.00 0.00 0.00 0.00 0.00 5.12 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+954 0 """WORTH-------""" 1.0069 0.00 0.00 0.00 0.00 0.00 2.18 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+955 0 """YALE-TAP----""" 0.9902 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+956 0 """YALE--------""" 0.9870 0.00 0.00 0.00 0.00 0.00 3.11 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+957 0 """YATES-------""" 0.9871 0.00 0.00 0.00 0.00 0.00 1.34 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+958 0 """YORK--------""" 0.9901 0.00 0.00 0.00 0.00 0.00 2.44 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+959 0 """YOST-40-----""" 1.0354 0.00 0.00 0.00 0.00 0.00 48.55 26.29 0.0000 0.0480 0.0000 0.0000 0 0
+960 0 """2ADAMS-----1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+961 0 """2ALFRED----1""" 1.0468 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+962 0 """ALFRED-13---""" 1.0489 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+963 0 """2AMHERST1.13""" 1.0230 0.00 0.00 0.00 0.00 0.00 7.56 4.72 0.0000 0.0000 0.0000 0.0000 0 0
+964 0 """2AMHERST2.13""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+965 0 """2ARROWHEAD-1""" 1.0315 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+966 0 """2BAD-AXE---1""" 1.0460 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+967 0 """2BLOOMFLD--1""" 1.0065 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+968 0 """2BROWNTN---3""" 1.0081 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+969 0 """2BROWNTN---2""" 1.0314 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+970 2 """2BROWNTN-N-1""" 1.0263 0.00 0.00 -910.00 -91.00 338.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+971 0 """2BROWNTN-S-1""" 1.0117 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+972 0 """2BUNCE-CK--1""" 1.1567 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+973 0 """2B3N-DECO230""" 1.0877 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+974 0 """2-BURNS-1--1""" 1.0578 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+975 0 """2-BURNS-2--1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+976 0 """2CANIFF----3""" 1.0261 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+977 0 """2CANIFF----1""" 1.0433 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+978 0 """2CATALINA-CP""" 1.0064 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+979 0 """2CATO------1""" 1.0403 0.00 0.00 0.00 0.00 0.00 57.14 27.68 0.0000 0.0000 0.0000 0.0000 0 0
+980 0 """2CHESTNUT--1""" 1.0164 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+981 0 """2CODY------1""" 0.9887 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+982 2 """2CONNER-G.24""" 1.0404 0.00 285.00 1770.00 0.00 1770.00 436.28 182.01 0.0000 0.0000 0.0000 0.0000 0 0
+983 0 """2COOPER----1""" 1.0059 0.00 0.00 0.00 0.00 0.00 1.34 2.31 0.0000 0.0000 0.0000 0.0000 0 0
+984 0 """2CORTLAND--1""" 1.0392 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+985 0 """2COVENTRY--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+986 0 """2COVENTRY--1""" 0.9810 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+987 0 """2CRESTWOOD-1""" 1.0120 0.00 0.00 0.00 0.00 0.00 3.56 1.78 0.0000 0.0000 0.0000 0.0000 0 0
+988 0 """2CUSTER----1""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+989 0 """2C-3DECO-138""" 0.9752 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+990 0 """2DAYTON----1""" 0.9863 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+991 2 """2DELRAY-16-1""" 1.0200 0.00 72.00 350.00 0.00 54.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+992 2 """2DELRAY-G.24""" 1.0483 0.00 236.00 2320.00 0.00 2320.00 290.94 159.76 0.0000 0.0000 0.0000 0.0000 0 0
+993 0 """2ELM-------1""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+994 0 """2E.FERMI---1""" 0.9983 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+995 0 """2ERIN------1""" 1.0331 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+996 0 """2E-N-S-TAP11""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+997 0 """2E-N-S-TAP21""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+998 2 """2ESSEX-----1""" 1.0543 0.00 274.00 0.00 0.00 140.00 0.00 0.00 0.0000 1.0800 0.0000 0.0000 0 0
+999 0 """2EVERGREEN-1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1000 0 """2FLEETWD-1-1""" 1.0428 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1001 0 """2FLEETWD-2-1""" 1.0456 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1002 0 """2FLEETWD--13""" 1.0161 0.00 0.00 0.00 0.00 0.00 12.02 5.78 0.0000 0.0000 0.0000 0.0000 0 0
+1003 0 """2FOMOCO-C1-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+1004 0 """2FOMOCO-C2-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+1005 0 """2FRISBIE---1""" 1.0414 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1006 0 """2GENOA-----1""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1007 0 """2HANCOCK---1""" 1.0042 0.00 82.00 210.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1008 2 """2HARB.BEA.-1""" 1.0597 0.00 114.00 -300.00 -30.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1009 0 """2HINES-----1""" 0.9897 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1010 0 """2HUNTER-CK.1""" 1.0432 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1011 0 """2IRONTON---1""" 1.0310 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1012 0 """2IRN-NA-RV-1""" 1.0272 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1013 0 """2IMLAY-1PUP1""" 1.0685 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1014 0 """2JEFFERSON-1""" 1.0257 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1015 0 """2KTT-DECO138""" 1.0748 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1016 0 """2LK.HURON1P1""" 1.1530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1017 0 """2LK.HURON2P1""" 1.1335 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1018 0 """2LAPEER----1""" 1.0390 0.00 0.00 0.00 0.00 0.00 7.83 2.85 0.0000 0.0000 0.0000 0.0000 0 0
+1019 0 """2LARK------1""" 0.9720 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1020 0 """2LEE-------1""" 1.1215 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1021 0 """2LINCOLN---1""" 1.0100 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1022 0 """2LN-NE-NW--1""" 1.0129 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1023 0 """2LOGAN-1---1""" 1.0326 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1024 0 """2LOGAN-1-.13""" 1.0161 0.00 0.00 0.00 0.00 0.00 8.54 2.49 0.0000 0.0000 0.0000 0.0000 0 0
+1025 0 """2LOGAN-2---1""" 1.0362 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1026 0 """2LOGAN-2-.13""" 1.0153 0.00 0.00 0.00 0.00 0.00 8.46 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+1027 0 """2LONG-LK-1-1""" 1.0035 0.00 0.00 0.00 0.00 0.00 7.12 1.69 0.0000 0.0000 0.0000 0.0000 0 0
+1028 0 """2LONG-LK-2-1""" 1.0046 0.00 0.00 0.00 0.00 0.00 6.68 1.25 0.0000 0.0000 0.0000 0.0000 0 0
+1029 0 """2LUZON-----1""" 0.9694 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1030 0 """2LUZON-W.40D""" 0.9908 0.00 0.00 0.00 0.00 0.00 16.02 7.83 0.0000 0.0000 0.0000 0.0000 0 0
+1031 0 """2MACOMB----1""" 1.0576 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1032 2 """2MARYSVILLE1""" 1.1521 0.00 84.00 0.00 0.00 60.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1033 0 """2MAXWELL-1-1""" 1.0236 0.00 0.00 0.00 0.00 0.00 18.16 11.21 0.0000 0.0000 0.0000 0.0000 0 0
+1034 0 """2MAXWELL-2-1""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1035 0 """2MCLOUTH-1-1""" 1.0222 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+1036 0 """2MCLOUTH-2-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+1037 2 """2MCLOUTH-.24""" 1.0350 0.00 0.00 670.00 -30.00 100.00 108.22 48.42 0.0000 0.0000 0.0000 0.0000 0 0
+1038 0 """2MEDINA----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1039 0 """2MIDTOWN---1""" 1.0409 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1040 2 """2MONRO-1,2-3""" 1.0100 0.00 1290.95 -880.00 -182.00 803.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1041 2 """2MONRO-3,4-3""" 1.0105 0.00 470.00 -910.00 -91.00 528.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1042 0 """2MTCALM-CP-1""" 1.0065 0.00 0.00 0.00 0.00 0.00 78.59 31.06 0.0000 0.0000 0.0000 0.0000 0 0
+1043 0 """2NAVARRE---2""" 1.0244 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1044 0 """2NAVARRE---1""" 1.0256 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1045 0 """2NEWBURGH--1""" 0.9920 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1046 0 """2NOBLE-----1""" 0.9773 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1047 0 """2NORTHEAST-1""" 1.0287 0.00 54.00 140.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1048 0 """2N.E.STUB--1""" 1.0437 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1049 2 """2N.E.FLIK.24""" 1.0200 0.00 0.00 40.00 0.00 30.00 43.16 15.22 0.0000 0.0000 0.0000 0.0000 0 0
+1050 0 """2NORTHWEST-1""" 0.9962 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1051 0 """2PHOENIX---1""" 0.9654 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1052 0 """2PIONEER-TP1""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1053 0 """2PIONEER---1""" 0.9633 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1054 0 """2PLACID----1""" 0.9882 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1055 0 """2PONTIAC---3""" 1.0328 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1056 0 """2PONTIAC---1""" 1.0213 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1057 0 """2RED-RUN---1""" 1.0352 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+1058 0 """2REMER-----1""" 1.1466 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1059 0 """2R.R.EQZR.-1""" 1.0352 0.00 0.00 0.00 0.00 0.00 60.52 37.47 0.0000 0.0000 0.0000 0.0000 0 0
+1060 2 """2R.ROUGE-1-1""" 1.0354 0.00 272.00 1880.00 0.00 188.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1061 2 """2R.ROUGE-2-1""" 1.0442 0.00 257.00 1980.00 0.00 198.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1062 2 """2R.ROUGE-3-1""" 1.0447 0.00 300.00 0.00 0.00 209.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1063 0 """2RIVERVU---1""" 1.0241 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1064 0 """2ROMULUS---1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1065 0 """2RUSH------1""" 1.0284 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1066 0 """2SANDUSKY--1""" 1.0989 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1067 0 """2SLOCUM----1""" 1.0153 0.00 14.00 40.00 0.00 0.00 57.49 27.86 0.0000 0.0000 0.0000 0.0000 0 0
+1068 0 """2SOUTHFLD--1""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1069 0 """2SPOKANE---1""" 1.0200 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1070 2 """2ST-CLAIR--3""" 1.0433 0.00 498.00 0.00 0.00 215.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1071 2 """2ST-CL.1-3-1""" 1.1866 0.00 501.00 3220.00 0.00 322.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1072 2 """2ST-CL.4,5-1""" 1.1467 0.00 463.00 0.00 0.00 315.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1073 2 """2ST-CL.6---1""" 1.1194 0.00 322.00 0.00 0.00 190.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1074 0 """2STC-SP-STL1""" 1.0639 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1075 0 """2STEPHENS--3""" 1.0262 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1076 0 """2STEPHENS--1""" 1.0420 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1077 0 """2STERLING--1""" 1.0393 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1078 0 """2SUNSET----1""" 0.9976 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1079 0 """2SUPERIOR--1""" 0.9791 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1080 0 """2TAYLOR-1--1""" 1.0054 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1081 0 """2TAYLOR--2-1""" 1.0247 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1082 0 """2TEMPEST--CP""" 1.0062 0.00 0.00 0.00 0.00 0.00 11.84 3.92 0.0000 0.0000 0.0000 0.0000 0 0
+1083 2 """2TRENTN-NA-1""" 1.0300 0.00 278.00 2220.00 0.00 225.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1084 2 """2TRENTN-SU-1""" 1.0300 0.00 593.00 1450.00 0.00 303.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1085 0 """2TROY------1""" 1.0029 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1086 0 """2TUSCOLA---1""" 1.0236 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1087 0 """2VICTOR----1""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1088 0 """2WABASH-TAP1""" 1.1463 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1089 0 """2WABASH----1""" 1.1431 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1090 0 """2WALTON----1""" 1.0096 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1091 0 """2WARREN----1""" 1.0148 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1092 0 """2WARREN-7--1""" 1.0400 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1093 0 """2WATERMAN--2""" 1.0227 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1094 0 """2WATERMAN--1""" 1.0418 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1095 0 """2WAT.EQZR.24""" 1.0311 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1096 0 """2WAYNE-----3""" 1.0091 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1097 0 """2WAYNE-----1""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1098 0 """2WHEELER---1""" 1.0040 0.00 0.00 0.00 0.00 0.00 24.21 15.04 0.0000 0.0000 0.0000 0.0000 0 0
+1099 0 """2WILLOW-1T-1""" 0.9847 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1100 0 """2WILLOW-2T-1""" 0.9880 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1101 0 """2WILLO-RUN-1""" 0.9811 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1102 0 """2WILLOW--.13""" 0.9992 0.00 0.00 0.00 0.00 0.00 41.83 23.67 0.0000 0.0000 0.0000 0.0000 0 0
+1103 0 """2WIXOM-----3""" 1.0194 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1104 0 """2WIXOM-----1""" 1.0035 0.00 0.00 0.00 0.00 0.00 10.86 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+1105 0 """2WOODHVN-1-1""" 1.0278 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1106 0 """2WOODHVN1.13""" 1.0229 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+1107 0 """2WDHVN-TP2-1""" 1.0248 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1108 0 """2WOODHVN-2-1""" 1.0240 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1109 0 """2WOODHVN2.13""" 1.0124 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+1110 0 """2YOST------1""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+1111 0 """3ALBA-TIE--1""" 1.1233 0.00 0.00 0.00 0.00 0.00 2.50 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+1112 0 """3ALCONA-D--1""" 1.1170 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1113 0 """3ALGOMA----1""" 1.0365 0.00 0.00 0.00 0.00 0.00 14.00 -1.10 0.0000 0.0000 0.0000 0.0000 0 0
+1114 0 """3ALMA------1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.40 2.10 0.0000 0.1000 0.0000 0.0000 0 0
+1115 0 """3ALMEDA----1""" 1.0459 0.00 0.00 0.00 0.00 0.00 14.10 4.30 0.0000 0.0215 0.0000 0.0000 0 0
+1116 0 """3ALPENA----1""" 1.1632 0.00 0.00 0.00 0.00 0.00 33.10 5.20 0.0000 0.2880 0.0000 0.0000 0 0
+1117 0 """3AMBER-----1""" 1.0260 0.00 0.00 0.00 0.00 0.00 19.00 15.60 0.0000 0.0000 0.0000 0.0000 0 0
+1118 0 """3ARGENTA---3""" 1.0555 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1119 0 """3ARGENTA---1""" 1.0537 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1120 0 """3A-1CPCO-120""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1121 0 """3BANGOR----1""" 1.0383 0.00 0.00 0.00 0.00 0.00 8.60 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1122 0 """3BARD-RD---1""" 1.0831 0.00 0.00 0.00 0.00 0.00 6.30 1.20 0.0000 0.0000 0.0000 0.0000 0 0
+1123 0 """3BARRY-----1""" 1.0416 0.00 0.00 0.00 0.00 0.00 27.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+1124 0 """3BASS-CRK--1""" 1.0389 0.00 0.00 0.00 0.00 0.00 17.80 3.20 0.0000 0.0000 0.0000 0.0000 0 0
+1125 0 """3BATAVIA---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 23.20 0.10 0.0000 0.0800 0.0000 0.0000 0 0
+1126 0 """3BEALS-RD.-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 146.80 48.60 0.0000 0.1500 0.0000 0.0000 0 0
+1127 0 """3BEECHER---1""" 1.0185 0.00 0.00 0.00 0.00 0.00 61.40 30.10 0.0000 0.0800 0.0000 0.0000 0 0
+1128 0 """3BEGOLE----1""" 1.0444 0.00 0.00 0.00 0.00 0.00 19.70 2.50 0.0000 0.1530 0.0000 0.0000 0 0
+1129 0 """3BEVERIDGE-1""" 1.0238 0.00 0.00 0.00 0.00 0.00 50.90 24.30 0.0000 0.1388 0.0000 0.0000 0 0
+1130 2 """3BIG-ROCK--1""" 1.1480 0.00 50.00 -140.00 -14.00 28.00 0.00 0.00 0.0000 0.0116 0.0000 0.0000 0 0
+1131 0 """3BINGHAM---1""" 1.0446 0.00 0.00 0.00 0.00 0.00 17.60 -7.80 0.0000 0.1928 0.0000 0.0000 0 0
+1132 0 """3BLACK-RIV-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 49.90 8.50 0.0000 0.0000 0.0000 0.0000 0 0
+1133 0 """3BLACKSTON-1""" 1.0188 0.00 0.00 200.00 0.00 0.00 83.10 22.00 0.0000 0.0800 0.0000 0.0000 0 0
+1134 0 """3BOARDMAN--1""" 1.0825 0.00 2.00 0.00 0.00 0.00 27.80 16.10 0.0000 0.1042 0.0000 0.0000 0 0
+1135 0 """3BUICK-STEW1""" 1.0363 0.00 0.00 0.00 0.00 0.00 40.50 17.10 0.0000 0.0000 0.0000 0.0000 0 0
+1136 0 """3BULLOCK---1""" 1.0269 0.00 0.00 0.00 0.00 0.00 37.10 37.10 0.0000 0.1578 0.0000 0.0000 0 0
+1137 2 """3CAMPBELL--1""" 1.0554 0.00 584.00 0.00 0.00 390.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1138 0 """3CEMENT-CY-1""" 1.0188 0.00 0.00 0.00 0.00 0.00 28.00 -0.20 0.0000 0.1000 0.0000 0.0000 0 0
+1139 0 """3CHASE-----1""" 1.0429 0.00 0.00 0.00 0.00 0.00 4.90 2.20 0.0000 0.0000 0.0000 0.0000 0 0
+1140 0 """3CLAIRMONT-1""" 1.0230 0.00 0.00 0.00 0.00 0.00 73.60 28.60 0.0000 0.1646 0.0000 0.0000 0 0
+1141 0 """3CLEVELAND-1""" 1.0356 0.00 0.00 0.00 0.00 0.00 32.90 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+1142 2 """3COBB------1""" 1.0400 0.00 476.00 40.00 0.00 421.00 79.30 35.60 0.0000 0.0000 0.0000 0.0000 0 0
+1143 0 """3CORK-ST.--1""" 1.0494 0.00 0.00 0.00 0.00 0.00 17.00 7.20 0.0000 0.0000 0.0000 0.0000 0 0
+1144 0 """3CORNELL---1""" 1.0290 0.00 0.00 0.00 0.00 0.00 33.30 12.00 0.0000 0.1981 0.0000 0.0000 0 0
+1145 0 """3COTTEGE-GR1""" 1.0738 0.00 0.00 0.00 0.00 0.00 1.70 0.70 0.0000 0.0000 0.0000 0.0000 0 0
+1146 0 """3CROTON----1""" 1.0342 0.00 29.00 0.00 0.00 0.00 10.40 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+1147 0 """3DEAN-RD.--1""" 1.0521 0.00 0.00 0.00 0.00 0.00 3.60 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+1148 0 """3DEJA------1""" 1.0414 0.00 0.00 0.00 0.00 0.00 13.80 -2.50 0.0000 0.0000 0.0000 0.0000 0 0
+1149 0 """3DELANEY---1""" 1.0469 0.00 0.00 0.00 0.00 0.00 64.80 25.10 0.0000 0.2698 0.0000 0.0000 0 0
+1150 0 """3DELH1-----1""" 1.0442 0.00 0.00 0.00 0.00 0.00 36.90 -10.00 0.0000 0.2783 0.0000 0.0000 0 0
+1151 0 """3DORT------1""" 1.0425 0.00 0.00 0.00 0.00 0.00 106.40 37.90 0.0000 0.4626 0.0000 0.0000 0 0
+1152 0 """3DOW-CHLOR.1""" 1.0243 0.00 0.00 0.00 0.00 0.00 49.00 24.00 0.0000 0.0000 0.0000 0.0000 0 0
+1153 0 """3DU-PONTE--1""" 1.0355 0.00 0.00 0.00 0.00 0.00 2.20 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1154 0 """3D-4CPCO-120""" 1.0444 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1155 0 """3EDENVILLE-1""" 1.0405 0.00 0.00 0.00 0.00 0.00 7.10 -4.70 0.0000 0.0000 0.0000 0.0000 0 0
+1156 2 """3ELM-STREET1""" 1.0444 0.00 29.00 0.00 0.00 7.00 32.70 23.30 0.0000 0.0000 0.0000 0.0000 0 0
+1157 0 """3EMMET-----1""" 1.1457 0.00 0.00 0.00 0.00 0.00 21.00 3.90 0.0000 0.0000 0.0000 0.0000 0 0
+1158 0 """3EUREKA----1""" 1.0398 0.00 0.00 0.00 0.00 0.00 21.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+1159 0 """3FELCH-RD.-1""" 1.0331 0.00 0.00 0.00 0.00 0.00 14.00 5.90 0.0000 0.0000 0.0000 0.0000 0 0
+1160 0 """3FISHER----1""" 1.0445 0.00 0.00 0.00 0.00 0.00 14.10 4.60 0.0000 0.0000 0.0000 0.0000 0 0
+1161 0 """3FOUNDRY---1""" 1.0316 0.00 0.00 0.00 0.00 0.00 31.70 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+1162 0 """3FOUR-MILE-1""" 1.0406 0.00 2.00 0.00 0.00 0.00 111.80 32.80 0.0000 0.1000 0.0000 0.0000 0 0
+1163 0 """3GARFIELD--1""" 1.0354 0.00 0.00 0.00 0.00 0.00 72.20 32.00 0.0000 0.0353 0.0000 0.0000 0 0
+1164 2 """3GAYLORD---1""" 1.1519 0.00 60.00 0.00 0.00 15.00 10.10 1.90 0.0000 0.0826 0.0000 0.0000 0 0
+1165 0 """3GENOA-----1""" 1.0678 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1166 0 """3GLEANER---1""" 1.0283 0.00 0.00 0.00 0.00 0.00 18.80 6.90 0.0000 0.0000 0.0000 0.0000 0 0
+1167 0 """3GREY-IRON-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 53.50 17.50 0.0000 0.0000 0.0000 0.0000 0 0
+1168 0 """3HALSEY----1""" 1.0458 0.00 0.00 0.00 0.00 0.00 20.40 3.80 0.0000 0.1148 0.0000 0.0000 0 0
+1169 0 """3HARDY-DAM-1""" 1.0343 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1170 0 """3HAZELWOOD-1""" 1.0525 0.00 0.00 0.00 0.00 0.00 39.10 7.20 0.0000 0.0400 0.0000 0.0000 0 0
+1171 0 """3HEMPHILL--1""" 1.0447 0.00 0.00 0.00 0.00 0.00 134.10 62.70 0.0000 0.6928 0.0000 0.0000 0 0
+1172 0 """3HIGGINS---1""" 1.1065 0.00 0.00 0.00 0.00 0.00 18.90 2.80 0.0000 0.0000 0.0000 0.0000 0 0
+1173 0 """3HODENPYL--1""" 1.0686 0.00 0.00 0.00 0.00 0.00 8.40 -0.80 0.0000 0.0000 0.0000 0.0000 0 0
+1174 0 """3HOLLAN-RD-1""" 1.0168 0.00 0.00 0.00 0.00 0.00 42.80 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+1175 0 """3HOOKER----1""" 1.0348 0.00 0.00 0.00 0.00 0.00 26.40 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1176 0 """3HUGHES-RD-1""" 1.0377 0.00 0.00 0.00 0.00 0.00 21.80 4.80 0.0000 0.0000 0.0000 0.0000 0 0
+1177 0 """3IOSCO-----1""" 1.1238 0.00 19.00 0.00 0.00 0.00 12.80 5.70 0.0000 0.0263 0.0000 0.0000 0 0
+1178 0 """3ISLAND-RD-1""" 1.0435 0.00 0.00 0.00 0.00 0.00 29.20 -2.90 0.0000 0.1086 0.0000 0.0000 0 0
+1179 2 """3KARN------1""" 1.0563 0.00 498.00 0.00 0.00 337.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1180 0 """3KENOWA----3""" 1.0865 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1181 0 """3LATSON----1""" 1.0558 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1182 0 """3LAWNDALE--1""" 1.0265 0.00 0.00 0.00 0.00 0.00 39.90 17.00 0.0000 0.0000 0.0000 0.0000 0 0
+1183 0 """3LAYTON----1""" 1.0246 0.00 0.00 0.00 0.00 0.00 16.10 1.80 0.0000 0.0000 0.0000 0.0000 0 0
+1184 0 """3LEWISTON--1""" 1.1462 0.00 0.00 0.00 0.00 0.00 2.60 0.80 0.0000 0.0000 0.0000 0.0000 0 0
+1185 0 """3LINBERGH--1""" 1.0424 0.00 0.00 0.00 0.00 0.00 42.40 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+1186 0 """3LOOK-GLAS-1""" 1.0411 0.00 0.00 0.00 0.00 0.00 25.30 -3.20 0.0000 0.0000 0.0000 0.0000 0 0
+1187 0 """3LOUD------1""" 1.1048 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0040 0.0000 0.0000 0 0
+1188 2 """3LUDINGTON-3""" 1.0978 0.00 0.00 0.00 0.00 200.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1189 0 """3MALLEABLE-1""" 1.0211 0.00 0.00 0.00 0.00 0.00 61.50 17.20 0.0000 0.0000 0.0000 0.0000 0 0
+1190 0 """3MARQUETTE-1""" 1.0444 0.00 2.00 0.00 0.00 0.00 17.80 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+1191 0 """3MECOSTA---1""" 1.0370 0.00 0.00 0.00 0.00 0.00 15.90 3.60 0.0000 0.0000 0.0000 0.0000 0 0
+1192 0 """3MEDUSA----1""" 1.1103 0.00 0.00 0.00 0.00 0.00 11.50 1.60 0.0000 0.0000 0.0000 0.0000 0 0
+1193 0 """3MILES-RD.-1""" 1.1103 0.00 0.00 0.00 0.00 0.00 7.70 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+1194 0 """3MILHAM----1""" 1.0437 0.00 0.00 0.00 0.00 0.00 36.30 9.60 0.0000 0.1413 0.0000 0.0000 0 0
+1195 0 """3MIO-------1""" 1.1407 0.00 9.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.2067 0.0000 0.0000 0 0
+1196 0 """3MONITOR---1""" 1.0319 0.00 0.00 0.00 0.00 0.00 41.40 14.30 0.0000 0.0503 0.0000 0.0000 0 0
+1197 0 """3MOORE-RD--1""" 0.9940 0.00 0.00 0.00 0.00 0.00 40.80 10.60 0.0000 0.0000 0.0000 0.0000 0 0
+1198 2 """3MORROW----1""" 1.0500 0.00 130.00 0.00 0.00 168.00 80.20 31.20 0.0000 0.1836 0.0000 0.0000 0 0
+1199 0 """3MUSKEGN-HT1""" 1.0212 0.00 0.00 0.00 0.00 0.00 72.90 52.50 0.0000 0.0000 0.0000 0.0000 0 0
+1200 0 """3NODULAR---1""" 1.0228 0.00 0.00 0.00 0.00 0.00 34.40 16.80 0.0000 0.0000 0.0000 0.0000 0 0
+1201 0 """3N.BELDING-1""" 1.0422 0.00 0.00 0.00 0.00 0.00 20.70 -2.30 0.0000 0.1000 0.0000 0.0000 0 0
+1202 0 """3OAKLAND---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 17.80 5.80 0.0000 0.0000 0.0000 0.0000 0 0
+1203 0 """3OGEMAW----1""" 1.0698 0.00 0.00 0.00 0.00 0.00 11.90 -7.50 0.0000 0.0000 0.0000 0.0000 0 0
+1204 0 """3OWOSSO----1""" 1.0282 0.00 0.00 0.00 0.00 0.00 29.20 10.40 0.0000 0.0000 0.0000 0.0000 0 0
+1205 0 """3PAGE------1""" 1.0180 0.00 0.00 0.00 0.00 0.00 45.80 5.40 0.0000 0.0800 0.0000 0.0000 0 0
+1206 2 """3PALISADES-3""" 1.0392 0.00 701.70 0.00 0.00 418.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1207 0 """3PASEDENA--1""" 1.0263 0.00 0.00 0.00 0.00 0.00 48.70 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+1208 0 """3PENN-DIXIE1""" 1.1463 0.00 0.00 0.00 0.00 0.00 6.60 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+1209 0 """3PT.CALCIT-1""" 1.1721 0.00 0.00 0.00 0.00 0.00 9.40 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+1210 0 """3RAISIN----1""" 1.0280 0.00 0.00 0.00 0.00 0.00 21.10 8.80 0.0000 0.0000 0.0000 0.0000 0 0
+1211 0 """3RICE-CREK-1""" 1.0323 0.00 0.00 0.00 0.00 0.00 29.10 1.20 0.0000 0.2540 0.0000 0.0000 0 0
+1212 0 """3RIFLE-RIV.1""" 1.0698 0.00 0.00 0.00 0.00 0.00 2.40 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+1213 2 """3RIGGSVIL--1""" 1.1813 0.00 25.00 0.00 0.00 6.00 22.30 2.50 0.0000 0.1838 0.0000 0.0000 0 0
+1214 0 """3RIVERVIEW-1""" 1.0513 0.00 0.00 0.00 0.00 0.00 79.60 28.70 0.0000 0.3312 0.0000 0.0000 0 0
+1215 0 """3ROCKPORT--1""" 1.1679 0.00 0.00 0.00 0.00 0.00 1.00 0.20 0.0000 0.0000 0.0000 0.0000 0 0
+1216 0 """3RONDO-----1""" 1.1683 0.00 0.00 0.00 0.00 0.00 3.40 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+1217 0 """3SAGNAW-R.-1""" 1.0316 0.00 0.00 0.00 0.00 0.00 63.80 32.80 0.0000 0.1568 0.0000 0.0000 0 0
+1218 0 """3SAMARIA---1""" 1.0341 0.00 0.00 0.00 0.00 0.00 23.10 10.70 0.0000 0.0000 0.0000 0.0000 0 0
+1219 0 """3SCOTT-LK.-1""" 1.0470 0.00 0.00 0.00 0.00 0.00 17.10 5.70 0.0000 0.0000 0.0000 0.0000 0 0
+1220 0 """3SPAULDING-1""" 1.0412 0.00 0.00 0.00 0.00 0.00 70.40 16.20 0.0000 0.0800 0.0000 0.0000 0 0
+1221 0 """3SPRUCE----1""" 1.1468 0.00 0.00 0.00 0.00 0.00 4.40 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+1222 0 """3STAMPG-PLT1""" 1.0446 0.00 0.00 0.00 0.00 0.00 11.60 3.80 0.0000 0.0000 0.0000 0.0000 0 0
+1223 0 """3STRONACH--1""" 1.0397 0.00 0.00 0.00 0.00 0.00 21.20 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+1224 0 """3STOVER----1""" 1.1154 0.00 0.00 0.00 0.00 0.00 6.60 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+1225 0 """3SUMMERTON-1""" 1.0218 0.00 0.00 0.00 0.00 0.00 24.20 -2.10 0.0000 0.0000 0.0000 0.0000 0 0
+1226 0 """3TALLMADGE-3""" 1.0815 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1227 0 """3TALLMADGE-1""" 1.0662 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1228 0 """3THETFORD--3""" 1.0579 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1229 2 """3THETFORD--1""" 1.0516 0.00 146.00 0.00 0.00 36.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1230 0 """3TITTABAW--3""" 1.0615 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1231 0 """3TITTABAW--1""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1232 0 """3TIPPY-DAM-1""" 1.0648 0.00 29.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.1255 0.0000 0.0000 0 0
+1233 0 """3TOMPKINS--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1234 0 """3TUSC.TAP.-1""" 1.0626 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1235 0 """3TWINING---1""" 1.0667 0.00 0.00 0.00 0.00 0.00 8.70 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+1236 0 """3UPJOHN----1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.80 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+1237 2 """3VERONA----1""" 1.0467 0.00 29.00 0.00 0.00 7.00 78.70 10.40 0.0000 0.4710 0.0000 0.0000 0 0
+1238 0 """3VEVAY-----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 18.30 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+1239 0 """3WACKERLY--1""" 1.0295 0.00 0.00 0.00 0.00 0.00 29.80 9.70 0.0000 0.0000 0.0000 0.0000 0 0
+1240 0 """3WARREN----1""" 1.0665 0.00 0.00 0.00 0.00 0.00 19.20 14.60 0.0000 0.3967 0.0000 0.0000 0 0
+1241 0 """3WASHTENAW-1""" 1.0009 0.00 0.00 0.00 0.00 0.00 16.90 -3.00 0.0000 0.0000 0.0000 0.0000 0 0
+1242 2 """3WEADOCK-B-1""" 1.0400 0.00 299.00 90.00 0.00 226.00 35.70 15.30 0.0000 0.0330 0.0000 0.0000 0 0
+1243 2 """3WEADOCK-W-1""" 1.0476 0.00 319.00 0.00 0.00 191.00 36.60 15.30 0.0000 0.0000 0.0000 0.0000 0 0
+1244 0 """3WEALTHY---1""" 1.0461 0.00 0.00 0.00 0.00 0.00 116.80 51.00 0.0000 0.0000 0.0000 0.0000 0 0
+1245 0 """3WEXFORD---1""" 1.0784 0.00 0.00 0.00 0.00 0.00 24.60 -4.50 0.0000 0.0990 0.0000 0.0000 0 0
+1246 0 """3WHITE-LK.-1""" 1.0342 0.00 9.00 0.00 0.00 0.00 11.80 6.80 0.0000 0.0000 0.0000 0.0000 0 0
+1247 2 """3WHITING---1""" 1.0500 0.00 331.00 900.00 0.00 206.00 14.30 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1248 0 """3WILLARD---1""" 1.0411 0.00 0.00 0.00 0.00 0.00 23.60 3.70 0.0000 0.0000 0.0000 0.0000 0 0
+1249 0 """4ALLANBURG-2""" 1.1270 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1250 0 """4BEACH-----2""" 1.0829 0.00 0.00 0.00 0.00 0.00 256.30 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+1251 2 """4BEAUHARN--2""" 1.1266 0.00 600.00 500.00 -25.00 50.00 19.70 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+1252 2 """4BECK------2""" 1.1280 0.00 1011.00 1890.00 -100.00 600.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1253 0 """4-BP-76-REG2""" 1.0551 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1254 0 """4BROCKVILLE2""" 1.0779 0.00 0.00 0.00 0.00 0.00 76.90 31.50 0.0000 0.0000 0.0000 0.0000 0 0
+1255 0 """4BUCHANNAN-2""" 1.0643 0.00 0.00 0.00 0.00 0.00 600.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+1256 2 """4BUCHANNAN-1""" 1.0472 0.00 0.00 -250.00 -25.00 200.00 326.80 52.40 0.0000 0.0000 0.0000 0.0000 0 0
+1257 0 """4BURLINGTON2""" 1.0779 0.00 0.00 0.00 0.00 0.00 900.00 300.00 0.0000 0.0000 0.0000 0.0000 0 0
+1258 0 """4CHATHAM---2""" 1.0922 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1259 2 """4CHATS-FALL2""" 1.1200 0.00 168.00 670.00 -30.00 70.00 7.00 3.30 0.0000 0.0000 0.0000 0.0000 0 0
+1260 2 """4CHERRYWOOD2""" 1.0770 0.00 1000.00 4190.00 -300.00 600.00 650.00 212.60 0.0000 0.0000 0.0000 0.0000 0 0
+1261 0 """4CRAWFORD--1""" 1.0371 0.00 0.00 0.00 0.00 0.00 64.00 28.00 0.0000 0.0000 0.0000 0.0000 0 0
+1262 2 """4DESJOACH--2""" 1.1740 0.00 370.00 590.00 -50.00 175.00 16.10 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+1263 2 """4DETWEILER-2""" 1.0550 0.00 0.00 230.00 -35.00 50.00 600.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+1264 2 """4DOBBIN----2""" 1.0510 0.00 222.00 -310.00 -50.00 75.00 160.00 65.60 0.0000 0.0000 0.0000 0.0000 0 0
+1265 2 """4DOUGLAS-PT2""" 1.1000 0.00 200.00 370.00 -50.00 80.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1266 0 """4EASTON-JCT2""" 1.0823 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1267 0 """4ESSA--230-2""" 1.0904 0.00 0.00 0.00 0.00 0.00 211.00 57.00 0.0000 0.0000 0.0000 0.0000 0 0
+1268 0 """4ESSEX-115-1""" 1.0395 0.00 0.00 0.00 0.00 0.00 84.00 -6.00 0.0000 0.0000 0.0000 0.0000 0 0
+1269 0 """4HANMER----5""" 1.0071 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 -2.1000 0.0000 0.0000 0 0
+1270 0 """4HANNON----2""" 1.0931 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1271 0 """4HANOVER---2""" 1.0859 0.00 0.00 0.00 0.00 0.00 172.20 38.20 0.0000 0.0000 0.0000 0.0000 0 0
+1272 0 """4HAWTHORNE-2""" 1.0613 0.00 0.00 0.00 0.00 0.00 400.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+1273 0 """4HINCHBROOK2""" 1.0640 0.00 0.00 0.00 0.00 0.00 300.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+1274 2 """4HOLDEN----2""" 1.1600 0.00 200.00 150.00 -50.00 90.00 96.00 25.00 0.0000 0.0000 0.0000 0.0000 0 0
+1275 0 """4KEITH-230-2""" 1.0658 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1276 2 """4KEITH-115-1""" 1.0383 0.00 60.00 -100.00 -10.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1277 0 """4KENT------1""" 0.9963 0.00 0.00 0.00 0.00 0.00 122.80 29.80 0.0000 0.0000 0.0000 0.0000 0 0
+1278 0 """4KLEINBURG-5""" 0.9713 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1279 0 """4KLEINBURG-2""" 1.0794 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1280 0 """4LAMBTON-345""" 1.0434 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1281 0 """4LAMBTON---2""" 1.1215 0.00 0.00 0.00 0.00 0.00 27.80 11.70 0.0000 0.0000 0.0000 0.0000 0 0
+1282 2 """4LAMBTON-.24""" 1.1750 0.00 1450.00 7430.00 -500.00 1080.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1283 0 """4LAUZON----2""" 1.0537 0.00 0.00 0.00 0.00 0.00 86.00 20.00 0.0000 0.0000 0.0000 0.0000 0 0
+1284 0 """4LAUZON----1""" 1.0421 0.00 0.00 0.00 0.00 0.00 124.70 16.20 0.0000 0.0000 0.0000 0.0000 0 0
+1285 0 """4LEASIDE---2""" 1.0681 0.00 0.00 0.00 0.00 0.00 500.00 150.00 0.0000 0.0000 0.0000 0.0000 0 0
+1286 0 """4-L-33-P---2""" 1.0530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1287 3 """4MANBY-----2""" 1.0650 0.00 726.60 450.00 0.00 0.00 950.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+1288 2 """4MARTINDALE2""" 1.1071 0.00 435.00 -500.00 -50.00 100.00 627.00 98.50 0.0000 0.0000 0.0000 0.0000 0 0
+1289 0 """4MERIVALE--2""" 0.9920 0.00 0.00 0.00 0.00 0.00 244.00 95.00 0.0000 0.0000 0.0000 0.0000 0 0
+1290 0 """4MIDDLEPORT2""" 1.1049 0.00 0.00 0.00 0.00 0.00 40.00 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+1291 0 """4MINDEN----2""" 1.1309 0.00 0.00 0.00 0.00 0.00 92.60 31.90 0.0000 0.0000 0.0000 0.0000 0 0
+1292 2 """4NANTICO---2""" 1.1570 0.00 1940.00 7680.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1293 2 """4NORTH-BAY-2""" 1.1500 0.00 245.00 -110.00 -50.00 100.00 27.20 11.90 0.0000 0.0000 0.0000 0.0000 0 0
+1294 0 """4NEALE-----2""" 1.0954 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1295 0 """4ORANGEVIL-2""" 1.0761 0.00 0.00 0.00 0.00 0.00 67.00 40.00 0.0000 0.0000 0.0000 0.0000 0 0
+1296 0 """4-PA-27-REG2""" 1.0521 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1297 0 """4PAUGAN----2""" 1.1278 0.00 0.00 0.00 0.00 0.00 8.30 2.50 0.0000 0.0000 0.0000 0.0000 0 0
+1298 0 """4PINARD----5""" 1.0473 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1299 2 """4PINARD----2""" 1.0400 0.00 550.00 600.00 -300.00 300.00 0.00 0.00 0.0000 -1.0470 0.0000 0.0000 0 0
+1300 0 """4PORCUPINE-5""" 1.0447 0.00 0.00 0.00 0.00 0.00 90.00 32.10 0.0000 0.0000 0.0000 0.0000 0 0
+1301 0 """4RICHVIEW--2""" 1.0681 0.00 0.00 0.00 0.00 0.00 800.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+1302 2 """4STLAWRENCE2""" 1.1139 0.00 744.00 3000.00 -100.00 300.00 250.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+1303 0 """4STLAWRENCE1""" 1.0058 0.00 0.00 0.00 0.00 0.00 49.50 21.00 0.0000 0.0000 0.0000 0.0000 0 0
+1304 0 """4STTHOMAS--1""" 1.0326 0.00 0.00 0.00 0.00 0.00 165.00 11.00 0.0000 0.0000 0.0000 0.0000 0 0
+1305 0 """4SANDWICH--2""" 1.0611 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1306 0 """4SAND.WEST-2""" 1.0622 0.00 0.00 0.00 0.00 0.00 114.80 51.60 0.0000 0.0000 0.0000 0.0000 0 0
+1307 0 """4SCOTT-----2""" 1.0961 0.00 0.00 0.00 0.00 0.00 160.00 41.70 0.0000 0.0000 0.0000 0.0000 0 0
+1308 0 """4SCOTT-----1""" 1.0396 0.00 0.00 0.00 0.00 0.00 169.50 36.20 0.0000 0.0000 0.0000 0.0000 0 0
+1309 0 """4WONDERLAND2""" 1.0664 0.00 0.00 0.00 0.00 0.00 79.30 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+1310 0 """5BAYSHORE-T3""" 1.0112 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1311 2 """5BAYSHORE-T1""" 1.0300 0.00 600.00 2680.00 -1000.00 1000.00 760.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+1312 2 """5LEMOYNE--T3""" 1.0120 0.00 0.00 1900.00 -1000.00 1000.00 175.00 90.80 0.0000 0.0000 0.0000 0.0000 0 0
+1313 0 """5BENTON-HBR3""" 1.0329 0.00 0.00 0.00 0.00 0.00 330.00 16.90 0.0000 0.0000 0.0000 0.0000 0 0
+1314 2 """5D.C.COOK--3""" 1.0300 0.00 2501.67 990.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1315 2 """5DUMONT----3""" 1.0300 0.00 850.00 5270.00 -1000.00 1000.00 167.00 50.00 0.0000 0.0000 0.0000 0.0000 0 0
+1316 2 """5E.LIMA----3""" 0.9900 0.00 80.00 860.00 -1000.00 1000.00 350.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+1317 2 """5FOSTORIA--3""" 1.0000 0.00 0.00 -490.00 -1000.00 1000.00 254.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+1318 2 """5OLIVE-----3""" 1.0200 0.00 0.00 -2130.00 -1000.00 1000.00 394.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+1319 2 """5ROBISON-PK3""" 0.9800 0.00 0.00 -630.00 -1000.00 1000.00 460.00 169.80 0.0000 0.0000 0.0000 0.0000 0 0
+1320 2 """5SORENSON--3""" 1.0000 0.00 163.00 850.00 -1000.00 1000.00 371.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+1321 2 """5TWIN-BRCH-3""" 1.0200 0.00 0.00 -1660.00 -1000.00 1000.00 700.00 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+1322 2 """5LEWISTON-Y2""" 1.0520 0.00 1209.10 -190.00 -200.00 420.00 654.10 -45.40 0.0000 0.0000 0.0000 0.0000 0 0
+1323 2 """5MOSSES---Y2""" 1.0500 0.00 400.00 620.00 0.00 130.00 505.90 96.60 0.0000 0.0000 0.0000 0.0000 0 0
+1324 2 """5PACKARD--Y2""" 1.0520 0.00 0.00 -160.00 -1000.00 100.00 641.40 -0.60 0.0000 0.0000 0.0000 0.0000 0 0
+1325 0 """ADAIR-------""" 1.0193 0.00 0.00 0.00 0.00 0.00 2.18 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+1326 0 """ADAMS-----40""" 1.0140 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+1327 0 """1AINSWORTH--""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.17 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+1328 0 """ALGONAC-----""" 1.0163 0.00 0.00 0.00 0.00 0.00 7.98 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+1329 0 """ALMONT------""" 0.9849 0.00 0.00 0.00 0.00 0.00 3.28 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+1330 0 """ANDERSON----""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.59 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+1331 0 """APPLEGATE---""" 0.9866 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+1332 0 """ARGO--------""" 1.0307 0.00 0.00 0.00 0.00 0.00 23.02 3.93 0.0000 0.1200 0.0000 0.0000 0 0
+1333 0 """ARMADA------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.52 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+1334 0 """ARROWHEAD-40""" 1.0217 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1335 0 """ATTICA------""" 0.9842 0.00 0.00 0.00 0.00 0.00 1.34 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+1336 0 """AUBURN-HTS-1""" 1.0049 0.00 0.00 0.00 0.00 0.00 6.50 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+1337 0 """AVOCA-------""" 0.9930 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+1338 0 """AVON--------""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+1339 0 """BAD-AXE-40--""" 0.9987 0.00 0.00 0.00 0.00 0.00 6.13 2.12 0.0000 0.0660 0.0000 0.0000 0 0
+1340 0 """BALDWIN--EQ1""" 1.0224 0.00 0.00 0.00 0.00 0.00 8.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+1341 0 """BARNES-LAKE-""" 0.9888 0.00 0.00 0.00 0.00 0.00 2.20 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+1342 0 """1BARTLETT-CP""" 1.0119 0.00 0.00 0.00 0.00 0.00 7.40 5.87 0.0000 0.0000 0.0000 0.0000 0 0
+1343 0 """BAYPORT-----""" 0.9869 0.00 0.00 0.00 0.00 0.00 1.26 2.12 0.0000 0.0000 0.0000 0.0000 0 0
+1344 0 """BEAVER------""" 0.9956 0.00 0.00 0.00 0.00 0.00 0.17 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+1345 0 """BELLEVILLE--""" 1.0212 0.00 0.00 0.00 0.00 0.00 6.05 2.66 0.0000 0.0000 0.0000 0.0000 0 0
+1346 0 """BERLIN-FUT74""" 1.0348 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1347 0 """BERNARD-----""" 0.9996 0.00 0.00 0.00 0.00 0.00 2.10 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+1348 0 """BINGHAM--EQ1""" 1.0029 0.00 0.00 0.00 0.00 0.00 3.28 1.49 0.0000 0.0480 0.0000 0.0000 0 0
+1349 0 """BLOOMFIELD40""" 1.0220 0.00 0.00 0.00 0.00 0.00 79.00 39.62 0.0000 0.0900 0.0000 0.0000 0 0
+1350 0 """BOND,MADRID-""" 1.0551 0.00 0.00 0.00 0.00 0.00 2.18 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+1351 0 """BREST-------""" 1.0358 0.00 0.00 0.00 0.00 0.00 5.04 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+1352 0 """BREWER------""" 1.0045 0.00 0.00 0.00 0.00 0.00 2.94 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+1353 0 """BRIGHTON----""" 1.0076 0.00 0.00 0.00 0.00 0.00 5.96 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+1354 0 """BROWN-CITY--""" 0.9725 0.00 0.00 0.00 0.00 0.00 3.28 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+1355 0 """BROWNSTOWN40""" 1.0348 0.00 0.00 0.00 0.00 0.00 36.46 24.76 0.0000 0.0000 0.0000 0.0000 0 0
+1356 0 """BRAY--------""" 0.9770 0.00 0.00 0.00 0.00 0.00 1.51 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+1357 0 """BRUCE---EQ1-""" 1.0034 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+1358 0 """BUNCE-CRK-40""" 1.0333 0.00 0.00 0.00 0.00 0.00 7.73 4.25 0.0000 0.0000 0.0000 0.0000 0 0
+1359 2 """BUNCE-CRK-24""" 1.0607 0.00 84.00 480.00 0.00 480.00 37.72 22.10 0.0000 0.0000 0.0000 0.0000 0 0
+1360 0 """CALUMET-----""" 0.9844 0.00 0.00 0.00 0.00 0.00 3.11 1.91 0.0000 0.0000 0.0000 0.0000 0 0
+1361 0 """CAMDEN-2,5--""" 1.0033 0.00 0.00 0.00 0.00 0.00 9.41 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+1362 0 """CAMPUS-1----""" 1.0279 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+1363 0 """CAMPUS-2----""" 1.0216 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+1364 0 """CAPAC-------""" 0.9880 0.00 0.00 0.00 0.00 0.00 3.11 1.38 0.0000 0.0660 0.0000 0.0000 0 0
+1365 0 """CARLETON----""" 1.0054 0.00 0.00 0.00 0.00 0.00 1.76 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+1366 0 """CARO-1------""" 1.0018 0.00 0.00 0.00 0.00 0.00 1.68 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+1367 0 """CARO-T.E.C.-""" 0.9962 0.00 0.00 0.00 0.00 0.00 1.76 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+1368 0 """CARPENTER---""" 1.0007 0.00 0.00 0.00 0.00 0.00 8.15 3.29 0.0000 0.1140 0.0000 0.0000 0 0
+1369 0 """CARSONVILLE-""" 0.9885 0.00 0.00 0.00 0.00 0.00 0.67 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+1370 0 """CARTER------""" 1.0069 0.00 0.00 0.00 0.00 0.00 15.04 7.54 0.0000 0.0000 0.0000 0.0000 0 0
+1371 0 """CASEVILLE---""" 0.9683 0.00 0.00 0.00 0.00 0.00 3.02 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+1372 0 """CASEY-------""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.18 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+1373 0 """CASS-CITY---""" 1.0011 0.00 0.00 0.00 0.00 0.00 5.04 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+1374 0 """CHERRY-HILL-""" 0.9566 0.00 0.00 0.00 0.00 0.00 0.92 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+1375 0 """CHESTERFLD-1""" 1.0264 0.00 0.00 0.00 0.00 0.00 3.95 0.53 0.0000 0.0480 0.0000 0.0000 0 0
+1376 0 """CHESTERFLD-2""" 1.0088 0.00 0.00 0.00 0.00 0.00 8.48 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+1377 0 """CHESTNUT-40-""" 1.0150 0.00 0.00 0.00 0.00 0.00 75.20 29.50 0.0000 0.3600 0.0000 0.0000 0 0
+1378 0 """CHILSON-----""" 1.0175 0.00 0.00 0.00 0.00 0.00 1.51 0.85 0.0000 0.0660 0.0000 0.0000 0 0
+1379 0 """CLARKSTON-2-""" 1.0013 0.00 0.00 0.00 0.00 0.00 4.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+1380 0 """CLIFFORD----""" 0.9881 0.00 0.00 0.00 0.00 0.00 1.34 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+1381 0 """COATS-------""" 1.0093 0.00 0.00 0.00 0.00 0.00 3.36 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+1382 0 """CODY-40-----""" 1.0456 0.00 0.00 0.00 0.00 0.00 19.99 6.27 0.0000 0.1800 0.0000 0.0000 0 0
+1383 0 """COLFAX---EQ1""" 1.0885 0.00 14.00 40.00 0.00 0.00 4.87 2.55 0.0000 0.0480 0.0000 0.0000 0 0
+1384 0 """COLLIER----1""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+1385 0 """CLOTH-PR.-1-""" 1.0059 0.00 0.00 0.00 0.00 0.00 3.00 -0.37 0.0000 0.0000 0.0000 0.0000 0 0
+1386 0 """COLUMBIAVILE""" 0.9871 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1387 0 """COMMERCE-LK-""" 0.9872 0.00 0.00 0.00 0.00 0.00 6.05 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+1388 0 """CORTLAND-24-""" 1.0112 0.00 0.00 0.00 0.00 0.00 204.10 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+1389 0 """CROSWELL-EQ1""" 0.9883 0.00 0.00 0.00 0.00 0.00 5.96 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+1390 0 """CROWN-1-----""" 1.0243 0.00 0.00 0.00 0.00 0.00 10.16 0.32 0.0000 0.0900 0.0000 0.0000 0 0
+1391 0 """CROWN-2-----""" 0.9891 0.00 0.00 0.00 0.00 0.00 4.54 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+1392 0 """CULVER------""" 0.9954 0.00 0.00 0.00 0.00 0.00 8.57 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+1393 0 """CUSTER-24---""" 1.0216 0.00 14.00 40.00 0.00 0.00 61.40 33.15 0.0000 0.0000 0.0000 0.0000 0 0
+1394 0 """DADE-1------""" 1.0165 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+1395 0 """DADE-2------""" 1.0158 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+1396 0 """DARWIN-1----""" 1.0440 0.00 0.00 0.00 0.00 0.00 4.87 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+1397 0 """DARWIN-2----""" 1.0408 0.00 0.00 0.00 0.00 0.00 4.79 1.27 0.0000 0.0480 0.0000 0.0000 0 0
+1398 0 """DAVIS---EQ1-""" 0.9767 0.00 0.00 0.00 0.00 0.00 20.30 10.25 0.0000 0.0900 0.0000 0.0000 0 0
+1399 0 """DAYTON-40---""" 1.0256 0.00 5.00 10.00 0.00 0.00 5.71 2.97 0.0000 0.0660 0.0000 0.0000 0 0
+1400 0 """DECKR-+-ASPN""" 0.9878 0.00 0.00 0.00 0.00 0.00 2.52 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+1401 0 """DEWEY-2-----""" 0.9865 0.00 0.00 0.00 0.00 0.00 11.34 3.82 0.0000 0.0000 0.0000 0.0000 0 0
+1402 0 """DEXTER---EQ1""" 1.0348 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0480 0.0000 0.0000 0 0
+1403 0 """DILLARD-1---""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+1404 0 """DOVER-1-----""" 1.0030 0.00 0.00 0.00 0.00 0.00 3.78 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+1405 0 """DOVER-2-----""" 0.9997 0.00 0.00 0.00 0.00 0.00 3.19 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+1406 0 """DREXEL-2----""" 0.9883 0.00 0.00 0.00 0.00 0.00 9.24 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+1407 0 """DRYDEN------""" 0.9797 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+1408 0 """ECKLES-2----""" 0.9704 0.00 0.00 0.00 0.00 0.00 4.62 -0.74 0.0000 0.0000 0.0000 0.0000 0 0
+1409 0 """EDGEWATER---""" 0.9989 0.00 0.00 0.00 0.00 0.00 1.30 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+1410 0 """ELKTON------""" 0.9804 0.00 0.00 0.00 0.00 0.00 3.36 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+1411 0 """ELM-40------""" 1.0242 0.00 0.00 0.00 0.00 0.00 107.77 79.00 0.0000 0.2850 0.0000 0.0000 0 0
+1412 0 """EMERICK-1---""" 1.0099 0.00 0.00 0.00 0.00 0.00 8.82 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+1413 0 """EMMETT------""" 0.9925 0.00 0.00 0.00 0.00 0.00 1.01 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+1414 0 """ENGLISH-----""" 1.0024 0.00 0.00 0.00 0.00 0.00 1.68 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+1415 0 """ERIN40------""" 1.0115 0.00 0.00 0.00 0.00 0.00 103.40 41.50 0.0000 0.1800 0.0000 0.0000 0 0
+1416 0 """EVERGREEN-40""" 1.0364 0.00 0.00 0.00 0.00 0.00 213.20 82.90 0.0000 0.5100 0.0000 0.0000 0 0
+1417 0 """FAIRGROVE---""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.02 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+1418 0 """FALCON-1----""" 1.0232 0.00 0.00 0.00 0.00 0.00 9.32 6.12 0.0000 0.0000 0.0000 0.0000 0 0
+1419 0 """FALCON-2----""" 1.0207 0.00 0.00 0.00 0.00 0.00 7.56 4.99 0.0000 0.0000 0.0000 0.0000 0 0
+1420 0 """FISHER------""" 1.0370 0.00 0.00 0.00 0.00 0.00 5.96 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+1421 0 """FLAT-ROCK-1-""" 1.0195 0.00 0.00 0.00 0.00 0.00 1.68 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+1422 0 """FLEMING-----""" 1.0067 0.00 0.00 0.00 0.00 0.00 4.54 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+1423 0 """FORESTER----""" 0.9770 0.00 0.00 0.00 0.00 0.00 0.76 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+1424 0 """FRANK2---EQ1""" 0.9722 0.00 0.00 0.00 0.00 0.00 6.10 1.50 0.0000 0.0000 0.0000 0.0000 0 0
+1425 0 """FREEDOM-----""" 0.9954 0.00 0.00 0.00 0.00 0.00 1.10 0.12 0.0000 0.0000 0.0000 0.0000 0 0
+1426 0 """FRENCHLND-2-""" 1.0263 0.00 0.00 0.00 0.00 0.00 5.70 4.37 0.0000 0.1200 0.0000 0.0000 0 0
+1427 0 """FRISBIE-24--""" 1.0881 0.00 0.00 0.00 0.00 0.00 222.68 75.01 0.0000 0.0000 0.0000 0.0000 0 0
+1428 0 """FULLER-1----""" 1.0203 0.00 0.00 0.00 0.00 0.00 2.52 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+1429 0 """FULLER-2----""" 1.0257 0.00 0.00 0.00 0.00 0.00 2.44 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+1430 0 """GAGETOWN----""" 1.0203 0.00 0.00 0.00 0.00 0.00 1.18 0.42 0.0000 0.0480 0.0000 0.0000 0 0
+1431 0 """1GARNER-CP--""" 1.0195 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1432 0 """GENOA-40----""" 1.0191 0.00 0.00 0.00 0.00 0.00 12.94 6.37 0.0000 0.1800 0.0000 0.0000 0 0
+1433 0 """GLOBE-------""" 0.9892 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+1434 0 """GOODISON----""" 0.9861 0.00 0.00 0.00 0.00 0.00 7.56 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+1435 0 """GRAF--------""" 0.9961 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+1436 0 """HAMBURG-----""" 1.0440 0.00 0.00 0.00 0.00 0.00 2.44 0.64 0.0000 0.0660 0.0000 0.0000 0 0
+1437 0 """HANCOCK-40--""" 1.0036 0.00 100.81 190.00 0.00 0.00 29.57 15.62 0.0000 0.0000 0.0000 0.0000 0 0
+1438 0 """HANNAN-1---1""" 1.0048 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+1439 0 """HARTLAND----""" 0.9948 0.00 0.00 0.00 0.00 0.00 2.18 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+1440 0 """HEMLOCK-1---""" 1.0293 0.00 0.00 0.00 0.00 0.00 6.00 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+1441 0 """HEMLOCK-2---""" 1.0364 0.00 0.00 0.00 0.00 0.00 6.97 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+1442 2 """HINES-40----""" 0.9900 0.00 0.00 120.00 0.00 18.00 115.58 95.12 0.0000 0.3600 0.0000 0.0000 0 0
+1443 0 """HOBART-TAP--""" 1.0363 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1444 0 """HOBART------""" 1.0414 0.00 0.00 0.00 0.00 0.00 4.03 1.59 0.0000 0.0900 0.0000 0.0000 0 0
+1445 0 """HOWELL-2----""" 1.0160 0.00 0.00 0.00 0.00 0.00 3.95 1.81 0.0000 0.0660 0.0000 0.0000 0 0
+1446 0 """HUNTERS-CR40""" 1.0031 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1447 0 """IDA---------""" 1.0107 0.00 0.00 0.00 0.00 0.00 1.90 -0.12 0.0000 0.0000 0.0000 0.0000 0 0
+1448 0 """IMLAY-CITY--""" 0.9775 0.00 0.00 0.00 0.00 0.00 4.70 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+1449 0 """INLAND---EQ1""" 1.0137 0.00 0.00 0.00 0.00 0.00 5.80 3.51 0.0000 0.0000 0.0000 0.0000 0 0
+1450 0 """IRA---------""" 1.0238 0.00 0.00 0.00 0.00 0.00 2.10 0.85 0.0000 0.0480 0.0000 0.0000 0 0
+1451 0 """IRONTON-24--""" 1.0193 0.00 0.00 0.00 0.00 0.00 177.80 67.00 0.0000 0.0000 0.0000 0.0000 0 0
+1452 0 """IRVING------""" 0.9945 0.00 0.00 0.00 0.00 0.00 5.88 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1453 0 """JACKSON-RD.2""" 1.0346 0.00 0.00 0.00 0.00 0.00 1.01 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+1454 0 """JASPER------""" 1.0041 0.00 0.00 0.00 0.00 0.00 0.34 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+1455 0 """JORDAN-1----""" 0.9922 0.00 0.00 0.00 0.00 0.00 1.85 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+1456 0 """JOPLIN------""" 0.9903 0.00 0.00 0.00 0.00 0.00 0.76 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+1457 0 """KEEGO-2-----""" 0.9789 0.00 0.00 0.00 0.00 0.00 1.10 0.37 0.0000 0.0000 0.0000 0.0000 0 0
+1458 0 """KELLOGG-----""" 0.9988 0.00 0.00 0.00 0.00 0.00 3.78 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+1459 0 """1KENNETT-CP-""" 1.0198 0.00 0.00 0.00 0.00 0.00 17.90 8.37 0.0000 0.0000 0.0000 0.0000 0 0
+1460 0 """KIMBALL-----""" 1.0128 0.00 0.00 0.00 0.00 0.00 3.36 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+1461 0 """KINDE-------""" 0.9840 0.00 0.00 0.00 0.00 0.00 1.01 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+1462 0 """KING-SEELEY-""" 1.0463 0.00 0.00 0.00 0.00 0.00 2.69 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+1463 0 """LAKEPORT----""" 1.0008 0.00 0.00 0.00 0.00 0.00 1.85 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+1464 0 """LAKEVILLE---""" 0.9976 0.00 0.00 0.00 0.00 0.00 1.09 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+1465 0 """LAPEER------""" 0.9933 0.00 0.00 0.00 0.00 0.00 3.78 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+1466 0 """LARK-40-----""" 1.0476 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1467 0 """LEE-40------""" 1.0183 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+1468 0 """LIMA--------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.18 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+1469 0 """LINCOLN-24--""" 0.9866 0.00 0.00 0.00 0.00 0.00 148.43 124.57 0.0000 0.5700 0.0000 0.0000 0 0
+1470 0 """LUZON-40----""" 1.0040 0.00 0.00 0.00 0.00 0.00 21.67 12.01 0.0000 0.0900 0.0000 0.0000 0 0
+1471 0 """MACOMB-40---""" 1.0194 0.00 0.00 0.00 0.00 0.00 132.00 96.50 0.0000 0.3600 0.0000 0.0000 0 0
+1472 0 """MARINE-CITY-""" 1.0387 0.00 0.00 0.00 0.00 0.00 5.21 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+1473 0 """MARLETTE----""" 0.9794 0.00 0.00 0.00 0.00 0.00 5.29 1.70 0.0000 0.0480 0.0000 0.0000 0 0
+1474 0 """MAYBEE------""" 1.0091 0.00 0.00 0.00 0.00 0.00 1.26 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+1475 0 """MAYVILLE----""" 1.0032 0.00 0.00 0.00 0.00 0.00 2.02 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+1476 0 """MEADOW---EQ1""" 0.9943 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+1477 0 """MEDINA-40---""" 1.0197 0.00 0.00 0.00 0.00 0.00 45.80 21.50 0.0000 0.1800 0.0000 0.0000 0 0
+1478 0 """MELVIN------""" 0.9800 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+1479 0 """METAMORA----""" 0.9954 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+1480 0 """MILFORD-----""" 1.0033 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+1481 0 """MILLINGTON--""" 0.9808 0.00 0.00 0.00 0.00 0.00 2.35 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+1482 0 """MOHAWK-2----""" 0.9967 0.00 0.00 0.00 0.00 0.00 2.10 0.25 0.0000 0.0000 0.0000 0.0000 0 0
+1483 0 """MONARCH-----""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.30 1.50 0.0000 0.0960 0.0000 0.0000 0 0
+1484 0 """1MONTCALM-CP""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1485 0 """MOTT-2------""" 1.0159 0.00 0.00 0.00 0.00 0.00 7.39 3.82 0.0000 0.0900 0.0000 0.0000 0 0
+1486 0 """NATIONAL-1--""" 0.9928 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+1487 0 """NATIONAL-2--""" 0.9997 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+1488 0 """NAVARRE-24--""" 1.0384 0.00 0.00 0.00 0.00 0.00 190.43 107.21 0.0000 0.8700 0.0000 0.0000 0 0
+1489 0 """NEFF--------""" 1.0012 0.00 0.00 0.00 0.00 0.00 5.71 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+1490 0 """NELSON-MILS1""" 1.0263 0.00 0.00 0.00 0.00 0.00 2.94 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+1491 0 """NELSON-MILS2""" 1.0270 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+1492 0 """NEW-BALTMR-1""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.10 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+1493 0 """NEW-BALTMR23""" 1.0237 0.00 0.00 0.00 0.00 0.00 4.28 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+1494 0 """NEW-BOSTON--""" 1.0111 0.00 0.00 0.00 0.00 0.00 1.93 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+1495 0 """NEWBURGH-40-""" 0.9673 0.00 0.00 0.00 0.00 0.00 147.42 102.95 0.0000 0.3000 0.0000 0.0000 0 0
+1496 0 """NEW-HAVEN-1-""" 1.0179 0.00 0.00 0.00 0.00 0.00 3.44 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+1497 0 """NEW-HAVEN-2-""" 1.0220 0.00 0.00 0.00 0.00 0.00 2.69 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+1498 0 """NIXON-2-----""" 0.9768 0.00 0.00 0.00 0.00 0.00 11.09 5.52 0.0000 0.0000 0.0000 0.0000 0 0
+1499 0 """NOBLE-------""" 0.9863 0.00 0.00 0.00 0.00 0.00 16.97 9.14 0.0000 0.0000 0.0000 0.0000 0 0
+1500 0 """NORTH-BRANCH""" 0.9717 0.00 0.00 0.00 0.00 0.00 4.45 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+1501 2 """NORTHEAST-24""" 1.0104 0.00 80.00 0.00 0.00 48.00 230.24 141.20 0.0000 0.4800 0.0000 0.0000 0 0
+1502 0 """NORTH-SRVCTR""" 1.0050 0.00 0.00 0.00 0.00 0.00 5.80 4.36 0.0000 0.0000 0.0000 0.0000 0 0
+1503 2 """NORTHWEST-40""" 1.0044 0.00 0.00 0.00 0.00 18.00 209.70 76.40 0.0000 0.5480 0.0000 0.0000 0 0
+1504 0 """NORWAY-1----""" 0.9516 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+1505 0 """NORWAY-2-EQ1""" 0.9477 0.00 0.00 0.00 0.00 0.00 5.96 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+1506 0 """OAK-BEACH---""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.84 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+1507 0 """OLIVER------""" 0.9870 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1508 0 """OLYMPA-FUT75""" 0.9825 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1509 0 """OMAHA-1--EQ1""" 0.9473 0.00 0.00 0.00 0.00 0.00 10.08 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+1510 0 """OMAHA-2--EQ1""" 0.9465 0.00 0.00 0.00 0.00 0.00 9.58 3.61 0.0000 0.0000 0.0000 0.0000 0 0
+1511 0 """OPAL--------""" 1.0050 0.00 0.00 0.00 0.00 0.00 0.92 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+1512 0 """OREGON-1----""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.38 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+1513 0 """ORION-------""" 0.9925 0.00 0.00 0.00 0.00 0.00 5.46 2.02 0.0000 0.0660 0.0000 0.0000 0 0
+1514 0 """OTTER-LAKE--""" 0.9836 0.00 0.00 0.00 0.00 0.00 1.01 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+1515 0 """OWENDALE----""" 1.0049 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+1516 0 """OXFORD------""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.89 3.72 0.0000 0.1200 0.0000 0.0000 0 0
+1517 0 """1PADDOCK-CP-""" 1.0220 0.00 0.00 0.00 0.00 0.00 4.30 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+1518 0 """PAGE--------""" 0.9930 0.00 0.00 0.00 0.00 0.00 9.58 5.63 0.0000 0.0660 0.0000 0.0000 0 0
+1519 0 """PALMER-1----""" 0.9643 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+1520 0 """PARKER-ROAD-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.64 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+1521 0 """PAUL-1------""" 1.0114 0.00 0.00 0.00 0.00 0.00 8.15 4.89 0.0000 0.0480 0.0000 0.0000 0 0
+1522 0 """PAUL-2,3----""" 1.0157 0.00 0.00 0.00 0.00 0.00 4.70 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+1523 0 """PHOENIX-40--""" 1.0379 0.00 0.00 0.00 0.00 0.00 36.71 20.82 0.0000 0.0000 0.0000 0.0000 0 0
+1524 0 """PIEDMONT----""" 1.0235 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1525 0 """PIGEON------""" 0.9818 0.00 0.00 0.00 0.00 0.00 3.78 4.78 0.0000 0.0480 0.0000 0.0000 0 0
+1526 0 """PINCKNEY----""" 1.0442 0.00 0.00 0.00 0.00 0.00 3.86 1.70 0.0000 0.0900 0.0000 0.0000 0 0
+1527 0 """PIONEER---40""" 1.0270 0.00 0.00 0.00 0.00 0.00 19.10 10.12 0.0000 0.0000 0.0000 0.0000 0 0
+1528 0 """PIPER---EQ1-""" 1.0008 0.00 0.00 0.00 0.00 0.00 5.12 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+1529 0 """PITSFLD--EQ1""" 1.0164 0.00 0.00 0.00 0.00 0.00 9.66 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+1530 0 """PLACID------""" 1.0026 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1531 0 """PLYMOUTH----""" 0.9523 0.00 0.00 0.00 0.00 0.00 12.10 7.44 0.0000 0.1560 0.0000 0.0000 0 0
+1532 0 """PORT-AUSTIN-""" 0.9754 0.00 0.00 0.00 0.00 0.00 3.02 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+1533 0 """PORT-HOPE---""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+1534 0 """PORT-SANILAC""" 0.9808 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+1535 0 """PRICE-1-----""" 1.0353 0.00 0.00 0.00 0.00 0.00 4.37 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+1536 0 """PROCTOR-----""" 0.9955 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1537 0 """PUTNAM------""" 1.0098 0.00 14.00 40.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1538 0 """QUEEN-------""" 1.0065 0.00 0.00 0.00 0.00 0.00 3.53 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+1539 0 """QUINCY------""" 1.0030 0.00 0.00 0.00 0.00 0.00 1.34 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+1540 0 """RANDOLPH----""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1541 0 """RAVINE---EQ1""" 0.9764 0.00 0.00 0.00 0.00 0.00 8.90 3.62 0.0000 0.0000 0.0000 0.0000 0 0
+1542 0 """RED-RUN-40--""" 1.0203 0.00 0.00 0.00 0.00 0.00 140.87 71.29 0.0000 0.5400 0.0000 0.0000 0 0
+1543 0 """REESE---EQ2-""" 0.9799 0.00 0.00 0.00 0.00 0.00 5.96 2.23 0.0000 0.0480 0.0000 0.0000 0 0
+1544 0 """REMER-40----""" 1.0461 0.00 0.00 0.00 0.00 0.00 1.34 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1545 0 """RENO--------""" 0.9937 0.00 0.00 0.00 0.00 0.00 4.80 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+1546 0 """RICHMOND----""" 1.0130 0.00 0.00 0.00 0.00 0.00 5.63 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+1547 0 """RIFLE-------""" 0.9886 0.00 0.00 0.00 0.00 0.00 6.13 2.97 0.0000 0.0480 0.0000 0.0000 0 0
+1548 0 """RIVER-RAISIN""" 1.0072 0.00 0.00 0.00 0.00 0.00 0.92 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+1549 2 """RIVERVIEW-40""" 1.0021 0.00 25.00 -100.00 -10.00 20.00 145.57 79.69 0.0000 0.3600 0.0000 0.0000 0 0
+1550 0 """ROCHESTER-1-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.55 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+1551 0 """ROCKWOOD----""" 1.0345 0.00 0.00 0.00 0.00 0.00 5.80 1.59 0.0000 0.0340 0.0000 0.0000 0 0
+1552 0 """ROMEO---EQ1-""" 1.0133 0.00 0.00 0.00 0.00 0.00 6.13 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+1553 0 """ROMULUS---40""" 1.0151 0.00 0.00 0.00 0.00 0.00 20.66 13.07 0.0000 0.1680 0.0000 0.0000 0 0
+1554 0 """RUSH-TAP----""" 0.9835 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1555 0 """RUSH-40-----""" 1.0014 0.00 0.00 0.00 0.00 0.00 3.70 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+1556 0 """SALEM-------""" 1.0417 0.00 0.00 0.00 0.00 0.00 1.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+1557 0 """SALINE------""" 1.0017 0.00 0.00 0.00 0.00 0.00 9.10 4.87 0.0000 0.0960 0.0000 0.0000 0 0
+1558 0 """SANDUSKY-40-""" 1.0042 0.00 0.00 0.00 0.00 0.00 5.29 1.91 0.0000 0.0660 0.0000 0.0000 0 0
+1559 0 """SAXON-------""" 0.9916 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+1560 0 """SEBEWAING---""" 1.0083 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+1561 0 """SELFRIDGE-1-""" 1.0074 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+1562 0 """SELKIRK-----""" 1.0092 0.00 0.00 0.00 0.00 0.00 6.05 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+1563 0 """SHAW--------""" 0.9720 0.00 0.00 0.00 0.00 0.00 1.60 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+1564 0 """SHELDON-1---""" 0.9578 0.00 0.00 0.00 0.00 0.00 5.29 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+1565 0 """SHERWOOD----""" 1.0148 0.00 0.00 0.00 0.00 0.00 1.93 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+1566 0 """SNOVER------""" 0.9929 0.00 0.00 0.00 0.00 0.00 1.60 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+1567 0 """SOUTHFLD-40-""" 1.0066 0.00 0.00 0.00 0.00 0.00 99.54 81.89 0.0000 0.0900 0.0000 0.0000 0 0
+1568 0 """STATE-1-----""" 1.0247 0.00 0.00 0.00 0.00 0.00 5.60 3.25 0.0000 0.0000 0.0000 0.0000 0 0
+1569 0 """SPOKANE-40--""" 1.0014 0.00 0.00 0.00 0.00 0.00 36.54 16.57 0.0000 0.0000 0.0000 0.0000 0 0
+1570 0 """ST-CLAIR-1--""" 1.0259 0.00 0.00 0.00 0.00 0.00 2.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+1571 0 """ST-CLAIR-2--""" 1.0352 0.00 0.00 0.00 0.00 0.00 2.69 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+1572 0 """STEPHENS-24-""" 1.0074 0.00 0.00 0.00 0.00 0.00 164.30 105.69 0.0000 0.5700 0.0000 0.0000 0 0
+1573 0 """STERLING-40-""" 1.0210 0.00 0.00 0.00 0.00 0.00 101.14 45.79 0.0000 0.5400 0.0000 0.0000 0 0
+1574 0 """STOCKBRIDGE-""" 1.0701 0.00 0.00 0.00 0.00 0.00 1.09 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+1575 0 """1STOCKWELLCP""" 1.0172 0.00 0.00 0.00 0.00 0.00 10.90 6.75 0.0000 0.0000 0.0000 0.0000 0 0
+1576 0 """SUNSET-40---""" 1.0041 0.00 0.00 0.00 0.00 0.00 78.79 59.01 0.0000 0.5160 0.0000 0.0000 0 0
+1577 2 """SUPERIOR-40-""" 1.0189 0.00 0.00 0.00 0.00 118.00 61.49 48.74 0.0000 0.1800 0.0000 0.0000 0 0
+1578 0 """TIENKEN-2---""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1579 0 """TALBOT---EQ1""" 0.9854 0.00 0.00 0.00 0.00 0.00 2.35 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+1580 0 """1TAYLOR-1-13""" 1.0121 0.00 0.00 0.00 0.00 0.00 10.67 6.27 0.0000 0.0000 0.0000 0.0000 0 0
+1581 0 """1TAYLOR-2-13""" 1.0154 0.00 0.00 0.00 0.00 0.00 8.65 6.48 0.0000 0.0000 0.0000 0.0000 0 0
+1582 0 """TEGGERDINE--""" 0.9815 0.00 0.00 0.00 0.00 0.00 11.34 4.67 0.0000 0.0000 0.0000 0.0000 0 0
+1583 0 """TEMPLE------""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.59 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+1584 0 """TEXAS-------""" 1.0281 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+1585 0 """TODD--------""" 1.0426 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+1586 0 """TRINITY-2---""" 1.0107 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+1587 0 """TROY-40-----""" 0.9963 0.00 0.00 0.00 0.00 0.00 178.92 77.64 0.0000 0.5400 0.0000 0.0000 0 0
+1588 0 """TUSCOLA-40--""" 1.0020 0.00 0.00 0.00 0.00 0.00 6.22 2.55 0.0000 0.0660 0.0000 0.0000 0 0
+1589 0 """UNION-LAKE--""" 0.9771 0.00 0.00 0.00 0.00 0.00 11.84 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+1590 0 """UNIONVILLE--""" 1.0120 0.00 0.00 0.00 0.00 0.00 1.26 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+1591 0 """UNIVR-BUS1T6""" 1.0250 0.00 0.00 0.00 0.00 0.00 11.17 8.71 0.0000 0.0000 0.0000 0.0000 0 0
+1592 0 """URBAN-TEC---""" 0.9887 0.00 0.00 0.00 0.00 0.00 5.12 3.19 0.0000 0.0000 0.0000 0.0000 0 0
+1593 0 """UTAH--------""" 1.0415 0.00 0.00 0.00 0.00 0.00 0.76 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+1594 0 """VANBUREN-EQ1""" 1.0128 0.00 0.00 0.00 0.00 0.00 1.51 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+1595 0 """VASSAR-BIRCH""" 0.9744 0.00 0.00 0.00 0.00 0.00 10.00 5.74 0.0000 0.0660 0.0000 0.0000 0 0
+1596 0 """VICTOR-40---""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1597 0 """VALLEY------""" 1.0268 0.00 6.00 20.00 0.00 0.00 0.90 0.62 0.0000 0.0000 0.0000 0.0000 0 0
+1598 0 """WABASH-40---""" 1.0066 0.00 0.00 0.00 0.00 0.00 46.70 26.25 0.0000 0.0000 0.0000 0.0000 0 0
+1599 0 """WALLED-LAKE-""" 0.9972 0.00 0.00 0.00 0.00 0.00 6.00 2.62 0.0000 0.0000 0.0000 0.0000 0 0
+1600 0 """WALNUT-1,2--""" 0.9814 0.00 0.00 0.00 0.00 0.00 9.60 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+1601 0 """WALTON40-SUB""" 1.0330 0.00 0.00 0.00 0.00 0.00 44.35 20.08 0.0000 0.1800 0.0000 0.0000 0 0
+1602 0 """WARDLOW-----""" 0.9956 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+1603 2 """WARREN-24---""" 1.0171 0.00 0.00 540.00 0.00 54.00 268.46 194.97 0.0000 0.9000 0.0000 0.0000 0 0
+1604 0 """WASHNGTN-EQ1""" 1.0002 0.00 0.00 0.00 0.00 0.00 8.57 4.36 0.0000 0.0660 0.0000 0.0000 0 0
+1605 0 """WATERFORD---""" 0.9903 0.00 0.00 0.00 0.00 0.00 17.81 5.52 0.0000 0.1800 0.0000 0.0000 0 0
+1606 0 """WEBERVLE-EQ1""" 1.0885 0.00 0.00 0.00 0.00 0.00 8.23 1.91 0.0000 0.1140 0.0000 0.0000 0 0
+1607 0 """WHITE-LAKE--""" 0.9941 0.00 0.00 0.00 0.00 0.00 4.70 1.59 0.0000 0.0000 0.0000 0.0000 0 0
+1608 0 """WHITMORE-LK-""" 1.0357 0.00 0.00 0.00 0.00 0.00 7.81 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+1609 0 """WHITNY-FUT73""" 1.0033 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1610 0 """WILEY-------""" 1.0197 0.00 0.00 0.00 0.00 0.00 1.26 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+1611 0 """WILMOTK-NGFD""" 0.9922 0.00 0.00 0.00 0.00 0.00 0.84 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+1612 0 """WILSON------""" 1.0128 0.00 0.00 0.00 0.00 0.00 2.60 -0.21 0.0000 0.0000 0.0000 0.0000 0 0
+1613 0 """1WILSON-CP--""" 1.0157 0.00 0.00 0.00 0.00 0.00 8.60 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+1614 0 """WOLFHILL----""" 0.9897 0.00 0.00 0.00 0.00 0.00 4.96 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+1615 0 """WOLVERINE-2-""" 1.0200 0.00 0.00 0.00 0.00 0.00 5.12 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+1616 0 """WORTH-------""" 1.0069 0.00 0.00 0.00 0.00 0.00 2.18 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+1617 0 """YALE-TAP----""" 0.9902 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1618 0 """YALE--------""" 0.9870 0.00 0.00 0.00 0.00 0.00 3.11 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+1619 0 """YATES-------""" 0.9871 0.00 0.00 0.00 0.00 0.00 1.34 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+1620 0 """YORK--------""" 0.9901 0.00 0.00 0.00 0.00 0.00 2.44 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+1621 0 """YOST-40-----""" 1.0354 0.00 0.00 0.00 0.00 0.00 48.55 26.29 0.0000 0.0480 0.0000 0.0000 0 0
+1622 0 """2ADAMS-----1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1623 0 """2ALFRED----1""" 1.0468 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+1624 0 """ALFRED-13---""" 1.0489 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+1625 0 """2AMHERST1.13""" 1.0230 0.00 0.00 0.00 0.00 0.00 7.56 4.72 0.0000 0.0000 0.0000 0.0000 0 0
+1626 0 """2AMHERST2.13""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1627 0 """2ARROWHEAD-1""" 1.0315 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1628 0 """2BAD-AXE---1""" 1.0460 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1629 0 """2BLOOMFLD--1""" 1.0065 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1630 0 """2BROWNTN---3""" 1.0081 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1631 0 """2BROWNTN---2""" 1.0314 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1632 2 """2BROWNTN-N-1""" 1.0263 0.00 0.00 -910.00 -91.00 338.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1633 0 """2BROWNTN-S-1""" 1.0117 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1634 0 """2BUNCE-CK--1""" 1.1567 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1635 0 """2B3N-DECO230""" 1.0877 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1636 0 """2-BURNS-1--1""" 1.0578 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1637 0 """2-BURNS-2--1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1638 0 """2CANIFF----3""" 1.0261 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1639 0 """2CANIFF----1""" 1.0433 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1640 0 """2CATALINA-CP""" 1.0064 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1641 0 """2CATO------1""" 1.0403 0.00 0.00 0.00 0.00 0.00 57.14 27.68 0.0000 0.0000 0.0000 0.0000 0 0
+1642 0 """2CHESTNUT--1""" 1.0164 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1643 0 """2CODY------1""" 0.9887 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1644 2 """2CONNER-G.24""" 1.0404 0.00 285.00 1770.00 0.00 1770.00 436.28 182.01 0.0000 0.0000 0.0000 0.0000 0 0
+1645 0 """2COOPER----1""" 1.0059 0.00 0.00 0.00 0.00 0.00 1.34 2.31 0.0000 0.0000 0.0000 0.0000 0 0
+1646 0 """2CORTLAND--1""" 1.0392 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1647 0 """2COVENTRY--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1648 0 """2COVENTRY--1""" 0.9810 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1649 0 """2CRESTWOOD-1""" 1.0120 0.00 0.00 0.00 0.00 0.00 3.56 1.78 0.0000 0.0000 0.0000 0.0000 0 0
+1650 0 """2CUSTER----1""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1651 0 """2C-3DECO-138""" 0.9752 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1652 0 """2DAYTON----1""" 0.9863 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1653 2 """2DELRAY-16-1""" 1.0200 0.00 72.00 350.00 0.00 54.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1654 2 """2DELRAY-G.24""" 1.0483 0.00 236.00 2320.00 0.00 2320.00 290.94 159.76 0.0000 0.0000 0.0000 0.0000 0 0
+1655 0 """2ELM-------1""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1656 0 """2E.FERMI---1""" 0.9983 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1657 0 """2ERIN------1""" 1.0331 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1658 0 """2E-N-S-TAP11""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1659 0 """2E-N-S-TAP21""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1660 2 """2ESSEX-----1""" 1.0543 0.00 274.00 0.00 0.00 140.00 0.00 0.00 0.0000 1.0800 0.0000 0.0000 0 0
+1661 0 """2EVERGREEN-1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1662 0 """2FLEETWD-1-1""" 1.0428 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1663 0 """2FLEETWD-2-1""" 1.0456 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1664 0 """2FLEETWD--13""" 1.0161 0.00 0.00 0.00 0.00 0.00 12.02 5.78 0.0000 0.0000 0.0000 0.0000 0 0
+1665 0 """2FOMOCO-C1-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+1666 0 """2FOMOCO-C2-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+1667 0 """2FRISBIE---1""" 1.0414 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1668 0 """2GENOA-----1""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1669 0 """2HANCOCK---1""" 1.0042 0.00 82.00 210.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1670 2 """2HARB.BEA.-1""" 1.0597 0.00 114.00 -300.00 -30.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1671 0 """2HINES-----1""" 0.9897 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1672 0 """2HUNTER-CK.1""" 1.0432 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1673 0 """2IRONTON---1""" 1.0310 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1674 0 """2IRN-NA-RV-1""" 1.0272 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1675 0 """2IMLAY-1PUP1""" 1.0685 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1676 0 """2JEFFERSON-1""" 1.0257 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1677 0 """2KTT-DECO138""" 1.0748 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1678 0 """2LK.HURON1P1""" 1.1530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1679 0 """2LK.HURON2P1""" 1.1335 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1680 0 """2LAPEER----1""" 1.0390 0.00 0.00 0.00 0.00 0.00 7.83 2.85 0.0000 0.0000 0.0000 0.0000 0 0
+1681 0 """2LARK------1""" 0.9720 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1682 0 """2LEE-------1""" 1.1215 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1683 0 """2LINCOLN---1""" 1.0100 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1684 0 """2LN-NE-NW--1""" 1.0129 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1685 0 """2LOGAN-1---1""" 1.0326 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1686 0 """2LOGAN-1-.13""" 1.0161 0.00 0.00 0.00 0.00 0.00 8.54 2.49 0.0000 0.0000 0.0000 0.0000 0 0
+1687 0 """2LOGAN-2---1""" 1.0362 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1688 0 """2LOGAN-2-.13""" 1.0153 0.00 0.00 0.00 0.00 0.00 8.46 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+1689 0 """2LONG-LK-1-1""" 1.0035 0.00 0.00 0.00 0.00 0.00 7.12 1.69 0.0000 0.0000 0.0000 0.0000 0 0
+1690 0 """2LONG-LK-2-1""" 1.0046 0.00 0.00 0.00 0.00 0.00 6.68 1.25 0.0000 0.0000 0.0000 0.0000 0 0
+1691 0 """2LUZON-----1""" 0.9694 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1692 0 """2LUZON-W.40D""" 0.9908 0.00 0.00 0.00 0.00 0.00 16.02 7.83 0.0000 0.0000 0.0000 0.0000 0 0
+1693 0 """2MACOMB----1""" 1.0576 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1694 2 """2MARYSVILLE1""" 1.1521 0.00 84.00 0.00 0.00 60.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1695 0 """2MAXWELL-1-1""" 1.0236 0.00 0.00 0.00 0.00 0.00 18.16 11.21 0.0000 0.0000 0.0000 0.0000 0 0
+1696 0 """2MAXWELL-2-1""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1697 0 """2MCLOUTH-1-1""" 1.0222 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+1698 0 """2MCLOUTH-2-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+1699 2 """2MCLOUTH-.24""" 1.0350 0.00 0.00 670.00 -30.00 100.00 108.22 48.42 0.0000 0.0000 0.0000 0.0000 0 0
+1700 0 """2MEDINA----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1701 0 """2MIDTOWN---1""" 1.0409 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1702 2 """2MONRO-1,2-3""" 1.0100 0.00 1290.95 -880.00 -182.00 803.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1703 2 """2MONRO-3,4-3""" 1.0105 0.00 470.00 -910.00 -91.00 528.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1704 0 """2MTCALM-CP-1""" 1.0065 0.00 0.00 0.00 0.00 0.00 78.59 31.06 0.0000 0.0000 0.0000 0.0000 0 0
+1705 0 """2NAVARRE---2""" 1.0244 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1706 0 """2NAVARRE---1""" 1.0256 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1707 0 """2NEWBURGH--1""" 0.9920 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1708 0 """2NOBLE-----1""" 0.9773 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1709 0 """2NORTHEAST-1""" 1.0287 0.00 54.00 140.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1710 0 """2N.E.STUB--1""" 1.0437 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1711 2 """2N.E.FLIK.24""" 1.0200 0.00 0.00 40.00 0.00 30.00 43.16 15.22 0.0000 0.0000 0.0000 0.0000 0 0
+1712 0 """2NORTHWEST-1""" 0.9962 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1713 0 """2PHOENIX---1""" 0.9654 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1714 0 """2PIONEER-TP1""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1715 0 """2PIONEER---1""" 0.9633 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1716 0 """2PLACID----1""" 0.9882 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1717 0 """2PONTIAC---3""" 1.0328 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1718 0 """2PONTIAC---1""" 1.0213 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1719 0 """2RED-RUN---1""" 1.0352 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+1720 0 """2REMER-----1""" 1.1466 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1721 0 """2R.R.EQZR.-1""" 1.0352 0.00 0.00 0.00 0.00 0.00 60.52 37.47 0.0000 0.0000 0.0000 0.0000 0 0
+1722 2 """2R.ROUGE-1-1""" 1.0354 0.00 272.00 1880.00 0.00 188.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1723 2 """2R.ROUGE-2-1""" 1.0442 0.00 257.00 1980.00 0.00 198.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1724 2 """2R.ROUGE-3-1""" 1.0447 0.00 300.00 0.00 0.00 209.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1725 0 """2RIVERVU---1""" 1.0241 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1726 0 """2ROMULUS---1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1727 0 """2RUSH------1""" 1.0284 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1728 0 """2SANDUSKY--1""" 1.0989 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1729 0 """2SLOCUM----1""" 1.0153 0.00 14.00 40.00 0.00 0.00 57.49 27.86 0.0000 0.0000 0.0000 0.0000 0 0
+1730 0 """2SOUTHFLD--1""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1731 0 """2SPOKANE---1""" 1.0200 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1732 2 """2ST-CLAIR--3""" 1.0433 0.00 498.00 0.00 0.00 215.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1733 2 """2ST-CL.1-3-1""" 1.1866 0.00 501.00 3220.00 0.00 322.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1734 2 """2ST-CL.4,5-1""" 1.1467 0.00 463.00 0.00 0.00 315.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1735 2 """2ST-CL.6---1""" 1.1194 0.00 322.00 0.00 0.00 190.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1736 0 """2STC-SP-STL1""" 1.0639 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1737 0 """2STEPHENS--3""" 1.0262 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1738 0 """2STEPHENS--1""" 1.0420 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1739 0 """2STERLING--1""" 1.0393 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1740 0 """2SUNSET----1""" 0.9976 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1741 0 """2SUPERIOR--1""" 0.9791 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1742 0 """2TAYLOR-1--1""" 1.0054 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1743 0 """2TAYLOR--2-1""" 1.0247 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1744 0 """2TEMPEST--CP""" 1.0062 0.00 0.00 0.00 0.00 0.00 11.84 3.92 0.0000 0.0000 0.0000 0.0000 0 0
+1745 2 """2TRENTN-NA-1""" 1.0300 0.00 278.00 2220.00 0.00 225.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1746 2 """2TRENTN-SU-1""" 1.0300 0.00 593.00 1450.00 0.00 303.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1747 0 """2TROY------1""" 1.0029 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1748 0 """2TUSCOLA---1""" 1.0236 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1749 0 """2VICTOR----1""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1750 0 """2WABASH-TAP1""" 1.1463 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1751 0 """2WABASH----1""" 1.1431 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1752 0 """2WALTON----1""" 1.0096 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1753 0 """2WARREN----1""" 1.0148 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1754 0 """2WARREN-7--1""" 1.0400 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1755 0 """2WATERMAN--2""" 1.0227 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1756 0 """2WATERMAN--1""" 1.0418 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1757 0 """2WAT.EQZR.24""" 1.0311 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1758 0 """2WAYNE-----3""" 1.0091 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1759 0 """2WAYNE-----1""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1760 0 """2WHEELER---1""" 1.0040 0.00 0.00 0.00 0.00 0.00 24.21 15.04 0.0000 0.0000 0.0000 0.0000 0 0
+1761 0 """2WILLOW-1T-1""" 0.9847 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1762 0 """2WILLOW-2T-1""" 0.9880 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1763 0 """2WILLO-RUN-1""" 0.9811 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1764 0 """2WILLOW--.13""" 0.9992 0.00 0.00 0.00 0.00 0.00 41.83 23.67 0.0000 0.0000 0.0000 0.0000 0 0
+1765 0 """2WIXOM-----3""" 1.0194 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1766 0 """2WIXOM-----1""" 1.0035 0.00 0.00 0.00 0.00 0.00 10.86 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+1767 0 """2WOODHVN-1-1""" 1.0278 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1768 0 """2WOODHVN1.13""" 1.0229 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+1769 0 """2WDHVN-TP2-1""" 1.0248 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1770 0 """2WOODHVN-2-1""" 1.0240 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1771 0 """2WOODHVN2.13""" 1.0124 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+1772 0 """2YOST------1""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+1773 0 """3ALBA-TIE--1""" 1.1233 0.00 0.00 0.00 0.00 0.00 2.50 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+1774 0 """3ALCONA-D--1""" 1.1170 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1775 0 """3ALGOMA----1""" 1.0365 0.00 0.00 0.00 0.00 0.00 14.00 -1.10 0.0000 0.0000 0.0000 0.0000 0 0
+1776 0 """3ALMA------1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.40 2.10 0.0000 0.1000 0.0000 0.0000 0 0
+1777 0 """3ALMEDA----1""" 1.0459 0.00 0.00 0.00 0.00 0.00 14.10 4.30 0.0000 0.0215 0.0000 0.0000 0 0
+1778 0 """3ALPENA----1""" 1.1632 0.00 0.00 0.00 0.00 0.00 33.10 5.20 0.0000 0.2880 0.0000 0.0000 0 0
+1779 0 """3AMBER-----1""" 1.0260 0.00 0.00 0.00 0.00 0.00 19.00 15.60 0.0000 0.0000 0.0000 0.0000 0 0
+1780 0 """3ARGENTA---3""" 1.0555 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1781 0 """3ARGENTA---1""" 1.0537 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1782 0 """3A-1CPCO-120""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1783 0 """3BANGOR----1""" 1.0383 0.00 0.00 0.00 0.00 0.00 8.60 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1784 0 """3BARD-RD---1""" 1.0831 0.00 0.00 0.00 0.00 0.00 6.30 1.20 0.0000 0.0000 0.0000 0.0000 0 0
+1785 0 """3BARRY-----1""" 1.0416 0.00 0.00 0.00 0.00 0.00 27.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+1786 0 """3BASS-CRK--1""" 1.0389 0.00 0.00 0.00 0.00 0.00 17.80 3.20 0.0000 0.0000 0.0000 0.0000 0 0
+1787 0 """3BATAVIA---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 23.20 0.10 0.0000 0.0800 0.0000 0.0000 0 0
+1788 0 """3BEALS-RD.-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 146.80 48.60 0.0000 0.1500 0.0000 0.0000 0 0
+1789 0 """3BEECHER---1""" 1.0185 0.00 0.00 0.00 0.00 0.00 61.40 30.10 0.0000 0.0800 0.0000 0.0000 0 0
+1790 0 """3BEGOLE----1""" 1.0444 0.00 0.00 0.00 0.00 0.00 19.70 2.50 0.0000 0.1530 0.0000 0.0000 0 0
+1791 0 """3BEVERIDGE-1""" 1.0238 0.00 0.00 0.00 0.00 0.00 50.90 24.30 0.0000 0.1388 0.0000 0.0000 0 0
+1792 2 """3BIG-ROCK--1""" 1.1480 0.00 50.00 -140.00 -14.00 28.00 0.00 0.00 0.0000 0.0116 0.0000 0.0000 0 0
+1793 0 """3BINGHAM---1""" 1.0446 0.00 0.00 0.00 0.00 0.00 17.60 -7.80 0.0000 0.1928 0.0000 0.0000 0 0
+1794 0 """3BLACK-RIV-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 49.90 8.50 0.0000 0.0000 0.0000 0.0000 0 0
+1795 0 """3BLACKSTON-1""" 1.0188 0.00 0.00 200.00 0.00 0.00 83.10 22.00 0.0000 0.0800 0.0000 0.0000 0 0
+1796 0 """3BOARDMAN--1""" 1.0825 0.00 2.00 0.00 0.00 0.00 27.80 16.10 0.0000 0.1042 0.0000 0.0000 0 0
+1797 0 """3BUICK-STEW1""" 1.0363 0.00 0.00 0.00 0.00 0.00 40.50 17.10 0.0000 0.0000 0.0000 0.0000 0 0
+1798 0 """3BULLOCK---1""" 1.0269 0.00 0.00 0.00 0.00 0.00 37.10 37.10 0.0000 0.1578 0.0000 0.0000 0 0
+1799 2 """3CAMPBELL--1""" 1.0554 0.00 584.00 0.00 0.00 390.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1800 0 """3CEMENT-CY-1""" 1.0188 0.00 0.00 0.00 0.00 0.00 28.00 -0.20 0.0000 0.1000 0.0000 0.0000 0 0
+1801 0 """3CHASE-----1""" 1.0429 0.00 0.00 0.00 0.00 0.00 4.90 2.20 0.0000 0.0000 0.0000 0.0000 0 0
+1802 0 """3CLAIRMONT-1""" 1.0230 0.00 0.00 0.00 0.00 0.00 73.60 28.60 0.0000 0.1646 0.0000 0.0000 0 0
+1803 0 """3CLEVELAND-1""" 1.0356 0.00 0.00 0.00 0.00 0.00 32.90 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+1804 2 """3COBB------1""" 1.0400 0.00 476.00 40.00 0.00 421.00 79.30 35.60 0.0000 0.0000 0.0000 0.0000 0 0
+1805 0 """3CORK-ST.--1""" 1.0494 0.00 0.00 0.00 0.00 0.00 17.00 7.20 0.0000 0.0000 0.0000 0.0000 0 0
+1806 0 """3CORNELL---1""" 1.0290 0.00 0.00 0.00 0.00 0.00 33.30 12.00 0.0000 0.1981 0.0000 0.0000 0 0
+1807 0 """3COTTEGE-GR1""" 1.0738 0.00 0.00 0.00 0.00 0.00 1.70 0.70 0.0000 0.0000 0.0000 0.0000 0 0
+1808 0 """3CROTON----1""" 1.0342 0.00 29.00 0.00 0.00 0.00 10.40 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+1809 0 """3DEAN-RD.--1""" 1.0521 0.00 0.00 0.00 0.00 0.00 3.60 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+1810 0 """3DEJA------1""" 1.0414 0.00 0.00 0.00 0.00 0.00 13.80 -2.50 0.0000 0.0000 0.0000 0.0000 0 0
+1811 0 """3DELANEY---1""" 1.0469 0.00 0.00 0.00 0.00 0.00 64.80 25.10 0.0000 0.2698 0.0000 0.0000 0 0
+1812 0 """3DELH1-----1""" 1.0442 0.00 0.00 0.00 0.00 0.00 36.90 -10.00 0.0000 0.2783 0.0000 0.0000 0 0
+1813 0 """3DORT------1""" 1.0425 0.00 0.00 0.00 0.00 0.00 106.40 37.90 0.0000 0.4626 0.0000 0.0000 0 0
+1814 0 """3DOW-CHLOR.1""" 1.0243 0.00 0.00 0.00 0.00 0.00 49.00 24.00 0.0000 0.0000 0.0000 0.0000 0 0
+1815 0 """3DU-PONTE--1""" 1.0355 0.00 0.00 0.00 0.00 0.00 2.20 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1816 0 """3D-4CPCO-120""" 1.0444 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1817 0 """3EDENVILLE-1""" 1.0405 0.00 0.00 0.00 0.00 0.00 7.10 -4.70 0.0000 0.0000 0.0000 0.0000 0 0
+1818 2 """3ELM-STREET1""" 1.0444 0.00 29.00 0.00 0.00 7.00 32.70 23.30 0.0000 0.0000 0.0000 0.0000 0 0
+1819 0 """3EMMET-----1""" 1.1457 0.00 0.00 0.00 0.00 0.00 21.00 3.90 0.0000 0.0000 0.0000 0.0000 0 0
+1820 0 """3EUREKA----1""" 1.0398 0.00 0.00 0.00 0.00 0.00 21.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+1821 0 """3FELCH-RD.-1""" 1.0331 0.00 0.00 0.00 0.00 0.00 14.00 5.90 0.0000 0.0000 0.0000 0.0000 0 0
+1822 0 """3FISHER----1""" 1.0445 0.00 0.00 0.00 0.00 0.00 14.10 4.60 0.0000 0.0000 0.0000 0.0000 0 0
+1823 0 """3FOUNDRY---1""" 1.0316 0.00 0.00 0.00 0.00 0.00 31.70 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+1824 0 """3FOUR-MILE-1""" 1.0406 0.00 2.00 0.00 0.00 0.00 111.80 32.80 0.0000 0.1000 0.0000 0.0000 0 0
+1825 0 """3GARFIELD--1""" 1.0354 0.00 0.00 0.00 0.00 0.00 72.20 32.00 0.0000 0.0353 0.0000 0.0000 0 0
+1826 2 """3GAYLORD---1""" 1.1519 0.00 60.00 0.00 0.00 15.00 10.10 1.90 0.0000 0.0826 0.0000 0.0000 0 0
+1827 0 """3GENOA-----1""" 1.0678 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1828 0 """3GLEANER---1""" 1.0283 0.00 0.00 0.00 0.00 0.00 18.80 6.90 0.0000 0.0000 0.0000 0.0000 0 0
+1829 0 """3GREY-IRON-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 53.50 17.50 0.0000 0.0000 0.0000 0.0000 0 0
+1830 0 """3HALSEY----1""" 1.0458 0.00 0.00 0.00 0.00 0.00 20.40 3.80 0.0000 0.1148 0.0000 0.0000 0 0
+1831 0 """3HARDY-DAM-1""" 1.0343 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1832 0 """3HAZELWOOD-1""" 1.0525 0.00 0.00 0.00 0.00 0.00 39.10 7.20 0.0000 0.0400 0.0000 0.0000 0 0
+1833 0 """3HEMPHILL--1""" 1.0447 0.00 0.00 0.00 0.00 0.00 134.10 62.70 0.0000 0.6928 0.0000 0.0000 0 0
+1834 0 """3HIGGINS---1""" 1.1065 0.00 0.00 0.00 0.00 0.00 18.90 2.80 0.0000 0.0000 0.0000 0.0000 0 0
+1835 0 """3HODENPYL--1""" 1.0686 0.00 0.00 0.00 0.00 0.00 8.40 -0.80 0.0000 0.0000 0.0000 0.0000 0 0
+1836 0 """3HOLLAN-RD-1""" 1.0168 0.00 0.00 0.00 0.00 0.00 42.80 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+1837 0 """3HOOKER----1""" 1.0348 0.00 0.00 0.00 0.00 0.00 26.40 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1838 0 """3HUGHES-RD-1""" 1.0377 0.00 0.00 0.00 0.00 0.00 21.80 4.80 0.0000 0.0000 0.0000 0.0000 0 0
+1839 0 """3IOSCO-----1""" 1.1238 0.00 19.00 0.00 0.00 0.00 12.80 5.70 0.0000 0.0263 0.0000 0.0000 0 0
+1840 0 """3ISLAND-RD-1""" 1.0435 0.00 0.00 0.00 0.00 0.00 29.20 -2.90 0.0000 0.1086 0.0000 0.0000 0 0
+1841 2 """3KARN------1""" 1.0563 0.00 498.00 0.00 0.00 337.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1842 0 """3KENOWA----3""" 1.0865 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1843 0 """3LATSON----1""" 1.0558 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1844 0 """3LAWNDALE--1""" 1.0265 0.00 0.00 0.00 0.00 0.00 39.90 17.00 0.0000 0.0000 0.0000 0.0000 0 0
+1845 0 """3LAYTON----1""" 1.0246 0.00 0.00 0.00 0.00 0.00 16.10 1.80 0.0000 0.0000 0.0000 0.0000 0 0
+1846 0 """3LEWISTON--1""" 1.1462 0.00 0.00 0.00 0.00 0.00 2.60 0.80 0.0000 0.0000 0.0000 0.0000 0 0
+1847 0 """3LINBERGH--1""" 1.0424 0.00 0.00 0.00 0.00 0.00 42.40 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+1848 0 """3LOOK-GLAS-1""" 1.0411 0.00 0.00 0.00 0.00 0.00 25.30 -3.20 0.0000 0.0000 0.0000 0.0000 0 0
+1849 0 """3LOUD------1""" 1.1048 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0040 0.0000 0.0000 0 0
+1850 2 """3LUDINGTON-3""" 1.0978 0.00 0.00 0.00 0.00 200.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1851 0 """3MALLEABLE-1""" 1.0211 0.00 0.00 0.00 0.00 0.00 61.50 17.20 0.0000 0.0000 0.0000 0.0000 0 0
+1852 0 """3MARQUETTE-1""" 1.0444 0.00 2.00 0.00 0.00 0.00 17.80 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+1853 0 """3MECOSTA---1""" 1.0370 0.00 0.00 0.00 0.00 0.00 15.90 3.60 0.0000 0.0000 0.0000 0.0000 0 0
+1854 0 """3MEDUSA----1""" 1.1103 0.00 0.00 0.00 0.00 0.00 11.50 1.60 0.0000 0.0000 0.0000 0.0000 0 0
+1855 0 """3MILES-RD.-1""" 1.1103 0.00 0.00 0.00 0.00 0.00 7.70 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+1856 0 """3MILHAM----1""" 1.0437 0.00 0.00 0.00 0.00 0.00 36.30 9.60 0.0000 0.1413 0.0000 0.0000 0 0
+1857 0 """3MIO-------1""" 1.1407 0.00 9.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.2067 0.0000 0.0000 0 0
+1858 0 """3MONITOR---1""" 1.0319 0.00 0.00 0.00 0.00 0.00 41.40 14.30 0.0000 0.0503 0.0000 0.0000 0 0
+1859 0 """3MOORE-RD--1""" 0.9940 0.00 0.00 0.00 0.00 0.00 40.80 10.60 0.0000 0.0000 0.0000 0.0000 0 0
+1860 2 """3MORROW----1""" 1.0500 0.00 130.00 0.00 0.00 168.00 80.20 31.20 0.0000 0.1836 0.0000 0.0000 0 0
+1861 0 """3MUSKEGN-HT1""" 1.0212 0.00 0.00 0.00 0.00 0.00 72.90 52.50 0.0000 0.0000 0.0000 0.0000 0 0
+1862 0 """3NODULAR---1""" 1.0228 0.00 0.00 0.00 0.00 0.00 34.40 16.80 0.0000 0.0000 0.0000 0.0000 0 0
+1863 0 """3N.BELDING-1""" 1.0422 0.00 0.00 0.00 0.00 0.00 20.70 -2.30 0.0000 0.1000 0.0000 0.0000 0 0
+1864 0 """3OAKLAND---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 17.80 5.80 0.0000 0.0000 0.0000 0.0000 0 0
+1865 0 """3OGEMAW----1""" 1.0698 0.00 0.00 0.00 0.00 0.00 11.90 -7.50 0.0000 0.0000 0.0000 0.0000 0 0
+1866 0 """3OWOSSO----1""" 1.0282 0.00 0.00 0.00 0.00 0.00 29.20 10.40 0.0000 0.0000 0.0000 0.0000 0 0
+1867 0 """3PAGE------1""" 1.0180 0.00 0.00 0.00 0.00 0.00 45.80 5.40 0.0000 0.0800 0.0000 0.0000 0 0
+1868 2 """3PALISADES-3""" 1.0392 0.00 701.70 0.00 0.00 418.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1869 0 """3PASEDENA--1""" 1.0263 0.00 0.00 0.00 0.00 0.00 48.70 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+1870 0 """3PENN-DIXIE1""" 1.1463 0.00 0.00 0.00 0.00 0.00 6.60 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+1871 0 """3PT.CALCIT-1""" 1.1721 0.00 0.00 0.00 0.00 0.00 9.40 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+1872 0 """3RAISIN----1""" 1.0280 0.00 0.00 0.00 0.00 0.00 21.10 8.80 0.0000 0.0000 0.0000 0.0000 0 0
+1873 0 """3RICE-CREK-1""" 1.0323 0.00 0.00 0.00 0.00 0.00 29.10 1.20 0.0000 0.2540 0.0000 0.0000 0 0
+1874 0 """3RIFLE-RIV.1""" 1.0698 0.00 0.00 0.00 0.00 0.00 2.40 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+1875 2 """3RIGGSVIL--1""" 1.1813 0.00 25.00 0.00 0.00 6.00 22.30 2.50 0.0000 0.1838 0.0000 0.0000 0 0
+1876 0 """3RIVERVIEW-1""" 1.0513 0.00 0.00 0.00 0.00 0.00 79.60 28.70 0.0000 0.3312 0.0000 0.0000 0 0
+1877 0 """3ROCKPORT--1""" 1.1679 0.00 0.00 0.00 0.00 0.00 1.00 0.20 0.0000 0.0000 0.0000 0.0000 0 0
+1878 0 """3RONDO-----1""" 1.1683 0.00 0.00 0.00 0.00 0.00 3.40 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+1879 0 """3SAGNAW-R.-1""" 1.0316 0.00 0.00 0.00 0.00 0.00 63.80 32.80 0.0000 0.1568 0.0000 0.0000 0 0
+1880 0 """3SAMARIA---1""" 1.0341 0.00 0.00 0.00 0.00 0.00 23.10 10.70 0.0000 0.0000 0.0000 0.0000 0 0
+1881 0 """3SCOTT-LK.-1""" 1.0470 0.00 0.00 0.00 0.00 0.00 17.10 5.70 0.0000 0.0000 0.0000 0.0000 0 0
+1882 0 """3SPAULDING-1""" 1.0412 0.00 0.00 0.00 0.00 0.00 70.40 16.20 0.0000 0.0800 0.0000 0.0000 0 0
+1883 0 """3SPRUCE----1""" 1.1468 0.00 0.00 0.00 0.00 0.00 4.40 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+1884 0 """3STAMPG-PLT1""" 1.0446 0.00 0.00 0.00 0.00 0.00 11.60 3.80 0.0000 0.0000 0.0000 0.0000 0 0
+1885 0 """3STRONACH--1""" 1.0397 0.00 0.00 0.00 0.00 0.00 21.20 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+1886 0 """3STOVER----1""" 1.1154 0.00 0.00 0.00 0.00 0.00 6.60 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+1887 0 """3SUMMERTON-1""" 1.0218 0.00 0.00 0.00 0.00 0.00 24.20 -2.10 0.0000 0.0000 0.0000 0.0000 0 0
+1888 0 """3TALLMADGE-3""" 1.0815 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1889 0 """3TALLMADGE-1""" 1.0662 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1890 0 """3THETFORD--3""" 1.0579 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1891 2 """3THETFORD--1""" 1.0516 0.00 146.00 0.00 0.00 36.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1892 0 """3TITTABAW--3""" 1.0615 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1893 0 """3TITTABAW--1""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1894 0 """3TIPPY-DAM-1""" 1.0648 0.00 29.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.1255 0.0000 0.0000 0 0
+1895 0 """3TOMPKINS--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1896 0 """3TUSC.TAP.-1""" 1.0626 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1897 0 """3TWINING---1""" 1.0667 0.00 0.00 0.00 0.00 0.00 8.70 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+1898 0 """3UPJOHN----1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.80 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+1899 2 """3VERONA----1""" 1.0467 0.00 29.00 0.00 0.00 7.00 78.70 10.40 0.0000 0.4710 0.0000 0.0000 0 0
+1900 0 """3VEVAY-----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 18.30 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+1901 0 """3WACKERLY--1""" 1.0295 0.00 0.00 0.00 0.00 0.00 29.80 9.70 0.0000 0.0000 0.0000 0.0000 0 0
+1902 0 """3WARREN----1""" 1.0665 0.00 0.00 0.00 0.00 0.00 19.20 14.60 0.0000 0.3967 0.0000 0.0000 0 0
+1903 0 """3WASHTENAW-1""" 1.0009 0.00 0.00 0.00 0.00 0.00 16.90 -3.00 0.0000 0.0000 0.0000 0.0000 0 0
+1904 2 """3WEADOCK-B-1""" 1.0400 0.00 299.00 90.00 0.00 226.00 35.70 15.30 0.0000 0.0330 0.0000 0.0000 0 0
+1905 2 """3WEADOCK-W-1""" 1.0476 0.00 319.00 0.00 0.00 191.00 36.60 15.30 0.0000 0.0000 0.0000 0.0000 0 0
+1906 0 """3WEALTHY---1""" 1.0461 0.00 0.00 0.00 0.00 0.00 116.80 51.00 0.0000 0.0000 0.0000 0.0000 0 0
+1907 0 """3WEXFORD---1""" 1.0784 0.00 0.00 0.00 0.00 0.00 24.60 -4.50 0.0000 0.0990 0.0000 0.0000 0 0
+1908 0 """3WHITE-LK.-1""" 1.0342 0.00 9.00 0.00 0.00 0.00 11.80 6.80 0.0000 0.0000 0.0000 0.0000 0 0
+1909 2 """3WHITING---1""" 1.0500 0.00 331.00 900.00 0.00 206.00 14.30 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1910 0 """3WILLARD---1""" 1.0411 0.00 0.00 0.00 0.00 0.00 23.60 3.70 0.0000 0.0000 0.0000 0.0000 0 0
+1911 0 """4ALLANBURG-2""" 1.1270 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1912 0 """4BEACH-----2""" 1.0829 0.00 0.00 0.00 0.00 0.00 256.30 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+1913 2 """4BEAUHARN--2""" 1.1266 0.00 600.00 500.00 -25.00 50.00 19.70 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+1914 2 """4BECK------2""" 1.1280 0.00 1011.00 1890.00 -100.00 600.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1915 0 """4-BP-76-REG2""" 1.0551 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1916 0 """4BROCKVILLE2""" 1.0779 0.00 0.00 0.00 0.00 0.00 76.90 31.50 0.0000 0.0000 0.0000 0.0000 0 0
+1917 0 """4BUCHANNAN-2""" 1.0643 0.00 0.00 0.00 0.00 0.00 600.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+1918 2 """4BUCHANNAN-1""" 1.0472 0.00 0.00 -250.00 -25.00 200.00 326.80 52.40 0.0000 0.0000 0.0000 0.0000 0 0
+1919 0 """4BURLINGTON2""" 1.0779 0.00 0.00 0.00 0.00 0.00 900.00 300.00 0.0000 0.0000 0.0000 0.0000 0 0
+1920 0 """4CHATHAM---2""" 1.0922 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1921 2 """4CHATS-FALL2""" 1.1200 0.00 168.00 670.00 -30.00 70.00 7.00 3.30 0.0000 0.0000 0.0000 0.0000 0 0
+1922 2 """4CHERRYWOOD2""" 1.0770 0.00 1000.00 4190.00 -300.00 600.00 650.00 212.60 0.0000 0.0000 0.0000 0.0000 0 0
+1923 0 """4CRAWFORD--1""" 1.0371 0.00 0.00 0.00 0.00 0.00 64.00 28.00 0.0000 0.0000 0.0000 0.0000 0 0
+1924 2 """4DESJOACH--2""" 1.1740 0.00 370.00 590.00 -50.00 175.00 16.10 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+1925 2 """4DETWEILER-2""" 1.0550 0.00 0.00 230.00 -35.00 50.00 600.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+1926 2 """4DOBBIN----2""" 1.0510 0.00 222.00 -310.00 -50.00 75.00 160.00 65.60 0.0000 0.0000 0.0000 0.0000 0 0
+1927 2 """4DOUGLAS-PT2""" 1.1000 0.00 200.00 370.00 -50.00 80.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1928 0 """4EASTON-JCT2""" 1.0823 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1929 0 """4ESSA--230-2""" 1.0904 0.00 0.00 0.00 0.00 0.00 211.00 57.00 0.0000 0.0000 0.0000 0.0000 0 0
+1930 0 """4ESSEX-115-1""" 1.0395 0.00 0.00 0.00 0.00 0.00 84.00 -6.00 0.0000 0.0000 0.0000 0.0000 0 0
+1931 0 """4HANMER----5""" 1.0071 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 -2.1000 0.0000 0.0000 0 0
+1932 0 """4HANNON----2""" 1.0931 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1933 0 """4HANOVER---2""" 1.0859 0.00 0.00 0.00 0.00 0.00 172.20 38.20 0.0000 0.0000 0.0000 0.0000 0 0
+1934 0 """4HAWTHORNE-2""" 1.0613 0.00 0.00 0.00 0.00 0.00 400.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+1935 0 """4HINCHBROOK2""" 1.0640 0.00 0.00 0.00 0.00 0.00 300.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+1936 2 """4HOLDEN----2""" 1.1600 0.00 200.00 150.00 -50.00 90.00 96.00 25.00 0.0000 0.0000 0.0000 0.0000 0 0
+1937 0 """4KEITH-230-2""" 1.0658 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1938 2 """4KEITH-115-1""" 1.0383 0.00 60.00 -100.00 -10.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1939 0 """4KENT------1""" 0.9963 0.00 0.00 0.00 0.00 0.00 122.80 29.80 0.0000 0.0000 0.0000 0.0000 0 0
+1940 0 """4KLEINBURG-5""" 0.9713 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1941 0 """4KLEINBURG-2""" 1.0794 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1942 0 """4LAMBTON-345""" 1.0434 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1943 0 """4LAMBTON---2""" 1.1215 0.00 0.00 0.00 0.00 0.00 27.80 11.70 0.0000 0.0000 0.0000 0.0000 0 0
+1944 2 """4LAMBTON-.24""" 1.1750 0.00 1450.00 7430.00 -500.00 1080.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1945 0 """4LAUZON----2""" 1.0537 0.00 0.00 0.00 0.00 0.00 86.00 20.00 0.0000 0.0000 0.0000 0.0000 0 0
+1946 0 """4LAUZON----1""" 1.0421 0.00 0.00 0.00 0.00 0.00 124.70 16.20 0.0000 0.0000 0.0000 0.0000 0 0
+1947 0 """4LEASIDE---2""" 1.0681 0.00 0.00 0.00 0.00 0.00 500.00 150.00 0.0000 0.0000 0.0000 0.0000 0 0
+1948 0 """4-L-33-P---2""" 1.0530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1949 3 """4MANBY-----2""" 1.0650 0.00 726.60 450.00 0.00 0.00 950.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+1950 2 """4MARTINDALE2""" 1.1071 0.00 435.00 -500.00 -50.00 100.00 627.00 98.50 0.0000 0.0000 0.0000 0.0000 0 0
+1951 0 """4MERIVALE--2""" 0.9920 0.00 0.00 0.00 0.00 0.00 244.00 95.00 0.0000 0.0000 0.0000 0.0000 0 0
+1952 0 """4MIDDLEPORT2""" 1.1049 0.00 0.00 0.00 0.00 0.00 40.00 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+1953 0 """4MINDEN----2""" 1.1309 0.00 0.00 0.00 0.00 0.00 92.60 31.90 0.0000 0.0000 0.0000 0.0000 0 0
+1954 2 """4NANTICO---2""" 1.1570 0.00 1940.00 7680.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1955 2 """4NORTH-BAY-2""" 1.1500 0.00 245.00 -110.00 -50.00 100.00 27.20 11.90 0.0000 0.0000 0.0000 0.0000 0 0
+1956 0 """4NEALE-----2""" 1.0954 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1957 0 """4ORANGEVIL-2""" 1.0761 0.00 0.00 0.00 0.00 0.00 67.00 40.00 0.0000 0.0000 0.0000 0.0000 0 0
+1958 0 """4-PA-27-REG2""" 1.0521 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1959 0 """4PAUGAN----2""" 1.1278 0.00 0.00 0.00 0.00 0.00 8.30 2.50 0.0000 0.0000 0.0000 0.0000 0 0
+1960 0 """4PINARD----5""" 1.0473 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1961 2 """4PINARD----2""" 1.0400 0.00 550.00 600.00 -300.00 300.00 0.00 0.00 0.0000 -1.0470 0.0000 0.0000 0 0
+1962 0 """4PORCUPINE-5""" 1.0447 0.00 0.00 0.00 0.00 0.00 90.00 32.10 0.0000 0.0000 0.0000 0.0000 0 0
+1963 0 """4RICHVIEW--2""" 1.0681 0.00 0.00 0.00 0.00 0.00 800.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+1964 2 """4STLAWRENCE2""" 1.1139 0.00 744.00 3000.00 -100.00 300.00 250.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+1965 0 """4STLAWRENCE1""" 1.0058 0.00 0.00 0.00 0.00 0.00 49.50 21.00 0.0000 0.0000 0.0000 0.0000 0 0
+1966 0 """4STTHOMAS--1""" 1.0326 0.00 0.00 0.00 0.00 0.00 165.00 11.00 0.0000 0.0000 0.0000 0.0000 0 0
+1967 0 """4SANDWICH--2""" 1.0611 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1968 0 """4SAND.WEST-2""" 1.0622 0.00 0.00 0.00 0.00 0.00 114.80 51.60 0.0000 0.0000 0.0000 0.0000 0 0
+1969 0 """4SCOTT-----2""" 1.0961 0.00 0.00 0.00 0.00 0.00 160.00 41.70 0.0000 0.0000 0.0000 0.0000 0 0
+1970 0 """4SCOTT-----1""" 1.0396 0.00 0.00 0.00 0.00 0.00 169.50 36.20 0.0000 0.0000 0.0000 0.0000 0 0
+1971 0 """4WONDERLAND2""" 1.0664 0.00 0.00 0.00 0.00 0.00 79.30 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+1972 0 """5BAYSHORE-T3""" 1.0112 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1973 2 """5BAYSHORE-T1""" 1.0300 0.00 600.00 2680.00 -1000.00 1000.00 760.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+1974 2 """5LEMOYNE--T3""" 1.0120 0.00 0.00 1900.00 -1000.00 1000.00 175.00 90.80 0.0000 0.0000 0.0000 0.0000 0 0
+1975 0 """5BENTON-HBR3""" 1.0329 0.00 0.00 0.00 0.00 0.00 330.00 16.90 0.0000 0.0000 0.0000 0.0000 0 0
+1976 2 """5D.C.COOK--3""" 1.0300 0.00 2501.67 990.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1977 2 """5DUMONT----3""" 1.0300 0.00 850.00 5270.00 -1000.00 1000.00 167.00 50.00 0.0000 0.0000 0.0000 0.0000 0 0
+1978 2 """5E.LIMA----3""" 0.9900 0.00 80.00 860.00 -1000.00 1000.00 350.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+1979 2 """5FOSTORIA--3""" 1.0000 0.00 0.00 -490.00 -1000.00 1000.00 254.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+1980 2 """5OLIVE-----3""" 1.0200 0.00 0.00 -2130.00 -1000.00 1000.00 394.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+1981 2 """5ROBISON-PK3""" 0.9800 0.00 0.00 -630.00 -1000.00 1000.00 460.00 169.80 0.0000 0.0000 0.0000 0.0000 0 0
+1982 2 """5SORENSON--3""" 1.0000 0.00 163.00 850.00 -1000.00 1000.00 371.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+1983 2 """5TWIN-BRCH-3""" 1.0200 0.00 0.00 -1660.00 -1000.00 1000.00 700.00 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+1984 2 """5LEWISTON-Y2""" 1.0520 0.00 1209.10 -190.00 -200.00 420.00 654.10 -45.40 0.0000 0.0000 0.0000 0.0000 0 0
+1985 2 """5MOSSES---Y2""" 1.0500 0.00 400.00 620.00 0.00 130.00 505.90 96.60 0.0000 0.0000 0.0000 0.0000 0 0
+1986 2 """5PACKARD--Y2""" 1.0520 0.00 0.00 -160.00 -1000.00 100.00 641.40 -0.60 0.0000 0.0000 0.0000 0.0000 0 0
+1987 0 """ADAIR-------""" 1.0193 0.00 0.00 0.00 0.00 0.00 2.18 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+1988 0 """ADAMS-----40""" 1.0140 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+1989 0 """1AINSWORTH--""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.17 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+1990 0 """ALGONAC-----""" 1.0163 0.00 0.00 0.00 0.00 0.00 7.98 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+1991 0 """ALMONT------""" 0.9849 0.00 0.00 0.00 0.00 0.00 3.28 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+1992 0 """ANDERSON----""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.59 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+1993 0 """APPLEGATE---""" 0.9866 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+1994 0 """ARGO--------""" 1.0307 0.00 0.00 0.00 0.00 0.00 23.02 3.93 0.0000 0.1200 0.0000 0.0000 0 0
+1995 0 """ARMADA------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.52 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+1996 0 """ARROWHEAD-40""" 1.0217 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+1997 0 """ATTICA------""" 0.9842 0.00 0.00 0.00 0.00 0.00 1.34 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+1998 0 """AUBURN-HTS-1""" 1.0049 0.00 0.00 0.00 0.00 0.00 6.50 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+1999 0 """AVOCA-------""" 0.9930 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2000 0 """AVON--------""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+2001 0 """BAD-AXE-40--""" 0.9987 0.00 0.00 0.00 0.00 0.00 6.13 2.12 0.0000 0.0660 0.0000 0.0000 0 0
+2002 0 """BALDWIN--EQ1""" 1.0224 0.00 0.00 0.00 0.00 0.00 8.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+2003 0 """BARNES-LAKE-""" 0.9888 0.00 0.00 0.00 0.00 0.00 2.20 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+2004 0 """1BARTLETT-CP""" 1.0119 0.00 0.00 0.00 0.00 0.00 7.40 5.87 0.0000 0.0000 0.0000 0.0000 0 0
+2005 0 """BAYPORT-----""" 0.9869 0.00 0.00 0.00 0.00 0.00 1.26 2.12 0.0000 0.0000 0.0000 0.0000 0 0
+2006 0 """BEAVER------""" 0.9956 0.00 0.00 0.00 0.00 0.00 0.17 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2007 0 """BELLEVILLE--""" 1.0212 0.00 0.00 0.00 0.00 0.00 6.05 2.66 0.0000 0.0000 0.0000 0.0000 0 0
+2008 0 """BERLIN-FUT74""" 1.0348 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2009 0 """BERNARD-----""" 0.9996 0.00 0.00 0.00 0.00 0.00 2.10 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2010 0 """BINGHAM--EQ1""" 1.0029 0.00 0.00 0.00 0.00 0.00 3.28 1.49 0.0000 0.0480 0.0000 0.0000 0 0
+2011 0 """BLOOMFIELD40""" 1.0220 0.00 0.00 0.00 0.00 0.00 79.00 39.62 0.0000 0.0900 0.0000 0.0000 0 0
+2012 0 """BOND,MADRID-""" 1.0551 0.00 0.00 0.00 0.00 0.00 2.18 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+2013 0 """BREST-------""" 1.0358 0.00 0.00 0.00 0.00 0.00 5.04 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2014 0 """BREWER------""" 1.0045 0.00 0.00 0.00 0.00 0.00 2.94 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+2015 0 """BRIGHTON----""" 1.0076 0.00 0.00 0.00 0.00 0.00 5.96 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+2016 0 """BROWN-CITY--""" 0.9725 0.00 0.00 0.00 0.00 0.00 3.28 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+2017 0 """BROWNSTOWN40""" 1.0348 0.00 0.00 0.00 0.00 0.00 36.46 24.76 0.0000 0.0000 0.0000 0.0000 0 0
+2018 0 """BRAY--------""" 0.9770 0.00 0.00 0.00 0.00 0.00 1.51 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2019 0 """BRUCE---EQ1-""" 1.0034 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+2020 0 """BUNCE-CRK-40""" 1.0333 0.00 0.00 0.00 0.00 0.00 7.73 4.25 0.0000 0.0000 0.0000 0.0000 0 0
+2021 2 """BUNCE-CRK-24""" 1.0607 0.00 84.00 480.00 0.00 480.00 37.72 22.10 0.0000 0.0000 0.0000 0.0000 0 0
+2022 0 """CALUMET-----""" 0.9844 0.00 0.00 0.00 0.00 0.00 3.11 1.91 0.0000 0.0000 0.0000 0.0000 0 0
+2023 0 """CAMDEN-2,5--""" 1.0033 0.00 0.00 0.00 0.00 0.00 9.41 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+2024 0 """CAMPUS-1----""" 1.0279 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+2025 0 """CAMPUS-2----""" 1.0216 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+2026 0 """CAPAC-------""" 0.9880 0.00 0.00 0.00 0.00 0.00 3.11 1.38 0.0000 0.0660 0.0000 0.0000 0 0
+2027 0 """CARLETON----""" 1.0054 0.00 0.00 0.00 0.00 0.00 1.76 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2028 0 """CARO-1------""" 1.0018 0.00 0.00 0.00 0.00 0.00 1.68 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2029 0 """CARO-T.E.C.-""" 0.9962 0.00 0.00 0.00 0.00 0.00 1.76 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+2030 0 """CARPENTER---""" 1.0007 0.00 0.00 0.00 0.00 0.00 8.15 3.29 0.0000 0.1140 0.0000 0.0000 0 0
+2031 0 """CARSONVILLE-""" 0.9885 0.00 0.00 0.00 0.00 0.00 0.67 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2032 0 """CARTER------""" 1.0069 0.00 0.00 0.00 0.00 0.00 15.04 7.54 0.0000 0.0000 0.0000 0.0000 0 0
+2033 0 """CASEVILLE---""" 0.9683 0.00 0.00 0.00 0.00 0.00 3.02 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+2034 0 """CASEY-------""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.18 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+2035 0 """CASS-CITY---""" 1.0011 0.00 0.00 0.00 0.00 0.00 5.04 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+2036 0 """CHERRY-HILL-""" 0.9566 0.00 0.00 0.00 0.00 0.00 0.92 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2037 0 """CHESTERFLD-1""" 1.0264 0.00 0.00 0.00 0.00 0.00 3.95 0.53 0.0000 0.0480 0.0000 0.0000 0 0
+2038 0 """CHESTERFLD-2""" 1.0088 0.00 0.00 0.00 0.00 0.00 8.48 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+2039 0 """CHESTNUT-40-""" 1.0150 0.00 0.00 0.00 0.00 0.00 75.20 29.50 0.0000 0.3600 0.0000 0.0000 0 0
+2040 0 """CHILSON-----""" 1.0175 0.00 0.00 0.00 0.00 0.00 1.51 0.85 0.0000 0.0660 0.0000 0.0000 0 0
+2041 0 """CLARKSTON-2-""" 1.0013 0.00 0.00 0.00 0.00 0.00 4.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+2042 0 """CLIFFORD----""" 0.9881 0.00 0.00 0.00 0.00 0.00 1.34 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+2043 0 """COATS-------""" 1.0093 0.00 0.00 0.00 0.00 0.00 3.36 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2044 0 """CODY-40-----""" 1.0456 0.00 0.00 0.00 0.00 0.00 19.99 6.27 0.0000 0.1800 0.0000 0.0000 0 0
+2045 0 """COLFAX---EQ1""" 1.0885 0.00 14.00 40.00 0.00 0.00 4.87 2.55 0.0000 0.0480 0.0000 0.0000 0 0
+2046 0 """COLLIER----1""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+2047 0 """CLOTH-PR.-1-""" 1.0059 0.00 0.00 0.00 0.00 0.00 3.00 -0.37 0.0000 0.0000 0.0000 0.0000 0 0
+2048 0 """COLUMBIAVILE""" 0.9871 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2049 0 """COMMERCE-LK-""" 0.9872 0.00 0.00 0.00 0.00 0.00 6.05 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+2050 0 """CORTLAND-24-""" 1.0112 0.00 0.00 0.00 0.00 0.00 204.10 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+2051 0 """CROSWELL-EQ1""" 0.9883 0.00 0.00 0.00 0.00 0.00 5.96 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+2052 0 """CROWN-1-----""" 1.0243 0.00 0.00 0.00 0.00 0.00 10.16 0.32 0.0000 0.0900 0.0000 0.0000 0 0
+2053 0 """CROWN-2-----""" 0.9891 0.00 0.00 0.00 0.00 0.00 4.54 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+2054 0 """CULVER------""" 0.9954 0.00 0.00 0.00 0.00 0.00 8.57 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+2055 0 """CUSTER-24---""" 1.0216 0.00 14.00 40.00 0.00 0.00 61.40 33.15 0.0000 0.0000 0.0000 0.0000 0 0
+2056 0 """DADE-1------""" 1.0165 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+2057 0 """DADE-2------""" 1.0158 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+2058 0 """DARWIN-1----""" 1.0440 0.00 0.00 0.00 0.00 0.00 4.87 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+2059 0 """DARWIN-2----""" 1.0408 0.00 0.00 0.00 0.00 0.00 4.79 1.27 0.0000 0.0480 0.0000 0.0000 0 0
+2060 0 """DAVIS---EQ1-""" 0.9767 0.00 0.00 0.00 0.00 0.00 20.30 10.25 0.0000 0.0900 0.0000 0.0000 0 0
+2061 0 """DAYTON-40---""" 1.0256 0.00 5.00 10.00 0.00 0.00 5.71 2.97 0.0000 0.0660 0.0000 0.0000 0 0
+2062 0 """DECKR-+-ASPN""" 0.9878 0.00 0.00 0.00 0.00 0.00 2.52 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2063 0 """DEWEY-2-----""" 0.9865 0.00 0.00 0.00 0.00 0.00 11.34 3.82 0.0000 0.0000 0.0000 0.0000 0 0
+2064 0 """DEXTER---EQ1""" 1.0348 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0480 0.0000 0.0000 0 0
+2065 0 """DILLARD-1---""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2066 0 """DOVER-1-----""" 1.0030 0.00 0.00 0.00 0.00 0.00 3.78 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+2067 0 """DOVER-2-----""" 0.9997 0.00 0.00 0.00 0.00 0.00 3.19 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+2068 0 """DREXEL-2----""" 0.9883 0.00 0.00 0.00 0.00 0.00 9.24 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2069 0 """DRYDEN------""" 0.9797 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+2070 0 """ECKLES-2----""" 0.9704 0.00 0.00 0.00 0.00 0.00 4.62 -0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2071 0 """EDGEWATER---""" 0.9989 0.00 0.00 0.00 0.00 0.00 1.30 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+2072 0 """ELKTON------""" 0.9804 0.00 0.00 0.00 0.00 0.00 3.36 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2073 0 """ELM-40------""" 1.0242 0.00 0.00 0.00 0.00 0.00 107.77 79.00 0.0000 0.2850 0.0000 0.0000 0 0
+2074 0 """EMERICK-1---""" 1.0099 0.00 0.00 0.00 0.00 0.00 8.82 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+2075 0 """EMMETT------""" 0.9925 0.00 0.00 0.00 0.00 0.00 1.01 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2076 0 """ENGLISH-----""" 1.0024 0.00 0.00 0.00 0.00 0.00 1.68 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2077 0 """ERIN40------""" 1.0115 0.00 0.00 0.00 0.00 0.00 103.40 41.50 0.0000 0.1800 0.0000 0.0000 0 0
+2078 0 """EVERGREEN-40""" 1.0364 0.00 0.00 0.00 0.00 0.00 213.20 82.90 0.0000 0.5100 0.0000 0.0000 0 0
+2079 0 """FAIRGROVE---""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.02 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2080 0 """FALCON-1----""" 1.0232 0.00 0.00 0.00 0.00 0.00 9.32 6.12 0.0000 0.0000 0.0000 0.0000 0 0
+2081 0 """FALCON-2----""" 1.0207 0.00 0.00 0.00 0.00 0.00 7.56 4.99 0.0000 0.0000 0.0000 0.0000 0 0
+2082 0 """FISHER------""" 1.0370 0.00 0.00 0.00 0.00 0.00 5.96 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+2083 0 """FLAT-ROCK-1-""" 1.0195 0.00 0.00 0.00 0.00 0.00 1.68 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+2084 0 """FLEMING-----""" 1.0067 0.00 0.00 0.00 0.00 0.00 4.54 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+2085 0 """FORESTER----""" 0.9770 0.00 0.00 0.00 0.00 0.00 0.76 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2086 0 """FRANK2---EQ1""" 0.9722 0.00 0.00 0.00 0.00 0.00 6.10 1.50 0.0000 0.0000 0.0000 0.0000 0 0
+2087 0 """FREEDOM-----""" 0.9954 0.00 0.00 0.00 0.00 0.00 1.10 0.12 0.0000 0.0000 0.0000 0.0000 0 0
+2088 0 """FRENCHLND-2-""" 1.0263 0.00 0.00 0.00 0.00 0.00 5.70 4.37 0.0000 0.1200 0.0000 0.0000 0 0
+2089 0 """FRISBIE-24--""" 1.0881 0.00 0.00 0.00 0.00 0.00 222.68 75.01 0.0000 0.0000 0.0000 0.0000 0 0
+2090 0 """FULLER-1----""" 1.0203 0.00 0.00 0.00 0.00 0.00 2.52 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+2091 0 """FULLER-2----""" 1.0257 0.00 0.00 0.00 0.00 0.00 2.44 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+2092 0 """GAGETOWN----""" 1.0203 0.00 0.00 0.00 0.00 0.00 1.18 0.42 0.0000 0.0480 0.0000 0.0000 0 0
+2093 0 """1GARNER-CP--""" 1.0195 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2094 0 """GENOA-40----""" 1.0191 0.00 0.00 0.00 0.00 0.00 12.94 6.37 0.0000 0.1800 0.0000 0.0000 0 0
+2095 0 """GLOBE-------""" 0.9892 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2096 0 """GOODISON----""" 0.9861 0.00 0.00 0.00 0.00 0.00 7.56 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+2097 0 """GRAF--------""" 0.9961 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+2098 0 """HAMBURG-----""" 1.0440 0.00 0.00 0.00 0.00 0.00 2.44 0.64 0.0000 0.0660 0.0000 0.0000 0 0
+2099 0 """HANCOCK-40--""" 1.0036 0.00 100.81 190.00 0.00 0.00 29.57 15.62 0.0000 0.0000 0.0000 0.0000 0 0
+2100 0 """HANNAN-1---1""" 1.0048 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+2101 0 """HARTLAND----""" 0.9948 0.00 0.00 0.00 0.00 0.00 2.18 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2102 0 """HEMLOCK-1---""" 1.0293 0.00 0.00 0.00 0.00 0.00 6.00 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+2103 0 """HEMLOCK-2---""" 1.0364 0.00 0.00 0.00 0.00 0.00 6.97 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+2104 2 """HINES-40----""" 0.9900 0.00 0.00 120.00 0.00 18.00 115.58 95.12 0.0000 0.3600 0.0000 0.0000 0 0
+2105 0 """HOBART-TAP--""" 1.0363 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2106 0 """HOBART------""" 1.0414 0.00 0.00 0.00 0.00 0.00 4.03 1.59 0.0000 0.0900 0.0000 0.0000 0 0
+2107 0 """HOWELL-2----""" 1.0160 0.00 0.00 0.00 0.00 0.00 3.95 1.81 0.0000 0.0660 0.0000 0.0000 0 0
+2108 0 """HUNTERS-CR40""" 1.0031 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2109 0 """IDA---------""" 1.0107 0.00 0.00 0.00 0.00 0.00 1.90 -0.12 0.0000 0.0000 0.0000 0.0000 0 0
+2110 0 """IMLAY-CITY--""" 0.9775 0.00 0.00 0.00 0.00 0.00 4.70 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+2111 0 """INLAND---EQ1""" 1.0137 0.00 0.00 0.00 0.00 0.00 5.80 3.51 0.0000 0.0000 0.0000 0.0000 0 0
+2112 0 """IRA---------""" 1.0238 0.00 0.00 0.00 0.00 0.00 2.10 0.85 0.0000 0.0480 0.0000 0.0000 0 0
+2113 0 """IRONTON-24--""" 1.0193 0.00 0.00 0.00 0.00 0.00 177.80 67.00 0.0000 0.0000 0.0000 0.0000 0 0
+2114 0 """IRVING------""" 0.9945 0.00 0.00 0.00 0.00 0.00 5.88 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2115 0 """JACKSON-RD.2""" 1.0346 0.00 0.00 0.00 0.00 0.00 1.01 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2116 0 """JASPER------""" 1.0041 0.00 0.00 0.00 0.00 0.00 0.34 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2117 0 """JORDAN-1----""" 0.9922 0.00 0.00 0.00 0.00 0.00 1.85 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+2118 0 """JOPLIN------""" 0.9903 0.00 0.00 0.00 0.00 0.00 0.76 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2119 0 """KEEGO-2-----""" 0.9789 0.00 0.00 0.00 0.00 0.00 1.10 0.37 0.0000 0.0000 0.0000 0.0000 0 0
+2120 0 """KELLOGG-----""" 0.9988 0.00 0.00 0.00 0.00 0.00 3.78 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2121 0 """1KENNETT-CP-""" 1.0198 0.00 0.00 0.00 0.00 0.00 17.90 8.37 0.0000 0.0000 0.0000 0.0000 0 0
+2122 0 """KIMBALL-----""" 1.0128 0.00 0.00 0.00 0.00 0.00 3.36 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+2123 0 """KINDE-------""" 0.9840 0.00 0.00 0.00 0.00 0.00 1.01 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2124 0 """KING-SEELEY-""" 1.0463 0.00 0.00 0.00 0.00 0.00 2.69 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2125 0 """LAKEPORT----""" 1.0008 0.00 0.00 0.00 0.00 0.00 1.85 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2126 0 """LAKEVILLE---""" 0.9976 0.00 0.00 0.00 0.00 0.00 1.09 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+2127 0 """LAPEER------""" 0.9933 0.00 0.00 0.00 0.00 0.00 3.78 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+2128 0 """LARK-40-----""" 1.0476 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2129 0 """LEE-40------""" 1.0183 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+2130 0 """LIMA--------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.18 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2131 0 """LINCOLN-24--""" 0.9866 0.00 0.00 0.00 0.00 0.00 148.43 124.57 0.0000 0.5700 0.0000 0.0000 0 0
+2132 0 """LUZON-40----""" 1.0040 0.00 0.00 0.00 0.00 0.00 21.67 12.01 0.0000 0.0900 0.0000 0.0000 0 0
+2133 0 """MACOMB-40---""" 1.0194 0.00 0.00 0.00 0.00 0.00 132.00 96.50 0.0000 0.3600 0.0000 0.0000 0 0
+2134 0 """MARINE-CITY-""" 1.0387 0.00 0.00 0.00 0.00 0.00 5.21 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+2135 0 """MARLETTE----""" 0.9794 0.00 0.00 0.00 0.00 0.00 5.29 1.70 0.0000 0.0480 0.0000 0.0000 0 0
+2136 0 """MAYBEE------""" 1.0091 0.00 0.00 0.00 0.00 0.00 1.26 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+2137 0 """MAYVILLE----""" 1.0032 0.00 0.00 0.00 0.00 0.00 2.02 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2138 0 """MEADOW---EQ1""" 0.9943 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+2139 0 """MEDINA-40---""" 1.0197 0.00 0.00 0.00 0.00 0.00 45.80 21.50 0.0000 0.1800 0.0000 0.0000 0 0
+2140 0 """MELVIN------""" 0.9800 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2141 0 """METAMORA----""" 0.9954 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+2142 0 """MILFORD-----""" 1.0033 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+2143 0 """MILLINGTON--""" 0.9808 0.00 0.00 0.00 0.00 0.00 2.35 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2144 0 """MOHAWK-2----""" 0.9967 0.00 0.00 0.00 0.00 0.00 2.10 0.25 0.0000 0.0000 0.0000 0.0000 0 0
+2145 0 """MONARCH-----""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.30 1.50 0.0000 0.0960 0.0000 0.0000 0 0
+2146 0 """1MONTCALM-CP""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2147 0 """MOTT-2------""" 1.0159 0.00 0.00 0.00 0.00 0.00 7.39 3.82 0.0000 0.0900 0.0000 0.0000 0 0
+2148 0 """NATIONAL-1--""" 0.9928 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+2149 0 """NATIONAL-2--""" 0.9997 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+2150 0 """NAVARRE-24--""" 1.0384 0.00 0.00 0.00 0.00 0.00 190.43 107.21 0.0000 0.8700 0.0000 0.0000 0 0
+2151 0 """NEFF--------""" 1.0012 0.00 0.00 0.00 0.00 0.00 5.71 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+2152 0 """NELSON-MILS1""" 1.0263 0.00 0.00 0.00 0.00 0.00 2.94 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2153 0 """NELSON-MILS2""" 1.0270 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+2154 0 """NEW-BALTMR-1""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.10 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2155 0 """NEW-BALTMR23""" 1.0237 0.00 0.00 0.00 0.00 0.00 4.28 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+2156 0 """NEW-BOSTON--""" 1.0111 0.00 0.00 0.00 0.00 0.00 1.93 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2157 0 """NEWBURGH-40-""" 0.9673 0.00 0.00 0.00 0.00 0.00 147.42 102.95 0.0000 0.3000 0.0000 0.0000 0 0
+2158 0 """NEW-HAVEN-1-""" 1.0179 0.00 0.00 0.00 0.00 0.00 3.44 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+2159 0 """NEW-HAVEN-2-""" 1.0220 0.00 0.00 0.00 0.00 0.00 2.69 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+2160 0 """NIXON-2-----""" 0.9768 0.00 0.00 0.00 0.00 0.00 11.09 5.52 0.0000 0.0000 0.0000 0.0000 0 0
+2161 0 """NOBLE-------""" 0.9863 0.00 0.00 0.00 0.00 0.00 16.97 9.14 0.0000 0.0000 0.0000 0.0000 0 0
+2162 0 """NORTH-BRANCH""" 0.9717 0.00 0.00 0.00 0.00 0.00 4.45 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+2163 2 """NORTHEAST-24""" 1.0104 0.00 80.00 0.00 0.00 48.00 230.24 141.20 0.0000 0.4800 0.0000 0.0000 0 0
+2164 0 """NORTH-SRVCTR""" 1.0050 0.00 0.00 0.00 0.00 0.00 5.80 4.36 0.0000 0.0000 0.0000 0.0000 0 0
+2165 2 """NORTHWEST-40""" 1.0044 0.00 0.00 0.00 0.00 18.00 209.70 76.40 0.0000 0.5480 0.0000 0.0000 0 0
+2166 0 """NORWAY-1----""" 0.9516 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+2167 0 """NORWAY-2-EQ1""" 0.9477 0.00 0.00 0.00 0.00 0.00 5.96 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+2168 0 """OAK-BEACH---""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.84 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2169 0 """OLIVER------""" 0.9870 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2170 0 """OLYMPA-FUT75""" 0.9825 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2171 0 """OMAHA-1--EQ1""" 0.9473 0.00 0.00 0.00 0.00 0.00 10.08 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+2172 0 """OMAHA-2--EQ1""" 0.9465 0.00 0.00 0.00 0.00 0.00 9.58 3.61 0.0000 0.0000 0.0000 0.0000 0 0
+2173 0 """OPAL--------""" 1.0050 0.00 0.00 0.00 0.00 0.00 0.92 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+2174 0 """OREGON-1----""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.38 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+2175 0 """ORION-------""" 0.9925 0.00 0.00 0.00 0.00 0.00 5.46 2.02 0.0000 0.0660 0.0000 0.0000 0 0
+2176 0 """OTTER-LAKE--""" 0.9836 0.00 0.00 0.00 0.00 0.00 1.01 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+2177 0 """OWENDALE----""" 1.0049 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2178 0 """OXFORD------""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.89 3.72 0.0000 0.1200 0.0000 0.0000 0 0
+2179 0 """1PADDOCK-CP-""" 1.0220 0.00 0.00 0.00 0.00 0.00 4.30 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+2180 0 """PAGE--------""" 0.9930 0.00 0.00 0.00 0.00 0.00 9.58 5.63 0.0000 0.0660 0.0000 0.0000 0 0
+2181 0 """PALMER-1----""" 0.9643 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+2182 0 """PARKER-ROAD-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.64 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+2183 0 """PAUL-1------""" 1.0114 0.00 0.00 0.00 0.00 0.00 8.15 4.89 0.0000 0.0480 0.0000 0.0000 0 0
+2184 0 """PAUL-2,3----""" 1.0157 0.00 0.00 0.00 0.00 0.00 4.70 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+2185 0 """PHOENIX-40--""" 1.0379 0.00 0.00 0.00 0.00 0.00 36.71 20.82 0.0000 0.0000 0.0000 0.0000 0 0
+2186 0 """PIEDMONT----""" 1.0235 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2187 0 """PIGEON------""" 0.9818 0.00 0.00 0.00 0.00 0.00 3.78 4.78 0.0000 0.0480 0.0000 0.0000 0 0
+2188 0 """PINCKNEY----""" 1.0442 0.00 0.00 0.00 0.00 0.00 3.86 1.70 0.0000 0.0900 0.0000 0.0000 0 0
+2189 0 """PIONEER---40""" 1.0270 0.00 0.00 0.00 0.00 0.00 19.10 10.12 0.0000 0.0000 0.0000 0.0000 0 0
+2190 0 """PIPER---EQ1-""" 1.0008 0.00 0.00 0.00 0.00 0.00 5.12 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+2191 0 """PITSFLD--EQ1""" 1.0164 0.00 0.00 0.00 0.00 0.00 9.66 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+2192 0 """PLACID------""" 1.0026 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2193 0 """PLYMOUTH----""" 0.9523 0.00 0.00 0.00 0.00 0.00 12.10 7.44 0.0000 0.1560 0.0000 0.0000 0 0
+2194 0 """PORT-AUSTIN-""" 0.9754 0.00 0.00 0.00 0.00 0.00 3.02 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2195 0 """PORT-HOPE---""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2196 0 """PORT-SANILAC""" 0.9808 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2197 0 """PRICE-1-----""" 1.0353 0.00 0.00 0.00 0.00 0.00 4.37 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+2198 0 """PROCTOR-----""" 0.9955 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2199 0 """PUTNAM------""" 1.0098 0.00 14.00 40.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2200 0 """QUEEN-------""" 1.0065 0.00 0.00 0.00 0.00 0.00 3.53 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+2201 0 """QUINCY------""" 1.0030 0.00 0.00 0.00 0.00 0.00 1.34 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2202 0 """RANDOLPH----""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2203 0 """RAVINE---EQ1""" 0.9764 0.00 0.00 0.00 0.00 0.00 8.90 3.62 0.0000 0.0000 0.0000 0.0000 0 0
+2204 0 """RED-RUN-40--""" 1.0203 0.00 0.00 0.00 0.00 0.00 140.87 71.29 0.0000 0.5400 0.0000 0.0000 0 0
+2205 0 """REESE---EQ2-""" 0.9799 0.00 0.00 0.00 0.00 0.00 5.96 2.23 0.0000 0.0480 0.0000 0.0000 0 0
+2206 0 """REMER-40----""" 1.0461 0.00 0.00 0.00 0.00 0.00 1.34 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2207 0 """RENO--------""" 0.9937 0.00 0.00 0.00 0.00 0.00 4.80 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+2208 0 """RICHMOND----""" 1.0130 0.00 0.00 0.00 0.00 0.00 5.63 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+2209 0 """RIFLE-------""" 0.9886 0.00 0.00 0.00 0.00 0.00 6.13 2.97 0.0000 0.0480 0.0000 0.0000 0 0
+2210 0 """RIVER-RAISIN""" 1.0072 0.00 0.00 0.00 0.00 0.00 0.92 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2211 2 """RIVERVIEW-40""" 1.0021 0.00 25.00 -100.00 -10.00 20.00 145.57 79.69 0.0000 0.3600 0.0000 0.0000 0 0
+2212 0 """ROCHESTER-1-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.55 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+2213 0 """ROCKWOOD----""" 1.0345 0.00 0.00 0.00 0.00 0.00 5.80 1.59 0.0000 0.0340 0.0000 0.0000 0 0
+2214 0 """ROMEO---EQ1-""" 1.0133 0.00 0.00 0.00 0.00 0.00 6.13 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+2215 0 """ROMULUS---40""" 1.0151 0.00 0.00 0.00 0.00 0.00 20.66 13.07 0.0000 0.1680 0.0000 0.0000 0 0
+2216 0 """RUSH-TAP----""" 0.9835 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2217 0 """RUSH-40-----""" 1.0014 0.00 0.00 0.00 0.00 0.00 3.70 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+2218 0 """SALEM-------""" 1.0417 0.00 0.00 0.00 0.00 0.00 1.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2219 0 """SALINE------""" 1.0017 0.00 0.00 0.00 0.00 0.00 9.10 4.87 0.0000 0.0960 0.0000 0.0000 0 0
+2220 0 """SANDUSKY-40-""" 1.0042 0.00 0.00 0.00 0.00 0.00 5.29 1.91 0.0000 0.0660 0.0000 0.0000 0 0
+2221 0 """SAXON-------""" 0.9916 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2222 0 """SEBEWAING---""" 1.0083 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+2223 0 """SELFRIDGE-1-""" 1.0074 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+2224 0 """SELKIRK-----""" 1.0092 0.00 0.00 0.00 0.00 0.00 6.05 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+2225 0 """SHAW--------""" 0.9720 0.00 0.00 0.00 0.00 0.00 1.60 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2226 0 """SHELDON-1---""" 0.9578 0.00 0.00 0.00 0.00 0.00 5.29 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+2227 0 """SHERWOOD----""" 1.0148 0.00 0.00 0.00 0.00 0.00 1.93 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2228 0 """SNOVER------""" 0.9929 0.00 0.00 0.00 0.00 0.00 1.60 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2229 0 """SOUTHFLD-40-""" 1.0066 0.00 0.00 0.00 0.00 0.00 99.54 81.89 0.0000 0.0900 0.0000 0.0000 0 0
+2230 0 """STATE-1-----""" 1.0247 0.00 0.00 0.00 0.00 0.00 5.60 3.25 0.0000 0.0000 0.0000 0.0000 0 0
+2231 0 """SPOKANE-40--""" 1.0014 0.00 0.00 0.00 0.00 0.00 36.54 16.57 0.0000 0.0000 0.0000 0.0000 0 0
+2232 0 """ST-CLAIR-1--""" 1.0259 0.00 0.00 0.00 0.00 0.00 2.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2233 0 """ST-CLAIR-2--""" 1.0352 0.00 0.00 0.00 0.00 0.00 2.69 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2234 0 """STEPHENS-24-""" 1.0074 0.00 0.00 0.00 0.00 0.00 164.30 105.69 0.0000 0.5700 0.0000 0.0000 0 0
+2235 0 """STERLING-40-""" 1.0210 0.00 0.00 0.00 0.00 0.00 101.14 45.79 0.0000 0.5400 0.0000 0.0000 0 0
+2236 0 """STOCKBRIDGE-""" 1.0701 0.00 0.00 0.00 0.00 0.00 1.09 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2237 0 """1STOCKWELLCP""" 1.0172 0.00 0.00 0.00 0.00 0.00 10.90 6.75 0.0000 0.0000 0.0000 0.0000 0 0
+2238 0 """SUNSET-40---""" 1.0041 0.00 0.00 0.00 0.00 0.00 78.79 59.01 0.0000 0.5160 0.0000 0.0000 0 0
+2239 2 """SUPERIOR-40-""" 1.0189 0.00 0.00 0.00 0.00 118.00 61.49 48.74 0.0000 0.1800 0.0000 0.0000 0 0
+2240 0 """TIENKEN-2---""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2241 0 """TALBOT---EQ1""" 0.9854 0.00 0.00 0.00 0.00 0.00 2.35 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+2242 0 """1TAYLOR-1-13""" 1.0121 0.00 0.00 0.00 0.00 0.00 10.67 6.27 0.0000 0.0000 0.0000 0.0000 0 0
+2243 0 """1TAYLOR-2-13""" 1.0154 0.00 0.00 0.00 0.00 0.00 8.65 6.48 0.0000 0.0000 0.0000 0.0000 0 0
+2244 0 """TEGGERDINE--""" 0.9815 0.00 0.00 0.00 0.00 0.00 11.34 4.67 0.0000 0.0000 0.0000 0.0000 0 0
+2245 0 """TEMPLE------""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.59 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2246 0 """TEXAS-------""" 1.0281 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2247 0 """TODD--------""" 1.0426 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2248 0 """TRINITY-2---""" 1.0107 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+2249 0 """TROY-40-----""" 0.9963 0.00 0.00 0.00 0.00 0.00 178.92 77.64 0.0000 0.5400 0.0000 0.0000 0 0
+2250 0 """TUSCOLA-40--""" 1.0020 0.00 0.00 0.00 0.00 0.00 6.22 2.55 0.0000 0.0660 0.0000 0.0000 0 0
+2251 0 """UNION-LAKE--""" 0.9771 0.00 0.00 0.00 0.00 0.00 11.84 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+2252 0 """UNIONVILLE--""" 1.0120 0.00 0.00 0.00 0.00 0.00 1.26 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2253 0 """UNIVR-BUS1T6""" 1.0250 0.00 0.00 0.00 0.00 0.00 11.17 8.71 0.0000 0.0000 0.0000 0.0000 0 0
+2254 0 """URBAN-TEC---""" 0.9887 0.00 0.00 0.00 0.00 0.00 5.12 3.19 0.0000 0.0000 0.0000 0.0000 0 0
+2255 0 """UTAH--------""" 1.0415 0.00 0.00 0.00 0.00 0.00 0.76 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+2256 0 """VANBUREN-EQ1""" 1.0128 0.00 0.00 0.00 0.00 0.00 1.51 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+2257 0 """VASSAR-BIRCH""" 0.9744 0.00 0.00 0.00 0.00 0.00 10.00 5.74 0.0000 0.0660 0.0000 0.0000 0 0
+2258 0 """VICTOR-40---""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2259 0 """VALLEY------""" 1.0268 0.00 6.00 20.00 0.00 0.00 0.90 0.62 0.0000 0.0000 0.0000 0.0000 0 0
+2260 0 """WABASH-40---""" 1.0066 0.00 0.00 0.00 0.00 0.00 46.70 26.25 0.0000 0.0000 0.0000 0.0000 0 0
+2261 0 """WALLED-LAKE-""" 0.9972 0.00 0.00 0.00 0.00 0.00 6.00 2.62 0.0000 0.0000 0.0000 0.0000 0 0
+2262 0 """WALNUT-1,2--""" 0.9814 0.00 0.00 0.00 0.00 0.00 9.60 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+2263 0 """WALTON40-SUB""" 1.0330 0.00 0.00 0.00 0.00 0.00 44.35 20.08 0.0000 0.1800 0.0000 0.0000 0 0
+2264 0 """WARDLOW-----""" 0.9956 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+2265 2 """WARREN-24---""" 1.0171 0.00 0.00 540.00 0.00 54.00 268.46 194.97 0.0000 0.9000 0.0000 0.0000 0 0
+2266 0 """WASHNGTN-EQ1""" 1.0002 0.00 0.00 0.00 0.00 0.00 8.57 4.36 0.0000 0.0660 0.0000 0.0000 0 0
+2267 0 """WATERFORD---""" 0.9903 0.00 0.00 0.00 0.00 0.00 17.81 5.52 0.0000 0.1800 0.0000 0.0000 0 0
+2268 0 """WEBERVLE-EQ1""" 1.0885 0.00 0.00 0.00 0.00 0.00 8.23 1.91 0.0000 0.1140 0.0000 0.0000 0 0
+2269 0 """WHITE-LAKE--""" 0.9941 0.00 0.00 0.00 0.00 0.00 4.70 1.59 0.0000 0.0000 0.0000 0.0000 0 0
+2270 0 """WHITMORE-LK-""" 1.0357 0.00 0.00 0.00 0.00 0.00 7.81 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+2271 0 """WHITNY-FUT73""" 1.0033 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2272 0 """WILEY-------""" 1.0197 0.00 0.00 0.00 0.00 0.00 1.26 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+2273 0 """WILMOTK-NGFD""" 0.9922 0.00 0.00 0.00 0.00 0.00 0.84 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2274 0 """WILSON------""" 1.0128 0.00 0.00 0.00 0.00 0.00 2.60 -0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2275 0 """1WILSON-CP--""" 1.0157 0.00 0.00 0.00 0.00 0.00 8.60 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+2276 0 """WOLFHILL----""" 0.9897 0.00 0.00 0.00 0.00 0.00 4.96 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+2277 0 """WOLVERINE-2-""" 1.0200 0.00 0.00 0.00 0.00 0.00 5.12 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+2278 0 """WORTH-------""" 1.0069 0.00 0.00 0.00 0.00 0.00 2.18 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2279 0 """YALE-TAP----""" 0.9902 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2280 0 """YALE--------""" 0.9870 0.00 0.00 0.00 0.00 0.00 3.11 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+2281 0 """YATES-------""" 0.9871 0.00 0.00 0.00 0.00 0.00 1.34 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2282 0 """YORK--------""" 0.9901 0.00 0.00 0.00 0.00 0.00 2.44 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+2283 0 """YOST-40-----""" 1.0354 0.00 0.00 0.00 0.00 0.00 48.55 26.29 0.0000 0.0480 0.0000 0.0000 0 0
+2284 0 """2ADAMS-----1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2285 0 """2ALFRED----1""" 1.0468 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+2286 0 """ALFRED-13---""" 1.0489 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+2287 0 """2AMHERST1.13""" 1.0230 0.00 0.00 0.00 0.00 0.00 7.56 4.72 0.0000 0.0000 0.0000 0.0000 0 0
+2288 0 """2AMHERST2.13""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2289 0 """2ARROWHEAD-1""" 1.0315 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2290 0 """2BAD-AXE---1""" 1.0460 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2291 0 """2BLOOMFLD--1""" 1.0065 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2292 0 """2BROWNTN---3""" 1.0081 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2293 0 """2BROWNTN---2""" 1.0314 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2294 2 """2BROWNTN-N-1""" 1.0263 0.00 0.00 -910.00 -91.00 338.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2295 0 """2BROWNTN-S-1""" 1.0117 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2296 0 """2BUNCE-CK--1""" 1.1567 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2297 0 """2B3N-DECO230""" 1.0877 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2298 0 """2-BURNS-1--1""" 1.0578 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2299 0 """2-BURNS-2--1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2300 0 """2CANIFF----3""" 1.0261 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2301 0 """2CANIFF----1""" 1.0433 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2302 0 """2CATALINA-CP""" 1.0064 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2303 0 """2CATO------1""" 1.0403 0.00 0.00 0.00 0.00 0.00 57.14 27.68 0.0000 0.0000 0.0000 0.0000 0 0
+2304 0 """2CHESTNUT--1""" 1.0164 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2305 0 """2CODY------1""" 0.9887 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2306 2 """2CONNER-G.24""" 1.0404 0.00 285.00 1770.00 0.00 1770.00 436.28 182.01 0.0000 0.0000 0.0000 0.0000 0 0
+2307 0 """2COOPER----1""" 1.0059 0.00 0.00 0.00 0.00 0.00 1.34 2.31 0.0000 0.0000 0.0000 0.0000 0 0
+2308 0 """2CORTLAND--1""" 1.0392 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2309 0 """2COVENTRY--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2310 0 """2COVENTRY--1""" 0.9810 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2311 0 """2CRESTWOOD-1""" 1.0120 0.00 0.00 0.00 0.00 0.00 3.56 1.78 0.0000 0.0000 0.0000 0.0000 0 0
+2312 0 """2CUSTER----1""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2313 0 """2C-3DECO-138""" 0.9752 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2314 0 """2DAYTON----1""" 0.9863 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2315 2 """2DELRAY-16-1""" 1.0200 0.00 72.00 350.00 0.00 54.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2316 2 """2DELRAY-G.24""" 1.0483 0.00 236.00 2320.00 0.00 2320.00 290.94 159.76 0.0000 0.0000 0.0000 0.0000 0 0
+2317 0 """2ELM-------1""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2318 0 """2E.FERMI---1""" 0.9983 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2319 0 """2ERIN------1""" 1.0331 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2320 0 """2E-N-S-TAP11""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2321 0 """2E-N-S-TAP21""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2322 2 """2ESSEX-----1""" 1.0543 0.00 274.00 0.00 0.00 140.00 0.00 0.00 0.0000 1.0800 0.0000 0.0000 0 0
+2323 0 """2EVERGREEN-1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2324 0 """2FLEETWD-1-1""" 1.0428 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2325 0 """2FLEETWD-2-1""" 1.0456 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2326 0 """2FLEETWD--13""" 1.0161 0.00 0.00 0.00 0.00 0.00 12.02 5.78 0.0000 0.0000 0.0000 0.0000 0 0
+2327 0 """2FOMOCO-C1-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+2328 0 """2FOMOCO-C2-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+2329 0 """2FRISBIE---1""" 1.0414 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2330 0 """2GENOA-----1""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2331 0 """2HANCOCK---1""" 1.0042 0.00 82.00 210.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2332 2 """2HARB.BEA.-1""" 1.0597 0.00 114.00 -300.00 -30.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2333 0 """2HINES-----1""" 0.9897 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2334 0 """2HUNTER-CK.1""" 1.0432 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2335 0 """2IRONTON---1""" 1.0310 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2336 0 """2IRN-NA-RV-1""" 1.0272 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2337 0 """2IMLAY-1PUP1""" 1.0685 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2338 0 """2JEFFERSON-1""" 1.0257 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2339 0 """2KTT-DECO138""" 1.0748 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2340 0 """2LK.HURON1P1""" 1.1530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2341 0 """2LK.HURON2P1""" 1.1335 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2342 0 """2LAPEER----1""" 1.0390 0.00 0.00 0.00 0.00 0.00 7.83 2.85 0.0000 0.0000 0.0000 0.0000 0 0
+2343 0 """2LARK------1""" 0.9720 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2344 0 """2LEE-------1""" 1.1215 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2345 0 """2LINCOLN---1""" 1.0100 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2346 0 """2LN-NE-NW--1""" 1.0129 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2347 0 """2LOGAN-1---1""" 1.0326 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2348 0 """2LOGAN-1-.13""" 1.0161 0.00 0.00 0.00 0.00 0.00 8.54 2.49 0.0000 0.0000 0.0000 0.0000 0 0
+2349 0 """2LOGAN-2---1""" 1.0362 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2350 0 """2LOGAN-2-.13""" 1.0153 0.00 0.00 0.00 0.00 0.00 8.46 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+2351 0 """2LONG-LK-1-1""" 1.0035 0.00 0.00 0.00 0.00 0.00 7.12 1.69 0.0000 0.0000 0.0000 0.0000 0 0
+2352 0 """2LONG-LK-2-1""" 1.0046 0.00 0.00 0.00 0.00 0.00 6.68 1.25 0.0000 0.0000 0.0000 0.0000 0 0
+2353 0 """2LUZON-----1""" 0.9694 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2354 0 """2LUZON-W.40D""" 0.9908 0.00 0.00 0.00 0.00 0.00 16.02 7.83 0.0000 0.0000 0.0000 0.0000 0 0
+2355 0 """2MACOMB----1""" 1.0576 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2356 2 """2MARYSVILLE1""" 1.1521 0.00 84.00 0.00 0.00 60.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2357 0 """2MAXWELL-1-1""" 1.0236 0.00 0.00 0.00 0.00 0.00 18.16 11.21 0.0000 0.0000 0.0000 0.0000 0 0
+2358 0 """2MAXWELL-2-1""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2359 0 """2MCLOUTH-1-1""" 1.0222 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+2360 0 """2MCLOUTH-2-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+2361 2 """2MCLOUTH-.24""" 1.0350 0.00 0.00 670.00 -30.00 100.00 108.22 48.42 0.0000 0.0000 0.0000 0.0000 0 0
+2362 0 """2MEDINA----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2363 0 """2MIDTOWN---1""" 1.0409 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2364 2 """2MONRO-1,2-3""" 1.0100 0.00 1290.95 -880.00 -182.00 803.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2365 2 """2MONRO-3,4-3""" 1.0105 0.00 470.00 -910.00 -91.00 528.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2366 0 """2MTCALM-CP-1""" 1.0065 0.00 0.00 0.00 0.00 0.00 78.59 31.06 0.0000 0.0000 0.0000 0.0000 0 0
+2367 0 """2NAVARRE---2""" 1.0244 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2368 0 """2NAVARRE---1""" 1.0256 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2369 0 """2NEWBURGH--1""" 0.9920 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2370 0 """2NOBLE-----1""" 0.9773 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2371 0 """2NORTHEAST-1""" 1.0287 0.00 54.00 140.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2372 0 """2N.E.STUB--1""" 1.0437 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2373 2 """2N.E.FLIK.24""" 1.0200 0.00 0.00 40.00 0.00 30.00 43.16 15.22 0.0000 0.0000 0.0000 0.0000 0 0
+2374 0 """2NORTHWEST-1""" 0.9962 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2375 0 """2PHOENIX---1""" 0.9654 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2376 0 """2PIONEER-TP1""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2377 0 """2PIONEER---1""" 0.9633 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2378 0 """2PLACID----1""" 0.9882 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2379 0 """2PONTIAC---3""" 1.0328 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2380 0 """2PONTIAC---1""" 1.0213 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2381 0 """2RED-RUN---1""" 1.0352 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+2382 0 """2REMER-----1""" 1.1466 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2383 0 """2R.R.EQZR.-1""" 1.0352 0.00 0.00 0.00 0.00 0.00 60.52 37.47 0.0000 0.0000 0.0000 0.0000 0 0
+2384 2 """2R.ROUGE-1-1""" 1.0354 0.00 272.00 1880.00 0.00 188.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2385 2 """2R.ROUGE-2-1""" 1.0442 0.00 257.00 1980.00 0.00 198.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2386 2 """2R.ROUGE-3-1""" 1.0447 0.00 300.00 0.00 0.00 209.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2387 0 """2RIVERVU---1""" 1.0241 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2388 0 """2ROMULUS---1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2389 0 """2RUSH------1""" 1.0284 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2390 0 """2SANDUSKY--1""" 1.0989 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2391 0 """2SLOCUM----1""" 1.0153 0.00 14.00 40.00 0.00 0.00 57.49 27.86 0.0000 0.0000 0.0000 0.0000 0 0
+2392 0 """2SOUTHFLD--1""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2393 0 """2SPOKANE---1""" 1.0200 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2394 2 """2ST-CLAIR--3""" 1.0433 0.00 498.00 0.00 0.00 215.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2395 2 """2ST-CL.1-3-1""" 1.1866 0.00 501.00 3220.00 0.00 322.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2396 2 """2ST-CL.4,5-1""" 1.1467 0.00 463.00 0.00 0.00 315.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2397 2 """2ST-CL.6---1""" 1.1194 0.00 322.00 0.00 0.00 190.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2398 0 """2STC-SP-STL1""" 1.0639 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2399 0 """2STEPHENS--3""" 1.0262 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2400 0 """2STEPHENS--1""" 1.0420 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2401 0 """2STERLING--1""" 1.0393 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2402 0 """2SUNSET----1""" 0.9976 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2403 0 """2SUPERIOR--1""" 0.9791 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2404 0 """2TAYLOR-1--1""" 1.0054 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2405 0 """2TAYLOR--2-1""" 1.0247 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2406 0 """2TEMPEST--CP""" 1.0062 0.00 0.00 0.00 0.00 0.00 11.84 3.92 0.0000 0.0000 0.0000 0.0000 0 0
+2407 2 """2TRENTN-NA-1""" 1.0300 0.00 278.00 2220.00 0.00 225.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2408 2 """2TRENTN-SU-1""" 1.0300 0.00 593.00 1450.00 0.00 303.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2409 0 """2TROY------1""" 1.0029 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2410 0 """2TUSCOLA---1""" 1.0236 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2411 0 """2VICTOR----1""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2412 0 """2WABASH-TAP1""" 1.1463 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2413 0 """2WABASH----1""" 1.1431 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2414 0 """2WALTON----1""" 1.0096 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2415 0 """2WARREN----1""" 1.0148 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2416 0 """2WARREN-7--1""" 1.0400 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2417 0 """2WATERMAN--2""" 1.0227 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2418 0 """2WATERMAN--1""" 1.0418 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2419 0 """2WAT.EQZR.24""" 1.0311 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2420 0 """2WAYNE-----3""" 1.0091 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2421 0 """2WAYNE-----1""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2422 0 """2WHEELER---1""" 1.0040 0.00 0.00 0.00 0.00 0.00 24.21 15.04 0.0000 0.0000 0.0000 0.0000 0 0
+2423 0 """2WILLOW-1T-1""" 0.9847 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2424 0 """2WILLOW-2T-1""" 0.9880 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2425 0 """2WILLO-RUN-1""" 0.9811 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2426 0 """2WILLOW--.13""" 0.9992 0.00 0.00 0.00 0.00 0.00 41.83 23.67 0.0000 0.0000 0.0000 0.0000 0 0
+2427 0 """2WIXOM-----3""" 1.0194 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2428 0 """2WIXOM-----1""" 1.0035 0.00 0.00 0.00 0.00 0.00 10.86 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+2429 0 """2WOODHVN-1-1""" 1.0278 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2430 0 """2WOODHVN1.13""" 1.0229 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+2431 0 """2WDHVN-TP2-1""" 1.0248 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2432 0 """2WOODHVN-2-1""" 1.0240 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2433 0 """2WOODHVN2.13""" 1.0124 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+2434 0 """2YOST------1""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+2435 0 """3ALBA-TIE--1""" 1.1233 0.00 0.00 0.00 0.00 0.00 2.50 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+2436 0 """3ALCONA-D--1""" 1.1170 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2437 0 """3ALGOMA----1""" 1.0365 0.00 0.00 0.00 0.00 0.00 14.00 -1.10 0.0000 0.0000 0.0000 0.0000 0 0
+2438 0 """3ALMA------1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.40 2.10 0.0000 0.1000 0.0000 0.0000 0 0
+2439 0 """3ALMEDA----1""" 1.0459 0.00 0.00 0.00 0.00 0.00 14.10 4.30 0.0000 0.0215 0.0000 0.0000 0 0
+2440 0 """3ALPENA----1""" 1.1632 0.00 0.00 0.00 0.00 0.00 33.10 5.20 0.0000 0.2880 0.0000 0.0000 0 0
+2441 0 """3AMBER-----1""" 1.0260 0.00 0.00 0.00 0.00 0.00 19.00 15.60 0.0000 0.0000 0.0000 0.0000 0 0
+2442 0 """3ARGENTA---3""" 1.0555 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2443 0 """3ARGENTA---1""" 1.0537 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2444 0 """3A-1CPCO-120""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2445 0 """3BANGOR----1""" 1.0383 0.00 0.00 0.00 0.00 0.00 8.60 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2446 0 """3BARD-RD---1""" 1.0831 0.00 0.00 0.00 0.00 0.00 6.30 1.20 0.0000 0.0000 0.0000 0.0000 0 0
+2447 0 """3BARRY-----1""" 1.0416 0.00 0.00 0.00 0.00 0.00 27.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+2448 0 """3BASS-CRK--1""" 1.0389 0.00 0.00 0.00 0.00 0.00 17.80 3.20 0.0000 0.0000 0.0000 0.0000 0 0
+2449 0 """3BATAVIA---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 23.20 0.10 0.0000 0.0800 0.0000 0.0000 0 0
+2450 0 """3BEALS-RD.-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 146.80 48.60 0.0000 0.1500 0.0000 0.0000 0 0
+2451 0 """3BEECHER---1""" 1.0185 0.00 0.00 0.00 0.00 0.00 61.40 30.10 0.0000 0.0800 0.0000 0.0000 0 0
+2452 0 """3BEGOLE----1""" 1.0444 0.00 0.00 0.00 0.00 0.00 19.70 2.50 0.0000 0.1530 0.0000 0.0000 0 0
+2453 0 """3BEVERIDGE-1""" 1.0238 0.00 0.00 0.00 0.00 0.00 50.90 24.30 0.0000 0.1388 0.0000 0.0000 0 0
+2454 2 """3BIG-ROCK--1""" 1.1480 0.00 50.00 -140.00 -14.00 28.00 0.00 0.00 0.0000 0.0116 0.0000 0.0000 0 0
+2455 0 """3BINGHAM---1""" 1.0446 0.00 0.00 0.00 0.00 0.00 17.60 -7.80 0.0000 0.1928 0.0000 0.0000 0 0
+2456 0 """3BLACK-RIV-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 49.90 8.50 0.0000 0.0000 0.0000 0.0000 0 0
+2457 0 """3BLACKSTON-1""" 1.0188 0.00 0.00 200.00 0.00 0.00 83.10 22.00 0.0000 0.0800 0.0000 0.0000 0 0
+2458 0 """3BOARDMAN--1""" 1.0825 0.00 2.00 0.00 0.00 0.00 27.80 16.10 0.0000 0.1042 0.0000 0.0000 0 0
+2459 0 """3BUICK-STEW1""" 1.0363 0.00 0.00 0.00 0.00 0.00 40.50 17.10 0.0000 0.0000 0.0000 0.0000 0 0
+2460 0 """3BULLOCK---1""" 1.0269 0.00 0.00 0.00 0.00 0.00 37.10 37.10 0.0000 0.1578 0.0000 0.0000 0 0
+2461 2 """3CAMPBELL--1""" 1.0554 0.00 584.00 0.00 0.00 390.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2462 0 """3CEMENT-CY-1""" 1.0188 0.00 0.00 0.00 0.00 0.00 28.00 -0.20 0.0000 0.1000 0.0000 0.0000 0 0
+2463 0 """3CHASE-----1""" 1.0429 0.00 0.00 0.00 0.00 0.00 4.90 2.20 0.0000 0.0000 0.0000 0.0000 0 0
+2464 0 """3CLAIRMONT-1""" 1.0230 0.00 0.00 0.00 0.00 0.00 73.60 28.60 0.0000 0.1646 0.0000 0.0000 0 0
+2465 0 """3CLEVELAND-1""" 1.0356 0.00 0.00 0.00 0.00 0.00 32.90 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+2466 2 """3COBB------1""" 1.0400 0.00 476.00 40.00 0.00 421.00 79.30 35.60 0.0000 0.0000 0.0000 0.0000 0 0
+2467 0 """3CORK-ST.--1""" 1.0494 0.00 0.00 0.00 0.00 0.00 17.00 7.20 0.0000 0.0000 0.0000 0.0000 0 0
+2468 0 """3CORNELL---1""" 1.0290 0.00 0.00 0.00 0.00 0.00 33.30 12.00 0.0000 0.1981 0.0000 0.0000 0 0
+2469 0 """3COTTEGE-GR1""" 1.0738 0.00 0.00 0.00 0.00 0.00 1.70 0.70 0.0000 0.0000 0.0000 0.0000 0 0
+2470 0 """3CROTON----1""" 1.0342 0.00 29.00 0.00 0.00 0.00 10.40 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+2471 0 """3DEAN-RD.--1""" 1.0521 0.00 0.00 0.00 0.00 0.00 3.60 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+2472 0 """3DEJA------1""" 1.0414 0.00 0.00 0.00 0.00 0.00 13.80 -2.50 0.0000 0.0000 0.0000 0.0000 0 0
+2473 0 """3DELANEY---1""" 1.0469 0.00 0.00 0.00 0.00 0.00 64.80 25.10 0.0000 0.2698 0.0000 0.0000 0 0
+2474 0 """3DELH1-----1""" 1.0442 0.00 0.00 0.00 0.00 0.00 36.90 -10.00 0.0000 0.2783 0.0000 0.0000 0 0
+2475 0 """3DORT------1""" 1.0425 0.00 0.00 0.00 0.00 0.00 106.40 37.90 0.0000 0.4626 0.0000 0.0000 0 0
+2476 0 """3DOW-CHLOR.1""" 1.0243 0.00 0.00 0.00 0.00 0.00 49.00 24.00 0.0000 0.0000 0.0000 0.0000 0 0
+2477 0 """3DU-PONTE--1""" 1.0355 0.00 0.00 0.00 0.00 0.00 2.20 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2478 0 """3D-4CPCO-120""" 1.0444 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2479 0 """3EDENVILLE-1""" 1.0405 0.00 0.00 0.00 0.00 0.00 7.10 -4.70 0.0000 0.0000 0.0000 0.0000 0 0
+2480 2 """3ELM-STREET1""" 1.0444 0.00 29.00 0.00 0.00 7.00 32.70 23.30 0.0000 0.0000 0.0000 0.0000 0 0
+2481 0 """3EMMET-----1""" 1.1457 0.00 0.00 0.00 0.00 0.00 21.00 3.90 0.0000 0.0000 0.0000 0.0000 0 0
+2482 0 """3EUREKA----1""" 1.0398 0.00 0.00 0.00 0.00 0.00 21.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+2483 0 """3FELCH-RD.-1""" 1.0331 0.00 0.00 0.00 0.00 0.00 14.00 5.90 0.0000 0.0000 0.0000 0.0000 0 0
+2484 0 """3FISHER----1""" 1.0445 0.00 0.00 0.00 0.00 0.00 14.10 4.60 0.0000 0.0000 0.0000 0.0000 0 0
+2485 0 """3FOUNDRY---1""" 1.0316 0.00 0.00 0.00 0.00 0.00 31.70 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+2486 0 """3FOUR-MILE-1""" 1.0406 0.00 2.00 0.00 0.00 0.00 111.80 32.80 0.0000 0.1000 0.0000 0.0000 0 0
+2487 0 """3GARFIELD--1""" 1.0354 0.00 0.00 0.00 0.00 0.00 72.20 32.00 0.0000 0.0353 0.0000 0.0000 0 0
+2488 2 """3GAYLORD---1""" 1.1519 0.00 60.00 0.00 0.00 15.00 10.10 1.90 0.0000 0.0826 0.0000 0.0000 0 0
+2489 0 """3GENOA-----1""" 1.0678 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2490 0 """3GLEANER---1""" 1.0283 0.00 0.00 0.00 0.00 0.00 18.80 6.90 0.0000 0.0000 0.0000 0.0000 0 0
+2491 0 """3GREY-IRON-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 53.50 17.50 0.0000 0.0000 0.0000 0.0000 0 0
+2492 0 """3HALSEY----1""" 1.0458 0.00 0.00 0.00 0.00 0.00 20.40 3.80 0.0000 0.1148 0.0000 0.0000 0 0
+2493 0 """3HARDY-DAM-1""" 1.0343 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2494 0 """3HAZELWOOD-1""" 1.0525 0.00 0.00 0.00 0.00 0.00 39.10 7.20 0.0000 0.0400 0.0000 0.0000 0 0
+2495 0 """3HEMPHILL--1""" 1.0447 0.00 0.00 0.00 0.00 0.00 134.10 62.70 0.0000 0.6928 0.0000 0.0000 0 0
+2496 0 """3HIGGINS---1""" 1.1065 0.00 0.00 0.00 0.00 0.00 18.90 2.80 0.0000 0.0000 0.0000 0.0000 0 0
+2497 0 """3HODENPYL--1""" 1.0686 0.00 0.00 0.00 0.00 0.00 8.40 -0.80 0.0000 0.0000 0.0000 0.0000 0 0
+2498 0 """3HOLLAN-RD-1""" 1.0168 0.00 0.00 0.00 0.00 0.00 42.80 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+2499 0 """3HOOKER----1""" 1.0348 0.00 0.00 0.00 0.00 0.00 26.40 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2500 0 """3HUGHES-RD-1""" 1.0377 0.00 0.00 0.00 0.00 0.00 21.80 4.80 0.0000 0.0000 0.0000 0.0000 0 0
+2501 0 """3IOSCO-----1""" 1.1238 0.00 19.00 0.00 0.00 0.00 12.80 5.70 0.0000 0.0263 0.0000 0.0000 0 0
+2502 0 """3ISLAND-RD-1""" 1.0435 0.00 0.00 0.00 0.00 0.00 29.20 -2.90 0.0000 0.1086 0.0000 0.0000 0 0
+2503 2 """3KARN------1""" 1.0563 0.00 498.00 0.00 0.00 337.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2504 0 """3KENOWA----3""" 1.0865 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2505 0 """3LATSON----1""" 1.0558 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2506 0 """3LAWNDALE--1""" 1.0265 0.00 0.00 0.00 0.00 0.00 39.90 17.00 0.0000 0.0000 0.0000 0.0000 0 0
+2507 0 """3LAYTON----1""" 1.0246 0.00 0.00 0.00 0.00 0.00 16.10 1.80 0.0000 0.0000 0.0000 0.0000 0 0
+2508 0 """3LEWISTON--1""" 1.1462 0.00 0.00 0.00 0.00 0.00 2.60 0.80 0.0000 0.0000 0.0000 0.0000 0 0
+2509 0 """3LINBERGH--1""" 1.0424 0.00 0.00 0.00 0.00 0.00 42.40 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+2510 0 """3LOOK-GLAS-1""" 1.0411 0.00 0.00 0.00 0.00 0.00 25.30 -3.20 0.0000 0.0000 0.0000 0.0000 0 0
+2511 0 """3LOUD------1""" 1.1048 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0040 0.0000 0.0000 0 0
+2512 2 """3LUDINGTON-3""" 1.0978 0.00 0.00 0.00 0.00 200.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2513 0 """3MALLEABLE-1""" 1.0211 0.00 0.00 0.00 0.00 0.00 61.50 17.20 0.0000 0.0000 0.0000 0.0000 0 0
+2514 0 """3MARQUETTE-1""" 1.0444 0.00 2.00 0.00 0.00 0.00 17.80 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+2515 0 """3MECOSTA---1""" 1.0370 0.00 0.00 0.00 0.00 0.00 15.90 3.60 0.0000 0.0000 0.0000 0.0000 0 0
+2516 0 """3MEDUSA----1""" 1.1103 0.00 0.00 0.00 0.00 0.00 11.50 1.60 0.0000 0.0000 0.0000 0.0000 0 0
+2517 0 """3MILES-RD.-1""" 1.1103 0.00 0.00 0.00 0.00 0.00 7.70 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+2518 0 """3MILHAM----1""" 1.0437 0.00 0.00 0.00 0.00 0.00 36.30 9.60 0.0000 0.1413 0.0000 0.0000 0 0
+2519 0 """3MIO-------1""" 1.1407 0.00 9.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.2067 0.0000 0.0000 0 0
+2520 0 """3MONITOR---1""" 1.0319 0.00 0.00 0.00 0.00 0.00 41.40 14.30 0.0000 0.0503 0.0000 0.0000 0 0
+2521 0 """3MOORE-RD--1""" 0.9940 0.00 0.00 0.00 0.00 0.00 40.80 10.60 0.0000 0.0000 0.0000 0.0000 0 0
+2522 2 """3MORROW----1""" 1.0500 0.00 130.00 0.00 0.00 168.00 80.20 31.20 0.0000 0.1836 0.0000 0.0000 0 0
+2523 0 """3MUSKEGN-HT1""" 1.0212 0.00 0.00 0.00 0.00 0.00 72.90 52.50 0.0000 0.0000 0.0000 0.0000 0 0
+2524 0 """3NODULAR---1""" 1.0228 0.00 0.00 0.00 0.00 0.00 34.40 16.80 0.0000 0.0000 0.0000 0.0000 0 0
+2525 0 """3N.BELDING-1""" 1.0422 0.00 0.00 0.00 0.00 0.00 20.70 -2.30 0.0000 0.1000 0.0000 0.0000 0 0
+2526 0 """3OAKLAND---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 17.80 5.80 0.0000 0.0000 0.0000 0.0000 0 0
+2527 0 """3OGEMAW----1""" 1.0698 0.00 0.00 0.00 0.00 0.00 11.90 -7.50 0.0000 0.0000 0.0000 0.0000 0 0
+2528 0 """3OWOSSO----1""" 1.0282 0.00 0.00 0.00 0.00 0.00 29.20 10.40 0.0000 0.0000 0.0000 0.0000 0 0
+2529 0 """3PAGE------1""" 1.0180 0.00 0.00 0.00 0.00 0.00 45.80 5.40 0.0000 0.0800 0.0000 0.0000 0 0
+2530 2 """3PALISADES-3""" 1.0392 0.00 701.70 0.00 0.00 418.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2531 0 """3PASEDENA--1""" 1.0263 0.00 0.00 0.00 0.00 0.00 48.70 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+2532 0 """3PENN-DIXIE1""" 1.1463 0.00 0.00 0.00 0.00 0.00 6.60 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+2533 0 """3PT.CALCIT-1""" 1.1721 0.00 0.00 0.00 0.00 0.00 9.40 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+2534 0 """3RAISIN----1""" 1.0280 0.00 0.00 0.00 0.00 0.00 21.10 8.80 0.0000 0.0000 0.0000 0.0000 0 0
+2535 0 """3RICE-CREK-1""" 1.0323 0.00 0.00 0.00 0.00 0.00 29.10 1.20 0.0000 0.2540 0.0000 0.0000 0 0
+2536 0 """3RIFLE-RIV.1""" 1.0698 0.00 0.00 0.00 0.00 0.00 2.40 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+2537 2 """3RIGGSVIL--1""" 1.1813 0.00 25.00 0.00 0.00 6.00 22.30 2.50 0.0000 0.1838 0.0000 0.0000 0 0
+2538 0 """3RIVERVIEW-1""" 1.0513 0.00 0.00 0.00 0.00 0.00 79.60 28.70 0.0000 0.3312 0.0000 0.0000 0 0
+2539 0 """3ROCKPORT--1""" 1.1679 0.00 0.00 0.00 0.00 0.00 1.00 0.20 0.0000 0.0000 0.0000 0.0000 0 0
+2540 0 """3RONDO-----1""" 1.1683 0.00 0.00 0.00 0.00 0.00 3.40 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+2541 0 """3SAGNAW-R.-1""" 1.0316 0.00 0.00 0.00 0.00 0.00 63.80 32.80 0.0000 0.1568 0.0000 0.0000 0 0
+2542 0 """3SAMARIA---1""" 1.0341 0.00 0.00 0.00 0.00 0.00 23.10 10.70 0.0000 0.0000 0.0000 0.0000 0 0
+2543 0 """3SCOTT-LK.-1""" 1.0470 0.00 0.00 0.00 0.00 0.00 17.10 5.70 0.0000 0.0000 0.0000 0.0000 0 0
+2544 0 """3SPAULDING-1""" 1.0412 0.00 0.00 0.00 0.00 0.00 70.40 16.20 0.0000 0.0800 0.0000 0.0000 0 0
+2545 0 """3SPRUCE----1""" 1.1468 0.00 0.00 0.00 0.00 0.00 4.40 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+2546 0 """3STAMPG-PLT1""" 1.0446 0.00 0.00 0.00 0.00 0.00 11.60 3.80 0.0000 0.0000 0.0000 0.0000 0 0
+2547 0 """3STRONACH--1""" 1.0397 0.00 0.00 0.00 0.00 0.00 21.20 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+2548 0 """3STOVER----1""" 1.1154 0.00 0.00 0.00 0.00 0.00 6.60 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+2549 0 """3SUMMERTON-1""" 1.0218 0.00 0.00 0.00 0.00 0.00 24.20 -2.10 0.0000 0.0000 0.0000 0.0000 0 0
+2550 0 """3TALLMADGE-3""" 1.0815 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2551 0 """3TALLMADGE-1""" 1.0662 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2552 0 """3THETFORD--3""" 1.0579 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2553 2 """3THETFORD--1""" 1.0516 0.00 146.00 0.00 0.00 36.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2554 0 """3TITTABAW--3""" 1.0615 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2555 0 """3TITTABAW--1""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2556 0 """3TIPPY-DAM-1""" 1.0648 0.00 29.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.1255 0.0000 0.0000 0 0
+2557 0 """3TOMPKINS--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2558 0 """3TUSC.TAP.-1""" 1.0626 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2559 0 """3TWINING---1""" 1.0667 0.00 0.00 0.00 0.00 0.00 8.70 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+2560 0 """3UPJOHN----1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.80 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+2561 2 """3VERONA----1""" 1.0467 0.00 29.00 0.00 0.00 7.00 78.70 10.40 0.0000 0.4710 0.0000 0.0000 0 0
+2562 0 """3VEVAY-----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 18.30 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+2563 0 """3WACKERLY--1""" 1.0295 0.00 0.00 0.00 0.00 0.00 29.80 9.70 0.0000 0.0000 0.0000 0.0000 0 0
+2564 0 """3WARREN----1""" 1.0665 0.00 0.00 0.00 0.00 0.00 19.20 14.60 0.0000 0.3967 0.0000 0.0000 0 0
+2565 0 """3WASHTENAW-1""" 1.0009 0.00 0.00 0.00 0.00 0.00 16.90 -3.00 0.0000 0.0000 0.0000 0.0000 0 0
+2566 2 """3WEADOCK-B-1""" 1.0400 0.00 299.00 90.00 0.00 226.00 35.70 15.30 0.0000 0.0330 0.0000 0.0000 0 0
+2567 2 """3WEADOCK-W-1""" 1.0476 0.00 319.00 0.00 0.00 191.00 36.60 15.30 0.0000 0.0000 0.0000 0.0000 0 0
+2568 0 """3WEALTHY---1""" 1.0461 0.00 0.00 0.00 0.00 0.00 116.80 51.00 0.0000 0.0000 0.0000 0.0000 0 0
+2569 0 """3WEXFORD---1""" 1.0784 0.00 0.00 0.00 0.00 0.00 24.60 -4.50 0.0000 0.0990 0.0000 0.0000 0 0
+2570 0 """3WHITE-LK.-1""" 1.0342 0.00 9.00 0.00 0.00 0.00 11.80 6.80 0.0000 0.0000 0.0000 0.0000 0 0
+2571 2 """3WHITING---1""" 1.0500 0.00 331.00 900.00 0.00 206.00 14.30 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2572 0 """3WILLARD---1""" 1.0411 0.00 0.00 0.00 0.00 0.00 23.60 3.70 0.0000 0.0000 0.0000 0.0000 0 0
+2573 0 """4ALLANBURG-2""" 1.1270 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2574 0 """4BEACH-----2""" 1.0829 0.00 0.00 0.00 0.00 0.00 256.30 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+2575 2 """4BEAUHARN--2""" 1.1266 0.00 600.00 500.00 -25.00 50.00 19.70 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+2576 2 """4BECK------2""" 1.1280 0.00 1011.00 1890.00 -100.00 600.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2577 0 """4-BP-76-REG2""" 1.0551 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2578 0 """4BROCKVILLE2""" 1.0779 0.00 0.00 0.00 0.00 0.00 76.90 31.50 0.0000 0.0000 0.0000 0.0000 0 0
+2579 0 """4BUCHANNAN-2""" 1.0643 0.00 0.00 0.00 0.00 0.00 600.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+2580 2 """4BUCHANNAN-1""" 1.0472 0.00 0.00 -250.00 -25.00 200.00 326.80 52.40 0.0000 0.0000 0.0000 0.0000 0 0
+2581 0 """4BURLINGTON2""" 1.0779 0.00 0.00 0.00 0.00 0.00 900.00 300.00 0.0000 0.0000 0.0000 0.0000 0 0
+2582 0 """4CHATHAM---2""" 1.0922 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2583 2 """4CHATS-FALL2""" 1.1200 0.00 168.00 670.00 -30.00 70.00 7.00 3.30 0.0000 0.0000 0.0000 0.0000 0 0
+2584 2 """4CHERRYWOOD2""" 1.0770 0.00 1000.00 4190.00 -300.00 600.00 650.00 212.60 0.0000 0.0000 0.0000 0.0000 0 0
+2585 0 """4CRAWFORD--1""" 1.0371 0.00 0.00 0.00 0.00 0.00 64.00 28.00 0.0000 0.0000 0.0000 0.0000 0 0
+2586 2 """4DESJOACH--2""" 1.1740 0.00 370.00 590.00 -50.00 175.00 16.10 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+2587 2 """4DETWEILER-2""" 1.0550 0.00 0.00 230.00 -35.00 50.00 600.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+2588 2 """4DOBBIN----2""" 1.0510 0.00 222.00 -310.00 -50.00 75.00 160.00 65.60 0.0000 0.0000 0.0000 0.0000 0 0
+2589 2 """4DOUGLAS-PT2""" 1.1000 0.00 200.00 370.00 -50.00 80.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2590 0 """4EASTON-JCT2""" 1.0823 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2591 0 """4ESSA--230-2""" 1.0904 0.00 0.00 0.00 0.00 0.00 211.00 57.00 0.0000 0.0000 0.0000 0.0000 0 0
+2592 0 """4ESSEX-115-1""" 1.0395 0.00 0.00 0.00 0.00 0.00 84.00 -6.00 0.0000 0.0000 0.0000 0.0000 0 0
+2593 0 """4HANMER----5""" 1.0071 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 -2.1000 0.0000 0.0000 0 0
+2594 0 """4HANNON----2""" 1.0931 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2595 0 """4HANOVER---2""" 1.0859 0.00 0.00 0.00 0.00 0.00 172.20 38.20 0.0000 0.0000 0.0000 0.0000 0 0
+2596 0 """4HAWTHORNE-2""" 1.0613 0.00 0.00 0.00 0.00 0.00 400.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+2597 0 """4HINCHBROOK2""" 1.0640 0.00 0.00 0.00 0.00 0.00 300.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+2598 2 """4HOLDEN----2""" 1.1600 0.00 200.00 150.00 -50.00 90.00 96.00 25.00 0.0000 0.0000 0.0000 0.0000 0 0
+2599 0 """4KEITH-230-2""" 1.0658 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2600 2 """4KEITH-115-1""" 1.0383 0.00 60.00 -100.00 -10.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2601 0 """4KENT------1""" 0.9963 0.00 0.00 0.00 0.00 0.00 122.80 29.80 0.0000 0.0000 0.0000 0.0000 0 0
+2602 0 """4KLEINBURG-5""" 0.9713 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2603 0 """4KLEINBURG-2""" 1.0794 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2604 0 """4LAMBTON-345""" 1.0434 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2605 0 """4LAMBTON---2""" 1.1215 0.00 0.00 0.00 0.00 0.00 27.80 11.70 0.0000 0.0000 0.0000 0.0000 0 0
+2606 2 """4LAMBTON-.24""" 1.1750 0.00 1450.00 7430.00 -500.00 1080.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2607 0 """4LAUZON----2""" 1.0537 0.00 0.00 0.00 0.00 0.00 86.00 20.00 0.0000 0.0000 0.0000 0.0000 0 0
+2608 0 """4LAUZON----1""" 1.0421 0.00 0.00 0.00 0.00 0.00 124.70 16.20 0.0000 0.0000 0.0000 0.0000 0 0
+2609 0 """4LEASIDE---2""" 1.0681 0.00 0.00 0.00 0.00 0.00 500.00 150.00 0.0000 0.0000 0.0000 0.0000 0 0
+2610 0 """4-L-33-P---2""" 1.0530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2611 3 """4MANBY-----2""" 1.0650 0.00 726.60 450.00 0.00 0.00 950.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+2612 2 """4MARTINDALE2""" 1.1071 0.00 435.00 -500.00 -50.00 100.00 627.00 98.50 0.0000 0.0000 0.0000 0.0000 0 0
+2613 0 """4MERIVALE--2""" 0.9920 0.00 0.00 0.00 0.00 0.00 244.00 95.00 0.0000 0.0000 0.0000 0.0000 0 0
+2614 0 """4MIDDLEPORT2""" 1.1049 0.00 0.00 0.00 0.00 0.00 40.00 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+2615 0 """4MINDEN----2""" 1.1309 0.00 0.00 0.00 0.00 0.00 92.60 31.90 0.0000 0.0000 0.0000 0.0000 0 0
+2616 2 """4NANTICO---2""" 1.1570 0.00 1940.00 7680.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2617 2 """4NORTH-BAY-2""" 1.1500 0.00 245.00 -110.00 -50.00 100.00 27.20 11.90 0.0000 0.0000 0.0000 0.0000 0 0
+2618 0 """4NEALE-----2""" 1.0954 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2619 0 """4ORANGEVIL-2""" 1.0761 0.00 0.00 0.00 0.00 0.00 67.00 40.00 0.0000 0.0000 0.0000 0.0000 0 0
+2620 0 """4-PA-27-REG2""" 1.0521 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2621 0 """4PAUGAN----2""" 1.1278 0.00 0.00 0.00 0.00 0.00 8.30 2.50 0.0000 0.0000 0.0000 0.0000 0 0
+2622 0 """4PINARD----5""" 1.0473 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2623 2 """4PINARD----2""" 1.0400 0.00 550.00 600.00 -300.00 300.00 0.00 0.00 0.0000 -1.0470 0.0000 0.0000 0 0
+2624 0 """4PORCUPINE-5""" 1.0447 0.00 0.00 0.00 0.00 0.00 90.00 32.10 0.0000 0.0000 0.0000 0.0000 0 0
+2625 0 """4RICHVIEW--2""" 1.0681 0.00 0.00 0.00 0.00 0.00 800.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+2626 2 """4STLAWRENCE2""" 1.1139 0.00 744.00 3000.00 -100.00 300.00 250.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+2627 0 """4STLAWRENCE1""" 1.0058 0.00 0.00 0.00 0.00 0.00 49.50 21.00 0.0000 0.0000 0.0000 0.0000 0 0
+2628 0 """4STTHOMAS--1""" 1.0326 0.00 0.00 0.00 0.00 0.00 165.00 11.00 0.0000 0.0000 0.0000 0.0000 0 0
+2629 0 """4SANDWICH--2""" 1.0611 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2630 0 """4SAND.WEST-2""" 1.0622 0.00 0.00 0.00 0.00 0.00 114.80 51.60 0.0000 0.0000 0.0000 0.0000 0 0
+2631 0 """4SCOTT-----2""" 1.0961 0.00 0.00 0.00 0.00 0.00 160.00 41.70 0.0000 0.0000 0.0000 0.0000 0 0
+2632 0 """4SCOTT-----1""" 1.0396 0.00 0.00 0.00 0.00 0.00 169.50 36.20 0.0000 0.0000 0.0000 0.0000 0 0
+2633 0 """4WONDERLAND2""" 1.0664 0.00 0.00 0.00 0.00 0.00 79.30 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+2634 0 """5BAYSHORE-T3""" 1.0112 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2635 2 """5BAYSHORE-T1""" 1.0300 0.00 600.00 2680.00 -1000.00 1000.00 760.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+2636 2 """5LEMOYNE--T3""" 1.0120 0.00 0.00 1900.00 -1000.00 1000.00 175.00 90.80 0.0000 0.0000 0.0000 0.0000 0 0
+2637 0 """5BENTON-HBR3""" 1.0329 0.00 0.00 0.00 0.00 0.00 330.00 16.90 0.0000 0.0000 0.0000 0.0000 0 0
+2638 2 """5D.C.COOK--3""" 1.0300 0.00 2501.67 990.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2639 2 """5DUMONT----3""" 1.0300 0.00 850.00 5270.00 -1000.00 1000.00 167.00 50.00 0.0000 0.0000 0.0000 0.0000 0 0
+2640 2 """5E.LIMA----3""" 0.9900 0.00 80.00 860.00 -1000.00 1000.00 350.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+2641 2 """5FOSTORIA--3""" 1.0000 0.00 0.00 -490.00 -1000.00 1000.00 254.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+2642 2 """5OLIVE-----3""" 1.0200 0.00 0.00 -2130.00 -1000.00 1000.00 394.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+2643 2 """5ROBISON-PK3""" 0.9800 0.00 0.00 -630.00 -1000.00 1000.00 460.00 169.80 0.0000 0.0000 0.0000 0.0000 0 0
+2644 2 """5SORENSON--3""" 1.0000 0.00 163.00 850.00 -1000.00 1000.00 371.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+2645 2 """5TWIN-BRCH-3""" 1.0200 0.00 0.00 -1660.00 -1000.00 1000.00 700.00 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+2646 2 """5LEWISTON-Y2""" 1.0520 0.00 1209.10 -190.00 -200.00 420.00 654.10 -45.40 0.0000 0.0000 0.0000 0.0000 0 0
+2647 2 """5MOSSES---Y2""" 1.0500 0.00 400.00 620.00 0.00 130.00 505.90 96.60 0.0000 0.0000 0.0000 0.0000 0 0
+2648 2 """5PACKARD--Y2""" 1.0520 0.00 0.00 -160.00 -1000.00 100.00 641.40 -0.60 0.0000 0.0000 0.0000 0.0000 0 0
+2649 0 """ADAIR-------""" 1.0193 0.00 0.00 0.00 0.00 0.00 2.18 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2650 0 """ADAMS-----40""" 1.0140 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+2651 0 """1AINSWORTH--""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.17 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2652 0 """ALGONAC-----""" 1.0163 0.00 0.00 0.00 0.00 0.00 7.98 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+2653 0 """ALMONT------""" 0.9849 0.00 0.00 0.00 0.00 0.00 3.28 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+2654 0 """ANDERSON----""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.59 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2655 0 """APPLEGATE---""" 0.9866 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2656 0 """ARGO--------""" 1.0307 0.00 0.00 0.00 0.00 0.00 23.02 3.93 0.0000 0.1200 0.0000 0.0000 0 0
+2657 0 """ARMADA------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.52 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+2658 0 """ARROWHEAD-40""" 1.0217 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2659 0 """ATTICA------""" 0.9842 0.00 0.00 0.00 0.00 0.00 1.34 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+2660 0 """AUBURN-HTS-1""" 1.0049 0.00 0.00 0.00 0.00 0.00 6.50 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+2661 0 """AVOCA-------""" 0.9930 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2662 0 """AVON--------""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+2663 0 """BAD-AXE-40--""" 0.9987 0.00 0.00 0.00 0.00 0.00 6.13 2.12 0.0000 0.0660 0.0000 0.0000 0 0
+2664 0 """BALDWIN--EQ1""" 1.0224 0.00 0.00 0.00 0.00 0.00 8.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+2665 0 """BARNES-LAKE-""" 0.9888 0.00 0.00 0.00 0.00 0.00 2.20 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+2666 0 """1BARTLETT-CP""" 1.0119 0.00 0.00 0.00 0.00 0.00 7.40 5.87 0.0000 0.0000 0.0000 0.0000 0 0
+2667 0 """BAYPORT-----""" 0.9869 0.00 0.00 0.00 0.00 0.00 1.26 2.12 0.0000 0.0000 0.0000 0.0000 0 0
+2668 0 """BEAVER------""" 0.9956 0.00 0.00 0.00 0.00 0.00 0.17 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2669 0 """BELLEVILLE--""" 1.0212 0.00 0.00 0.00 0.00 0.00 6.05 2.66 0.0000 0.0000 0.0000 0.0000 0 0
+2670 0 """BERLIN-FUT74""" 1.0348 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2671 0 """BERNARD-----""" 0.9996 0.00 0.00 0.00 0.00 0.00 2.10 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2672 0 """BINGHAM--EQ1""" 1.0029 0.00 0.00 0.00 0.00 0.00 3.28 1.49 0.0000 0.0480 0.0000 0.0000 0 0
+2673 0 """BLOOMFIELD40""" 1.0220 0.00 0.00 0.00 0.00 0.00 79.00 39.62 0.0000 0.0900 0.0000 0.0000 0 0
+2674 0 """BOND,MADRID-""" 1.0551 0.00 0.00 0.00 0.00 0.00 2.18 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+2675 0 """BREST-------""" 1.0358 0.00 0.00 0.00 0.00 0.00 5.04 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2676 0 """BREWER------""" 1.0045 0.00 0.00 0.00 0.00 0.00 2.94 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+2677 0 """BRIGHTON----""" 1.0076 0.00 0.00 0.00 0.00 0.00 5.96 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+2678 0 """BROWN-CITY--""" 0.9725 0.00 0.00 0.00 0.00 0.00 3.28 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+2679 0 """BROWNSTOWN40""" 1.0348 0.00 0.00 0.00 0.00 0.00 36.46 24.76 0.0000 0.0000 0.0000 0.0000 0 0
+2680 0 """BRAY--------""" 0.9770 0.00 0.00 0.00 0.00 0.00 1.51 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2681 0 """BRUCE---EQ1-""" 1.0034 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+2682 0 """BUNCE-CRK-40""" 1.0333 0.00 0.00 0.00 0.00 0.00 7.73 4.25 0.0000 0.0000 0.0000 0.0000 0 0
+2683 2 """BUNCE-CRK-24""" 1.0607 0.00 84.00 480.00 0.00 480.00 37.72 22.10 0.0000 0.0000 0.0000 0.0000 0 0
+2684 0 """CALUMET-----""" 0.9844 0.00 0.00 0.00 0.00 0.00 3.11 1.91 0.0000 0.0000 0.0000 0.0000 0 0
+2685 0 """CAMDEN-2,5--""" 1.0033 0.00 0.00 0.00 0.00 0.00 9.41 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+2686 0 """CAMPUS-1----""" 1.0279 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+2687 0 """CAMPUS-2----""" 1.0216 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+2688 0 """CAPAC-------""" 0.9880 0.00 0.00 0.00 0.00 0.00 3.11 1.38 0.0000 0.0660 0.0000 0.0000 0 0
+2689 0 """CARLETON----""" 1.0054 0.00 0.00 0.00 0.00 0.00 1.76 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2690 0 """CARO-1------""" 1.0018 0.00 0.00 0.00 0.00 0.00 1.68 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2691 0 """CARO-T.E.C.-""" 0.9962 0.00 0.00 0.00 0.00 0.00 1.76 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+2692 0 """CARPENTER---""" 1.0007 0.00 0.00 0.00 0.00 0.00 8.15 3.29 0.0000 0.1140 0.0000 0.0000 0 0
+2693 0 """CARSONVILLE-""" 0.9885 0.00 0.00 0.00 0.00 0.00 0.67 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2694 0 """CARTER------""" 1.0069 0.00 0.00 0.00 0.00 0.00 15.04 7.54 0.0000 0.0000 0.0000 0.0000 0 0
+2695 0 """CASEVILLE---""" 0.9683 0.00 0.00 0.00 0.00 0.00 3.02 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+2696 0 """CASEY-------""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.18 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+2697 0 """CASS-CITY---""" 1.0011 0.00 0.00 0.00 0.00 0.00 5.04 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+2698 0 """CHERRY-HILL-""" 0.9566 0.00 0.00 0.00 0.00 0.00 0.92 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2699 0 """CHESTERFLD-1""" 1.0264 0.00 0.00 0.00 0.00 0.00 3.95 0.53 0.0000 0.0480 0.0000 0.0000 0 0
+2700 0 """CHESTERFLD-2""" 1.0088 0.00 0.00 0.00 0.00 0.00 8.48 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+2701 0 """CHESTNUT-40-""" 1.0150 0.00 0.00 0.00 0.00 0.00 75.20 29.50 0.0000 0.3600 0.0000 0.0000 0 0
+2702 0 """CHILSON-----""" 1.0175 0.00 0.00 0.00 0.00 0.00 1.51 0.85 0.0000 0.0660 0.0000 0.0000 0 0
+2703 0 """CLARKSTON-2-""" 1.0013 0.00 0.00 0.00 0.00 0.00 4.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+2704 0 """CLIFFORD----""" 0.9881 0.00 0.00 0.00 0.00 0.00 1.34 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+2705 0 """COATS-------""" 1.0093 0.00 0.00 0.00 0.00 0.00 3.36 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2706 0 """CODY-40-----""" 1.0456 0.00 0.00 0.00 0.00 0.00 19.99 6.27 0.0000 0.1800 0.0000 0.0000 0 0
+2707 0 """COLFAX---EQ1""" 1.0885 0.00 14.00 40.00 0.00 0.00 4.87 2.55 0.0000 0.0480 0.0000 0.0000 0 0
+2708 0 """COLLIER----1""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+2709 0 """CLOTH-PR.-1-""" 1.0059 0.00 0.00 0.00 0.00 0.00 3.00 -0.37 0.0000 0.0000 0.0000 0.0000 0 0
+2710 0 """COLUMBIAVILE""" 0.9871 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2711 0 """COMMERCE-LK-""" 0.9872 0.00 0.00 0.00 0.00 0.00 6.05 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+2712 0 """CORTLAND-24-""" 1.0112 0.00 0.00 0.00 0.00 0.00 204.10 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+2713 0 """CROSWELL-EQ1""" 0.9883 0.00 0.00 0.00 0.00 0.00 5.96 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+2714 0 """CROWN-1-----""" 1.0243 0.00 0.00 0.00 0.00 0.00 10.16 0.32 0.0000 0.0900 0.0000 0.0000 0 0
+2715 0 """CROWN-2-----""" 0.9891 0.00 0.00 0.00 0.00 0.00 4.54 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+2716 0 """CULVER------""" 0.9954 0.00 0.00 0.00 0.00 0.00 8.57 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+2717 0 """CUSTER-24---""" 1.0216 0.00 14.00 40.00 0.00 0.00 61.40 33.15 0.0000 0.0000 0.0000 0.0000 0 0
+2718 0 """DADE-1------""" 1.0165 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+2719 0 """DADE-2------""" 1.0158 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+2720 0 """DARWIN-1----""" 1.0440 0.00 0.00 0.00 0.00 0.00 4.87 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+2721 0 """DARWIN-2----""" 1.0408 0.00 0.00 0.00 0.00 0.00 4.79 1.27 0.0000 0.0480 0.0000 0.0000 0 0
+2722 0 """DAVIS---EQ1-""" 0.9767 0.00 0.00 0.00 0.00 0.00 20.30 10.25 0.0000 0.0900 0.0000 0.0000 0 0
+2723 0 """DAYTON-40---""" 1.0256 0.00 5.00 10.00 0.00 0.00 5.71 2.97 0.0000 0.0660 0.0000 0.0000 0 0
+2724 0 """DECKR-+-ASPN""" 0.9878 0.00 0.00 0.00 0.00 0.00 2.52 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2725 0 """DEWEY-2-----""" 0.9865 0.00 0.00 0.00 0.00 0.00 11.34 3.82 0.0000 0.0000 0.0000 0.0000 0 0
+2726 0 """DEXTER---EQ1""" 1.0348 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0480 0.0000 0.0000 0 0
+2727 0 """DILLARD-1---""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2728 0 """DOVER-1-----""" 1.0030 0.00 0.00 0.00 0.00 0.00 3.78 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+2729 0 """DOVER-2-----""" 0.9997 0.00 0.00 0.00 0.00 0.00 3.19 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+2730 0 """DREXEL-2----""" 0.9883 0.00 0.00 0.00 0.00 0.00 9.24 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2731 0 """DRYDEN------""" 0.9797 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+2732 0 """ECKLES-2----""" 0.9704 0.00 0.00 0.00 0.00 0.00 4.62 -0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2733 0 """EDGEWATER---""" 0.9989 0.00 0.00 0.00 0.00 0.00 1.30 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+2734 0 """ELKTON------""" 0.9804 0.00 0.00 0.00 0.00 0.00 3.36 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2735 0 """ELM-40------""" 1.0242 0.00 0.00 0.00 0.00 0.00 107.77 79.00 0.0000 0.2850 0.0000 0.0000 0 0
+2736 0 """EMERICK-1---""" 1.0099 0.00 0.00 0.00 0.00 0.00 8.82 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+2737 0 """EMMETT------""" 0.9925 0.00 0.00 0.00 0.00 0.00 1.01 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2738 0 """ENGLISH-----""" 1.0024 0.00 0.00 0.00 0.00 0.00 1.68 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2739 0 """ERIN40------""" 1.0115 0.00 0.00 0.00 0.00 0.00 103.40 41.50 0.0000 0.1800 0.0000 0.0000 0 0
+2740 0 """EVERGREEN-40""" 1.0364 0.00 0.00 0.00 0.00 0.00 213.20 82.90 0.0000 0.5100 0.0000 0.0000 0 0
+2741 0 """FAIRGROVE---""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.02 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2742 0 """FALCON-1----""" 1.0232 0.00 0.00 0.00 0.00 0.00 9.32 6.12 0.0000 0.0000 0.0000 0.0000 0 0
+2743 0 """FALCON-2----""" 1.0207 0.00 0.00 0.00 0.00 0.00 7.56 4.99 0.0000 0.0000 0.0000 0.0000 0 0
+2744 0 """FISHER------""" 1.0370 0.00 0.00 0.00 0.00 0.00 5.96 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+2745 0 """FLAT-ROCK-1-""" 1.0195 0.00 0.00 0.00 0.00 0.00 1.68 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+2746 0 """FLEMING-----""" 1.0067 0.00 0.00 0.00 0.00 0.00 4.54 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+2747 0 """FORESTER----""" 0.9770 0.00 0.00 0.00 0.00 0.00 0.76 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2748 0 """FRANK2---EQ1""" 0.9722 0.00 0.00 0.00 0.00 0.00 6.10 1.50 0.0000 0.0000 0.0000 0.0000 0 0
+2749 0 """FREEDOM-----""" 0.9954 0.00 0.00 0.00 0.00 0.00 1.10 0.12 0.0000 0.0000 0.0000 0.0000 0 0
+2750 0 """FRENCHLND-2-""" 1.0263 0.00 0.00 0.00 0.00 0.00 5.70 4.37 0.0000 0.1200 0.0000 0.0000 0 0
+2751 0 """FRISBIE-24--""" 1.0881 0.00 0.00 0.00 0.00 0.00 222.68 75.01 0.0000 0.0000 0.0000 0.0000 0 0
+2752 0 """FULLER-1----""" 1.0203 0.00 0.00 0.00 0.00 0.00 2.52 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+2753 0 """FULLER-2----""" 1.0257 0.00 0.00 0.00 0.00 0.00 2.44 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+2754 0 """GAGETOWN----""" 1.0203 0.00 0.00 0.00 0.00 0.00 1.18 0.42 0.0000 0.0480 0.0000 0.0000 0 0
+2755 0 """1GARNER-CP--""" 1.0195 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2756 0 """GENOA-40----""" 1.0191 0.00 0.00 0.00 0.00 0.00 12.94 6.37 0.0000 0.1800 0.0000 0.0000 0 0
+2757 0 """GLOBE-------""" 0.9892 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2758 0 """GOODISON----""" 0.9861 0.00 0.00 0.00 0.00 0.00 7.56 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+2759 0 """GRAF--------""" 0.9961 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+2760 0 """HAMBURG-----""" 1.0440 0.00 0.00 0.00 0.00 0.00 2.44 0.64 0.0000 0.0660 0.0000 0.0000 0 0
+2761 0 """HANCOCK-40--""" 1.0036 0.00 100.81 190.00 0.00 0.00 29.57 15.62 0.0000 0.0000 0.0000 0.0000 0 0
+2762 0 """HANNAN-1---1""" 1.0048 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+2763 0 """HARTLAND----""" 0.9948 0.00 0.00 0.00 0.00 0.00 2.18 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2764 0 """HEMLOCK-1---""" 1.0293 0.00 0.00 0.00 0.00 0.00 6.00 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+2765 0 """HEMLOCK-2---""" 1.0364 0.00 0.00 0.00 0.00 0.00 6.97 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+2766 2 """HINES-40----""" 0.9900 0.00 0.00 120.00 0.00 18.00 115.58 95.12 0.0000 0.3600 0.0000 0.0000 0 0
+2767 0 """HOBART-TAP--""" 1.0363 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2768 0 """HOBART------""" 1.0414 0.00 0.00 0.00 0.00 0.00 4.03 1.59 0.0000 0.0900 0.0000 0.0000 0 0
+2769 0 """HOWELL-2----""" 1.0160 0.00 0.00 0.00 0.00 0.00 3.95 1.81 0.0000 0.0660 0.0000 0.0000 0 0
+2770 0 """HUNTERS-CR40""" 1.0031 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2771 0 """IDA---------""" 1.0107 0.00 0.00 0.00 0.00 0.00 1.90 -0.12 0.0000 0.0000 0.0000 0.0000 0 0
+2772 0 """IMLAY-CITY--""" 0.9775 0.00 0.00 0.00 0.00 0.00 4.70 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+2773 0 """INLAND---EQ1""" 1.0137 0.00 0.00 0.00 0.00 0.00 5.80 3.51 0.0000 0.0000 0.0000 0.0000 0 0
+2774 0 """IRA---------""" 1.0238 0.00 0.00 0.00 0.00 0.00 2.10 0.85 0.0000 0.0480 0.0000 0.0000 0 0
+2775 0 """IRONTON-24--""" 1.0193 0.00 0.00 0.00 0.00 0.00 177.80 67.00 0.0000 0.0000 0.0000 0.0000 0 0
+2776 0 """IRVING------""" 0.9945 0.00 0.00 0.00 0.00 0.00 5.88 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2777 0 """JACKSON-RD.2""" 1.0346 0.00 0.00 0.00 0.00 0.00 1.01 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2778 0 """JASPER------""" 1.0041 0.00 0.00 0.00 0.00 0.00 0.34 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2779 0 """JORDAN-1----""" 0.9922 0.00 0.00 0.00 0.00 0.00 1.85 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+2780 0 """JOPLIN------""" 0.9903 0.00 0.00 0.00 0.00 0.00 0.76 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2781 0 """KEEGO-2-----""" 0.9789 0.00 0.00 0.00 0.00 0.00 1.10 0.37 0.0000 0.0000 0.0000 0.0000 0 0
+2782 0 """KELLOGG-----""" 0.9988 0.00 0.00 0.00 0.00 0.00 3.78 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2783 0 """1KENNETT-CP-""" 1.0198 0.00 0.00 0.00 0.00 0.00 17.90 8.37 0.0000 0.0000 0.0000 0.0000 0 0
+2784 0 """KIMBALL-----""" 1.0128 0.00 0.00 0.00 0.00 0.00 3.36 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+2785 0 """KINDE-------""" 0.9840 0.00 0.00 0.00 0.00 0.00 1.01 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2786 0 """KING-SEELEY-""" 1.0463 0.00 0.00 0.00 0.00 0.00 2.69 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2787 0 """LAKEPORT----""" 1.0008 0.00 0.00 0.00 0.00 0.00 1.85 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2788 0 """LAKEVILLE---""" 0.9976 0.00 0.00 0.00 0.00 0.00 1.09 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+2789 0 """LAPEER------""" 0.9933 0.00 0.00 0.00 0.00 0.00 3.78 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+2790 0 """LARK-40-----""" 1.0476 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2791 0 """LEE-40------""" 1.0183 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+2792 0 """LIMA--------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.18 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2793 0 """LINCOLN-24--""" 0.9866 0.00 0.00 0.00 0.00 0.00 148.43 124.57 0.0000 0.5700 0.0000 0.0000 0 0
+2794 0 """LUZON-40----""" 1.0040 0.00 0.00 0.00 0.00 0.00 21.67 12.01 0.0000 0.0900 0.0000 0.0000 0 0
+2795 0 """MACOMB-40---""" 1.0194 0.00 0.00 0.00 0.00 0.00 132.00 96.50 0.0000 0.3600 0.0000 0.0000 0 0
+2796 0 """MARINE-CITY-""" 1.0387 0.00 0.00 0.00 0.00 0.00 5.21 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+2797 0 """MARLETTE----""" 0.9794 0.00 0.00 0.00 0.00 0.00 5.29 1.70 0.0000 0.0480 0.0000 0.0000 0 0
+2798 0 """MAYBEE------""" 1.0091 0.00 0.00 0.00 0.00 0.00 1.26 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+2799 0 """MAYVILLE----""" 1.0032 0.00 0.00 0.00 0.00 0.00 2.02 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2800 0 """MEADOW---EQ1""" 0.9943 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+2801 0 """MEDINA-40---""" 1.0197 0.00 0.00 0.00 0.00 0.00 45.80 21.50 0.0000 0.1800 0.0000 0.0000 0 0
+2802 0 """MELVIN------""" 0.9800 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2803 0 """METAMORA----""" 0.9954 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+2804 0 """MILFORD-----""" 1.0033 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+2805 0 """MILLINGTON--""" 0.9808 0.00 0.00 0.00 0.00 0.00 2.35 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2806 0 """MOHAWK-2----""" 0.9967 0.00 0.00 0.00 0.00 0.00 2.10 0.25 0.0000 0.0000 0.0000 0.0000 0 0
+2807 0 """MONARCH-----""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.30 1.50 0.0000 0.0960 0.0000 0.0000 0 0
+2808 0 """1MONTCALM-CP""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2809 0 """MOTT-2------""" 1.0159 0.00 0.00 0.00 0.00 0.00 7.39 3.82 0.0000 0.0900 0.0000 0.0000 0 0
+2810 0 """NATIONAL-1--""" 0.9928 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+2811 0 """NATIONAL-2--""" 0.9997 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+2812 0 """NAVARRE-24--""" 1.0384 0.00 0.00 0.00 0.00 0.00 190.43 107.21 0.0000 0.8700 0.0000 0.0000 0 0
+2813 0 """NEFF--------""" 1.0012 0.00 0.00 0.00 0.00 0.00 5.71 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+2814 0 """NELSON-MILS1""" 1.0263 0.00 0.00 0.00 0.00 0.00 2.94 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2815 0 """NELSON-MILS2""" 1.0270 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+2816 0 """NEW-BALTMR-1""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.10 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2817 0 """NEW-BALTMR23""" 1.0237 0.00 0.00 0.00 0.00 0.00 4.28 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+2818 0 """NEW-BOSTON--""" 1.0111 0.00 0.00 0.00 0.00 0.00 1.93 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2819 0 """NEWBURGH-40-""" 0.9673 0.00 0.00 0.00 0.00 0.00 147.42 102.95 0.0000 0.3000 0.0000 0.0000 0 0
+2820 0 """NEW-HAVEN-1-""" 1.0179 0.00 0.00 0.00 0.00 0.00 3.44 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+2821 0 """NEW-HAVEN-2-""" 1.0220 0.00 0.00 0.00 0.00 0.00 2.69 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+2822 0 """NIXON-2-----""" 0.9768 0.00 0.00 0.00 0.00 0.00 11.09 5.52 0.0000 0.0000 0.0000 0.0000 0 0
+2823 0 """NOBLE-------""" 0.9863 0.00 0.00 0.00 0.00 0.00 16.97 9.14 0.0000 0.0000 0.0000 0.0000 0 0
+2824 0 """NORTH-BRANCH""" 0.9717 0.00 0.00 0.00 0.00 0.00 4.45 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+2825 2 """NORTHEAST-24""" 1.0104 0.00 80.00 0.00 0.00 48.00 230.24 141.20 0.0000 0.4800 0.0000 0.0000 0 0
+2826 0 """NORTH-SRVCTR""" 1.0050 0.00 0.00 0.00 0.00 0.00 5.80 4.36 0.0000 0.0000 0.0000 0.0000 0 0
+2827 2 """NORTHWEST-40""" 1.0044 0.00 0.00 0.00 0.00 18.00 209.70 76.40 0.0000 0.5480 0.0000 0.0000 0 0
+2828 0 """NORWAY-1----""" 0.9516 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+2829 0 """NORWAY-2-EQ1""" 0.9477 0.00 0.00 0.00 0.00 0.00 5.96 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+2830 0 """OAK-BEACH---""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.84 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2831 0 """OLIVER------""" 0.9870 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2832 0 """OLYMPA-FUT75""" 0.9825 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2833 0 """OMAHA-1--EQ1""" 0.9473 0.00 0.00 0.00 0.00 0.00 10.08 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+2834 0 """OMAHA-2--EQ1""" 0.9465 0.00 0.00 0.00 0.00 0.00 9.58 3.61 0.0000 0.0000 0.0000 0.0000 0 0
+2835 0 """OPAL--------""" 1.0050 0.00 0.00 0.00 0.00 0.00 0.92 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+2836 0 """OREGON-1----""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.38 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+2837 0 """ORION-------""" 0.9925 0.00 0.00 0.00 0.00 0.00 5.46 2.02 0.0000 0.0660 0.0000 0.0000 0 0
+2838 0 """OTTER-LAKE--""" 0.9836 0.00 0.00 0.00 0.00 0.00 1.01 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+2839 0 """OWENDALE----""" 1.0049 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2840 0 """OXFORD------""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.89 3.72 0.0000 0.1200 0.0000 0.0000 0 0
+2841 0 """1PADDOCK-CP-""" 1.0220 0.00 0.00 0.00 0.00 0.00 4.30 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+2842 0 """PAGE--------""" 0.9930 0.00 0.00 0.00 0.00 0.00 9.58 5.63 0.0000 0.0660 0.0000 0.0000 0 0
+2843 0 """PALMER-1----""" 0.9643 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+2844 0 """PARKER-ROAD-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.64 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+2845 0 """PAUL-1------""" 1.0114 0.00 0.00 0.00 0.00 0.00 8.15 4.89 0.0000 0.0480 0.0000 0.0000 0 0
+2846 0 """PAUL-2,3----""" 1.0157 0.00 0.00 0.00 0.00 0.00 4.70 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+2847 0 """PHOENIX-40--""" 1.0379 0.00 0.00 0.00 0.00 0.00 36.71 20.82 0.0000 0.0000 0.0000 0.0000 0 0
+2848 0 """PIEDMONT----""" 1.0235 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2849 0 """PIGEON------""" 0.9818 0.00 0.00 0.00 0.00 0.00 3.78 4.78 0.0000 0.0480 0.0000 0.0000 0 0
+2850 0 """PINCKNEY----""" 1.0442 0.00 0.00 0.00 0.00 0.00 3.86 1.70 0.0000 0.0900 0.0000 0.0000 0 0
+2851 0 """PIONEER---40""" 1.0270 0.00 0.00 0.00 0.00 0.00 19.10 10.12 0.0000 0.0000 0.0000 0.0000 0 0
+2852 0 """PIPER---EQ1-""" 1.0008 0.00 0.00 0.00 0.00 0.00 5.12 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+2853 0 """PITSFLD--EQ1""" 1.0164 0.00 0.00 0.00 0.00 0.00 9.66 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+2854 0 """PLACID------""" 1.0026 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2855 0 """PLYMOUTH----""" 0.9523 0.00 0.00 0.00 0.00 0.00 12.10 7.44 0.0000 0.1560 0.0000 0.0000 0 0
+2856 0 """PORT-AUSTIN-""" 0.9754 0.00 0.00 0.00 0.00 0.00 3.02 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2857 0 """PORT-HOPE---""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2858 0 """PORT-SANILAC""" 0.9808 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2859 0 """PRICE-1-----""" 1.0353 0.00 0.00 0.00 0.00 0.00 4.37 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+2860 0 """PROCTOR-----""" 0.9955 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2861 0 """PUTNAM------""" 1.0098 0.00 14.00 40.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2862 0 """QUEEN-------""" 1.0065 0.00 0.00 0.00 0.00 0.00 3.53 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+2863 0 """QUINCY------""" 1.0030 0.00 0.00 0.00 0.00 0.00 1.34 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2864 0 """RANDOLPH----""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2865 0 """RAVINE---EQ1""" 0.9764 0.00 0.00 0.00 0.00 0.00 8.90 3.62 0.0000 0.0000 0.0000 0.0000 0 0
+2866 0 """RED-RUN-40--""" 1.0203 0.00 0.00 0.00 0.00 0.00 140.87 71.29 0.0000 0.5400 0.0000 0.0000 0 0
+2867 0 """REESE---EQ2-""" 0.9799 0.00 0.00 0.00 0.00 0.00 5.96 2.23 0.0000 0.0480 0.0000 0.0000 0 0
+2868 0 """REMER-40----""" 1.0461 0.00 0.00 0.00 0.00 0.00 1.34 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2869 0 """RENO--------""" 0.9937 0.00 0.00 0.00 0.00 0.00 4.80 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+2870 0 """RICHMOND----""" 1.0130 0.00 0.00 0.00 0.00 0.00 5.63 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+2871 0 """RIFLE-------""" 0.9886 0.00 0.00 0.00 0.00 0.00 6.13 2.97 0.0000 0.0480 0.0000 0.0000 0 0
+2872 0 """RIVER-RAISIN""" 1.0072 0.00 0.00 0.00 0.00 0.00 0.92 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2873 2 """RIVERVIEW-40""" 1.0021 0.00 25.00 -100.00 -10.00 20.00 145.57 79.69 0.0000 0.3600 0.0000 0.0000 0 0
+2874 0 """ROCHESTER-1-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.55 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+2875 0 """ROCKWOOD----""" 1.0345 0.00 0.00 0.00 0.00 0.00 5.80 1.59 0.0000 0.0340 0.0000 0.0000 0 0
+2876 0 """ROMEO---EQ1-""" 1.0133 0.00 0.00 0.00 0.00 0.00 6.13 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+2877 0 """ROMULUS---40""" 1.0151 0.00 0.00 0.00 0.00 0.00 20.66 13.07 0.0000 0.1680 0.0000 0.0000 0 0
+2878 0 """RUSH-TAP----""" 0.9835 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2879 0 """RUSH-40-----""" 1.0014 0.00 0.00 0.00 0.00 0.00 3.70 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+2880 0 """SALEM-------""" 1.0417 0.00 0.00 0.00 0.00 0.00 1.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2881 0 """SALINE------""" 1.0017 0.00 0.00 0.00 0.00 0.00 9.10 4.87 0.0000 0.0960 0.0000 0.0000 0 0
+2882 0 """SANDUSKY-40-""" 1.0042 0.00 0.00 0.00 0.00 0.00 5.29 1.91 0.0000 0.0660 0.0000 0.0000 0 0
+2883 0 """SAXON-------""" 0.9916 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2884 0 """SEBEWAING---""" 1.0083 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+2885 0 """SELFRIDGE-1-""" 1.0074 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+2886 0 """SELKIRK-----""" 1.0092 0.00 0.00 0.00 0.00 0.00 6.05 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+2887 0 """SHAW--------""" 0.9720 0.00 0.00 0.00 0.00 0.00 1.60 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2888 0 """SHELDON-1---""" 0.9578 0.00 0.00 0.00 0.00 0.00 5.29 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+2889 0 """SHERWOOD----""" 1.0148 0.00 0.00 0.00 0.00 0.00 1.93 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2890 0 """SNOVER------""" 0.9929 0.00 0.00 0.00 0.00 0.00 1.60 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2891 0 """SOUTHFLD-40-""" 1.0066 0.00 0.00 0.00 0.00 0.00 99.54 81.89 0.0000 0.0900 0.0000 0.0000 0 0
+2892 0 """STATE-1-----""" 1.0247 0.00 0.00 0.00 0.00 0.00 5.60 3.25 0.0000 0.0000 0.0000 0.0000 0 0
+2893 0 """SPOKANE-40--""" 1.0014 0.00 0.00 0.00 0.00 0.00 36.54 16.57 0.0000 0.0000 0.0000 0.0000 0 0
+2894 0 """ST-CLAIR-1--""" 1.0259 0.00 0.00 0.00 0.00 0.00 2.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2895 0 """ST-CLAIR-2--""" 1.0352 0.00 0.00 0.00 0.00 0.00 2.69 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2896 0 """STEPHENS-24-""" 1.0074 0.00 0.00 0.00 0.00 0.00 164.30 105.69 0.0000 0.5700 0.0000 0.0000 0 0
+2897 0 """STERLING-40-""" 1.0210 0.00 0.00 0.00 0.00 0.00 101.14 45.79 0.0000 0.5400 0.0000 0.0000 0 0
+2898 0 """STOCKBRIDGE-""" 1.0701 0.00 0.00 0.00 0.00 0.00 1.09 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2899 0 """1STOCKWELLCP""" 1.0172 0.00 0.00 0.00 0.00 0.00 10.90 6.75 0.0000 0.0000 0.0000 0.0000 0 0
+2900 0 """SUNSET-40---""" 1.0041 0.00 0.00 0.00 0.00 0.00 78.79 59.01 0.0000 0.5160 0.0000 0.0000 0 0
+2901 2 """SUPERIOR-40-""" 1.0189 0.00 0.00 0.00 0.00 118.00 61.49 48.74 0.0000 0.1800 0.0000 0.0000 0 0
+2902 0 """TIENKEN-2---""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2903 0 """TALBOT---EQ1""" 0.9854 0.00 0.00 0.00 0.00 0.00 2.35 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+2904 0 """1TAYLOR-1-13""" 1.0121 0.00 0.00 0.00 0.00 0.00 10.67 6.27 0.0000 0.0000 0.0000 0.0000 0 0
+2905 0 """1TAYLOR-2-13""" 1.0154 0.00 0.00 0.00 0.00 0.00 8.65 6.48 0.0000 0.0000 0.0000 0.0000 0 0
+2906 0 """TEGGERDINE--""" 0.9815 0.00 0.00 0.00 0.00 0.00 11.34 4.67 0.0000 0.0000 0.0000 0.0000 0 0
+2907 0 """TEMPLE------""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.59 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2908 0 """TEXAS-------""" 1.0281 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2909 0 """TODD--------""" 1.0426 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+2910 0 """TRINITY-2---""" 1.0107 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+2911 0 """TROY-40-----""" 0.9963 0.00 0.00 0.00 0.00 0.00 178.92 77.64 0.0000 0.5400 0.0000 0.0000 0 0
+2912 0 """TUSCOLA-40--""" 1.0020 0.00 0.00 0.00 0.00 0.00 6.22 2.55 0.0000 0.0660 0.0000 0.0000 0 0
+2913 0 """UNION-LAKE--""" 0.9771 0.00 0.00 0.00 0.00 0.00 11.84 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+2914 0 """UNIONVILLE--""" 1.0120 0.00 0.00 0.00 0.00 0.00 1.26 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+2915 0 """UNIVR-BUS1T6""" 1.0250 0.00 0.00 0.00 0.00 0.00 11.17 8.71 0.0000 0.0000 0.0000 0.0000 0 0
+2916 0 """URBAN-TEC---""" 0.9887 0.00 0.00 0.00 0.00 0.00 5.12 3.19 0.0000 0.0000 0.0000 0.0000 0 0
+2917 0 """UTAH--------""" 1.0415 0.00 0.00 0.00 0.00 0.00 0.76 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+2918 0 """VANBUREN-EQ1""" 1.0128 0.00 0.00 0.00 0.00 0.00 1.51 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+2919 0 """VASSAR-BIRCH""" 0.9744 0.00 0.00 0.00 0.00 0.00 10.00 5.74 0.0000 0.0660 0.0000 0.0000 0 0
+2920 0 """VICTOR-40---""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2921 0 """VALLEY------""" 1.0268 0.00 6.00 20.00 0.00 0.00 0.90 0.62 0.0000 0.0000 0.0000 0.0000 0 0
+2922 0 """WABASH-40---""" 1.0066 0.00 0.00 0.00 0.00 0.00 46.70 26.25 0.0000 0.0000 0.0000 0.0000 0 0
+2923 0 """WALLED-LAKE-""" 0.9972 0.00 0.00 0.00 0.00 0.00 6.00 2.62 0.0000 0.0000 0.0000 0.0000 0 0
+2924 0 """WALNUT-1,2--""" 0.9814 0.00 0.00 0.00 0.00 0.00 9.60 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+2925 0 """WALTON40-SUB""" 1.0330 0.00 0.00 0.00 0.00 0.00 44.35 20.08 0.0000 0.1800 0.0000 0.0000 0 0
+2926 0 """WARDLOW-----""" 0.9956 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+2927 2 """WARREN-24---""" 1.0171 0.00 0.00 540.00 0.00 54.00 268.46 194.97 0.0000 0.9000 0.0000 0.0000 0 0
+2928 0 """WASHNGTN-EQ1""" 1.0002 0.00 0.00 0.00 0.00 0.00 8.57 4.36 0.0000 0.0660 0.0000 0.0000 0 0
+2929 0 """WATERFORD---""" 0.9903 0.00 0.00 0.00 0.00 0.00 17.81 5.52 0.0000 0.1800 0.0000 0.0000 0 0
+2930 0 """WEBERVLE-EQ1""" 1.0885 0.00 0.00 0.00 0.00 0.00 8.23 1.91 0.0000 0.1140 0.0000 0.0000 0 0
+2931 0 """WHITE-LAKE--""" 0.9941 0.00 0.00 0.00 0.00 0.00 4.70 1.59 0.0000 0.0000 0.0000 0.0000 0 0
+2932 0 """WHITMORE-LK-""" 1.0357 0.00 0.00 0.00 0.00 0.00 7.81 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+2933 0 """WHITNY-FUT73""" 1.0033 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2934 0 """WILEY-------""" 1.0197 0.00 0.00 0.00 0.00 0.00 1.26 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+2935 0 """WILMOTK-NGFD""" 0.9922 0.00 0.00 0.00 0.00 0.00 0.84 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+2936 0 """WILSON------""" 1.0128 0.00 0.00 0.00 0.00 0.00 2.60 -0.21 0.0000 0.0000 0.0000 0.0000 0 0
+2937 0 """1WILSON-CP--""" 1.0157 0.00 0.00 0.00 0.00 0.00 8.60 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+2938 0 """WOLFHILL----""" 0.9897 0.00 0.00 0.00 0.00 0.00 4.96 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+2939 0 """WOLVERINE-2-""" 1.0200 0.00 0.00 0.00 0.00 0.00 5.12 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+2940 0 """WORTH-------""" 1.0069 0.00 0.00 0.00 0.00 0.00 2.18 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+2941 0 """YALE-TAP----""" 0.9902 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2942 0 """YALE--------""" 0.9870 0.00 0.00 0.00 0.00 0.00 3.11 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+2943 0 """YATES-------""" 0.9871 0.00 0.00 0.00 0.00 0.00 1.34 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+2944 0 """YORK--------""" 0.9901 0.00 0.00 0.00 0.00 0.00 2.44 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+2945 0 """YOST-40-----""" 1.0354 0.00 0.00 0.00 0.00 0.00 48.55 26.29 0.0000 0.0480 0.0000 0.0000 0 0
+2946 0 """2ADAMS-----1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2947 0 """2ALFRED----1""" 1.0468 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+2948 0 """ALFRED-13---""" 1.0489 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+2949 0 """2AMHERST1.13""" 1.0230 0.00 0.00 0.00 0.00 0.00 7.56 4.72 0.0000 0.0000 0.0000 0.0000 0 0
+2950 0 """2AMHERST2.13""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2951 0 """2ARROWHEAD-1""" 1.0315 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2952 0 """2BAD-AXE---1""" 1.0460 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2953 0 """2BLOOMFLD--1""" 1.0065 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2954 0 """2BROWNTN---3""" 1.0081 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2955 0 """2BROWNTN---2""" 1.0314 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2956 2 """2BROWNTN-N-1""" 1.0263 0.00 0.00 -910.00 -91.00 338.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2957 0 """2BROWNTN-S-1""" 1.0117 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2958 0 """2BUNCE-CK--1""" 1.1567 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2959 0 """2B3N-DECO230""" 1.0877 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2960 0 """2-BURNS-1--1""" 1.0578 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2961 0 """2-BURNS-2--1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2962 0 """2CANIFF----3""" 1.0261 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2963 0 """2CANIFF----1""" 1.0433 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2964 0 """2CATALINA-CP""" 1.0064 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2965 0 """2CATO------1""" 1.0403 0.00 0.00 0.00 0.00 0.00 57.14 27.68 0.0000 0.0000 0.0000 0.0000 0 0
+2966 0 """2CHESTNUT--1""" 1.0164 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2967 0 """2CODY------1""" 0.9887 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2968 2 """2CONNER-G.24""" 1.0404 0.00 285.00 1770.00 0.00 1770.00 436.28 182.01 0.0000 0.0000 0.0000 0.0000 0 0
+2969 0 """2COOPER----1""" 1.0059 0.00 0.00 0.00 0.00 0.00 1.34 2.31 0.0000 0.0000 0.0000 0.0000 0 0
+2970 0 """2CORTLAND--1""" 1.0392 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2971 0 """2COVENTRY--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2972 0 """2COVENTRY--1""" 0.9810 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2973 0 """2CRESTWOOD-1""" 1.0120 0.00 0.00 0.00 0.00 0.00 3.56 1.78 0.0000 0.0000 0.0000 0.0000 0 0
+2974 0 """2CUSTER----1""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2975 0 """2C-3DECO-138""" 0.9752 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2976 0 """2DAYTON----1""" 0.9863 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2977 2 """2DELRAY-16-1""" 1.0200 0.00 72.00 350.00 0.00 54.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2978 2 """2DELRAY-G.24""" 1.0483 0.00 236.00 2320.00 0.00 2320.00 290.94 159.76 0.0000 0.0000 0.0000 0.0000 0 0
+2979 0 """2ELM-------1""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2980 0 """2E.FERMI---1""" 0.9983 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2981 0 """2ERIN------1""" 1.0331 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2982 0 """2E-N-S-TAP11""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2983 0 """2E-N-S-TAP21""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2984 2 """2ESSEX-----1""" 1.0543 0.00 274.00 0.00 0.00 140.00 0.00 0.00 0.0000 1.0800 0.0000 0.0000 0 0
+2985 0 """2EVERGREEN-1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2986 0 """2FLEETWD-1-1""" 1.0428 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2987 0 """2FLEETWD-2-1""" 1.0456 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2988 0 """2FLEETWD--13""" 1.0161 0.00 0.00 0.00 0.00 0.00 12.02 5.78 0.0000 0.0000 0.0000 0.0000 0 0
+2989 0 """2FOMOCO-C1-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+2990 0 """2FOMOCO-C2-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+2991 0 """2FRISBIE---1""" 1.0414 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2992 0 """2GENOA-----1""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2993 0 """2HANCOCK---1""" 1.0042 0.00 82.00 210.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2994 2 """2HARB.BEA.-1""" 1.0597 0.00 114.00 -300.00 -30.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2995 0 """2HINES-----1""" 0.9897 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2996 0 """2HUNTER-CK.1""" 1.0432 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2997 0 """2IRONTON---1""" 1.0310 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2998 0 """2IRN-NA-RV-1""" 1.0272 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+2999 0 """2IMLAY-1PUP1""" 1.0685 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3000 0 """2JEFFERSON-1""" 1.0257 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3001 0 """2KTT-DECO138""" 1.0748 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3002 0 """2LK.HURON1P1""" 1.1530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3003 0 """2LK.HURON2P1""" 1.1335 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3004 0 """2LAPEER----1""" 1.0390 0.00 0.00 0.00 0.00 0.00 7.83 2.85 0.0000 0.0000 0.0000 0.0000 0 0
+3005 0 """2LARK------1""" 0.9720 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3006 0 """2LEE-------1""" 1.1215 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3007 0 """2LINCOLN---1""" 1.0100 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3008 0 """2LN-NE-NW--1""" 1.0129 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3009 0 """2LOGAN-1---1""" 1.0326 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3010 0 """2LOGAN-1-.13""" 1.0161 0.00 0.00 0.00 0.00 0.00 8.54 2.49 0.0000 0.0000 0.0000 0.0000 0 0
+3011 0 """2LOGAN-2---1""" 1.0362 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3012 0 """2LOGAN-2-.13""" 1.0153 0.00 0.00 0.00 0.00 0.00 8.46 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+3013 0 """2LONG-LK-1-1""" 1.0035 0.00 0.00 0.00 0.00 0.00 7.12 1.69 0.0000 0.0000 0.0000 0.0000 0 0
+3014 0 """2LONG-LK-2-1""" 1.0046 0.00 0.00 0.00 0.00 0.00 6.68 1.25 0.0000 0.0000 0.0000 0.0000 0 0
+3015 0 """2LUZON-----1""" 0.9694 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3016 0 """2LUZON-W.40D""" 0.9908 0.00 0.00 0.00 0.00 0.00 16.02 7.83 0.0000 0.0000 0.0000 0.0000 0 0
+3017 0 """2MACOMB----1""" 1.0576 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3018 2 """2MARYSVILLE1""" 1.1521 0.00 84.00 0.00 0.00 60.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3019 0 """2MAXWELL-1-1""" 1.0236 0.00 0.00 0.00 0.00 0.00 18.16 11.21 0.0000 0.0000 0.0000 0.0000 0 0
+3020 0 """2MAXWELL-2-1""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3021 0 """2MCLOUTH-1-1""" 1.0222 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+3022 0 """2MCLOUTH-2-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+3023 2 """2MCLOUTH-.24""" 1.0350 0.00 0.00 670.00 -30.00 100.00 108.22 48.42 0.0000 0.0000 0.0000 0.0000 0 0
+3024 0 """2MEDINA----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3025 0 """2MIDTOWN---1""" 1.0409 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3026 2 """2MONRO-1,2-3""" 1.0100 0.00 1290.95 -880.00 -182.00 803.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3027 2 """2MONRO-3,4-3""" 1.0105 0.00 470.00 -910.00 -91.00 528.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3028 0 """2MTCALM-CP-1""" 1.0065 0.00 0.00 0.00 0.00 0.00 78.59 31.06 0.0000 0.0000 0.0000 0.0000 0 0
+3029 0 """2NAVARRE---2""" 1.0244 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3030 0 """2NAVARRE---1""" 1.0256 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3031 0 """2NEWBURGH--1""" 0.9920 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3032 0 """2NOBLE-----1""" 0.9773 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3033 0 """2NORTHEAST-1""" 1.0287 0.00 54.00 140.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3034 0 """2N.E.STUB--1""" 1.0437 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3035 2 """2N.E.FLIK.24""" 1.0200 0.00 0.00 40.00 0.00 30.00 43.16 15.22 0.0000 0.0000 0.0000 0.0000 0 0
+3036 0 """2NORTHWEST-1""" 0.9962 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3037 0 """2PHOENIX---1""" 0.9654 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3038 0 """2PIONEER-TP1""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3039 0 """2PIONEER---1""" 0.9633 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3040 0 """2PLACID----1""" 0.9882 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3041 0 """2PONTIAC---3""" 1.0328 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3042 0 """2PONTIAC---1""" 1.0213 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3043 0 """2RED-RUN---1""" 1.0352 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+3044 0 """2REMER-----1""" 1.1466 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3045 0 """2R.R.EQZR.-1""" 1.0352 0.00 0.00 0.00 0.00 0.00 60.52 37.47 0.0000 0.0000 0.0000 0.0000 0 0
+3046 2 """2R.ROUGE-1-1""" 1.0354 0.00 272.00 1880.00 0.00 188.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3047 2 """2R.ROUGE-2-1""" 1.0442 0.00 257.00 1980.00 0.00 198.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3048 2 """2R.ROUGE-3-1""" 1.0447 0.00 300.00 0.00 0.00 209.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3049 0 """2RIVERVU---1""" 1.0241 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3050 0 """2ROMULUS---1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3051 0 """2RUSH------1""" 1.0284 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3052 0 """2SANDUSKY--1""" 1.0989 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3053 0 """2SLOCUM----1""" 1.0153 0.00 14.00 40.00 0.00 0.00 57.49 27.86 0.0000 0.0000 0.0000 0.0000 0 0
+3054 0 """2SOUTHFLD--1""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3055 0 """2SPOKANE---1""" 1.0200 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3056 2 """2ST-CLAIR--3""" 1.0433 0.00 498.00 0.00 0.00 215.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3057 2 """2ST-CL.1-3-1""" 1.1866 0.00 501.00 3220.00 0.00 322.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3058 2 """2ST-CL.4,5-1""" 1.1467 0.00 463.00 0.00 0.00 315.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3059 2 """2ST-CL.6---1""" 1.1194 0.00 322.00 0.00 0.00 190.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3060 0 """2STC-SP-STL1""" 1.0639 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3061 0 """2STEPHENS--3""" 1.0262 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3062 0 """2STEPHENS--1""" 1.0420 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3063 0 """2STERLING--1""" 1.0393 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3064 0 """2SUNSET----1""" 0.9976 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3065 0 """2SUPERIOR--1""" 0.9791 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3066 0 """2TAYLOR-1--1""" 1.0054 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3067 0 """2TAYLOR--2-1""" 1.0247 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3068 0 """2TEMPEST--CP""" 1.0062 0.00 0.00 0.00 0.00 0.00 11.84 3.92 0.0000 0.0000 0.0000 0.0000 0 0
+3069 2 """2TRENTN-NA-1""" 1.0300 0.00 278.00 2220.00 0.00 225.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3070 2 """2TRENTN-SU-1""" 1.0300 0.00 593.00 1450.00 0.00 303.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3071 0 """2TROY------1""" 1.0029 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3072 0 """2TUSCOLA---1""" 1.0236 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3073 0 """2VICTOR----1""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3074 0 """2WABASH-TAP1""" 1.1463 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3075 0 """2WABASH----1""" 1.1431 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3076 0 """2WALTON----1""" 1.0096 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3077 0 """2WARREN----1""" 1.0148 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3078 0 """2WARREN-7--1""" 1.0400 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3079 0 """2WATERMAN--2""" 1.0227 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3080 0 """2WATERMAN--1""" 1.0418 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3081 0 """2WAT.EQZR.24""" 1.0311 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3082 0 """2WAYNE-----3""" 1.0091 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3083 0 """2WAYNE-----1""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3084 0 """2WHEELER---1""" 1.0040 0.00 0.00 0.00 0.00 0.00 24.21 15.04 0.0000 0.0000 0.0000 0.0000 0 0
+3085 0 """2WILLOW-1T-1""" 0.9847 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3086 0 """2WILLOW-2T-1""" 0.9880 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3087 0 """2WILLO-RUN-1""" 0.9811 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3088 0 """2WILLOW--.13""" 0.9992 0.00 0.00 0.00 0.00 0.00 41.83 23.67 0.0000 0.0000 0.0000 0.0000 0 0
+3089 0 """2WIXOM-----3""" 1.0194 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3090 0 """2WIXOM-----1""" 1.0035 0.00 0.00 0.00 0.00 0.00 10.86 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+3091 0 """2WOODHVN-1-1""" 1.0278 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3092 0 """2WOODHVN1.13""" 1.0229 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+3093 0 """2WDHVN-TP2-1""" 1.0248 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3094 0 """2WOODHVN-2-1""" 1.0240 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3095 0 """2WOODHVN2.13""" 1.0124 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+3096 0 """2YOST------1""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+3097 0 """3ALBA-TIE--1""" 1.1233 0.00 0.00 0.00 0.00 0.00 2.50 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+3098 0 """3ALCONA-D--1""" 1.1170 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3099 0 """3ALGOMA----1""" 1.0365 0.00 0.00 0.00 0.00 0.00 14.00 -1.10 0.0000 0.0000 0.0000 0.0000 0 0
+3100 0 """3ALMA------1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.40 2.10 0.0000 0.1000 0.0000 0.0000 0 0
+3101 0 """3ALMEDA----1""" 1.0459 0.00 0.00 0.00 0.00 0.00 14.10 4.30 0.0000 0.0215 0.0000 0.0000 0 0
+3102 0 """3ALPENA----1""" 1.1632 0.00 0.00 0.00 0.00 0.00 33.10 5.20 0.0000 0.2880 0.0000 0.0000 0 0
+3103 0 """3AMBER-----1""" 1.0260 0.00 0.00 0.00 0.00 0.00 19.00 15.60 0.0000 0.0000 0.0000 0.0000 0 0
+3104 0 """3ARGENTA---3""" 1.0555 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3105 0 """3ARGENTA---1""" 1.0537 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3106 0 """3A-1CPCO-120""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3107 0 """3BANGOR----1""" 1.0383 0.00 0.00 0.00 0.00 0.00 8.60 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3108 0 """3BARD-RD---1""" 1.0831 0.00 0.00 0.00 0.00 0.00 6.30 1.20 0.0000 0.0000 0.0000 0.0000 0 0
+3109 0 """3BARRY-----1""" 1.0416 0.00 0.00 0.00 0.00 0.00 27.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+3110 0 """3BASS-CRK--1""" 1.0389 0.00 0.00 0.00 0.00 0.00 17.80 3.20 0.0000 0.0000 0.0000 0.0000 0 0
+3111 0 """3BATAVIA---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 23.20 0.10 0.0000 0.0800 0.0000 0.0000 0 0
+3112 0 """3BEALS-RD.-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 146.80 48.60 0.0000 0.1500 0.0000 0.0000 0 0
+3113 0 """3BEECHER---1""" 1.0185 0.00 0.00 0.00 0.00 0.00 61.40 30.10 0.0000 0.0800 0.0000 0.0000 0 0
+3114 0 """3BEGOLE----1""" 1.0444 0.00 0.00 0.00 0.00 0.00 19.70 2.50 0.0000 0.1530 0.0000 0.0000 0 0
+3115 0 """3BEVERIDGE-1""" 1.0238 0.00 0.00 0.00 0.00 0.00 50.90 24.30 0.0000 0.1388 0.0000 0.0000 0 0
+3116 2 """3BIG-ROCK--1""" 1.1480 0.00 50.00 -140.00 -14.00 28.00 0.00 0.00 0.0000 0.0116 0.0000 0.0000 0 0
+3117 0 """3BINGHAM---1""" 1.0446 0.00 0.00 0.00 0.00 0.00 17.60 -7.80 0.0000 0.1928 0.0000 0.0000 0 0
+3118 0 """3BLACK-RIV-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 49.90 8.50 0.0000 0.0000 0.0000 0.0000 0 0
+3119 0 """3BLACKSTON-1""" 1.0188 0.00 0.00 200.00 0.00 0.00 83.10 22.00 0.0000 0.0800 0.0000 0.0000 0 0
+3120 0 """3BOARDMAN--1""" 1.0825 0.00 2.00 0.00 0.00 0.00 27.80 16.10 0.0000 0.1042 0.0000 0.0000 0 0
+3121 0 """3BUICK-STEW1""" 1.0363 0.00 0.00 0.00 0.00 0.00 40.50 17.10 0.0000 0.0000 0.0000 0.0000 0 0
+3122 0 """3BULLOCK---1""" 1.0269 0.00 0.00 0.00 0.00 0.00 37.10 37.10 0.0000 0.1578 0.0000 0.0000 0 0
+3123 2 """3CAMPBELL--1""" 1.0554 0.00 584.00 0.00 0.00 390.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3124 0 """3CEMENT-CY-1""" 1.0188 0.00 0.00 0.00 0.00 0.00 28.00 -0.20 0.0000 0.1000 0.0000 0.0000 0 0
+3125 0 """3CHASE-----1""" 1.0429 0.00 0.00 0.00 0.00 0.00 4.90 2.20 0.0000 0.0000 0.0000 0.0000 0 0
+3126 0 """3CLAIRMONT-1""" 1.0230 0.00 0.00 0.00 0.00 0.00 73.60 28.60 0.0000 0.1646 0.0000 0.0000 0 0
+3127 0 """3CLEVELAND-1""" 1.0356 0.00 0.00 0.00 0.00 0.00 32.90 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+3128 2 """3COBB------1""" 1.0400 0.00 476.00 40.00 0.00 421.00 79.30 35.60 0.0000 0.0000 0.0000 0.0000 0 0
+3129 0 """3CORK-ST.--1""" 1.0494 0.00 0.00 0.00 0.00 0.00 17.00 7.20 0.0000 0.0000 0.0000 0.0000 0 0
+3130 0 """3CORNELL---1""" 1.0290 0.00 0.00 0.00 0.00 0.00 33.30 12.00 0.0000 0.1981 0.0000 0.0000 0 0
+3131 0 """3COTTEGE-GR1""" 1.0738 0.00 0.00 0.00 0.00 0.00 1.70 0.70 0.0000 0.0000 0.0000 0.0000 0 0
+3132 0 """3CROTON----1""" 1.0342 0.00 29.00 0.00 0.00 0.00 10.40 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+3133 0 """3DEAN-RD.--1""" 1.0521 0.00 0.00 0.00 0.00 0.00 3.60 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+3134 0 """3DEJA------1""" 1.0414 0.00 0.00 0.00 0.00 0.00 13.80 -2.50 0.0000 0.0000 0.0000 0.0000 0 0
+3135 0 """3DELANEY---1""" 1.0469 0.00 0.00 0.00 0.00 0.00 64.80 25.10 0.0000 0.2698 0.0000 0.0000 0 0
+3136 0 """3DELH1-----1""" 1.0442 0.00 0.00 0.00 0.00 0.00 36.90 -10.00 0.0000 0.2783 0.0000 0.0000 0 0
+3137 0 """3DORT------1""" 1.0425 0.00 0.00 0.00 0.00 0.00 106.40 37.90 0.0000 0.4626 0.0000 0.0000 0 0
+3138 0 """3DOW-CHLOR.1""" 1.0243 0.00 0.00 0.00 0.00 0.00 49.00 24.00 0.0000 0.0000 0.0000 0.0000 0 0
+3139 0 """3DU-PONTE--1""" 1.0355 0.00 0.00 0.00 0.00 0.00 2.20 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3140 0 """3D-4CPCO-120""" 1.0444 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3141 0 """3EDENVILLE-1""" 1.0405 0.00 0.00 0.00 0.00 0.00 7.10 -4.70 0.0000 0.0000 0.0000 0.0000 0 0
+3142 2 """3ELM-STREET1""" 1.0444 0.00 29.00 0.00 0.00 7.00 32.70 23.30 0.0000 0.0000 0.0000 0.0000 0 0
+3143 0 """3EMMET-----1""" 1.1457 0.00 0.00 0.00 0.00 0.00 21.00 3.90 0.0000 0.0000 0.0000 0.0000 0 0
+3144 0 """3EUREKA----1""" 1.0398 0.00 0.00 0.00 0.00 0.00 21.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+3145 0 """3FELCH-RD.-1""" 1.0331 0.00 0.00 0.00 0.00 0.00 14.00 5.90 0.0000 0.0000 0.0000 0.0000 0 0
+3146 0 """3FISHER----1""" 1.0445 0.00 0.00 0.00 0.00 0.00 14.10 4.60 0.0000 0.0000 0.0000 0.0000 0 0
+3147 0 """3FOUNDRY---1""" 1.0316 0.00 0.00 0.00 0.00 0.00 31.70 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+3148 0 """3FOUR-MILE-1""" 1.0406 0.00 2.00 0.00 0.00 0.00 111.80 32.80 0.0000 0.1000 0.0000 0.0000 0 0
+3149 0 """3GARFIELD--1""" 1.0354 0.00 0.00 0.00 0.00 0.00 72.20 32.00 0.0000 0.0353 0.0000 0.0000 0 0
+3150 2 """3GAYLORD---1""" 1.1519 0.00 60.00 0.00 0.00 15.00 10.10 1.90 0.0000 0.0826 0.0000 0.0000 0 0
+3151 0 """3GENOA-----1""" 1.0678 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3152 0 """3GLEANER---1""" 1.0283 0.00 0.00 0.00 0.00 0.00 18.80 6.90 0.0000 0.0000 0.0000 0.0000 0 0
+3153 0 """3GREY-IRON-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 53.50 17.50 0.0000 0.0000 0.0000 0.0000 0 0
+3154 0 """3HALSEY----1""" 1.0458 0.00 0.00 0.00 0.00 0.00 20.40 3.80 0.0000 0.1148 0.0000 0.0000 0 0
+3155 0 """3HARDY-DAM-1""" 1.0343 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3156 0 """3HAZELWOOD-1""" 1.0525 0.00 0.00 0.00 0.00 0.00 39.10 7.20 0.0000 0.0400 0.0000 0.0000 0 0
+3157 0 """3HEMPHILL--1""" 1.0447 0.00 0.00 0.00 0.00 0.00 134.10 62.70 0.0000 0.6928 0.0000 0.0000 0 0
+3158 0 """3HIGGINS---1""" 1.1065 0.00 0.00 0.00 0.00 0.00 18.90 2.80 0.0000 0.0000 0.0000 0.0000 0 0
+3159 0 """3HODENPYL--1""" 1.0686 0.00 0.00 0.00 0.00 0.00 8.40 -0.80 0.0000 0.0000 0.0000 0.0000 0 0
+3160 0 """3HOLLAN-RD-1""" 1.0168 0.00 0.00 0.00 0.00 0.00 42.80 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+3161 0 """3HOOKER----1""" 1.0348 0.00 0.00 0.00 0.00 0.00 26.40 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3162 0 """3HUGHES-RD-1""" 1.0377 0.00 0.00 0.00 0.00 0.00 21.80 4.80 0.0000 0.0000 0.0000 0.0000 0 0
+3163 0 """3IOSCO-----1""" 1.1238 0.00 19.00 0.00 0.00 0.00 12.80 5.70 0.0000 0.0263 0.0000 0.0000 0 0
+3164 0 """3ISLAND-RD-1""" 1.0435 0.00 0.00 0.00 0.00 0.00 29.20 -2.90 0.0000 0.1086 0.0000 0.0000 0 0
+3165 2 """3KARN------1""" 1.0563 0.00 498.00 0.00 0.00 337.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3166 0 """3KENOWA----3""" 1.0865 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3167 0 """3LATSON----1""" 1.0558 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3168 0 """3LAWNDALE--1""" 1.0265 0.00 0.00 0.00 0.00 0.00 39.90 17.00 0.0000 0.0000 0.0000 0.0000 0 0
+3169 0 """3LAYTON----1""" 1.0246 0.00 0.00 0.00 0.00 0.00 16.10 1.80 0.0000 0.0000 0.0000 0.0000 0 0
+3170 0 """3LEWISTON--1""" 1.1462 0.00 0.00 0.00 0.00 0.00 2.60 0.80 0.0000 0.0000 0.0000 0.0000 0 0
+3171 0 """3LINBERGH--1""" 1.0424 0.00 0.00 0.00 0.00 0.00 42.40 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+3172 0 """3LOOK-GLAS-1""" 1.0411 0.00 0.00 0.00 0.00 0.00 25.30 -3.20 0.0000 0.0000 0.0000 0.0000 0 0
+3173 0 """3LOUD------1""" 1.1048 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0040 0.0000 0.0000 0 0
+3174 2 """3LUDINGTON-3""" 1.0978 0.00 0.00 0.00 0.00 200.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3175 0 """3MALLEABLE-1""" 1.0211 0.00 0.00 0.00 0.00 0.00 61.50 17.20 0.0000 0.0000 0.0000 0.0000 0 0
+3176 0 """3MARQUETTE-1""" 1.0444 0.00 2.00 0.00 0.00 0.00 17.80 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+3177 0 """3MECOSTA---1""" 1.0370 0.00 0.00 0.00 0.00 0.00 15.90 3.60 0.0000 0.0000 0.0000 0.0000 0 0
+3178 0 """3MEDUSA----1""" 1.1103 0.00 0.00 0.00 0.00 0.00 11.50 1.60 0.0000 0.0000 0.0000 0.0000 0 0
+3179 0 """3MILES-RD.-1""" 1.1103 0.00 0.00 0.00 0.00 0.00 7.70 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+3180 0 """3MILHAM----1""" 1.0437 0.00 0.00 0.00 0.00 0.00 36.30 9.60 0.0000 0.1413 0.0000 0.0000 0 0
+3181 0 """3MIO-------1""" 1.1407 0.00 9.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.2067 0.0000 0.0000 0 0
+3182 0 """3MONITOR---1""" 1.0319 0.00 0.00 0.00 0.00 0.00 41.40 14.30 0.0000 0.0503 0.0000 0.0000 0 0
+3183 0 """3MOORE-RD--1""" 0.9940 0.00 0.00 0.00 0.00 0.00 40.80 10.60 0.0000 0.0000 0.0000 0.0000 0 0
+3184 2 """3MORROW----1""" 1.0500 0.00 130.00 0.00 0.00 168.00 80.20 31.20 0.0000 0.1836 0.0000 0.0000 0 0
+3185 0 """3MUSKEGN-HT1""" 1.0212 0.00 0.00 0.00 0.00 0.00 72.90 52.50 0.0000 0.0000 0.0000 0.0000 0 0
+3186 0 """3NODULAR---1""" 1.0228 0.00 0.00 0.00 0.00 0.00 34.40 16.80 0.0000 0.0000 0.0000 0.0000 0 0
+3187 0 """3N.BELDING-1""" 1.0422 0.00 0.00 0.00 0.00 0.00 20.70 -2.30 0.0000 0.1000 0.0000 0.0000 0 0
+3188 0 """3OAKLAND---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 17.80 5.80 0.0000 0.0000 0.0000 0.0000 0 0
+3189 0 """3OGEMAW----1""" 1.0698 0.00 0.00 0.00 0.00 0.00 11.90 -7.50 0.0000 0.0000 0.0000 0.0000 0 0
+3190 0 """3OWOSSO----1""" 1.0282 0.00 0.00 0.00 0.00 0.00 29.20 10.40 0.0000 0.0000 0.0000 0.0000 0 0
+3191 0 """3PAGE------1""" 1.0180 0.00 0.00 0.00 0.00 0.00 45.80 5.40 0.0000 0.0800 0.0000 0.0000 0 0
+3192 2 """3PALISADES-3""" 1.0392 0.00 701.70 0.00 0.00 418.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3193 0 """3PASEDENA--1""" 1.0263 0.00 0.00 0.00 0.00 0.00 48.70 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+3194 0 """3PENN-DIXIE1""" 1.1463 0.00 0.00 0.00 0.00 0.00 6.60 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+3195 0 """3PT.CALCIT-1""" 1.1721 0.00 0.00 0.00 0.00 0.00 9.40 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+3196 0 """3RAISIN----1""" 1.0280 0.00 0.00 0.00 0.00 0.00 21.10 8.80 0.0000 0.0000 0.0000 0.0000 0 0
+3197 0 """3RICE-CREK-1""" 1.0323 0.00 0.00 0.00 0.00 0.00 29.10 1.20 0.0000 0.2540 0.0000 0.0000 0 0
+3198 0 """3RIFLE-RIV.1""" 1.0698 0.00 0.00 0.00 0.00 0.00 2.40 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+3199 2 """3RIGGSVIL--1""" 1.1813 0.00 25.00 0.00 0.00 6.00 22.30 2.50 0.0000 0.1838 0.0000 0.0000 0 0
+3200 0 """3RIVERVIEW-1""" 1.0513 0.00 0.00 0.00 0.00 0.00 79.60 28.70 0.0000 0.3312 0.0000 0.0000 0 0
+3201 0 """3ROCKPORT--1""" 1.1679 0.00 0.00 0.00 0.00 0.00 1.00 0.20 0.0000 0.0000 0.0000 0.0000 0 0
+3202 0 """3RONDO-----1""" 1.1683 0.00 0.00 0.00 0.00 0.00 3.40 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+3203 0 """3SAGNAW-R.-1""" 1.0316 0.00 0.00 0.00 0.00 0.00 63.80 32.80 0.0000 0.1568 0.0000 0.0000 0 0
+3204 0 """3SAMARIA---1""" 1.0341 0.00 0.00 0.00 0.00 0.00 23.10 10.70 0.0000 0.0000 0.0000 0.0000 0 0
+3205 0 """3SCOTT-LK.-1""" 1.0470 0.00 0.00 0.00 0.00 0.00 17.10 5.70 0.0000 0.0000 0.0000 0.0000 0 0
+3206 0 """3SPAULDING-1""" 1.0412 0.00 0.00 0.00 0.00 0.00 70.40 16.20 0.0000 0.0800 0.0000 0.0000 0 0
+3207 0 """3SPRUCE----1""" 1.1468 0.00 0.00 0.00 0.00 0.00 4.40 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+3208 0 """3STAMPG-PLT1""" 1.0446 0.00 0.00 0.00 0.00 0.00 11.60 3.80 0.0000 0.0000 0.0000 0.0000 0 0
+3209 0 """3STRONACH--1""" 1.0397 0.00 0.00 0.00 0.00 0.00 21.20 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+3210 0 """3STOVER----1""" 1.1154 0.00 0.00 0.00 0.00 0.00 6.60 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+3211 0 """3SUMMERTON-1""" 1.0218 0.00 0.00 0.00 0.00 0.00 24.20 -2.10 0.0000 0.0000 0.0000 0.0000 0 0
+3212 0 """3TALLMADGE-3""" 1.0815 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3213 0 """3TALLMADGE-1""" 1.0662 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3214 0 """3THETFORD--3""" 1.0579 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3215 2 """3THETFORD--1""" 1.0516 0.00 146.00 0.00 0.00 36.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3216 0 """3TITTABAW--3""" 1.0615 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3217 0 """3TITTABAW--1""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3218 0 """3TIPPY-DAM-1""" 1.0648 0.00 29.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.1255 0.0000 0.0000 0 0
+3219 0 """3TOMPKINS--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3220 0 """3TUSC.TAP.-1""" 1.0626 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3221 0 """3TWINING---1""" 1.0667 0.00 0.00 0.00 0.00 0.00 8.70 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+3222 0 """3UPJOHN----1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.80 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+3223 2 """3VERONA----1""" 1.0467 0.00 29.00 0.00 0.00 7.00 78.70 10.40 0.0000 0.4710 0.0000 0.0000 0 0
+3224 0 """3VEVAY-----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 18.30 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+3225 0 """3WACKERLY--1""" 1.0295 0.00 0.00 0.00 0.00 0.00 29.80 9.70 0.0000 0.0000 0.0000 0.0000 0 0
+3226 0 """3WARREN----1""" 1.0665 0.00 0.00 0.00 0.00 0.00 19.20 14.60 0.0000 0.3967 0.0000 0.0000 0 0
+3227 0 """3WASHTENAW-1""" 1.0009 0.00 0.00 0.00 0.00 0.00 16.90 -3.00 0.0000 0.0000 0.0000 0.0000 0 0
+3228 2 """3WEADOCK-B-1""" 1.0400 0.00 299.00 90.00 0.00 226.00 35.70 15.30 0.0000 0.0330 0.0000 0.0000 0 0
+3229 2 """3WEADOCK-W-1""" 1.0476 0.00 319.00 0.00 0.00 191.00 36.60 15.30 0.0000 0.0000 0.0000 0.0000 0 0
+3230 0 """3WEALTHY---1""" 1.0461 0.00 0.00 0.00 0.00 0.00 116.80 51.00 0.0000 0.0000 0.0000 0.0000 0 0
+3231 0 """3WEXFORD---1""" 1.0784 0.00 0.00 0.00 0.00 0.00 24.60 -4.50 0.0000 0.0990 0.0000 0.0000 0 0
+3232 0 """3WHITE-LK.-1""" 1.0342 0.00 9.00 0.00 0.00 0.00 11.80 6.80 0.0000 0.0000 0.0000 0.0000 0 0
+3233 2 """3WHITING---1""" 1.0500 0.00 331.00 900.00 0.00 206.00 14.30 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3234 0 """3WILLARD---1""" 1.0411 0.00 0.00 0.00 0.00 0.00 23.60 3.70 0.0000 0.0000 0.0000 0.0000 0 0
+3235 0 """4ALLANBURG-2""" 1.1270 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3236 0 """4BEACH-----2""" 1.0829 0.00 0.00 0.00 0.00 0.00 256.30 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+3237 2 """4BEAUHARN--2""" 1.1266 0.00 600.00 500.00 -25.00 50.00 19.70 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+3238 2 """4BECK------2""" 1.1280 0.00 1011.00 1890.00 -100.00 600.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3239 0 """4-BP-76-REG2""" 1.0551 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3240 0 """4BROCKVILLE2""" 1.0779 0.00 0.00 0.00 0.00 0.00 76.90 31.50 0.0000 0.0000 0.0000 0.0000 0 0
+3241 0 """4BUCHANNAN-2""" 1.0643 0.00 0.00 0.00 0.00 0.00 600.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+3242 2 """4BUCHANNAN-1""" 1.0472 0.00 0.00 -250.00 -25.00 200.00 326.80 52.40 0.0000 0.0000 0.0000 0.0000 0 0
+3243 0 """4BURLINGTON2""" 1.0779 0.00 0.00 0.00 0.00 0.00 900.00 300.00 0.0000 0.0000 0.0000 0.0000 0 0
+3244 0 """4CHATHAM---2""" 1.0922 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3245 2 """4CHATS-FALL2""" 1.1200 0.00 168.00 670.00 -30.00 70.00 7.00 3.30 0.0000 0.0000 0.0000 0.0000 0 0
+3246 2 """4CHERRYWOOD2""" 1.0770 0.00 1000.00 4190.00 -300.00 600.00 650.00 212.60 0.0000 0.0000 0.0000 0.0000 0 0
+3247 0 """4CRAWFORD--1""" 1.0371 0.00 0.00 0.00 0.00 0.00 64.00 28.00 0.0000 0.0000 0.0000 0.0000 0 0
+3248 2 """4DESJOACH--2""" 1.1740 0.00 370.00 590.00 -50.00 175.00 16.10 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+3249 2 """4DETWEILER-2""" 1.0550 0.00 0.00 230.00 -35.00 50.00 600.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+3250 2 """4DOBBIN----2""" 1.0510 0.00 222.00 -310.00 -50.00 75.00 160.00 65.60 0.0000 0.0000 0.0000 0.0000 0 0
+3251 2 """4DOUGLAS-PT2""" 1.1000 0.00 200.00 370.00 -50.00 80.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3252 0 """4EASTON-JCT2""" 1.0823 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3253 0 """4ESSA--230-2""" 1.0904 0.00 0.00 0.00 0.00 0.00 211.00 57.00 0.0000 0.0000 0.0000 0.0000 0 0
+3254 0 """4ESSEX-115-1""" 1.0395 0.00 0.00 0.00 0.00 0.00 84.00 -6.00 0.0000 0.0000 0.0000 0.0000 0 0
+3255 0 """4HANMER----5""" 1.0071 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 -2.1000 0.0000 0.0000 0 0
+3256 0 """4HANNON----2""" 1.0931 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3257 0 """4HANOVER---2""" 1.0859 0.00 0.00 0.00 0.00 0.00 172.20 38.20 0.0000 0.0000 0.0000 0.0000 0 0
+3258 0 """4HAWTHORNE-2""" 1.0613 0.00 0.00 0.00 0.00 0.00 400.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+3259 0 """4HINCHBROOK2""" 1.0640 0.00 0.00 0.00 0.00 0.00 300.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+3260 2 """4HOLDEN----2""" 1.1600 0.00 200.00 150.00 -50.00 90.00 96.00 25.00 0.0000 0.0000 0.0000 0.0000 0 0
+3261 0 """4KEITH-230-2""" 1.0658 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3262 2 """4KEITH-115-1""" 1.0383 0.00 60.00 -100.00 -10.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3263 0 """4KENT------1""" 0.9963 0.00 0.00 0.00 0.00 0.00 122.80 29.80 0.0000 0.0000 0.0000 0.0000 0 0
+3264 0 """4KLEINBURG-5""" 0.9713 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3265 0 """4KLEINBURG-2""" 1.0794 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3266 0 """4LAMBTON-345""" 1.0434 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3267 0 """4LAMBTON---2""" 1.1215 0.00 0.00 0.00 0.00 0.00 27.80 11.70 0.0000 0.0000 0.0000 0.0000 0 0
+3268 2 """4LAMBTON-.24""" 1.1750 0.00 1450.00 7430.00 -500.00 1080.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3269 0 """4LAUZON----2""" 1.0537 0.00 0.00 0.00 0.00 0.00 86.00 20.00 0.0000 0.0000 0.0000 0.0000 0 0
+3270 0 """4LAUZON----1""" 1.0421 0.00 0.00 0.00 0.00 0.00 124.70 16.20 0.0000 0.0000 0.0000 0.0000 0 0
+3271 0 """4LEASIDE---2""" 1.0681 0.00 0.00 0.00 0.00 0.00 500.00 150.00 0.0000 0.0000 0.0000 0.0000 0 0
+3272 0 """4-L-33-P---2""" 1.0530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3273 3 """4MANBY-----2""" 1.0650 0.00 726.60 450.00 0.00 0.00 950.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+3274 2 """4MARTINDALE2""" 1.1071 0.00 435.00 -500.00 -50.00 100.00 627.00 98.50 0.0000 0.0000 0.0000 0.0000 0 0
+3275 0 """4MERIVALE--2""" 0.9920 0.00 0.00 0.00 0.00 0.00 244.00 95.00 0.0000 0.0000 0.0000 0.0000 0 0
+3276 0 """4MIDDLEPORT2""" 1.1049 0.00 0.00 0.00 0.00 0.00 40.00 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+3277 0 """4MINDEN----2""" 1.1309 0.00 0.00 0.00 0.00 0.00 92.60 31.90 0.0000 0.0000 0.0000 0.0000 0 0
+3278 2 """4NANTICO---2""" 1.1570 0.00 1940.00 7680.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3279 2 """4NORTH-BAY-2""" 1.1500 0.00 245.00 -110.00 -50.00 100.00 27.20 11.90 0.0000 0.0000 0.0000 0.0000 0 0
+3280 0 """4NEALE-----2""" 1.0954 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3281 0 """4ORANGEVIL-2""" 1.0761 0.00 0.00 0.00 0.00 0.00 67.00 40.00 0.0000 0.0000 0.0000 0.0000 0 0
+3282 0 """4-PA-27-REG2""" 1.0521 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3283 0 """4PAUGAN----2""" 1.1278 0.00 0.00 0.00 0.00 0.00 8.30 2.50 0.0000 0.0000 0.0000 0.0000 0 0
+3284 0 """4PINARD----5""" 1.0473 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3285 2 """4PINARD----2""" 1.0400 0.00 550.00 600.00 -300.00 300.00 0.00 0.00 0.0000 -1.0470 0.0000 0.0000 0 0
+3286 0 """4PORCUPINE-5""" 1.0447 0.00 0.00 0.00 0.00 0.00 90.00 32.10 0.0000 0.0000 0.0000 0.0000 0 0
+3287 0 """4RICHVIEW--2""" 1.0681 0.00 0.00 0.00 0.00 0.00 800.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+3288 2 """4STLAWRENCE2""" 1.1139 0.00 744.00 3000.00 -100.00 300.00 250.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+3289 0 """4STLAWRENCE1""" 1.0058 0.00 0.00 0.00 0.00 0.00 49.50 21.00 0.0000 0.0000 0.0000 0.0000 0 0
+3290 0 """4STTHOMAS--1""" 1.0326 0.00 0.00 0.00 0.00 0.00 165.00 11.00 0.0000 0.0000 0.0000 0.0000 0 0
+3291 0 """4SANDWICH--2""" 1.0611 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3292 0 """4SAND.WEST-2""" 1.0622 0.00 0.00 0.00 0.00 0.00 114.80 51.60 0.0000 0.0000 0.0000 0.0000 0 0
+3293 0 """4SCOTT-----2""" 1.0961 0.00 0.00 0.00 0.00 0.00 160.00 41.70 0.0000 0.0000 0.0000 0.0000 0 0
+3294 0 """4SCOTT-----1""" 1.0396 0.00 0.00 0.00 0.00 0.00 169.50 36.20 0.0000 0.0000 0.0000 0.0000 0 0
+3295 0 """4WONDERLAND2""" 1.0664 0.00 0.00 0.00 0.00 0.00 79.30 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+3296 0 """5BAYSHORE-T3""" 1.0112 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3297 2 """5BAYSHORE-T1""" 1.0300 0.00 600.00 2680.00 -1000.00 1000.00 760.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+3298 2 """5LEMOYNE--T3""" 1.0120 0.00 0.00 1900.00 -1000.00 1000.00 175.00 90.80 0.0000 0.0000 0.0000 0.0000 0 0
+3299 0 """5BENTON-HBR3""" 1.0329 0.00 0.00 0.00 0.00 0.00 330.00 16.90 0.0000 0.0000 0.0000 0.0000 0 0
+3300 2 """5D.C.COOK--3""" 1.0300 0.00 2501.67 990.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3301 2 """5DUMONT----3""" 1.0300 0.00 850.00 5270.00 -1000.00 1000.00 167.00 50.00 0.0000 0.0000 0.0000 0.0000 0 0
+3302 2 """5E.LIMA----3""" 0.9900 0.00 80.00 860.00 -1000.00 1000.00 350.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+3303 2 """5FOSTORIA--3""" 1.0000 0.00 0.00 -490.00 -1000.00 1000.00 254.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+3304 2 """5OLIVE-----3""" 1.0200 0.00 0.00 -2130.00 -1000.00 1000.00 394.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+3305 2 """5ROBISON-PK3""" 0.9800 0.00 0.00 -630.00 -1000.00 1000.00 460.00 169.80 0.0000 0.0000 0.0000 0.0000 0 0
+3306 2 """5SORENSON--3""" 1.0000 0.00 163.00 850.00 -1000.00 1000.00 371.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+3307 2 """5TWIN-BRCH-3""" 1.0200 0.00 0.00 -1660.00 -1000.00 1000.00 700.00 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+3308 2 """5LEWISTON-Y2""" 1.0520 0.00 1209.10 -190.00 -200.00 420.00 654.10 -45.40 0.0000 0.0000 0.0000 0.0000 0 0
+3309 2 """5MOSSES---Y2""" 1.0500 0.00 400.00 620.00 0.00 130.00 505.90 96.60 0.0000 0.0000 0.0000 0.0000 0 0
+3310 2 """5PACKARD--Y2""" 1.0520 0.00 0.00 -160.00 -1000.00 100.00 641.40 -0.60 0.0000 0.0000 0.0000 0.0000 0 0
+3311 0 """ADAIR-------""" 1.0193 0.00 0.00 0.00 0.00 0.00 2.18 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+3312 0 """ADAMS-----40""" 1.0140 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+3313 0 """1AINSWORTH--""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.17 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+3314 0 """ALGONAC-----""" 1.0163 0.00 0.00 0.00 0.00 0.00 7.98 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+3315 0 """ALMONT------""" 0.9849 0.00 0.00 0.00 0.00 0.00 3.28 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+3316 0 """ANDERSON----""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.59 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+3317 0 """APPLEGATE---""" 0.9866 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+3318 0 """ARGO--------""" 1.0307 0.00 0.00 0.00 0.00 0.00 23.02 3.93 0.0000 0.1200 0.0000 0.0000 0 0
+3319 0 """ARMADA------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.52 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+3320 0 """ARROWHEAD-40""" 1.0217 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3321 0 """ATTICA------""" 0.9842 0.00 0.00 0.00 0.00 0.00 1.34 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+3322 0 """AUBURN-HTS-1""" 1.0049 0.00 0.00 0.00 0.00 0.00 6.50 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+3323 0 """AVOCA-------""" 0.9930 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+3324 0 """AVON--------""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+3325 0 """BAD-AXE-40--""" 0.9987 0.00 0.00 0.00 0.00 0.00 6.13 2.12 0.0000 0.0660 0.0000 0.0000 0 0
+3326 0 """BALDWIN--EQ1""" 1.0224 0.00 0.00 0.00 0.00 0.00 8.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+3327 0 """BARNES-LAKE-""" 0.9888 0.00 0.00 0.00 0.00 0.00 2.20 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+3328 0 """1BARTLETT-CP""" 1.0119 0.00 0.00 0.00 0.00 0.00 7.40 5.87 0.0000 0.0000 0.0000 0.0000 0 0
+3329 0 """BAYPORT-----""" 0.9869 0.00 0.00 0.00 0.00 0.00 1.26 2.12 0.0000 0.0000 0.0000 0.0000 0 0
+3330 0 """BEAVER------""" 0.9956 0.00 0.00 0.00 0.00 0.00 0.17 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+3331 0 """BELLEVILLE--""" 1.0212 0.00 0.00 0.00 0.00 0.00 6.05 2.66 0.0000 0.0000 0.0000 0.0000 0 0
+3332 0 """BERLIN-FUT74""" 1.0348 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3333 0 """BERNARD-----""" 0.9996 0.00 0.00 0.00 0.00 0.00 2.10 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+3334 0 """BINGHAM--EQ1""" 1.0029 0.00 0.00 0.00 0.00 0.00 3.28 1.49 0.0000 0.0480 0.0000 0.0000 0 0
+3335 0 """BLOOMFIELD40""" 1.0220 0.00 0.00 0.00 0.00 0.00 79.00 39.62 0.0000 0.0900 0.0000 0.0000 0 0
+3336 0 """BOND,MADRID-""" 1.0551 0.00 0.00 0.00 0.00 0.00 2.18 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+3337 0 """BREST-------""" 1.0358 0.00 0.00 0.00 0.00 0.00 5.04 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+3338 0 """BREWER------""" 1.0045 0.00 0.00 0.00 0.00 0.00 2.94 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+3339 0 """BRIGHTON----""" 1.0076 0.00 0.00 0.00 0.00 0.00 5.96 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+3340 0 """BROWN-CITY--""" 0.9725 0.00 0.00 0.00 0.00 0.00 3.28 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+3341 0 """BROWNSTOWN40""" 1.0348 0.00 0.00 0.00 0.00 0.00 36.46 24.76 0.0000 0.0000 0.0000 0.0000 0 0
+3342 0 """BRAY--------""" 0.9770 0.00 0.00 0.00 0.00 0.00 1.51 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+3343 0 """BRUCE---EQ1-""" 1.0034 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+3344 0 """BUNCE-CRK-40""" 1.0333 0.00 0.00 0.00 0.00 0.00 7.73 4.25 0.0000 0.0000 0.0000 0.0000 0 0
+3345 2 """BUNCE-CRK-24""" 1.0607 0.00 84.00 480.00 0.00 480.00 37.72 22.10 0.0000 0.0000 0.0000 0.0000 0 0
+3346 0 """CALUMET-----""" 0.9844 0.00 0.00 0.00 0.00 0.00 3.11 1.91 0.0000 0.0000 0.0000 0.0000 0 0
+3347 0 """CAMDEN-2,5--""" 1.0033 0.00 0.00 0.00 0.00 0.00 9.41 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+3348 0 """CAMPUS-1----""" 1.0279 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+3349 0 """CAMPUS-2----""" 1.0216 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+3350 0 """CAPAC-------""" 0.9880 0.00 0.00 0.00 0.00 0.00 3.11 1.38 0.0000 0.0660 0.0000 0.0000 0 0
+3351 0 """CARLETON----""" 1.0054 0.00 0.00 0.00 0.00 0.00 1.76 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+3352 0 """CARO-1------""" 1.0018 0.00 0.00 0.00 0.00 0.00 1.68 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+3353 0 """CARO-T.E.C.-""" 0.9962 0.00 0.00 0.00 0.00 0.00 1.76 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+3354 0 """CARPENTER---""" 1.0007 0.00 0.00 0.00 0.00 0.00 8.15 3.29 0.0000 0.1140 0.0000 0.0000 0 0
+3355 0 """CARSONVILLE-""" 0.9885 0.00 0.00 0.00 0.00 0.00 0.67 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+3356 0 """CARTER------""" 1.0069 0.00 0.00 0.00 0.00 0.00 15.04 7.54 0.0000 0.0000 0.0000 0.0000 0 0
+3357 0 """CASEVILLE---""" 0.9683 0.00 0.00 0.00 0.00 0.00 3.02 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+3358 0 """CASEY-------""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.18 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+3359 0 """CASS-CITY---""" 1.0011 0.00 0.00 0.00 0.00 0.00 5.04 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+3360 0 """CHERRY-HILL-""" 0.9566 0.00 0.00 0.00 0.00 0.00 0.92 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+3361 0 """CHESTERFLD-1""" 1.0264 0.00 0.00 0.00 0.00 0.00 3.95 0.53 0.0000 0.0480 0.0000 0.0000 0 0
+3362 0 """CHESTERFLD-2""" 1.0088 0.00 0.00 0.00 0.00 0.00 8.48 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+3363 0 """CHESTNUT-40-""" 1.0150 0.00 0.00 0.00 0.00 0.00 75.20 29.50 0.0000 0.3600 0.0000 0.0000 0 0
+3364 0 """CHILSON-----""" 1.0175 0.00 0.00 0.00 0.00 0.00 1.51 0.85 0.0000 0.0660 0.0000 0.0000 0 0
+3365 0 """CLARKSTON-2-""" 1.0013 0.00 0.00 0.00 0.00 0.00 4.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+3366 0 """CLIFFORD----""" 0.9881 0.00 0.00 0.00 0.00 0.00 1.34 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+3367 0 """COATS-------""" 1.0093 0.00 0.00 0.00 0.00 0.00 3.36 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+3368 0 """CODY-40-----""" 1.0456 0.00 0.00 0.00 0.00 0.00 19.99 6.27 0.0000 0.1800 0.0000 0.0000 0 0
+3369 0 """COLFAX---EQ1""" 1.0885 0.00 14.00 40.00 0.00 0.00 4.87 2.55 0.0000 0.0480 0.0000 0.0000 0 0
+3370 0 """COLLIER----1""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+3371 0 """CLOTH-PR.-1-""" 1.0059 0.00 0.00 0.00 0.00 0.00 3.00 -0.37 0.0000 0.0000 0.0000 0.0000 0 0
+3372 0 """COLUMBIAVILE""" 0.9871 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3373 0 """COMMERCE-LK-""" 0.9872 0.00 0.00 0.00 0.00 0.00 6.05 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+3374 0 """CORTLAND-24-""" 1.0112 0.00 0.00 0.00 0.00 0.00 204.10 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+3375 0 """CROSWELL-EQ1""" 0.9883 0.00 0.00 0.00 0.00 0.00 5.96 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+3376 0 """CROWN-1-----""" 1.0243 0.00 0.00 0.00 0.00 0.00 10.16 0.32 0.0000 0.0900 0.0000 0.0000 0 0
+3377 0 """CROWN-2-----""" 0.9891 0.00 0.00 0.00 0.00 0.00 4.54 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+3378 0 """CULVER------""" 0.9954 0.00 0.00 0.00 0.00 0.00 8.57 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+3379 0 """CUSTER-24---""" 1.0216 0.00 14.00 40.00 0.00 0.00 61.40 33.15 0.0000 0.0000 0.0000 0.0000 0 0
+3380 0 """DADE-1------""" 1.0165 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+3381 0 """DADE-2------""" 1.0158 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+3382 0 """DARWIN-1----""" 1.0440 0.00 0.00 0.00 0.00 0.00 4.87 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+3383 0 """DARWIN-2----""" 1.0408 0.00 0.00 0.00 0.00 0.00 4.79 1.27 0.0000 0.0480 0.0000 0.0000 0 0
+3384 0 """DAVIS---EQ1-""" 0.9767 0.00 0.00 0.00 0.00 0.00 20.30 10.25 0.0000 0.0900 0.0000 0.0000 0 0
+3385 0 """DAYTON-40---""" 1.0256 0.00 5.00 10.00 0.00 0.00 5.71 2.97 0.0000 0.0660 0.0000 0.0000 0 0
+3386 0 """DECKR-+-ASPN""" 0.9878 0.00 0.00 0.00 0.00 0.00 2.52 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+3387 0 """DEWEY-2-----""" 0.9865 0.00 0.00 0.00 0.00 0.00 11.34 3.82 0.0000 0.0000 0.0000 0.0000 0 0
+3388 0 """DEXTER---EQ1""" 1.0348 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0480 0.0000 0.0000 0 0
+3389 0 """DILLARD-1---""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+3390 0 """DOVER-1-----""" 1.0030 0.00 0.00 0.00 0.00 0.00 3.78 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+3391 0 """DOVER-2-----""" 0.9997 0.00 0.00 0.00 0.00 0.00 3.19 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+3392 0 """DREXEL-2----""" 0.9883 0.00 0.00 0.00 0.00 0.00 9.24 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+3393 0 """DRYDEN------""" 0.9797 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+3394 0 """ECKLES-2----""" 0.9704 0.00 0.00 0.00 0.00 0.00 4.62 -0.74 0.0000 0.0000 0.0000 0.0000 0 0
+3395 0 """EDGEWATER---""" 0.9989 0.00 0.00 0.00 0.00 0.00 1.30 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+3396 0 """ELKTON------""" 0.9804 0.00 0.00 0.00 0.00 0.00 3.36 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+3397 0 """ELM-40------""" 1.0242 0.00 0.00 0.00 0.00 0.00 107.77 79.00 0.0000 0.2850 0.0000 0.0000 0 0
+3398 0 """EMERICK-1---""" 1.0099 0.00 0.00 0.00 0.00 0.00 8.82 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+3399 0 """EMMETT------""" 0.9925 0.00 0.00 0.00 0.00 0.00 1.01 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+3400 0 """ENGLISH-----""" 1.0024 0.00 0.00 0.00 0.00 0.00 1.68 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+3401 0 """ERIN40------""" 1.0115 0.00 0.00 0.00 0.00 0.00 103.40 41.50 0.0000 0.1800 0.0000 0.0000 0 0
+3402 0 """EVERGREEN-40""" 1.0364 0.00 0.00 0.00 0.00 0.00 213.20 82.90 0.0000 0.5100 0.0000 0.0000 0 0
+3403 0 """FAIRGROVE---""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.02 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+3404 0 """FALCON-1----""" 1.0232 0.00 0.00 0.00 0.00 0.00 9.32 6.12 0.0000 0.0000 0.0000 0.0000 0 0
+3405 0 """FALCON-2----""" 1.0207 0.00 0.00 0.00 0.00 0.00 7.56 4.99 0.0000 0.0000 0.0000 0.0000 0 0
+3406 0 """FISHER------""" 1.0370 0.00 0.00 0.00 0.00 0.00 5.96 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+3407 0 """FLAT-ROCK-1-""" 1.0195 0.00 0.00 0.00 0.00 0.00 1.68 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+3408 0 """FLEMING-----""" 1.0067 0.00 0.00 0.00 0.00 0.00 4.54 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+3409 0 """FORESTER----""" 0.9770 0.00 0.00 0.00 0.00 0.00 0.76 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+3410 0 """FRANK2---EQ1""" 0.9722 0.00 0.00 0.00 0.00 0.00 6.10 1.50 0.0000 0.0000 0.0000 0.0000 0 0
+3411 0 """FREEDOM-----""" 0.9954 0.00 0.00 0.00 0.00 0.00 1.10 0.12 0.0000 0.0000 0.0000 0.0000 0 0
+3412 0 """FRENCHLND-2-""" 1.0263 0.00 0.00 0.00 0.00 0.00 5.70 4.37 0.0000 0.1200 0.0000 0.0000 0 0
+3413 0 """FRISBIE-24--""" 1.0881 0.00 0.00 0.00 0.00 0.00 222.68 75.01 0.0000 0.0000 0.0000 0.0000 0 0
+3414 0 """FULLER-1----""" 1.0203 0.00 0.00 0.00 0.00 0.00 2.52 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+3415 0 """FULLER-2----""" 1.0257 0.00 0.00 0.00 0.00 0.00 2.44 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+3416 0 """GAGETOWN----""" 1.0203 0.00 0.00 0.00 0.00 0.00 1.18 0.42 0.0000 0.0480 0.0000 0.0000 0 0
+3417 0 """1GARNER-CP--""" 1.0195 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3418 0 """GENOA-40----""" 1.0191 0.00 0.00 0.00 0.00 0.00 12.94 6.37 0.0000 0.1800 0.0000 0.0000 0 0
+3419 0 """GLOBE-------""" 0.9892 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+3420 0 """GOODISON----""" 0.9861 0.00 0.00 0.00 0.00 0.00 7.56 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+3421 0 """GRAF--------""" 0.9961 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+3422 0 """HAMBURG-----""" 1.0440 0.00 0.00 0.00 0.00 0.00 2.44 0.64 0.0000 0.0660 0.0000 0.0000 0 0
+3423 0 """HANCOCK-40--""" 1.0036 0.00 100.81 190.00 0.00 0.00 29.57 15.62 0.0000 0.0000 0.0000 0.0000 0 0
+3424 0 """HANNAN-1---1""" 1.0048 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+3425 0 """HARTLAND----""" 0.9948 0.00 0.00 0.00 0.00 0.00 2.18 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+3426 0 """HEMLOCK-1---""" 1.0293 0.00 0.00 0.00 0.00 0.00 6.00 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+3427 0 """HEMLOCK-2---""" 1.0364 0.00 0.00 0.00 0.00 0.00 6.97 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+3428 2 """HINES-40----""" 0.9900 0.00 0.00 120.00 0.00 18.00 115.58 95.12 0.0000 0.3600 0.0000 0.0000 0 0
+3429 0 """HOBART-TAP--""" 1.0363 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3430 0 """HOBART------""" 1.0414 0.00 0.00 0.00 0.00 0.00 4.03 1.59 0.0000 0.0900 0.0000 0.0000 0 0
+3431 0 """HOWELL-2----""" 1.0160 0.00 0.00 0.00 0.00 0.00 3.95 1.81 0.0000 0.0660 0.0000 0.0000 0 0
+3432 0 """HUNTERS-CR40""" 1.0031 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3433 0 """IDA---------""" 1.0107 0.00 0.00 0.00 0.00 0.00 1.90 -0.12 0.0000 0.0000 0.0000 0.0000 0 0
+3434 0 """IMLAY-CITY--""" 0.9775 0.00 0.00 0.00 0.00 0.00 4.70 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+3435 0 """INLAND---EQ1""" 1.0137 0.00 0.00 0.00 0.00 0.00 5.80 3.51 0.0000 0.0000 0.0000 0.0000 0 0
+3436 0 """IRA---------""" 1.0238 0.00 0.00 0.00 0.00 0.00 2.10 0.85 0.0000 0.0480 0.0000 0.0000 0 0
+3437 0 """IRONTON-24--""" 1.0193 0.00 0.00 0.00 0.00 0.00 177.80 67.00 0.0000 0.0000 0.0000 0.0000 0 0
+3438 0 """IRVING------""" 0.9945 0.00 0.00 0.00 0.00 0.00 5.88 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3439 0 """JACKSON-RD.2""" 1.0346 0.00 0.00 0.00 0.00 0.00 1.01 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+3440 0 """JASPER------""" 1.0041 0.00 0.00 0.00 0.00 0.00 0.34 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+3441 0 """JORDAN-1----""" 0.9922 0.00 0.00 0.00 0.00 0.00 1.85 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+3442 0 """JOPLIN------""" 0.9903 0.00 0.00 0.00 0.00 0.00 0.76 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+3443 0 """KEEGO-2-----""" 0.9789 0.00 0.00 0.00 0.00 0.00 1.10 0.37 0.0000 0.0000 0.0000 0.0000 0 0
+3444 0 """KELLOGG-----""" 0.9988 0.00 0.00 0.00 0.00 0.00 3.78 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+3445 0 """1KENNETT-CP-""" 1.0198 0.00 0.00 0.00 0.00 0.00 17.90 8.37 0.0000 0.0000 0.0000 0.0000 0 0
+3446 0 """KIMBALL-----""" 1.0128 0.00 0.00 0.00 0.00 0.00 3.36 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+3447 0 """KINDE-------""" 0.9840 0.00 0.00 0.00 0.00 0.00 1.01 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+3448 0 """KING-SEELEY-""" 1.0463 0.00 0.00 0.00 0.00 0.00 2.69 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+3449 0 """LAKEPORT----""" 1.0008 0.00 0.00 0.00 0.00 0.00 1.85 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+3450 0 """LAKEVILLE---""" 0.9976 0.00 0.00 0.00 0.00 0.00 1.09 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+3451 0 """LAPEER------""" 0.9933 0.00 0.00 0.00 0.00 0.00 3.78 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+3452 0 """LARK-40-----""" 1.0476 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3453 0 """LEE-40------""" 1.0183 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+3454 0 """LIMA--------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.18 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+3455 0 """LINCOLN-24--""" 0.9866 0.00 0.00 0.00 0.00 0.00 148.43 124.57 0.0000 0.5700 0.0000 0.0000 0 0
+3456 0 """LUZON-40----""" 1.0040 0.00 0.00 0.00 0.00 0.00 21.67 12.01 0.0000 0.0900 0.0000 0.0000 0 0
+3457 0 """MACOMB-40---""" 1.0194 0.00 0.00 0.00 0.00 0.00 132.00 96.50 0.0000 0.3600 0.0000 0.0000 0 0
+3458 0 """MARINE-CITY-""" 1.0387 0.00 0.00 0.00 0.00 0.00 5.21 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+3459 0 """MARLETTE----""" 0.9794 0.00 0.00 0.00 0.00 0.00 5.29 1.70 0.0000 0.0480 0.0000 0.0000 0 0
+3460 0 """MAYBEE------""" 1.0091 0.00 0.00 0.00 0.00 0.00 1.26 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+3461 0 """MAYVILLE----""" 1.0032 0.00 0.00 0.00 0.00 0.00 2.02 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+3462 0 """MEADOW---EQ1""" 0.9943 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+3463 0 """MEDINA-40---""" 1.0197 0.00 0.00 0.00 0.00 0.00 45.80 21.50 0.0000 0.1800 0.0000 0.0000 0 0
+3464 0 """MELVIN------""" 0.9800 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+3465 0 """METAMORA----""" 0.9954 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+3466 0 """MILFORD-----""" 1.0033 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+3467 0 """MILLINGTON--""" 0.9808 0.00 0.00 0.00 0.00 0.00 2.35 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+3468 0 """MOHAWK-2----""" 0.9967 0.00 0.00 0.00 0.00 0.00 2.10 0.25 0.0000 0.0000 0.0000 0.0000 0 0
+3469 0 """MONARCH-----""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.30 1.50 0.0000 0.0960 0.0000 0.0000 0 0
+3470 0 """1MONTCALM-CP""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3471 0 """MOTT-2------""" 1.0159 0.00 0.00 0.00 0.00 0.00 7.39 3.82 0.0000 0.0900 0.0000 0.0000 0 0
+3472 0 """NATIONAL-1--""" 0.9928 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+3473 0 """NATIONAL-2--""" 0.9997 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+3474 0 """NAVARRE-24--""" 1.0384 0.00 0.00 0.00 0.00 0.00 190.43 107.21 0.0000 0.8700 0.0000 0.0000 0 0
+3475 0 """NEFF--------""" 1.0012 0.00 0.00 0.00 0.00 0.00 5.71 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+3476 0 """NELSON-MILS1""" 1.0263 0.00 0.00 0.00 0.00 0.00 2.94 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+3477 0 """NELSON-MILS2""" 1.0270 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+3478 0 """NEW-BALTMR-1""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.10 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+3479 0 """NEW-BALTMR23""" 1.0237 0.00 0.00 0.00 0.00 0.00 4.28 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+3480 0 """NEW-BOSTON--""" 1.0111 0.00 0.00 0.00 0.00 0.00 1.93 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+3481 0 """NEWBURGH-40-""" 0.9673 0.00 0.00 0.00 0.00 0.00 147.42 102.95 0.0000 0.3000 0.0000 0.0000 0 0
+3482 0 """NEW-HAVEN-1-""" 1.0179 0.00 0.00 0.00 0.00 0.00 3.44 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+3483 0 """NEW-HAVEN-2-""" 1.0220 0.00 0.00 0.00 0.00 0.00 2.69 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+3484 0 """NIXON-2-----""" 0.9768 0.00 0.00 0.00 0.00 0.00 11.09 5.52 0.0000 0.0000 0.0000 0.0000 0 0
+3485 0 """NOBLE-------""" 0.9863 0.00 0.00 0.00 0.00 0.00 16.97 9.14 0.0000 0.0000 0.0000 0.0000 0 0
+3486 0 """NORTH-BRANCH""" 0.9717 0.00 0.00 0.00 0.00 0.00 4.45 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+3487 2 """NORTHEAST-24""" 1.0104 0.00 80.00 0.00 0.00 48.00 230.24 141.20 0.0000 0.4800 0.0000 0.0000 0 0
+3488 0 """NORTH-SRVCTR""" 1.0050 0.00 0.00 0.00 0.00 0.00 5.80 4.36 0.0000 0.0000 0.0000 0.0000 0 0
+3489 2 """NORTHWEST-40""" 1.0044 0.00 0.00 0.00 0.00 18.00 209.70 76.40 0.0000 0.5480 0.0000 0.0000 0 0
+3490 0 """NORWAY-1----""" 0.9516 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+3491 0 """NORWAY-2-EQ1""" 0.9477 0.00 0.00 0.00 0.00 0.00 5.96 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+3492 0 """OAK-BEACH---""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.84 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+3493 0 """OLIVER------""" 0.9870 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3494 0 """OLYMPA-FUT75""" 0.9825 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3495 0 """OMAHA-1--EQ1""" 0.9473 0.00 0.00 0.00 0.00 0.00 10.08 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+3496 0 """OMAHA-2--EQ1""" 0.9465 0.00 0.00 0.00 0.00 0.00 9.58 3.61 0.0000 0.0000 0.0000 0.0000 0 0
+3497 0 """OPAL--------""" 1.0050 0.00 0.00 0.00 0.00 0.00 0.92 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+3498 0 """OREGON-1----""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.38 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+3499 0 """ORION-------""" 0.9925 0.00 0.00 0.00 0.00 0.00 5.46 2.02 0.0000 0.0660 0.0000 0.0000 0 0
+3500 0 """OTTER-LAKE--""" 0.9836 0.00 0.00 0.00 0.00 0.00 1.01 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+3501 0 """OWENDALE----""" 1.0049 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+3502 0 """OXFORD------""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.89 3.72 0.0000 0.1200 0.0000 0.0000 0 0
+3503 0 """1PADDOCK-CP-""" 1.0220 0.00 0.00 0.00 0.00 0.00 4.30 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+3504 0 """PAGE--------""" 0.9930 0.00 0.00 0.00 0.00 0.00 9.58 5.63 0.0000 0.0660 0.0000 0.0000 0 0
+3505 0 """PALMER-1----""" 0.9643 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+3506 0 """PARKER-ROAD-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.64 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+3507 0 """PAUL-1------""" 1.0114 0.00 0.00 0.00 0.00 0.00 8.15 4.89 0.0000 0.0480 0.0000 0.0000 0 0
+3508 0 """PAUL-2,3----""" 1.0157 0.00 0.00 0.00 0.00 0.00 4.70 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+3509 0 """PHOENIX-40--""" 1.0379 0.00 0.00 0.00 0.00 0.00 36.71 20.82 0.0000 0.0000 0.0000 0.0000 0 0
+3510 0 """PIEDMONT----""" 1.0235 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3511 0 """PIGEON------""" 0.9818 0.00 0.00 0.00 0.00 0.00 3.78 4.78 0.0000 0.0480 0.0000 0.0000 0 0
+3512 0 """PINCKNEY----""" 1.0442 0.00 0.00 0.00 0.00 0.00 3.86 1.70 0.0000 0.0900 0.0000 0.0000 0 0
+3513 0 """PIONEER---40""" 1.0270 0.00 0.00 0.00 0.00 0.00 19.10 10.12 0.0000 0.0000 0.0000 0.0000 0 0
+3514 0 """PIPER---EQ1-""" 1.0008 0.00 0.00 0.00 0.00 0.00 5.12 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+3515 0 """PITSFLD--EQ1""" 1.0164 0.00 0.00 0.00 0.00 0.00 9.66 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+3516 0 """PLACID------""" 1.0026 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3517 0 """PLYMOUTH----""" 0.9523 0.00 0.00 0.00 0.00 0.00 12.10 7.44 0.0000 0.1560 0.0000 0.0000 0 0
+3518 0 """PORT-AUSTIN-""" 0.9754 0.00 0.00 0.00 0.00 0.00 3.02 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+3519 0 """PORT-HOPE---""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+3520 0 """PORT-SANILAC""" 0.9808 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+3521 0 """PRICE-1-----""" 1.0353 0.00 0.00 0.00 0.00 0.00 4.37 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+3522 0 """PROCTOR-----""" 0.9955 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3523 0 """PUTNAM------""" 1.0098 0.00 14.00 40.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3524 0 """QUEEN-------""" 1.0065 0.00 0.00 0.00 0.00 0.00 3.53 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+3525 0 """QUINCY------""" 1.0030 0.00 0.00 0.00 0.00 0.00 1.34 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+3526 0 """RANDOLPH----""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3527 0 """RAVINE---EQ1""" 0.9764 0.00 0.00 0.00 0.00 0.00 8.90 3.62 0.0000 0.0000 0.0000 0.0000 0 0
+3528 0 """RED-RUN-40--""" 1.0203 0.00 0.00 0.00 0.00 0.00 140.87 71.29 0.0000 0.5400 0.0000 0.0000 0 0
+3529 0 """REESE---EQ2-""" 0.9799 0.00 0.00 0.00 0.00 0.00 5.96 2.23 0.0000 0.0480 0.0000 0.0000 0 0
+3530 0 """REMER-40----""" 1.0461 0.00 0.00 0.00 0.00 0.00 1.34 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3531 0 """RENO--------""" 0.9937 0.00 0.00 0.00 0.00 0.00 4.80 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+3532 0 """RICHMOND----""" 1.0130 0.00 0.00 0.00 0.00 0.00 5.63 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+3533 0 """RIFLE-------""" 0.9886 0.00 0.00 0.00 0.00 0.00 6.13 2.97 0.0000 0.0480 0.0000 0.0000 0 0
+3534 0 """RIVER-RAISIN""" 1.0072 0.00 0.00 0.00 0.00 0.00 0.92 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+3535 2 """RIVERVIEW-40""" 1.0021 0.00 25.00 -100.00 -10.00 20.00 145.57 79.69 0.0000 0.3600 0.0000 0.0000 0 0
+3536 0 """ROCHESTER-1-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.55 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+3537 0 """ROCKWOOD----""" 1.0345 0.00 0.00 0.00 0.00 0.00 5.80 1.59 0.0000 0.0340 0.0000 0.0000 0 0
+3538 0 """ROMEO---EQ1-""" 1.0133 0.00 0.00 0.00 0.00 0.00 6.13 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+3539 0 """ROMULUS---40""" 1.0151 0.00 0.00 0.00 0.00 0.00 20.66 13.07 0.0000 0.1680 0.0000 0.0000 0 0
+3540 0 """RUSH-TAP----""" 0.9835 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3541 0 """RUSH-40-----""" 1.0014 0.00 0.00 0.00 0.00 0.00 3.70 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+3542 0 """SALEM-------""" 1.0417 0.00 0.00 0.00 0.00 0.00 1.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+3543 0 """SALINE------""" 1.0017 0.00 0.00 0.00 0.00 0.00 9.10 4.87 0.0000 0.0960 0.0000 0.0000 0 0
+3544 0 """SANDUSKY-40-""" 1.0042 0.00 0.00 0.00 0.00 0.00 5.29 1.91 0.0000 0.0660 0.0000 0.0000 0 0
+3545 0 """SAXON-------""" 0.9916 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+3546 0 """SEBEWAING---""" 1.0083 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+3547 0 """SELFRIDGE-1-""" 1.0074 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+3548 0 """SELKIRK-----""" 1.0092 0.00 0.00 0.00 0.00 0.00 6.05 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+3549 0 """SHAW--------""" 0.9720 0.00 0.00 0.00 0.00 0.00 1.60 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+3550 0 """SHELDON-1---""" 0.9578 0.00 0.00 0.00 0.00 0.00 5.29 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+3551 0 """SHERWOOD----""" 1.0148 0.00 0.00 0.00 0.00 0.00 1.93 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+3552 0 """SNOVER------""" 0.9929 0.00 0.00 0.00 0.00 0.00 1.60 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+3553 0 """SOUTHFLD-40-""" 1.0066 0.00 0.00 0.00 0.00 0.00 99.54 81.89 0.0000 0.0900 0.0000 0.0000 0 0
+3554 0 """STATE-1-----""" 1.0247 0.00 0.00 0.00 0.00 0.00 5.60 3.25 0.0000 0.0000 0.0000 0.0000 0 0
+3555 0 """SPOKANE-40--""" 1.0014 0.00 0.00 0.00 0.00 0.00 36.54 16.57 0.0000 0.0000 0.0000 0.0000 0 0
+3556 0 """ST-CLAIR-1--""" 1.0259 0.00 0.00 0.00 0.00 0.00 2.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+3557 0 """ST-CLAIR-2--""" 1.0352 0.00 0.00 0.00 0.00 0.00 2.69 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+3558 0 """STEPHENS-24-""" 1.0074 0.00 0.00 0.00 0.00 0.00 164.30 105.69 0.0000 0.5700 0.0000 0.0000 0 0
+3559 0 """STERLING-40-""" 1.0210 0.00 0.00 0.00 0.00 0.00 101.14 45.79 0.0000 0.5400 0.0000 0.0000 0 0
+3560 0 """STOCKBRIDGE-""" 1.0701 0.00 0.00 0.00 0.00 0.00 1.09 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+3561 0 """1STOCKWELLCP""" 1.0172 0.00 0.00 0.00 0.00 0.00 10.90 6.75 0.0000 0.0000 0.0000 0.0000 0 0
+3562 0 """SUNSET-40---""" 1.0041 0.00 0.00 0.00 0.00 0.00 78.79 59.01 0.0000 0.5160 0.0000 0.0000 0 0
+3563 2 """SUPERIOR-40-""" 1.0189 0.00 0.00 0.00 0.00 118.00 61.49 48.74 0.0000 0.1800 0.0000 0.0000 0 0
+3564 0 """TIENKEN-2---""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3565 0 """TALBOT---EQ1""" 0.9854 0.00 0.00 0.00 0.00 0.00 2.35 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+3566 0 """1TAYLOR-1-13""" 1.0121 0.00 0.00 0.00 0.00 0.00 10.67 6.27 0.0000 0.0000 0.0000 0.0000 0 0
+3567 0 """1TAYLOR-2-13""" 1.0154 0.00 0.00 0.00 0.00 0.00 8.65 6.48 0.0000 0.0000 0.0000 0.0000 0 0
+3568 0 """TEGGERDINE--""" 0.9815 0.00 0.00 0.00 0.00 0.00 11.34 4.67 0.0000 0.0000 0.0000 0.0000 0 0
+3569 0 """TEMPLE------""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.59 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+3570 0 """TEXAS-------""" 1.0281 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+3571 0 """TODD--------""" 1.0426 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+3572 0 """TRINITY-2---""" 1.0107 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+3573 0 """TROY-40-----""" 0.9963 0.00 0.00 0.00 0.00 0.00 178.92 77.64 0.0000 0.5400 0.0000 0.0000 0 0
+3574 0 """TUSCOLA-40--""" 1.0020 0.00 0.00 0.00 0.00 0.00 6.22 2.55 0.0000 0.0660 0.0000 0.0000 0 0
+3575 0 """UNION-LAKE--""" 0.9771 0.00 0.00 0.00 0.00 0.00 11.84 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+3576 0 """UNIONVILLE--""" 1.0120 0.00 0.00 0.00 0.00 0.00 1.26 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+3577 0 """UNIVR-BUS1T6""" 1.0250 0.00 0.00 0.00 0.00 0.00 11.17 8.71 0.0000 0.0000 0.0000 0.0000 0 0
+3578 0 """URBAN-TEC---""" 0.9887 0.00 0.00 0.00 0.00 0.00 5.12 3.19 0.0000 0.0000 0.0000 0.0000 0 0
+3579 0 """UTAH--------""" 1.0415 0.00 0.00 0.00 0.00 0.00 0.76 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+3580 0 """VANBUREN-EQ1""" 1.0128 0.00 0.00 0.00 0.00 0.00 1.51 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+3581 0 """VASSAR-BIRCH""" 0.9744 0.00 0.00 0.00 0.00 0.00 10.00 5.74 0.0000 0.0660 0.0000 0.0000 0 0
+3582 0 """VICTOR-40---""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3583 0 """VALLEY------""" 1.0268 0.00 6.00 20.00 0.00 0.00 0.90 0.62 0.0000 0.0000 0.0000 0.0000 0 0
+3584 0 """WABASH-40---""" 1.0066 0.00 0.00 0.00 0.00 0.00 46.70 26.25 0.0000 0.0000 0.0000 0.0000 0 0
+3585 0 """WALLED-LAKE-""" 0.9972 0.00 0.00 0.00 0.00 0.00 6.00 2.62 0.0000 0.0000 0.0000 0.0000 0 0
+3586 0 """WALNUT-1,2--""" 0.9814 0.00 0.00 0.00 0.00 0.00 9.60 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+3587 0 """WALTON40-SUB""" 1.0330 0.00 0.00 0.00 0.00 0.00 44.35 20.08 0.0000 0.1800 0.0000 0.0000 0 0
+3588 0 """WARDLOW-----""" 0.9956 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+3589 2 """WARREN-24---""" 1.0171 0.00 0.00 540.00 0.00 54.00 268.46 194.97 0.0000 0.9000 0.0000 0.0000 0 0
+3590 0 """WASHNGTN-EQ1""" 1.0002 0.00 0.00 0.00 0.00 0.00 8.57 4.36 0.0000 0.0660 0.0000 0.0000 0 0
+3591 0 """WATERFORD---""" 0.9903 0.00 0.00 0.00 0.00 0.00 17.81 5.52 0.0000 0.1800 0.0000 0.0000 0 0
+3592 0 """WEBERVLE-EQ1""" 1.0885 0.00 0.00 0.00 0.00 0.00 8.23 1.91 0.0000 0.1140 0.0000 0.0000 0 0
+3593 0 """WHITE-LAKE--""" 0.9941 0.00 0.00 0.00 0.00 0.00 4.70 1.59 0.0000 0.0000 0.0000 0.0000 0 0
+3594 0 """WHITMORE-LK-""" 1.0357 0.00 0.00 0.00 0.00 0.00 7.81 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+3595 0 """WHITNY-FUT73""" 1.0033 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3596 0 """WILEY-------""" 1.0197 0.00 0.00 0.00 0.00 0.00 1.26 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+3597 0 """WILMOTK-NGFD""" 0.9922 0.00 0.00 0.00 0.00 0.00 0.84 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+3598 0 """WILSON------""" 1.0128 0.00 0.00 0.00 0.00 0.00 2.60 -0.21 0.0000 0.0000 0.0000 0.0000 0 0
+3599 0 """1WILSON-CP--""" 1.0157 0.00 0.00 0.00 0.00 0.00 8.60 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+3600 0 """WOLFHILL----""" 0.9897 0.00 0.00 0.00 0.00 0.00 4.96 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+3601 0 """WOLVERINE-2-""" 1.0200 0.00 0.00 0.00 0.00 0.00 5.12 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+3602 0 """WORTH-------""" 1.0069 0.00 0.00 0.00 0.00 0.00 2.18 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+3603 0 """YALE-TAP----""" 0.9902 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3604 0 """YALE--------""" 0.9870 0.00 0.00 0.00 0.00 0.00 3.11 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+3605 0 """YATES-------""" 0.9871 0.00 0.00 0.00 0.00 0.00 1.34 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+3606 0 """YORK--------""" 0.9901 0.00 0.00 0.00 0.00 0.00 2.44 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+3607 0 """YOST-40-----""" 1.0354 0.00 0.00 0.00 0.00 0.00 48.55 26.29 0.0000 0.0480 0.0000 0.0000 0 0
+3608 0 """2ADAMS-----1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3609 0 """2ALFRED----1""" 1.0468 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+3610 0 """ALFRED-13---""" 1.0489 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+3611 0 """2AMHERST1.13""" 1.0230 0.00 0.00 0.00 0.00 0.00 7.56 4.72 0.0000 0.0000 0.0000 0.0000 0 0
+3612 0 """2AMHERST2.13""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3613 0 """2ARROWHEAD-1""" 1.0315 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3614 0 """2BAD-AXE---1""" 1.0460 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3615 0 """2BLOOMFLD--1""" 1.0065 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3616 0 """2BROWNTN---3""" 1.0081 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3617 0 """2BROWNTN---2""" 1.0314 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3618 2 """2BROWNTN-N-1""" 1.0263 0.00 0.00 -910.00 -91.00 338.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3619 0 """2BROWNTN-S-1""" 1.0117 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3620 0 """2BUNCE-CK--1""" 1.1567 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3621 0 """2B3N-DECO230""" 1.0877 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3622 0 """2-BURNS-1--1""" 1.0578 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3623 0 """2-BURNS-2--1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3624 0 """2CANIFF----3""" 1.0261 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3625 0 """2CANIFF----1""" 1.0433 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3626 0 """2CATALINA-CP""" 1.0064 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3627 0 """2CATO------1""" 1.0403 0.00 0.00 0.00 0.00 0.00 57.14 27.68 0.0000 0.0000 0.0000 0.0000 0 0
+3628 0 """2CHESTNUT--1""" 1.0164 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3629 0 """2CODY------1""" 0.9887 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3630 2 """2CONNER-G.24""" 1.0404 0.00 285.00 1770.00 0.00 1770.00 436.28 182.01 0.0000 0.0000 0.0000 0.0000 0 0
+3631 0 """2COOPER----1""" 1.0059 0.00 0.00 0.00 0.00 0.00 1.34 2.31 0.0000 0.0000 0.0000 0.0000 0 0
+3632 0 """2CORTLAND--1""" 1.0392 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3633 0 """2COVENTRY--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3634 0 """2COVENTRY--1""" 0.9810 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3635 0 """2CRESTWOOD-1""" 1.0120 0.00 0.00 0.00 0.00 0.00 3.56 1.78 0.0000 0.0000 0.0000 0.0000 0 0
+3636 0 """2CUSTER----1""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3637 0 """2C-3DECO-138""" 0.9752 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3638 0 """2DAYTON----1""" 0.9863 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3639 2 """2DELRAY-16-1""" 1.0200 0.00 72.00 350.00 0.00 54.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3640 2 """2DELRAY-G.24""" 1.0483 0.00 236.00 2320.00 0.00 2320.00 290.94 159.76 0.0000 0.0000 0.0000 0.0000 0 0
+3641 0 """2ELM-------1""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3642 0 """2E.FERMI---1""" 0.9983 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3643 0 """2ERIN------1""" 1.0331 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3644 0 """2E-N-S-TAP11""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3645 0 """2E-N-S-TAP21""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3646 2 """2ESSEX-----1""" 1.0543 0.00 274.00 0.00 0.00 140.00 0.00 0.00 0.0000 1.0800 0.0000 0.0000 0 0
+3647 0 """2EVERGREEN-1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3648 0 """2FLEETWD-1-1""" 1.0428 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3649 0 """2FLEETWD-2-1""" 1.0456 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3650 0 """2FLEETWD--13""" 1.0161 0.00 0.00 0.00 0.00 0.00 12.02 5.78 0.0000 0.0000 0.0000 0.0000 0 0
+3651 0 """2FOMOCO-C1-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+3652 0 """2FOMOCO-C2-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+3653 0 """2FRISBIE---1""" 1.0414 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3654 0 """2GENOA-----1""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3655 0 """2HANCOCK---1""" 1.0042 0.00 82.00 210.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3656 2 """2HARB.BEA.-1""" 1.0597 0.00 114.00 -300.00 -30.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3657 0 """2HINES-----1""" 0.9897 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3658 0 """2HUNTER-CK.1""" 1.0432 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3659 0 """2IRONTON---1""" 1.0310 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3660 0 """2IRN-NA-RV-1""" 1.0272 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3661 0 """2IMLAY-1PUP1""" 1.0685 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3662 0 """2JEFFERSON-1""" 1.0257 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3663 0 """2KTT-DECO138""" 1.0748 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3664 0 """2LK.HURON1P1""" 1.1530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3665 0 """2LK.HURON2P1""" 1.1335 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3666 0 """2LAPEER----1""" 1.0390 0.00 0.00 0.00 0.00 0.00 7.83 2.85 0.0000 0.0000 0.0000 0.0000 0 0
+3667 0 """2LARK------1""" 0.9720 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3668 0 """2LEE-------1""" 1.1215 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3669 0 """2LINCOLN---1""" 1.0100 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3670 0 """2LN-NE-NW--1""" 1.0129 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3671 0 """2LOGAN-1---1""" 1.0326 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3672 0 """2LOGAN-1-.13""" 1.0161 0.00 0.00 0.00 0.00 0.00 8.54 2.49 0.0000 0.0000 0.0000 0.0000 0 0
+3673 0 """2LOGAN-2---1""" 1.0362 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3674 0 """2LOGAN-2-.13""" 1.0153 0.00 0.00 0.00 0.00 0.00 8.46 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+3675 0 """2LONG-LK-1-1""" 1.0035 0.00 0.00 0.00 0.00 0.00 7.12 1.69 0.0000 0.0000 0.0000 0.0000 0 0
+3676 0 """2LONG-LK-2-1""" 1.0046 0.00 0.00 0.00 0.00 0.00 6.68 1.25 0.0000 0.0000 0.0000 0.0000 0 0
+3677 0 """2LUZON-----1""" 0.9694 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3678 0 """2LUZON-W.40D""" 0.9908 0.00 0.00 0.00 0.00 0.00 16.02 7.83 0.0000 0.0000 0.0000 0.0000 0 0
+3679 0 """2MACOMB----1""" 1.0576 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3680 2 """2MARYSVILLE1""" 1.1521 0.00 84.00 0.00 0.00 60.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3681 0 """2MAXWELL-1-1""" 1.0236 0.00 0.00 0.00 0.00 0.00 18.16 11.21 0.0000 0.0000 0.0000 0.0000 0 0
+3682 0 """2MAXWELL-2-1""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3683 0 """2MCLOUTH-1-1""" 1.0222 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+3684 0 """2MCLOUTH-2-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+3685 2 """2MCLOUTH-.24""" 1.0350 0.00 0.00 670.00 -30.00 100.00 108.22 48.42 0.0000 0.0000 0.0000 0.0000 0 0
+3686 0 """2MEDINA----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3687 0 """2MIDTOWN---1""" 1.0409 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3688 2 """2MONRO-1,2-3""" 1.0100 0.00 1290.95 -880.00 -182.00 803.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3689 2 """2MONRO-3,4-3""" 1.0105 0.00 470.00 -910.00 -91.00 528.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3690 0 """2MTCALM-CP-1""" 1.0065 0.00 0.00 0.00 0.00 0.00 78.59 31.06 0.0000 0.0000 0.0000 0.0000 0 0
+3691 0 """2NAVARRE---2""" 1.0244 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3692 0 """2NAVARRE---1""" 1.0256 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3693 0 """2NEWBURGH--1""" 0.9920 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3694 0 """2NOBLE-----1""" 0.9773 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3695 0 """2NORTHEAST-1""" 1.0287 0.00 54.00 140.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3696 0 """2N.E.STUB--1""" 1.0437 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3697 2 """2N.E.FLIK.24""" 1.0200 0.00 0.00 40.00 0.00 30.00 43.16 15.22 0.0000 0.0000 0.0000 0.0000 0 0
+3698 0 """2NORTHWEST-1""" 0.9962 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3699 0 """2PHOENIX---1""" 0.9654 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3700 0 """2PIONEER-TP1""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3701 0 """2PIONEER---1""" 0.9633 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3702 0 """2PLACID----1""" 0.9882 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3703 0 """2PONTIAC---3""" 1.0328 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3704 0 """2PONTIAC---1""" 1.0213 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3705 0 """2RED-RUN---1""" 1.0352 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+3706 0 """2REMER-----1""" 1.1466 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3707 0 """2R.R.EQZR.-1""" 1.0352 0.00 0.00 0.00 0.00 0.00 60.52 37.47 0.0000 0.0000 0.0000 0.0000 0 0
+3708 2 """2R.ROUGE-1-1""" 1.0354 0.00 272.00 1880.00 0.00 188.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3709 2 """2R.ROUGE-2-1""" 1.0442 0.00 257.00 1980.00 0.00 198.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3710 2 """2R.ROUGE-3-1""" 1.0447 0.00 300.00 0.00 0.00 209.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3711 0 """2RIVERVU---1""" 1.0241 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3712 0 """2ROMULUS---1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3713 0 """2RUSH------1""" 1.0284 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3714 0 """2SANDUSKY--1""" 1.0989 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3715 0 """2SLOCUM----1""" 1.0153 0.00 14.00 40.00 0.00 0.00 57.49 27.86 0.0000 0.0000 0.0000 0.0000 0 0
+3716 0 """2SOUTHFLD--1""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3717 0 """2SPOKANE---1""" 1.0200 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3718 2 """2ST-CLAIR--3""" 1.0433 0.00 498.00 0.00 0.00 215.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3719 2 """2ST-CL.1-3-1""" 1.1866 0.00 501.00 3220.00 0.00 322.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3720 2 """2ST-CL.4,5-1""" 1.1467 0.00 463.00 0.00 0.00 315.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3721 2 """2ST-CL.6---1""" 1.1194 0.00 322.00 0.00 0.00 190.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3722 0 """2STC-SP-STL1""" 1.0639 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3723 0 """2STEPHENS--3""" 1.0262 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3724 0 """2STEPHENS--1""" 1.0420 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3725 0 """2STERLING--1""" 1.0393 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3726 0 """2SUNSET----1""" 0.9976 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3727 0 """2SUPERIOR--1""" 0.9791 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3728 0 """2TAYLOR-1--1""" 1.0054 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3729 0 """2TAYLOR--2-1""" 1.0247 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3730 0 """2TEMPEST--CP""" 1.0062 0.00 0.00 0.00 0.00 0.00 11.84 3.92 0.0000 0.0000 0.0000 0.0000 0 0
+3731 2 """2TRENTN-NA-1""" 1.0300 0.00 278.00 2220.00 0.00 225.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3732 2 """2TRENTN-SU-1""" 1.0300 0.00 593.00 1450.00 0.00 303.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3733 0 """2TROY------1""" 1.0029 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3734 0 """2TUSCOLA---1""" 1.0236 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3735 0 """2VICTOR----1""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3736 0 """2WABASH-TAP1""" 1.1463 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3737 0 """2WABASH----1""" 1.1431 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3738 0 """2WALTON----1""" 1.0096 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3739 0 """2WARREN----1""" 1.0148 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3740 0 """2WARREN-7--1""" 1.0400 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3741 0 """2WATERMAN--2""" 1.0227 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3742 0 """2WATERMAN--1""" 1.0418 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3743 0 """2WAT.EQZR.24""" 1.0311 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3744 0 """2WAYNE-----3""" 1.0091 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3745 0 """2WAYNE-----1""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3746 0 """2WHEELER---1""" 1.0040 0.00 0.00 0.00 0.00 0.00 24.21 15.04 0.0000 0.0000 0.0000 0.0000 0 0
+3747 0 """2WILLOW-1T-1""" 0.9847 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3748 0 """2WILLOW-2T-1""" 0.9880 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3749 0 """2WILLO-RUN-1""" 0.9811 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3750 0 """2WILLOW--.13""" 0.9992 0.00 0.00 0.00 0.00 0.00 41.83 23.67 0.0000 0.0000 0.0000 0.0000 0 0
+3751 0 """2WIXOM-----3""" 1.0194 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3752 0 """2WIXOM-----1""" 1.0035 0.00 0.00 0.00 0.00 0.00 10.86 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+3753 0 """2WOODHVN-1-1""" 1.0278 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3754 0 """2WOODHVN1.13""" 1.0229 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+3755 0 """2WDHVN-TP2-1""" 1.0248 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3756 0 """2WOODHVN-2-1""" 1.0240 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3757 0 """2WOODHVN2.13""" 1.0124 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+3758 0 """2YOST------1""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+3759 0 """3ALBA-TIE--1""" 1.1233 0.00 0.00 0.00 0.00 0.00 2.50 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+3760 0 """3ALCONA-D--1""" 1.1170 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3761 0 """3ALGOMA----1""" 1.0365 0.00 0.00 0.00 0.00 0.00 14.00 -1.10 0.0000 0.0000 0.0000 0.0000 0 0
+3762 0 """3ALMA------1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.40 2.10 0.0000 0.1000 0.0000 0.0000 0 0
+3763 0 """3ALMEDA----1""" 1.0459 0.00 0.00 0.00 0.00 0.00 14.10 4.30 0.0000 0.0215 0.0000 0.0000 0 0
+3764 0 """3ALPENA----1""" 1.1632 0.00 0.00 0.00 0.00 0.00 33.10 5.20 0.0000 0.2880 0.0000 0.0000 0 0
+3765 0 """3AMBER-----1""" 1.0260 0.00 0.00 0.00 0.00 0.00 19.00 15.60 0.0000 0.0000 0.0000 0.0000 0 0
+3766 0 """3ARGENTA---3""" 1.0555 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3767 0 """3ARGENTA---1""" 1.0537 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3768 0 """3A-1CPCO-120""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3769 0 """3BANGOR----1""" 1.0383 0.00 0.00 0.00 0.00 0.00 8.60 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3770 0 """3BARD-RD---1""" 1.0831 0.00 0.00 0.00 0.00 0.00 6.30 1.20 0.0000 0.0000 0.0000 0.0000 0 0
+3771 0 """3BARRY-----1""" 1.0416 0.00 0.00 0.00 0.00 0.00 27.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+3772 0 """3BASS-CRK--1""" 1.0389 0.00 0.00 0.00 0.00 0.00 17.80 3.20 0.0000 0.0000 0.0000 0.0000 0 0
+3773 0 """3BATAVIA---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 23.20 0.10 0.0000 0.0800 0.0000 0.0000 0 0
+3774 0 """3BEALS-RD.-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 146.80 48.60 0.0000 0.1500 0.0000 0.0000 0 0
+3775 0 """3BEECHER---1""" 1.0185 0.00 0.00 0.00 0.00 0.00 61.40 30.10 0.0000 0.0800 0.0000 0.0000 0 0
+3776 0 """3BEGOLE----1""" 1.0444 0.00 0.00 0.00 0.00 0.00 19.70 2.50 0.0000 0.1530 0.0000 0.0000 0 0
+3777 0 """3BEVERIDGE-1""" 1.0238 0.00 0.00 0.00 0.00 0.00 50.90 24.30 0.0000 0.1388 0.0000 0.0000 0 0
+3778 2 """3BIG-ROCK--1""" 1.1480 0.00 50.00 -140.00 -14.00 28.00 0.00 0.00 0.0000 0.0116 0.0000 0.0000 0 0
+3779 0 """3BINGHAM---1""" 1.0446 0.00 0.00 0.00 0.00 0.00 17.60 -7.80 0.0000 0.1928 0.0000 0.0000 0 0
+3780 0 """3BLACK-RIV-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 49.90 8.50 0.0000 0.0000 0.0000 0.0000 0 0
+3781 0 """3BLACKSTON-1""" 1.0188 0.00 0.00 200.00 0.00 0.00 83.10 22.00 0.0000 0.0800 0.0000 0.0000 0 0
+3782 0 """3BOARDMAN--1""" 1.0825 0.00 2.00 0.00 0.00 0.00 27.80 16.10 0.0000 0.1042 0.0000 0.0000 0 0
+3783 0 """3BUICK-STEW1""" 1.0363 0.00 0.00 0.00 0.00 0.00 40.50 17.10 0.0000 0.0000 0.0000 0.0000 0 0
+3784 0 """3BULLOCK---1""" 1.0269 0.00 0.00 0.00 0.00 0.00 37.10 37.10 0.0000 0.1578 0.0000 0.0000 0 0
+3785 2 """3CAMPBELL--1""" 1.0554 0.00 584.00 0.00 0.00 390.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3786 0 """3CEMENT-CY-1""" 1.0188 0.00 0.00 0.00 0.00 0.00 28.00 -0.20 0.0000 0.1000 0.0000 0.0000 0 0
+3787 0 """3CHASE-----1""" 1.0429 0.00 0.00 0.00 0.00 0.00 4.90 2.20 0.0000 0.0000 0.0000 0.0000 0 0
+3788 0 """3CLAIRMONT-1""" 1.0230 0.00 0.00 0.00 0.00 0.00 73.60 28.60 0.0000 0.1646 0.0000 0.0000 0 0
+3789 0 """3CLEVELAND-1""" 1.0356 0.00 0.00 0.00 0.00 0.00 32.90 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+3790 2 """3COBB------1""" 1.0400 0.00 476.00 40.00 0.00 421.00 79.30 35.60 0.0000 0.0000 0.0000 0.0000 0 0
+3791 0 """3CORK-ST.--1""" 1.0494 0.00 0.00 0.00 0.00 0.00 17.00 7.20 0.0000 0.0000 0.0000 0.0000 0 0
+3792 0 """3CORNELL---1""" 1.0290 0.00 0.00 0.00 0.00 0.00 33.30 12.00 0.0000 0.1981 0.0000 0.0000 0 0
+3793 0 """3COTTEGE-GR1""" 1.0738 0.00 0.00 0.00 0.00 0.00 1.70 0.70 0.0000 0.0000 0.0000 0.0000 0 0
+3794 0 """3CROTON----1""" 1.0342 0.00 29.00 0.00 0.00 0.00 10.40 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+3795 0 """3DEAN-RD.--1""" 1.0521 0.00 0.00 0.00 0.00 0.00 3.60 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+3796 0 """3DEJA------1""" 1.0414 0.00 0.00 0.00 0.00 0.00 13.80 -2.50 0.0000 0.0000 0.0000 0.0000 0 0
+3797 0 """3DELANEY---1""" 1.0469 0.00 0.00 0.00 0.00 0.00 64.80 25.10 0.0000 0.2698 0.0000 0.0000 0 0
+3798 0 """3DELH1-----1""" 1.0442 0.00 0.00 0.00 0.00 0.00 36.90 -10.00 0.0000 0.2783 0.0000 0.0000 0 0
+3799 0 """3DORT------1""" 1.0425 0.00 0.00 0.00 0.00 0.00 106.40 37.90 0.0000 0.4626 0.0000 0.0000 0 0
+3800 0 """3DOW-CHLOR.1""" 1.0243 0.00 0.00 0.00 0.00 0.00 49.00 24.00 0.0000 0.0000 0.0000 0.0000 0 0
+3801 0 """3DU-PONTE--1""" 1.0355 0.00 0.00 0.00 0.00 0.00 2.20 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3802 0 """3D-4CPCO-120""" 1.0444 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3803 0 """3EDENVILLE-1""" 1.0405 0.00 0.00 0.00 0.00 0.00 7.10 -4.70 0.0000 0.0000 0.0000 0.0000 0 0
+3804 2 """3ELM-STREET1""" 1.0444 0.00 29.00 0.00 0.00 7.00 32.70 23.30 0.0000 0.0000 0.0000 0.0000 0 0
+3805 0 """3EMMET-----1""" 1.1457 0.00 0.00 0.00 0.00 0.00 21.00 3.90 0.0000 0.0000 0.0000 0.0000 0 0
+3806 0 """3EUREKA----1""" 1.0398 0.00 0.00 0.00 0.00 0.00 21.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+3807 0 """3FELCH-RD.-1""" 1.0331 0.00 0.00 0.00 0.00 0.00 14.00 5.90 0.0000 0.0000 0.0000 0.0000 0 0
+3808 0 """3FISHER----1""" 1.0445 0.00 0.00 0.00 0.00 0.00 14.10 4.60 0.0000 0.0000 0.0000 0.0000 0 0
+3809 0 """3FOUNDRY---1""" 1.0316 0.00 0.00 0.00 0.00 0.00 31.70 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+3810 0 """3FOUR-MILE-1""" 1.0406 0.00 2.00 0.00 0.00 0.00 111.80 32.80 0.0000 0.1000 0.0000 0.0000 0 0
+3811 0 """3GARFIELD--1""" 1.0354 0.00 0.00 0.00 0.00 0.00 72.20 32.00 0.0000 0.0353 0.0000 0.0000 0 0
+3812 2 """3GAYLORD---1""" 1.1519 0.00 60.00 0.00 0.00 15.00 10.10 1.90 0.0000 0.0826 0.0000 0.0000 0 0
+3813 0 """3GENOA-----1""" 1.0678 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3814 0 """3GLEANER---1""" 1.0283 0.00 0.00 0.00 0.00 0.00 18.80 6.90 0.0000 0.0000 0.0000 0.0000 0 0
+3815 0 """3GREY-IRON-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 53.50 17.50 0.0000 0.0000 0.0000 0.0000 0 0
+3816 0 """3HALSEY----1""" 1.0458 0.00 0.00 0.00 0.00 0.00 20.40 3.80 0.0000 0.1148 0.0000 0.0000 0 0
+3817 0 """3HARDY-DAM-1""" 1.0343 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3818 0 """3HAZELWOOD-1""" 1.0525 0.00 0.00 0.00 0.00 0.00 39.10 7.20 0.0000 0.0400 0.0000 0.0000 0 0
+3819 0 """3HEMPHILL--1""" 1.0447 0.00 0.00 0.00 0.00 0.00 134.10 62.70 0.0000 0.6928 0.0000 0.0000 0 0
+3820 0 """3HIGGINS---1""" 1.1065 0.00 0.00 0.00 0.00 0.00 18.90 2.80 0.0000 0.0000 0.0000 0.0000 0 0
+3821 0 """3HODENPYL--1""" 1.0686 0.00 0.00 0.00 0.00 0.00 8.40 -0.80 0.0000 0.0000 0.0000 0.0000 0 0
+3822 0 """3HOLLAN-RD-1""" 1.0168 0.00 0.00 0.00 0.00 0.00 42.80 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+3823 0 """3HOOKER----1""" 1.0348 0.00 0.00 0.00 0.00 0.00 26.40 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3824 0 """3HUGHES-RD-1""" 1.0377 0.00 0.00 0.00 0.00 0.00 21.80 4.80 0.0000 0.0000 0.0000 0.0000 0 0
+3825 0 """3IOSCO-----1""" 1.1238 0.00 19.00 0.00 0.00 0.00 12.80 5.70 0.0000 0.0263 0.0000 0.0000 0 0
+3826 0 """3ISLAND-RD-1""" 1.0435 0.00 0.00 0.00 0.00 0.00 29.20 -2.90 0.0000 0.1086 0.0000 0.0000 0 0
+3827 2 """3KARN------1""" 1.0563 0.00 498.00 0.00 0.00 337.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3828 0 """3KENOWA----3""" 1.0865 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3829 0 """3LATSON----1""" 1.0558 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3830 0 """3LAWNDALE--1""" 1.0265 0.00 0.00 0.00 0.00 0.00 39.90 17.00 0.0000 0.0000 0.0000 0.0000 0 0
+3831 0 """3LAYTON----1""" 1.0246 0.00 0.00 0.00 0.00 0.00 16.10 1.80 0.0000 0.0000 0.0000 0.0000 0 0
+3832 0 """3LEWISTON--1""" 1.1462 0.00 0.00 0.00 0.00 0.00 2.60 0.80 0.0000 0.0000 0.0000 0.0000 0 0
+3833 0 """3LINBERGH--1""" 1.0424 0.00 0.00 0.00 0.00 0.00 42.40 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+3834 0 """3LOOK-GLAS-1""" 1.0411 0.00 0.00 0.00 0.00 0.00 25.30 -3.20 0.0000 0.0000 0.0000 0.0000 0 0
+3835 0 """3LOUD------1""" 1.1048 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0040 0.0000 0.0000 0 0
+3836 2 """3LUDINGTON-3""" 1.0978 0.00 0.00 0.00 0.00 200.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3837 0 """3MALLEABLE-1""" 1.0211 0.00 0.00 0.00 0.00 0.00 61.50 17.20 0.0000 0.0000 0.0000 0.0000 0 0
+3838 0 """3MARQUETTE-1""" 1.0444 0.00 2.00 0.00 0.00 0.00 17.80 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+3839 0 """3MECOSTA---1""" 1.0370 0.00 0.00 0.00 0.00 0.00 15.90 3.60 0.0000 0.0000 0.0000 0.0000 0 0
+3840 0 """3MEDUSA----1""" 1.1103 0.00 0.00 0.00 0.00 0.00 11.50 1.60 0.0000 0.0000 0.0000 0.0000 0 0
+3841 0 """3MILES-RD.-1""" 1.1103 0.00 0.00 0.00 0.00 0.00 7.70 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+3842 0 """3MILHAM----1""" 1.0437 0.00 0.00 0.00 0.00 0.00 36.30 9.60 0.0000 0.1413 0.0000 0.0000 0 0
+3843 0 """3MIO-------1""" 1.1407 0.00 9.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.2067 0.0000 0.0000 0 0
+3844 0 """3MONITOR---1""" 1.0319 0.00 0.00 0.00 0.00 0.00 41.40 14.30 0.0000 0.0503 0.0000 0.0000 0 0
+3845 0 """3MOORE-RD--1""" 0.9940 0.00 0.00 0.00 0.00 0.00 40.80 10.60 0.0000 0.0000 0.0000 0.0000 0 0
+3846 2 """3MORROW----1""" 1.0500 0.00 130.00 0.00 0.00 168.00 80.20 31.20 0.0000 0.1836 0.0000 0.0000 0 0
+3847 0 """3MUSKEGN-HT1""" 1.0212 0.00 0.00 0.00 0.00 0.00 72.90 52.50 0.0000 0.0000 0.0000 0.0000 0 0
+3848 0 """3NODULAR---1""" 1.0228 0.00 0.00 0.00 0.00 0.00 34.40 16.80 0.0000 0.0000 0.0000 0.0000 0 0
+3849 0 """3N.BELDING-1""" 1.0422 0.00 0.00 0.00 0.00 0.00 20.70 -2.30 0.0000 0.1000 0.0000 0.0000 0 0
+3850 0 """3OAKLAND---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 17.80 5.80 0.0000 0.0000 0.0000 0.0000 0 0
+3851 0 """3OGEMAW----1""" 1.0698 0.00 0.00 0.00 0.00 0.00 11.90 -7.50 0.0000 0.0000 0.0000 0.0000 0 0
+3852 0 """3OWOSSO----1""" 1.0282 0.00 0.00 0.00 0.00 0.00 29.20 10.40 0.0000 0.0000 0.0000 0.0000 0 0
+3853 0 """3PAGE------1""" 1.0180 0.00 0.00 0.00 0.00 0.00 45.80 5.40 0.0000 0.0800 0.0000 0.0000 0 0
+3854 2 """3PALISADES-3""" 1.0392 0.00 701.70 0.00 0.00 418.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3855 0 """3PASEDENA--1""" 1.0263 0.00 0.00 0.00 0.00 0.00 48.70 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+3856 0 """3PENN-DIXIE1""" 1.1463 0.00 0.00 0.00 0.00 0.00 6.60 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+3857 0 """3PT.CALCIT-1""" 1.1721 0.00 0.00 0.00 0.00 0.00 9.40 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+3858 0 """3RAISIN----1""" 1.0280 0.00 0.00 0.00 0.00 0.00 21.10 8.80 0.0000 0.0000 0.0000 0.0000 0 0
+3859 0 """3RICE-CREK-1""" 1.0323 0.00 0.00 0.00 0.00 0.00 29.10 1.20 0.0000 0.2540 0.0000 0.0000 0 0
+3860 0 """3RIFLE-RIV.1""" 1.0698 0.00 0.00 0.00 0.00 0.00 2.40 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+3861 2 """3RIGGSVIL--1""" 1.1813 0.00 25.00 0.00 0.00 6.00 22.30 2.50 0.0000 0.1838 0.0000 0.0000 0 0
+3862 0 """3RIVERVIEW-1""" 1.0513 0.00 0.00 0.00 0.00 0.00 79.60 28.70 0.0000 0.3312 0.0000 0.0000 0 0
+3863 0 """3ROCKPORT--1""" 1.1679 0.00 0.00 0.00 0.00 0.00 1.00 0.20 0.0000 0.0000 0.0000 0.0000 0 0
+3864 0 """3RONDO-----1""" 1.1683 0.00 0.00 0.00 0.00 0.00 3.40 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+3865 0 """3SAGNAW-R.-1""" 1.0316 0.00 0.00 0.00 0.00 0.00 63.80 32.80 0.0000 0.1568 0.0000 0.0000 0 0
+3866 0 """3SAMARIA---1""" 1.0341 0.00 0.00 0.00 0.00 0.00 23.10 10.70 0.0000 0.0000 0.0000 0.0000 0 0
+3867 0 """3SCOTT-LK.-1""" 1.0470 0.00 0.00 0.00 0.00 0.00 17.10 5.70 0.0000 0.0000 0.0000 0.0000 0 0
+3868 0 """3SPAULDING-1""" 1.0412 0.00 0.00 0.00 0.00 0.00 70.40 16.20 0.0000 0.0800 0.0000 0.0000 0 0
+3869 0 """3SPRUCE----1""" 1.1468 0.00 0.00 0.00 0.00 0.00 4.40 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+3870 0 """3STAMPG-PLT1""" 1.0446 0.00 0.00 0.00 0.00 0.00 11.60 3.80 0.0000 0.0000 0.0000 0.0000 0 0
+3871 0 """3STRONACH--1""" 1.0397 0.00 0.00 0.00 0.00 0.00 21.20 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+3872 0 """3STOVER----1""" 1.1154 0.00 0.00 0.00 0.00 0.00 6.60 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+3873 0 """3SUMMERTON-1""" 1.0218 0.00 0.00 0.00 0.00 0.00 24.20 -2.10 0.0000 0.0000 0.0000 0.0000 0 0
+3874 0 """3TALLMADGE-3""" 1.0815 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3875 0 """3TALLMADGE-1""" 1.0662 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3876 0 """3THETFORD--3""" 1.0579 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3877 2 """3THETFORD--1""" 1.0516 0.00 146.00 0.00 0.00 36.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3878 0 """3TITTABAW--3""" 1.0615 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3879 0 """3TITTABAW--1""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3880 0 """3TIPPY-DAM-1""" 1.0648 0.00 29.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.1255 0.0000 0.0000 0 0
+3881 0 """3TOMPKINS--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3882 0 """3TUSC.TAP.-1""" 1.0626 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3883 0 """3TWINING---1""" 1.0667 0.00 0.00 0.00 0.00 0.00 8.70 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+3884 0 """3UPJOHN----1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.80 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+3885 2 """3VERONA----1""" 1.0467 0.00 29.00 0.00 0.00 7.00 78.70 10.40 0.0000 0.4710 0.0000 0.0000 0 0
+3886 0 """3VEVAY-----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 18.30 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+3887 0 """3WACKERLY--1""" 1.0295 0.00 0.00 0.00 0.00 0.00 29.80 9.70 0.0000 0.0000 0.0000 0.0000 0 0
+3888 0 """3WARREN----1""" 1.0665 0.00 0.00 0.00 0.00 0.00 19.20 14.60 0.0000 0.3967 0.0000 0.0000 0 0
+3889 0 """3WASHTENAW-1""" 1.0009 0.00 0.00 0.00 0.00 0.00 16.90 -3.00 0.0000 0.0000 0.0000 0.0000 0 0
+3890 2 """3WEADOCK-B-1""" 1.0400 0.00 299.00 90.00 0.00 226.00 35.70 15.30 0.0000 0.0330 0.0000 0.0000 0 0
+3891 2 """3WEADOCK-W-1""" 1.0476 0.00 319.00 0.00 0.00 191.00 36.60 15.30 0.0000 0.0000 0.0000 0.0000 0 0
+3892 0 """3WEALTHY---1""" 1.0461 0.00 0.00 0.00 0.00 0.00 116.80 51.00 0.0000 0.0000 0.0000 0.0000 0 0
+3893 0 """3WEXFORD---1""" 1.0784 0.00 0.00 0.00 0.00 0.00 24.60 -4.50 0.0000 0.0990 0.0000 0.0000 0 0
+3894 0 """3WHITE-LK.-1""" 1.0342 0.00 9.00 0.00 0.00 0.00 11.80 6.80 0.0000 0.0000 0.0000 0.0000 0 0
+3895 2 """3WHITING---1""" 1.0500 0.00 331.00 900.00 0.00 206.00 14.30 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3896 0 """3WILLARD---1""" 1.0411 0.00 0.00 0.00 0.00 0.00 23.60 3.70 0.0000 0.0000 0.0000 0.0000 0 0
+3897 0 """4ALLANBURG-2""" 1.1270 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3898 0 """4BEACH-----2""" 1.0829 0.00 0.00 0.00 0.00 0.00 256.30 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+3899 2 """4BEAUHARN--2""" 1.1266 0.00 600.00 500.00 -25.00 50.00 19.70 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+3900 2 """4BECK------2""" 1.1280 0.00 1011.00 1890.00 -100.00 600.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3901 0 """4-BP-76-REG2""" 1.0551 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3902 0 """4BROCKVILLE2""" 1.0779 0.00 0.00 0.00 0.00 0.00 76.90 31.50 0.0000 0.0000 0.0000 0.0000 0 0
+3903 0 """4BUCHANNAN-2""" 1.0643 0.00 0.00 0.00 0.00 0.00 600.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+3904 2 """4BUCHANNAN-1""" 1.0472 0.00 0.00 -250.00 -25.00 200.00 326.80 52.40 0.0000 0.0000 0.0000 0.0000 0 0
+3905 0 """4BURLINGTON2""" 1.0779 0.00 0.00 0.00 0.00 0.00 900.00 300.00 0.0000 0.0000 0.0000 0.0000 0 0
+3906 0 """4CHATHAM---2""" 1.0922 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3907 2 """4CHATS-FALL2""" 1.1200 0.00 168.00 670.00 -30.00 70.00 7.00 3.30 0.0000 0.0000 0.0000 0.0000 0 0
+3908 2 """4CHERRYWOOD2""" 1.0770 0.00 1000.00 4190.00 -300.00 600.00 650.00 212.60 0.0000 0.0000 0.0000 0.0000 0 0
+3909 0 """4CRAWFORD--1""" 1.0371 0.00 0.00 0.00 0.00 0.00 64.00 28.00 0.0000 0.0000 0.0000 0.0000 0 0
+3910 2 """4DESJOACH--2""" 1.1740 0.00 370.00 590.00 -50.00 175.00 16.10 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+3911 2 """4DETWEILER-2""" 1.0550 0.00 0.00 230.00 -35.00 50.00 600.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+3912 2 """4DOBBIN----2""" 1.0510 0.00 222.00 -310.00 -50.00 75.00 160.00 65.60 0.0000 0.0000 0.0000 0.0000 0 0
+3913 2 """4DOUGLAS-PT2""" 1.1000 0.00 200.00 370.00 -50.00 80.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3914 0 """4EASTON-JCT2""" 1.0823 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3915 0 """4ESSA--230-2""" 1.0904 0.00 0.00 0.00 0.00 0.00 211.00 57.00 0.0000 0.0000 0.0000 0.0000 0 0
+3916 0 """4ESSEX-115-1""" 1.0395 0.00 0.00 0.00 0.00 0.00 84.00 -6.00 0.0000 0.0000 0.0000 0.0000 0 0
+3917 0 """4HANMER----5""" 1.0071 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 -2.1000 0.0000 0.0000 0 0
+3918 0 """4HANNON----2""" 1.0931 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3919 0 """4HANOVER---2""" 1.0859 0.00 0.00 0.00 0.00 0.00 172.20 38.20 0.0000 0.0000 0.0000 0.0000 0 0
+3920 0 """4HAWTHORNE-2""" 1.0613 0.00 0.00 0.00 0.00 0.00 400.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+3921 0 """4HINCHBROOK2""" 1.0640 0.00 0.00 0.00 0.00 0.00 300.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+3922 2 """4HOLDEN----2""" 1.1600 0.00 200.00 150.00 -50.00 90.00 96.00 25.00 0.0000 0.0000 0.0000 0.0000 0 0
+3923 0 """4KEITH-230-2""" 1.0658 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3924 2 """4KEITH-115-1""" 1.0383 0.00 60.00 -100.00 -10.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3925 0 """4KENT------1""" 0.9963 0.00 0.00 0.00 0.00 0.00 122.80 29.80 0.0000 0.0000 0.0000 0.0000 0 0
+3926 0 """4KLEINBURG-5""" 0.9713 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3927 0 """4KLEINBURG-2""" 1.0794 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3928 0 """4LAMBTON-345""" 1.0434 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3929 0 """4LAMBTON---2""" 1.1215 0.00 0.00 0.00 0.00 0.00 27.80 11.70 0.0000 0.0000 0.0000 0.0000 0 0
+3930 2 """4LAMBTON-.24""" 1.1750 0.00 1450.00 7430.00 -500.00 1080.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3931 0 """4LAUZON----2""" 1.0537 0.00 0.00 0.00 0.00 0.00 86.00 20.00 0.0000 0.0000 0.0000 0.0000 0 0
+3932 0 """4LAUZON----1""" 1.0421 0.00 0.00 0.00 0.00 0.00 124.70 16.20 0.0000 0.0000 0.0000 0.0000 0 0
+3933 0 """4LEASIDE---2""" 1.0681 0.00 0.00 0.00 0.00 0.00 500.00 150.00 0.0000 0.0000 0.0000 0.0000 0 0
+3934 0 """4-L-33-P---2""" 1.0530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3935 3 """4MANBY-----2""" 1.0650 0.00 726.60 450.00 0.00 0.00 950.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+3936 2 """4MARTINDALE2""" 1.1071 0.00 435.00 -500.00 -50.00 100.00 627.00 98.50 0.0000 0.0000 0.0000 0.0000 0 0
+3937 0 """4MERIVALE--2""" 0.9920 0.00 0.00 0.00 0.00 0.00 244.00 95.00 0.0000 0.0000 0.0000 0.0000 0 0
+3938 0 """4MIDDLEPORT2""" 1.1049 0.00 0.00 0.00 0.00 0.00 40.00 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+3939 0 """4MINDEN----2""" 1.1309 0.00 0.00 0.00 0.00 0.00 92.60 31.90 0.0000 0.0000 0.0000 0.0000 0 0
+3940 2 """4NANTICO---2""" 1.1570 0.00 1940.00 7680.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3941 2 """4NORTH-BAY-2""" 1.1500 0.00 245.00 -110.00 -50.00 100.00 27.20 11.90 0.0000 0.0000 0.0000 0.0000 0 0
+3942 0 """4NEALE-----2""" 1.0954 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3943 0 """4ORANGEVIL-2""" 1.0761 0.00 0.00 0.00 0.00 0.00 67.00 40.00 0.0000 0.0000 0.0000 0.0000 0 0
+3944 0 """4-PA-27-REG2""" 1.0521 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3945 0 """4PAUGAN----2""" 1.1278 0.00 0.00 0.00 0.00 0.00 8.30 2.50 0.0000 0.0000 0.0000 0.0000 0 0
+3946 0 """4PINARD----5""" 1.0473 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3947 2 """4PINARD----2""" 1.0400 0.00 550.00 600.00 -300.00 300.00 0.00 0.00 0.0000 -1.0470 0.0000 0.0000 0 0
+3948 0 """4PORCUPINE-5""" 1.0447 0.00 0.00 0.00 0.00 0.00 90.00 32.10 0.0000 0.0000 0.0000 0.0000 0 0
+3949 0 """4RICHVIEW--2""" 1.0681 0.00 0.00 0.00 0.00 0.00 800.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+3950 2 """4STLAWRENCE2""" 1.1139 0.00 744.00 3000.00 -100.00 300.00 250.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+3951 0 """4STLAWRENCE1""" 1.0058 0.00 0.00 0.00 0.00 0.00 49.50 21.00 0.0000 0.0000 0.0000 0.0000 0 0
+3952 0 """4STTHOMAS--1""" 1.0326 0.00 0.00 0.00 0.00 0.00 165.00 11.00 0.0000 0.0000 0.0000 0.0000 0 0
+3953 0 """4SANDWICH--2""" 1.0611 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3954 0 """4SAND.WEST-2""" 1.0622 0.00 0.00 0.00 0.00 0.00 114.80 51.60 0.0000 0.0000 0.0000 0.0000 0 0
+3955 0 """4SCOTT-----2""" 1.0961 0.00 0.00 0.00 0.00 0.00 160.00 41.70 0.0000 0.0000 0.0000 0.0000 0 0
+3956 0 """4SCOTT-----1""" 1.0396 0.00 0.00 0.00 0.00 0.00 169.50 36.20 0.0000 0.0000 0.0000 0.0000 0 0
+3957 0 """4WONDERLAND2""" 1.0664 0.00 0.00 0.00 0.00 0.00 79.30 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+3958 0 """5BAYSHORE-T3""" 1.0112 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3959 2 """5BAYSHORE-T1""" 1.0300 0.00 600.00 2680.00 -1000.00 1000.00 760.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+3960 2 """5LEMOYNE--T3""" 1.0120 0.00 0.00 1900.00 -1000.00 1000.00 175.00 90.80 0.0000 0.0000 0.0000 0.0000 0 0
+3961 0 """5BENTON-HBR3""" 1.0329 0.00 0.00 0.00 0.00 0.00 330.00 16.90 0.0000 0.0000 0.0000 0.0000 0 0
+3962 2 """5D.C.COOK--3""" 1.0300 0.00 2501.67 990.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3963 2 """5DUMONT----3""" 1.0300 0.00 850.00 5270.00 -1000.00 1000.00 167.00 50.00 0.0000 0.0000 0.0000 0.0000 0 0
+3964 2 """5E.LIMA----3""" 0.9900 0.00 80.00 860.00 -1000.00 1000.00 350.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+3965 2 """5FOSTORIA--3""" 1.0000 0.00 0.00 -490.00 -1000.00 1000.00 254.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+3966 2 """5OLIVE-----3""" 1.0200 0.00 0.00 -2130.00 -1000.00 1000.00 394.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+3967 2 """5ROBISON-PK3""" 0.9800 0.00 0.00 -630.00 -1000.00 1000.00 460.00 169.80 0.0000 0.0000 0.0000 0.0000 0 0
+3968 2 """5SORENSON--3""" 1.0000 0.00 163.00 850.00 -1000.00 1000.00 371.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+3969 2 """5TWIN-BRCH-3""" 1.0200 0.00 0.00 -1660.00 -1000.00 1000.00 700.00 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+3970 2 """5LEWISTON-Y2""" 1.0520 0.00 1209.10 -190.00 -200.00 420.00 654.10 -45.40 0.0000 0.0000 0.0000 0.0000 0 0
+3971 2 """5MOSSES---Y2""" 1.0500 0.00 400.00 620.00 0.00 130.00 505.90 96.60 0.0000 0.0000 0.0000 0.0000 0 0
+3972 2 """5PACKARD--Y2""" 1.0520 0.00 0.00 -160.00 -1000.00 100.00 641.40 -0.60 0.0000 0.0000 0.0000 0.0000 0 0
+3973 0 """ADAIR-------""" 1.0193 0.00 0.00 0.00 0.00 0.00 2.18 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+3974 0 """ADAMS-----40""" 1.0140 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+3975 0 """1AINSWORTH--""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.17 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+3976 0 """ALGONAC-----""" 1.0163 0.00 0.00 0.00 0.00 0.00 7.98 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+3977 0 """ALMONT------""" 0.9849 0.00 0.00 0.00 0.00 0.00 3.28 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+3978 0 """ANDERSON----""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.59 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+3979 0 """APPLEGATE---""" 0.9866 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+3980 0 """ARGO--------""" 1.0307 0.00 0.00 0.00 0.00 0.00 23.02 3.93 0.0000 0.1200 0.0000 0.0000 0 0
+3981 0 """ARMADA------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.52 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+3982 0 """ARROWHEAD-40""" 1.0217 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3983 0 """ATTICA------""" 0.9842 0.00 0.00 0.00 0.00 0.00 1.34 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+3984 0 """AUBURN-HTS-1""" 1.0049 0.00 0.00 0.00 0.00 0.00 6.50 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+3985 0 """AVOCA-------""" 0.9930 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+3986 0 """AVON--------""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+3987 0 """BAD-AXE-40--""" 0.9987 0.00 0.00 0.00 0.00 0.00 6.13 2.12 0.0000 0.0660 0.0000 0.0000 0 0
+3988 0 """BALDWIN--EQ1""" 1.0224 0.00 0.00 0.00 0.00 0.00 8.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+3989 0 """BARNES-LAKE-""" 0.9888 0.00 0.00 0.00 0.00 0.00 2.20 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+3990 0 """1BARTLETT-CP""" 1.0119 0.00 0.00 0.00 0.00 0.00 7.40 5.87 0.0000 0.0000 0.0000 0.0000 0 0
+3991 0 """BAYPORT-----""" 0.9869 0.00 0.00 0.00 0.00 0.00 1.26 2.12 0.0000 0.0000 0.0000 0.0000 0 0
+3992 0 """BEAVER------""" 0.9956 0.00 0.00 0.00 0.00 0.00 0.17 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+3993 0 """BELLEVILLE--""" 1.0212 0.00 0.00 0.00 0.00 0.00 6.05 2.66 0.0000 0.0000 0.0000 0.0000 0 0
+3994 0 """BERLIN-FUT74""" 1.0348 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+3995 0 """BERNARD-----""" 0.9996 0.00 0.00 0.00 0.00 0.00 2.10 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+3996 0 """BINGHAM--EQ1""" 1.0029 0.00 0.00 0.00 0.00 0.00 3.28 1.49 0.0000 0.0480 0.0000 0.0000 0 0
+3997 0 """BLOOMFIELD40""" 1.0220 0.00 0.00 0.00 0.00 0.00 79.00 39.62 0.0000 0.0900 0.0000 0.0000 0 0
+3998 0 """BOND,MADRID-""" 1.0551 0.00 0.00 0.00 0.00 0.00 2.18 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+3999 0 """BREST-------""" 1.0358 0.00 0.00 0.00 0.00 0.00 5.04 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4000 0 """BREWER------""" 1.0045 0.00 0.00 0.00 0.00 0.00 2.94 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+4001 0 """BRIGHTON----""" 1.0076 0.00 0.00 0.00 0.00 0.00 5.96 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+4002 0 """BROWN-CITY--""" 0.9725 0.00 0.00 0.00 0.00 0.00 3.28 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+4003 0 """BROWNSTOWN40""" 1.0348 0.00 0.00 0.00 0.00 0.00 36.46 24.76 0.0000 0.0000 0.0000 0.0000 0 0
+4004 0 """BRAY--------""" 0.9770 0.00 0.00 0.00 0.00 0.00 1.51 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4005 0 """BRUCE---EQ1-""" 1.0034 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+4006 0 """BUNCE-CRK-40""" 1.0333 0.00 0.00 0.00 0.00 0.00 7.73 4.25 0.0000 0.0000 0.0000 0.0000 0 0
+4007 2 """BUNCE-CRK-24""" 1.0607 0.00 84.00 480.00 0.00 480.00 37.72 22.10 0.0000 0.0000 0.0000 0.0000 0 0
+4008 0 """CALUMET-----""" 0.9844 0.00 0.00 0.00 0.00 0.00 3.11 1.91 0.0000 0.0000 0.0000 0.0000 0 0
+4009 0 """CAMDEN-2,5--""" 1.0033 0.00 0.00 0.00 0.00 0.00 9.41 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+4010 0 """CAMPUS-1----""" 1.0279 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+4011 0 """CAMPUS-2----""" 1.0216 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+4012 0 """CAPAC-------""" 0.9880 0.00 0.00 0.00 0.00 0.00 3.11 1.38 0.0000 0.0660 0.0000 0.0000 0 0
+4013 0 """CARLETON----""" 1.0054 0.00 0.00 0.00 0.00 0.00 1.76 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+4014 0 """CARO-1------""" 1.0018 0.00 0.00 0.00 0.00 0.00 1.68 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4015 0 """CARO-T.E.C.-""" 0.9962 0.00 0.00 0.00 0.00 0.00 1.76 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+4016 0 """CARPENTER---""" 1.0007 0.00 0.00 0.00 0.00 0.00 8.15 3.29 0.0000 0.1140 0.0000 0.0000 0 0
+4017 0 """CARSONVILLE-""" 0.9885 0.00 0.00 0.00 0.00 0.00 0.67 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4018 0 """CARTER------""" 1.0069 0.00 0.00 0.00 0.00 0.00 15.04 7.54 0.0000 0.0000 0.0000 0.0000 0 0
+4019 0 """CASEVILLE---""" 0.9683 0.00 0.00 0.00 0.00 0.00 3.02 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+4020 0 """CASEY-------""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.18 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+4021 0 """CASS-CITY---""" 1.0011 0.00 0.00 0.00 0.00 0.00 5.04 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+4022 0 """CHERRY-HILL-""" 0.9566 0.00 0.00 0.00 0.00 0.00 0.92 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4023 0 """CHESTERFLD-1""" 1.0264 0.00 0.00 0.00 0.00 0.00 3.95 0.53 0.0000 0.0480 0.0000 0.0000 0 0
+4024 0 """CHESTERFLD-2""" 1.0088 0.00 0.00 0.00 0.00 0.00 8.48 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+4025 0 """CHESTNUT-40-""" 1.0150 0.00 0.00 0.00 0.00 0.00 75.20 29.50 0.0000 0.3600 0.0000 0.0000 0 0
+4026 0 """CHILSON-----""" 1.0175 0.00 0.00 0.00 0.00 0.00 1.51 0.85 0.0000 0.0660 0.0000 0.0000 0 0
+4027 0 """CLARKSTON-2-""" 1.0013 0.00 0.00 0.00 0.00 0.00 4.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+4028 0 """CLIFFORD----""" 0.9881 0.00 0.00 0.00 0.00 0.00 1.34 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+4029 0 """COATS-------""" 1.0093 0.00 0.00 0.00 0.00 0.00 3.36 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4030 0 """CODY-40-----""" 1.0456 0.00 0.00 0.00 0.00 0.00 19.99 6.27 0.0000 0.1800 0.0000 0.0000 0 0
+4031 0 """COLFAX---EQ1""" 1.0885 0.00 14.00 40.00 0.00 0.00 4.87 2.55 0.0000 0.0480 0.0000 0.0000 0 0
+4032 0 """COLLIER----1""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+4033 0 """CLOTH-PR.-1-""" 1.0059 0.00 0.00 0.00 0.00 0.00 3.00 -0.37 0.0000 0.0000 0.0000 0.0000 0 0
+4034 0 """COLUMBIAVILE""" 0.9871 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4035 0 """COMMERCE-LK-""" 0.9872 0.00 0.00 0.00 0.00 0.00 6.05 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+4036 0 """CORTLAND-24-""" 1.0112 0.00 0.00 0.00 0.00 0.00 204.10 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+4037 0 """CROSWELL-EQ1""" 0.9883 0.00 0.00 0.00 0.00 0.00 5.96 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+4038 0 """CROWN-1-----""" 1.0243 0.00 0.00 0.00 0.00 0.00 10.16 0.32 0.0000 0.0900 0.0000 0.0000 0 0
+4039 0 """CROWN-2-----""" 0.9891 0.00 0.00 0.00 0.00 0.00 4.54 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+4040 0 """CULVER------""" 0.9954 0.00 0.00 0.00 0.00 0.00 8.57 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+4041 0 """CUSTER-24---""" 1.0216 0.00 14.00 40.00 0.00 0.00 61.40 33.15 0.0000 0.0000 0.0000 0.0000 0 0
+4042 0 """DADE-1------""" 1.0165 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+4043 0 """DADE-2------""" 1.0158 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+4044 0 """DARWIN-1----""" 1.0440 0.00 0.00 0.00 0.00 0.00 4.87 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+4045 0 """DARWIN-2----""" 1.0408 0.00 0.00 0.00 0.00 0.00 4.79 1.27 0.0000 0.0480 0.0000 0.0000 0 0
+4046 0 """DAVIS---EQ1-""" 0.9767 0.00 0.00 0.00 0.00 0.00 20.30 10.25 0.0000 0.0900 0.0000 0.0000 0 0
+4047 0 """DAYTON-40---""" 1.0256 0.00 5.00 10.00 0.00 0.00 5.71 2.97 0.0000 0.0660 0.0000 0.0000 0 0
+4048 0 """DECKR-+-ASPN""" 0.9878 0.00 0.00 0.00 0.00 0.00 2.52 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4049 0 """DEWEY-2-----""" 0.9865 0.00 0.00 0.00 0.00 0.00 11.34 3.82 0.0000 0.0000 0.0000 0.0000 0 0
+4050 0 """DEXTER---EQ1""" 1.0348 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0480 0.0000 0.0000 0 0
+4051 0 """DILLARD-1---""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4052 0 """DOVER-1-----""" 1.0030 0.00 0.00 0.00 0.00 0.00 3.78 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+4053 0 """DOVER-2-----""" 0.9997 0.00 0.00 0.00 0.00 0.00 3.19 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+4054 0 """DREXEL-2----""" 0.9883 0.00 0.00 0.00 0.00 0.00 9.24 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4055 0 """DRYDEN------""" 0.9797 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+4056 0 """ECKLES-2----""" 0.9704 0.00 0.00 0.00 0.00 0.00 4.62 -0.74 0.0000 0.0000 0.0000 0.0000 0 0
+4057 0 """EDGEWATER---""" 0.9989 0.00 0.00 0.00 0.00 0.00 1.30 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+4058 0 """ELKTON------""" 0.9804 0.00 0.00 0.00 0.00 0.00 3.36 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4059 0 """ELM-40------""" 1.0242 0.00 0.00 0.00 0.00 0.00 107.77 79.00 0.0000 0.2850 0.0000 0.0000 0 0
+4060 0 """EMERICK-1---""" 1.0099 0.00 0.00 0.00 0.00 0.00 8.82 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+4061 0 """EMMETT------""" 0.9925 0.00 0.00 0.00 0.00 0.00 1.01 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4062 0 """ENGLISH-----""" 1.0024 0.00 0.00 0.00 0.00 0.00 1.68 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4063 0 """ERIN40------""" 1.0115 0.00 0.00 0.00 0.00 0.00 103.40 41.50 0.0000 0.1800 0.0000 0.0000 0 0
+4064 0 """EVERGREEN-40""" 1.0364 0.00 0.00 0.00 0.00 0.00 213.20 82.90 0.0000 0.5100 0.0000 0.0000 0 0
+4065 0 """FAIRGROVE---""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.02 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4066 0 """FALCON-1----""" 1.0232 0.00 0.00 0.00 0.00 0.00 9.32 6.12 0.0000 0.0000 0.0000 0.0000 0 0
+4067 0 """FALCON-2----""" 1.0207 0.00 0.00 0.00 0.00 0.00 7.56 4.99 0.0000 0.0000 0.0000 0.0000 0 0
+4068 0 """FISHER------""" 1.0370 0.00 0.00 0.00 0.00 0.00 5.96 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+4069 0 """FLAT-ROCK-1-""" 1.0195 0.00 0.00 0.00 0.00 0.00 1.68 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+4070 0 """FLEMING-----""" 1.0067 0.00 0.00 0.00 0.00 0.00 4.54 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+4071 0 """FORESTER----""" 0.9770 0.00 0.00 0.00 0.00 0.00 0.76 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4072 0 """FRANK2---EQ1""" 0.9722 0.00 0.00 0.00 0.00 0.00 6.10 1.50 0.0000 0.0000 0.0000 0.0000 0 0
+4073 0 """FREEDOM-----""" 0.9954 0.00 0.00 0.00 0.00 0.00 1.10 0.12 0.0000 0.0000 0.0000 0.0000 0 0
+4074 0 """FRENCHLND-2-""" 1.0263 0.00 0.00 0.00 0.00 0.00 5.70 4.37 0.0000 0.1200 0.0000 0.0000 0 0
+4075 0 """FRISBIE-24--""" 1.0881 0.00 0.00 0.00 0.00 0.00 222.68 75.01 0.0000 0.0000 0.0000 0.0000 0 0
+4076 0 """FULLER-1----""" 1.0203 0.00 0.00 0.00 0.00 0.00 2.52 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+4077 0 """FULLER-2----""" 1.0257 0.00 0.00 0.00 0.00 0.00 2.44 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+4078 0 """GAGETOWN----""" 1.0203 0.00 0.00 0.00 0.00 0.00 1.18 0.42 0.0000 0.0480 0.0000 0.0000 0 0
+4079 0 """1GARNER-CP--""" 1.0195 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4080 0 """GENOA-40----""" 1.0191 0.00 0.00 0.00 0.00 0.00 12.94 6.37 0.0000 0.1800 0.0000 0.0000 0 0
+4081 0 """GLOBE-------""" 0.9892 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4082 0 """GOODISON----""" 0.9861 0.00 0.00 0.00 0.00 0.00 7.56 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+4083 0 """GRAF--------""" 0.9961 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+4084 0 """HAMBURG-----""" 1.0440 0.00 0.00 0.00 0.00 0.00 2.44 0.64 0.0000 0.0660 0.0000 0.0000 0 0
+4085 0 """HANCOCK-40--""" 1.0036 0.00 100.81 190.00 0.00 0.00 29.57 15.62 0.0000 0.0000 0.0000 0.0000 0 0
+4086 0 """HANNAN-1---1""" 1.0048 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+4087 0 """HARTLAND----""" 0.9948 0.00 0.00 0.00 0.00 0.00 2.18 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4088 0 """HEMLOCK-1---""" 1.0293 0.00 0.00 0.00 0.00 0.00 6.00 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+4089 0 """HEMLOCK-2---""" 1.0364 0.00 0.00 0.00 0.00 0.00 6.97 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+4090 2 """HINES-40----""" 0.9900 0.00 0.00 120.00 0.00 18.00 115.58 95.12 0.0000 0.3600 0.0000 0.0000 0 0
+4091 0 """HOBART-TAP--""" 1.0363 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4092 0 """HOBART------""" 1.0414 0.00 0.00 0.00 0.00 0.00 4.03 1.59 0.0000 0.0900 0.0000 0.0000 0 0
+4093 0 """HOWELL-2----""" 1.0160 0.00 0.00 0.00 0.00 0.00 3.95 1.81 0.0000 0.0660 0.0000 0.0000 0 0
+4094 0 """HUNTERS-CR40""" 1.0031 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4095 0 """IDA---------""" 1.0107 0.00 0.00 0.00 0.00 0.00 1.90 -0.12 0.0000 0.0000 0.0000 0.0000 0 0
+4096 0 """IMLAY-CITY--""" 0.9775 0.00 0.00 0.00 0.00 0.00 4.70 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+4097 0 """INLAND---EQ1""" 1.0137 0.00 0.00 0.00 0.00 0.00 5.80 3.51 0.0000 0.0000 0.0000 0.0000 0 0
+4098 0 """IRA---------""" 1.0238 0.00 0.00 0.00 0.00 0.00 2.10 0.85 0.0000 0.0480 0.0000 0.0000 0 0
+4099 0 """IRONTON-24--""" 1.0193 0.00 0.00 0.00 0.00 0.00 177.80 67.00 0.0000 0.0000 0.0000 0.0000 0 0
+4100 0 """IRVING------""" 0.9945 0.00 0.00 0.00 0.00 0.00 5.88 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4101 0 """JACKSON-RD.2""" 1.0346 0.00 0.00 0.00 0.00 0.00 1.01 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4102 0 """JASPER------""" 1.0041 0.00 0.00 0.00 0.00 0.00 0.34 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4103 0 """JORDAN-1----""" 0.9922 0.00 0.00 0.00 0.00 0.00 1.85 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+4104 0 """JOPLIN------""" 0.9903 0.00 0.00 0.00 0.00 0.00 0.76 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4105 0 """KEEGO-2-----""" 0.9789 0.00 0.00 0.00 0.00 0.00 1.10 0.37 0.0000 0.0000 0.0000 0.0000 0 0
+4106 0 """KELLOGG-----""" 0.9988 0.00 0.00 0.00 0.00 0.00 3.78 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4107 0 """1KENNETT-CP-""" 1.0198 0.00 0.00 0.00 0.00 0.00 17.90 8.37 0.0000 0.0000 0.0000 0.0000 0 0
+4108 0 """KIMBALL-----""" 1.0128 0.00 0.00 0.00 0.00 0.00 3.36 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+4109 0 """KINDE-------""" 0.9840 0.00 0.00 0.00 0.00 0.00 1.01 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4110 0 """KING-SEELEY-""" 1.0463 0.00 0.00 0.00 0.00 0.00 2.69 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4111 0 """LAKEPORT----""" 1.0008 0.00 0.00 0.00 0.00 0.00 1.85 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4112 0 """LAKEVILLE---""" 0.9976 0.00 0.00 0.00 0.00 0.00 1.09 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+4113 0 """LAPEER------""" 0.9933 0.00 0.00 0.00 0.00 0.00 3.78 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+4114 0 """LARK-40-----""" 1.0476 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4115 0 """LEE-40------""" 1.0183 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+4116 0 """LIMA--------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.18 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4117 0 """LINCOLN-24--""" 0.9866 0.00 0.00 0.00 0.00 0.00 148.43 124.57 0.0000 0.5700 0.0000 0.0000 0 0
+4118 0 """LUZON-40----""" 1.0040 0.00 0.00 0.00 0.00 0.00 21.67 12.01 0.0000 0.0900 0.0000 0.0000 0 0
+4119 0 """MACOMB-40---""" 1.0194 0.00 0.00 0.00 0.00 0.00 132.00 96.50 0.0000 0.3600 0.0000 0.0000 0 0
+4120 0 """MARINE-CITY-""" 1.0387 0.00 0.00 0.00 0.00 0.00 5.21 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+4121 0 """MARLETTE----""" 0.9794 0.00 0.00 0.00 0.00 0.00 5.29 1.70 0.0000 0.0480 0.0000 0.0000 0 0
+4122 0 """MAYBEE------""" 1.0091 0.00 0.00 0.00 0.00 0.00 1.26 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+4123 0 """MAYVILLE----""" 1.0032 0.00 0.00 0.00 0.00 0.00 2.02 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4124 0 """MEADOW---EQ1""" 0.9943 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+4125 0 """MEDINA-40---""" 1.0197 0.00 0.00 0.00 0.00 0.00 45.80 21.50 0.0000 0.1800 0.0000 0.0000 0 0
+4126 0 """MELVIN------""" 0.9800 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4127 0 """METAMORA----""" 0.9954 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+4128 0 """MILFORD-----""" 1.0033 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+4129 0 """MILLINGTON--""" 0.9808 0.00 0.00 0.00 0.00 0.00 2.35 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4130 0 """MOHAWK-2----""" 0.9967 0.00 0.00 0.00 0.00 0.00 2.10 0.25 0.0000 0.0000 0.0000 0.0000 0 0
+4131 0 """MONARCH-----""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.30 1.50 0.0000 0.0960 0.0000 0.0000 0 0
+4132 0 """1MONTCALM-CP""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4133 0 """MOTT-2------""" 1.0159 0.00 0.00 0.00 0.00 0.00 7.39 3.82 0.0000 0.0900 0.0000 0.0000 0 0
+4134 0 """NATIONAL-1--""" 0.9928 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+4135 0 """NATIONAL-2--""" 0.9997 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+4136 0 """NAVARRE-24--""" 1.0384 0.00 0.00 0.00 0.00 0.00 190.43 107.21 0.0000 0.8700 0.0000 0.0000 0 0
+4137 0 """NEFF--------""" 1.0012 0.00 0.00 0.00 0.00 0.00 5.71 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+4138 0 """NELSON-MILS1""" 1.0263 0.00 0.00 0.00 0.00 0.00 2.94 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4139 0 """NELSON-MILS2""" 1.0270 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+4140 0 """NEW-BALTMR-1""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.10 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4141 0 """NEW-BALTMR23""" 1.0237 0.00 0.00 0.00 0.00 0.00 4.28 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+4142 0 """NEW-BOSTON--""" 1.0111 0.00 0.00 0.00 0.00 0.00 1.93 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4143 0 """NEWBURGH-40-""" 0.9673 0.00 0.00 0.00 0.00 0.00 147.42 102.95 0.0000 0.3000 0.0000 0.0000 0 0
+4144 0 """NEW-HAVEN-1-""" 1.0179 0.00 0.00 0.00 0.00 0.00 3.44 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+4145 0 """NEW-HAVEN-2-""" 1.0220 0.00 0.00 0.00 0.00 0.00 2.69 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+4146 0 """NIXON-2-----""" 0.9768 0.00 0.00 0.00 0.00 0.00 11.09 5.52 0.0000 0.0000 0.0000 0.0000 0 0
+4147 0 """NOBLE-------""" 0.9863 0.00 0.00 0.00 0.00 0.00 16.97 9.14 0.0000 0.0000 0.0000 0.0000 0 0
+4148 0 """NORTH-BRANCH""" 0.9717 0.00 0.00 0.00 0.00 0.00 4.45 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+4149 2 """NORTHEAST-24""" 1.0104 0.00 80.00 0.00 0.00 48.00 230.24 141.20 0.0000 0.4800 0.0000 0.0000 0 0
+4150 0 """NORTH-SRVCTR""" 1.0050 0.00 0.00 0.00 0.00 0.00 5.80 4.36 0.0000 0.0000 0.0000 0.0000 0 0
+4151 2 """NORTHWEST-40""" 1.0044 0.00 0.00 0.00 0.00 18.00 209.70 76.40 0.0000 0.5480 0.0000 0.0000 0 0
+4152 0 """NORWAY-1----""" 0.9516 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+4153 0 """NORWAY-2-EQ1""" 0.9477 0.00 0.00 0.00 0.00 0.00 5.96 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+4154 0 """OAK-BEACH---""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.84 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4155 0 """OLIVER------""" 0.9870 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4156 0 """OLYMPA-FUT75""" 0.9825 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4157 0 """OMAHA-1--EQ1""" 0.9473 0.00 0.00 0.00 0.00 0.00 10.08 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+4158 0 """OMAHA-2--EQ1""" 0.9465 0.00 0.00 0.00 0.00 0.00 9.58 3.61 0.0000 0.0000 0.0000 0.0000 0 0
+4159 0 """OPAL--------""" 1.0050 0.00 0.00 0.00 0.00 0.00 0.92 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+4160 0 """OREGON-1----""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.38 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+4161 0 """ORION-------""" 0.9925 0.00 0.00 0.00 0.00 0.00 5.46 2.02 0.0000 0.0660 0.0000 0.0000 0 0
+4162 0 """OTTER-LAKE--""" 0.9836 0.00 0.00 0.00 0.00 0.00 1.01 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+4163 0 """OWENDALE----""" 1.0049 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4164 0 """OXFORD------""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.89 3.72 0.0000 0.1200 0.0000 0.0000 0 0
+4165 0 """1PADDOCK-CP-""" 1.0220 0.00 0.00 0.00 0.00 0.00 4.30 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+4166 0 """PAGE--------""" 0.9930 0.00 0.00 0.00 0.00 0.00 9.58 5.63 0.0000 0.0660 0.0000 0.0000 0 0
+4167 0 """PALMER-1----""" 0.9643 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+4168 0 """PARKER-ROAD-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.64 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+4169 0 """PAUL-1------""" 1.0114 0.00 0.00 0.00 0.00 0.00 8.15 4.89 0.0000 0.0480 0.0000 0.0000 0 0
+4170 0 """PAUL-2,3----""" 1.0157 0.00 0.00 0.00 0.00 0.00 4.70 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+4171 0 """PHOENIX-40--""" 1.0379 0.00 0.00 0.00 0.00 0.00 36.71 20.82 0.0000 0.0000 0.0000 0.0000 0 0
+4172 0 """PIEDMONT----""" 1.0235 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4173 0 """PIGEON------""" 0.9818 0.00 0.00 0.00 0.00 0.00 3.78 4.78 0.0000 0.0480 0.0000 0.0000 0 0
+4174 0 """PINCKNEY----""" 1.0442 0.00 0.00 0.00 0.00 0.00 3.86 1.70 0.0000 0.0900 0.0000 0.0000 0 0
+4175 0 """PIONEER---40""" 1.0270 0.00 0.00 0.00 0.00 0.00 19.10 10.12 0.0000 0.0000 0.0000 0.0000 0 0
+4176 0 """PIPER---EQ1-""" 1.0008 0.00 0.00 0.00 0.00 0.00 5.12 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+4177 0 """PITSFLD--EQ1""" 1.0164 0.00 0.00 0.00 0.00 0.00 9.66 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+4178 0 """PLACID------""" 1.0026 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4179 0 """PLYMOUTH----""" 0.9523 0.00 0.00 0.00 0.00 0.00 12.10 7.44 0.0000 0.1560 0.0000 0.0000 0 0
+4180 0 """PORT-AUSTIN-""" 0.9754 0.00 0.00 0.00 0.00 0.00 3.02 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4181 0 """PORT-HOPE---""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4182 0 """PORT-SANILAC""" 0.9808 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4183 0 """PRICE-1-----""" 1.0353 0.00 0.00 0.00 0.00 0.00 4.37 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+4184 0 """PROCTOR-----""" 0.9955 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4185 0 """PUTNAM------""" 1.0098 0.00 14.00 40.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4186 0 """QUEEN-------""" 1.0065 0.00 0.00 0.00 0.00 0.00 3.53 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+4187 0 """QUINCY------""" 1.0030 0.00 0.00 0.00 0.00 0.00 1.34 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4188 0 """RANDOLPH----""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4189 0 """RAVINE---EQ1""" 0.9764 0.00 0.00 0.00 0.00 0.00 8.90 3.62 0.0000 0.0000 0.0000 0.0000 0 0
+4190 0 """RED-RUN-40--""" 1.0203 0.00 0.00 0.00 0.00 0.00 140.87 71.29 0.0000 0.5400 0.0000 0.0000 0 0
+4191 0 """REESE---EQ2-""" 0.9799 0.00 0.00 0.00 0.00 0.00 5.96 2.23 0.0000 0.0480 0.0000 0.0000 0 0
+4192 0 """REMER-40----""" 1.0461 0.00 0.00 0.00 0.00 0.00 1.34 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4193 0 """RENO--------""" 0.9937 0.00 0.00 0.00 0.00 0.00 4.80 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+4194 0 """RICHMOND----""" 1.0130 0.00 0.00 0.00 0.00 0.00 5.63 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+4195 0 """RIFLE-------""" 0.9886 0.00 0.00 0.00 0.00 0.00 6.13 2.97 0.0000 0.0480 0.0000 0.0000 0 0
+4196 0 """RIVER-RAISIN""" 1.0072 0.00 0.00 0.00 0.00 0.00 0.92 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4197 2 """RIVERVIEW-40""" 1.0021 0.00 25.00 -100.00 -10.00 20.00 145.57 79.69 0.0000 0.3600 0.0000 0.0000 0 0
+4198 0 """ROCHESTER-1-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.55 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+4199 0 """ROCKWOOD----""" 1.0345 0.00 0.00 0.00 0.00 0.00 5.80 1.59 0.0000 0.0340 0.0000 0.0000 0 0
+4200 0 """ROMEO---EQ1-""" 1.0133 0.00 0.00 0.00 0.00 0.00 6.13 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+4201 0 """ROMULUS---40""" 1.0151 0.00 0.00 0.00 0.00 0.00 20.66 13.07 0.0000 0.1680 0.0000 0.0000 0 0
+4202 0 """RUSH-TAP----""" 0.9835 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4203 0 """RUSH-40-----""" 1.0014 0.00 0.00 0.00 0.00 0.00 3.70 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+4204 0 """SALEM-------""" 1.0417 0.00 0.00 0.00 0.00 0.00 1.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4205 0 """SALINE------""" 1.0017 0.00 0.00 0.00 0.00 0.00 9.10 4.87 0.0000 0.0960 0.0000 0.0000 0 0
+4206 0 """SANDUSKY-40-""" 1.0042 0.00 0.00 0.00 0.00 0.00 5.29 1.91 0.0000 0.0660 0.0000 0.0000 0 0
+4207 0 """SAXON-------""" 0.9916 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+4208 0 """SEBEWAING---""" 1.0083 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+4209 0 """SELFRIDGE-1-""" 1.0074 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+4210 0 """SELKIRK-----""" 1.0092 0.00 0.00 0.00 0.00 0.00 6.05 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+4211 0 """SHAW--------""" 0.9720 0.00 0.00 0.00 0.00 0.00 1.60 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4212 0 """SHELDON-1---""" 0.9578 0.00 0.00 0.00 0.00 0.00 5.29 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+4213 0 """SHERWOOD----""" 1.0148 0.00 0.00 0.00 0.00 0.00 1.93 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4214 0 """SNOVER------""" 0.9929 0.00 0.00 0.00 0.00 0.00 1.60 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+4215 0 """SOUTHFLD-40-""" 1.0066 0.00 0.00 0.00 0.00 0.00 99.54 81.89 0.0000 0.0900 0.0000 0.0000 0 0
+4216 0 """STATE-1-----""" 1.0247 0.00 0.00 0.00 0.00 0.00 5.60 3.25 0.0000 0.0000 0.0000 0.0000 0 0
+4217 0 """SPOKANE-40--""" 1.0014 0.00 0.00 0.00 0.00 0.00 36.54 16.57 0.0000 0.0000 0.0000 0.0000 0 0
+4218 0 """ST-CLAIR-1--""" 1.0259 0.00 0.00 0.00 0.00 0.00 2.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4219 0 """ST-CLAIR-2--""" 1.0352 0.00 0.00 0.00 0.00 0.00 2.69 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+4220 0 """STEPHENS-24-""" 1.0074 0.00 0.00 0.00 0.00 0.00 164.30 105.69 0.0000 0.5700 0.0000 0.0000 0 0
+4221 0 """STERLING-40-""" 1.0210 0.00 0.00 0.00 0.00 0.00 101.14 45.79 0.0000 0.5400 0.0000 0.0000 0 0
+4222 0 """STOCKBRIDGE-""" 1.0701 0.00 0.00 0.00 0.00 0.00 1.09 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4223 0 """1STOCKWELLCP""" 1.0172 0.00 0.00 0.00 0.00 0.00 10.90 6.75 0.0000 0.0000 0.0000 0.0000 0 0
+4224 0 """SUNSET-40---""" 1.0041 0.00 0.00 0.00 0.00 0.00 78.79 59.01 0.0000 0.5160 0.0000 0.0000 0 0
+4225 2 """SUPERIOR-40-""" 1.0189 0.00 0.00 0.00 0.00 118.00 61.49 48.74 0.0000 0.1800 0.0000 0.0000 0 0
+4226 0 """TIENKEN-2---""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4227 0 """TALBOT---EQ1""" 0.9854 0.00 0.00 0.00 0.00 0.00 2.35 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+4228 0 """1TAYLOR-1-13""" 1.0121 0.00 0.00 0.00 0.00 0.00 10.67 6.27 0.0000 0.0000 0.0000 0.0000 0 0
+4229 0 """1TAYLOR-2-13""" 1.0154 0.00 0.00 0.00 0.00 0.00 8.65 6.48 0.0000 0.0000 0.0000 0.0000 0 0
+4230 0 """TEGGERDINE--""" 0.9815 0.00 0.00 0.00 0.00 0.00 11.34 4.67 0.0000 0.0000 0.0000 0.0000 0 0
+4231 0 """TEMPLE------""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.59 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4232 0 """TEXAS-------""" 1.0281 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4233 0 """TODD--------""" 1.0426 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+4234 0 """TRINITY-2---""" 1.0107 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+4235 0 """TROY-40-----""" 0.9963 0.00 0.00 0.00 0.00 0.00 178.92 77.64 0.0000 0.5400 0.0000 0.0000 0 0
+4236 0 """TUSCOLA-40--""" 1.0020 0.00 0.00 0.00 0.00 0.00 6.22 2.55 0.0000 0.0660 0.0000 0.0000 0 0
+4237 0 """UNION-LAKE--""" 0.9771 0.00 0.00 0.00 0.00 0.00 11.84 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+4238 0 """UNIONVILLE--""" 1.0120 0.00 0.00 0.00 0.00 0.00 1.26 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4239 0 """UNIVR-BUS1T6""" 1.0250 0.00 0.00 0.00 0.00 0.00 11.17 8.71 0.0000 0.0000 0.0000 0.0000 0 0
+4240 0 """URBAN-TEC---""" 0.9887 0.00 0.00 0.00 0.00 0.00 5.12 3.19 0.0000 0.0000 0.0000 0.0000 0 0
+4241 0 """UTAH--------""" 1.0415 0.00 0.00 0.00 0.00 0.00 0.76 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+4242 0 """VANBUREN-EQ1""" 1.0128 0.00 0.00 0.00 0.00 0.00 1.51 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+4243 0 """VASSAR-BIRCH""" 0.9744 0.00 0.00 0.00 0.00 0.00 10.00 5.74 0.0000 0.0660 0.0000 0.0000 0 0
+4244 0 """VICTOR-40---""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4245 0 """VALLEY------""" 1.0268 0.00 6.00 20.00 0.00 0.00 0.90 0.62 0.0000 0.0000 0.0000 0.0000 0 0
+4246 0 """WABASH-40---""" 1.0066 0.00 0.00 0.00 0.00 0.00 46.70 26.25 0.0000 0.0000 0.0000 0.0000 0 0
+4247 0 """WALLED-LAKE-""" 0.9972 0.00 0.00 0.00 0.00 0.00 6.00 2.62 0.0000 0.0000 0.0000 0.0000 0 0
+4248 0 """WALNUT-1,2--""" 0.9814 0.00 0.00 0.00 0.00 0.00 9.60 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+4249 0 """WALTON40-SUB""" 1.0330 0.00 0.00 0.00 0.00 0.00 44.35 20.08 0.0000 0.1800 0.0000 0.0000 0 0
+4250 0 """WARDLOW-----""" 0.9956 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+4251 2 """WARREN-24---""" 1.0171 0.00 0.00 540.00 0.00 54.00 268.46 194.97 0.0000 0.9000 0.0000 0.0000 0 0
+4252 0 """WASHNGTN-EQ1""" 1.0002 0.00 0.00 0.00 0.00 0.00 8.57 4.36 0.0000 0.0660 0.0000 0.0000 0 0
+4253 0 """WATERFORD---""" 0.9903 0.00 0.00 0.00 0.00 0.00 17.81 5.52 0.0000 0.1800 0.0000 0.0000 0 0
+4254 0 """WEBERVLE-EQ1""" 1.0885 0.00 0.00 0.00 0.00 0.00 8.23 1.91 0.0000 0.1140 0.0000 0.0000 0 0
+4255 0 """WHITE-LAKE--""" 0.9941 0.00 0.00 0.00 0.00 0.00 4.70 1.59 0.0000 0.0000 0.0000 0.0000 0 0
+4256 0 """WHITMORE-LK-""" 1.0357 0.00 0.00 0.00 0.00 0.00 7.81 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+4257 0 """WHITNY-FUT73""" 1.0033 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4258 0 """WILEY-------""" 1.0197 0.00 0.00 0.00 0.00 0.00 1.26 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+4259 0 """WILMOTK-NGFD""" 0.9922 0.00 0.00 0.00 0.00 0.00 0.84 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4260 0 """WILSON------""" 1.0128 0.00 0.00 0.00 0.00 0.00 2.60 -0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4261 0 """1WILSON-CP--""" 1.0157 0.00 0.00 0.00 0.00 0.00 8.60 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+4262 0 """WOLFHILL----""" 0.9897 0.00 0.00 0.00 0.00 0.00 4.96 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+4263 0 """WOLVERINE-2-""" 1.0200 0.00 0.00 0.00 0.00 0.00 5.12 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+4264 0 """WORTH-------""" 1.0069 0.00 0.00 0.00 0.00 0.00 2.18 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4265 0 """YALE-TAP----""" 0.9902 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4266 0 """YALE--------""" 0.9870 0.00 0.00 0.00 0.00 0.00 3.11 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+4267 0 """YATES-------""" 0.9871 0.00 0.00 0.00 0.00 0.00 1.34 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4268 0 """YORK--------""" 0.9901 0.00 0.00 0.00 0.00 0.00 2.44 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+4269 0 """YOST-40-----""" 1.0354 0.00 0.00 0.00 0.00 0.00 48.55 26.29 0.0000 0.0480 0.0000 0.0000 0 0
+4270 0 """2ADAMS-----1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4271 0 """2ALFRED----1""" 1.0468 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+4272 0 """ALFRED-13---""" 1.0489 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+4273 0 """2AMHERST1.13""" 1.0230 0.00 0.00 0.00 0.00 0.00 7.56 4.72 0.0000 0.0000 0.0000 0.0000 0 0
+4274 0 """2AMHERST2.13""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4275 0 """2ARROWHEAD-1""" 1.0315 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4276 0 """2BAD-AXE---1""" 1.0460 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4277 0 """2BLOOMFLD--1""" 1.0065 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4278 0 """2BROWNTN---3""" 1.0081 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4279 0 """2BROWNTN---2""" 1.0314 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4280 2 """2BROWNTN-N-1""" 1.0263 0.00 0.00 -910.00 -91.00 338.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4281 0 """2BROWNTN-S-1""" 1.0117 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4282 0 """2BUNCE-CK--1""" 1.1567 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4283 0 """2B3N-DECO230""" 1.0877 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4284 0 """2-BURNS-1--1""" 1.0578 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4285 0 """2-BURNS-2--1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4286 0 """2CANIFF----3""" 1.0261 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4287 0 """2CANIFF----1""" 1.0433 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4288 0 """2CATALINA-CP""" 1.0064 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4289 0 """2CATO------1""" 1.0403 0.00 0.00 0.00 0.00 0.00 57.14 27.68 0.0000 0.0000 0.0000 0.0000 0 0
+4290 0 """2CHESTNUT--1""" 1.0164 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4291 0 """2CODY------1""" 0.9887 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4292 2 """2CONNER-G.24""" 1.0404 0.00 285.00 1770.00 0.00 1770.00 436.28 182.01 0.0000 0.0000 0.0000 0.0000 0 0
+4293 0 """2COOPER----1""" 1.0059 0.00 0.00 0.00 0.00 0.00 1.34 2.31 0.0000 0.0000 0.0000 0.0000 0 0
+4294 0 """2CORTLAND--1""" 1.0392 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4295 0 """2COVENTRY--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4296 0 """2COVENTRY--1""" 0.9810 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4297 0 """2CRESTWOOD-1""" 1.0120 0.00 0.00 0.00 0.00 0.00 3.56 1.78 0.0000 0.0000 0.0000 0.0000 0 0
+4298 0 """2CUSTER----1""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4299 0 """2C-3DECO-138""" 0.9752 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4300 0 """2DAYTON----1""" 0.9863 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4301 2 """2DELRAY-16-1""" 1.0200 0.00 72.00 350.00 0.00 54.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4302 2 """2DELRAY-G.24""" 1.0483 0.00 236.00 2320.00 0.00 2320.00 290.94 159.76 0.0000 0.0000 0.0000 0.0000 0 0
+4303 0 """2ELM-------1""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4304 0 """2E.FERMI---1""" 0.9983 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4305 0 """2ERIN------1""" 1.0331 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4306 0 """2E-N-S-TAP11""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4307 0 """2E-N-S-TAP21""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4308 2 """2ESSEX-----1""" 1.0543 0.00 274.00 0.00 0.00 140.00 0.00 0.00 0.0000 1.0800 0.0000 0.0000 0 0
+4309 0 """2EVERGREEN-1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4310 0 """2FLEETWD-1-1""" 1.0428 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4311 0 """2FLEETWD-2-1""" 1.0456 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4312 0 """2FLEETWD--13""" 1.0161 0.00 0.00 0.00 0.00 0.00 12.02 5.78 0.0000 0.0000 0.0000 0.0000 0 0
+4313 0 """2FOMOCO-C1-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+4314 0 """2FOMOCO-C2-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+4315 0 """2FRISBIE---1""" 1.0414 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4316 0 """2GENOA-----1""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4317 0 """2HANCOCK---1""" 1.0042 0.00 82.00 210.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4318 2 """2HARB.BEA.-1""" 1.0597 0.00 114.00 -300.00 -30.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4319 0 """2HINES-----1""" 0.9897 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4320 0 """2HUNTER-CK.1""" 1.0432 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4321 0 """2IRONTON---1""" 1.0310 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4322 0 """2IRN-NA-RV-1""" 1.0272 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4323 0 """2IMLAY-1PUP1""" 1.0685 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4324 0 """2JEFFERSON-1""" 1.0257 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4325 0 """2KTT-DECO138""" 1.0748 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4326 0 """2LK.HURON1P1""" 1.1530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4327 0 """2LK.HURON2P1""" 1.1335 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4328 0 """2LAPEER----1""" 1.0390 0.00 0.00 0.00 0.00 0.00 7.83 2.85 0.0000 0.0000 0.0000 0.0000 0 0
+4329 0 """2LARK------1""" 0.9720 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4330 0 """2LEE-------1""" 1.1215 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4331 0 """2LINCOLN---1""" 1.0100 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4332 0 """2LN-NE-NW--1""" 1.0129 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4333 0 """2LOGAN-1---1""" 1.0326 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4334 0 """2LOGAN-1-.13""" 1.0161 0.00 0.00 0.00 0.00 0.00 8.54 2.49 0.0000 0.0000 0.0000 0.0000 0 0
+4335 0 """2LOGAN-2---1""" 1.0362 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4336 0 """2LOGAN-2-.13""" 1.0153 0.00 0.00 0.00 0.00 0.00 8.46 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+4337 0 """2LONG-LK-1-1""" 1.0035 0.00 0.00 0.00 0.00 0.00 7.12 1.69 0.0000 0.0000 0.0000 0.0000 0 0
+4338 0 """2LONG-LK-2-1""" 1.0046 0.00 0.00 0.00 0.00 0.00 6.68 1.25 0.0000 0.0000 0.0000 0.0000 0 0
+4339 0 """2LUZON-----1""" 0.9694 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4340 0 """2LUZON-W.40D""" 0.9908 0.00 0.00 0.00 0.00 0.00 16.02 7.83 0.0000 0.0000 0.0000 0.0000 0 0
+4341 0 """2MACOMB----1""" 1.0576 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4342 2 """2MARYSVILLE1""" 1.1521 0.00 84.00 0.00 0.00 60.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4343 0 """2MAXWELL-1-1""" 1.0236 0.00 0.00 0.00 0.00 0.00 18.16 11.21 0.0000 0.0000 0.0000 0.0000 0 0
+4344 0 """2MAXWELL-2-1""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4345 0 """2MCLOUTH-1-1""" 1.0222 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+4346 0 """2MCLOUTH-2-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+4347 2 """2MCLOUTH-.24""" 1.0350 0.00 0.00 670.00 -30.00 100.00 108.22 48.42 0.0000 0.0000 0.0000 0.0000 0 0
+4348 0 """2MEDINA----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4349 0 """2MIDTOWN---1""" 1.0409 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4350 2 """2MONRO-1,2-3""" 1.0100 0.00 1290.95 -880.00 -182.00 803.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4351 2 """2MONRO-3,4-3""" 1.0105 0.00 470.00 -910.00 -91.00 528.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4352 0 """2MTCALM-CP-1""" 1.0065 0.00 0.00 0.00 0.00 0.00 78.59 31.06 0.0000 0.0000 0.0000 0.0000 0 0
+4353 0 """2NAVARRE---2""" 1.0244 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4354 0 """2NAVARRE---1""" 1.0256 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4355 0 """2NEWBURGH--1""" 0.9920 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4356 0 """2NOBLE-----1""" 0.9773 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4357 0 """2NORTHEAST-1""" 1.0287 0.00 54.00 140.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4358 0 """2N.E.STUB--1""" 1.0437 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4359 2 """2N.E.FLIK.24""" 1.0200 0.00 0.00 40.00 0.00 30.00 43.16 15.22 0.0000 0.0000 0.0000 0.0000 0 0
+4360 0 """2NORTHWEST-1""" 0.9962 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4361 0 """2PHOENIX---1""" 0.9654 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4362 0 """2PIONEER-TP1""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4363 0 """2PIONEER---1""" 0.9633 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4364 0 """2PLACID----1""" 0.9882 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4365 0 """2PONTIAC---3""" 1.0328 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4366 0 """2PONTIAC---1""" 1.0213 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4367 0 """2RED-RUN---1""" 1.0352 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+4368 0 """2REMER-----1""" 1.1466 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4369 0 """2R.R.EQZR.-1""" 1.0352 0.00 0.00 0.00 0.00 0.00 60.52 37.47 0.0000 0.0000 0.0000 0.0000 0 0
+4370 2 """2R.ROUGE-1-1""" 1.0354 0.00 272.00 1880.00 0.00 188.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4371 2 """2R.ROUGE-2-1""" 1.0442 0.00 257.00 1980.00 0.00 198.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4372 2 """2R.ROUGE-3-1""" 1.0447 0.00 300.00 0.00 0.00 209.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4373 0 """2RIVERVU---1""" 1.0241 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4374 0 """2ROMULUS---1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4375 0 """2RUSH------1""" 1.0284 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4376 0 """2SANDUSKY--1""" 1.0989 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4377 0 """2SLOCUM----1""" 1.0153 0.00 14.00 40.00 0.00 0.00 57.49 27.86 0.0000 0.0000 0.0000 0.0000 0 0
+4378 0 """2SOUTHFLD--1""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4379 0 """2SPOKANE---1""" 1.0200 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4380 2 """2ST-CLAIR--3""" 1.0433 0.00 498.00 0.00 0.00 215.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4381 2 """2ST-CL.1-3-1""" 1.1866 0.00 501.00 3220.00 0.00 322.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4382 2 """2ST-CL.4,5-1""" 1.1467 0.00 463.00 0.00 0.00 315.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4383 2 """2ST-CL.6---1""" 1.1194 0.00 322.00 0.00 0.00 190.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4384 0 """2STC-SP-STL1""" 1.0639 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4385 0 """2STEPHENS--3""" 1.0262 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4386 0 """2STEPHENS--1""" 1.0420 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4387 0 """2STERLING--1""" 1.0393 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4388 0 """2SUNSET----1""" 0.9976 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4389 0 """2SUPERIOR--1""" 0.9791 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4390 0 """2TAYLOR-1--1""" 1.0054 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4391 0 """2TAYLOR--2-1""" 1.0247 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4392 0 """2TEMPEST--CP""" 1.0062 0.00 0.00 0.00 0.00 0.00 11.84 3.92 0.0000 0.0000 0.0000 0.0000 0 0
+4393 2 """2TRENTN-NA-1""" 1.0300 0.00 278.00 2220.00 0.00 225.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4394 2 """2TRENTN-SU-1""" 1.0300 0.00 593.00 1450.00 0.00 303.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4395 0 """2TROY------1""" 1.0029 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4396 0 """2TUSCOLA---1""" 1.0236 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4397 0 """2VICTOR----1""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4398 0 """2WABASH-TAP1""" 1.1463 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4399 0 """2WABASH----1""" 1.1431 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4400 0 """2WALTON----1""" 1.0096 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4401 0 """2WARREN----1""" 1.0148 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4402 0 """2WARREN-7--1""" 1.0400 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4403 0 """2WATERMAN--2""" 1.0227 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4404 0 """2WATERMAN--1""" 1.0418 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4405 0 """2WAT.EQZR.24""" 1.0311 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4406 0 """2WAYNE-----3""" 1.0091 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4407 0 """2WAYNE-----1""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4408 0 """2WHEELER---1""" 1.0040 0.00 0.00 0.00 0.00 0.00 24.21 15.04 0.0000 0.0000 0.0000 0.0000 0 0
+4409 0 """2WILLOW-1T-1""" 0.9847 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4410 0 """2WILLOW-2T-1""" 0.9880 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4411 0 """2WILLO-RUN-1""" 0.9811 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4412 0 """2WILLOW--.13""" 0.9992 0.00 0.00 0.00 0.00 0.00 41.83 23.67 0.0000 0.0000 0.0000 0.0000 0 0
+4413 0 """2WIXOM-----3""" 1.0194 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4414 0 """2WIXOM-----1""" 1.0035 0.00 0.00 0.00 0.00 0.00 10.86 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+4415 0 """2WOODHVN-1-1""" 1.0278 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4416 0 """2WOODHVN1.13""" 1.0229 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+4417 0 """2WDHVN-TP2-1""" 1.0248 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4418 0 """2WOODHVN-2-1""" 1.0240 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4419 0 """2WOODHVN2.13""" 1.0124 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+4420 0 """2YOST------1""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+4421 0 """3ALBA-TIE--1""" 1.1233 0.00 0.00 0.00 0.00 0.00 2.50 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+4422 0 """3ALCONA-D--1""" 1.1170 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4423 0 """3ALGOMA----1""" 1.0365 0.00 0.00 0.00 0.00 0.00 14.00 -1.10 0.0000 0.0000 0.0000 0.0000 0 0
+4424 0 """3ALMA------1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.40 2.10 0.0000 0.1000 0.0000 0.0000 0 0
+4425 0 """3ALMEDA----1""" 1.0459 0.00 0.00 0.00 0.00 0.00 14.10 4.30 0.0000 0.0215 0.0000 0.0000 0 0
+4426 0 """3ALPENA----1""" 1.1632 0.00 0.00 0.00 0.00 0.00 33.10 5.20 0.0000 0.2880 0.0000 0.0000 0 0
+4427 0 """3AMBER-----1""" 1.0260 0.00 0.00 0.00 0.00 0.00 19.00 15.60 0.0000 0.0000 0.0000 0.0000 0 0
+4428 0 """3ARGENTA---3""" 1.0555 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4429 0 """3ARGENTA---1""" 1.0537 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4430 0 """3A-1CPCO-120""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4431 0 """3BANGOR----1""" 1.0383 0.00 0.00 0.00 0.00 0.00 8.60 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4432 0 """3BARD-RD---1""" 1.0831 0.00 0.00 0.00 0.00 0.00 6.30 1.20 0.0000 0.0000 0.0000 0.0000 0 0
+4433 0 """3BARRY-----1""" 1.0416 0.00 0.00 0.00 0.00 0.00 27.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+4434 0 """3BASS-CRK--1""" 1.0389 0.00 0.00 0.00 0.00 0.00 17.80 3.20 0.0000 0.0000 0.0000 0.0000 0 0
+4435 0 """3BATAVIA---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 23.20 0.10 0.0000 0.0800 0.0000 0.0000 0 0
+4436 0 """3BEALS-RD.-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 146.80 48.60 0.0000 0.1500 0.0000 0.0000 0 0
+4437 0 """3BEECHER---1""" 1.0185 0.00 0.00 0.00 0.00 0.00 61.40 30.10 0.0000 0.0800 0.0000 0.0000 0 0
+4438 0 """3BEGOLE----1""" 1.0444 0.00 0.00 0.00 0.00 0.00 19.70 2.50 0.0000 0.1530 0.0000 0.0000 0 0
+4439 0 """3BEVERIDGE-1""" 1.0238 0.00 0.00 0.00 0.00 0.00 50.90 24.30 0.0000 0.1388 0.0000 0.0000 0 0
+4440 2 """3BIG-ROCK--1""" 1.1480 0.00 50.00 -140.00 -14.00 28.00 0.00 0.00 0.0000 0.0116 0.0000 0.0000 0 0
+4441 0 """3BINGHAM---1""" 1.0446 0.00 0.00 0.00 0.00 0.00 17.60 -7.80 0.0000 0.1928 0.0000 0.0000 0 0
+4442 0 """3BLACK-RIV-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 49.90 8.50 0.0000 0.0000 0.0000 0.0000 0 0
+4443 0 """3BLACKSTON-1""" 1.0188 0.00 0.00 200.00 0.00 0.00 83.10 22.00 0.0000 0.0800 0.0000 0.0000 0 0
+4444 0 """3BOARDMAN--1""" 1.0825 0.00 2.00 0.00 0.00 0.00 27.80 16.10 0.0000 0.1042 0.0000 0.0000 0 0
+4445 0 """3BUICK-STEW1""" 1.0363 0.00 0.00 0.00 0.00 0.00 40.50 17.10 0.0000 0.0000 0.0000 0.0000 0 0
+4446 0 """3BULLOCK---1""" 1.0269 0.00 0.00 0.00 0.00 0.00 37.10 37.10 0.0000 0.1578 0.0000 0.0000 0 0
+4447 2 """3CAMPBELL--1""" 1.0554 0.00 584.00 0.00 0.00 390.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4448 0 """3CEMENT-CY-1""" 1.0188 0.00 0.00 0.00 0.00 0.00 28.00 -0.20 0.0000 0.1000 0.0000 0.0000 0 0
+4449 0 """3CHASE-----1""" 1.0429 0.00 0.00 0.00 0.00 0.00 4.90 2.20 0.0000 0.0000 0.0000 0.0000 0 0
+4450 0 """3CLAIRMONT-1""" 1.0230 0.00 0.00 0.00 0.00 0.00 73.60 28.60 0.0000 0.1646 0.0000 0.0000 0 0
+4451 0 """3CLEVELAND-1""" 1.0356 0.00 0.00 0.00 0.00 0.00 32.90 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+4452 2 """3COBB------1""" 1.0400 0.00 476.00 40.00 0.00 421.00 79.30 35.60 0.0000 0.0000 0.0000 0.0000 0 0
+4453 0 """3CORK-ST.--1""" 1.0494 0.00 0.00 0.00 0.00 0.00 17.00 7.20 0.0000 0.0000 0.0000 0.0000 0 0
+4454 0 """3CORNELL---1""" 1.0290 0.00 0.00 0.00 0.00 0.00 33.30 12.00 0.0000 0.1981 0.0000 0.0000 0 0
+4455 0 """3COTTEGE-GR1""" 1.0738 0.00 0.00 0.00 0.00 0.00 1.70 0.70 0.0000 0.0000 0.0000 0.0000 0 0
+4456 0 """3CROTON----1""" 1.0342 0.00 29.00 0.00 0.00 0.00 10.40 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+4457 0 """3DEAN-RD.--1""" 1.0521 0.00 0.00 0.00 0.00 0.00 3.60 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+4458 0 """3DEJA------1""" 1.0414 0.00 0.00 0.00 0.00 0.00 13.80 -2.50 0.0000 0.0000 0.0000 0.0000 0 0
+4459 0 """3DELANEY---1""" 1.0469 0.00 0.00 0.00 0.00 0.00 64.80 25.10 0.0000 0.2698 0.0000 0.0000 0 0
+4460 0 """3DELH1-----1""" 1.0442 0.00 0.00 0.00 0.00 0.00 36.90 -10.00 0.0000 0.2783 0.0000 0.0000 0 0
+4461 0 """3DORT------1""" 1.0425 0.00 0.00 0.00 0.00 0.00 106.40 37.90 0.0000 0.4626 0.0000 0.0000 0 0
+4462 0 """3DOW-CHLOR.1""" 1.0243 0.00 0.00 0.00 0.00 0.00 49.00 24.00 0.0000 0.0000 0.0000 0.0000 0 0
+4463 0 """3DU-PONTE--1""" 1.0355 0.00 0.00 0.00 0.00 0.00 2.20 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4464 0 """3D-4CPCO-120""" 1.0444 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4465 0 """3EDENVILLE-1""" 1.0405 0.00 0.00 0.00 0.00 0.00 7.10 -4.70 0.0000 0.0000 0.0000 0.0000 0 0
+4466 2 """3ELM-STREET1""" 1.0444 0.00 29.00 0.00 0.00 7.00 32.70 23.30 0.0000 0.0000 0.0000 0.0000 0 0
+4467 0 """3EMMET-----1""" 1.1457 0.00 0.00 0.00 0.00 0.00 21.00 3.90 0.0000 0.0000 0.0000 0.0000 0 0
+4468 0 """3EUREKA----1""" 1.0398 0.00 0.00 0.00 0.00 0.00 21.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+4469 0 """3FELCH-RD.-1""" 1.0331 0.00 0.00 0.00 0.00 0.00 14.00 5.90 0.0000 0.0000 0.0000 0.0000 0 0
+4470 0 """3FISHER----1""" 1.0445 0.00 0.00 0.00 0.00 0.00 14.10 4.60 0.0000 0.0000 0.0000 0.0000 0 0
+4471 0 """3FOUNDRY---1""" 1.0316 0.00 0.00 0.00 0.00 0.00 31.70 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+4472 0 """3FOUR-MILE-1""" 1.0406 0.00 2.00 0.00 0.00 0.00 111.80 32.80 0.0000 0.1000 0.0000 0.0000 0 0
+4473 0 """3GARFIELD--1""" 1.0354 0.00 0.00 0.00 0.00 0.00 72.20 32.00 0.0000 0.0353 0.0000 0.0000 0 0
+4474 2 """3GAYLORD---1""" 1.1519 0.00 60.00 0.00 0.00 15.00 10.10 1.90 0.0000 0.0826 0.0000 0.0000 0 0
+4475 0 """3GENOA-----1""" 1.0678 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4476 0 """3GLEANER---1""" 1.0283 0.00 0.00 0.00 0.00 0.00 18.80 6.90 0.0000 0.0000 0.0000 0.0000 0 0
+4477 0 """3GREY-IRON-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 53.50 17.50 0.0000 0.0000 0.0000 0.0000 0 0
+4478 0 """3HALSEY----1""" 1.0458 0.00 0.00 0.00 0.00 0.00 20.40 3.80 0.0000 0.1148 0.0000 0.0000 0 0
+4479 0 """3HARDY-DAM-1""" 1.0343 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4480 0 """3HAZELWOOD-1""" 1.0525 0.00 0.00 0.00 0.00 0.00 39.10 7.20 0.0000 0.0400 0.0000 0.0000 0 0
+4481 0 """3HEMPHILL--1""" 1.0447 0.00 0.00 0.00 0.00 0.00 134.10 62.70 0.0000 0.6928 0.0000 0.0000 0 0
+4482 0 """3HIGGINS---1""" 1.1065 0.00 0.00 0.00 0.00 0.00 18.90 2.80 0.0000 0.0000 0.0000 0.0000 0 0
+4483 0 """3HODENPYL--1""" 1.0686 0.00 0.00 0.00 0.00 0.00 8.40 -0.80 0.0000 0.0000 0.0000 0.0000 0 0
+4484 0 """3HOLLAN-RD-1""" 1.0168 0.00 0.00 0.00 0.00 0.00 42.80 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+4485 0 """3HOOKER----1""" 1.0348 0.00 0.00 0.00 0.00 0.00 26.40 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4486 0 """3HUGHES-RD-1""" 1.0377 0.00 0.00 0.00 0.00 0.00 21.80 4.80 0.0000 0.0000 0.0000 0.0000 0 0
+4487 0 """3IOSCO-----1""" 1.1238 0.00 19.00 0.00 0.00 0.00 12.80 5.70 0.0000 0.0263 0.0000 0.0000 0 0
+4488 0 """3ISLAND-RD-1""" 1.0435 0.00 0.00 0.00 0.00 0.00 29.20 -2.90 0.0000 0.1086 0.0000 0.0000 0 0
+4489 2 """3KARN------1""" 1.0563 0.00 498.00 0.00 0.00 337.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4490 0 """3KENOWA----3""" 1.0865 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4491 0 """3LATSON----1""" 1.0558 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4492 0 """3LAWNDALE--1""" 1.0265 0.00 0.00 0.00 0.00 0.00 39.90 17.00 0.0000 0.0000 0.0000 0.0000 0 0
+4493 0 """3LAYTON----1""" 1.0246 0.00 0.00 0.00 0.00 0.00 16.10 1.80 0.0000 0.0000 0.0000 0.0000 0 0
+4494 0 """3LEWISTON--1""" 1.1462 0.00 0.00 0.00 0.00 0.00 2.60 0.80 0.0000 0.0000 0.0000 0.0000 0 0
+4495 0 """3LINBERGH--1""" 1.0424 0.00 0.00 0.00 0.00 0.00 42.40 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+4496 0 """3LOOK-GLAS-1""" 1.0411 0.00 0.00 0.00 0.00 0.00 25.30 -3.20 0.0000 0.0000 0.0000 0.0000 0 0
+4497 0 """3LOUD------1""" 1.1048 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0040 0.0000 0.0000 0 0
+4498 2 """3LUDINGTON-3""" 1.0978 0.00 0.00 0.00 0.00 200.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4499 0 """3MALLEABLE-1""" 1.0211 0.00 0.00 0.00 0.00 0.00 61.50 17.20 0.0000 0.0000 0.0000 0.0000 0 0
+4500 0 """3MARQUETTE-1""" 1.0444 0.00 2.00 0.00 0.00 0.00 17.80 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+4501 0 """3MECOSTA---1""" 1.0370 0.00 0.00 0.00 0.00 0.00 15.90 3.60 0.0000 0.0000 0.0000 0.0000 0 0
+4502 0 """3MEDUSA----1""" 1.1103 0.00 0.00 0.00 0.00 0.00 11.50 1.60 0.0000 0.0000 0.0000 0.0000 0 0
+4503 0 """3MILES-RD.-1""" 1.1103 0.00 0.00 0.00 0.00 0.00 7.70 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+4504 0 """3MILHAM----1""" 1.0437 0.00 0.00 0.00 0.00 0.00 36.30 9.60 0.0000 0.1413 0.0000 0.0000 0 0
+4505 0 """3MIO-------1""" 1.1407 0.00 9.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.2067 0.0000 0.0000 0 0
+4506 0 """3MONITOR---1""" 1.0319 0.00 0.00 0.00 0.00 0.00 41.40 14.30 0.0000 0.0503 0.0000 0.0000 0 0
+4507 0 """3MOORE-RD--1""" 0.9940 0.00 0.00 0.00 0.00 0.00 40.80 10.60 0.0000 0.0000 0.0000 0.0000 0 0
+4508 2 """3MORROW----1""" 1.0500 0.00 130.00 0.00 0.00 168.00 80.20 31.20 0.0000 0.1836 0.0000 0.0000 0 0
+4509 0 """3MUSKEGN-HT1""" 1.0212 0.00 0.00 0.00 0.00 0.00 72.90 52.50 0.0000 0.0000 0.0000 0.0000 0 0
+4510 0 """3NODULAR---1""" 1.0228 0.00 0.00 0.00 0.00 0.00 34.40 16.80 0.0000 0.0000 0.0000 0.0000 0 0
+4511 0 """3N.BELDING-1""" 1.0422 0.00 0.00 0.00 0.00 0.00 20.70 -2.30 0.0000 0.1000 0.0000 0.0000 0 0
+4512 0 """3OAKLAND---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 17.80 5.80 0.0000 0.0000 0.0000 0.0000 0 0
+4513 0 """3OGEMAW----1""" 1.0698 0.00 0.00 0.00 0.00 0.00 11.90 -7.50 0.0000 0.0000 0.0000 0.0000 0 0
+4514 0 """3OWOSSO----1""" 1.0282 0.00 0.00 0.00 0.00 0.00 29.20 10.40 0.0000 0.0000 0.0000 0.0000 0 0
+4515 0 """3PAGE------1""" 1.0180 0.00 0.00 0.00 0.00 0.00 45.80 5.40 0.0000 0.0800 0.0000 0.0000 0 0
+4516 2 """3PALISADES-3""" 1.0392 0.00 701.70 0.00 0.00 418.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4517 0 """3PASEDENA--1""" 1.0263 0.00 0.00 0.00 0.00 0.00 48.70 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+4518 0 """3PENN-DIXIE1""" 1.1463 0.00 0.00 0.00 0.00 0.00 6.60 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+4519 0 """3PT.CALCIT-1""" 1.1721 0.00 0.00 0.00 0.00 0.00 9.40 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+4520 0 """3RAISIN----1""" 1.0280 0.00 0.00 0.00 0.00 0.00 21.10 8.80 0.0000 0.0000 0.0000 0.0000 0 0
+4521 0 """3RICE-CREK-1""" 1.0323 0.00 0.00 0.00 0.00 0.00 29.10 1.20 0.0000 0.2540 0.0000 0.0000 0 0
+4522 0 """3RIFLE-RIV.1""" 1.0698 0.00 0.00 0.00 0.00 0.00 2.40 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+4523 2 """3RIGGSVIL--1""" 1.1813 0.00 25.00 0.00 0.00 6.00 22.30 2.50 0.0000 0.1838 0.0000 0.0000 0 0
+4524 0 """3RIVERVIEW-1""" 1.0513 0.00 0.00 0.00 0.00 0.00 79.60 28.70 0.0000 0.3312 0.0000 0.0000 0 0
+4525 0 """3ROCKPORT--1""" 1.1679 0.00 0.00 0.00 0.00 0.00 1.00 0.20 0.0000 0.0000 0.0000 0.0000 0 0
+4526 0 """3RONDO-----1""" 1.1683 0.00 0.00 0.00 0.00 0.00 3.40 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+4527 0 """3SAGNAW-R.-1""" 1.0316 0.00 0.00 0.00 0.00 0.00 63.80 32.80 0.0000 0.1568 0.0000 0.0000 0 0
+4528 0 """3SAMARIA---1""" 1.0341 0.00 0.00 0.00 0.00 0.00 23.10 10.70 0.0000 0.0000 0.0000 0.0000 0 0
+4529 0 """3SCOTT-LK.-1""" 1.0470 0.00 0.00 0.00 0.00 0.00 17.10 5.70 0.0000 0.0000 0.0000 0.0000 0 0
+4530 0 """3SPAULDING-1""" 1.0412 0.00 0.00 0.00 0.00 0.00 70.40 16.20 0.0000 0.0800 0.0000 0.0000 0 0
+4531 0 """3SPRUCE----1""" 1.1468 0.00 0.00 0.00 0.00 0.00 4.40 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+4532 0 """3STAMPG-PLT1""" 1.0446 0.00 0.00 0.00 0.00 0.00 11.60 3.80 0.0000 0.0000 0.0000 0.0000 0 0
+4533 0 """3STRONACH--1""" 1.0397 0.00 0.00 0.00 0.00 0.00 21.20 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+4534 0 """3STOVER----1""" 1.1154 0.00 0.00 0.00 0.00 0.00 6.60 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+4535 0 """3SUMMERTON-1""" 1.0218 0.00 0.00 0.00 0.00 0.00 24.20 -2.10 0.0000 0.0000 0.0000 0.0000 0 0
+4536 0 """3TALLMADGE-3""" 1.0815 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4537 0 """3TALLMADGE-1""" 1.0662 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4538 0 """3THETFORD--3""" 1.0579 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4539 2 """3THETFORD--1""" 1.0516 0.00 146.00 0.00 0.00 36.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4540 0 """3TITTABAW--3""" 1.0615 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4541 0 """3TITTABAW--1""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4542 0 """3TIPPY-DAM-1""" 1.0648 0.00 29.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.1255 0.0000 0.0000 0 0
+4543 0 """3TOMPKINS--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4544 0 """3TUSC.TAP.-1""" 1.0626 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4545 0 """3TWINING---1""" 1.0667 0.00 0.00 0.00 0.00 0.00 8.70 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+4546 0 """3UPJOHN----1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.80 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+4547 2 """3VERONA----1""" 1.0467 0.00 29.00 0.00 0.00 7.00 78.70 10.40 0.0000 0.4710 0.0000 0.0000 0 0
+4548 0 """3VEVAY-----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 18.30 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+4549 0 """3WACKERLY--1""" 1.0295 0.00 0.00 0.00 0.00 0.00 29.80 9.70 0.0000 0.0000 0.0000 0.0000 0 0
+4550 0 """3WARREN----1""" 1.0665 0.00 0.00 0.00 0.00 0.00 19.20 14.60 0.0000 0.3967 0.0000 0.0000 0 0
+4551 0 """3WASHTENAW-1""" 1.0009 0.00 0.00 0.00 0.00 0.00 16.90 -3.00 0.0000 0.0000 0.0000 0.0000 0 0
+4552 2 """3WEADOCK-B-1""" 1.0400 0.00 299.00 90.00 0.00 226.00 35.70 15.30 0.0000 0.0330 0.0000 0.0000 0 0
+4553 2 """3WEADOCK-W-1""" 1.0476 0.00 319.00 0.00 0.00 191.00 36.60 15.30 0.0000 0.0000 0.0000 0.0000 0 0
+4554 0 """3WEALTHY---1""" 1.0461 0.00 0.00 0.00 0.00 0.00 116.80 51.00 0.0000 0.0000 0.0000 0.0000 0 0
+4555 0 """3WEXFORD---1""" 1.0784 0.00 0.00 0.00 0.00 0.00 24.60 -4.50 0.0000 0.0990 0.0000 0.0000 0 0
+4556 0 """3WHITE-LK.-1""" 1.0342 0.00 9.00 0.00 0.00 0.00 11.80 6.80 0.0000 0.0000 0.0000 0.0000 0 0
+4557 2 """3WHITING---1""" 1.0500 0.00 331.00 900.00 0.00 206.00 14.30 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4558 0 """3WILLARD---1""" 1.0411 0.00 0.00 0.00 0.00 0.00 23.60 3.70 0.0000 0.0000 0.0000 0.0000 0 0
+4559 0 """4ALLANBURG-2""" 1.1270 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4560 0 """4BEACH-----2""" 1.0829 0.00 0.00 0.00 0.00 0.00 256.30 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+4561 2 """4BEAUHARN--2""" 1.1266 0.00 600.00 500.00 -25.00 50.00 19.70 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+4562 2 """4BECK------2""" 1.1280 0.00 1011.00 1890.00 -100.00 600.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4563 0 """4-BP-76-REG2""" 1.0551 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4564 0 """4BROCKVILLE2""" 1.0779 0.00 0.00 0.00 0.00 0.00 76.90 31.50 0.0000 0.0000 0.0000 0.0000 0 0
+4565 0 """4BUCHANNAN-2""" 1.0643 0.00 0.00 0.00 0.00 0.00 600.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+4566 2 """4BUCHANNAN-1""" 1.0472 0.00 0.00 -250.00 -25.00 200.00 326.80 52.40 0.0000 0.0000 0.0000 0.0000 0 0
+4567 0 """4BURLINGTON2""" 1.0779 0.00 0.00 0.00 0.00 0.00 900.00 300.00 0.0000 0.0000 0.0000 0.0000 0 0
+4568 0 """4CHATHAM---2""" 1.0922 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4569 2 """4CHATS-FALL2""" 1.1200 0.00 168.00 670.00 -30.00 70.00 7.00 3.30 0.0000 0.0000 0.0000 0.0000 0 0
+4570 2 """4CHERRYWOOD2""" 1.0770 0.00 1000.00 4190.00 -300.00 600.00 650.00 212.60 0.0000 0.0000 0.0000 0.0000 0 0
+4571 0 """4CRAWFORD--1""" 1.0371 0.00 0.00 0.00 0.00 0.00 64.00 28.00 0.0000 0.0000 0.0000 0.0000 0 0
+4572 2 """4DESJOACH--2""" 1.1740 0.00 370.00 590.00 -50.00 175.00 16.10 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+4573 2 """4DETWEILER-2""" 1.0550 0.00 0.00 230.00 -35.00 50.00 600.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+4574 2 """4DOBBIN----2""" 1.0510 0.00 222.00 -310.00 -50.00 75.00 160.00 65.60 0.0000 0.0000 0.0000 0.0000 0 0
+4575 2 """4DOUGLAS-PT2""" 1.1000 0.00 200.00 370.00 -50.00 80.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4576 0 """4EASTON-JCT2""" 1.0823 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4577 0 """4ESSA--230-2""" 1.0904 0.00 0.00 0.00 0.00 0.00 211.00 57.00 0.0000 0.0000 0.0000 0.0000 0 0
+4578 0 """4ESSEX-115-1""" 1.0395 0.00 0.00 0.00 0.00 0.00 84.00 -6.00 0.0000 0.0000 0.0000 0.0000 0 0
+4579 0 """4HANMER----5""" 1.0071 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 -2.1000 0.0000 0.0000 0 0
+4580 0 """4HANNON----2""" 1.0931 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4581 0 """4HANOVER---2""" 1.0859 0.00 0.00 0.00 0.00 0.00 172.20 38.20 0.0000 0.0000 0.0000 0.0000 0 0
+4582 0 """4HAWTHORNE-2""" 1.0613 0.00 0.00 0.00 0.00 0.00 400.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+4583 0 """4HINCHBROOK2""" 1.0640 0.00 0.00 0.00 0.00 0.00 300.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+4584 2 """4HOLDEN----2""" 1.1600 0.00 200.00 150.00 -50.00 90.00 96.00 25.00 0.0000 0.0000 0.0000 0.0000 0 0
+4585 0 """4KEITH-230-2""" 1.0658 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4586 2 """4KEITH-115-1""" 1.0383 0.00 60.00 -100.00 -10.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4587 0 """4KENT------1""" 0.9963 0.00 0.00 0.00 0.00 0.00 122.80 29.80 0.0000 0.0000 0.0000 0.0000 0 0
+4588 0 """4KLEINBURG-5""" 0.9713 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4589 0 """4KLEINBURG-2""" 1.0794 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4590 0 """4LAMBTON-345""" 1.0434 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4591 0 """4LAMBTON---2""" 1.1215 0.00 0.00 0.00 0.00 0.00 27.80 11.70 0.0000 0.0000 0.0000 0.0000 0 0
+4592 2 """4LAMBTON-.24""" 1.1750 0.00 1450.00 7430.00 -500.00 1080.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4593 0 """4LAUZON----2""" 1.0537 0.00 0.00 0.00 0.00 0.00 86.00 20.00 0.0000 0.0000 0.0000 0.0000 0 0
+4594 0 """4LAUZON----1""" 1.0421 0.00 0.00 0.00 0.00 0.00 124.70 16.20 0.0000 0.0000 0.0000 0.0000 0 0
+4595 0 """4LEASIDE---2""" 1.0681 0.00 0.00 0.00 0.00 0.00 500.00 150.00 0.0000 0.0000 0.0000 0.0000 0 0
+4596 0 """4-L-33-P---2""" 1.0530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4597 3 """4MANBY-----2""" 1.0650 0.00 726.60 450.00 0.00 0.00 950.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+4598 2 """4MARTINDALE2""" 1.1071 0.00 435.00 -500.00 -50.00 100.00 627.00 98.50 0.0000 0.0000 0.0000 0.0000 0 0
+4599 0 """4MERIVALE--2""" 0.9920 0.00 0.00 0.00 0.00 0.00 244.00 95.00 0.0000 0.0000 0.0000 0.0000 0 0
+4600 0 """4MIDDLEPORT2""" 1.1049 0.00 0.00 0.00 0.00 0.00 40.00 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+4601 0 """4MINDEN----2""" 1.1309 0.00 0.00 0.00 0.00 0.00 92.60 31.90 0.0000 0.0000 0.0000 0.0000 0 0
+4602 2 """4NANTICO---2""" 1.1570 0.00 1940.00 7680.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4603 2 """4NORTH-BAY-2""" 1.1500 0.00 245.00 -110.00 -50.00 100.00 27.20 11.90 0.0000 0.0000 0.0000 0.0000 0 0
+4604 0 """4NEALE-----2""" 1.0954 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4605 0 """4ORANGEVIL-2""" 1.0761 0.00 0.00 0.00 0.00 0.00 67.00 40.00 0.0000 0.0000 0.0000 0.0000 0 0
+4606 0 """4-PA-27-REG2""" 1.0521 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4607 0 """4PAUGAN----2""" 1.1278 0.00 0.00 0.00 0.00 0.00 8.30 2.50 0.0000 0.0000 0.0000 0.0000 0 0
+4608 0 """4PINARD----5""" 1.0473 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4609 2 """4PINARD----2""" 1.0400 0.00 550.00 600.00 -300.00 300.00 0.00 0.00 0.0000 -1.0470 0.0000 0.0000 0 0
+4610 0 """4PORCUPINE-5""" 1.0447 0.00 0.00 0.00 0.00 0.00 90.00 32.10 0.0000 0.0000 0.0000 0.0000 0 0
+4611 0 """4RICHVIEW--2""" 1.0681 0.00 0.00 0.00 0.00 0.00 800.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+4612 2 """4STLAWRENCE2""" 1.1139 0.00 744.00 3000.00 -100.00 300.00 250.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+4613 0 """4STLAWRENCE1""" 1.0058 0.00 0.00 0.00 0.00 0.00 49.50 21.00 0.0000 0.0000 0.0000 0.0000 0 0
+4614 0 """4STTHOMAS--1""" 1.0326 0.00 0.00 0.00 0.00 0.00 165.00 11.00 0.0000 0.0000 0.0000 0.0000 0 0
+4615 0 """4SANDWICH--2""" 1.0611 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4616 0 """4SAND.WEST-2""" 1.0622 0.00 0.00 0.00 0.00 0.00 114.80 51.60 0.0000 0.0000 0.0000 0.0000 0 0
+4617 0 """4SCOTT-----2""" 1.0961 0.00 0.00 0.00 0.00 0.00 160.00 41.70 0.0000 0.0000 0.0000 0.0000 0 0
+4618 0 """4SCOTT-----1""" 1.0396 0.00 0.00 0.00 0.00 0.00 169.50 36.20 0.0000 0.0000 0.0000 0.0000 0 0
+4619 0 """4WONDERLAND2""" 1.0664 0.00 0.00 0.00 0.00 0.00 79.30 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+4620 0 """5BAYSHORE-T3""" 1.0112 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4621 2 """5BAYSHORE-T1""" 1.0300 0.00 600.00 2680.00 -1000.00 1000.00 760.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+4622 2 """5LEMOYNE--T3""" 1.0120 0.00 0.00 1900.00 -1000.00 1000.00 175.00 90.80 0.0000 0.0000 0.0000 0.0000 0 0
+4623 0 """5BENTON-HBR3""" 1.0329 0.00 0.00 0.00 0.00 0.00 330.00 16.90 0.0000 0.0000 0.0000 0.0000 0 0
+4624 2 """5D.C.COOK--3""" 1.0300 0.00 2501.67 990.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4625 2 """5DUMONT----3""" 1.0300 0.00 850.00 5270.00 -1000.00 1000.00 167.00 50.00 0.0000 0.0000 0.0000 0.0000 0 0
+4626 2 """5E.LIMA----3""" 0.9900 0.00 80.00 860.00 -1000.00 1000.00 350.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+4627 2 """5FOSTORIA--3""" 1.0000 0.00 0.00 -490.00 -1000.00 1000.00 254.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+4628 2 """5OLIVE-----3""" 1.0200 0.00 0.00 -2130.00 -1000.00 1000.00 394.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+4629 2 """5ROBISON-PK3""" 0.9800 0.00 0.00 -630.00 -1000.00 1000.00 460.00 169.80 0.0000 0.0000 0.0000 0.0000 0 0
+4630 2 """5SORENSON--3""" 1.0000 0.00 163.00 850.00 -1000.00 1000.00 371.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+4631 2 """5TWIN-BRCH-3""" 1.0200 0.00 0.00 -1660.00 -1000.00 1000.00 700.00 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+4632 2 """5LEWISTON-Y2""" 1.0520 0.00 1209.10 -190.00 -200.00 420.00 654.10 -45.40 0.0000 0.0000 0.0000 0.0000 0 0
+4633 2 """5MOSSES---Y2""" 1.0500 0.00 400.00 620.00 0.00 130.00 505.90 96.60 0.0000 0.0000 0.0000 0.0000 0 0
+4634 2 """5PACKARD--Y2""" 1.0520 0.00 0.00 -160.00 -1000.00 100.00 641.40 -0.60 0.0000 0.0000 0.0000 0.0000 0 0
+4635 0 """ADAIR-------""" 1.0193 0.00 0.00 0.00 0.00 0.00 2.18 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+4636 0 """ADAMS-----40""" 1.0140 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+4637 0 """1AINSWORTH--""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.17 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4638 0 """ALGONAC-----""" 1.0163 0.00 0.00 0.00 0.00 0.00 7.98 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+4639 0 """ALMONT------""" 0.9849 0.00 0.00 0.00 0.00 0.00 3.28 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+4640 0 """ANDERSON----""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.59 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4641 0 """APPLEGATE---""" 0.9866 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4642 0 """ARGO--------""" 1.0307 0.00 0.00 0.00 0.00 0.00 23.02 3.93 0.0000 0.1200 0.0000 0.0000 0 0
+4643 0 """ARMADA------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.52 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+4644 0 """ARROWHEAD-40""" 1.0217 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4645 0 """ATTICA------""" 0.9842 0.00 0.00 0.00 0.00 0.00 1.34 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+4646 0 """AUBURN-HTS-1""" 1.0049 0.00 0.00 0.00 0.00 0.00 6.50 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+4647 0 """AVOCA-------""" 0.9930 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4648 0 """AVON--------""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+4649 0 """BAD-AXE-40--""" 0.9987 0.00 0.00 0.00 0.00 0.00 6.13 2.12 0.0000 0.0660 0.0000 0.0000 0 0
+4650 0 """BALDWIN--EQ1""" 1.0224 0.00 0.00 0.00 0.00 0.00 8.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+4651 0 """BARNES-LAKE-""" 0.9888 0.00 0.00 0.00 0.00 0.00 2.20 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+4652 0 """1BARTLETT-CP""" 1.0119 0.00 0.00 0.00 0.00 0.00 7.40 5.87 0.0000 0.0000 0.0000 0.0000 0 0
+4653 0 """BAYPORT-----""" 0.9869 0.00 0.00 0.00 0.00 0.00 1.26 2.12 0.0000 0.0000 0.0000 0.0000 0 0
+4654 0 """BEAVER------""" 0.9956 0.00 0.00 0.00 0.00 0.00 0.17 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4655 0 """BELLEVILLE--""" 1.0212 0.00 0.00 0.00 0.00 0.00 6.05 2.66 0.0000 0.0000 0.0000 0.0000 0 0
+4656 0 """BERLIN-FUT74""" 1.0348 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4657 0 """BERNARD-----""" 0.9996 0.00 0.00 0.00 0.00 0.00 2.10 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+4658 0 """BINGHAM--EQ1""" 1.0029 0.00 0.00 0.00 0.00 0.00 3.28 1.49 0.0000 0.0480 0.0000 0.0000 0 0
+4659 0 """BLOOMFIELD40""" 1.0220 0.00 0.00 0.00 0.00 0.00 79.00 39.62 0.0000 0.0900 0.0000 0.0000 0 0
+4660 0 """BOND,MADRID-""" 1.0551 0.00 0.00 0.00 0.00 0.00 2.18 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+4661 0 """BREST-------""" 1.0358 0.00 0.00 0.00 0.00 0.00 5.04 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4662 0 """BREWER------""" 1.0045 0.00 0.00 0.00 0.00 0.00 2.94 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+4663 0 """BRIGHTON----""" 1.0076 0.00 0.00 0.00 0.00 0.00 5.96 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+4664 0 """BROWN-CITY--""" 0.9725 0.00 0.00 0.00 0.00 0.00 3.28 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+4665 0 """BROWNSTOWN40""" 1.0348 0.00 0.00 0.00 0.00 0.00 36.46 24.76 0.0000 0.0000 0.0000 0.0000 0 0
+4666 0 """BRAY--------""" 0.9770 0.00 0.00 0.00 0.00 0.00 1.51 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4667 0 """BRUCE---EQ1-""" 1.0034 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+4668 0 """BUNCE-CRK-40""" 1.0333 0.00 0.00 0.00 0.00 0.00 7.73 4.25 0.0000 0.0000 0.0000 0.0000 0 0
+4669 2 """BUNCE-CRK-24""" 1.0607 0.00 84.00 480.00 0.00 480.00 37.72 22.10 0.0000 0.0000 0.0000 0.0000 0 0
+4670 0 """CALUMET-----""" 0.9844 0.00 0.00 0.00 0.00 0.00 3.11 1.91 0.0000 0.0000 0.0000 0.0000 0 0
+4671 0 """CAMDEN-2,5--""" 1.0033 0.00 0.00 0.00 0.00 0.00 9.41 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+4672 0 """CAMPUS-1----""" 1.0279 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+4673 0 """CAMPUS-2----""" 1.0216 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+4674 0 """CAPAC-------""" 0.9880 0.00 0.00 0.00 0.00 0.00 3.11 1.38 0.0000 0.0660 0.0000 0.0000 0 0
+4675 0 """CARLETON----""" 1.0054 0.00 0.00 0.00 0.00 0.00 1.76 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+4676 0 """CARO-1------""" 1.0018 0.00 0.00 0.00 0.00 0.00 1.68 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4677 0 """CARO-T.E.C.-""" 0.9962 0.00 0.00 0.00 0.00 0.00 1.76 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+4678 0 """CARPENTER---""" 1.0007 0.00 0.00 0.00 0.00 0.00 8.15 3.29 0.0000 0.1140 0.0000 0.0000 0 0
+4679 0 """CARSONVILLE-""" 0.9885 0.00 0.00 0.00 0.00 0.00 0.67 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4680 0 """CARTER------""" 1.0069 0.00 0.00 0.00 0.00 0.00 15.04 7.54 0.0000 0.0000 0.0000 0.0000 0 0
+4681 0 """CASEVILLE---""" 0.9683 0.00 0.00 0.00 0.00 0.00 3.02 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+4682 0 """CASEY-------""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.18 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+4683 0 """CASS-CITY---""" 1.0011 0.00 0.00 0.00 0.00 0.00 5.04 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+4684 0 """CHERRY-HILL-""" 0.9566 0.00 0.00 0.00 0.00 0.00 0.92 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4685 0 """CHESTERFLD-1""" 1.0264 0.00 0.00 0.00 0.00 0.00 3.95 0.53 0.0000 0.0480 0.0000 0.0000 0 0
+4686 0 """CHESTERFLD-2""" 1.0088 0.00 0.00 0.00 0.00 0.00 8.48 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+4687 0 """CHESTNUT-40-""" 1.0150 0.00 0.00 0.00 0.00 0.00 75.20 29.50 0.0000 0.3600 0.0000 0.0000 0 0
+4688 0 """CHILSON-----""" 1.0175 0.00 0.00 0.00 0.00 0.00 1.51 0.85 0.0000 0.0660 0.0000 0.0000 0 0
+4689 0 """CLARKSTON-2-""" 1.0013 0.00 0.00 0.00 0.00 0.00 4.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+4690 0 """CLIFFORD----""" 0.9881 0.00 0.00 0.00 0.00 0.00 1.34 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+4691 0 """COATS-------""" 1.0093 0.00 0.00 0.00 0.00 0.00 3.36 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4692 0 """CODY-40-----""" 1.0456 0.00 0.00 0.00 0.00 0.00 19.99 6.27 0.0000 0.1800 0.0000 0.0000 0 0
+4693 0 """COLFAX---EQ1""" 1.0885 0.00 14.00 40.00 0.00 0.00 4.87 2.55 0.0000 0.0480 0.0000 0.0000 0 0
+4694 0 """COLLIER----1""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+4695 0 """CLOTH-PR.-1-""" 1.0059 0.00 0.00 0.00 0.00 0.00 3.00 -0.37 0.0000 0.0000 0.0000 0.0000 0 0
+4696 0 """COLUMBIAVILE""" 0.9871 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4697 0 """COMMERCE-LK-""" 0.9872 0.00 0.00 0.00 0.00 0.00 6.05 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+4698 0 """CORTLAND-24-""" 1.0112 0.00 0.00 0.00 0.00 0.00 204.10 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+4699 0 """CROSWELL-EQ1""" 0.9883 0.00 0.00 0.00 0.00 0.00 5.96 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+4700 0 """CROWN-1-----""" 1.0243 0.00 0.00 0.00 0.00 0.00 10.16 0.32 0.0000 0.0900 0.0000 0.0000 0 0
+4701 0 """CROWN-2-----""" 0.9891 0.00 0.00 0.00 0.00 0.00 4.54 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+4702 0 """CULVER------""" 0.9954 0.00 0.00 0.00 0.00 0.00 8.57 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+4703 0 """CUSTER-24---""" 1.0216 0.00 14.00 40.00 0.00 0.00 61.40 33.15 0.0000 0.0000 0.0000 0.0000 0 0
+4704 0 """DADE-1------""" 1.0165 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+4705 0 """DADE-2------""" 1.0158 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+4706 0 """DARWIN-1----""" 1.0440 0.00 0.00 0.00 0.00 0.00 4.87 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+4707 0 """DARWIN-2----""" 1.0408 0.00 0.00 0.00 0.00 0.00 4.79 1.27 0.0000 0.0480 0.0000 0.0000 0 0
+4708 0 """DAVIS---EQ1-""" 0.9767 0.00 0.00 0.00 0.00 0.00 20.30 10.25 0.0000 0.0900 0.0000 0.0000 0 0
+4709 0 """DAYTON-40---""" 1.0256 0.00 5.00 10.00 0.00 0.00 5.71 2.97 0.0000 0.0660 0.0000 0.0000 0 0
+4710 0 """DECKR-+-ASPN""" 0.9878 0.00 0.00 0.00 0.00 0.00 2.52 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4711 0 """DEWEY-2-----""" 0.9865 0.00 0.00 0.00 0.00 0.00 11.34 3.82 0.0000 0.0000 0.0000 0.0000 0 0
+4712 0 """DEXTER---EQ1""" 1.0348 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0480 0.0000 0.0000 0 0
+4713 0 """DILLARD-1---""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4714 0 """DOVER-1-----""" 1.0030 0.00 0.00 0.00 0.00 0.00 3.78 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+4715 0 """DOVER-2-----""" 0.9997 0.00 0.00 0.00 0.00 0.00 3.19 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+4716 0 """DREXEL-2----""" 0.9883 0.00 0.00 0.00 0.00 0.00 9.24 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4717 0 """DRYDEN------""" 0.9797 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+4718 0 """ECKLES-2----""" 0.9704 0.00 0.00 0.00 0.00 0.00 4.62 -0.74 0.0000 0.0000 0.0000 0.0000 0 0
+4719 0 """EDGEWATER---""" 0.9989 0.00 0.00 0.00 0.00 0.00 1.30 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+4720 0 """ELKTON------""" 0.9804 0.00 0.00 0.00 0.00 0.00 3.36 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4721 0 """ELM-40------""" 1.0242 0.00 0.00 0.00 0.00 0.00 107.77 79.00 0.0000 0.2850 0.0000 0.0000 0 0
+4722 0 """EMERICK-1---""" 1.0099 0.00 0.00 0.00 0.00 0.00 8.82 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+4723 0 """EMMETT------""" 0.9925 0.00 0.00 0.00 0.00 0.00 1.01 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4724 0 """ENGLISH-----""" 1.0024 0.00 0.00 0.00 0.00 0.00 1.68 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4725 0 """ERIN40------""" 1.0115 0.00 0.00 0.00 0.00 0.00 103.40 41.50 0.0000 0.1800 0.0000 0.0000 0 0
+4726 0 """EVERGREEN-40""" 1.0364 0.00 0.00 0.00 0.00 0.00 213.20 82.90 0.0000 0.5100 0.0000 0.0000 0 0
+4727 0 """FAIRGROVE---""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.02 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4728 0 """FALCON-1----""" 1.0232 0.00 0.00 0.00 0.00 0.00 9.32 6.12 0.0000 0.0000 0.0000 0.0000 0 0
+4729 0 """FALCON-2----""" 1.0207 0.00 0.00 0.00 0.00 0.00 7.56 4.99 0.0000 0.0000 0.0000 0.0000 0 0
+4730 0 """FISHER------""" 1.0370 0.00 0.00 0.00 0.00 0.00 5.96 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+4731 0 """FLAT-ROCK-1-""" 1.0195 0.00 0.00 0.00 0.00 0.00 1.68 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+4732 0 """FLEMING-----""" 1.0067 0.00 0.00 0.00 0.00 0.00 4.54 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+4733 0 """FORESTER----""" 0.9770 0.00 0.00 0.00 0.00 0.00 0.76 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4734 0 """FRANK2---EQ1""" 0.9722 0.00 0.00 0.00 0.00 0.00 6.10 1.50 0.0000 0.0000 0.0000 0.0000 0 0
+4735 0 """FREEDOM-----""" 0.9954 0.00 0.00 0.00 0.00 0.00 1.10 0.12 0.0000 0.0000 0.0000 0.0000 0 0
+4736 0 """FRENCHLND-2-""" 1.0263 0.00 0.00 0.00 0.00 0.00 5.70 4.37 0.0000 0.1200 0.0000 0.0000 0 0
+4737 0 """FRISBIE-24--""" 1.0881 0.00 0.00 0.00 0.00 0.00 222.68 75.01 0.0000 0.0000 0.0000 0.0000 0 0
+4738 0 """FULLER-1----""" 1.0203 0.00 0.00 0.00 0.00 0.00 2.52 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+4739 0 """FULLER-2----""" 1.0257 0.00 0.00 0.00 0.00 0.00 2.44 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+4740 0 """GAGETOWN----""" 1.0203 0.00 0.00 0.00 0.00 0.00 1.18 0.42 0.0000 0.0480 0.0000 0.0000 0 0
+4741 0 """1GARNER-CP--""" 1.0195 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4742 0 """GENOA-40----""" 1.0191 0.00 0.00 0.00 0.00 0.00 12.94 6.37 0.0000 0.1800 0.0000 0.0000 0 0
+4743 0 """GLOBE-------""" 0.9892 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4744 0 """GOODISON----""" 0.9861 0.00 0.00 0.00 0.00 0.00 7.56 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+4745 0 """GRAF--------""" 0.9961 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+4746 0 """HAMBURG-----""" 1.0440 0.00 0.00 0.00 0.00 0.00 2.44 0.64 0.0000 0.0660 0.0000 0.0000 0 0
+4747 0 """HANCOCK-40--""" 1.0036 0.00 100.81 190.00 0.00 0.00 29.57 15.62 0.0000 0.0000 0.0000 0.0000 0 0
+4748 0 """HANNAN-1---1""" 1.0048 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+4749 0 """HARTLAND----""" 0.9948 0.00 0.00 0.00 0.00 0.00 2.18 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4750 0 """HEMLOCK-1---""" 1.0293 0.00 0.00 0.00 0.00 0.00 6.00 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+4751 0 """HEMLOCK-2---""" 1.0364 0.00 0.00 0.00 0.00 0.00 6.97 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+4752 2 """HINES-40----""" 0.9900 0.00 0.00 120.00 0.00 18.00 115.58 95.12 0.0000 0.3600 0.0000 0.0000 0 0
+4753 0 """HOBART-TAP--""" 1.0363 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4754 0 """HOBART------""" 1.0414 0.00 0.00 0.00 0.00 0.00 4.03 1.59 0.0000 0.0900 0.0000 0.0000 0 0
+4755 0 """HOWELL-2----""" 1.0160 0.00 0.00 0.00 0.00 0.00 3.95 1.81 0.0000 0.0660 0.0000 0.0000 0 0
+4756 0 """HUNTERS-CR40""" 1.0031 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4757 0 """IDA---------""" 1.0107 0.00 0.00 0.00 0.00 0.00 1.90 -0.12 0.0000 0.0000 0.0000 0.0000 0 0
+4758 0 """IMLAY-CITY--""" 0.9775 0.00 0.00 0.00 0.00 0.00 4.70 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+4759 0 """INLAND---EQ1""" 1.0137 0.00 0.00 0.00 0.00 0.00 5.80 3.51 0.0000 0.0000 0.0000 0.0000 0 0
+4760 0 """IRA---------""" 1.0238 0.00 0.00 0.00 0.00 0.00 2.10 0.85 0.0000 0.0480 0.0000 0.0000 0 0
+4761 0 """IRONTON-24--""" 1.0193 0.00 0.00 0.00 0.00 0.00 177.80 67.00 0.0000 0.0000 0.0000 0.0000 0 0
+4762 0 """IRVING------""" 0.9945 0.00 0.00 0.00 0.00 0.00 5.88 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4763 0 """JACKSON-RD.2""" 1.0346 0.00 0.00 0.00 0.00 0.00 1.01 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4764 0 """JASPER------""" 1.0041 0.00 0.00 0.00 0.00 0.00 0.34 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4765 0 """JORDAN-1----""" 0.9922 0.00 0.00 0.00 0.00 0.00 1.85 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+4766 0 """JOPLIN------""" 0.9903 0.00 0.00 0.00 0.00 0.00 0.76 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4767 0 """KEEGO-2-----""" 0.9789 0.00 0.00 0.00 0.00 0.00 1.10 0.37 0.0000 0.0000 0.0000 0.0000 0 0
+4768 0 """KELLOGG-----""" 0.9988 0.00 0.00 0.00 0.00 0.00 3.78 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4769 0 """1KENNETT-CP-""" 1.0198 0.00 0.00 0.00 0.00 0.00 17.90 8.37 0.0000 0.0000 0.0000 0.0000 0 0
+4770 0 """KIMBALL-----""" 1.0128 0.00 0.00 0.00 0.00 0.00 3.36 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+4771 0 """KINDE-------""" 0.9840 0.00 0.00 0.00 0.00 0.00 1.01 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4772 0 """KING-SEELEY-""" 1.0463 0.00 0.00 0.00 0.00 0.00 2.69 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4773 0 """LAKEPORT----""" 1.0008 0.00 0.00 0.00 0.00 0.00 1.85 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4774 0 """LAKEVILLE---""" 0.9976 0.00 0.00 0.00 0.00 0.00 1.09 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+4775 0 """LAPEER------""" 0.9933 0.00 0.00 0.00 0.00 0.00 3.78 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+4776 0 """LARK-40-----""" 1.0476 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4777 0 """LEE-40------""" 1.0183 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+4778 0 """LIMA--------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.18 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4779 0 """LINCOLN-24--""" 0.9866 0.00 0.00 0.00 0.00 0.00 148.43 124.57 0.0000 0.5700 0.0000 0.0000 0 0
+4780 0 """LUZON-40----""" 1.0040 0.00 0.00 0.00 0.00 0.00 21.67 12.01 0.0000 0.0900 0.0000 0.0000 0 0
+4781 0 """MACOMB-40---""" 1.0194 0.00 0.00 0.00 0.00 0.00 132.00 96.50 0.0000 0.3600 0.0000 0.0000 0 0
+4782 0 """MARINE-CITY-""" 1.0387 0.00 0.00 0.00 0.00 0.00 5.21 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+4783 0 """MARLETTE----""" 0.9794 0.00 0.00 0.00 0.00 0.00 5.29 1.70 0.0000 0.0480 0.0000 0.0000 0 0
+4784 0 """MAYBEE------""" 1.0091 0.00 0.00 0.00 0.00 0.00 1.26 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+4785 0 """MAYVILLE----""" 1.0032 0.00 0.00 0.00 0.00 0.00 2.02 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4786 0 """MEADOW---EQ1""" 0.9943 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+4787 0 """MEDINA-40---""" 1.0197 0.00 0.00 0.00 0.00 0.00 45.80 21.50 0.0000 0.1800 0.0000 0.0000 0 0
+4788 0 """MELVIN------""" 0.9800 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4789 0 """METAMORA----""" 0.9954 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+4790 0 """MILFORD-----""" 1.0033 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+4791 0 """MILLINGTON--""" 0.9808 0.00 0.00 0.00 0.00 0.00 2.35 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4792 0 """MOHAWK-2----""" 0.9967 0.00 0.00 0.00 0.00 0.00 2.10 0.25 0.0000 0.0000 0.0000 0.0000 0 0
+4793 0 """MONARCH-----""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.30 1.50 0.0000 0.0960 0.0000 0.0000 0 0
+4794 0 """1MONTCALM-CP""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4795 0 """MOTT-2------""" 1.0159 0.00 0.00 0.00 0.00 0.00 7.39 3.82 0.0000 0.0900 0.0000 0.0000 0 0
+4796 0 """NATIONAL-1--""" 0.9928 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+4797 0 """NATIONAL-2--""" 0.9997 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+4798 0 """NAVARRE-24--""" 1.0384 0.00 0.00 0.00 0.00 0.00 190.43 107.21 0.0000 0.8700 0.0000 0.0000 0 0
+4799 0 """NEFF--------""" 1.0012 0.00 0.00 0.00 0.00 0.00 5.71 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+4800 0 """NELSON-MILS1""" 1.0263 0.00 0.00 0.00 0.00 0.00 2.94 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4801 0 """NELSON-MILS2""" 1.0270 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+4802 0 """NEW-BALTMR-1""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.10 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4803 0 """NEW-BALTMR23""" 1.0237 0.00 0.00 0.00 0.00 0.00 4.28 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+4804 0 """NEW-BOSTON--""" 1.0111 0.00 0.00 0.00 0.00 0.00 1.93 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4805 0 """NEWBURGH-40-""" 0.9673 0.00 0.00 0.00 0.00 0.00 147.42 102.95 0.0000 0.3000 0.0000 0.0000 0 0
+4806 0 """NEW-HAVEN-1-""" 1.0179 0.00 0.00 0.00 0.00 0.00 3.44 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+4807 0 """NEW-HAVEN-2-""" 1.0220 0.00 0.00 0.00 0.00 0.00 2.69 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+4808 0 """NIXON-2-----""" 0.9768 0.00 0.00 0.00 0.00 0.00 11.09 5.52 0.0000 0.0000 0.0000 0.0000 0 0
+4809 0 """NOBLE-------""" 0.9863 0.00 0.00 0.00 0.00 0.00 16.97 9.14 0.0000 0.0000 0.0000 0.0000 0 0
+4810 0 """NORTH-BRANCH""" 0.9717 0.00 0.00 0.00 0.00 0.00 4.45 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+4811 2 """NORTHEAST-24""" 1.0104 0.00 80.00 0.00 0.00 48.00 230.24 141.20 0.0000 0.4800 0.0000 0.0000 0 0
+4812 0 """NORTH-SRVCTR""" 1.0050 0.00 0.00 0.00 0.00 0.00 5.80 4.36 0.0000 0.0000 0.0000 0.0000 0 0
+4813 2 """NORTHWEST-40""" 1.0044 0.00 0.00 0.00 0.00 18.00 209.70 76.40 0.0000 0.5480 0.0000 0.0000 0 0
+4814 0 """NORWAY-1----""" 0.9516 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+4815 0 """NORWAY-2-EQ1""" 0.9477 0.00 0.00 0.00 0.00 0.00 5.96 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+4816 0 """OAK-BEACH---""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.84 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4817 0 """OLIVER------""" 0.9870 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4818 0 """OLYMPA-FUT75""" 0.9825 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4819 0 """OMAHA-1--EQ1""" 0.9473 0.00 0.00 0.00 0.00 0.00 10.08 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+4820 0 """OMAHA-2--EQ1""" 0.9465 0.00 0.00 0.00 0.00 0.00 9.58 3.61 0.0000 0.0000 0.0000 0.0000 0 0
+4821 0 """OPAL--------""" 1.0050 0.00 0.00 0.00 0.00 0.00 0.92 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+4822 0 """OREGON-1----""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.38 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+4823 0 """ORION-------""" 0.9925 0.00 0.00 0.00 0.00 0.00 5.46 2.02 0.0000 0.0660 0.0000 0.0000 0 0
+4824 0 """OTTER-LAKE--""" 0.9836 0.00 0.00 0.00 0.00 0.00 1.01 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+4825 0 """OWENDALE----""" 1.0049 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4826 0 """OXFORD------""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.89 3.72 0.0000 0.1200 0.0000 0.0000 0 0
+4827 0 """1PADDOCK-CP-""" 1.0220 0.00 0.00 0.00 0.00 0.00 4.30 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+4828 0 """PAGE--------""" 0.9930 0.00 0.00 0.00 0.00 0.00 9.58 5.63 0.0000 0.0660 0.0000 0.0000 0 0
+4829 0 """PALMER-1----""" 0.9643 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+4830 0 """PARKER-ROAD-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.64 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+4831 0 """PAUL-1------""" 1.0114 0.00 0.00 0.00 0.00 0.00 8.15 4.89 0.0000 0.0480 0.0000 0.0000 0 0
+4832 0 """PAUL-2,3----""" 1.0157 0.00 0.00 0.00 0.00 0.00 4.70 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+4833 0 """PHOENIX-40--""" 1.0379 0.00 0.00 0.00 0.00 0.00 36.71 20.82 0.0000 0.0000 0.0000 0.0000 0 0
+4834 0 """PIEDMONT----""" 1.0235 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4835 0 """PIGEON------""" 0.9818 0.00 0.00 0.00 0.00 0.00 3.78 4.78 0.0000 0.0480 0.0000 0.0000 0 0
+4836 0 """PINCKNEY----""" 1.0442 0.00 0.00 0.00 0.00 0.00 3.86 1.70 0.0000 0.0900 0.0000 0.0000 0 0
+4837 0 """PIONEER---40""" 1.0270 0.00 0.00 0.00 0.00 0.00 19.10 10.12 0.0000 0.0000 0.0000 0.0000 0 0
+4838 0 """PIPER---EQ1-""" 1.0008 0.00 0.00 0.00 0.00 0.00 5.12 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+4839 0 """PITSFLD--EQ1""" 1.0164 0.00 0.00 0.00 0.00 0.00 9.66 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+4840 0 """PLACID------""" 1.0026 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4841 0 """PLYMOUTH----""" 0.9523 0.00 0.00 0.00 0.00 0.00 12.10 7.44 0.0000 0.1560 0.0000 0.0000 0 0
+4842 0 """PORT-AUSTIN-""" 0.9754 0.00 0.00 0.00 0.00 0.00 3.02 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4843 0 """PORT-HOPE---""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4844 0 """PORT-SANILAC""" 0.9808 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4845 0 """PRICE-1-----""" 1.0353 0.00 0.00 0.00 0.00 0.00 4.37 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+4846 0 """PROCTOR-----""" 0.9955 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4847 0 """PUTNAM------""" 1.0098 0.00 14.00 40.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4848 0 """QUEEN-------""" 1.0065 0.00 0.00 0.00 0.00 0.00 3.53 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+4849 0 """QUINCY------""" 1.0030 0.00 0.00 0.00 0.00 0.00 1.34 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4850 0 """RANDOLPH----""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4851 0 """RAVINE---EQ1""" 0.9764 0.00 0.00 0.00 0.00 0.00 8.90 3.62 0.0000 0.0000 0.0000 0.0000 0 0
+4852 0 """RED-RUN-40--""" 1.0203 0.00 0.00 0.00 0.00 0.00 140.87 71.29 0.0000 0.5400 0.0000 0.0000 0 0
+4853 0 """REESE---EQ2-""" 0.9799 0.00 0.00 0.00 0.00 0.00 5.96 2.23 0.0000 0.0480 0.0000 0.0000 0 0
+4854 0 """REMER-40----""" 1.0461 0.00 0.00 0.00 0.00 0.00 1.34 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4855 0 """RENO--------""" 0.9937 0.00 0.00 0.00 0.00 0.00 4.80 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+4856 0 """RICHMOND----""" 1.0130 0.00 0.00 0.00 0.00 0.00 5.63 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+4857 0 """RIFLE-------""" 0.9886 0.00 0.00 0.00 0.00 0.00 6.13 2.97 0.0000 0.0480 0.0000 0.0000 0 0
+4858 0 """RIVER-RAISIN""" 1.0072 0.00 0.00 0.00 0.00 0.00 0.92 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4859 2 """RIVERVIEW-40""" 1.0021 0.00 25.00 -100.00 -10.00 20.00 145.57 79.69 0.0000 0.3600 0.0000 0.0000 0 0
+4860 0 """ROCHESTER-1-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.55 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+4861 0 """ROCKWOOD----""" 1.0345 0.00 0.00 0.00 0.00 0.00 5.80 1.59 0.0000 0.0340 0.0000 0.0000 0 0
+4862 0 """ROMEO---EQ1-""" 1.0133 0.00 0.00 0.00 0.00 0.00 6.13 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+4863 0 """ROMULUS---40""" 1.0151 0.00 0.00 0.00 0.00 0.00 20.66 13.07 0.0000 0.1680 0.0000 0.0000 0 0
+4864 0 """RUSH-TAP----""" 0.9835 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4865 0 """RUSH-40-----""" 1.0014 0.00 0.00 0.00 0.00 0.00 3.70 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+4866 0 """SALEM-------""" 1.0417 0.00 0.00 0.00 0.00 0.00 1.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4867 0 """SALINE------""" 1.0017 0.00 0.00 0.00 0.00 0.00 9.10 4.87 0.0000 0.0960 0.0000 0.0000 0 0
+4868 0 """SANDUSKY-40-""" 1.0042 0.00 0.00 0.00 0.00 0.00 5.29 1.91 0.0000 0.0660 0.0000 0.0000 0 0
+4869 0 """SAXON-------""" 0.9916 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+4870 0 """SEBEWAING---""" 1.0083 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+4871 0 """SELFRIDGE-1-""" 1.0074 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+4872 0 """SELKIRK-----""" 1.0092 0.00 0.00 0.00 0.00 0.00 6.05 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+4873 0 """SHAW--------""" 0.9720 0.00 0.00 0.00 0.00 0.00 1.60 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4874 0 """SHELDON-1---""" 0.9578 0.00 0.00 0.00 0.00 0.00 5.29 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+4875 0 """SHERWOOD----""" 1.0148 0.00 0.00 0.00 0.00 0.00 1.93 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4876 0 """SNOVER------""" 0.9929 0.00 0.00 0.00 0.00 0.00 1.60 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+4877 0 """SOUTHFLD-40-""" 1.0066 0.00 0.00 0.00 0.00 0.00 99.54 81.89 0.0000 0.0900 0.0000 0.0000 0 0
+4878 0 """STATE-1-----""" 1.0247 0.00 0.00 0.00 0.00 0.00 5.60 3.25 0.0000 0.0000 0.0000 0.0000 0 0
+4879 0 """SPOKANE-40--""" 1.0014 0.00 0.00 0.00 0.00 0.00 36.54 16.57 0.0000 0.0000 0.0000 0.0000 0 0
+4880 0 """ST-CLAIR-1--""" 1.0259 0.00 0.00 0.00 0.00 0.00 2.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4881 0 """ST-CLAIR-2--""" 1.0352 0.00 0.00 0.00 0.00 0.00 2.69 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+4882 0 """STEPHENS-24-""" 1.0074 0.00 0.00 0.00 0.00 0.00 164.30 105.69 0.0000 0.5700 0.0000 0.0000 0 0
+4883 0 """STERLING-40-""" 1.0210 0.00 0.00 0.00 0.00 0.00 101.14 45.79 0.0000 0.5400 0.0000 0.0000 0 0
+4884 0 """STOCKBRIDGE-""" 1.0701 0.00 0.00 0.00 0.00 0.00 1.09 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4885 0 """1STOCKWELLCP""" 1.0172 0.00 0.00 0.00 0.00 0.00 10.90 6.75 0.0000 0.0000 0.0000 0.0000 0 0
+4886 0 """SUNSET-40---""" 1.0041 0.00 0.00 0.00 0.00 0.00 78.79 59.01 0.0000 0.5160 0.0000 0.0000 0 0
+4887 2 """SUPERIOR-40-""" 1.0189 0.00 0.00 0.00 0.00 118.00 61.49 48.74 0.0000 0.1800 0.0000 0.0000 0 0
+4888 0 """TIENKEN-2---""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4889 0 """TALBOT---EQ1""" 0.9854 0.00 0.00 0.00 0.00 0.00 2.35 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+4890 0 """1TAYLOR-1-13""" 1.0121 0.00 0.00 0.00 0.00 0.00 10.67 6.27 0.0000 0.0000 0.0000 0.0000 0 0
+4891 0 """1TAYLOR-2-13""" 1.0154 0.00 0.00 0.00 0.00 0.00 8.65 6.48 0.0000 0.0000 0.0000 0.0000 0 0
+4892 0 """TEGGERDINE--""" 0.9815 0.00 0.00 0.00 0.00 0.00 11.34 4.67 0.0000 0.0000 0.0000 0.0000 0 0
+4893 0 """TEMPLE------""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.59 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4894 0 """TEXAS-------""" 1.0281 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4895 0 """TODD--------""" 1.0426 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+4896 0 """TRINITY-2---""" 1.0107 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+4897 0 """TROY-40-----""" 0.9963 0.00 0.00 0.00 0.00 0.00 178.92 77.64 0.0000 0.5400 0.0000 0.0000 0 0
+4898 0 """TUSCOLA-40--""" 1.0020 0.00 0.00 0.00 0.00 0.00 6.22 2.55 0.0000 0.0660 0.0000 0.0000 0 0
+4899 0 """UNION-LAKE--""" 0.9771 0.00 0.00 0.00 0.00 0.00 11.84 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+4900 0 """UNIONVILLE--""" 1.0120 0.00 0.00 0.00 0.00 0.00 1.26 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+4901 0 """UNIVR-BUS1T6""" 1.0250 0.00 0.00 0.00 0.00 0.00 11.17 8.71 0.0000 0.0000 0.0000 0.0000 0 0
+4902 0 """URBAN-TEC---""" 0.9887 0.00 0.00 0.00 0.00 0.00 5.12 3.19 0.0000 0.0000 0.0000 0.0000 0 0
+4903 0 """UTAH--------""" 1.0415 0.00 0.00 0.00 0.00 0.00 0.76 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+4904 0 """VANBUREN-EQ1""" 1.0128 0.00 0.00 0.00 0.00 0.00 1.51 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+4905 0 """VASSAR-BIRCH""" 0.9744 0.00 0.00 0.00 0.00 0.00 10.00 5.74 0.0000 0.0660 0.0000 0.0000 0 0
+4906 0 """VICTOR-40---""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4907 0 """VALLEY------""" 1.0268 0.00 6.00 20.00 0.00 0.00 0.90 0.62 0.0000 0.0000 0.0000 0.0000 0 0
+4908 0 """WABASH-40---""" 1.0066 0.00 0.00 0.00 0.00 0.00 46.70 26.25 0.0000 0.0000 0.0000 0.0000 0 0
+4909 0 """WALLED-LAKE-""" 0.9972 0.00 0.00 0.00 0.00 0.00 6.00 2.62 0.0000 0.0000 0.0000 0.0000 0 0
+4910 0 """WALNUT-1,2--""" 0.9814 0.00 0.00 0.00 0.00 0.00 9.60 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+4911 0 """WALTON40-SUB""" 1.0330 0.00 0.00 0.00 0.00 0.00 44.35 20.08 0.0000 0.1800 0.0000 0.0000 0 0
+4912 0 """WARDLOW-----""" 0.9956 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+4913 2 """WARREN-24---""" 1.0171 0.00 0.00 540.00 0.00 54.00 268.46 194.97 0.0000 0.9000 0.0000 0.0000 0 0
+4914 0 """WASHNGTN-EQ1""" 1.0002 0.00 0.00 0.00 0.00 0.00 8.57 4.36 0.0000 0.0660 0.0000 0.0000 0 0
+4915 0 """WATERFORD---""" 0.9903 0.00 0.00 0.00 0.00 0.00 17.81 5.52 0.0000 0.1800 0.0000 0.0000 0 0
+4916 0 """WEBERVLE-EQ1""" 1.0885 0.00 0.00 0.00 0.00 0.00 8.23 1.91 0.0000 0.1140 0.0000 0.0000 0 0
+4917 0 """WHITE-LAKE--""" 0.9941 0.00 0.00 0.00 0.00 0.00 4.70 1.59 0.0000 0.0000 0.0000 0.0000 0 0
+4918 0 """WHITMORE-LK-""" 1.0357 0.00 0.00 0.00 0.00 0.00 7.81 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+4919 0 """WHITNY-FUT73""" 1.0033 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4920 0 """WILEY-------""" 1.0197 0.00 0.00 0.00 0.00 0.00 1.26 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+4921 0 """WILMOTK-NGFD""" 0.9922 0.00 0.00 0.00 0.00 0.00 0.84 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+4922 0 """WILSON------""" 1.0128 0.00 0.00 0.00 0.00 0.00 2.60 -0.21 0.0000 0.0000 0.0000 0.0000 0 0
+4923 0 """1WILSON-CP--""" 1.0157 0.00 0.00 0.00 0.00 0.00 8.60 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+4924 0 """WOLFHILL----""" 0.9897 0.00 0.00 0.00 0.00 0.00 4.96 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+4925 0 """WOLVERINE-2-""" 1.0200 0.00 0.00 0.00 0.00 0.00 5.12 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+4926 0 """WORTH-------""" 1.0069 0.00 0.00 0.00 0.00 0.00 2.18 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+4927 0 """YALE-TAP----""" 0.9902 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4928 0 """YALE--------""" 0.9870 0.00 0.00 0.00 0.00 0.00 3.11 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+4929 0 """YATES-------""" 0.9871 0.00 0.00 0.00 0.00 0.00 1.34 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+4930 0 """YORK--------""" 0.9901 0.00 0.00 0.00 0.00 0.00 2.44 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+4931 0 """YOST-40-----""" 1.0354 0.00 0.00 0.00 0.00 0.00 48.55 26.29 0.0000 0.0480 0.0000 0.0000 0 0
+4932 0 """2ADAMS-----1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4933 0 """2ALFRED----1""" 1.0468 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+4934 0 """ALFRED-13---""" 1.0489 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+4935 0 """2AMHERST1.13""" 1.0230 0.00 0.00 0.00 0.00 0.00 7.56 4.72 0.0000 0.0000 0.0000 0.0000 0 0
+4936 0 """2AMHERST2.13""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4937 0 """2ARROWHEAD-1""" 1.0315 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4938 0 """2BAD-AXE---1""" 1.0460 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4939 0 """2BLOOMFLD--1""" 1.0065 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4940 0 """2BROWNTN---3""" 1.0081 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4941 0 """2BROWNTN---2""" 1.0314 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4942 2 """2BROWNTN-N-1""" 1.0263 0.00 0.00 -910.00 -91.00 338.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4943 0 """2BROWNTN-S-1""" 1.0117 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4944 0 """2BUNCE-CK--1""" 1.1567 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4945 0 """2B3N-DECO230""" 1.0877 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4946 0 """2-BURNS-1--1""" 1.0578 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4947 0 """2-BURNS-2--1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4948 0 """2CANIFF----3""" 1.0261 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4949 0 """2CANIFF----1""" 1.0433 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4950 0 """2CATALINA-CP""" 1.0064 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4951 0 """2CATO------1""" 1.0403 0.00 0.00 0.00 0.00 0.00 57.14 27.68 0.0000 0.0000 0.0000 0.0000 0 0
+4952 0 """2CHESTNUT--1""" 1.0164 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4953 0 """2CODY------1""" 0.9887 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4954 2 """2CONNER-G.24""" 1.0404 0.00 285.00 1770.00 0.00 1770.00 436.28 182.01 0.0000 0.0000 0.0000 0.0000 0 0
+4955 0 """2COOPER----1""" 1.0059 0.00 0.00 0.00 0.00 0.00 1.34 2.31 0.0000 0.0000 0.0000 0.0000 0 0
+4956 0 """2CORTLAND--1""" 1.0392 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4957 0 """2COVENTRY--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4958 0 """2COVENTRY--1""" 0.9810 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4959 0 """2CRESTWOOD-1""" 1.0120 0.00 0.00 0.00 0.00 0.00 3.56 1.78 0.0000 0.0000 0.0000 0.0000 0 0
+4960 0 """2CUSTER----1""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4961 0 """2C-3DECO-138""" 0.9752 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4962 0 """2DAYTON----1""" 0.9863 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4963 2 """2DELRAY-16-1""" 1.0200 0.00 72.00 350.00 0.00 54.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4964 2 """2DELRAY-G.24""" 1.0483 0.00 236.00 2320.00 0.00 2320.00 290.94 159.76 0.0000 0.0000 0.0000 0.0000 0 0
+4965 0 """2ELM-------1""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4966 0 """2E.FERMI---1""" 0.9983 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4967 0 """2ERIN------1""" 1.0331 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4968 0 """2E-N-S-TAP11""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4969 0 """2E-N-S-TAP21""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4970 2 """2ESSEX-----1""" 1.0543 0.00 274.00 0.00 0.00 140.00 0.00 0.00 0.0000 1.0800 0.0000 0.0000 0 0
+4971 0 """2EVERGREEN-1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4972 0 """2FLEETWD-1-1""" 1.0428 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4973 0 """2FLEETWD-2-1""" 1.0456 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4974 0 """2FLEETWD--13""" 1.0161 0.00 0.00 0.00 0.00 0.00 12.02 5.78 0.0000 0.0000 0.0000 0.0000 0 0
+4975 0 """2FOMOCO-C1-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+4976 0 """2FOMOCO-C2-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+4977 0 """2FRISBIE---1""" 1.0414 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4978 0 """2GENOA-----1""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4979 0 """2HANCOCK---1""" 1.0042 0.00 82.00 210.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4980 2 """2HARB.BEA.-1""" 1.0597 0.00 114.00 -300.00 -30.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4981 0 """2HINES-----1""" 0.9897 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4982 0 """2HUNTER-CK.1""" 1.0432 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4983 0 """2IRONTON---1""" 1.0310 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4984 0 """2IRN-NA-RV-1""" 1.0272 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4985 0 """2IMLAY-1PUP1""" 1.0685 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4986 0 """2JEFFERSON-1""" 1.0257 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4987 0 """2KTT-DECO138""" 1.0748 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4988 0 """2LK.HURON1P1""" 1.1530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4989 0 """2LK.HURON2P1""" 1.1335 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4990 0 """2LAPEER----1""" 1.0390 0.00 0.00 0.00 0.00 0.00 7.83 2.85 0.0000 0.0000 0.0000 0.0000 0 0
+4991 0 """2LARK------1""" 0.9720 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4992 0 """2LEE-------1""" 1.1215 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4993 0 """2LINCOLN---1""" 1.0100 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4994 0 """2LN-NE-NW--1""" 1.0129 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4995 0 """2LOGAN-1---1""" 1.0326 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4996 0 """2LOGAN-1-.13""" 1.0161 0.00 0.00 0.00 0.00 0.00 8.54 2.49 0.0000 0.0000 0.0000 0.0000 0 0
+4997 0 """2LOGAN-2---1""" 1.0362 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+4998 0 """2LOGAN-2-.13""" 1.0153 0.00 0.00 0.00 0.00 0.00 8.46 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+4999 0 """2LONG-LK-1-1""" 1.0035 0.00 0.00 0.00 0.00 0.00 7.12 1.69 0.0000 0.0000 0.0000 0.0000 0 0
+5000 0 """2LONG-LK-2-1""" 1.0046 0.00 0.00 0.00 0.00 0.00 6.68 1.25 0.0000 0.0000 0.0000 0.0000 0 0
+5001 0 """2LUZON-----1""" 0.9694 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5002 0 """2LUZON-W.40D""" 0.9908 0.00 0.00 0.00 0.00 0.00 16.02 7.83 0.0000 0.0000 0.0000 0.0000 0 0
+5003 0 """2MACOMB----1""" 1.0576 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5004 2 """2MARYSVILLE1""" 1.1521 0.00 84.00 0.00 0.00 60.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5005 0 """2MAXWELL-1-1""" 1.0236 0.00 0.00 0.00 0.00 0.00 18.16 11.21 0.0000 0.0000 0.0000 0.0000 0 0
+5006 0 """2MAXWELL-2-1""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5007 0 """2MCLOUTH-1-1""" 1.0222 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+5008 0 """2MCLOUTH-2-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+5009 2 """2MCLOUTH-.24""" 1.0350 0.00 0.00 670.00 -30.00 100.00 108.22 48.42 0.0000 0.0000 0.0000 0.0000 0 0
+5010 0 """2MEDINA----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5011 0 """2MIDTOWN---1""" 1.0409 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5012 2 """2MONRO-1,2-3""" 1.0100 0.00 1290.95 -880.00 -182.00 803.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5013 2 """2MONRO-3,4-3""" 1.0105 0.00 470.00 -910.00 -91.00 528.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5014 0 """2MTCALM-CP-1""" 1.0065 0.00 0.00 0.00 0.00 0.00 78.59 31.06 0.0000 0.0000 0.0000 0.0000 0 0
+5015 0 """2NAVARRE---2""" 1.0244 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5016 0 """2NAVARRE---1""" 1.0256 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5017 0 """2NEWBURGH--1""" 0.9920 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5018 0 """2NOBLE-----1""" 0.9773 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5019 0 """2NORTHEAST-1""" 1.0287 0.00 54.00 140.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5020 0 """2N.E.STUB--1""" 1.0437 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5021 2 """2N.E.FLIK.24""" 1.0200 0.00 0.00 40.00 0.00 30.00 43.16 15.22 0.0000 0.0000 0.0000 0.0000 0 0
+5022 0 """2NORTHWEST-1""" 0.9962 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5023 0 """2PHOENIX---1""" 0.9654 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5024 0 """2PIONEER-TP1""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5025 0 """2PIONEER---1""" 0.9633 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5026 0 """2PLACID----1""" 0.9882 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5027 0 """2PONTIAC---3""" 1.0328 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5028 0 """2PONTIAC---1""" 1.0213 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5029 0 """2RED-RUN---1""" 1.0352 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+5030 0 """2REMER-----1""" 1.1466 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5031 0 """2R.R.EQZR.-1""" 1.0352 0.00 0.00 0.00 0.00 0.00 60.52 37.47 0.0000 0.0000 0.0000 0.0000 0 0
+5032 2 """2R.ROUGE-1-1""" 1.0354 0.00 272.00 1880.00 0.00 188.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5033 2 """2R.ROUGE-2-1""" 1.0442 0.00 257.00 1980.00 0.00 198.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5034 2 """2R.ROUGE-3-1""" 1.0447 0.00 300.00 0.00 0.00 209.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5035 0 """2RIVERVU---1""" 1.0241 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5036 0 """2ROMULUS---1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5037 0 """2RUSH------1""" 1.0284 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5038 0 """2SANDUSKY--1""" 1.0989 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5039 0 """2SLOCUM----1""" 1.0153 0.00 14.00 40.00 0.00 0.00 57.49 27.86 0.0000 0.0000 0.0000 0.0000 0 0
+5040 0 """2SOUTHFLD--1""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5041 0 """2SPOKANE---1""" 1.0200 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5042 2 """2ST-CLAIR--3""" 1.0433 0.00 498.00 0.00 0.00 215.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5043 2 """2ST-CL.1-3-1""" 1.1866 0.00 501.00 3220.00 0.00 322.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5044 2 """2ST-CL.4,5-1""" 1.1467 0.00 463.00 0.00 0.00 315.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5045 2 """2ST-CL.6---1""" 1.1194 0.00 322.00 0.00 0.00 190.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5046 0 """2STC-SP-STL1""" 1.0639 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5047 0 """2STEPHENS--3""" 1.0262 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5048 0 """2STEPHENS--1""" 1.0420 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5049 0 """2STERLING--1""" 1.0393 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5050 0 """2SUNSET----1""" 0.9976 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5051 0 """2SUPERIOR--1""" 0.9791 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5052 0 """2TAYLOR-1--1""" 1.0054 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5053 0 """2TAYLOR--2-1""" 1.0247 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5054 0 """2TEMPEST--CP""" 1.0062 0.00 0.00 0.00 0.00 0.00 11.84 3.92 0.0000 0.0000 0.0000 0.0000 0 0
+5055 2 """2TRENTN-NA-1""" 1.0300 0.00 278.00 2220.00 0.00 225.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5056 2 """2TRENTN-SU-1""" 1.0300 0.00 593.00 1450.00 0.00 303.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5057 0 """2TROY------1""" 1.0029 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5058 0 """2TUSCOLA---1""" 1.0236 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5059 0 """2VICTOR----1""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5060 0 """2WABASH-TAP1""" 1.1463 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5061 0 """2WABASH----1""" 1.1431 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5062 0 """2WALTON----1""" 1.0096 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5063 0 """2WARREN----1""" 1.0148 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5064 0 """2WARREN-7--1""" 1.0400 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5065 0 """2WATERMAN--2""" 1.0227 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5066 0 """2WATERMAN--1""" 1.0418 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5067 0 """2WAT.EQZR.24""" 1.0311 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5068 0 """2WAYNE-----3""" 1.0091 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5069 0 """2WAYNE-----1""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5070 0 """2WHEELER---1""" 1.0040 0.00 0.00 0.00 0.00 0.00 24.21 15.04 0.0000 0.0000 0.0000 0.0000 0 0
+5071 0 """2WILLOW-1T-1""" 0.9847 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5072 0 """2WILLOW-2T-1""" 0.9880 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5073 0 """2WILLO-RUN-1""" 0.9811 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5074 0 """2WILLOW--.13""" 0.9992 0.00 0.00 0.00 0.00 0.00 41.83 23.67 0.0000 0.0000 0.0000 0.0000 0 0
+5075 0 """2WIXOM-----3""" 1.0194 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5076 0 """2WIXOM-----1""" 1.0035 0.00 0.00 0.00 0.00 0.00 10.86 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+5077 0 """2WOODHVN-1-1""" 1.0278 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5078 0 """2WOODHVN1.13""" 1.0229 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+5079 0 """2WDHVN-TP2-1""" 1.0248 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5080 0 """2WOODHVN-2-1""" 1.0240 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5081 0 """2WOODHVN2.13""" 1.0124 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+5082 0 """2YOST------1""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+5083 0 """3ALBA-TIE--1""" 1.1233 0.00 0.00 0.00 0.00 0.00 2.50 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+5084 0 """3ALCONA-D--1""" 1.1170 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5085 0 """3ALGOMA----1""" 1.0365 0.00 0.00 0.00 0.00 0.00 14.00 -1.10 0.0000 0.0000 0.0000 0.0000 0 0
+5086 0 """3ALMA------1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.40 2.10 0.0000 0.1000 0.0000 0.0000 0 0
+5087 0 """3ALMEDA----1""" 1.0459 0.00 0.00 0.00 0.00 0.00 14.10 4.30 0.0000 0.0215 0.0000 0.0000 0 0
+5088 0 """3ALPENA----1""" 1.1632 0.00 0.00 0.00 0.00 0.00 33.10 5.20 0.0000 0.2880 0.0000 0.0000 0 0
+5089 0 """3AMBER-----1""" 1.0260 0.00 0.00 0.00 0.00 0.00 19.00 15.60 0.0000 0.0000 0.0000 0.0000 0 0
+5090 0 """3ARGENTA---3""" 1.0555 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5091 0 """3ARGENTA---1""" 1.0537 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5092 0 """3A-1CPCO-120""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5093 0 """3BANGOR----1""" 1.0383 0.00 0.00 0.00 0.00 0.00 8.60 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5094 0 """3BARD-RD---1""" 1.0831 0.00 0.00 0.00 0.00 0.00 6.30 1.20 0.0000 0.0000 0.0000 0.0000 0 0
+5095 0 """3BARRY-----1""" 1.0416 0.00 0.00 0.00 0.00 0.00 27.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+5096 0 """3BASS-CRK--1""" 1.0389 0.00 0.00 0.00 0.00 0.00 17.80 3.20 0.0000 0.0000 0.0000 0.0000 0 0
+5097 0 """3BATAVIA---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 23.20 0.10 0.0000 0.0800 0.0000 0.0000 0 0
+5098 0 """3BEALS-RD.-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 146.80 48.60 0.0000 0.1500 0.0000 0.0000 0 0
+5099 0 """3BEECHER---1""" 1.0185 0.00 0.00 0.00 0.00 0.00 61.40 30.10 0.0000 0.0800 0.0000 0.0000 0 0
+5100 0 """3BEGOLE----1""" 1.0444 0.00 0.00 0.00 0.00 0.00 19.70 2.50 0.0000 0.1530 0.0000 0.0000 0 0
+5101 0 """3BEVERIDGE-1""" 1.0238 0.00 0.00 0.00 0.00 0.00 50.90 24.30 0.0000 0.1388 0.0000 0.0000 0 0
+5102 2 """3BIG-ROCK--1""" 1.1480 0.00 50.00 -140.00 -14.00 28.00 0.00 0.00 0.0000 0.0116 0.0000 0.0000 0 0
+5103 0 """3BINGHAM---1""" 1.0446 0.00 0.00 0.00 0.00 0.00 17.60 -7.80 0.0000 0.1928 0.0000 0.0000 0 0
+5104 0 """3BLACK-RIV-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 49.90 8.50 0.0000 0.0000 0.0000 0.0000 0 0
+5105 0 """3BLACKSTON-1""" 1.0188 0.00 0.00 200.00 0.00 0.00 83.10 22.00 0.0000 0.0800 0.0000 0.0000 0 0
+5106 0 """3BOARDMAN--1""" 1.0825 0.00 2.00 0.00 0.00 0.00 27.80 16.10 0.0000 0.1042 0.0000 0.0000 0 0
+5107 0 """3BUICK-STEW1""" 1.0363 0.00 0.00 0.00 0.00 0.00 40.50 17.10 0.0000 0.0000 0.0000 0.0000 0 0
+5108 0 """3BULLOCK---1""" 1.0269 0.00 0.00 0.00 0.00 0.00 37.10 37.10 0.0000 0.1578 0.0000 0.0000 0 0
+5109 2 """3CAMPBELL--1""" 1.0554 0.00 584.00 0.00 0.00 390.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5110 0 """3CEMENT-CY-1""" 1.0188 0.00 0.00 0.00 0.00 0.00 28.00 -0.20 0.0000 0.1000 0.0000 0.0000 0 0
+5111 0 """3CHASE-----1""" 1.0429 0.00 0.00 0.00 0.00 0.00 4.90 2.20 0.0000 0.0000 0.0000 0.0000 0 0
+5112 0 """3CLAIRMONT-1""" 1.0230 0.00 0.00 0.00 0.00 0.00 73.60 28.60 0.0000 0.1646 0.0000 0.0000 0 0
+5113 0 """3CLEVELAND-1""" 1.0356 0.00 0.00 0.00 0.00 0.00 32.90 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+5114 2 """3COBB------1""" 1.0400 0.00 476.00 40.00 0.00 421.00 79.30 35.60 0.0000 0.0000 0.0000 0.0000 0 0
+5115 0 """3CORK-ST.--1""" 1.0494 0.00 0.00 0.00 0.00 0.00 17.00 7.20 0.0000 0.0000 0.0000 0.0000 0 0
+5116 0 """3CORNELL---1""" 1.0290 0.00 0.00 0.00 0.00 0.00 33.30 12.00 0.0000 0.1981 0.0000 0.0000 0 0
+5117 0 """3COTTEGE-GR1""" 1.0738 0.00 0.00 0.00 0.00 0.00 1.70 0.70 0.0000 0.0000 0.0000 0.0000 0 0
+5118 0 """3CROTON----1""" 1.0342 0.00 29.00 0.00 0.00 0.00 10.40 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+5119 0 """3DEAN-RD.--1""" 1.0521 0.00 0.00 0.00 0.00 0.00 3.60 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+5120 0 """3DEJA------1""" 1.0414 0.00 0.00 0.00 0.00 0.00 13.80 -2.50 0.0000 0.0000 0.0000 0.0000 0 0
+5121 0 """3DELANEY---1""" 1.0469 0.00 0.00 0.00 0.00 0.00 64.80 25.10 0.0000 0.2698 0.0000 0.0000 0 0
+5122 0 """3DELH1-----1""" 1.0442 0.00 0.00 0.00 0.00 0.00 36.90 -10.00 0.0000 0.2783 0.0000 0.0000 0 0
+5123 0 """3DORT------1""" 1.0425 0.00 0.00 0.00 0.00 0.00 106.40 37.90 0.0000 0.4626 0.0000 0.0000 0 0
+5124 0 """3DOW-CHLOR.1""" 1.0243 0.00 0.00 0.00 0.00 0.00 49.00 24.00 0.0000 0.0000 0.0000 0.0000 0 0
+5125 0 """3DU-PONTE--1""" 1.0355 0.00 0.00 0.00 0.00 0.00 2.20 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5126 0 """3D-4CPCO-120""" 1.0444 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5127 0 """3EDENVILLE-1""" 1.0405 0.00 0.00 0.00 0.00 0.00 7.10 -4.70 0.0000 0.0000 0.0000 0.0000 0 0
+5128 2 """3ELM-STREET1""" 1.0444 0.00 29.00 0.00 0.00 7.00 32.70 23.30 0.0000 0.0000 0.0000 0.0000 0 0
+5129 0 """3EMMET-----1""" 1.1457 0.00 0.00 0.00 0.00 0.00 21.00 3.90 0.0000 0.0000 0.0000 0.0000 0 0
+5130 0 """3EUREKA----1""" 1.0398 0.00 0.00 0.00 0.00 0.00 21.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+5131 0 """3FELCH-RD.-1""" 1.0331 0.00 0.00 0.00 0.00 0.00 14.00 5.90 0.0000 0.0000 0.0000 0.0000 0 0
+5132 0 """3FISHER----1""" 1.0445 0.00 0.00 0.00 0.00 0.00 14.10 4.60 0.0000 0.0000 0.0000 0.0000 0 0
+5133 0 """3FOUNDRY---1""" 1.0316 0.00 0.00 0.00 0.00 0.00 31.70 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+5134 0 """3FOUR-MILE-1""" 1.0406 0.00 2.00 0.00 0.00 0.00 111.80 32.80 0.0000 0.1000 0.0000 0.0000 0 0
+5135 0 """3GARFIELD--1""" 1.0354 0.00 0.00 0.00 0.00 0.00 72.20 32.00 0.0000 0.0353 0.0000 0.0000 0 0
+5136 2 """3GAYLORD---1""" 1.1519 0.00 60.00 0.00 0.00 15.00 10.10 1.90 0.0000 0.0826 0.0000 0.0000 0 0
+5137 0 """3GENOA-----1""" 1.0678 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5138 0 """3GLEANER---1""" 1.0283 0.00 0.00 0.00 0.00 0.00 18.80 6.90 0.0000 0.0000 0.0000 0.0000 0 0
+5139 0 """3GREY-IRON-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 53.50 17.50 0.0000 0.0000 0.0000 0.0000 0 0
+5140 0 """3HALSEY----1""" 1.0458 0.00 0.00 0.00 0.00 0.00 20.40 3.80 0.0000 0.1148 0.0000 0.0000 0 0
+5141 0 """3HARDY-DAM-1""" 1.0343 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5142 0 """3HAZELWOOD-1""" 1.0525 0.00 0.00 0.00 0.00 0.00 39.10 7.20 0.0000 0.0400 0.0000 0.0000 0 0
+5143 0 """3HEMPHILL--1""" 1.0447 0.00 0.00 0.00 0.00 0.00 134.10 62.70 0.0000 0.6928 0.0000 0.0000 0 0
+5144 0 """3HIGGINS---1""" 1.1065 0.00 0.00 0.00 0.00 0.00 18.90 2.80 0.0000 0.0000 0.0000 0.0000 0 0
+5145 0 """3HODENPYL--1""" 1.0686 0.00 0.00 0.00 0.00 0.00 8.40 -0.80 0.0000 0.0000 0.0000 0.0000 0 0
+5146 0 """3HOLLAN-RD-1""" 1.0168 0.00 0.00 0.00 0.00 0.00 42.80 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+5147 0 """3HOOKER----1""" 1.0348 0.00 0.00 0.00 0.00 0.00 26.40 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5148 0 """3HUGHES-RD-1""" 1.0377 0.00 0.00 0.00 0.00 0.00 21.80 4.80 0.0000 0.0000 0.0000 0.0000 0 0
+5149 0 """3IOSCO-----1""" 1.1238 0.00 19.00 0.00 0.00 0.00 12.80 5.70 0.0000 0.0263 0.0000 0.0000 0 0
+5150 0 """3ISLAND-RD-1""" 1.0435 0.00 0.00 0.00 0.00 0.00 29.20 -2.90 0.0000 0.1086 0.0000 0.0000 0 0
+5151 2 """3KARN------1""" 1.0563 0.00 498.00 0.00 0.00 337.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5152 0 """3KENOWA----3""" 1.0865 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5153 0 """3LATSON----1""" 1.0558 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5154 0 """3LAWNDALE--1""" 1.0265 0.00 0.00 0.00 0.00 0.00 39.90 17.00 0.0000 0.0000 0.0000 0.0000 0 0
+5155 0 """3LAYTON----1""" 1.0246 0.00 0.00 0.00 0.00 0.00 16.10 1.80 0.0000 0.0000 0.0000 0.0000 0 0
+5156 0 """3LEWISTON--1""" 1.1462 0.00 0.00 0.00 0.00 0.00 2.60 0.80 0.0000 0.0000 0.0000 0.0000 0 0
+5157 0 """3LINBERGH--1""" 1.0424 0.00 0.00 0.00 0.00 0.00 42.40 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+5158 0 """3LOOK-GLAS-1""" 1.0411 0.00 0.00 0.00 0.00 0.00 25.30 -3.20 0.0000 0.0000 0.0000 0.0000 0 0
+5159 0 """3LOUD------1""" 1.1048 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0040 0.0000 0.0000 0 0
+5160 2 """3LUDINGTON-3""" 1.0978 0.00 0.00 0.00 0.00 200.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5161 0 """3MALLEABLE-1""" 1.0211 0.00 0.00 0.00 0.00 0.00 61.50 17.20 0.0000 0.0000 0.0000 0.0000 0 0
+5162 0 """3MARQUETTE-1""" 1.0444 0.00 2.00 0.00 0.00 0.00 17.80 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+5163 0 """3MECOSTA---1""" 1.0370 0.00 0.00 0.00 0.00 0.00 15.90 3.60 0.0000 0.0000 0.0000 0.0000 0 0
+5164 0 """3MEDUSA----1""" 1.1103 0.00 0.00 0.00 0.00 0.00 11.50 1.60 0.0000 0.0000 0.0000 0.0000 0 0
+5165 0 """3MILES-RD.-1""" 1.1103 0.00 0.00 0.00 0.00 0.00 7.70 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+5166 0 """3MILHAM----1""" 1.0437 0.00 0.00 0.00 0.00 0.00 36.30 9.60 0.0000 0.1413 0.0000 0.0000 0 0
+5167 0 """3MIO-------1""" 1.1407 0.00 9.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.2067 0.0000 0.0000 0 0
+5168 0 """3MONITOR---1""" 1.0319 0.00 0.00 0.00 0.00 0.00 41.40 14.30 0.0000 0.0503 0.0000 0.0000 0 0
+5169 0 """3MOORE-RD--1""" 0.9940 0.00 0.00 0.00 0.00 0.00 40.80 10.60 0.0000 0.0000 0.0000 0.0000 0 0
+5170 2 """3MORROW----1""" 1.0500 0.00 130.00 0.00 0.00 168.00 80.20 31.20 0.0000 0.1836 0.0000 0.0000 0 0
+5171 0 """3MUSKEGN-HT1""" 1.0212 0.00 0.00 0.00 0.00 0.00 72.90 52.50 0.0000 0.0000 0.0000 0.0000 0 0
+5172 0 """3NODULAR---1""" 1.0228 0.00 0.00 0.00 0.00 0.00 34.40 16.80 0.0000 0.0000 0.0000 0.0000 0 0
+5173 0 """3N.BELDING-1""" 1.0422 0.00 0.00 0.00 0.00 0.00 20.70 -2.30 0.0000 0.1000 0.0000 0.0000 0 0
+5174 0 """3OAKLAND---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 17.80 5.80 0.0000 0.0000 0.0000 0.0000 0 0
+5175 0 """3OGEMAW----1""" 1.0698 0.00 0.00 0.00 0.00 0.00 11.90 -7.50 0.0000 0.0000 0.0000 0.0000 0 0
+5176 0 """3OWOSSO----1""" 1.0282 0.00 0.00 0.00 0.00 0.00 29.20 10.40 0.0000 0.0000 0.0000 0.0000 0 0
+5177 0 """3PAGE------1""" 1.0180 0.00 0.00 0.00 0.00 0.00 45.80 5.40 0.0000 0.0800 0.0000 0.0000 0 0
+5178 2 """3PALISADES-3""" 1.0392 0.00 701.70 0.00 0.00 418.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5179 0 """3PASEDENA--1""" 1.0263 0.00 0.00 0.00 0.00 0.00 48.70 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+5180 0 """3PENN-DIXIE1""" 1.1463 0.00 0.00 0.00 0.00 0.00 6.60 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+5181 0 """3PT.CALCIT-1""" 1.1721 0.00 0.00 0.00 0.00 0.00 9.40 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+5182 0 """3RAISIN----1""" 1.0280 0.00 0.00 0.00 0.00 0.00 21.10 8.80 0.0000 0.0000 0.0000 0.0000 0 0
+5183 0 """3RICE-CREK-1""" 1.0323 0.00 0.00 0.00 0.00 0.00 29.10 1.20 0.0000 0.2540 0.0000 0.0000 0 0
+5184 0 """3RIFLE-RIV.1""" 1.0698 0.00 0.00 0.00 0.00 0.00 2.40 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+5185 2 """3RIGGSVIL--1""" 1.1813 0.00 25.00 0.00 0.00 6.00 22.30 2.50 0.0000 0.1838 0.0000 0.0000 0 0
+5186 0 """3RIVERVIEW-1""" 1.0513 0.00 0.00 0.00 0.00 0.00 79.60 28.70 0.0000 0.3312 0.0000 0.0000 0 0
+5187 0 """3ROCKPORT--1""" 1.1679 0.00 0.00 0.00 0.00 0.00 1.00 0.20 0.0000 0.0000 0.0000 0.0000 0 0
+5188 0 """3RONDO-----1""" 1.1683 0.00 0.00 0.00 0.00 0.00 3.40 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+5189 0 """3SAGNAW-R.-1""" 1.0316 0.00 0.00 0.00 0.00 0.00 63.80 32.80 0.0000 0.1568 0.0000 0.0000 0 0
+5190 0 """3SAMARIA---1""" 1.0341 0.00 0.00 0.00 0.00 0.00 23.10 10.70 0.0000 0.0000 0.0000 0.0000 0 0
+5191 0 """3SCOTT-LK.-1""" 1.0470 0.00 0.00 0.00 0.00 0.00 17.10 5.70 0.0000 0.0000 0.0000 0.0000 0 0
+5192 0 """3SPAULDING-1""" 1.0412 0.00 0.00 0.00 0.00 0.00 70.40 16.20 0.0000 0.0800 0.0000 0.0000 0 0
+5193 0 """3SPRUCE----1""" 1.1468 0.00 0.00 0.00 0.00 0.00 4.40 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+5194 0 """3STAMPG-PLT1""" 1.0446 0.00 0.00 0.00 0.00 0.00 11.60 3.80 0.0000 0.0000 0.0000 0.0000 0 0
+5195 0 """3STRONACH--1""" 1.0397 0.00 0.00 0.00 0.00 0.00 21.20 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+5196 0 """3STOVER----1""" 1.1154 0.00 0.00 0.00 0.00 0.00 6.60 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+5197 0 """3SUMMERTON-1""" 1.0218 0.00 0.00 0.00 0.00 0.00 24.20 -2.10 0.0000 0.0000 0.0000 0.0000 0 0
+5198 0 """3TALLMADGE-3""" 1.0815 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5199 0 """3TALLMADGE-1""" 1.0662 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5200 0 """3THETFORD--3""" 1.0579 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5201 2 """3THETFORD--1""" 1.0516 0.00 146.00 0.00 0.00 36.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5202 0 """3TITTABAW--3""" 1.0615 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5203 0 """3TITTABAW--1""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5204 0 """3TIPPY-DAM-1""" 1.0648 0.00 29.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.1255 0.0000 0.0000 0 0
+5205 0 """3TOMPKINS--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5206 0 """3TUSC.TAP.-1""" 1.0626 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5207 0 """3TWINING---1""" 1.0667 0.00 0.00 0.00 0.00 0.00 8.70 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+5208 0 """3UPJOHN----1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.80 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+5209 2 """3VERONA----1""" 1.0467 0.00 29.00 0.00 0.00 7.00 78.70 10.40 0.0000 0.4710 0.0000 0.0000 0 0
+5210 0 """3VEVAY-----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 18.30 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+5211 0 """3WACKERLY--1""" 1.0295 0.00 0.00 0.00 0.00 0.00 29.80 9.70 0.0000 0.0000 0.0000 0.0000 0 0
+5212 0 """3WARREN----1""" 1.0665 0.00 0.00 0.00 0.00 0.00 19.20 14.60 0.0000 0.3967 0.0000 0.0000 0 0
+5213 0 """3WASHTENAW-1""" 1.0009 0.00 0.00 0.00 0.00 0.00 16.90 -3.00 0.0000 0.0000 0.0000 0.0000 0 0
+5214 2 """3WEADOCK-B-1""" 1.0400 0.00 299.00 90.00 0.00 226.00 35.70 15.30 0.0000 0.0330 0.0000 0.0000 0 0
+5215 2 """3WEADOCK-W-1""" 1.0476 0.00 319.00 0.00 0.00 191.00 36.60 15.30 0.0000 0.0000 0.0000 0.0000 0 0
+5216 0 """3WEALTHY---1""" 1.0461 0.00 0.00 0.00 0.00 0.00 116.80 51.00 0.0000 0.0000 0.0000 0.0000 0 0
+5217 0 """3WEXFORD---1""" 1.0784 0.00 0.00 0.00 0.00 0.00 24.60 -4.50 0.0000 0.0990 0.0000 0.0000 0 0
+5218 0 """3WHITE-LK.-1""" 1.0342 0.00 9.00 0.00 0.00 0.00 11.80 6.80 0.0000 0.0000 0.0000 0.0000 0 0
+5219 2 """3WHITING---1""" 1.0500 0.00 331.00 900.00 0.00 206.00 14.30 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5220 0 """3WILLARD---1""" 1.0411 0.00 0.00 0.00 0.00 0.00 23.60 3.70 0.0000 0.0000 0.0000 0.0000 0 0
+5221 0 """4ALLANBURG-2""" 1.1270 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5222 0 """4BEACH-----2""" 1.0829 0.00 0.00 0.00 0.00 0.00 256.30 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+5223 2 """4BEAUHARN--2""" 1.1266 0.00 600.00 500.00 -25.00 50.00 19.70 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+5224 2 """4BECK------2""" 1.1280 0.00 1011.00 1890.00 -100.00 600.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5225 0 """4-BP-76-REG2""" 1.0551 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5226 0 """4BROCKVILLE2""" 1.0779 0.00 0.00 0.00 0.00 0.00 76.90 31.50 0.0000 0.0000 0.0000 0.0000 0 0
+5227 0 """4BUCHANNAN-2""" 1.0643 0.00 0.00 0.00 0.00 0.00 600.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+5228 2 """4BUCHANNAN-1""" 1.0472 0.00 0.00 -250.00 -25.00 200.00 326.80 52.40 0.0000 0.0000 0.0000 0.0000 0 0
+5229 0 """4BURLINGTON2""" 1.0779 0.00 0.00 0.00 0.00 0.00 900.00 300.00 0.0000 0.0000 0.0000 0.0000 0 0
+5230 0 """4CHATHAM---2""" 1.0922 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5231 2 """4CHATS-FALL2""" 1.1200 0.00 168.00 670.00 -30.00 70.00 7.00 3.30 0.0000 0.0000 0.0000 0.0000 0 0
+5232 2 """4CHERRYWOOD2""" 1.0770 0.00 1000.00 4190.00 -300.00 600.00 650.00 212.60 0.0000 0.0000 0.0000 0.0000 0 0
+5233 0 """4CRAWFORD--1""" 1.0371 0.00 0.00 0.00 0.00 0.00 64.00 28.00 0.0000 0.0000 0.0000 0.0000 0 0
+5234 2 """4DESJOACH--2""" 1.1740 0.00 370.00 590.00 -50.00 175.00 16.10 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+5235 2 """4DETWEILER-2""" 1.0550 0.00 0.00 230.00 -35.00 50.00 600.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+5236 2 """4DOBBIN----2""" 1.0510 0.00 222.00 -310.00 -50.00 75.00 160.00 65.60 0.0000 0.0000 0.0000 0.0000 0 0
+5237 2 """4DOUGLAS-PT2""" 1.1000 0.00 200.00 370.00 -50.00 80.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5238 0 """4EASTON-JCT2""" 1.0823 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5239 0 """4ESSA--230-2""" 1.0904 0.00 0.00 0.00 0.00 0.00 211.00 57.00 0.0000 0.0000 0.0000 0.0000 0 0
+5240 0 """4ESSEX-115-1""" 1.0395 0.00 0.00 0.00 0.00 0.00 84.00 -6.00 0.0000 0.0000 0.0000 0.0000 0 0
+5241 0 """4HANMER----5""" 1.0071 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 -2.1000 0.0000 0.0000 0 0
+5242 0 """4HANNON----2""" 1.0931 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5243 0 """4HANOVER---2""" 1.0859 0.00 0.00 0.00 0.00 0.00 172.20 38.20 0.0000 0.0000 0.0000 0.0000 0 0
+5244 0 """4HAWTHORNE-2""" 1.0613 0.00 0.00 0.00 0.00 0.00 400.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+5245 0 """4HINCHBROOK2""" 1.0640 0.00 0.00 0.00 0.00 0.00 300.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+5246 2 """4HOLDEN----2""" 1.1600 0.00 200.00 150.00 -50.00 90.00 96.00 25.00 0.0000 0.0000 0.0000 0.0000 0 0
+5247 0 """4KEITH-230-2""" 1.0658 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5248 2 """4KEITH-115-1""" 1.0383 0.00 60.00 -100.00 -10.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5249 0 """4KENT------1""" 0.9963 0.00 0.00 0.00 0.00 0.00 122.80 29.80 0.0000 0.0000 0.0000 0.0000 0 0
+5250 0 """4KLEINBURG-5""" 0.9713 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5251 0 """4KLEINBURG-2""" 1.0794 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5252 0 """4LAMBTON-345""" 1.0434 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5253 0 """4LAMBTON---2""" 1.1215 0.00 0.00 0.00 0.00 0.00 27.80 11.70 0.0000 0.0000 0.0000 0.0000 0 0
+5254 2 """4LAMBTON-.24""" 1.1750 0.00 1450.00 7430.00 -500.00 1080.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5255 0 """4LAUZON----2""" 1.0537 0.00 0.00 0.00 0.00 0.00 86.00 20.00 0.0000 0.0000 0.0000 0.0000 0 0
+5256 0 """4LAUZON----1""" 1.0421 0.00 0.00 0.00 0.00 0.00 124.70 16.20 0.0000 0.0000 0.0000 0.0000 0 0
+5257 0 """4LEASIDE---2""" 1.0681 0.00 0.00 0.00 0.00 0.00 500.00 150.00 0.0000 0.0000 0.0000 0.0000 0 0
+5258 0 """4-L-33-P---2""" 1.0530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5259 3 """4MANBY-----2""" 1.0650 0.00 726.60 450.00 0.00 0.00 950.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+5260 2 """4MARTINDALE2""" 1.1071 0.00 435.00 -500.00 -50.00 100.00 627.00 98.50 0.0000 0.0000 0.0000 0.0000 0 0
+5261 0 """4MERIVALE--2""" 0.9920 0.00 0.00 0.00 0.00 0.00 244.00 95.00 0.0000 0.0000 0.0000 0.0000 0 0
+5262 0 """4MIDDLEPORT2""" 1.1049 0.00 0.00 0.00 0.00 0.00 40.00 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+5263 0 """4MINDEN----2""" 1.1309 0.00 0.00 0.00 0.00 0.00 92.60 31.90 0.0000 0.0000 0.0000 0.0000 0 0
+5264 2 """4NANTICO---2""" 1.1570 0.00 1940.00 7680.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5265 2 """4NORTH-BAY-2""" 1.1500 0.00 245.00 -110.00 -50.00 100.00 27.20 11.90 0.0000 0.0000 0.0000 0.0000 0 0
+5266 0 """4NEALE-----2""" 1.0954 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5267 0 """4ORANGEVIL-2""" 1.0761 0.00 0.00 0.00 0.00 0.00 67.00 40.00 0.0000 0.0000 0.0000 0.0000 0 0
+5268 0 """4-PA-27-REG2""" 1.0521 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5269 0 """4PAUGAN----2""" 1.1278 0.00 0.00 0.00 0.00 0.00 8.30 2.50 0.0000 0.0000 0.0000 0.0000 0 0
+5270 0 """4PINARD----5""" 1.0473 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5271 2 """4PINARD----2""" 1.0400 0.00 550.00 600.00 -300.00 300.00 0.00 0.00 0.0000 -1.0470 0.0000 0.0000 0 0
+5272 0 """4PORCUPINE-5""" 1.0447 0.00 0.00 0.00 0.00 0.00 90.00 32.10 0.0000 0.0000 0.0000 0.0000 0 0
+5273 0 """4RICHVIEW--2""" 1.0681 0.00 0.00 0.00 0.00 0.00 800.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+5274 2 """4STLAWRENCE2""" 1.1139 0.00 744.00 3000.00 -100.00 300.00 250.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+5275 0 """4STLAWRENCE1""" 1.0058 0.00 0.00 0.00 0.00 0.00 49.50 21.00 0.0000 0.0000 0.0000 0.0000 0 0
+5276 0 """4STTHOMAS--1""" 1.0326 0.00 0.00 0.00 0.00 0.00 165.00 11.00 0.0000 0.0000 0.0000 0.0000 0 0
+5277 0 """4SANDWICH--2""" 1.0611 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5278 0 """4SAND.WEST-2""" 1.0622 0.00 0.00 0.00 0.00 0.00 114.80 51.60 0.0000 0.0000 0.0000 0.0000 0 0
+5279 0 """4SCOTT-----2""" 1.0961 0.00 0.00 0.00 0.00 0.00 160.00 41.70 0.0000 0.0000 0.0000 0.0000 0 0
+5280 0 """4SCOTT-----1""" 1.0396 0.00 0.00 0.00 0.00 0.00 169.50 36.20 0.0000 0.0000 0.0000 0.0000 0 0
+5281 0 """4WONDERLAND2""" 1.0664 0.00 0.00 0.00 0.00 0.00 79.30 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+5282 0 """5BAYSHORE-T3""" 1.0112 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5283 2 """5BAYSHORE-T1""" 1.0300 0.00 600.00 2680.00 -1000.00 1000.00 760.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+5284 2 """5LEMOYNE--T3""" 1.0120 0.00 0.00 1900.00 -1000.00 1000.00 175.00 90.80 0.0000 0.0000 0.0000 0.0000 0 0
+5285 0 """5BENTON-HBR3""" 1.0329 0.00 0.00 0.00 0.00 0.00 330.00 16.90 0.0000 0.0000 0.0000 0.0000 0 0
+5286 2 """5D.C.COOK--3""" 1.0300 0.00 2501.67 990.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5287 2 """5DUMONT----3""" 1.0300 0.00 850.00 5270.00 -1000.00 1000.00 167.00 50.00 0.0000 0.0000 0.0000 0.0000 0 0
+5288 2 """5E.LIMA----3""" 0.9900 0.00 80.00 860.00 -1000.00 1000.00 350.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+5289 2 """5FOSTORIA--3""" 1.0000 0.00 0.00 -490.00 -1000.00 1000.00 254.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+5290 2 """5OLIVE-----3""" 1.0200 0.00 0.00 -2130.00 -1000.00 1000.00 394.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+5291 2 """5ROBISON-PK3""" 0.9800 0.00 0.00 -630.00 -1000.00 1000.00 460.00 169.80 0.0000 0.0000 0.0000 0.0000 0 0
+5292 2 """5SORENSON--3""" 1.0000 0.00 163.00 850.00 -1000.00 1000.00 371.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+5293 2 """5TWIN-BRCH-3""" 1.0200 0.00 0.00 -1660.00 -1000.00 1000.00 700.00 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+5294 2 """5LEWISTON-Y2""" 1.0520 0.00 1209.10 -190.00 -200.00 420.00 654.10 -45.40 0.0000 0.0000 0.0000 0.0000 0 0
+5295 2 """5MOSSES---Y2""" 1.0500 0.00 400.00 620.00 0.00 130.00 505.90 96.60 0.0000 0.0000 0.0000 0.0000 0 0
+5296 2 """5PACKARD--Y2""" 1.0520 0.00 0.00 -160.00 -1000.00 100.00 641.40 -0.60 0.0000 0.0000 0.0000 0.0000 0 0
+5297 0 """ADAIR-------""" 1.0193 0.00 0.00 0.00 0.00 0.00 2.18 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+5298 0 """ADAMS-----40""" 1.0140 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+5299 0 """1AINSWORTH--""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.17 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+5300 0 """ALGONAC-----""" 1.0163 0.00 0.00 0.00 0.00 0.00 7.98 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+5301 0 """ALMONT------""" 0.9849 0.00 0.00 0.00 0.00 0.00 3.28 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+5302 0 """ANDERSON----""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.59 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+5303 0 """APPLEGATE---""" 0.9866 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5304 0 """ARGO--------""" 1.0307 0.00 0.00 0.00 0.00 0.00 23.02 3.93 0.0000 0.1200 0.0000 0.0000 0 0
+5305 0 """ARMADA------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.52 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+5306 0 """ARROWHEAD-40""" 1.0217 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5307 0 """ATTICA------""" 0.9842 0.00 0.00 0.00 0.00 0.00 1.34 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+5308 0 """AUBURN-HTS-1""" 1.0049 0.00 0.00 0.00 0.00 0.00 6.50 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+5309 0 """AVOCA-------""" 0.9930 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+5310 0 """AVON--------""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+5311 0 """BAD-AXE-40--""" 0.9987 0.00 0.00 0.00 0.00 0.00 6.13 2.12 0.0000 0.0660 0.0000 0.0000 0 0
+5312 0 """BALDWIN--EQ1""" 1.0224 0.00 0.00 0.00 0.00 0.00 8.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+5313 0 """BARNES-LAKE-""" 0.9888 0.00 0.00 0.00 0.00 0.00 2.20 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+5314 0 """1BARTLETT-CP""" 1.0119 0.00 0.00 0.00 0.00 0.00 7.40 5.87 0.0000 0.0000 0.0000 0.0000 0 0
+5315 0 """BAYPORT-----""" 0.9869 0.00 0.00 0.00 0.00 0.00 1.26 2.12 0.0000 0.0000 0.0000 0.0000 0 0
+5316 0 """BEAVER------""" 0.9956 0.00 0.00 0.00 0.00 0.00 0.17 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+5317 0 """BELLEVILLE--""" 1.0212 0.00 0.00 0.00 0.00 0.00 6.05 2.66 0.0000 0.0000 0.0000 0.0000 0 0
+5318 0 """BERLIN-FUT74""" 1.0348 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5319 0 """BERNARD-----""" 0.9996 0.00 0.00 0.00 0.00 0.00 2.10 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+5320 0 """BINGHAM--EQ1""" 1.0029 0.00 0.00 0.00 0.00 0.00 3.28 1.49 0.0000 0.0480 0.0000 0.0000 0 0
+5321 0 """BLOOMFIELD40""" 1.0220 0.00 0.00 0.00 0.00 0.00 79.00 39.62 0.0000 0.0900 0.0000 0.0000 0 0
+5322 0 """BOND,MADRID-""" 1.0551 0.00 0.00 0.00 0.00 0.00 2.18 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+5323 0 """BREST-------""" 1.0358 0.00 0.00 0.00 0.00 0.00 5.04 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+5324 0 """BREWER------""" 1.0045 0.00 0.00 0.00 0.00 0.00 2.94 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+5325 0 """BRIGHTON----""" 1.0076 0.00 0.00 0.00 0.00 0.00 5.96 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+5326 0 """BROWN-CITY--""" 0.9725 0.00 0.00 0.00 0.00 0.00 3.28 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+5327 0 """BROWNSTOWN40""" 1.0348 0.00 0.00 0.00 0.00 0.00 36.46 24.76 0.0000 0.0000 0.0000 0.0000 0 0
+5328 0 """BRAY--------""" 0.9770 0.00 0.00 0.00 0.00 0.00 1.51 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5329 0 """BRUCE---EQ1-""" 1.0034 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+5330 0 """BUNCE-CRK-40""" 1.0333 0.00 0.00 0.00 0.00 0.00 7.73 4.25 0.0000 0.0000 0.0000 0.0000 0 0
+5331 2 """BUNCE-CRK-24""" 1.0607 0.00 84.00 480.00 0.00 480.00 37.72 22.10 0.0000 0.0000 0.0000 0.0000 0 0
+5332 0 """CALUMET-----""" 0.9844 0.00 0.00 0.00 0.00 0.00 3.11 1.91 0.0000 0.0000 0.0000 0.0000 0 0
+5333 0 """CAMDEN-2,5--""" 1.0033 0.00 0.00 0.00 0.00 0.00 9.41 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+5334 0 """CAMPUS-1----""" 1.0279 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+5335 0 """CAMPUS-2----""" 1.0216 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+5336 0 """CAPAC-------""" 0.9880 0.00 0.00 0.00 0.00 0.00 3.11 1.38 0.0000 0.0660 0.0000 0.0000 0 0
+5337 0 """CARLETON----""" 1.0054 0.00 0.00 0.00 0.00 0.00 1.76 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+5338 0 """CARO-1------""" 1.0018 0.00 0.00 0.00 0.00 0.00 1.68 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+5339 0 """CARO-T.E.C.-""" 0.9962 0.00 0.00 0.00 0.00 0.00 1.76 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+5340 0 """CARPENTER---""" 1.0007 0.00 0.00 0.00 0.00 0.00 8.15 3.29 0.0000 0.1140 0.0000 0.0000 0 0
+5341 0 """CARSONVILLE-""" 0.9885 0.00 0.00 0.00 0.00 0.00 0.67 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5342 0 """CARTER------""" 1.0069 0.00 0.00 0.00 0.00 0.00 15.04 7.54 0.0000 0.0000 0.0000 0.0000 0 0
+5343 0 """CASEVILLE---""" 0.9683 0.00 0.00 0.00 0.00 0.00 3.02 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+5344 0 """CASEY-------""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.18 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+5345 0 """CASS-CITY---""" 1.0011 0.00 0.00 0.00 0.00 0.00 5.04 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+5346 0 """CHERRY-HILL-""" 0.9566 0.00 0.00 0.00 0.00 0.00 0.92 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+5347 0 """CHESTERFLD-1""" 1.0264 0.00 0.00 0.00 0.00 0.00 3.95 0.53 0.0000 0.0480 0.0000 0.0000 0 0
+5348 0 """CHESTERFLD-2""" 1.0088 0.00 0.00 0.00 0.00 0.00 8.48 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+5349 0 """CHESTNUT-40-""" 1.0150 0.00 0.00 0.00 0.00 0.00 75.20 29.50 0.0000 0.3600 0.0000 0.0000 0 0
+5350 0 """CHILSON-----""" 1.0175 0.00 0.00 0.00 0.00 0.00 1.51 0.85 0.0000 0.0660 0.0000 0.0000 0 0
+5351 0 """CLARKSTON-2-""" 1.0013 0.00 0.00 0.00 0.00 0.00 4.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+5352 0 """CLIFFORD----""" 0.9881 0.00 0.00 0.00 0.00 0.00 1.34 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+5353 0 """COATS-------""" 1.0093 0.00 0.00 0.00 0.00 0.00 3.36 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+5354 0 """CODY-40-----""" 1.0456 0.00 0.00 0.00 0.00 0.00 19.99 6.27 0.0000 0.1800 0.0000 0.0000 0 0
+5355 0 """COLFAX---EQ1""" 1.0885 0.00 14.00 40.00 0.00 0.00 4.87 2.55 0.0000 0.0480 0.0000 0.0000 0 0
+5356 0 """COLLIER----1""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+5357 0 """CLOTH-PR.-1-""" 1.0059 0.00 0.00 0.00 0.00 0.00 3.00 -0.37 0.0000 0.0000 0.0000 0.0000 0 0
+5358 0 """COLUMBIAVILE""" 0.9871 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5359 0 """COMMERCE-LK-""" 0.9872 0.00 0.00 0.00 0.00 0.00 6.05 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+5360 0 """CORTLAND-24-""" 1.0112 0.00 0.00 0.00 0.00 0.00 204.10 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+5361 0 """CROSWELL-EQ1""" 0.9883 0.00 0.00 0.00 0.00 0.00 5.96 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+5362 0 """CROWN-1-----""" 1.0243 0.00 0.00 0.00 0.00 0.00 10.16 0.32 0.0000 0.0900 0.0000 0.0000 0 0
+5363 0 """CROWN-2-----""" 0.9891 0.00 0.00 0.00 0.00 0.00 4.54 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+5364 0 """CULVER------""" 0.9954 0.00 0.00 0.00 0.00 0.00 8.57 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+5365 0 """CUSTER-24---""" 1.0216 0.00 14.00 40.00 0.00 0.00 61.40 33.15 0.0000 0.0000 0.0000 0.0000 0 0
+5366 0 """DADE-1------""" 1.0165 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+5367 0 """DADE-2------""" 1.0158 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+5368 0 """DARWIN-1----""" 1.0440 0.00 0.00 0.00 0.00 0.00 4.87 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+5369 0 """DARWIN-2----""" 1.0408 0.00 0.00 0.00 0.00 0.00 4.79 1.27 0.0000 0.0480 0.0000 0.0000 0 0
+5370 0 """DAVIS---EQ1-""" 0.9767 0.00 0.00 0.00 0.00 0.00 20.30 10.25 0.0000 0.0900 0.0000 0.0000 0 0
+5371 0 """DAYTON-40---""" 1.0256 0.00 5.00 10.00 0.00 0.00 5.71 2.97 0.0000 0.0660 0.0000 0.0000 0 0
+5372 0 """DECKR-+-ASPN""" 0.9878 0.00 0.00 0.00 0.00 0.00 2.52 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+5373 0 """DEWEY-2-----""" 0.9865 0.00 0.00 0.00 0.00 0.00 11.34 3.82 0.0000 0.0000 0.0000 0.0000 0 0
+5374 0 """DEXTER---EQ1""" 1.0348 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0480 0.0000 0.0000 0 0
+5375 0 """DILLARD-1---""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+5376 0 """DOVER-1-----""" 1.0030 0.00 0.00 0.00 0.00 0.00 3.78 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+5377 0 """DOVER-2-----""" 0.9997 0.00 0.00 0.00 0.00 0.00 3.19 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+5378 0 """DREXEL-2----""" 0.9883 0.00 0.00 0.00 0.00 0.00 9.24 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+5379 0 """DRYDEN------""" 0.9797 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+5380 0 """ECKLES-2----""" 0.9704 0.00 0.00 0.00 0.00 0.00 4.62 -0.74 0.0000 0.0000 0.0000 0.0000 0 0
+5381 0 """EDGEWATER---""" 0.9989 0.00 0.00 0.00 0.00 0.00 1.30 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+5382 0 """ELKTON------""" 0.9804 0.00 0.00 0.00 0.00 0.00 3.36 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+5383 0 """ELM-40------""" 1.0242 0.00 0.00 0.00 0.00 0.00 107.77 79.00 0.0000 0.2850 0.0000 0.0000 0 0
+5384 0 """EMERICK-1---""" 1.0099 0.00 0.00 0.00 0.00 0.00 8.82 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+5385 0 """EMMETT------""" 0.9925 0.00 0.00 0.00 0.00 0.00 1.01 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+5386 0 """ENGLISH-----""" 1.0024 0.00 0.00 0.00 0.00 0.00 1.68 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5387 0 """ERIN40------""" 1.0115 0.00 0.00 0.00 0.00 0.00 103.40 41.50 0.0000 0.1800 0.0000 0.0000 0 0
+5388 0 """EVERGREEN-40""" 1.0364 0.00 0.00 0.00 0.00 0.00 213.20 82.90 0.0000 0.5100 0.0000 0.0000 0 0
+5389 0 """FAIRGROVE---""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.02 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+5390 0 """FALCON-1----""" 1.0232 0.00 0.00 0.00 0.00 0.00 9.32 6.12 0.0000 0.0000 0.0000 0.0000 0 0
+5391 0 """FALCON-2----""" 1.0207 0.00 0.00 0.00 0.00 0.00 7.56 4.99 0.0000 0.0000 0.0000 0.0000 0 0
+5392 0 """FISHER------""" 1.0370 0.00 0.00 0.00 0.00 0.00 5.96 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+5393 0 """FLAT-ROCK-1-""" 1.0195 0.00 0.00 0.00 0.00 0.00 1.68 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+5394 0 """FLEMING-----""" 1.0067 0.00 0.00 0.00 0.00 0.00 4.54 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+5395 0 """FORESTER----""" 0.9770 0.00 0.00 0.00 0.00 0.00 0.76 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5396 0 """FRANK2---EQ1""" 0.9722 0.00 0.00 0.00 0.00 0.00 6.10 1.50 0.0000 0.0000 0.0000 0.0000 0 0
+5397 0 """FREEDOM-----""" 0.9954 0.00 0.00 0.00 0.00 0.00 1.10 0.12 0.0000 0.0000 0.0000 0.0000 0 0
+5398 0 """FRENCHLND-2-""" 1.0263 0.00 0.00 0.00 0.00 0.00 5.70 4.37 0.0000 0.1200 0.0000 0.0000 0 0
+5399 0 """FRISBIE-24--""" 1.0881 0.00 0.00 0.00 0.00 0.00 222.68 75.01 0.0000 0.0000 0.0000 0.0000 0 0
+5400 0 """FULLER-1----""" 1.0203 0.00 0.00 0.00 0.00 0.00 2.52 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+5401 0 """FULLER-2----""" 1.0257 0.00 0.00 0.00 0.00 0.00 2.44 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+5402 0 """GAGETOWN----""" 1.0203 0.00 0.00 0.00 0.00 0.00 1.18 0.42 0.0000 0.0480 0.0000 0.0000 0 0
+5403 0 """1GARNER-CP--""" 1.0195 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5404 0 """GENOA-40----""" 1.0191 0.00 0.00 0.00 0.00 0.00 12.94 6.37 0.0000 0.1800 0.0000 0.0000 0 0
+5405 0 """GLOBE-------""" 0.9892 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+5406 0 """GOODISON----""" 0.9861 0.00 0.00 0.00 0.00 0.00 7.56 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+5407 0 """GRAF--------""" 0.9961 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+5408 0 """HAMBURG-----""" 1.0440 0.00 0.00 0.00 0.00 0.00 2.44 0.64 0.0000 0.0660 0.0000 0.0000 0 0
+5409 0 """HANCOCK-40--""" 1.0036 0.00 100.81 190.00 0.00 0.00 29.57 15.62 0.0000 0.0000 0.0000 0.0000 0 0
+5410 0 """HANNAN-1---1""" 1.0048 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+5411 0 """HARTLAND----""" 0.9948 0.00 0.00 0.00 0.00 0.00 2.18 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+5412 0 """HEMLOCK-1---""" 1.0293 0.00 0.00 0.00 0.00 0.00 6.00 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+5413 0 """HEMLOCK-2---""" 1.0364 0.00 0.00 0.00 0.00 0.00 6.97 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+5414 2 """HINES-40----""" 0.9900 0.00 0.00 120.00 0.00 18.00 115.58 95.12 0.0000 0.3600 0.0000 0.0000 0 0
+5415 0 """HOBART-TAP--""" 1.0363 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5416 0 """HOBART------""" 1.0414 0.00 0.00 0.00 0.00 0.00 4.03 1.59 0.0000 0.0900 0.0000 0.0000 0 0
+5417 0 """HOWELL-2----""" 1.0160 0.00 0.00 0.00 0.00 0.00 3.95 1.81 0.0000 0.0660 0.0000 0.0000 0 0
+5418 0 """HUNTERS-CR40""" 1.0031 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5419 0 """IDA---------""" 1.0107 0.00 0.00 0.00 0.00 0.00 1.90 -0.12 0.0000 0.0000 0.0000 0.0000 0 0
+5420 0 """IMLAY-CITY--""" 0.9775 0.00 0.00 0.00 0.00 0.00 4.70 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+5421 0 """INLAND---EQ1""" 1.0137 0.00 0.00 0.00 0.00 0.00 5.80 3.51 0.0000 0.0000 0.0000 0.0000 0 0
+5422 0 """IRA---------""" 1.0238 0.00 0.00 0.00 0.00 0.00 2.10 0.85 0.0000 0.0480 0.0000 0.0000 0 0
+5423 0 """IRONTON-24--""" 1.0193 0.00 0.00 0.00 0.00 0.00 177.80 67.00 0.0000 0.0000 0.0000 0.0000 0 0
+5424 0 """IRVING------""" 0.9945 0.00 0.00 0.00 0.00 0.00 5.88 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5425 0 """JACKSON-RD.2""" 1.0346 0.00 0.00 0.00 0.00 0.00 1.01 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+5426 0 """JASPER------""" 1.0041 0.00 0.00 0.00 0.00 0.00 0.34 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+5427 0 """JORDAN-1----""" 0.9922 0.00 0.00 0.00 0.00 0.00 1.85 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+5428 0 """JOPLIN------""" 0.9903 0.00 0.00 0.00 0.00 0.00 0.76 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+5429 0 """KEEGO-2-----""" 0.9789 0.00 0.00 0.00 0.00 0.00 1.10 0.37 0.0000 0.0000 0.0000 0.0000 0 0
+5430 0 """KELLOGG-----""" 0.9988 0.00 0.00 0.00 0.00 0.00 3.78 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+5431 0 """1KENNETT-CP-""" 1.0198 0.00 0.00 0.00 0.00 0.00 17.90 8.37 0.0000 0.0000 0.0000 0.0000 0 0
+5432 0 """KIMBALL-----""" 1.0128 0.00 0.00 0.00 0.00 0.00 3.36 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+5433 0 """KINDE-------""" 0.9840 0.00 0.00 0.00 0.00 0.00 1.01 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+5434 0 """KING-SEELEY-""" 1.0463 0.00 0.00 0.00 0.00 0.00 2.69 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+5435 0 """LAKEPORT----""" 1.0008 0.00 0.00 0.00 0.00 0.00 1.85 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5436 0 """LAKEVILLE---""" 0.9976 0.00 0.00 0.00 0.00 0.00 1.09 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+5437 0 """LAPEER------""" 0.9933 0.00 0.00 0.00 0.00 0.00 3.78 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+5438 0 """LARK-40-----""" 1.0476 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5439 0 """LEE-40------""" 1.0183 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+5440 0 """LIMA--------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.18 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+5441 0 """LINCOLN-24--""" 0.9866 0.00 0.00 0.00 0.00 0.00 148.43 124.57 0.0000 0.5700 0.0000 0.0000 0 0
+5442 0 """LUZON-40----""" 1.0040 0.00 0.00 0.00 0.00 0.00 21.67 12.01 0.0000 0.0900 0.0000 0.0000 0 0
+5443 0 """MACOMB-40---""" 1.0194 0.00 0.00 0.00 0.00 0.00 132.00 96.50 0.0000 0.3600 0.0000 0.0000 0 0
+5444 0 """MARINE-CITY-""" 1.0387 0.00 0.00 0.00 0.00 0.00 5.21 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+5445 0 """MARLETTE----""" 0.9794 0.00 0.00 0.00 0.00 0.00 5.29 1.70 0.0000 0.0480 0.0000 0.0000 0 0
+5446 0 """MAYBEE------""" 1.0091 0.00 0.00 0.00 0.00 0.00 1.26 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+5447 0 """MAYVILLE----""" 1.0032 0.00 0.00 0.00 0.00 0.00 2.02 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+5448 0 """MEADOW---EQ1""" 0.9943 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+5449 0 """MEDINA-40---""" 1.0197 0.00 0.00 0.00 0.00 0.00 45.80 21.50 0.0000 0.1800 0.0000 0.0000 0 0
+5450 0 """MELVIN------""" 0.9800 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+5451 0 """METAMORA----""" 0.9954 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+5452 0 """MILFORD-----""" 1.0033 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+5453 0 """MILLINGTON--""" 0.9808 0.00 0.00 0.00 0.00 0.00 2.35 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+5454 0 """MOHAWK-2----""" 0.9967 0.00 0.00 0.00 0.00 0.00 2.10 0.25 0.0000 0.0000 0.0000 0.0000 0 0
+5455 0 """MONARCH-----""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.30 1.50 0.0000 0.0960 0.0000 0.0000 0 0
+5456 0 """1MONTCALM-CP""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5457 0 """MOTT-2------""" 1.0159 0.00 0.00 0.00 0.00 0.00 7.39 3.82 0.0000 0.0900 0.0000 0.0000 0 0
+5458 0 """NATIONAL-1--""" 0.9928 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+5459 0 """NATIONAL-2--""" 0.9997 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+5460 0 """NAVARRE-24--""" 1.0384 0.00 0.00 0.00 0.00 0.00 190.43 107.21 0.0000 0.8700 0.0000 0.0000 0 0
+5461 0 """NEFF--------""" 1.0012 0.00 0.00 0.00 0.00 0.00 5.71 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+5462 0 """NELSON-MILS1""" 1.0263 0.00 0.00 0.00 0.00 0.00 2.94 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+5463 0 """NELSON-MILS2""" 1.0270 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+5464 0 """NEW-BALTMR-1""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.10 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5465 0 """NEW-BALTMR23""" 1.0237 0.00 0.00 0.00 0.00 0.00 4.28 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+5466 0 """NEW-BOSTON--""" 1.0111 0.00 0.00 0.00 0.00 0.00 1.93 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+5467 0 """NEWBURGH-40-""" 0.9673 0.00 0.00 0.00 0.00 0.00 147.42 102.95 0.0000 0.3000 0.0000 0.0000 0 0
+5468 0 """NEW-HAVEN-1-""" 1.0179 0.00 0.00 0.00 0.00 0.00 3.44 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+5469 0 """NEW-HAVEN-2-""" 1.0220 0.00 0.00 0.00 0.00 0.00 2.69 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+5470 0 """NIXON-2-----""" 0.9768 0.00 0.00 0.00 0.00 0.00 11.09 5.52 0.0000 0.0000 0.0000 0.0000 0 0
+5471 0 """NOBLE-------""" 0.9863 0.00 0.00 0.00 0.00 0.00 16.97 9.14 0.0000 0.0000 0.0000 0.0000 0 0
+5472 0 """NORTH-BRANCH""" 0.9717 0.00 0.00 0.00 0.00 0.00 4.45 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+5473 2 """NORTHEAST-24""" 1.0104 0.00 80.00 0.00 0.00 48.00 230.24 141.20 0.0000 0.4800 0.0000 0.0000 0 0
+5474 0 """NORTH-SRVCTR""" 1.0050 0.00 0.00 0.00 0.00 0.00 5.80 4.36 0.0000 0.0000 0.0000 0.0000 0 0
+5475 2 """NORTHWEST-40""" 1.0044 0.00 0.00 0.00 0.00 18.00 209.70 76.40 0.0000 0.5480 0.0000 0.0000 0 0
+5476 0 """NORWAY-1----""" 0.9516 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+5477 0 """NORWAY-2-EQ1""" 0.9477 0.00 0.00 0.00 0.00 0.00 5.96 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+5478 0 """OAK-BEACH---""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.84 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+5479 0 """OLIVER------""" 0.9870 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5480 0 """OLYMPA-FUT75""" 0.9825 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5481 0 """OMAHA-1--EQ1""" 0.9473 0.00 0.00 0.00 0.00 0.00 10.08 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+5482 0 """OMAHA-2--EQ1""" 0.9465 0.00 0.00 0.00 0.00 0.00 9.58 3.61 0.0000 0.0000 0.0000 0.0000 0 0
+5483 0 """OPAL--------""" 1.0050 0.00 0.00 0.00 0.00 0.00 0.92 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+5484 0 """OREGON-1----""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.38 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+5485 0 """ORION-------""" 0.9925 0.00 0.00 0.00 0.00 0.00 5.46 2.02 0.0000 0.0660 0.0000 0.0000 0 0
+5486 0 """OTTER-LAKE--""" 0.9836 0.00 0.00 0.00 0.00 0.00 1.01 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+5487 0 """OWENDALE----""" 1.0049 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+5488 0 """OXFORD------""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.89 3.72 0.0000 0.1200 0.0000 0.0000 0 0
+5489 0 """1PADDOCK-CP-""" 1.0220 0.00 0.00 0.00 0.00 0.00 4.30 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+5490 0 """PAGE--------""" 0.9930 0.00 0.00 0.00 0.00 0.00 9.58 5.63 0.0000 0.0660 0.0000 0.0000 0 0
+5491 0 """PALMER-1----""" 0.9643 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+5492 0 """PARKER-ROAD-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.64 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+5493 0 """PAUL-1------""" 1.0114 0.00 0.00 0.00 0.00 0.00 8.15 4.89 0.0000 0.0480 0.0000 0.0000 0 0
+5494 0 """PAUL-2,3----""" 1.0157 0.00 0.00 0.00 0.00 0.00 4.70 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+5495 0 """PHOENIX-40--""" 1.0379 0.00 0.00 0.00 0.00 0.00 36.71 20.82 0.0000 0.0000 0.0000 0.0000 0 0
+5496 0 """PIEDMONT----""" 1.0235 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5497 0 """PIGEON------""" 0.9818 0.00 0.00 0.00 0.00 0.00 3.78 4.78 0.0000 0.0480 0.0000 0.0000 0 0
+5498 0 """PINCKNEY----""" 1.0442 0.00 0.00 0.00 0.00 0.00 3.86 1.70 0.0000 0.0900 0.0000 0.0000 0 0
+5499 0 """PIONEER---40""" 1.0270 0.00 0.00 0.00 0.00 0.00 19.10 10.12 0.0000 0.0000 0.0000 0.0000 0 0
+5500 0 """PIPER---EQ1-""" 1.0008 0.00 0.00 0.00 0.00 0.00 5.12 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+5501 0 """PITSFLD--EQ1""" 1.0164 0.00 0.00 0.00 0.00 0.00 9.66 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+5502 0 """PLACID------""" 1.0026 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5503 0 """PLYMOUTH----""" 0.9523 0.00 0.00 0.00 0.00 0.00 12.10 7.44 0.0000 0.1560 0.0000 0.0000 0 0
+5504 0 """PORT-AUSTIN-""" 0.9754 0.00 0.00 0.00 0.00 0.00 3.02 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5505 0 """PORT-HOPE---""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+5506 0 """PORT-SANILAC""" 0.9808 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5507 0 """PRICE-1-----""" 1.0353 0.00 0.00 0.00 0.00 0.00 4.37 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+5508 0 """PROCTOR-----""" 0.9955 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5509 0 """PUTNAM------""" 1.0098 0.00 14.00 40.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5510 0 """QUEEN-------""" 1.0065 0.00 0.00 0.00 0.00 0.00 3.53 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+5511 0 """QUINCY------""" 1.0030 0.00 0.00 0.00 0.00 0.00 1.34 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5512 0 """RANDOLPH----""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5513 0 """RAVINE---EQ1""" 0.9764 0.00 0.00 0.00 0.00 0.00 8.90 3.62 0.0000 0.0000 0.0000 0.0000 0 0
+5514 0 """RED-RUN-40--""" 1.0203 0.00 0.00 0.00 0.00 0.00 140.87 71.29 0.0000 0.5400 0.0000 0.0000 0 0
+5515 0 """REESE---EQ2-""" 0.9799 0.00 0.00 0.00 0.00 0.00 5.96 2.23 0.0000 0.0480 0.0000 0.0000 0 0
+5516 0 """REMER-40----""" 1.0461 0.00 0.00 0.00 0.00 0.00 1.34 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5517 0 """RENO--------""" 0.9937 0.00 0.00 0.00 0.00 0.00 4.80 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+5518 0 """RICHMOND----""" 1.0130 0.00 0.00 0.00 0.00 0.00 5.63 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+5519 0 """RIFLE-------""" 0.9886 0.00 0.00 0.00 0.00 0.00 6.13 2.97 0.0000 0.0480 0.0000 0.0000 0 0
+5520 0 """RIVER-RAISIN""" 1.0072 0.00 0.00 0.00 0.00 0.00 0.92 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+5521 2 """RIVERVIEW-40""" 1.0021 0.00 25.00 -100.00 -10.00 20.00 145.57 79.69 0.0000 0.3600 0.0000 0.0000 0 0
+5522 0 """ROCHESTER-1-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.55 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+5523 0 """ROCKWOOD----""" 1.0345 0.00 0.00 0.00 0.00 0.00 5.80 1.59 0.0000 0.0340 0.0000 0.0000 0 0
+5524 0 """ROMEO---EQ1-""" 1.0133 0.00 0.00 0.00 0.00 0.00 6.13 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+5525 0 """ROMULUS---40""" 1.0151 0.00 0.00 0.00 0.00 0.00 20.66 13.07 0.0000 0.1680 0.0000 0.0000 0 0
+5526 0 """RUSH-TAP----""" 0.9835 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5527 0 """RUSH-40-----""" 1.0014 0.00 0.00 0.00 0.00 0.00 3.70 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+5528 0 """SALEM-------""" 1.0417 0.00 0.00 0.00 0.00 0.00 1.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+5529 0 """SALINE------""" 1.0017 0.00 0.00 0.00 0.00 0.00 9.10 4.87 0.0000 0.0960 0.0000 0.0000 0 0
+5530 0 """SANDUSKY-40-""" 1.0042 0.00 0.00 0.00 0.00 0.00 5.29 1.91 0.0000 0.0660 0.0000 0.0000 0 0
+5531 0 """SAXON-------""" 0.9916 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+5532 0 """SEBEWAING---""" 1.0083 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+5533 0 """SELFRIDGE-1-""" 1.0074 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+5534 0 """SELKIRK-----""" 1.0092 0.00 0.00 0.00 0.00 0.00 6.05 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+5535 0 """SHAW--------""" 0.9720 0.00 0.00 0.00 0.00 0.00 1.60 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5536 0 """SHELDON-1---""" 0.9578 0.00 0.00 0.00 0.00 0.00 5.29 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+5537 0 """SHERWOOD----""" 1.0148 0.00 0.00 0.00 0.00 0.00 1.93 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+5538 0 """SNOVER------""" 0.9929 0.00 0.00 0.00 0.00 0.00 1.60 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+5539 0 """SOUTHFLD-40-""" 1.0066 0.00 0.00 0.00 0.00 0.00 99.54 81.89 0.0000 0.0900 0.0000 0.0000 0 0
+5540 0 """STATE-1-----""" 1.0247 0.00 0.00 0.00 0.00 0.00 5.60 3.25 0.0000 0.0000 0.0000 0.0000 0 0
+5541 0 """SPOKANE-40--""" 1.0014 0.00 0.00 0.00 0.00 0.00 36.54 16.57 0.0000 0.0000 0.0000 0.0000 0 0
+5542 0 """ST-CLAIR-1--""" 1.0259 0.00 0.00 0.00 0.00 0.00 2.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+5543 0 """ST-CLAIR-2--""" 1.0352 0.00 0.00 0.00 0.00 0.00 2.69 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+5544 0 """STEPHENS-24-""" 1.0074 0.00 0.00 0.00 0.00 0.00 164.30 105.69 0.0000 0.5700 0.0000 0.0000 0 0
+5545 0 """STERLING-40-""" 1.0210 0.00 0.00 0.00 0.00 0.00 101.14 45.79 0.0000 0.5400 0.0000 0.0000 0 0
+5546 0 """STOCKBRIDGE-""" 1.0701 0.00 0.00 0.00 0.00 0.00 1.09 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+5547 0 """1STOCKWELLCP""" 1.0172 0.00 0.00 0.00 0.00 0.00 10.90 6.75 0.0000 0.0000 0.0000 0.0000 0 0
+5548 0 """SUNSET-40---""" 1.0041 0.00 0.00 0.00 0.00 0.00 78.79 59.01 0.0000 0.5160 0.0000 0.0000 0 0
+5549 2 """SUPERIOR-40-""" 1.0189 0.00 0.00 0.00 0.00 118.00 61.49 48.74 0.0000 0.1800 0.0000 0.0000 0 0
+5550 0 """TIENKEN-2---""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5551 0 """TALBOT---EQ1""" 0.9854 0.00 0.00 0.00 0.00 0.00 2.35 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+5552 0 """1TAYLOR-1-13""" 1.0121 0.00 0.00 0.00 0.00 0.00 10.67 6.27 0.0000 0.0000 0.0000 0.0000 0 0
+5553 0 """1TAYLOR-2-13""" 1.0154 0.00 0.00 0.00 0.00 0.00 8.65 6.48 0.0000 0.0000 0.0000 0.0000 0 0
+5554 0 """TEGGERDINE--""" 0.9815 0.00 0.00 0.00 0.00 0.00 11.34 4.67 0.0000 0.0000 0.0000 0.0000 0 0
+5555 0 """TEMPLE------""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.59 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5556 0 """TEXAS-------""" 1.0281 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+5557 0 """TODD--------""" 1.0426 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+5558 0 """TRINITY-2---""" 1.0107 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+5559 0 """TROY-40-----""" 0.9963 0.00 0.00 0.00 0.00 0.00 178.92 77.64 0.0000 0.5400 0.0000 0.0000 0 0
+5560 0 """TUSCOLA-40--""" 1.0020 0.00 0.00 0.00 0.00 0.00 6.22 2.55 0.0000 0.0660 0.0000 0.0000 0 0
+5561 0 """UNION-LAKE--""" 0.9771 0.00 0.00 0.00 0.00 0.00 11.84 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+5562 0 """UNIONVILLE--""" 1.0120 0.00 0.00 0.00 0.00 0.00 1.26 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+5563 0 """UNIVR-BUS1T6""" 1.0250 0.00 0.00 0.00 0.00 0.00 11.17 8.71 0.0000 0.0000 0.0000 0.0000 0 0
+5564 0 """URBAN-TEC---""" 0.9887 0.00 0.00 0.00 0.00 0.00 5.12 3.19 0.0000 0.0000 0.0000 0.0000 0 0
+5565 0 """UTAH--------""" 1.0415 0.00 0.00 0.00 0.00 0.00 0.76 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+5566 0 """VANBUREN-EQ1""" 1.0128 0.00 0.00 0.00 0.00 0.00 1.51 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+5567 0 """VASSAR-BIRCH""" 0.9744 0.00 0.00 0.00 0.00 0.00 10.00 5.74 0.0000 0.0660 0.0000 0.0000 0 0
+5568 0 """VICTOR-40---""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5569 0 """VALLEY------""" 1.0268 0.00 6.00 20.00 0.00 0.00 0.90 0.62 0.0000 0.0000 0.0000 0.0000 0 0
+5570 0 """WABASH-40---""" 1.0066 0.00 0.00 0.00 0.00 0.00 46.70 26.25 0.0000 0.0000 0.0000 0.0000 0 0
+5571 0 """WALLED-LAKE-""" 0.9972 0.00 0.00 0.00 0.00 0.00 6.00 2.62 0.0000 0.0000 0.0000 0.0000 0 0
+5572 0 """WALNUT-1,2--""" 0.9814 0.00 0.00 0.00 0.00 0.00 9.60 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+5573 0 """WALTON40-SUB""" 1.0330 0.00 0.00 0.00 0.00 0.00 44.35 20.08 0.0000 0.1800 0.0000 0.0000 0 0
+5574 0 """WARDLOW-----""" 0.9956 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+5575 2 """WARREN-24---""" 1.0171 0.00 0.00 540.00 0.00 54.00 268.46 194.97 0.0000 0.9000 0.0000 0.0000 0 0
+5576 0 """WASHNGTN-EQ1""" 1.0002 0.00 0.00 0.00 0.00 0.00 8.57 4.36 0.0000 0.0660 0.0000 0.0000 0 0
+5577 0 """WATERFORD---""" 0.9903 0.00 0.00 0.00 0.00 0.00 17.81 5.52 0.0000 0.1800 0.0000 0.0000 0 0
+5578 0 """WEBERVLE-EQ1""" 1.0885 0.00 0.00 0.00 0.00 0.00 8.23 1.91 0.0000 0.1140 0.0000 0.0000 0 0
+5579 0 """WHITE-LAKE--""" 0.9941 0.00 0.00 0.00 0.00 0.00 4.70 1.59 0.0000 0.0000 0.0000 0.0000 0 0
+5580 0 """WHITMORE-LK-""" 1.0357 0.00 0.00 0.00 0.00 0.00 7.81 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+5581 0 """WHITNY-FUT73""" 1.0033 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5582 0 """WILEY-------""" 1.0197 0.00 0.00 0.00 0.00 0.00 1.26 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+5583 0 """WILMOTK-NGFD""" 0.9922 0.00 0.00 0.00 0.00 0.00 0.84 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+5584 0 """WILSON------""" 1.0128 0.00 0.00 0.00 0.00 0.00 2.60 -0.21 0.0000 0.0000 0.0000 0.0000 0 0
+5585 0 """1WILSON-CP--""" 1.0157 0.00 0.00 0.00 0.00 0.00 8.60 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+5586 0 """WOLFHILL----""" 0.9897 0.00 0.00 0.00 0.00 0.00 4.96 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+5587 0 """WOLVERINE-2-""" 1.0200 0.00 0.00 0.00 0.00 0.00 5.12 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+5588 0 """WORTH-------""" 1.0069 0.00 0.00 0.00 0.00 0.00 2.18 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5589 0 """YALE-TAP----""" 0.9902 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5590 0 """YALE--------""" 0.9870 0.00 0.00 0.00 0.00 0.00 3.11 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+5591 0 """YATES-------""" 0.9871 0.00 0.00 0.00 0.00 0.00 1.34 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+5592 0 """YORK--------""" 0.9901 0.00 0.00 0.00 0.00 0.00 2.44 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+5593 0 """YOST-40-----""" 1.0354 0.00 0.00 0.00 0.00 0.00 48.55 26.29 0.0000 0.0480 0.0000 0.0000 0 0
+5594 0 """2ADAMS-----1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5595 0 """2ALFRED----1""" 1.0468 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+5596 0 """ALFRED-13---""" 1.0489 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+5597 0 """2AMHERST1.13""" 1.0230 0.00 0.00 0.00 0.00 0.00 7.56 4.72 0.0000 0.0000 0.0000 0.0000 0 0
+5598 0 """2AMHERST2.13""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5599 0 """2ARROWHEAD-1""" 1.0315 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5600 0 """2BAD-AXE---1""" 1.0460 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5601 0 """2BLOOMFLD--1""" 1.0065 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5602 0 """2BROWNTN---3""" 1.0081 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5603 0 """2BROWNTN---2""" 1.0314 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5604 2 """2BROWNTN-N-1""" 1.0263 0.00 0.00 -910.00 -91.00 338.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5605 0 """2BROWNTN-S-1""" 1.0117 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5606 0 """2BUNCE-CK--1""" 1.1567 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5607 0 """2B3N-DECO230""" 1.0877 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5608 0 """2-BURNS-1--1""" 1.0578 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5609 0 """2-BURNS-2--1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5610 0 """2CANIFF----3""" 1.0261 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5611 0 """2CANIFF----1""" 1.0433 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5612 0 """2CATALINA-CP""" 1.0064 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5613 0 """2CATO------1""" 1.0403 0.00 0.00 0.00 0.00 0.00 57.14 27.68 0.0000 0.0000 0.0000 0.0000 0 0
+5614 0 """2CHESTNUT--1""" 1.0164 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5615 0 """2CODY------1""" 0.9887 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5616 2 """2CONNER-G.24""" 1.0404 0.00 285.00 1770.00 0.00 1770.00 436.28 182.01 0.0000 0.0000 0.0000 0.0000 0 0
+5617 0 """2COOPER----1""" 1.0059 0.00 0.00 0.00 0.00 0.00 1.34 2.31 0.0000 0.0000 0.0000 0.0000 0 0
+5618 0 """2CORTLAND--1""" 1.0392 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5619 0 """2COVENTRY--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5620 0 """2COVENTRY--1""" 0.9810 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5621 0 """2CRESTWOOD-1""" 1.0120 0.00 0.00 0.00 0.00 0.00 3.56 1.78 0.0000 0.0000 0.0000 0.0000 0 0
+5622 0 """2CUSTER----1""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5623 0 """2C-3DECO-138""" 0.9752 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5624 0 """2DAYTON----1""" 0.9863 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5625 2 """2DELRAY-16-1""" 1.0200 0.00 72.00 350.00 0.00 54.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5626 2 """2DELRAY-G.24""" 1.0483 0.00 236.00 2320.00 0.00 2320.00 290.94 159.76 0.0000 0.0000 0.0000 0.0000 0 0
+5627 0 """2ELM-------1""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5628 0 """2E.FERMI---1""" 0.9983 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5629 0 """2ERIN------1""" 1.0331 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5630 0 """2E-N-S-TAP11""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5631 0 """2E-N-S-TAP21""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5632 2 """2ESSEX-----1""" 1.0543 0.00 274.00 0.00 0.00 140.00 0.00 0.00 0.0000 1.0800 0.0000 0.0000 0 0
+5633 0 """2EVERGREEN-1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5634 0 """2FLEETWD-1-1""" 1.0428 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5635 0 """2FLEETWD-2-1""" 1.0456 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5636 0 """2FLEETWD--13""" 1.0161 0.00 0.00 0.00 0.00 0.00 12.02 5.78 0.0000 0.0000 0.0000 0.0000 0 0
+5637 0 """2FOMOCO-C1-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+5638 0 """2FOMOCO-C2-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+5639 0 """2FRISBIE---1""" 1.0414 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5640 0 """2GENOA-----1""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5641 0 """2HANCOCK---1""" 1.0042 0.00 82.00 210.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5642 2 """2HARB.BEA.-1""" 1.0597 0.00 114.00 -300.00 -30.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5643 0 """2HINES-----1""" 0.9897 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5644 0 """2HUNTER-CK.1""" 1.0432 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5645 0 """2IRONTON---1""" 1.0310 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5646 0 """2IRN-NA-RV-1""" 1.0272 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5647 0 """2IMLAY-1PUP1""" 1.0685 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5648 0 """2JEFFERSON-1""" 1.0257 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5649 0 """2KTT-DECO138""" 1.0748 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5650 0 """2LK.HURON1P1""" 1.1530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5651 0 """2LK.HURON2P1""" 1.1335 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5652 0 """2LAPEER----1""" 1.0390 0.00 0.00 0.00 0.00 0.00 7.83 2.85 0.0000 0.0000 0.0000 0.0000 0 0
+5653 0 """2LARK------1""" 0.9720 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5654 0 """2LEE-------1""" 1.1215 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5655 0 """2LINCOLN---1""" 1.0100 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5656 0 """2LN-NE-NW--1""" 1.0129 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5657 0 """2LOGAN-1---1""" 1.0326 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5658 0 """2LOGAN-1-.13""" 1.0161 0.00 0.00 0.00 0.00 0.00 8.54 2.49 0.0000 0.0000 0.0000 0.0000 0 0
+5659 0 """2LOGAN-2---1""" 1.0362 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5660 0 """2LOGAN-2-.13""" 1.0153 0.00 0.00 0.00 0.00 0.00 8.46 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+5661 0 """2LONG-LK-1-1""" 1.0035 0.00 0.00 0.00 0.00 0.00 7.12 1.69 0.0000 0.0000 0.0000 0.0000 0 0
+5662 0 """2LONG-LK-2-1""" 1.0046 0.00 0.00 0.00 0.00 0.00 6.68 1.25 0.0000 0.0000 0.0000 0.0000 0 0
+5663 0 """2LUZON-----1""" 0.9694 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5664 0 """2LUZON-W.40D""" 0.9908 0.00 0.00 0.00 0.00 0.00 16.02 7.83 0.0000 0.0000 0.0000 0.0000 0 0
+5665 0 """2MACOMB----1""" 1.0576 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5666 2 """2MARYSVILLE1""" 1.1521 0.00 84.00 0.00 0.00 60.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5667 0 """2MAXWELL-1-1""" 1.0236 0.00 0.00 0.00 0.00 0.00 18.16 11.21 0.0000 0.0000 0.0000 0.0000 0 0
+5668 0 """2MAXWELL-2-1""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5669 0 """2MCLOUTH-1-1""" 1.0222 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+5670 0 """2MCLOUTH-2-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+5671 2 """2MCLOUTH-.24""" 1.0350 0.00 0.00 670.00 -30.00 100.00 108.22 48.42 0.0000 0.0000 0.0000 0.0000 0 0
+5672 0 """2MEDINA----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5673 0 """2MIDTOWN---1""" 1.0409 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5674 2 """2MONRO-1,2-3""" 1.0100 0.00 1290.95 -880.00 -182.00 803.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5675 2 """2MONRO-3,4-3""" 1.0105 0.00 470.00 -910.00 -91.00 528.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5676 0 """2MTCALM-CP-1""" 1.0065 0.00 0.00 0.00 0.00 0.00 78.59 31.06 0.0000 0.0000 0.0000 0.0000 0 0
+5677 0 """2NAVARRE---2""" 1.0244 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5678 0 """2NAVARRE---1""" 1.0256 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5679 0 """2NEWBURGH--1""" 0.9920 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5680 0 """2NOBLE-----1""" 0.9773 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5681 0 """2NORTHEAST-1""" 1.0287 0.00 54.00 140.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5682 0 """2N.E.STUB--1""" 1.0437 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5683 2 """2N.E.FLIK.24""" 1.0200 0.00 0.00 40.00 0.00 30.00 43.16 15.22 0.0000 0.0000 0.0000 0.0000 0 0
+5684 0 """2NORTHWEST-1""" 0.9962 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5685 0 """2PHOENIX---1""" 0.9654 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5686 0 """2PIONEER-TP1""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5687 0 """2PIONEER---1""" 0.9633 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5688 0 """2PLACID----1""" 0.9882 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5689 0 """2PONTIAC---3""" 1.0328 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5690 0 """2PONTIAC---1""" 1.0213 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5691 0 """2RED-RUN---1""" 1.0352 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+5692 0 """2REMER-----1""" 1.1466 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5693 0 """2R.R.EQZR.-1""" 1.0352 0.00 0.00 0.00 0.00 0.00 60.52 37.47 0.0000 0.0000 0.0000 0.0000 0 0
+5694 2 """2R.ROUGE-1-1""" 1.0354 0.00 272.00 1880.00 0.00 188.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5695 2 """2R.ROUGE-2-1""" 1.0442 0.00 257.00 1980.00 0.00 198.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5696 2 """2R.ROUGE-3-1""" 1.0447 0.00 300.00 0.00 0.00 209.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5697 0 """2RIVERVU---1""" 1.0241 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5698 0 """2ROMULUS---1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5699 0 """2RUSH------1""" 1.0284 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5700 0 """2SANDUSKY--1""" 1.0989 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5701 0 """2SLOCUM----1""" 1.0153 0.00 14.00 40.00 0.00 0.00 57.49 27.86 0.0000 0.0000 0.0000 0.0000 0 0
+5702 0 """2SOUTHFLD--1""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5703 0 """2SPOKANE---1""" 1.0200 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5704 2 """2ST-CLAIR--3""" 1.0433 0.00 498.00 0.00 0.00 215.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5705 2 """2ST-CL.1-3-1""" 1.1866 0.00 501.00 3220.00 0.00 322.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5706 2 """2ST-CL.4,5-1""" 1.1467 0.00 463.00 0.00 0.00 315.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5707 2 """2ST-CL.6---1""" 1.1194 0.00 322.00 0.00 0.00 190.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5708 0 """2STC-SP-STL1""" 1.0639 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5709 0 """2STEPHENS--3""" 1.0262 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5710 0 """2STEPHENS--1""" 1.0420 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5711 0 """2STERLING--1""" 1.0393 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5712 0 """2SUNSET----1""" 0.9976 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5713 0 """2SUPERIOR--1""" 0.9791 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5714 0 """2TAYLOR-1--1""" 1.0054 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5715 0 """2TAYLOR--2-1""" 1.0247 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5716 0 """2TEMPEST--CP""" 1.0062 0.00 0.00 0.00 0.00 0.00 11.84 3.92 0.0000 0.0000 0.0000 0.0000 0 0
+5717 2 """2TRENTN-NA-1""" 1.0300 0.00 278.00 2220.00 0.00 225.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5718 2 """2TRENTN-SU-1""" 1.0300 0.00 593.00 1450.00 0.00 303.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5719 0 """2TROY------1""" 1.0029 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5720 0 """2TUSCOLA---1""" 1.0236 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5721 0 """2VICTOR----1""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5722 0 """2WABASH-TAP1""" 1.1463 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5723 0 """2WABASH----1""" 1.1431 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5724 0 """2WALTON----1""" 1.0096 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5725 0 """2WARREN----1""" 1.0148 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5726 0 """2WARREN-7--1""" 1.0400 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5727 0 """2WATERMAN--2""" 1.0227 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5728 0 """2WATERMAN--1""" 1.0418 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5729 0 """2WAT.EQZR.24""" 1.0311 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5730 0 """2WAYNE-----3""" 1.0091 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5731 0 """2WAYNE-----1""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5732 0 """2WHEELER---1""" 1.0040 0.00 0.00 0.00 0.00 0.00 24.21 15.04 0.0000 0.0000 0.0000 0.0000 0 0
+5733 0 """2WILLOW-1T-1""" 0.9847 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5734 0 """2WILLOW-2T-1""" 0.9880 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5735 0 """2WILLO-RUN-1""" 0.9811 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5736 0 """2WILLOW--.13""" 0.9992 0.00 0.00 0.00 0.00 0.00 41.83 23.67 0.0000 0.0000 0.0000 0.0000 0 0
+5737 0 """2WIXOM-----3""" 1.0194 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5738 0 """2WIXOM-----1""" 1.0035 0.00 0.00 0.00 0.00 0.00 10.86 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+5739 0 """2WOODHVN-1-1""" 1.0278 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5740 0 """2WOODHVN1.13""" 1.0229 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+5741 0 """2WDHVN-TP2-1""" 1.0248 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5742 0 """2WOODHVN-2-1""" 1.0240 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5743 0 """2WOODHVN2.13""" 1.0124 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+5744 0 """2YOST------1""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+5745 0 """3ALBA-TIE--1""" 1.1233 0.00 0.00 0.00 0.00 0.00 2.50 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+5746 0 """3ALCONA-D--1""" 1.1170 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5747 0 """3ALGOMA----1""" 1.0365 0.00 0.00 0.00 0.00 0.00 14.00 -1.10 0.0000 0.0000 0.0000 0.0000 0 0
+5748 0 """3ALMA------1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.40 2.10 0.0000 0.1000 0.0000 0.0000 0 0
+5749 0 """3ALMEDA----1""" 1.0459 0.00 0.00 0.00 0.00 0.00 14.10 4.30 0.0000 0.0215 0.0000 0.0000 0 0
+5750 0 """3ALPENA----1""" 1.1632 0.00 0.00 0.00 0.00 0.00 33.10 5.20 0.0000 0.2880 0.0000 0.0000 0 0
+5751 0 """3AMBER-----1""" 1.0260 0.00 0.00 0.00 0.00 0.00 19.00 15.60 0.0000 0.0000 0.0000 0.0000 0 0
+5752 0 """3ARGENTA---3""" 1.0555 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5753 0 """3ARGENTA---1""" 1.0537 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5754 0 """3A-1CPCO-120""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5755 0 """3BANGOR----1""" 1.0383 0.00 0.00 0.00 0.00 0.00 8.60 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5756 0 """3BARD-RD---1""" 1.0831 0.00 0.00 0.00 0.00 0.00 6.30 1.20 0.0000 0.0000 0.0000 0.0000 0 0
+5757 0 """3BARRY-----1""" 1.0416 0.00 0.00 0.00 0.00 0.00 27.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+5758 0 """3BASS-CRK--1""" 1.0389 0.00 0.00 0.00 0.00 0.00 17.80 3.20 0.0000 0.0000 0.0000 0.0000 0 0
+5759 0 """3BATAVIA---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 23.20 0.10 0.0000 0.0800 0.0000 0.0000 0 0
+5760 0 """3BEALS-RD.-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 146.80 48.60 0.0000 0.1500 0.0000 0.0000 0 0
+5761 0 """3BEECHER---1""" 1.0185 0.00 0.00 0.00 0.00 0.00 61.40 30.10 0.0000 0.0800 0.0000 0.0000 0 0
+5762 0 """3BEGOLE----1""" 1.0444 0.00 0.00 0.00 0.00 0.00 19.70 2.50 0.0000 0.1530 0.0000 0.0000 0 0
+5763 0 """3BEVERIDGE-1""" 1.0238 0.00 0.00 0.00 0.00 0.00 50.90 24.30 0.0000 0.1388 0.0000 0.0000 0 0
+5764 2 """3BIG-ROCK--1""" 1.1480 0.00 50.00 -140.00 -14.00 28.00 0.00 0.00 0.0000 0.0116 0.0000 0.0000 0 0
+5765 0 """3BINGHAM---1""" 1.0446 0.00 0.00 0.00 0.00 0.00 17.60 -7.80 0.0000 0.1928 0.0000 0.0000 0 0
+5766 0 """3BLACK-RIV-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 49.90 8.50 0.0000 0.0000 0.0000 0.0000 0 0
+5767 0 """3BLACKSTON-1""" 1.0188 0.00 0.00 200.00 0.00 0.00 83.10 22.00 0.0000 0.0800 0.0000 0.0000 0 0
+5768 0 """3BOARDMAN--1""" 1.0825 0.00 2.00 0.00 0.00 0.00 27.80 16.10 0.0000 0.1042 0.0000 0.0000 0 0
+5769 0 """3BUICK-STEW1""" 1.0363 0.00 0.00 0.00 0.00 0.00 40.50 17.10 0.0000 0.0000 0.0000 0.0000 0 0
+5770 0 """3BULLOCK---1""" 1.0269 0.00 0.00 0.00 0.00 0.00 37.10 37.10 0.0000 0.1578 0.0000 0.0000 0 0
+5771 2 """3CAMPBELL--1""" 1.0554 0.00 584.00 0.00 0.00 390.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5772 0 """3CEMENT-CY-1""" 1.0188 0.00 0.00 0.00 0.00 0.00 28.00 -0.20 0.0000 0.1000 0.0000 0.0000 0 0
+5773 0 """3CHASE-----1""" 1.0429 0.00 0.00 0.00 0.00 0.00 4.90 2.20 0.0000 0.0000 0.0000 0.0000 0 0
+5774 0 """3CLAIRMONT-1""" 1.0230 0.00 0.00 0.00 0.00 0.00 73.60 28.60 0.0000 0.1646 0.0000 0.0000 0 0
+5775 0 """3CLEVELAND-1""" 1.0356 0.00 0.00 0.00 0.00 0.00 32.90 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+5776 2 """3COBB------1""" 1.0400 0.00 476.00 40.00 0.00 421.00 79.30 35.60 0.0000 0.0000 0.0000 0.0000 0 0
+5777 0 """3CORK-ST.--1""" 1.0494 0.00 0.00 0.00 0.00 0.00 17.00 7.20 0.0000 0.0000 0.0000 0.0000 0 0
+5778 0 """3CORNELL---1""" 1.0290 0.00 0.00 0.00 0.00 0.00 33.30 12.00 0.0000 0.1981 0.0000 0.0000 0 0
+5779 0 """3COTTEGE-GR1""" 1.0738 0.00 0.00 0.00 0.00 0.00 1.70 0.70 0.0000 0.0000 0.0000 0.0000 0 0
+5780 0 """3CROTON----1""" 1.0342 0.00 29.00 0.00 0.00 0.00 10.40 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+5781 0 """3DEAN-RD.--1""" 1.0521 0.00 0.00 0.00 0.00 0.00 3.60 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+5782 0 """3DEJA------1""" 1.0414 0.00 0.00 0.00 0.00 0.00 13.80 -2.50 0.0000 0.0000 0.0000 0.0000 0 0
+5783 0 """3DELANEY---1""" 1.0469 0.00 0.00 0.00 0.00 0.00 64.80 25.10 0.0000 0.2698 0.0000 0.0000 0 0
+5784 0 """3DELH1-----1""" 1.0442 0.00 0.00 0.00 0.00 0.00 36.90 -10.00 0.0000 0.2783 0.0000 0.0000 0 0
+5785 0 """3DORT------1""" 1.0425 0.00 0.00 0.00 0.00 0.00 106.40 37.90 0.0000 0.4626 0.0000 0.0000 0 0
+5786 0 """3DOW-CHLOR.1""" 1.0243 0.00 0.00 0.00 0.00 0.00 49.00 24.00 0.0000 0.0000 0.0000 0.0000 0 0
+5787 0 """3DU-PONTE--1""" 1.0355 0.00 0.00 0.00 0.00 0.00 2.20 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5788 0 """3D-4CPCO-120""" 1.0444 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5789 0 """3EDENVILLE-1""" 1.0405 0.00 0.00 0.00 0.00 0.00 7.10 -4.70 0.0000 0.0000 0.0000 0.0000 0 0
+5790 2 """3ELM-STREET1""" 1.0444 0.00 29.00 0.00 0.00 7.00 32.70 23.30 0.0000 0.0000 0.0000 0.0000 0 0
+5791 0 """3EMMET-----1""" 1.1457 0.00 0.00 0.00 0.00 0.00 21.00 3.90 0.0000 0.0000 0.0000 0.0000 0 0
+5792 0 """3EUREKA----1""" 1.0398 0.00 0.00 0.00 0.00 0.00 21.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+5793 0 """3FELCH-RD.-1""" 1.0331 0.00 0.00 0.00 0.00 0.00 14.00 5.90 0.0000 0.0000 0.0000 0.0000 0 0
+5794 0 """3FISHER----1""" 1.0445 0.00 0.00 0.00 0.00 0.00 14.10 4.60 0.0000 0.0000 0.0000 0.0000 0 0
+5795 0 """3FOUNDRY---1""" 1.0316 0.00 0.00 0.00 0.00 0.00 31.70 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+5796 0 """3FOUR-MILE-1""" 1.0406 0.00 2.00 0.00 0.00 0.00 111.80 32.80 0.0000 0.1000 0.0000 0.0000 0 0
+5797 0 """3GARFIELD--1""" 1.0354 0.00 0.00 0.00 0.00 0.00 72.20 32.00 0.0000 0.0353 0.0000 0.0000 0 0
+5798 2 """3GAYLORD---1""" 1.1519 0.00 60.00 0.00 0.00 15.00 10.10 1.90 0.0000 0.0826 0.0000 0.0000 0 0
+5799 0 """3GENOA-----1""" 1.0678 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5800 0 """3GLEANER---1""" 1.0283 0.00 0.00 0.00 0.00 0.00 18.80 6.90 0.0000 0.0000 0.0000 0.0000 0 0
+5801 0 """3GREY-IRON-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 53.50 17.50 0.0000 0.0000 0.0000 0.0000 0 0
+5802 0 """3HALSEY----1""" 1.0458 0.00 0.00 0.00 0.00 0.00 20.40 3.80 0.0000 0.1148 0.0000 0.0000 0 0
+5803 0 """3HARDY-DAM-1""" 1.0343 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5804 0 """3HAZELWOOD-1""" 1.0525 0.00 0.00 0.00 0.00 0.00 39.10 7.20 0.0000 0.0400 0.0000 0.0000 0 0
+5805 0 """3HEMPHILL--1""" 1.0447 0.00 0.00 0.00 0.00 0.00 134.10 62.70 0.0000 0.6928 0.0000 0.0000 0 0
+5806 0 """3HIGGINS---1""" 1.1065 0.00 0.00 0.00 0.00 0.00 18.90 2.80 0.0000 0.0000 0.0000 0.0000 0 0
+5807 0 """3HODENPYL--1""" 1.0686 0.00 0.00 0.00 0.00 0.00 8.40 -0.80 0.0000 0.0000 0.0000 0.0000 0 0
+5808 0 """3HOLLAN-RD-1""" 1.0168 0.00 0.00 0.00 0.00 0.00 42.80 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+5809 0 """3HOOKER----1""" 1.0348 0.00 0.00 0.00 0.00 0.00 26.40 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5810 0 """3HUGHES-RD-1""" 1.0377 0.00 0.00 0.00 0.00 0.00 21.80 4.80 0.0000 0.0000 0.0000 0.0000 0 0
+5811 0 """3IOSCO-----1""" 1.1238 0.00 19.00 0.00 0.00 0.00 12.80 5.70 0.0000 0.0263 0.0000 0.0000 0 0
+5812 0 """3ISLAND-RD-1""" 1.0435 0.00 0.00 0.00 0.00 0.00 29.20 -2.90 0.0000 0.1086 0.0000 0.0000 0 0
+5813 2 """3KARN------1""" 1.0563 0.00 498.00 0.00 0.00 337.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5814 0 """3KENOWA----3""" 1.0865 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5815 0 """3LATSON----1""" 1.0558 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5816 0 """3LAWNDALE--1""" 1.0265 0.00 0.00 0.00 0.00 0.00 39.90 17.00 0.0000 0.0000 0.0000 0.0000 0 0
+5817 0 """3LAYTON----1""" 1.0246 0.00 0.00 0.00 0.00 0.00 16.10 1.80 0.0000 0.0000 0.0000 0.0000 0 0
+5818 0 """3LEWISTON--1""" 1.1462 0.00 0.00 0.00 0.00 0.00 2.60 0.80 0.0000 0.0000 0.0000 0.0000 0 0
+5819 0 """3LINBERGH--1""" 1.0424 0.00 0.00 0.00 0.00 0.00 42.40 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+5820 0 """3LOOK-GLAS-1""" 1.0411 0.00 0.00 0.00 0.00 0.00 25.30 -3.20 0.0000 0.0000 0.0000 0.0000 0 0
+5821 0 """3LOUD------1""" 1.1048 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0040 0.0000 0.0000 0 0
+5822 2 """3LUDINGTON-3""" 1.0978 0.00 0.00 0.00 0.00 200.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5823 0 """3MALLEABLE-1""" 1.0211 0.00 0.00 0.00 0.00 0.00 61.50 17.20 0.0000 0.0000 0.0000 0.0000 0 0
+5824 0 """3MARQUETTE-1""" 1.0444 0.00 2.00 0.00 0.00 0.00 17.80 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+5825 0 """3MECOSTA---1""" 1.0370 0.00 0.00 0.00 0.00 0.00 15.90 3.60 0.0000 0.0000 0.0000 0.0000 0 0
+5826 0 """3MEDUSA----1""" 1.1103 0.00 0.00 0.00 0.00 0.00 11.50 1.60 0.0000 0.0000 0.0000 0.0000 0 0
+5827 0 """3MILES-RD.-1""" 1.1103 0.00 0.00 0.00 0.00 0.00 7.70 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+5828 0 """3MILHAM----1""" 1.0437 0.00 0.00 0.00 0.00 0.00 36.30 9.60 0.0000 0.1413 0.0000 0.0000 0 0
+5829 0 """3MIO-------1""" 1.1407 0.00 9.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.2067 0.0000 0.0000 0 0
+5830 0 """3MONITOR---1""" 1.0319 0.00 0.00 0.00 0.00 0.00 41.40 14.30 0.0000 0.0503 0.0000 0.0000 0 0
+5831 0 """3MOORE-RD--1""" 0.9940 0.00 0.00 0.00 0.00 0.00 40.80 10.60 0.0000 0.0000 0.0000 0.0000 0 0
+5832 2 """3MORROW----1""" 1.0500 0.00 130.00 0.00 0.00 168.00 80.20 31.20 0.0000 0.1836 0.0000 0.0000 0 0
+5833 0 """3MUSKEGN-HT1""" 1.0212 0.00 0.00 0.00 0.00 0.00 72.90 52.50 0.0000 0.0000 0.0000 0.0000 0 0
+5834 0 """3NODULAR---1""" 1.0228 0.00 0.00 0.00 0.00 0.00 34.40 16.80 0.0000 0.0000 0.0000 0.0000 0 0
+5835 0 """3N.BELDING-1""" 1.0422 0.00 0.00 0.00 0.00 0.00 20.70 -2.30 0.0000 0.1000 0.0000 0.0000 0 0
+5836 0 """3OAKLAND---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 17.80 5.80 0.0000 0.0000 0.0000 0.0000 0 0
+5837 0 """3OGEMAW----1""" 1.0698 0.00 0.00 0.00 0.00 0.00 11.90 -7.50 0.0000 0.0000 0.0000 0.0000 0 0
+5838 0 """3OWOSSO----1""" 1.0282 0.00 0.00 0.00 0.00 0.00 29.20 10.40 0.0000 0.0000 0.0000 0.0000 0 0
+5839 0 """3PAGE------1""" 1.0180 0.00 0.00 0.00 0.00 0.00 45.80 5.40 0.0000 0.0800 0.0000 0.0000 0 0
+5840 2 """3PALISADES-3""" 1.0392 0.00 701.70 0.00 0.00 418.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5841 0 """3PASEDENA--1""" 1.0263 0.00 0.00 0.00 0.00 0.00 48.70 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+5842 0 """3PENN-DIXIE1""" 1.1463 0.00 0.00 0.00 0.00 0.00 6.60 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+5843 0 """3PT.CALCIT-1""" 1.1721 0.00 0.00 0.00 0.00 0.00 9.40 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+5844 0 """3RAISIN----1""" 1.0280 0.00 0.00 0.00 0.00 0.00 21.10 8.80 0.0000 0.0000 0.0000 0.0000 0 0
+5845 0 """3RICE-CREK-1""" 1.0323 0.00 0.00 0.00 0.00 0.00 29.10 1.20 0.0000 0.2540 0.0000 0.0000 0 0
+5846 0 """3RIFLE-RIV.1""" 1.0698 0.00 0.00 0.00 0.00 0.00 2.40 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+5847 2 """3RIGGSVIL--1""" 1.1813 0.00 25.00 0.00 0.00 6.00 22.30 2.50 0.0000 0.1838 0.0000 0.0000 0 0
+5848 0 """3RIVERVIEW-1""" 1.0513 0.00 0.00 0.00 0.00 0.00 79.60 28.70 0.0000 0.3312 0.0000 0.0000 0 0
+5849 0 """3ROCKPORT--1""" 1.1679 0.00 0.00 0.00 0.00 0.00 1.00 0.20 0.0000 0.0000 0.0000 0.0000 0 0
+5850 0 """3RONDO-----1""" 1.1683 0.00 0.00 0.00 0.00 0.00 3.40 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+5851 0 """3SAGNAW-R.-1""" 1.0316 0.00 0.00 0.00 0.00 0.00 63.80 32.80 0.0000 0.1568 0.0000 0.0000 0 0
+5852 0 """3SAMARIA---1""" 1.0341 0.00 0.00 0.00 0.00 0.00 23.10 10.70 0.0000 0.0000 0.0000 0.0000 0 0
+5853 0 """3SCOTT-LK.-1""" 1.0470 0.00 0.00 0.00 0.00 0.00 17.10 5.70 0.0000 0.0000 0.0000 0.0000 0 0
+5854 0 """3SPAULDING-1""" 1.0412 0.00 0.00 0.00 0.00 0.00 70.40 16.20 0.0000 0.0800 0.0000 0.0000 0 0
+5855 0 """3SPRUCE----1""" 1.1468 0.00 0.00 0.00 0.00 0.00 4.40 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+5856 0 """3STAMPG-PLT1""" 1.0446 0.00 0.00 0.00 0.00 0.00 11.60 3.80 0.0000 0.0000 0.0000 0.0000 0 0
+5857 0 """3STRONACH--1""" 1.0397 0.00 0.00 0.00 0.00 0.00 21.20 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+5858 0 """3STOVER----1""" 1.1154 0.00 0.00 0.00 0.00 0.00 6.60 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+5859 0 """3SUMMERTON-1""" 1.0218 0.00 0.00 0.00 0.00 0.00 24.20 -2.10 0.0000 0.0000 0.0000 0.0000 0 0
+5860 0 """3TALLMADGE-3""" 1.0815 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5861 0 """3TALLMADGE-1""" 1.0662 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5862 0 """3THETFORD--3""" 1.0579 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5863 2 """3THETFORD--1""" 1.0516 0.00 146.00 0.00 0.00 36.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5864 0 """3TITTABAW--3""" 1.0615 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5865 0 """3TITTABAW--1""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5866 0 """3TIPPY-DAM-1""" 1.0648 0.00 29.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.1255 0.0000 0.0000 0 0
+5867 0 """3TOMPKINS--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5868 0 """3TUSC.TAP.-1""" 1.0626 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5869 0 """3TWINING---1""" 1.0667 0.00 0.00 0.00 0.00 0.00 8.70 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+5870 0 """3UPJOHN----1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.80 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+5871 2 """3VERONA----1""" 1.0467 0.00 29.00 0.00 0.00 7.00 78.70 10.40 0.0000 0.4710 0.0000 0.0000 0 0
+5872 0 """3VEVAY-----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 18.30 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+5873 0 """3WACKERLY--1""" 1.0295 0.00 0.00 0.00 0.00 0.00 29.80 9.70 0.0000 0.0000 0.0000 0.0000 0 0
+5874 0 """3WARREN----1""" 1.0665 0.00 0.00 0.00 0.00 0.00 19.20 14.60 0.0000 0.3967 0.0000 0.0000 0 0
+5875 0 """3WASHTENAW-1""" 1.0009 0.00 0.00 0.00 0.00 0.00 16.90 -3.00 0.0000 0.0000 0.0000 0.0000 0 0
+5876 2 """3WEADOCK-B-1""" 1.0400 0.00 299.00 90.00 0.00 226.00 35.70 15.30 0.0000 0.0330 0.0000 0.0000 0 0
+5877 2 """3WEADOCK-W-1""" 1.0476 0.00 319.00 0.00 0.00 191.00 36.60 15.30 0.0000 0.0000 0.0000 0.0000 0 0
+5878 0 """3WEALTHY---1""" 1.0461 0.00 0.00 0.00 0.00 0.00 116.80 51.00 0.0000 0.0000 0.0000 0.0000 0 0
+5879 0 """3WEXFORD---1""" 1.0784 0.00 0.00 0.00 0.00 0.00 24.60 -4.50 0.0000 0.0990 0.0000 0.0000 0 0
+5880 0 """3WHITE-LK.-1""" 1.0342 0.00 9.00 0.00 0.00 0.00 11.80 6.80 0.0000 0.0000 0.0000 0.0000 0 0
+5881 2 """3WHITING---1""" 1.0500 0.00 331.00 900.00 0.00 206.00 14.30 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5882 0 """3WILLARD---1""" 1.0411 0.00 0.00 0.00 0.00 0.00 23.60 3.70 0.0000 0.0000 0.0000 0.0000 0 0
+5883 0 """4ALLANBURG-2""" 1.1270 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5884 0 """4BEACH-----2""" 1.0829 0.00 0.00 0.00 0.00 0.00 256.30 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+5885 2 """4BEAUHARN--2""" 1.1266 0.00 600.00 500.00 -25.00 50.00 19.70 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+5886 2 """4BECK------2""" 1.1280 0.00 1011.00 1890.00 -100.00 600.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5887 0 """4-BP-76-REG2""" 1.0551 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5888 0 """4BROCKVILLE2""" 1.0779 0.00 0.00 0.00 0.00 0.00 76.90 31.50 0.0000 0.0000 0.0000 0.0000 0 0
+5889 0 """4BUCHANNAN-2""" 1.0643 0.00 0.00 0.00 0.00 0.00 600.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+5890 2 """4BUCHANNAN-1""" 1.0472 0.00 0.00 -250.00 -25.00 200.00 326.80 52.40 0.0000 0.0000 0.0000 0.0000 0 0
+5891 0 """4BURLINGTON2""" 1.0779 0.00 0.00 0.00 0.00 0.00 900.00 300.00 0.0000 0.0000 0.0000 0.0000 0 0
+5892 0 """4CHATHAM---2""" 1.0922 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5893 2 """4CHATS-FALL2""" 1.1200 0.00 168.00 670.00 -30.00 70.00 7.00 3.30 0.0000 0.0000 0.0000 0.0000 0 0
+5894 2 """4CHERRYWOOD2""" 1.0770 0.00 1000.00 4190.00 -300.00 600.00 650.00 212.60 0.0000 0.0000 0.0000 0.0000 0 0
+5895 0 """4CRAWFORD--1""" 1.0371 0.00 0.00 0.00 0.00 0.00 64.00 28.00 0.0000 0.0000 0.0000 0.0000 0 0
+5896 2 """4DESJOACH--2""" 1.1740 0.00 370.00 590.00 -50.00 175.00 16.10 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+5897 2 """4DETWEILER-2""" 1.0550 0.00 0.00 230.00 -35.00 50.00 600.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+5898 2 """4DOBBIN----2""" 1.0510 0.00 222.00 -310.00 -50.00 75.00 160.00 65.60 0.0000 0.0000 0.0000 0.0000 0 0
+5899 2 """4DOUGLAS-PT2""" 1.1000 0.00 200.00 370.00 -50.00 80.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5900 0 """4EASTON-JCT2""" 1.0823 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5901 0 """4ESSA--230-2""" 1.0904 0.00 0.00 0.00 0.00 0.00 211.00 57.00 0.0000 0.0000 0.0000 0.0000 0 0
+5902 0 """4ESSEX-115-1""" 1.0395 0.00 0.00 0.00 0.00 0.00 84.00 -6.00 0.0000 0.0000 0.0000 0.0000 0 0
+5903 0 """4HANMER----5""" 1.0071 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 -2.1000 0.0000 0.0000 0 0
+5904 0 """4HANNON----2""" 1.0931 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5905 0 """4HANOVER---2""" 1.0859 0.00 0.00 0.00 0.00 0.00 172.20 38.20 0.0000 0.0000 0.0000 0.0000 0 0
+5906 0 """4HAWTHORNE-2""" 1.0613 0.00 0.00 0.00 0.00 0.00 400.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+5907 0 """4HINCHBROOK2""" 1.0640 0.00 0.00 0.00 0.00 0.00 300.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+5908 2 """4HOLDEN----2""" 1.1600 0.00 200.00 150.00 -50.00 90.00 96.00 25.00 0.0000 0.0000 0.0000 0.0000 0 0
+5909 0 """4KEITH-230-2""" 1.0658 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5910 2 """4KEITH-115-1""" 1.0383 0.00 60.00 -100.00 -10.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5911 0 """4KENT------1""" 0.9963 0.00 0.00 0.00 0.00 0.00 122.80 29.80 0.0000 0.0000 0.0000 0.0000 0 0
+5912 0 """4KLEINBURG-5""" 0.9713 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5913 0 """4KLEINBURG-2""" 1.0794 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5914 0 """4LAMBTON-345""" 1.0434 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5915 0 """4LAMBTON---2""" 1.1215 0.00 0.00 0.00 0.00 0.00 27.80 11.70 0.0000 0.0000 0.0000 0.0000 0 0
+5916 2 """4LAMBTON-.24""" 1.1750 0.00 1450.00 7430.00 -500.00 1080.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5917 0 """4LAUZON----2""" 1.0537 0.00 0.00 0.00 0.00 0.00 86.00 20.00 0.0000 0.0000 0.0000 0.0000 0 0
+5918 0 """4LAUZON----1""" 1.0421 0.00 0.00 0.00 0.00 0.00 124.70 16.20 0.0000 0.0000 0.0000 0.0000 0 0
+5919 0 """4LEASIDE---2""" 1.0681 0.00 0.00 0.00 0.00 0.00 500.00 150.00 0.0000 0.0000 0.0000 0.0000 0 0
+5920 0 """4-L-33-P---2""" 1.0530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5921 3 """4MANBY-----2""" 1.0650 0.00 726.60 450.00 0.00 0.00 950.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+5922 2 """4MARTINDALE2""" 1.1071 0.00 435.00 -500.00 -50.00 100.00 627.00 98.50 0.0000 0.0000 0.0000 0.0000 0 0
+5923 0 """4MERIVALE--2""" 0.9920 0.00 0.00 0.00 0.00 0.00 244.00 95.00 0.0000 0.0000 0.0000 0.0000 0 0
+5924 0 """4MIDDLEPORT2""" 1.1049 0.00 0.00 0.00 0.00 0.00 40.00 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+5925 0 """4MINDEN----2""" 1.1309 0.00 0.00 0.00 0.00 0.00 92.60 31.90 0.0000 0.0000 0.0000 0.0000 0 0
+5926 2 """4NANTICO---2""" 1.1570 0.00 1940.00 7680.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5927 2 """4NORTH-BAY-2""" 1.1500 0.00 245.00 -110.00 -50.00 100.00 27.20 11.90 0.0000 0.0000 0.0000 0.0000 0 0
+5928 0 """4NEALE-----2""" 1.0954 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5929 0 """4ORANGEVIL-2""" 1.0761 0.00 0.00 0.00 0.00 0.00 67.00 40.00 0.0000 0.0000 0.0000 0.0000 0 0
+5930 0 """4-PA-27-REG2""" 1.0521 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5931 0 """4PAUGAN----2""" 1.1278 0.00 0.00 0.00 0.00 0.00 8.30 2.50 0.0000 0.0000 0.0000 0.0000 0 0
+5932 0 """4PINARD----5""" 1.0473 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5933 2 """4PINARD----2""" 1.0400 0.00 550.00 600.00 -300.00 300.00 0.00 0.00 0.0000 -1.0470 0.0000 0.0000 0 0
+5934 0 """4PORCUPINE-5""" 1.0447 0.00 0.00 0.00 0.00 0.00 90.00 32.10 0.0000 0.0000 0.0000 0.0000 0 0
+5935 0 """4RICHVIEW--2""" 1.0681 0.00 0.00 0.00 0.00 0.00 800.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+5936 2 """4STLAWRENCE2""" 1.1139 0.00 744.00 3000.00 -100.00 300.00 250.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+5937 0 """4STLAWRENCE1""" 1.0058 0.00 0.00 0.00 0.00 0.00 49.50 21.00 0.0000 0.0000 0.0000 0.0000 0 0
+5938 0 """4STTHOMAS--1""" 1.0326 0.00 0.00 0.00 0.00 0.00 165.00 11.00 0.0000 0.0000 0.0000 0.0000 0 0
+5939 0 """4SANDWICH--2""" 1.0611 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5940 0 """4SAND.WEST-2""" 1.0622 0.00 0.00 0.00 0.00 0.00 114.80 51.60 0.0000 0.0000 0.0000 0.0000 0 0
+5941 0 """4SCOTT-----2""" 1.0961 0.00 0.00 0.00 0.00 0.00 160.00 41.70 0.0000 0.0000 0.0000 0.0000 0 0
+5942 0 """4SCOTT-----1""" 1.0396 0.00 0.00 0.00 0.00 0.00 169.50 36.20 0.0000 0.0000 0.0000 0.0000 0 0
+5943 0 """4WONDERLAND2""" 1.0664 0.00 0.00 0.00 0.00 0.00 79.30 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+5944 0 """5BAYSHORE-T3""" 1.0112 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5945 2 """5BAYSHORE-T1""" 1.0300 0.00 600.00 2680.00 -1000.00 1000.00 760.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+5946 2 """5LEMOYNE--T3""" 1.0120 0.00 0.00 1900.00 -1000.00 1000.00 175.00 90.80 0.0000 0.0000 0.0000 0.0000 0 0
+5947 0 """5BENTON-HBR3""" 1.0329 0.00 0.00 0.00 0.00 0.00 330.00 16.90 0.0000 0.0000 0.0000 0.0000 0 0
+5948 2 """5D.C.COOK--3""" 1.0300 0.00 2501.67 990.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5949 2 """5DUMONT----3""" 1.0300 0.00 850.00 5270.00 -1000.00 1000.00 167.00 50.00 0.0000 0.0000 0.0000 0.0000 0 0
+5950 2 """5E.LIMA----3""" 0.9900 0.00 80.00 860.00 -1000.00 1000.00 350.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+5951 2 """5FOSTORIA--3""" 1.0000 0.00 0.00 -490.00 -1000.00 1000.00 254.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+5952 2 """5OLIVE-----3""" 1.0200 0.00 0.00 -2130.00 -1000.00 1000.00 394.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+5953 2 """5ROBISON-PK3""" 0.9800 0.00 0.00 -630.00 -1000.00 1000.00 460.00 169.80 0.0000 0.0000 0.0000 0.0000 0 0
+5954 2 """5SORENSON--3""" 1.0000 0.00 163.00 850.00 -1000.00 1000.00 371.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+5955 2 """5TWIN-BRCH-3""" 1.0200 0.00 0.00 -1660.00 -1000.00 1000.00 700.00 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+5956 2 """5LEWISTON-Y2""" 1.0520 0.00 1209.10 -190.00 -200.00 420.00 654.10 -45.40 0.0000 0.0000 0.0000 0.0000 0 0
+5957 2 """5MOSSES---Y2""" 1.0500 0.00 400.00 620.00 0.00 130.00 505.90 96.60 0.0000 0.0000 0.0000 0.0000 0 0
+5958 2 """5PACKARD--Y2""" 1.0520 0.00 0.00 -160.00 -1000.00 100.00 641.40 -0.60 0.0000 0.0000 0.0000 0.0000 0 0
+5959 0 """ADAIR-------""" 1.0193 0.00 0.00 0.00 0.00 0.00 2.18 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+5960 0 """ADAMS-----40""" 1.0140 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+5961 0 """1AINSWORTH--""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.17 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+5962 0 """ALGONAC-----""" 1.0163 0.00 0.00 0.00 0.00 0.00 7.98 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+5963 0 """ALMONT------""" 0.9849 0.00 0.00 0.00 0.00 0.00 3.28 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+5964 0 """ANDERSON----""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.59 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+5965 0 """APPLEGATE---""" 0.9866 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5966 0 """ARGO--------""" 1.0307 0.00 0.00 0.00 0.00 0.00 23.02 3.93 0.0000 0.1200 0.0000 0.0000 0 0
+5967 0 """ARMADA------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.52 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+5968 0 """ARROWHEAD-40""" 1.0217 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5969 0 """ATTICA------""" 0.9842 0.00 0.00 0.00 0.00 0.00 1.34 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+5970 0 """AUBURN-HTS-1""" 1.0049 0.00 0.00 0.00 0.00 0.00 6.50 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+5971 0 """AVOCA-------""" 0.9930 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+5972 0 """AVON--------""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+5973 0 """BAD-AXE-40--""" 0.9987 0.00 0.00 0.00 0.00 0.00 6.13 2.12 0.0000 0.0660 0.0000 0.0000 0 0
+5974 0 """BALDWIN--EQ1""" 1.0224 0.00 0.00 0.00 0.00 0.00 8.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+5975 0 """BARNES-LAKE-""" 0.9888 0.00 0.00 0.00 0.00 0.00 2.20 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+5976 0 """1BARTLETT-CP""" 1.0119 0.00 0.00 0.00 0.00 0.00 7.40 5.87 0.0000 0.0000 0.0000 0.0000 0 0
+5977 0 """BAYPORT-----""" 0.9869 0.00 0.00 0.00 0.00 0.00 1.26 2.12 0.0000 0.0000 0.0000 0.0000 0 0
+5978 0 """BEAVER------""" 0.9956 0.00 0.00 0.00 0.00 0.00 0.17 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+5979 0 """BELLEVILLE--""" 1.0212 0.00 0.00 0.00 0.00 0.00 6.05 2.66 0.0000 0.0000 0.0000 0.0000 0 0
+5980 0 """BERLIN-FUT74""" 1.0348 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+5981 0 """BERNARD-----""" 0.9996 0.00 0.00 0.00 0.00 0.00 2.10 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+5982 0 """BINGHAM--EQ1""" 1.0029 0.00 0.00 0.00 0.00 0.00 3.28 1.49 0.0000 0.0480 0.0000 0.0000 0 0
+5983 0 """BLOOMFIELD40""" 1.0220 0.00 0.00 0.00 0.00 0.00 79.00 39.62 0.0000 0.0900 0.0000 0.0000 0 0
+5984 0 """BOND,MADRID-""" 1.0551 0.00 0.00 0.00 0.00 0.00 2.18 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+5985 0 """BREST-------""" 1.0358 0.00 0.00 0.00 0.00 0.00 5.04 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+5986 0 """BREWER------""" 1.0045 0.00 0.00 0.00 0.00 0.00 2.94 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+5987 0 """BRIGHTON----""" 1.0076 0.00 0.00 0.00 0.00 0.00 5.96 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+5988 0 """BROWN-CITY--""" 0.9725 0.00 0.00 0.00 0.00 0.00 3.28 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+5989 0 """BROWNSTOWN40""" 1.0348 0.00 0.00 0.00 0.00 0.00 36.46 24.76 0.0000 0.0000 0.0000 0.0000 0 0
+5990 0 """BRAY--------""" 0.9770 0.00 0.00 0.00 0.00 0.00 1.51 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+5991 0 """BRUCE---EQ1-""" 1.0034 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+5992 0 """BUNCE-CRK-40""" 1.0333 0.00 0.00 0.00 0.00 0.00 7.73 4.25 0.0000 0.0000 0.0000 0.0000 0 0
+5993 2 """BUNCE-CRK-24""" 1.0607 0.00 84.00 480.00 0.00 480.00 37.72 22.10 0.0000 0.0000 0.0000 0.0000 0 0
+5994 0 """CALUMET-----""" 0.9844 0.00 0.00 0.00 0.00 0.00 3.11 1.91 0.0000 0.0000 0.0000 0.0000 0 0
+5995 0 """CAMDEN-2,5--""" 1.0033 0.00 0.00 0.00 0.00 0.00 9.41 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+5996 0 """CAMPUS-1----""" 1.0279 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+5997 0 """CAMPUS-2----""" 1.0216 0.00 0.00 0.00 0.00 0.00 2.27 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+5998 0 """CAPAC-------""" 0.9880 0.00 0.00 0.00 0.00 0.00 3.11 1.38 0.0000 0.0660 0.0000 0.0000 0 0
+5999 0 """CARLETON----""" 1.0054 0.00 0.00 0.00 0.00 0.00 1.76 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+6000 0 """CARO-1------""" 1.0018 0.00 0.00 0.00 0.00 0.00 1.68 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+6001 0 """CARO-T.E.C.-""" 0.9962 0.00 0.00 0.00 0.00 0.00 1.76 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+6002 0 """CARPENTER---""" 1.0007 0.00 0.00 0.00 0.00 0.00 8.15 3.29 0.0000 0.1140 0.0000 0.0000 0 0
+6003 0 """CARSONVILLE-""" 0.9885 0.00 0.00 0.00 0.00 0.00 0.67 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+6004 0 """CARTER------""" 1.0069 0.00 0.00 0.00 0.00 0.00 15.04 7.54 0.0000 0.0000 0.0000 0.0000 0 0
+6005 0 """CASEVILLE---""" 0.9683 0.00 0.00 0.00 0.00 0.00 3.02 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+6006 0 """CASEY-------""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.18 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+6007 0 """CASS-CITY---""" 1.0011 0.00 0.00 0.00 0.00 0.00 5.04 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+6008 0 """CHERRY-HILL-""" 0.9566 0.00 0.00 0.00 0.00 0.00 0.92 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+6009 0 """CHESTERFLD-1""" 1.0264 0.00 0.00 0.00 0.00 0.00 3.95 0.53 0.0000 0.0480 0.0000 0.0000 0 0
+6010 0 """CHESTERFLD-2""" 1.0088 0.00 0.00 0.00 0.00 0.00 8.48 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+6011 0 """CHESTNUT-40-""" 1.0150 0.00 0.00 0.00 0.00 0.00 75.20 29.50 0.0000 0.3600 0.0000 0.0000 0 0
+6012 0 """CHILSON-----""" 1.0175 0.00 0.00 0.00 0.00 0.00 1.51 0.85 0.0000 0.0660 0.0000 0.0000 0 0
+6013 0 """CLARKSTON-2-""" 1.0013 0.00 0.00 0.00 0.00 0.00 4.70 3.40 0.0000 0.0660 0.0000 0.0000 0 0
+6014 0 """CLIFFORD----""" 0.9881 0.00 0.00 0.00 0.00 0.00 1.34 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+6015 0 """COATS-------""" 1.0093 0.00 0.00 0.00 0.00 0.00 3.36 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+6016 0 """CODY-40-----""" 1.0456 0.00 0.00 0.00 0.00 0.00 19.99 6.27 0.0000 0.1800 0.0000 0.0000 0 0
+6017 0 """COLFAX---EQ1""" 1.0885 0.00 14.00 40.00 0.00 0.00 4.87 2.55 0.0000 0.0480 0.0000 0.0000 0 0
+6018 0 """COLLIER----1""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+6019 0 """CLOTH-PR.-1-""" 1.0059 0.00 0.00 0.00 0.00 0.00 3.00 -0.37 0.0000 0.0000 0.0000 0.0000 0 0
+6020 0 """COLUMBIAVILE""" 0.9871 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6021 0 """COMMERCE-LK-""" 0.9872 0.00 0.00 0.00 0.00 0.00 6.05 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+6022 0 """CORTLAND-24-""" 1.0112 0.00 0.00 0.00 0.00 0.00 204.10 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+6023 0 """CROSWELL-EQ1""" 0.9883 0.00 0.00 0.00 0.00 0.00 5.96 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+6024 0 """CROWN-1-----""" 1.0243 0.00 0.00 0.00 0.00 0.00 10.16 0.32 0.0000 0.0900 0.0000 0.0000 0 0
+6025 0 """CROWN-2-----""" 0.9891 0.00 0.00 0.00 0.00 0.00 4.54 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+6026 0 """CULVER------""" 0.9954 0.00 0.00 0.00 0.00 0.00 8.57 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+6027 0 """CUSTER-24---""" 1.0216 0.00 14.00 40.00 0.00 0.00 61.40 33.15 0.0000 0.0000 0.0000 0.0000 0 0
+6028 0 """DADE-1------""" 1.0165 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+6029 0 """DADE-2------""" 1.0158 0.00 0.00 0.00 0.00 0.00 7.14 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+6030 0 """DARWIN-1----""" 1.0440 0.00 0.00 0.00 0.00 0.00 4.87 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+6031 0 """DARWIN-2----""" 1.0408 0.00 0.00 0.00 0.00 0.00 4.79 1.27 0.0000 0.0480 0.0000 0.0000 0 0
+6032 0 """DAVIS---EQ1-""" 0.9767 0.00 0.00 0.00 0.00 0.00 20.30 10.25 0.0000 0.0900 0.0000 0.0000 0 0
+6033 0 """DAYTON-40---""" 1.0256 0.00 5.00 10.00 0.00 0.00 5.71 2.97 0.0000 0.0660 0.0000 0.0000 0 0
+6034 0 """DECKR-+-ASPN""" 0.9878 0.00 0.00 0.00 0.00 0.00 2.52 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+6035 0 """DEWEY-2-----""" 0.9865 0.00 0.00 0.00 0.00 0.00 11.34 3.82 0.0000 0.0000 0.0000 0.0000 0 0
+6036 0 """DEXTER---EQ1""" 1.0348 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0480 0.0000 0.0000 0 0
+6037 0 """DILLARD-1---""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+6038 0 """DOVER-1-----""" 1.0030 0.00 0.00 0.00 0.00 0.00 3.78 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+6039 0 """DOVER-2-----""" 0.9997 0.00 0.00 0.00 0.00 0.00 3.19 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+6040 0 """DREXEL-2----""" 0.9883 0.00 0.00 0.00 0.00 0.00 9.24 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+6041 0 """DRYDEN------""" 0.9797 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+6042 0 """ECKLES-2----""" 0.9704 0.00 0.00 0.00 0.00 0.00 4.62 -0.74 0.0000 0.0000 0.0000 0.0000 0 0
+6043 0 """EDGEWATER---""" 0.9989 0.00 0.00 0.00 0.00 0.00 1.30 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+6044 0 """ELKTON------""" 0.9804 0.00 0.00 0.00 0.00 0.00 3.36 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+6045 0 """ELM-40------""" 1.0242 0.00 0.00 0.00 0.00 0.00 107.77 79.00 0.0000 0.2850 0.0000 0.0000 0 0
+6046 0 """EMERICK-1---""" 1.0099 0.00 0.00 0.00 0.00 0.00 8.82 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+6047 0 """EMMETT------""" 0.9925 0.00 0.00 0.00 0.00 0.00 1.01 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+6048 0 """ENGLISH-----""" 1.0024 0.00 0.00 0.00 0.00 0.00 1.68 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+6049 0 """ERIN40------""" 1.0115 0.00 0.00 0.00 0.00 0.00 103.40 41.50 0.0000 0.1800 0.0000 0.0000 0 0
+6050 0 """EVERGREEN-40""" 1.0364 0.00 0.00 0.00 0.00 0.00 213.20 82.90 0.0000 0.5100 0.0000 0.0000 0 0
+6051 0 """FAIRGROVE---""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.02 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+6052 0 """FALCON-1----""" 1.0232 0.00 0.00 0.00 0.00 0.00 9.32 6.12 0.0000 0.0000 0.0000 0.0000 0 0
+6053 0 """FALCON-2----""" 1.0207 0.00 0.00 0.00 0.00 0.00 7.56 4.99 0.0000 0.0000 0.0000 0.0000 0 0
+6054 0 """FISHER------""" 1.0370 0.00 0.00 0.00 0.00 0.00 5.96 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+6055 0 """FLAT-ROCK-1-""" 1.0195 0.00 0.00 0.00 0.00 0.00 1.68 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+6056 0 """FLEMING-----""" 1.0067 0.00 0.00 0.00 0.00 0.00 4.54 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+6057 0 """FORESTER----""" 0.9770 0.00 0.00 0.00 0.00 0.00 0.76 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+6058 0 """FRANK2---EQ1""" 0.9722 0.00 0.00 0.00 0.00 0.00 6.10 1.50 0.0000 0.0000 0.0000 0.0000 0 0
+6059 0 """FREEDOM-----""" 0.9954 0.00 0.00 0.00 0.00 0.00 1.10 0.12 0.0000 0.0000 0.0000 0.0000 0 0
+6060 0 """FRENCHLND-2-""" 1.0263 0.00 0.00 0.00 0.00 0.00 5.70 4.37 0.0000 0.1200 0.0000 0.0000 0 0
+6061 0 """FRISBIE-24--""" 1.0881 0.00 0.00 0.00 0.00 0.00 222.68 75.01 0.0000 0.0000 0.0000 0.0000 0 0
+6062 0 """FULLER-1----""" 1.0203 0.00 0.00 0.00 0.00 0.00 2.52 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+6063 0 """FULLER-2----""" 1.0257 0.00 0.00 0.00 0.00 0.00 2.44 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+6064 0 """GAGETOWN----""" 1.0203 0.00 0.00 0.00 0.00 0.00 1.18 0.42 0.0000 0.0480 0.0000 0.0000 0 0
+6065 0 """1GARNER-CP--""" 1.0195 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6066 0 """GENOA-40----""" 1.0191 0.00 0.00 0.00 0.00 0.00 12.94 6.37 0.0000 0.1800 0.0000 0.0000 0 0
+6067 0 """GLOBE-------""" 0.9892 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+6068 0 """GOODISON----""" 0.9861 0.00 0.00 0.00 0.00 0.00 7.56 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+6069 0 """GRAF--------""" 0.9961 0.00 0.00 0.00 0.00 0.00 0.84 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+6070 0 """HAMBURG-----""" 1.0440 0.00 0.00 0.00 0.00 0.00 2.44 0.64 0.0000 0.0660 0.0000 0.0000 0 0
+6071 0 """HANCOCK-40--""" 1.0036 0.00 100.81 190.00 0.00 0.00 29.57 15.62 0.0000 0.0000 0.0000 0.0000 0 0
+6072 0 """HANNAN-1---1""" 1.0048 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+6073 0 """HARTLAND----""" 0.9948 0.00 0.00 0.00 0.00 0.00 2.18 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+6074 0 """HEMLOCK-1---""" 1.0293 0.00 0.00 0.00 0.00 0.00 6.00 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+6075 0 """HEMLOCK-2---""" 1.0364 0.00 0.00 0.00 0.00 0.00 6.97 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+6076 2 """HINES-40----""" 0.9900 0.00 0.00 120.00 0.00 18.00 115.58 95.12 0.0000 0.3600 0.0000 0.0000 0 0
+6077 0 """HOBART-TAP--""" 1.0363 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6078 0 """HOBART------""" 1.0414 0.00 0.00 0.00 0.00 0.00 4.03 1.59 0.0000 0.0900 0.0000 0.0000 0 0
+6079 0 """HOWELL-2----""" 1.0160 0.00 0.00 0.00 0.00 0.00 3.95 1.81 0.0000 0.0660 0.0000 0.0000 0 0
+6080 0 """HUNTERS-CR40""" 1.0031 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6081 0 """IDA---------""" 1.0107 0.00 0.00 0.00 0.00 0.00 1.90 -0.12 0.0000 0.0000 0.0000 0.0000 0 0
+6082 0 """IMLAY-CITY--""" 0.9775 0.00 0.00 0.00 0.00 0.00 4.70 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+6083 0 """INLAND---EQ1""" 1.0137 0.00 0.00 0.00 0.00 0.00 5.80 3.51 0.0000 0.0000 0.0000 0.0000 0 0
+6084 0 """IRA---------""" 1.0238 0.00 0.00 0.00 0.00 0.00 2.10 0.85 0.0000 0.0480 0.0000 0.0000 0 0
+6085 0 """IRONTON-24--""" 1.0193 0.00 0.00 0.00 0.00 0.00 177.80 67.00 0.0000 0.0000 0.0000 0.0000 0 0
+6086 0 """IRVING------""" 0.9945 0.00 0.00 0.00 0.00 0.00 5.88 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6087 0 """JACKSON-RD.2""" 1.0346 0.00 0.00 0.00 0.00 0.00 1.01 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+6088 0 """JASPER------""" 1.0041 0.00 0.00 0.00 0.00 0.00 0.34 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+6089 0 """JORDAN-1----""" 0.9922 0.00 0.00 0.00 0.00 0.00 1.85 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+6090 0 """JOPLIN------""" 0.9903 0.00 0.00 0.00 0.00 0.00 0.76 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+6091 0 """KEEGO-2-----""" 0.9789 0.00 0.00 0.00 0.00 0.00 1.10 0.37 0.0000 0.0000 0.0000 0.0000 0 0
+6092 0 """KELLOGG-----""" 0.9988 0.00 0.00 0.00 0.00 0.00 3.78 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+6093 0 """1KENNETT-CP-""" 1.0198 0.00 0.00 0.00 0.00 0.00 17.90 8.37 0.0000 0.0000 0.0000 0.0000 0 0
+6094 0 """KIMBALL-----""" 1.0128 0.00 0.00 0.00 0.00 0.00 3.36 1.06 0.0000 0.0000 0.0000 0.0000 0 0
+6095 0 """KINDE-------""" 0.9840 0.00 0.00 0.00 0.00 0.00 1.01 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+6096 0 """KING-SEELEY-""" 1.0463 0.00 0.00 0.00 0.00 0.00 2.69 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+6097 0 """LAKEPORT----""" 1.0008 0.00 0.00 0.00 0.00 0.00 1.85 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+6098 0 """LAKEVILLE---""" 0.9976 0.00 0.00 0.00 0.00 0.00 1.09 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+6099 0 """LAPEER------""" 0.9933 0.00 0.00 0.00 0.00 0.00 3.78 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+6100 0 """LARK-40-----""" 1.0476 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6101 0 """LEE-40------""" 1.0183 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+6102 0 """LIMA--------""" 1.0187 0.00 0.00 0.00 0.00 0.00 2.18 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+6103 0 """LINCOLN-24--""" 0.9866 0.00 0.00 0.00 0.00 0.00 148.43 124.57 0.0000 0.5700 0.0000 0.0000 0 0
+6104 0 """LUZON-40----""" 1.0040 0.00 0.00 0.00 0.00 0.00 21.67 12.01 0.0000 0.0900 0.0000 0.0000 0 0
+6105 0 """MACOMB-40---""" 1.0194 0.00 0.00 0.00 0.00 0.00 132.00 96.50 0.0000 0.3600 0.0000 0.0000 0 0
+6106 0 """MARINE-CITY-""" 1.0387 0.00 0.00 0.00 0.00 0.00 5.21 0.53 0.0000 0.0660 0.0000 0.0000 0 0
+6107 0 """MARLETTE----""" 0.9794 0.00 0.00 0.00 0.00 0.00 5.29 1.70 0.0000 0.0480 0.0000 0.0000 0 0
+6108 0 """MAYBEE------""" 1.0091 0.00 0.00 0.00 0.00 0.00 1.26 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+6109 0 """MAYVILLE----""" 1.0032 0.00 0.00 0.00 0.00 0.00 2.02 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+6110 0 """MEADOW---EQ1""" 0.9943 0.00 0.00 0.00 0.00 0.00 2.27 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+6111 0 """MEDINA-40---""" 1.0197 0.00 0.00 0.00 0.00 0.00 45.80 21.50 0.0000 0.1800 0.0000 0.0000 0 0
+6112 0 """MELVIN------""" 0.9800 0.00 0.00 0.00 0.00 0.00 0.67 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+6113 0 """METAMORA----""" 0.9954 0.00 0.00 0.00 0.00 0.00 4.03 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+6114 0 """MILFORD-----""" 1.0033 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+6115 0 """MILLINGTON--""" 0.9808 0.00 0.00 0.00 0.00 0.00 2.35 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+6116 0 """MOHAWK-2----""" 0.9967 0.00 0.00 0.00 0.00 0.00 2.10 0.25 0.0000 0.0000 0.0000 0.0000 0 0
+6117 0 """MONARCH-----""" 1.0040 0.00 0.00 0.00 0.00 0.00 2.30 1.50 0.0000 0.0960 0.0000 0.0000 0 0
+6118 0 """1MONTCALM-CP""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6119 0 """MOTT-2------""" 1.0159 0.00 0.00 0.00 0.00 0.00 7.39 3.82 0.0000 0.0900 0.0000 0.0000 0 0
+6120 0 """NATIONAL-1--""" 0.9928 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+6121 0 """NATIONAL-2--""" 0.9997 0.00 0.00 0.00 0.00 0.00 1.43 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+6122 0 """NAVARRE-24--""" 1.0384 0.00 0.00 0.00 0.00 0.00 190.43 107.21 0.0000 0.8700 0.0000 0.0000 0 0
+6123 0 """NEFF--------""" 1.0012 0.00 0.00 0.00 0.00 0.00 5.71 2.23 0.0000 0.0000 0.0000 0.0000 0 0
+6124 0 """NELSON-MILS1""" 1.0263 0.00 0.00 0.00 0.00 0.00 2.94 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+6125 0 """NELSON-MILS2""" 1.0270 0.00 0.00 0.00 0.00 0.00 3.70 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+6126 0 """NEW-BALTMR-1""" 1.0231 0.00 0.00 0.00 0.00 0.00 2.10 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+6127 0 """NEW-BALTMR23""" 1.0237 0.00 0.00 0.00 0.00 0.00 4.28 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+6128 0 """NEW-BOSTON--""" 1.0111 0.00 0.00 0.00 0.00 0.00 1.93 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+6129 0 """NEWBURGH-40-""" 0.9673 0.00 0.00 0.00 0.00 0.00 147.42 102.95 0.0000 0.3000 0.0000 0.0000 0 0
+6130 0 """NEW-HAVEN-1-""" 1.0179 0.00 0.00 0.00 0.00 0.00 3.44 1.81 0.0000 0.0000 0.0000 0.0000 0 0
+6131 0 """NEW-HAVEN-2-""" 1.0220 0.00 0.00 0.00 0.00 0.00 2.69 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+6132 0 """NIXON-2-----""" 0.9768 0.00 0.00 0.00 0.00 0.00 11.09 5.52 0.0000 0.0000 0.0000 0.0000 0 0
+6133 0 """NOBLE-------""" 0.9863 0.00 0.00 0.00 0.00 0.00 16.97 9.14 0.0000 0.0000 0.0000 0.0000 0 0
+6134 0 """NORTH-BRANCH""" 0.9717 0.00 0.00 0.00 0.00 0.00 4.45 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+6135 2 """NORTHEAST-24""" 1.0104 0.00 80.00 0.00 0.00 48.00 230.24 141.20 0.0000 0.4800 0.0000 0.0000 0 0
+6136 0 """NORTH-SRVCTR""" 1.0050 0.00 0.00 0.00 0.00 0.00 5.80 4.36 0.0000 0.0000 0.0000 0.0000 0 0
+6137 2 """NORTHWEST-40""" 1.0044 0.00 0.00 0.00 0.00 18.00 209.70 76.40 0.0000 0.5480 0.0000 0.0000 0 0
+6138 0 """NORWAY-1----""" 0.9516 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+6139 0 """NORWAY-2-EQ1""" 0.9477 0.00 0.00 0.00 0.00 0.00 5.96 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+6140 0 """OAK-BEACH---""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.84 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+6141 0 """OLIVER------""" 0.9870 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6142 0 """OLYMPA-FUT75""" 0.9825 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6143 0 """OMAHA-1--EQ1""" 0.9473 0.00 0.00 0.00 0.00 0.00 10.08 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+6144 0 """OMAHA-2--EQ1""" 0.9465 0.00 0.00 0.00 0.00 0.00 9.58 3.61 0.0000 0.0000 0.0000 0.0000 0 0
+6145 0 """OPAL--------""" 1.0050 0.00 0.00 0.00 0.00 0.00 0.92 0.00 0.0000 0.0480 0.0000 0.0000 0 0
+6146 0 """OREGON-1----""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.38 2.97 0.0000 0.0000 0.0000 0.0000 0 0
+6147 0 """ORION-------""" 0.9925 0.00 0.00 0.00 0.00 0.00 5.46 2.02 0.0000 0.0660 0.0000 0.0000 0 0
+6148 0 """OTTER-LAKE--""" 0.9836 0.00 0.00 0.00 0.00 0.00 1.01 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+6149 0 """OWENDALE----""" 1.0049 0.00 0.00 0.00 0.00 0.00 0.92 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+6150 0 """OXFORD------""" 0.9965 0.00 0.00 0.00 0.00 0.00 6.89 3.72 0.0000 0.1200 0.0000 0.0000 0 0
+6151 0 """1PADDOCK-CP-""" 1.0220 0.00 0.00 0.00 0.00 0.00 4.30 2.75 0.0000 0.0000 0.0000 0.0000 0 0
+6152 0 """PAGE--------""" 0.9930 0.00 0.00 0.00 0.00 0.00 9.58 5.63 0.0000 0.0660 0.0000 0.0000 0 0
+6153 0 """PALMER-1----""" 0.9643 0.00 0.00 0.00 0.00 0.00 1.85 1.27 0.0000 0.0000 0.0000 0.0000 0 0
+6154 0 """PARKER-ROAD-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.64 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+6155 0 """PAUL-1------""" 1.0114 0.00 0.00 0.00 0.00 0.00 8.15 4.89 0.0000 0.0480 0.0000 0.0000 0 0
+6156 0 """PAUL-2,3----""" 1.0157 0.00 0.00 0.00 0.00 0.00 4.70 3.61 0.0000 0.0660 0.0000 0.0000 0 0
+6157 0 """PHOENIX-40--""" 1.0379 0.00 0.00 0.00 0.00 0.00 36.71 20.82 0.0000 0.0000 0.0000 0.0000 0 0
+6158 0 """PIEDMONT----""" 1.0235 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6159 0 """PIGEON------""" 0.9818 0.00 0.00 0.00 0.00 0.00 3.78 4.78 0.0000 0.0480 0.0000 0.0000 0 0
+6160 0 """PINCKNEY----""" 1.0442 0.00 0.00 0.00 0.00 0.00 3.86 1.70 0.0000 0.0900 0.0000 0.0000 0 0
+6161 0 """PIONEER---40""" 1.0270 0.00 0.00 0.00 0.00 0.00 19.10 10.12 0.0000 0.0000 0.0000 0.0000 0 0
+6162 0 """PIPER---EQ1-""" 1.0008 0.00 0.00 0.00 0.00 0.00 5.12 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+6163 0 """PITSFLD--EQ1""" 1.0164 0.00 0.00 0.00 0.00 0.00 9.66 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+6164 0 """PLACID------""" 1.0026 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6165 0 """PLYMOUTH----""" 0.9523 0.00 0.00 0.00 0.00 0.00 12.10 7.44 0.0000 0.1560 0.0000 0.0000 0 0
+6166 0 """PORT-AUSTIN-""" 0.9754 0.00 0.00 0.00 0.00 0.00 3.02 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+6167 0 """PORT-HOPE---""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+6168 0 """PORT-SANILAC""" 0.9808 0.00 0.00 0.00 0.00 0.00 1.09 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+6169 0 """PRICE-1-----""" 1.0353 0.00 0.00 0.00 0.00 0.00 4.37 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+6170 0 """PROCTOR-----""" 0.9955 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6171 0 """PUTNAM------""" 1.0098 0.00 14.00 40.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6172 0 """QUEEN-------""" 1.0065 0.00 0.00 0.00 0.00 0.00 3.53 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+6173 0 """QUINCY------""" 1.0030 0.00 0.00 0.00 0.00 0.00 1.34 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+6174 0 """RANDOLPH----""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6175 0 """RAVINE---EQ1""" 0.9764 0.00 0.00 0.00 0.00 0.00 8.90 3.62 0.0000 0.0000 0.0000 0.0000 0 0
+6176 0 """RED-RUN-40--""" 1.0203 0.00 0.00 0.00 0.00 0.00 140.87 71.29 0.0000 0.5400 0.0000 0.0000 0 0
+6177 0 """REESE---EQ2-""" 0.9799 0.00 0.00 0.00 0.00 0.00 5.96 2.23 0.0000 0.0480 0.0000 0.0000 0 0
+6178 0 """REMER-40----""" 1.0461 0.00 0.00 0.00 0.00 0.00 1.34 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6179 0 """RENO--------""" 0.9937 0.00 0.00 0.00 0.00 0.00 4.80 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+6180 0 """RICHMOND----""" 1.0130 0.00 0.00 0.00 0.00 0.00 5.63 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+6181 0 """RIFLE-------""" 0.9886 0.00 0.00 0.00 0.00 0.00 6.13 2.97 0.0000 0.0480 0.0000 0.0000 0 0
+6182 0 """RIVER-RAISIN""" 1.0072 0.00 0.00 0.00 0.00 0.00 0.92 -0.11 0.0000 0.0000 0.0000 0.0000 0 0
+6183 2 """RIVERVIEW-40""" 1.0021 0.00 25.00 -100.00 -10.00 20.00 145.57 79.69 0.0000 0.3600 0.0000 0.0000 0 0
+6184 0 """ROCHESTER-1-""" 0.9995 0.00 0.00 0.00 0.00 0.00 6.55 3.29 0.0000 0.0000 0.0000 0.0000 0 0
+6185 0 """ROCKWOOD----""" 1.0345 0.00 0.00 0.00 0.00 0.00 5.80 1.59 0.0000 0.0340 0.0000 0.0000 0 0
+6186 0 """ROMEO---EQ1-""" 1.0133 0.00 0.00 0.00 0.00 0.00 6.13 1.49 0.0000 0.0000 0.0000 0.0000 0 0
+6187 0 """ROMULUS---40""" 1.0151 0.00 0.00 0.00 0.00 0.00 20.66 13.07 0.0000 0.1680 0.0000 0.0000 0 0
+6188 0 """RUSH-TAP----""" 0.9835 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6189 0 """RUSH-40-----""" 1.0014 0.00 0.00 0.00 0.00 0.00 3.70 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+6190 0 """SALEM-------""" 1.0417 0.00 0.00 0.00 0.00 0.00 1.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+6191 0 """SALINE------""" 1.0017 0.00 0.00 0.00 0.00 0.00 9.10 4.87 0.0000 0.0960 0.0000 0.0000 0 0
+6192 0 """SANDUSKY-40-""" 1.0042 0.00 0.00 0.00 0.00 0.00 5.29 1.91 0.0000 0.0660 0.0000 0.0000 0 0
+6193 0 """SAXON-------""" 0.9916 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+6194 0 """SEBEWAING---""" 1.0083 0.00 0.00 0.00 0.00 0.00 0.92 0.11 0.0000 0.0480 0.0000 0.0000 0 0
+6195 0 """SELFRIDGE-1-""" 1.0074 0.00 0.00 0.00 0.00 0.00 3.78 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+6196 0 """SELKIRK-----""" 1.0092 0.00 0.00 0.00 0.00 0.00 6.05 3.08 0.0000 0.0000 0.0000 0.0000 0 0
+6197 0 """SHAW--------""" 0.9720 0.00 0.00 0.00 0.00 0.00 1.60 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+6198 0 """SHELDON-1---""" 0.9578 0.00 0.00 0.00 0.00 0.00 5.29 2.44 0.0000 0.0000 0.0000 0.0000 0 0
+6199 0 """SHERWOOD----""" 1.0148 0.00 0.00 0.00 0.00 0.00 1.93 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+6200 0 """SNOVER------""" 0.9929 0.00 0.00 0.00 0.00 0.00 1.60 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+6201 0 """SOUTHFLD-40-""" 1.0066 0.00 0.00 0.00 0.00 0.00 99.54 81.89 0.0000 0.0900 0.0000 0.0000 0 0
+6202 0 """STATE-1-----""" 1.0247 0.00 0.00 0.00 0.00 0.00 5.60 3.25 0.0000 0.0000 0.0000 0.0000 0 0
+6203 0 """SPOKANE-40--""" 1.0014 0.00 0.00 0.00 0.00 0.00 36.54 16.57 0.0000 0.0000 0.0000 0.0000 0 0
+6204 0 """ST-CLAIR-1--""" 1.0259 0.00 0.00 0.00 0.00 0.00 2.60 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+6205 0 """ST-CLAIR-2--""" 1.0352 0.00 0.00 0.00 0.00 0.00 2.69 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+6206 0 """STEPHENS-24-""" 1.0074 0.00 0.00 0.00 0.00 0.00 164.30 105.69 0.0000 0.5700 0.0000 0.0000 0 0
+6207 0 """STERLING-40-""" 1.0210 0.00 0.00 0.00 0.00 0.00 101.14 45.79 0.0000 0.5400 0.0000 0.0000 0 0
+6208 0 """STOCKBRIDGE-""" 1.0701 0.00 0.00 0.00 0.00 0.00 1.09 0.21 0.0000 0.0000 0.0000 0.0000 0 0
+6209 0 """1STOCKWELLCP""" 1.0172 0.00 0.00 0.00 0.00 0.00 10.90 6.75 0.0000 0.0000 0.0000 0.0000 0 0
+6210 0 """SUNSET-40---""" 1.0041 0.00 0.00 0.00 0.00 0.00 78.79 59.01 0.0000 0.5160 0.0000 0.0000 0 0
+6211 2 """SUPERIOR-40-""" 1.0189 0.00 0.00 0.00 0.00 118.00 61.49 48.74 0.0000 0.1800 0.0000 0.0000 0 0
+6212 0 """TIENKEN-2---""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6213 0 """TALBOT---EQ1""" 0.9854 0.00 0.00 0.00 0.00 0.00 2.35 0.85 0.0000 0.0000 0.0000 0.0000 0 0
+6214 0 """1TAYLOR-1-13""" 1.0121 0.00 0.00 0.00 0.00 0.00 10.67 6.27 0.0000 0.0000 0.0000 0.0000 0 0
+6215 0 """1TAYLOR-2-13""" 1.0154 0.00 0.00 0.00 0.00 0.00 8.65 6.48 0.0000 0.0000 0.0000 0.0000 0 0
+6216 0 """TEGGERDINE--""" 0.9815 0.00 0.00 0.00 0.00 0.00 11.34 4.67 0.0000 0.0000 0.0000 0.0000 0 0
+6217 0 """TEMPLE------""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.59 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+6218 0 """TEXAS-------""" 1.0281 0.00 0.00 0.00 0.00 0.00 0.50 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+6219 0 """TODD--------""" 1.0426 0.00 0.00 0.00 0.00 0.00 1.51 0.74 0.0000 0.0000 0.0000 0.0000 0 0
+6220 0 """TRINITY-2---""" 1.0107 0.00 0.00 0.00 0.00 0.00 4.70 2.34 0.0000 0.0000 0.0000 0.0000 0 0
+6221 0 """TROY-40-----""" 0.9963 0.00 0.00 0.00 0.00 0.00 178.92 77.64 0.0000 0.5400 0.0000 0.0000 0 0
+6222 0 """TUSCOLA-40--""" 1.0020 0.00 0.00 0.00 0.00 0.00 6.22 2.55 0.0000 0.0660 0.0000 0.0000 0 0
+6223 0 """UNION-LAKE--""" 0.9771 0.00 0.00 0.00 0.00 0.00 11.84 4.89 0.0000 0.0000 0.0000 0.0000 0 0
+6224 0 """UNIONVILLE--""" 1.0120 0.00 0.00 0.00 0.00 0.00 1.26 0.11 0.0000 0.0000 0.0000 0.0000 0 0
+6225 0 """UNIVR-BUS1T6""" 1.0250 0.00 0.00 0.00 0.00 0.00 11.17 8.71 0.0000 0.0000 0.0000 0.0000 0 0
+6226 0 """URBAN-TEC---""" 0.9887 0.00 0.00 0.00 0.00 0.00 5.12 3.19 0.0000 0.0000 0.0000 0.0000 0 0
+6227 0 """UTAH--------""" 1.0415 0.00 0.00 0.00 0.00 0.00 0.76 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+6228 0 """VANBUREN-EQ1""" 1.0128 0.00 0.00 0.00 0.00 0.00 1.51 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+6229 0 """VASSAR-BIRCH""" 0.9744 0.00 0.00 0.00 0.00 0.00 10.00 5.74 0.0000 0.0660 0.0000 0.0000 0 0
+6230 0 """VICTOR-40---""" 1.0234 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6231 0 """VALLEY------""" 1.0268 0.00 6.00 20.00 0.00 0.00 0.90 0.62 0.0000 0.0000 0.0000 0.0000 0 0
+6232 0 """WABASH-40---""" 1.0066 0.00 0.00 0.00 0.00 0.00 46.70 26.25 0.0000 0.0000 0.0000 0.0000 0 0
+6233 0 """WALLED-LAKE-""" 0.9972 0.00 0.00 0.00 0.00 0.00 6.00 2.62 0.0000 0.0000 0.0000 0.0000 0 0
+6234 0 """WALNUT-1,2--""" 0.9814 0.00 0.00 0.00 0.00 0.00 9.60 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+6235 0 """WALTON40-SUB""" 1.0330 0.00 0.00 0.00 0.00 0.00 44.35 20.08 0.0000 0.1800 0.0000 0.0000 0 0
+6236 0 """WARDLOW-----""" 0.9956 0.00 0.00 0.00 0.00 0.00 6.30 3.51 0.0000 0.0660 0.0000 0.0000 0 0
+6237 2 """WARREN-24---""" 1.0171 0.00 0.00 540.00 0.00 54.00 268.46 194.97 0.0000 0.9000 0.0000 0.0000 0 0
+6238 0 """WASHNGTN-EQ1""" 1.0002 0.00 0.00 0.00 0.00 0.00 8.57 4.36 0.0000 0.0660 0.0000 0.0000 0 0
+6239 0 """WATERFORD---""" 0.9903 0.00 0.00 0.00 0.00 0.00 17.81 5.52 0.0000 0.1800 0.0000 0.0000 0 0
+6240 0 """WEBERVLE-EQ1""" 1.0885 0.00 0.00 0.00 0.00 0.00 8.23 1.91 0.0000 0.1140 0.0000 0.0000 0 0
+6241 0 """WHITE-LAKE--""" 0.9941 0.00 0.00 0.00 0.00 0.00 4.70 1.59 0.0000 0.0000 0.0000 0.0000 0 0
+6242 0 """WHITMORE-LK-""" 1.0357 0.00 0.00 0.00 0.00 0.00 7.81 2.87 0.0000 0.0000 0.0000 0.0000 0 0
+6243 0 """WHITNY-FUT73""" 1.0033 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6244 0 """WILEY-------""" 1.0197 0.00 0.00 0.00 0.00 0.00 1.26 0.53 0.0000 0.0000 0.0000 0.0000 0 0
+6245 0 """WILMOTK-NGFD""" 0.9922 0.00 0.00 0.00 0.00 0.00 0.84 0.32 0.0000 0.0000 0.0000 0.0000 0 0
+6246 0 """WILSON------""" 1.0128 0.00 0.00 0.00 0.00 0.00 2.60 -0.21 0.0000 0.0000 0.0000 0.0000 0 0
+6247 0 """1WILSON-CP--""" 1.0157 0.00 0.00 0.00 0.00 0.00 8.60 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+6248 0 """WOLFHILL----""" 0.9897 0.00 0.00 0.00 0.00 0.00 4.96 1.17 0.0000 0.0000 0.0000 0.0000 0 0
+6249 0 """WOLVERINE-2-""" 1.0200 0.00 0.00 0.00 0.00 0.00 5.12 4.04 0.0000 0.0000 0.0000 0.0000 0 0
+6250 0 """WORTH-------""" 1.0069 0.00 0.00 0.00 0.00 0.00 2.18 0.42 0.0000 0.0000 0.0000 0.0000 0 0
+6251 0 """YALE-TAP----""" 0.9902 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6252 0 """YALE--------""" 0.9870 0.00 0.00 0.00 0.00 0.00 3.11 0.96 0.0000 0.0000 0.0000 0.0000 0 0
+6253 0 """YATES-------""" 0.9871 0.00 0.00 0.00 0.00 0.00 1.34 0.64 0.0000 0.0000 0.0000 0.0000 0 0
+6254 0 """YORK--------""" 0.9901 0.00 0.00 0.00 0.00 0.00 2.44 1.38 0.0000 0.0000 0.0000 0.0000 0 0
+6255 0 """YOST-40-----""" 1.0354 0.00 0.00 0.00 0.00 0.00 48.55 26.29 0.0000 0.0480 0.0000 0.0000 0 0
+6256 0 """2ADAMS-----1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6257 0 """2ALFRED----1""" 1.0468 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+6258 0 """ALFRED-13---""" 1.0489 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+6259 0 """2AMHERST1.13""" 1.0230 0.00 0.00 0.00 0.00 0.00 7.56 4.72 0.0000 0.0000 0.0000 0.0000 0 0
+6260 0 """2AMHERST2.13""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6261 0 """2ARROWHEAD-1""" 1.0315 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6262 0 """2BAD-AXE---1""" 1.0460 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6263 0 """2BLOOMFLD--1""" 1.0065 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6264 0 """2BROWNTN---3""" 1.0081 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6265 0 """2BROWNTN---2""" 1.0314 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6266 2 """2BROWNTN-N-1""" 1.0263 0.00 0.00 -910.00 -91.00 338.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6267 0 """2BROWNTN-S-1""" 1.0117 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6268 0 """2BUNCE-CK--1""" 1.1567 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6269 0 """2B3N-DECO230""" 1.0877 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6270 0 """2-BURNS-1--1""" 1.0578 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6271 0 """2-BURNS-2--1""" 1.0559 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6272 0 """2CANIFF----3""" 1.0261 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6273 0 """2CANIFF----1""" 1.0433 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6274 0 """2CATALINA-CP""" 1.0064 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6275 0 """2CATO------1""" 1.0403 0.00 0.00 0.00 0.00 0.00 57.14 27.68 0.0000 0.0000 0.0000 0.0000 0 0
+6276 0 """2CHESTNUT--1""" 1.0164 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6277 0 """2CODY------1""" 0.9887 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6278 2 """2CONNER-G.24""" 1.0404 0.00 285.00 1770.00 0.00 1770.00 436.28 182.01 0.0000 0.0000 0.0000 0.0000 0 0
+6279 0 """2COOPER----1""" 1.0059 0.00 0.00 0.00 0.00 0.00 1.34 2.31 0.0000 0.0000 0.0000 0.0000 0 0
+6280 0 """2CORTLAND--1""" 1.0392 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6281 0 """2COVENTRY--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6282 0 """2COVENTRY--1""" 0.9810 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6283 0 """2CRESTWOOD-1""" 1.0120 0.00 0.00 0.00 0.00 0.00 3.56 1.78 0.0000 0.0000 0.0000 0.0000 0 0
+6284 0 """2CUSTER----1""" 1.0051 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6285 0 """2C-3DECO-138""" 0.9752 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6286 0 """2DAYTON----1""" 0.9863 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6287 2 """2DELRAY-16-1""" 1.0200 0.00 72.00 350.00 0.00 54.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6288 2 """2DELRAY-G.24""" 1.0483 0.00 236.00 2320.00 0.00 2320.00 290.94 159.76 0.0000 0.0000 0.0000 0.0000 0 0
+6289 0 """2ELM-------1""" 1.0018 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6290 0 """2E.FERMI---1""" 0.9983 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6291 0 """2ERIN------1""" 1.0331 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6292 0 """2E-N-S-TAP11""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6293 0 """2E-N-S-TAP21""" 1.0345 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6294 2 """2ESSEX-----1""" 1.0543 0.00 274.00 0.00 0.00 140.00 0.00 0.00 0.0000 1.0800 0.0000 0.0000 0 0
+6295 0 """2EVERGREEN-1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6296 0 """2FLEETWD-1-1""" 1.0428 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6297 0 """2FLEETWD-2-1""" 1.0456 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6298 0 """2FLEETWD--13""" 1.0161 0.00 0.00 0.00 0.00 0.00 12.02 5.78 0.0000 0.0000 0.0000 0.0000 0 0
+6299 0 """2FOMOCO-C1-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+6300 0 """2FOMOCO-C2-1""" 1.0107 0.00 0.00 0.00 0.00 0.00 21.36 16.02 0.0000 0.0000 0.0000 0.0000 0 0
+6301 0 """2FRISBIE---1""" 1.0414 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6302 0 """2GENOA-----1""" 1.0124 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6303 0 """2HANCOCK---1""" 1.0042 0.00 82.00 210.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6304 2 """2HARB.BEA.-1""" 1.0597 0.00 114.00 -300.00 -30.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6305 0 """2HINES-----1""" 0.9897 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6306 0 """2HUNTER-CK.1""" 1.0432 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6307 0 """2IRONTON---1""" 1.0310 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6308 0 """2IRN-NA-RV-1""" 1.0272 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6309 0 """2IMLAY-1PUP1""" 1.0685 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6310 0 """2JEFFERSON-1""" 1.0257 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6311 0 """2KTT-DECO138""" 1.0748 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6312 0 """2LK.HURON1P1""" 1.1530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6313 0 """2LK.HURON2P1""" 1.1335 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6314 0 """2LAPEER----1""" 1.0390 0.00 0.00 0.00 0.00 0.00 7.83 2.85 0.0000 0.0000 0.0000 0.0000 0 0
+6315 0 """2LARK------1""" 0.9720 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6316 0 """2LEE-------1""" 1.1215 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6317 0 """2LINCOLN---1""" 1.0100 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6318 0 """2LN-NE-NW--1""" 1.0129 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6319 0 """2LOGAN-1---1""" 1.0326 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6320 0 """2LOGAN-1-.13""" 1.0161 0.00 0.00 0.00 0.00 0.00 8.54 2.49 0.0000 0.0000 0.0000 0.0000 0 0
+6321 0 """2LOGAN-2---1""" 1.0362 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6322 0 """2LOGAN-2-.13""" 1.0153 0.00 0.00 0.00 0.00 0.00 8.46 2.76 0.0000 0.0000 0.0000 0.0000 0 0
+6323 0 """2LONG-LK-1-1""" 1.0035 0.00 0.00 0.00 0.00 0.00 7.12 1.69 0.0000 0.0000 0.0000 0.0000 0 0
+6324 0 """2LONG-LK-2-1""" 1.0046 0.00 0.00 0.00 0.00 0.00 6.68 1.25 0.0000 0.0000 0.0000 0.0000 0 0
+6325 0 """2LUZON-----1""" 0.9694 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6326 0 """2LUZON-W.40D""" 0.9908 0.00 0.00 0.00 0.00 0.00 16.02 7.83 0.0000 0.0000 0.0000 0.0000 0 0
+6327 0 """2MACOMB----1""" 1.0576 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6328 2 """2MARYSVILLE1""" 1.1521 0.00 84.00 0.00 0.00 60.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6329 0 """2MAXWELL-1-1""" 1.0236 0.00 0.00 0.00 0.00 0.00 18.16 11.21 0.0000 0.0000 0.0000 0.0000 0 0
+6330 0 """2MAXWELL-2-1""" 1.0443 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6331 0 """2MCLOUTH-1-1""" 1.0222 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+6332 0 """2MCLOUTH-2-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 56.69 35.15 0.0000 0.0000 0.0000 0.0000 0 0
+6333 2 """2MCLOUTH-.24""" 1.0350 0.00 0.00 670.00 -30.00 100.00 108.22 48.42 0.0000 0.0000 0.0000 0.0000 0 0
+6334 0 """2MEDINA----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6335 0 """2MIDTOWN---1""" 1.0409 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6336 2 """2MONRO-1,2-3""" 1.0100 0.00 1290.95 -880.00 -182.00 803.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6337 2 """2MONRO-3,4-3""" 1.0105 0.00 470.00 -910.00 -91.00 528.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6338 0 """2MTCALM-CP-1""" 1.0065 0.00 0.00 0.00 0.00 0.00 78.59 31.06 0.0000 0.0000 0.0000 0.0000 0 0
+6339 0 """2NAVARRE---2""" 1.0244 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6340 0 """2NAVARRE---1""" 1.0256 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6341 0 """2NEWBURGH--1""" 0.9920 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6342 0 """2NOBLE-----1""" 0.9773 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6343 0 """2NORTHEAST-1""" 1.0287 0.00 54.00 140.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6344 0 """2N.E.STUB--1""" 1.0437 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6345 2 """2N.E.FLIK.24""" 1.0200 0.00 0.00 40.00 0.00 30.00 43.16 15.22 0.0000 0.0000 0.0000 0.0000 0 0
+6346 0 """2NORTHWEST-1""" 0.9962 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6347 0 """2PHOENIX---1""" 0.9654 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6348 0 """2PIONEER-TP1""" 0.9701 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6349 0 """2PIONEER---1""" 0.9633 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6350 0 """2PLACID----1""" 0.9882 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6351 0 """2PONTIAC---3""" 1.0328 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6352 0 """2PONTIAC---1""" 1.0213 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6353 0 """2RED-RUN---1""" 1.0352 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+6354 0 """2REMER-----1""" 1.1466 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6355 0 """2R.R.EQZR.-1""" 1.0352 0.00 0.00 0.00 0.00 0.00 60.52 37.47 0.0000 0.0000 0.0000 0.0000 0 0
+6356 2 """2R.ROUGE-1-1""" 1.0354 0.00 272.00 1880.00 0.00 188.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6357 2 """2R.ROUGE-2-1""" 1.0442 0.00 257.00 1980.00 0.00 198.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6358 2 """2R.ROUGE-3-1""" 1.0447 0.00 300.00 0.00 0.00 209.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6359 0 """2RIVERVU---1""" 1.0241 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6360 0 """2ROMULUS---1""" 1.0017 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6361 0 """2RUSH------1""" 1.0284 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6362 0 """2SANDUSKY--1""" 1.0989 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6363 0 """2SLOCUM----1""" 1.0153 0.00 14.00 40.00 0.00 0.00 57.49 27.86 0.0000 0.0000 0.0000 0.0000 0 0
+6364 0 """2SOUTHFLD--1""" 0.9895 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6365 0 """2SPOKANE---1""" 1.0200 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6366 2 """2ST-CLAIR--3""" 1.0433 0.00 498.00 0.00 0.00 215.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6367 2 """2ST-CL.1-3-1""" 1.1866 0.00 501.00 3220.00 0.00 322.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6368 2 """2ST-CL.4,5-1""" 1.1467 0.00 463.00 0.00 0.00 315.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6369 2 """2ST-CL.6---1""" 1.1194 0.00 322.00 0.00 0.00 190.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6370 0 """2STC-SP-STL1""" 1.0639 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6371 0 """2STEPHENS--3""" 1.0262 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6372 0 """2STEPHENS--1""" 1.0420 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6373 0 """2STERLING--1""" 1.0393 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6374 0 """2SUNSET----1""" 0.9976 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6375 0 """2SUPERIOR--1""" 0.9791 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6376 0 """2TAYLOR-1--1""" 1.0054 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6377 0 """2TAYLOR--2-1""" 1.0247 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6378 0 """2TEMPEST--CP""" 1.0062 0.00 0.00 0.00 0.00 0.00 11.84 3.92 0.0000 0.0000 0.0000 0.0000 0 0
+6379 2 """2TRENTN-NA-1""" 1.0300 0.00 278.00 2220.00 0.00 225.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6380 2 """2TRENTN-SU-1""" 1.0300 0.00 593.00 1450.00 0.00 303.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6381 0 """2TROY------1""" 1.0029 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6382 0 """2TUSCOLA---1""" 1.0236 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6383 0 """2VICTOR----1""" 1.0268 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6384 0 """2WABASH-TAP1""" 1.1463 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6385 0 """2WABASH----1""" 1.1431 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6386 0 """2WALTON----1""" 1.0096 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6387 0 """2WARREN----1""" 1.0148 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6388 0 """2WARREN-7--1""" 1.0400 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6389 0 """2WATERMAN--2""" 1.0227 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6390 0 """2WATERMAN--1""" 1.0418 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6391 0 """2WAT.EQZR.24""" 1.0311 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6392 0 """2WAYNE-----3""" 1.0091 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6393 0 """2WAYNE-----1""" 0.9963 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6394 0 """2WHEELER---1""" 1.0040 0.00 0.00 0.00 0.00 0.00 24.21 15.04 0.0000 0.0000 0.0000 0.0000 0 0
+6395 0 """2WILLOW-1T-1""" 0.9847 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6396 0 """2WILLOW-2T-1""" 0.9880 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6397 0 """2WILLO-RUN-1""" 0.9811 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6398 0 """2WILLOW--.13""" 0.9992 0.00 0.00 0.00 0.00 0.00 41.83 23.67 0.0000 0.0000 0.0000 0.0000 0 0
+6399 0 """2WIXOM-----3""" 1.0194 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6400 0 """2WIXOM-----1""" 1.0035 0.00 0.00 0.00 0.00 0.00 10.86 5.25 0.0000 0.0000 0.0000 0.0000 0 0
+6401 0 """2WOODHVN-1-1""" 1.0278 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6402 0 """2WOODHVN1.13""" 1.0229 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+6403 0 """2WDHVN-TP2-1""" 1.0248 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6404 0 """2WOODHVN-2-1""" 1.0240 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6405 0 """2WOODHVN2.13""" 1.0124 0.00 0.00 0.00 0.00 0.00 8.81 6.85 0.0000 0.0000 0.0000 0.0000 0 0
+6406 0 """2YOST------1""" 0.9947 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.5400 0.0000 0.0000 0 0
+6407 0 """3ALBA-TIE--1""" 1.1233 0.00 0.00 0.00 0.00 0.00 2.50 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+6408 0 """3ALCONA-D--1""" 1.1170 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6409 0 """3ALGOMA----1""" 1.0365 0.00 0.00 0.00 0.00 0.00 14.00 -1.10 0.0000 0.0000 0.0000 0.0000 0 0
+6410 0 """3ALMA------1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.40 2.10 0.0000 0.1000 0.0000 0.0000 0 0
+6411 0 """3ALMEDA----1""" 1.0459 0.00 0.00 0.00 0.00 0.00 14.10 4.30 0.0000 0.0215 0.0000 0.0000 0 0
+6412 0 """3ALPENA----1""" 1.1632 0.00 0.00 0.00 0.00 0.00 33.10 5.20 0.0000 0.2880 0.0000 0.0000 0 0
+6413 0 """3AMBER-----1""" 1.0260 0.00 0.00 0.00 0.00 0.00 19.00 15.60 0.0000 0.0000 0.0000 0.0000 0 0
+6414 0 """3ARGENTA---3""" 1.0555 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6415 0 """3ARGENTA---1""" 1.0537 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6416 0 """3A-1CPCO-120""" 1.0327 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6417 0 """3BANGOR----1""" 1.0383 0.00 0.00 0.00 0.00 0.00 8.60 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6418 0 """3BARD-RD---1""" 1.0831 0.00 0.00 0.00 0.00 0.00 6.30 1.20 0.0000 0.0000 0.0000 0.0000 0 0
+6419 0 """3BARRY-----1""" 1.0416 0.00 0.00 0.00 0.00 0.00 27.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+6420 0 """3BASS-CRK--1""" 1.0389 0.00 0.00 0.00 0.00 0.00 17.80 3.20 0.0000 0.0000 0.0000 0.0000 0 0
+6421 0 """3BATAVIA---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 23.20 0.10 0.0000 0.0800 0.0000 0.0000 0 0
+6422 0 """3BEALS-RD.-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 146.80 48.60 0.0000 0.1500 0.0000 0.0000 0 0
+6423 0 """3BEECHER---1""" 1.0185 0.00 0.00 0.00 0.00 0.00 61.40 30.10 0.0000 0.0800 0.0000 0.0000 0 0
+6424 0 """3BEGOLE----1""" 1.0444 0.00 0.00 0.00 0.00 0.00 19.70 2.50 0.0000 0.1530 0.0000 0.0000 0 0
+6425 0 """3BEVERIDGE-1""" 1.0238 0.00 0.00 0.00 0.00 0.00 50.90 24.30 0.0000 0.1388 0.0000 0.0000 0 0
+6426 2 """3BIG-ROCK--1""" 1.1480 0.00 50.00 -140.00 -14.00 28.00 0.00 0.00 0.0000 0.0116 0.0000 0.0000 0 0
+6427 0 """3BINGHAM---1""" 1.0446 0.00 0.00 0.00 0.00 0.00 17.60 -7.80 0.0000 0.1928 0.0000 0.0000 0 0
+6428 0 """3BLACK-RIV-1""" 1.0462 0.00 0.00 0.00 0.00 0.00 49.90 8.50 0.0000 0.0000 0.0000 0.0000 0 0
+6429 0 """3BLACKSTON-1""" 1.0188 0.00 0.00 200.00 0.00 0.00 83.10 22.00 0.0000 0.0800 0.0000 0.0000 0 0
+6430 0 """3BOARDMAN--1""" 1.0825 0.00 2.00 0.00 0.00 0.00 27.80 16.10 0.0000 0.1042 0.0000 0.0000 0 0
+6431 0 """3BUICK-STEW1""" 1.0363 0.00 0.00 0.00 0.00 0.00 40.50 17.10 0.0000 0.0000 0.0000 0.0000 0 0
+6432 0 """3BULLOCK---1""" 1.0269 0.00 0.00 0.00 0.00 0.00 37.10 37.10 0.0000 0.1578 0.0000 0.0000 0 0
+6433 2 """3CAMPBELL--1""" 1.0554 0.00 584.00 0.00 0.00 390.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6434 0 """3CEMENT-CY-1""" 1.0188 0.00 0.00 0.00 0.00 0.00 28.00 -0.20 0.0000 0.1000 0.0000 0.0000 0 0
+6435 0 """3CHASE-----1""" 1.0429 0.00 0.00 0.00 0.00 0.00 4.90 2.20 0.0000 0.0000 0.0000 0.0000 0 0
+6436 0 """3CLAIRMONT-1""" 1.0230 0.00 0.00 0.00 0.00 0.00 73.60 28.60 0.0000 0.1646 0.0000 0.0000 0 0
+6437 0 """3CLEVELAND-1""" 1.0356 0.00 0.00 0.00 0.00 0.00 32.90 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+6438 2 """3COBB------1""" 1.0400 0.00 476.00 40.00 0.00 421.00 79.30 35.60 0.0000 0.0000 0.0000 0.0000 0 0
+6439 0 """3CORK-ST.--1""" 1.0494 0.00 0.00 0.00 0.00 0.00 17.00 7.20 0.0000 0.0000 0.0000 0.0000 0 0
+6440 0 """3CORNELL---1""" 1.0290 0.00 0.00 0.00 0.00 0.00 33.30 12.00 0.0000 0.1981 0.0000 0.0000 0 0
+6441 0 """3COTTEGE-GR1""" 1.0738 0.00 0.00 0.00 0.00 0.00 1.70 0.70 0.0000 0.0000 0.0000 0.0000 0 0
+6442 0 """3CROTON----1""" 1.0342 0.00 29.00 0.00 0.00 0.00 10.40 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+6443 0 """3DEAN-RD.--1""" 1.0521 0.00 0.00 0.00 0.00 0.00 3.60 1.70 0.0000 0.0000 0.0000 0.0000 0 0
+6444 0 """3DEJA------1""" 1.0414 0.00 0.00 0.00 0.00 0.00 13.80 -2.50 0.0000 0.0000 0.0000 0.0000 0 0
+6445 0 """3DELANEY---1""" 1.0469 0.00 0.00 0.00 0.00 0.00 64.80 25.10 0.0000 0.2698 0.0000 0.0000 0 0
+6446 0 """3DELH1-----1""" 1.0442 0.00 0.00 0.00 0.00 0.00 36.90 -10.00 0.0000 0.2783 0.0000 0.0000 0 0
+6447 0 """3DORT------1""" 1.0425 0.00 0.00 0.00 0.00 0.00 106.40 37.90 0.0000 0.4626 0.0000 0.0000 0 0
+6448 0 """3DOW-CHLOR.1""" 1.0243 0.00 0.00 0.00 0.00 0.00 49.00 24.00 0.0000 0.0000 0.0000 0.0000 0 0
+6449 0 """3DU-PONTE--1""" 1.0355 0.00 0.00 0.00 0.00 0.00 2.20 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6450 0 """3D-4CPCO-120""" 1.0444 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6451 0 """3EDENVILLE-1""" 1.0405 0.00 0.00 0.00 0.00 0.00 7.10 -4.70 0.0000 0.0000 0.0000 0.0000 0 0
+6452 2 """3ELM-STREET1""" 1.0444 0.00 29.00 0.00 0.00 7.00 32.70 23.30 0.0000 0.0000 0.0000 0.0000 0 0
+6453 0 """3EMMET-----1""" 1.1457 0.00 0.00 0.00 0.00 0.00 21.00 3.90 0.0000 0.0000 0.0000 0.0000 0 0
+6454 0 """3EUREKA----1""" 1.0398 0.00 0.00 0.00 0.00 0.00 21.90 5.40 0.0000 0.0000 0.0000 0.0000 0 0
+6455 0 """3FELCH-RD.-1""" 1.0331 0.00 0.00 0.00 0.00 0.00 14.00 5.90 0.0000 0.0000 0.0000 0.0000 0 0
+6456 0 """3FISHER----1""" 1.0445 0.00 0.00 0.00 0.00 0.00 14.10 4.60 0.0000 0.0000 0.0000 0.0000 0 0
+6457 0 """3FOUNDRY---1""" 1.0316 0.00 0.00 0.00 0.00 0.00 31.70 4.50 0.0000 0.0000 0.0000 0.0000 0 0
+6458 0 """3FOUR-MILE-1""" 1.0406 0.00 2.00 0.00 0.00 0.00 111.80 32.80 0.0000 0.1000 0.0000 0.0000 0 0
+6459 0 """3GARFIELD--1""" 1.0354 0.00 0.00 0.00 0.00 0.00 72.20 32.00 0.0000 0.0353 0.0000 0.0000 0 0
+6460 2 """3GAYLORD---1""" 1.1519 0.00 60.00 0.00 0.00 15.00 10.10 1.90 0.0000 0.0826 0.0000 0.0000 0 0
+6461 0 """3GENOA-----1""" 1.0678 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6462 0 """3GLEANER---1""" 1.0283 0.00 0.00 0.00 0.00 0.00 18.80 6.90 0.0000 0.0000 0.0000 0.0000 0 0
+6463 0 """3GREY-IRON-1""" 1.0221 0.00 0.00 0.00 0.00 0.00 53.50 17.50 0.0000 0.0000 0.0000 0.0000 0 0
+6464 0 """3HALSEY----1""" 1.0458 0.00 0.00 0.00 0.00 0.00 20.40 3.80 0.0000 0.1148 0.0000 0.0000 0 0
+6465 0 """3HARDY-DAM-1""" 1.0343 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6466 0 """3HAZELWOOD-1""" 1.0525 0.00 0.00 0.00 0.00 0.00 39.10 7.20 0.0000 0.0400 0.0000 0.0000 0 0
+6467 0 """3HEMPHILL--1""" 1.0447 0.00 0.00 0.00 0.00 0.00 134.10 62.70 0.0000 0.6928 0.0000 0.0000 0 0
+6468 0 """3HIGGINS---1""" 1.1065 0.00 0.00 0.00 0.00 0.00 18.90 2.80 0.0000 0.0000 0.0000 0.0000 0 0
+6469 0 """3HODENPYL--1""" 1.0686 0.00 0.00 0.00 0.00 0.00 8.40 -0.80 0.0000 0.0000 0.0000 0.0000 0 0
+6470 0 """3HOLLAN-RD-1""" 1.0168 0.00 0.00 0.00 0.00 0.00 42.80 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+6471 0 """3HOOKER----1""" 1.0348 0.00 0.00 0.00 0.00 0.00 26.40 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6472 0 """3HUGHES-RD-1""" 1.0377 0.00 0.00 0.00 0.00 0.00 21.80 4.80 0.0000 0.0000 0.0000 0.0000 0 0
+6473 0 """3IOSCO-----1""" 1.1238 0.00 19.00 0.00 0.00 0.00 12.80 5.70 0.0000 0.0263 0.0000 0.0000 0 0
+6474 0 """3ISLAND-RD-1""" 1.0435 0.00 0.00 0.00 0.00 0.00 29.20 -2.90 0.0000 0.1086 0.0000 0.0000 0 0
+6475 2 """3KARN------1""" 1.0563 0.00 498.00 0.00 0.00 337.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6476 0 """3KENOWA----3""" 1.0865 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6477 0 """3LATSON----1""" 1.0558 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6478 0 """3LAWNDALE--1""" 1.0265 0.00 0.00 0.00 0.00 0.00 39.90 17.00 0.0000 0.0000 0.0000 0.0000 0 0
+6479 0 """3LAYTON----1""" 1.0246 0.00 0.00 0.00 0.00 0.00 16.10 1.80 0.0000 0.0000 0.0000 0.0000 0 0
+6480 0 """3LEWISTON--1""" 1.1462 0.00 0.00 0.00 0.00 0.00 2.60 0.80 0.0000 0.0000 0.0000 0.0000 0 0
+6481 0 """3LINBERGH--1""" 1.0424 0.00 0.00 0.00 0.00 0.00 42.40 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+6482 0 """3LOOK-GLAS-1""" 1.0411 0.00 0.00 0.00 0.00 0.00 25.30 -3.20 0.0000 0.0000 0.0000 0.0000 0 0
+6483 0 """3LOUD------1""" 1.1048 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0040 0.0000 0.0000 0 0
+6484 2 """3LUDINGTON-3""" 1.0978 0.00 0.00 0.00 0.00 200.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6485 0 """3MALLEABLE-1""" 1.0211 0.00 0.00 0.00 0.00 0.00 61.50 17.20 0.0000 0.0000 0.0000 0.0000 0 0
+6486 0 """3MARQUETTE-1""" 1.0444 0.00 2.00 0.00 0.00 0.00 17.80 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+6487 0 """3MECOSTA---1""" 1.0370 0.00 0.00 0.00 0.00 0.00 15.90 3.60 0.0000 0.0000 0.0000 0.0000 0 0
+6488 0 """3MEDUSA----1""" 1.1103 0.00 0.00 0.00 0.00 0.00 11.50 1.60 0.0000 0.0000 0.0000 0.0000 0 0
+6489 0 """3MILES-RD.-1""" 1.1103 0.00 0.00 0.00 0.00 0.00 7.70 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+6490 0 """3MILHAM----1""" 1.0437 0.00 0.00 0.00 0.00 0.00 36.30 9.60 0.0000 0.1413 0.0000 0.0000 0 0
+6491 0 """3MIO-------1""" 1.1407 0.00 9.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.2067 0.0000 0.0000 0 0
+6492 0 """3MONITOR---1""" 1.0319 0.00 0.00 0.00 0.00 0.00 41.40 14.30 0.0000 0.0503 0.0000 0.0000 0 0
+6493 0 """3MOORE-RD--1""" 0.9940 0.00 0.00 0.00 0.00 0.00 40.80 10.60 0.0000 0.0000 0.0000 0.0000 0 0
+6494 2 """3MORROW----1""" 1.0500 0.00 130.00 0.00 0.00 168.00 80.20 31.20 0.0000 0.1836 0.0000 0.0000 0 0
+6495 0 """3MUSKEGN-HT1""" 1.0212 0.00 0.00 0.00 0.00 0.00 72.90 52.50 0.0000 0.0000 0.0000 0.0000 0 0
+6496 0 """3NODULAR---1""" 1.0228 0.00 0.00 0.00 0.00 0.00 34.40 16.80 0.0000 0.0000 0.0000 0.0000 0 0
+6497 0 """3N.BELDING-1""" 1.0422 0.00 0.00 0.00 0.00 0.00 20.70 -2.30 0.0000 0.1000 0.0000 0.0000 0 0
+6498 0 """3OAKLAND---1""" 1.0467 0.00 0.00 0.00 0.00 0.00 17.80 5.80 0.0000 0.0000 0.0000 0.0000 0 0
+6499 0 """3OGEMAW----1""" 1.0698 0.00 0.00 0.00 0.00 0.00 11.90 -7.50 0.0000 0.0000 0.0000 0.0000 0 0
+6500 0 """3OWOSSO----1""" 1.0282 0.00 0.00 0.00 0.00 0.00 29.20 10.40 0.0000 0.0000 0.0000 0.0000 0 0
+6501 0 """3PAGE------1""" 1.0180 0.00 0.00 0.00 0.00 0.00 45.80 5.40 0.0000 0.0800 0.0000 0.0000 0 0
+6502 2 """3PALISADES-3""" 1.0392 0.00 701.70 0.00 0.00 418.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6503 0 """3PASEDENA--1""" 1.0263 0.00 0.00 0.00 0.00 0.00 48.70 20.90 0.0000 0.0000 0.0000 0.0000 0 0
+6504 0 """3PENN-DIXIE1""" 1.1463 0.00 0.00 0.00 0.00 0.00 6.60 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+6505 0 """3PT.CALCIT-1""" 1.1721 0.00 0.00 0.00 0.00 0.00 9.40 3.00 0.0000 0.0000 0.0000 0.0000 0 0
+6506 0 """3RAISIN----1""" 1.0280 0.00 0.00 0.00 0.00 0.00 21.10 8.80 0.0000 0.0000 0.0000 0.0000 0 0
+6507 0 """3RICE-CREK-1""" 1.0323 0.00 0.00 0.00 0.00 0.00 29.10 1.20 0.0000 0.2540 0.0000 0.0000 0 0
+6508 0 """3RIFLE-RIV.1""" 1.0698 0.00 0.00 0.00 0.00 0.00 2.40 0.60 0.0000 0.0000 0.0000 0.0000 0 0
+6509 2 """3RIGGSVIL--1""" 1.1813 0.00 25.00 0.00 0.00 6.00 22.30 2.50 0.0000 0.1838 0.0000 0.0000 0 0
+6510 0 """3RIVERVIEW-1""" 1.0513 0.00 0.00 0.00 0.00 0.00 79.60 28.70 0.0000 0.3312 0.0000 0.0000 0 0
+6511 0 """3ROCKPORT--1""" 1.1679 0.00 0.00 0.00 0.00 0.00 1.00 0.20 0.0000 0.0000 0.0000 0.0000 0 0
+6512 0 """3RONDO-----1""" 1.1683 0.00 0.00 0.00 0.00 0.00 3.40 1.10 0.0000 0.0000 0.0000 0.0000 0 0
+6513 0 """3SAGNAW-R.-1""" 1.0316 0.00 0.00 0.00 0.00 0.00 63.80 32.80 0.0000 0.1568 0.0000 0.0000 0 0
+6514 0 """3SAMARIA---1""" 1.0341 0.00 0.00 0.00 0.00 0.00 23.10 10.70 0.0000 0.0000 0.0000 0.0000 0 0
+6515 0 """3SCOTT-LK.-1""" 1.0470 0.00 0.00 0.00 0.00 0.00 17.10 5.70 0.0000 0.0000 0.0000 0.0000 0 0
+6516 0 """3SPAULDING-1""" 1.0412 0.00 0.00 0.00 0.00 0.00 70.40 16.20 0.0000 0.0800 0.0000 0.0000 0 0
+6517 0 """3SPRUCE----1""" 1.1468 0.00 0.00 0.00 0.00 0.00 4.40 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+6518 0 """3STAMPG-PLT1""" 1.0446 0.00 0.00 0.00 0.00 0.00 11.60 3.80 0.0000 0.0000 0.0000 0.0000 0 0
+6519 0 """3STRONACH--1""" 1.0397 0.00 0.00 0.00 0.00 0.00 21.20 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+6520 0 """3STOVER----1""" 1.1154 0.00 0.00 0.00 0.00 0.00 6.60 3.40 0.0000 0.0000 0.0000 0.0000 0 0
+6521 0 """3SUMMERTON-1""" 1.0218 0.00 0.00 0.00 0.00 0.00 24.20 -2.10 0.0000 0.0000 0.0000 0.0000 0 0
+6522 0 """3TALLMADGE-3""" 1.0815 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6523 0 """3TALLMADGE-1""" 1.0662 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6524 0 """3THETFORD--3""" 1.0579 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6525 2 """3THETFORD--1""" 1.0516 0.00 146.00 0.00 0.00 36.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6526 0 """3TITTABAW--3""" 1.0615 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6527 0 """3TITTABAW--1""" 1.0321 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6528 0 """3TIPPY-DAM-1""" 1.0648 0.00 29.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.1255 0.0000 0.0000 0 0
+6529 0 """3TOMPKINS--3""" 1.0449 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6530 0 """3TUSC.TAP.-1""" 1.0626 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6531 0 """3TWINING---1""" 1.0667 0.00 0.00 0.00 0.00 0.00 8.70 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+6532 0 """3UPJOHN----1""" 1.0441 0.00 0.00 0.00 0.00 0.00 21.80 8.60 0.0000 0.0000 0.0000 0.0000 0 0
+6533 2 """3VERONA----1""" 1.0467 0.00 29.00 0.00 0.00 7.00 78.70 10.40 0.0000 0.4710 0.0000 0.0000 0 0
+6534 0 """3VEVAY-----1""" 1.0358 0.00 0.00 0.00 0.00 0.00 18.30 2.00 0.0000 0.0000 0.0000 0.0000 0 0
+6535 0 """3WACKERLY--1""" 1.0295 0.00 0.00 0.00 0.00 0.00 29.80 9.70 0.0000 0.0000 0.0000 0.0000 0 0
+6536 0 """3WARREN----1""" 1.0665 0.00 0.00 0.00 0.00 0.00 19.20 14.60 0.0000 0.3967 0.0000 0.0000 0 0
+6537 0 """3WASHTENAW-1""" 1.0009 0.00 0.00 0.00 0.00 0.00 16.90 -3.00 0.0000 0.0000 0.0000 0.0000 0 0
+6538 2 """3WEADOCK-B-1""" 1.0400 0.00 299.00 90.00 0.00 226.00 35.70 15.30 0.0000 0.0330 0.0000 0.0000 0 0
+6539 2 """3WEADOCK-W-1""" 1.0476 0.00 319.00 0.00 0.00 191.00 36.60 15.30 0.0000 0.0000 0.0000 0.0000 0 0
+6540 0 """3WEALTHY---1""" 1.0461 0.00 0.00 0.00 0.00 0.00 116.80 51.00 0.0000 0.0000 0.0000 0.0000 0 0
+6541 0 """3WEXFORD---1""" 1.0784 0.00 0.00 0.00 0.00 0.00 24.60 -4.50 0.0000 0.0990 0.0000 0.0000 0 0
+6542 0 """3WHITE-LK.-1""" 1.0342 0.00 9.00 0.00 0.00 0.00 11.80 6.80 0.0000 0.0000 0.0000 0.0000 0 0
+6543 2 """3WHITING---1""" 1.0500 0.00 331.00 900.00 0.00 206.00 14.30 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6544 0 """3WILLARD---1""" 1.0411 0.00 0.00 0.00 0.00 0.00 23.60 3.70 0.0000 0.0000 0.0000 0.0000 0 0
+6545 0 """4ALLANBURG-2""" 1.1270 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6546 0 """4BEACH-----2""" 1.0829 0.00 0.00 0.00 0.00 0.00 256.30 104.70 0.0000 0.0000 0.0000 0.0000 0 0
+6547 2 """4BEAUHARN--2""" 1.1266 0.00 600.00 500.00 -25.00 50.00 19.70 8.00 0.0000 0.0000 0.0000 0.0000 0 0
+6548 2 """4BECK------2""" 1.1280 0.00 1011.00 1890.00 -100.00 600.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6549 0 """4-BP-76-REG2""" 1.0551 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6550 0 """4BROCKVILLE2""" 1.0779 0.00 0.00 0.00 0.00 0.00 76.90 31.50 0.0000 0.0000 0.0000 0.0000 0 0
+6551 0 """4BUCHANNAN-2""" 1.0643 0.00 0.00 0.00 0.00 0.00 600.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+6552 2 """4BUCHANNAN-1""" 1.0472 0.00 0.00 -250.00 -25.00 200.00 326.80 52.40 0.0000 0.0000 0.0000 0.0000 0 0
+6553 0 """4BURLINGTON2""" 1.0779 0.00 0.00 0.00 0.00 0.00 900.00 300.00 0.0000 0.0000 0.0000 0.0000 0 0
+6554 0 """4CHATHAM---2""" 1.0922 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6555 2 """4CHATS-FALL2""" 1.1200 0.00 168.00 670.00 -30.00 70.00 7.00 3.30 0.0000 0.0000 0.0000 0.0000 0 0
+6556 2 """4CHERRYWOOD2""" 1.0770 0.00 1000.00 4190.00 -300.00 600.00 650.00 212.60 0.0000 0.0000 0.0000 0.0000 0 0
+6557 0 """4CRAWFORD--1""" 1.0371 0.00 0.00 0.00 0.00 0.00 64.00 28.00 0.0000 0.0000 0.0000 0.0000 0 0
+6558 2 """4DESJOACH--2""" 1.1740 0.00 370.00 590.00 -50.00 175.00 16.10 6.60 0.0000 0.0000 0.0000 0.0000 0 0
+6559 2 """4DETWEILER-2""" 1.0550 0.00 0.00 230.00 -35.00 50.00 600.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+6560 2 """4DOBBIN----2""" 1.0510 0.00 222.00 -310.00 -50.00 75.00 160.00 65.60 0.0000 0.0000 0.0000 0.0000 0 0
+6561 2 """4DOUGLAS-PT2""" 1.1000 0.00 200.00 370.00 -50.00 80.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6562 0 """4EASTON-JCT2""" 1.0823 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6563 0 """4ESSA--230-2""" 1.0904 0.00 0.00 0.00 0.00 0.00 211.00 57.00 0.0000 0.0000 0.0000 0.0000 0 0
+6564 0 """4ESSEX-115-1""" 1.0395 0.00 0.00 0.00 0.00 0.00 84.00 -6.00 0.0000 0.0000 0.0000 0.0000 0 0
+6565 0 """4HANMER----5""" 1.0071 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 -2.1000 0.0000 0.0000 0 0
+6566 0 """4HANNON----2""" 1.0931 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6567 0 """4HANOVER---2""" 1.0859 0.00 0.00 0.00 0.00 0.00 172.20 38.20 0.0000 0.0000 0.0000 0.0000 0 0
+6568 0 """4HAWTHORNE-2""" 1.0613 0.00 0.00 0.00 0.00 0.00 400.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+6569 0 """4HINCHBROOK2""" 1.0640 0.00 0.00 0.00 0.00 0.00 300.00 125.00 0.0000 0.0000 0.0000 0.0000 0 0
+6570 2 """4HOLDEN----2""" 1.1600 0.00 200.00 150.00 -50.00 90.00 96.00 25.00 0.0000 0.0000 0.0000 0.0000 0 0
+6571 0 """4KEITH-230-2""" 1.0658 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6572 2 """4KEITH-115-1""" 1.0383 0.00 60.00 -100.00 -10.00 50.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6573 0 """4KENT------1""" 0.9963 0.00 0.00 0.00 0.00 0.00 122.80 29.80 0.0000 0.0000 0.0000 0.0000 0 0
+6574 0 """4KLEINBURG-5""" 0.9713 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6575 0 """4KLEINBURG-2""" 1.0794 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6576 0 """4LAMBTON-345""" 1.0434 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6577 0 """4LAMBTON---2""" 1.1215 0.00 0.00 0.00 0.00 0.00 27.80 11.70 0.0000 0.0000 0.0000 0.0000 0 0
+6578 2 """4LAMBTON-.24""" 1.1750 0.00 1450.00 7430.00 -500.00 1080.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6579 0 """4LAUZON----2""" 1.0537 0.00 0.00 0.00 0.00 0.00 86.00 20.00 0.0000 0.0000 0.0000 0.0000 0 0
+6580 0 """4LAUZON----1""" 1.0421 0.00 0.00 0.00 0.00 0.00 124.70 16.20 0.0000 0.0000 0.0000 0.0000 0 0
+6581 0 """4LEASIDE---2""" 1.0681 0.00 0.00 0.00 0.00 0.00 500.00 150.00 0.0000 0.0000 0.0000 0.0000 0 0
+6582 0 """4-L-33-P---2""" 1.0530 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6583 3 """4MANBY-----2""" 1.0650 0.00 726.60 450.00 0.00 0.00 950.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+6584 2 """4MARTINDALE2""" 1.1071 0.00 435.00 -500.00 -50.00 100.00 627.00 98.50 0.0000 0.0000 0.0000 0.0000 0 0
+6585 0 """4MERIVALE--2""" 0.9920 0.00 0.00 0.00 0.00 0.00 244.00 95.00 0.0000 0.0000 0.0000 0.0000 0 0
+6586 0 """4MIDDLEPORT2""" 1.1049 0.00 0.00 0.00 0.00 0.00 40.00 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+6587 0 """4MINDEN----2""" 1.1309 0.00 0.00 0.00 0.00 0.00 92.60 31.90 0.0000 0.0000 0.0000 0.0000 0 0
+6588 2 """4NANTICO---2""" 1.1570 0.00 1940.00 7680.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6589 2 """4NORTH-BAY-2""" 1.1500 0.00 245.00 -110.00 -50.00 100.00 27.20 11.90 0.0000 0.0000 0.0000 0.0000 0 0
+6590 0 """4NEALE-----2""" 1.0954 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6591 0 """4ORANGEVIL-2""" 1.0761 0.00 0.00 0.00 0.00 0.00 67.00 40.00 0.0000 0.0000 0.0000 0.0000 0 0
+6592 0 """4-PA-27-REG2""" 1.0521 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6593 0 """4PAUGAN----2""" 1.1278 0.00 0.00 0.00 0.00 0.00 8.30 2.50 0.0000 0.0000 0.0000 0.0000 0 0
+6594 0 """4PINARD----5""" 1.0473 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6595 2 """4PINARD----2""" 1.0400 0.00 550.00 600.00 -300.00 300.00 0.00 0.00 0.0000 -1.0470 0.0000 0.0000 0 0
+6596 0 """4PORCUPINE-5""" 1.0447 0.00 0.00 0.00 0.00 0.00 90.00 32.10 0.0000 0.0000 0.0000 0.0000 0 0
+6597 0 """4RICHVIEW--2""" 1.0681 0.00 0.00 0.00 0.00 0.00 800.00 250.00 0.0000 0.0000 0.0000 0.0000 0 0
+6598 2 """4STLAWRENCE2""" 1.1139 0.00 744.00 3000.00 -100.00 300.00 250.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+6599 0 """4STLAWRENCE1""" 1.0058 0.00 0.00 0.00 0.00 0.00 49.50 21.00 0.0000 0.0000 0.0000 0.0000 0 0
+6600 0 """4STTHOMAS--1""" 1.0326 0.00 0.00 0.00 0.00 0.00 165.00 11.00 0.0000 0.0000 0.0000 0.0000 0 0
+6601 0 """4SANDWICH--2""" 1.0611 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6602 0 """4SAND.WEST-2""" 1.0622 0.00 0.00 0.00 0.00 0.00 114.80 51.60 0.0000 0.0000 0.0000 0.0000 0 0
+6603 0 """4SCOTT-----2""" 1.0961 0.00 0.00 0.00 0.00 0.00 160.00 41.70 0.0000 0.0000 0.0000 0.0000 0 0
+6604 0 """4SCOTT-----1""" 1.0396 0.00 0.00 0.00 0.00 0.00 169.50 36.20 0.0000 0.0000 0.0000 0.0000 0 0
+6605 0 """4WONDERLAND2""" 1.0664 0.00 0.00 0.00 0.00 0.00 79.30 10.00 0.0000 0.0000 0.0000 0.0000 0 0
+6606 0 """5BAYSHORE-T3""" 1.0112 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6607 2 """5BAYSHORE-T1""" 1.0300 0.00 600.00 2680.00 -1000.00 1000.00 760.00 200.00 0.0000 0.0000 0.0000 0.0000 0 0
+6608 2 """5LEMOYNE--T3""" 1.0120 0.00 0.00 1900.00 -1000.00 1000.00 175.00 90.80 0.0000 0.0000 0.0000 0.0000 0 0
+6609 0 """5BENTON-HBR3""" 1.0329 0.00 0.00 0.00 0.00 0.00 330.00 16.90 0.0000 0.0000 0.0000 0.0000 0 0
+6610 2 """5D.C.COOK--3""" 1.0300 0.00 2501.67 990.00 -1000.00 1000.00 0.00 0.00 0.0000 0.0000 0.0000 0.0000 0 0
+6611 2 """5DUMONT----3""" 1.0300 0.00 850.00 5270.00 -1000.00 1000.00 167.00 50.00 0.0000 0.0000 0.0000 0.0000 0 0
+6612 2 """5E.LIMA----3""" 0.9900 0.00 80.00 860.00 -1000.00 1000.00 350.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+6613 2 """5FOSTORIA--3""" 1.0000 0.00 0.00 -490.00 -1000.00 1000.00 254.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+6614 2 """5OLIVE-----3""" 1.0200 0.00 0.00 -2130.00 -1000.00 1000.00 394.00 75.00 0.0000 0.0000 0.0000 0.0000 0 0
+6615 2 """5ROBISON-PK3""" 0.9800 0.00 0.00 -630.00 -1000.00 1000.00 460.00 169.80 0.0000 0.0000 0.0000 0.0000 0 0
+6616 2 """5SORENSON--3""" 1.0000 0.00 163.00 850.00 -1000.00 1000.00 371.00 100.00 0.0000 0.0000 0.0000 0.0000 0 0
+6617 2 """5TWIN-BRCH-3""" 1.0200 0.00 0.00 -1660.00 -1000.00 1000.00 700.00 14.60 0.0000 0.0000 0.0000 0.0000 0 0
+6618 2 """5LEWISTON-Y2""" 1.0520 0.00 1209.10 -190.00 -200.00 420.00 654.10 -45.40 0.0000 0.0000 0.0000 0.0000 0 0
+6619 2 """5MOSSES---Y2""" 1.0500 0.00 400.00 620.00 0.00 130.00 505.90 96.60 0.0000 0.0000 0.0000 0.0000 0 0
+6620 2 """5PACKARD--Y2""" 1.0520 0.00 0.00 -160.00 -1000.00 100.00 641.40 -0.60 0.0000 0.0000 0.0000 0.0000 0 0
diff --git a/examples/performance/jump/README b/examples/performance/jump/README
new file mode 100644
index 00000000000..d8f91a989be
--- /dev/null
+++ b/examples/performance/jump/README
@@ -0,0 +1,6 @@
+Test files taken from:
+
+ https://github.com/mlubin/JuMPSupplement
+
+These were used to generate performance comparisons for
+various modeling languages.
diff --git a/examples/performance/jump/clnlbeam-5000.dat b/examples/performance/jump/clnlbeam-5000.dat
new file mode 100644
index 00000000000..df9b67b8abc
--- /dev/null
+++ b/examples/performance/jump/clnlbeam-5000.dat
@@ -0,0 +1,3 @@
+data;
+
+param N := 5000;
diff --git a/examples/performance/jump/clnlbeam-50000.dat b/examples/performance/jump/clnlbeam-50000.dat
new file mode 100644
index 00000000000..1f6642dd4f2
--- /dev/null
+++ b/examples/performance/jump/clnlbeam-50000.dat
@@ -0,0 +1,3 @@
+data;
+
+param N := 50000;
diff --git a/examples/performance/jump/clnlbeam-500000.dat b/examples/performance/jump/clnlbeam-500000.dat
new file mode 100644
index 00000000000..8b3ca7d6e8b
--- /dev/null
+++ b/examples/performance/jump/clnlbeam-500000.dat
@@ -0,0 +1,3 @@
+data;
+
+param N := 500000;
diff --git a/examples/performance/jump/clnlbeam.py b/examples/performance/jump/clnlbeam.py
new file mode 100644
index 00000000000..9ff2abf4aa2
--- /dev/null
+++ b/examples/performance/jump/clnlbeam.py
@@ -0,0 +1,37 @@
+from pyomo.environ import *
+
+model = AbstractModel()
+
+model.N = Param(within=PositiveIntegers)
+model.h = 1.0/model.N
+
+model.VarIdx = RangeSet(model.N+1)
+
+model.t = Var(model.VarIdx, bounds=(-1.0,1.0), initialize=lambda m,i: 0.05*cos(i*m.h))
+model.x = Var(model.VarIdx, bounds=(-0.05,0.05), initialize=lambda m,i: 0.05*cos(i*m.h))
+model.u = Var(model.VarIdx, initialize=0.01)
+
+alpha = 350
+
+def c_rule(m):
+ ex = 0
+ for i in m.VarIdx:
+ if i == m.N+1:
+ continue
+ ex += 0.5*m.h*(m.u[i+1]**2+m.u[i]**2) + 0.5*alpha*m.h*(cos(m.t[i+1])+cos(m.t[i]))
+ return ex
+
+model.c = Objective(rule=c_rule)
+
+def cons1_rule(m, i):
+ if i == m.N+1:
+ return Constraint.Skip
+ return m.x[i+1] - m.x[i] - (0.5*m.h)*(sin(m.t[i+1])+sin(m.t[i])) == 0
+model.cons1 = Constraint(model.VarIdx, rule=cons1_rule)
+
+def cons2_rule(m,i):
+ if i == m.N+1:
+ return Constraint.Skip
+ return m.t[i+1] - m.t[i] - (0.5*m.h)*m.u[i+1] - (0.5*m.h)*m.u[i] == 0
+model.cons2 = Constraint(model.VarIdx, rule=cons2_rule)
+
diff --git a/examples/performance/jump/facility.py b/examples/performance/jump/facility.py
new file mode 100644
index 00000000000..8b4acb75e70
--- /dev/null
+++ b/examples/performance/jump/facility.py
@@ -0,0 +1,42 @@
+from pyomo.core import *
+
+model = AbstractModel()
+
+model.G = 25 #Param(within=PositiveIntegers)
+model.F = 25 #Param(within=PositiveIntegers)
+
+model.Grid = RangeSet(0, model.G)
+model.Facs = RangeSet(1, model.F)
+model.Dims = RangeSet(1, 2)
+
+model.d = Var()
+model.y = Var(model.Facs, model.Dims, bounds=(0.0, 1.0))
+model.z = Var(model.Grid, model.Grid, model.Facs, within=Binary)
+model.s = Var(model.Grid, model.Grid, model.Facs, bounds=(0.0, None))
+model.r = Var(model.Grid, model.Grid, model.Facs, model.Dims)
+
+def obj_rule(mod):
+ return 1.0*mod.d
+model.obj = Objective(rule=obj_rule)
+
+def assmt_rule(mod, i, j):
+ return sum([mod.z[i,j,f] for f in mod.Facs]) == 1
+model.assmt = Constraint(model.Grid, model.Grid, rule=assmt_rule)
+
+M = 2*1.414
+def quadrhs_rule(mod,i,j,f):
+ return mod.s[i,j,f] == mod.d + M*(1 - mod.z[i,j,f])
+model.quadrhs = Constraint(model.Grid, model.Grid, model.Facs, rule=quadrhs_rule)
+
+def quaddistk1_rule(mod,i,j,f):
+ return mod.r[i,j,f,1] == (1.0*i)/mod.G - mod.y[f,1]
+model.quaddistk1 = Constraint(model.Grid, model.Grid, model.Facs, rule=quaddistk1_rule)
+
+def quaddistk2_rule(mod,i,j,f):
+ return mod.r[i,j,f,2] == (1.0*j)/mod.G - mod.y[f,2]
+model.quaddistk2 = Constraint(model.Grid, model.Grid, model.Facs, rule=quaddistk2_rule)
+
+def quaddist_rule(mod,i,j,f):
+ return mod.r[i,j,f,1]**2 + mod.r[i,j,f,2]**2 <= mod.s[i,j,f]**2
+model.quaddist = Constraint(model.Grid, model.Grid, model.Facs, rule=quaddist_rule)
+
diff --git a/examples/performance/jump/lqcp.py b/examples/performance/jump/lqcp.py
new file mode 100644
index 00000000000..10cb49cb262
--- /dev/null
+++ b/examples/performance/jump/lqcp.py
@@ -0,0 +1,47 @@
+from pyomo.core import *
+
+model = ConcreteModel()
+
+model.n = 1000
+model.m = 1000
+model.dx = 1.0/model.n
+model.T = 1.58
+model.dt = model.T/model.n
+model.h2 = model.dx**2
+model.a = 0.001
+
+model.ns = RangeSet(0, model.n)
+model.ms = RangeSet(0, model.n)
+
+model.y = Var(model.ms, model.ns, bounds=(0.0, 1.0))
+model.u = Var(model.ms, bounds=(-1.0, 1.0))
+
+def yt(j,dx):
+ return 0.5*(1 - (j*dx)*(j*dx))
+
+def rule(model):
+ return 0.25*model.dx*(
+ (model.y[model.m,0] - yt(0,model.dx))**2 +
+ 2*sum( (model.y[model.m,j] - yt(j,model.dx))**2 for j in range(1,model.n)) +
+ (model.y[model.m,model.n] - yt(model.n,model.dx))**2
+ ) + 0.25*model.a*model.dt*(
+ 2 * sum( model.u[i]**2 for i in range(1,model.m)) +
+ model.u[model.m]**2
+ )
+model.obj = Objective(rule=rule)
+
+def pde_rule(model, i, j):
+ return (model.y[i+1,j] - model.y[i,j])/model.dt == 0.5*(model.y[i,j-1] - 2*model.y[i,j] + model.y[i,j+1] + model.y[i+1,j-1] - 2*model.y[i+1,j] + model.y[i+1,j+1])/model.h2
+model.pde = Constraint(RangeSet(0,model.n-1), RangeSet(1,model.n-1), rule=pde_rule)
+
+def ic_rule(model, j):
+ return model.y[0,j] == 0
+model.ic = Constraint(model.ns, rule=ic_rule)
+
+def bc1_rule(model, i):
+ return model.y[i, 2] - 4*model.y[i, 1] + 3*model.y[i,0] == 0
+model.bc1 = Constraint(RangeSet(1,model.n), rule=bc1_rule)
+
+def bc2_rule(model, i):
+ return model.y[i,model.n-2] - 4*model.y[i,model.n-1] + 3*model.y[i,model.n-0] == (2*model.dx)*(model.u[i] - model.y[i,model.n-0])
+model.bc2 = Constraint(RangeSet(1,model.n), rule=bc2_rule)
diff --git a/examples/performance/jump/opf_66200bus.py b/examples/performance/jump/opf_66200bus.py
new file mode 100644
index 00000000000..ef20ed11940
--- /dev/null
+++ b/examples/performance/jump/opf_66200bus.py
@@ -0,0 +1,193 @@
+from pyomo.environ import *
+
+class Bus:
+ pass
+
+class Branch:
+ pass
+
+bus = []
+busmap = {}
+busfile = open("IEEE66200.bus", "r")
+for i,line in enumerate(busfile):
+ sp = line.split()
+ b = Bus()
+ busmap[sp[0]] = i
+ b.bustype = int(sp[1])
+ b.name = sp[2]
+ b.voltage0 = float(sp[3])
+ b.angle0 = float(sp[4])
+ b.p_gen = float(sp[5])
+ b.q_gen = float(sp[6])
+ b.q_min = float(sp[7])
+ b.q_max = float(sp[8])
+ b.p_load = float(sp[9])
+ b.q_load = float(sp[10])
+ b.g_shunt = float(sp[11])
+ b.b_shunt0 = float(sp[12])
+ b.b_shunt_min = float(sp[13])
+ b.b_shunt_max = float(sp[14])
+ b.b_dispatch = float(sp[15])
+ b.area = float(sp[16])
+ # rescale
+ b.p_gen /= 100
+ b.q_gen /= 100
+ b.q_min /= 100
+ b.q_max /= 100
+ b.p_load /= 100
+ b.q_load /= 100
+ bus.append(b)
+
+branchfile = open("IEEE66200.branch", "r")
+branch = []
+for i,line in enumerate(branchfile):
+ sp = line.split()
+ b = Branch()
+ b.frm = busmap[sp[1]]
+ b.to = busmap[sp[2]]
+ b.branchtype = int(sp[3])
+ b.r = float(sp[4])
+ b.x = float(sp[5])
+ b.c = float(sp[6])
+ b.tap0 = float(sp[7])
+ b.tap_min0 = float(sp[8])
+ b.tap_max0 = float(sp[9])
+ b.def0 = float(sp[10])
+ b.def_min = float(sp[11])
+ b.def_max = float(sp[12])
+ b.g = b.r / (b.r**2 + b.x**2)
+ b.b = -b.x / (b.r**2 + b.x**2)
+ b.def_min *= 3.14159/180
+ b.def_max *= 3.14159/180
+ b.def0 *= -3.14159/180
+ branch.append(b)
+
+
+bus_voltage_min = {0 : 0.85, 1 : 0.85, 2 : 0.92, 3 : 0.99}
+bus_voltage_max = {0 : 1.15, 1 : 1.15, 2 : 1.08, 3 : 1.01}
+branch_tap_min = 0.85
+branch_tap_max = 1.15
+
+p_gen_upper = 1.10
+p_gen_lower = 0.90
+
+nbus = len(bus)
+nbranch = len(branch)
+
+in_lines = [ [] for i in range(nbus) ]
+out_lines = [ [] for i in range(nbus) ]
+for i in range(nbranch):
+ b = branch[i]
+ out_lines[b.frm].append(i)
+ in_lines[b.to].append(i)
+ assert(b.to >= 0 and b.to < nbus)
+
+
+model = ConcreteModel()
+
+model.bus_voltage = Var(range(nbus),bounds = lambda model,i : (bus_voltage_min[bus[i].bustype], bus_voltage_max[bus[i].bustype]), initialize=1)
+model.bus_b_shunt = Var(range(nbus),bounds = lambda model,i : (bus[i].b_shunt_min, bus[i].b_shunt_max), initialize = lambda model,i : bus[i].b_shunt0)
+model.bus_angle = Var(range(nbus), initialize=0)
+
+model.branch_tap = Var(range(nbranch), bounds=(branch_tap_min, branch_tap_max), initialize=1)
+model.branch_def = Var(range(nbranch), bounds=lambda model,i: (branch[i].def_min, branch[i].def_max), initialize = lambda model,i : branch[i].def0)
+
+def Gself(k):
+ return bus[k].g_shunt + sum(branch[i].g*model.branch_tap[i]**2 for i in out_lines[k]) + sum(branch[i].g for i in in_lines[k])
+
+def Gout(i):
+ return (-branch[i].g*cos(model.branch_def[i])+branch[i].b*sin(model.branch_def[i]))*model.branch_tap[i]
+
+def Gin(i):
+ return (-branch[i].g*cos(model.branch_def[i])-branch[i].b*sin(model.branch_def[i]))*model.branch_tap[i]
+
+def Bself(k):
+ return model.bus_b_shunt[k] + sum(branch[i].b*model.branch_tap[i]**2 + branch[i].c/2 for i in out_lines[k]) + sum(branch[i].b + branch[i].c/2 for i in in_lines[k])
+
+def Bin(i):
+ return (branch[i].g*sin(model.branch_def[i])-branch[i].b*cos(model.branch_def[i]))*model.branch_tap[i]
+
+def Bout(i):
+ return (-branch[i].g*sin(model.branch_def[i])-branch[i].b*cos(model.branch_def[i]))*model.branch_tap[i]
+
+model.obj = Objective(expr = sum( \
+ (bus[k].p_load + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i) * cos(model.bus_angle[k] - model.bus_angle[branch[i].frm]) + \
+ Bin(i) * sin(model.bus_angle[k] - model.bus_angle[branch[i].frm])) \
+ for i in in_lines[k]) + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i) * cos(model.bus_angle[k] - model.bus_angle[branch[i].to]) + \
+ Bout(i) * sin(model.bus_angle[k] - model.bus_angle[branch[i].to])) \
+ for i in out_lines[k]) + \
+ model.bus_voltage[k]**2*Gself(k) )**2 \
+ for k in range(nbus) if bus[k].bustype == 2 or bus[k].bustype == 3))
+
+def p_load_rule(model, k):
+ if bus[k].bustype != 0:
+ return Constraint.Skip
+
+ return bus[k].p_gen - bus[k].p_load - \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].frm]) + Bin(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].frm])) for i in in_lines[k]) - \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].to]) + Bout(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].to])) for i in out_lines[k]) - \
+ model.bus_voltage[k]**2*Gself(k) == 0
+
+model.p_load_constr = Constraint(range(nbus), rule=p_load_rule)
+
+def q_load_rule(model, k):
+ if bus[k].bustype != 0:
+ return Constraint.Skip
+
+ return bus[k].q_gen - bus[k].q_load - \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].frm]) - Bin(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].frm])) for i in in_lines[k]) - \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].to]) - Bout(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].to])) for i in out_lines[k]) \
+ + model.bus_voltage[k]**2*Bself(k) == 0
+
+model.q_load_constr = Constraint(range(nbus), rule=q_load_rule)
+
+def q_inj_rule(model, k):
+ if not (bus[k].bustype == 2 or bus[k].bustype == 3):
+ return Constraint.Skip
+
+ return (bus[k].q_min, \
+ bus[k].q_load + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].frm]) - Bin(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].frm])) for i in in_lines[k]) + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].to]) - Bout(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].to])) for i in out_lines[k]) - \
+ model.bus_voltage[k]**2*Bself(k), \
+ bus[k].q_max)
+
+model.q_inj_rule = Constraint(range(nbus), rule=q_inj_rule)
+
+def p_inj_rule(model, k):
+ if not (bus[k].bustype == 2 or bus[k].bustype == 3):
+ return Constraint.Skip
+
+ return (0, \
+ bus[k].p_load + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].frm]) + Bin(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].frm])) for i in in_lines[k]) + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].to]) + Bout(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].to])) for i in out_lines[k]) + \
+ model.bus_voltage[k]**2*Gself(k),\
+ p_gen_upper*bus[k].p_gen)
+
+model.p_inj_rule = Constraint(range(nbus), rule=p_inj_rule)
+
+
+for i in range(nbus):
+ if bus[i].bustype == 3:
+ model.bus_angle[i].fixed = True
+ if bus[i].b_dispatch == 0:
+ model.bus_b_shunt[i].fixed = True
+
+for i in range(nbranch):
+ if branch[i].branchtype == 3 or branch[i].branchtype == 0:
+ model.branch_tap[i].fixed = True
+ if branch[i].branchtype != 4:
+ model.branch_def[i].fixed = True
diff --git a/examples/performance/jump/opf_6620bus.py b/examples/performance/jump/opf_6620bus.py
new file mode 100644
index 00000000000..d89fc4985c2
--- /dev/null
+++ b/examples/performance/jump/opf_6620bus.py
@@ -0,0 +1,193 @@
+from pyomo.environ import *
+
+class Bus:
+ pass
+
+class Branch:
+ pass
+
+bus = []
+busmap = {}
+busfile = open("IEEE6620.bus", "r")
+for i,line in enumerate(busfile):
+ sp = line.split()
+ b = Bus()
+ busmap[sp[0]] = i
+ b.bustype = int(sp[1])
+ b.name = sp[2]
+ b.voltage0 = float(sp[3])
+ b.angle0 = float(sp[4])
+ b.p_gen = float(sp[5])
+ b.q_gen = float(sp[6])
+ b.q_min = float(sp[7])
+ b.q_max = float(sp[8])
+ b.p_load = float(sp[9])
+ b.q_load = float(sp[10])
+ b.g_shunt = float(sp[11])
+ b.b_shunt0 = float(sp[12])
+ b.b_shunt_min = float(sp[13])
+ b.b_shunt_max = float(sp[14])
+ b.b_dispatch = float(sp[15])
+ b.area = float(sp[16])
+ # rescale
+ b.p_gen /= 100
+ b.q_gen /= 100
+ b.q_min /= 100
+ b.q_max /= 100
+ b.p_load /= 100
+ b.q_load /= 100
+ bus.append(b)
+
+branchfile = open("IEEE6620.branch", "r")
+branch = []
+for i,line in enumerate(branchfile):
+ sp = line.split()
+ b = Branch()
+ b.frm = busmap[sp[1]]
+ b.to = busmap[sp[2]]
+ b.branchtype = int(sp[3])
+ b.r = float(sp[4])
+ b.x = float(sp[5])
+ b.c = float(sp[6])
+ b.tap0 = float(sp[7])
+ b.tap_min0 = float(sp[8])
+ b.tap_max0 = float(sp[9])
+ b.def0 = float(sp[10])
+ b.def_min = float(sp[11])
+ b.def_max = float(sp[12])
+ b.g = b.r / (b.r**2 + b.x**2)
+ b.b = -b.x / (b.r**2 + b.x**2)
+ b.def_min *= 3.14159/180
+ b.def_max *= 3.14159/180
+ b.def0 *= -3.14159/180
+ branch.append(b)
+
+
+bus_voltage_min = {0 : 0.85, 1 : 0.85, 2 : 0.92, 3 : 0.99}
+bus_voltage_max = {0 : 1.15, 1 : 1.15, 2 : 1.08, 3 : 1.01}
+branch_tap_min = 0.85
+branch_tap_max = 1.15
+
+p_gen_upper = 1.10
+p_gen_lower = 0.90
+
+nbus = len(bus)
+nbranch = len(branch)
+
+in_lines = [ [] for i in range(nbus) ]
+out_lines = [ [] for i in range(nbus) ]
+for i in range(nbranch):
+ b = branch[i]
+ out_lines[b.frm].append(i)
+ in_lines[b.to].append(i)
+ assert(b.to >= 0 and b.to < nbus)
+
+
+model = ConcreteModel()
+
+model.bus_voltage = Var(range(nbus),bounds = lambda model,i : (bus_voltage_min[bus[i].bustype], bus_voltage_max[bus[i].bustype]), initialize=1)
+model.bus_b_shunt = Var(range(nbus),bounds = lambda model,i : (bus[i].b_shunt_min, bus[i].b_shunt_max), initialize = lambda model,i : bus[i].b_shunt0)
+model.bus_angle = Var(range(nbus), initialize=0)
+
+model.branch_tap = Var(range(nbranch), bounds=(branch_tap_min, branch_tap_max), initialize=1)
+model.branch_def = Var(range(nbranch), bounds=lambda model,i: (branch[i].def_min, branch[i].def_max), initialize = lambda model,i : branch[i].def0)
+
+def Gself(k):
+ return bus[k].g_shunt + sum(branch[i].g*model.branch_tap[i]**2 for i in out_lines[k]) + sum(branch[i].g for i in in_lines[k])
+
+def Gout(i):
+ return (-branch[i].g*cos(model.branch_def[i])+branch[i].b*sin(model.branch_def[i]))*model.branch_tap[i]
+
+def Gin(i):
+ return (-branch[i].g*cos(model.branch_def[i])-branch[i].b*sin(model.branch_def[i]))*model.branch_tap[i]
+
+def Bself(k):
+ return model.bus_b_shunt[k] + sum(branch[i].b*model.branch_tap[i]**2 + branch[i].c/2 for i in out_lines[k]) + sum(branch[i].b + branch[i].c/2 for i in in_lines[k])
+
+def Bin(i):
+ return (branch[i].g*sin(model.branch_def[i])-branch[i].b*cos(model.branch_def[i]))*model.branch_tap[i]
+
+def Bout(i):
+ return (-branch[i].g*sin(model.branch_def[i])-branch[i].b*cos(model.branch_def[i]))*model.branch_tap[i]
+
+model.obj = Objective(expr = sum( \
+ (bus[k].p_load + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i) * cos(model.bus_angle[k] - model.bus_angle[branch[i].frm]) + \
+ Bin(i) * sin(model.bus_angle[k] - model.bus_angle[branch[i].frm])) \
+ for i in in_lines[k]) + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i) * cos(model.bus_angle[k] - model.bus_angle[branch[i].to]) + \
+ Bout(i) * sin(model.bus_angle[k] - model.bus_angle[branch[i].to])) \
+ for i in out_lines[k]) + \
+ model.bus_voltage[k]**2*Gself(k) )**2 \
+ for k in range(nbus) if bus[k].bustype == 2 or bus[k].bustype == 3))
+
+def p_load_rule(model, k):
+ if bus[k].bustype != 0:
+ return Constraint.Skip
+
+ return bus[k].p_gen - bus[k].p_load - \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].frm]) + Bin(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].frm])) for i in in_lines[k]) - \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].to]) + Bout(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].to])) for i in out_lines[k]) - \
+ model.bus_voltage[k]**2*Gself(k) == 0
+
+model.p_load_constr = Constraint(range(nbus), rule=p_load_rule)
+
+def q_load_rule(model, k):
+ if bus[k].bustype != 0:
+ return Constraint.Skip
+
+ return bus[k].q_gen - bus[k].q_load - \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].frm]) - Bin(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].frm])) for i in in_lines[k]) - \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].to]) - Bout(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].to])) for i in out_lines[k]) \
+ + model.bus_voltage[k]**2*Bself(k) == 0
+
+model.q_load_constr = Constraint(range(nbus), rule=q_load_rule)
+
+def q_inj_rule(model, k):
+ if not (bus[k].bustype == 2 or bus[k].bustype == 3):
+ return Constraint.Skip
+
+ return (bus[k].q_min, \
+ bus[k].q_load + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].frm]) - Bin(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].frm])) for i in in_lines[k]) + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].to]) - Bout(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].to])) for i in out_lines[k]) - \
+ model.bus_voltage[k]**2*Bself(k), \
+ bus[k].q_max)
+
+model.q_inj_rule = Constraint(range(nbus), rule=q_inj_rule)
+
+def p_inj_rule(model, k):
+ if not (bus[k].bustype == 2 or bus[k].bustype == 3):
+ return Constraint.Skip
+
+ return (0, \
+ bus[k].p_load + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].frm]) + Bin(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].frm])) for i in in_lines[k]) + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].to]) + Bout(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].to])) for i in out_lines[k]) + \
+ model.bus_voltage[k]**2*Gself(k),\
+ p_gen_upper*bus[k].p_gen)
+
+model.p_inj_rule = Constraint(range(nbus), rule=p_inj_rule)
+
+
+for i in range(nbus):
+ if bus[i].bustype == 3:
+ model.bus_angle[i].fixed = True
+ if bus[i].b_dispatch == 0:
+ model.bus_b_shunt[i].fixed = True
+
+for i in range(nbranch):
+ if branch[i].branchtype == 3 or branch[i].branchtype == 0:
+ model.branch_tap[i].fixed = True
+ if branch[i].branchtype != 4:
+ model.branch_def[i].fixed = True
diff --git a/examples/performance/jump/opf_662bus.py b/examples/performance/jump/opf_662bus.py
new file mode 100644
index 00000000000..e205287f385
--- /dev/null
+++ b/examples/performance/jump/opf_662bus.py
@@ -0,0 +1,193 @@
+from pyomo.environ import *
+
+class Bus:
+ pass
+
+class Branch:
+ pass
+
+bus = []
+busmap = {}
+busfile = open("IEEE662.bus", "r")
+for i,line in enumerate(busfile):
+ sp = line.split()
+ b = Bus()
+ busmap[sp[0]] = i
+ b.bustype = int(sp[1])
+ b.name = sp[2]
+ b.voltage0 = float(sp[3])
+ b.angle0 = float(sp[4])
+ b.p_gen = float(sp[5])
+ b.q_gen = float(sp[6])
+ b.q_min = float(sp[7])
+ b.q_max = float(sp[8])
+ b.p_load = float(sp[9])
+ b.q_load = float(sp[10])
+ b.g_shunt = float(sp[11])
+ b.b_shunt0 = float(sp[12])
+ b.b_shunt_min = float(sp[13])
+ b.b_shunt_max = float(sp[14])
+ b.b_dispatch = float(sp[15])
+ b.area = float(sp[16])
+ # rescale
+ b.p_gen /= 100
+ b.q_gen /= 100
+ b.q_min /= 100
+ b.q_max /= 100
+ b.p_load /= 100
+ b.q_load /= 100
+ bus.append(b)
+
+branchfile = open("IEEE662.branch", "r")
+branch = []
+for i,line in enumerate(branchfile):
+ sp = line.split()
+ b = Branch()
+ b.frm = busmap[sp[1]]
+ b.to = busmap[sp[2]]
+ b.branchtype = int(sp[3])
+ b.r = float(sp[4])
+ b.x = float(sp[5])
+ b.c = float(sp[6])
+ b.tap0 = float(sp[7])
+ b.tap_min0 = float(sp[8])
+ b.tap_max0 = float(sp[9])
+ b.def0 = float(sp[10])
+ b.def_min = float(sp[11])
+ b.def_max = float(sp[12])
+ b.g = b.r / (b.r**2 + b.x**2)
+ b.b = -b.x / (b.r**2 + b.x**2)
+ b.def_min *= 3.14159/180
+ b.def_max *= 3.14159/180
+ b.def0 *= -3.14159/180
+ branch.append(b)
+
+
+bus_voltage_min = {0 : 0.85, 1 : 0.85, 2 : 0.92, 3 : 0.99}
+bus_voltage_max = {0 : 1.15, 1 : 1.15, 2 : 1.08, 3 : 1.01}
+branch_tap_min = 0.85
+branch_tap_max = 1.15
+
+p_gen_upper = 1.10
+p_gen_lower = 0.90
+
+nbus = len(bus)
+nbranch = len(branch)
+
+in_lines = [ [] for i in range(nbus) ]
+out_lines = [ [] for i in range(nbus) ]
+for i in range(nbranch):
+ b = branch[i]
+ out_lines[b.frm].append(i)
+ in_lines[b.to].append(i)
+ assert(b.to >= 0 and b.to < nbus)
+
+
+model = ConcreteModel()
+
+model.bus_voltage = Var(range(nbus),bounds = lambda model,i : (bus_voltage_min[bus[i].bustype], bus_voltage_max[bus[i].bustype]), initialize=1)
+model.bus_b_shunt = Var(range(nbus),bounds = lambda model,i : (bus[i].b_shunt_min, bus[i].b_shunt_max), initialize = lambda model,i : bus[i].b_shunt0)
+model.bus_angle = Var(range(nbus), initialize=0)
+
+model.branch_tap = Var(range(nbranch), bounds=(branch_tap_min, branch_tap_max), initialize=1)
+model.branch_def = Var(range(nbranch), bounds=lambda model,i: (branch[i].def_min, branch[i].def_max), initialize = lambda model,i : branch[i].def0)
+
+def Gself(k):
+ return bus[k].g_shunt + sum(branch[i].g*model.branch_tap[i]**2 for i in out_lines[k]) + sum(branch[i].g for i in in_lines[k])
+
+def Gout(i):
+ return (-branch[i].g*cos(model.branch_def[i])+branch[i].b*sin(model.branch_def[i]))*model.branch_tap[i]
+
+def Gin(i):
+ return (-branch[i].g*cos(model.branch_def[i])-branch[i].b*sin(model.branch_def[i]))*model.branch_tap[i]
+
+def Bself(k):
+ return model.bus_b_shunt[k] + sum(branch[i].b*model.branch_tap[i]**2 + branch[i].c/2 for i in out_lines[k]) + sum(branch[i].b + branch[i].c/2 for i in in_lines[k])
+
+def Bin(i):
+ return (branch[i].g*sin(model.branch_def[i])-branch[i].b*cos(model.branch_def[i]))*model.branch_tap[i]
+
+def Bout(i):
+ return (-branch[i].g*sin(model.branch_def[i])-branch[i].b*cos(model.branch_def[i]))*model.branch_tap[i]
+
+model.obj = Objective(expr = sum( \
+ (bus[k].p_load + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i) * cos(model.bus_angle[k] - model.bus_angle[branch[i].frm]) + \
+ Bin(i) * sin(model.bus_angle[k] - model.bus_angle[branch[i].frm])) \
+ for i in in_lines[k]) + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i) * cos(model.bus_angle[k] - model.bus_angle[branch[i].to]) + \
+ Bout(i) * sin(model.bus_angle[k] - model.bus_angle[branch[i].to])) \
+ for i in out_lines[k]) + \
+ model.bus_voltage[k]**2*Gself(k) )**2 \
+ for k in range(nbus) if bus[k].bustype == 2 or bus[k].bustype == 3))
+
+def p_load_rule(model, k):
+ if bus[k].bustype != 0:
+ return Constraint.Skip
+
+ return bus[k].p_gen - bus[k].p_load - \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].frm]) + Bin(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].frm])) for i in in_lines[k]) - \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].to]) + Bout(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].to])) for i in out_lines[k]) - \
+ model.bus_voltage[k]**2*Gself(k) == 0
+
+model.p_load_constr = Constraint(range(nbus), rule=p_load_rule)
+
+def q_load_rule(model, k):
+ if bus[k].bustype != 0:
+ return Constraint.Skip
+
+ return bus[k].q_gen - bus[k].q_load - \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].frm]) - Bin(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].frm])) for i in in_lines[k]) - \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].to]) - Bout(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].to])) for i in out_lines[k]) \
+ + model.bus_voltage[k]**2*Bself(k) == 0
+
+model.q_load_constr = Constraint(range(nbus), rule=q_load_rule)
+
+def q_inj_rule(model, k):
+ if not (bus[k].bustype == 2 or bus[k].bustype == 3):
+ return Constraint.Skip
+
+ return (bus[k].q_min, \
+ bus[k].q_load + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].frm]) - Bin(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].frm])) for i in in_lines[k]) + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].to]) - Bout(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].to])) for i in out_lines[k]) - \
+ model.bus_voltage[k]**2*Bself(k), \
+ bus[k].q_max)
+
+model.q_inj_rule = Constraint(range(nbus), rule=q_inj_rule)
+
+def p_inj_rule(model, k):
+ if not (bus[k].bustype == 2 or bus[k].bustype == 3):
+ return Constraint.Skip
+
+ return (0, \
+ bus[k].p_load + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].frm] * \
+ (Gin(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].frm]) + Bin(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].frm])) for i in in_lines[k]) + \
+ sum( model.bus_voltage[k]*model.bus_voltage[branch[i].to] * \
+ (Gout(i)*cos(model.bus_angle[k]-model.bus_angle[branch[i].to]) + Bout(i)*sin(model.bus_angle[k]-model.bus_angle[branch[i].to])) for i in out_lines[k]) + \
+ model.bus_voltage[k]**2*Gself(k),\
+ p_gen_upper*bus[k].p_gen)
+
+model.p_inj_rule = Constraint(range(nbus), rule=p_inj_rule)
+
+
+for i in range(nbus):
+ if bus[i].bustype == 3:
+ model.bus_angle[i].fixed = True
+ if bus[i].b_dispatch == 0:
+ model.bus_b_shunt[i].fixed = True
+
+for i in range(nbranch):
+ if branch[i].branchtype == 3 or branch[i].branchtype == 0:
+ model.branch_tap[i].fixed = True
+ if branch[i].branchtype != 4:
+ model.branch_def[i].fixed = True
diff --git a/pyomo/solvers/tests/core/performance/bilinear2.py b/examples/performance/misc/bilinear1_100.py
similarity index 75%
rename from pyomo/solvers/tests/core/performance/bilinear2.py
rename to examples/performance/misc/bilinear1_100.py
index d19b4b63214..d6bc3e5cc5e 100644
--- a/pyomo/solvers/tests/core/performance/bilinear2.py
+++ b/examples/performance/misc/bilinear1_100.py
@@ -1,4 +1,4 @@
-from pyomo.core import *
+from pyomo.environ import *
def create_model(N):
@@ -11,10 +11,10 @@ def create_model(N):
for i in model.A:
if not (i+1) in model.A:
continue
- expr += 2.0*(model.x[i]*model.x[i+1]+1)
+ expr += i*(model.x[i]*model.x[i+1]+1)
model.obj = Objective(expr=expr)
return model
def pyomo_create_model(options=None, model_options=None):
- return create_model(1000000)
+ return create_model(100)
diff --git a/pyomo/solvers/tests/core/performance/bilinearB100000.py b/examples/performance/misc/bilinear1_100000.py
similarity index 82%
rename from pyomo/solvers/tests/core/performance/bilinearB100000.py
rename to examples/performance/misc/bilinear1_100000.py
index 7b8690d8a39..6034cac2931 100644
--- a/pyomo/solvers/tests/core/performance/bilinearB100000.py
+++ b/examples/performance/misc/bilinear1_100000.py
@@ -1,6 +1,7 @@
-from pyomo.core import *
+from pyomo.environ import *
def create_model(N):
+
model = ConcreteModel()
model.A = RangeSet(N)
@@ -10,7 +11,7 @@ def create_model(N):
for i in model.A:
if not (i+1) in model.A:
continue
- expr += 2.0*(model.x[i]*model.x[i+1]+1)
+ expr += i*(model.x[i]*model.x[i+1]+1)
model.obj = Objective(expr=expr)
return model
diff --git a/examples/performance/misc/bilinear2_100.py b/examples/performance/misc/bilinear2_100.py
new file mode 100644
index 00000000000..2997631e727
--- /dev/null
+++ b/examples/performance/misc/bilinear2_100.py
@@ -0,0 +1,20 @@
+from pyomo.environ import *
+
+def create_model(N):
+
+ model = ConcreteModel()
+
+ model.A = RangeSet(N)
+ model.x = Var(model.A, bounds=(1,2))
+
+ with nonlinear_expression as expr:
+ for i in model.A:
+ if not (i+1) in model.A:
+ continue
+ expr += i*(model.x[i]*model.x[i+1]+1)
+ model.obj = Objective(expr=expr)
+
+ return model
+
+def pyomo_create_model(options=None, model_options=None):
+ return create_model(100)
diff --git a/pyomo/solvers/tests/core/performance/bilinearA100000.py b/examples/performance/misc/bilinear2_100000.py
similarity index 56%
rename from pyomo/solvers/tests/core/performance/bilinearA100000.py
rename to examples/performance/misc/bilinear2_100000.py
index 54f4432438c..c999ab5f081 100644
--- a/pyomo/solvers/tests/core/performance/bilinearA100000.py
+++ b/examples/performance/misc/bilinear2_100000.py
@@ -1,12 +1,17 @@
-from pyomo.core import *
+from pyomo.environ import *
def create_model(N):
+
model = ConcreteModel()
model.A = RangeSet(N)
model.x = Var(model.A, bounds=(1,2))
- expr=sum(2*model.x[i]*model.x[i+1] for i in model.A if (i+1) in model.A)
+ with nonlinear_expression as expr:
+ for i in model.A:
+ if not (i+1) in model.A:
+ continue
+ expr += i*(model.x[i]*model.x[i+1]+1)
model.obj = Objective(expr=expr)
return model
diff --git a/pyomo/solvers/tests/core/performance/diag2.py b/examples/performance/misc/diag1_100.py
similarity index 86%
rename from pyomo/solvers/tests/core/performance/diag2.py
rename to examples/performance/misc/diag1_100.py
index 8103e87db82..7f791d18f2d 100644
--- a/pyomo/solvers/tests/core/performance/diag2.py
+++ b/examples/performance/misc/diag1_100.py
@@ -1,4 +1,4 @@
-from pyomo.core import *
+from pyomo.environ import *
def create_model(N):
model = ConcreteModel()
@@ -16,4 +16,4 @@ def c_rule(model, i):
return model
def pyomo_create_model(options=None, model_options=None):
- return create_model(1000000)
+ return create_model(100)
diff --git a/pyomo/solvers/tests/core/performance/diagB100000.py b/examples/performance/misc/diag1_100000.py
similarity index 93%
rename from pyomo/solvers/tests/core/performance/diagB100000.py
rename to examples/performance/misc/diag1_100000.py
index 2cf35dbdd3d..c690f375dad 100644
--- a/pyomo/solvers/tests/core/performance/diagB100000.py
+++ b/examples/performance/misc/diag1_100000.py
@@ -1,4 +1,4 @@
-from pyomo.core import *
+from pyomo.environ import *
def create_model(N):
model = ConcreteModel()
diff --git a/examples/performance/misc/diag2_100.py b/examples/performance/misc/diag2_100.py
new file mode 100644
index 00000000000..abe47d625cf
--- /dev/null
+++ b/examples/performance/misc/diag2_100.py
@@ -0,0 +1,19 @@
+from pyomo.environ import *
+
+def create_model(N):
+ model = ConcreteModel()
+
+ model.A = RangeSet(N)
+ model.x = Var(model.A)
+
+ expr = Sum(i*model.x[i] for i in model.A)
+ model.obj = Objective(expr=expr)
+
+ def c_rule(model, i):
+ return (N-i+1)*model.x[i] >= N
+ model.c = Constraint(model.A)
+
+ return model
+
+def pyomo_create_model(options=None, model_options=None):
+ return create_model(100)
diff --git a/pyomo/solvers/tests/core/performance/diagC100000.py b/examples/performance/misc/diag2_100000.py
similarity index 65%
rename from pyomo/solvers/tests/core/performance/diagC100000.py
rename to examples/performance/misc/diag2_100000.py
index d52661e4a5e..100e378caae 100644
--- a/pyomo/solvers/tests/core/performance/diagC100000.py
+++ b/examples/performance/misc/diag2_100000.py
@@ -1,14 +1,12 @@
-from pyomo.core import *
+from pyomo.environ import *
def create_model(N):
model = ConcreteModel()
model.A = RangeSet(N)
- def domain_rule(model, i):
- return Reals
- model.x = Var(model.A, domain=domain_rule)
+ model.x = Var(model.A)
- expr=sum(i*model.x[i] for i in model.A)
+ expr = Sum(i*model.x[i] for i in model.A)
model.obj = Objective(expr=expr)
def c_rule(model, i):
diff --git a/pyomo/solvers/tests/core/performance/set1-100.dat b/examples/performance/misc/set1-100.dat
similarity index 100%
rename from pyomo/solvers/tests/core/performance/set1-100.dat
rename to examples/performance/misc/set1-100.dat
diff --git a/pyomo/solvers/tests/core/performance/set1-1000.dat b/examples/performance/misc/set1-1000.dat
similarity index 100%
rename from pyomo/solvers/tests/core/performance/set1-1000.dat
rename to examples/performance/misc/set1-1000.dat
diff --git a/pyomo/solvers/tests/core/performance/set1-10000.dat b/examples/performance/misc/set1-10000.dat
similarity index 100%
rename from pyomo/solvers/tests/core/performance/set1-10000.dat
rename to examples/performance/misc/set1-10000.dat
diff --git a/pyomo/solvers/tests/core/performance/set1.py b/examples/performance/misc/set1.py
similarity index 94%
rename from pyomo/solvers/tests/core/performance/set1.py
rename to examples/performance/misc/set1.py
index 9b6d2181151..33c9301a53f 100644
--- a/pyomo/solvers/tests/core/performance/set1.py
+++ b/examples/performance/misc/set1.py
@@ -1,5 +1,4 @@
-import pyomo.environ
-from pyomo.core import *
+from pyomo.environ import *
model = ConcreteModel()
diff --git a/pyomo/solvers/tests/core/performance/sparse1.py b/examples/performance/misc/sparse1.py
similarity index 60%
rename from pyomo/solvers/tests/core/performance/sparse1.py
rename to examples/performance/misc/sparse1.py
index 742bc5da695..0026f9fc94f 100644
--- a/pyomo/solvers/tests/core/performance/sparse1.py
+++ b/examples/performance/misc/sparse1.py
@@ -1,13 +1,12 @@
#
# This is a performance test that we cannot easily execute right now
#
-import pyomo.environ
-from pyomo.core import *
+from pyomo.environ import *
-def f(n):
+def f(N):
M = ConcreteModel()
- M.A = Set(initialize=range(n))
+ M.A = Set(initialize=range(N))
M.x = Var()
M.o = Objective(expr=M.x)
def rule(m, i):
@@ -20,8 +19,4 @@ def rule(m, i):
#
# Generation of this model is slow because set M.A is big
#
-model = f(10**7)
-#
-# But writing the NL file should be fast because constraint M.c is small
-#
-M.write(filename='foo.nl', format=ProblemFormat.nl)
+model = f(1000000)
diff --git a/examples/performance/pmedian/pmedian.dat b/examples/performance/pmedian/pmedian.dat
new file mode 100644
index 00000000000..84ae41d2ad5
--- /dev/null
+++ b/examples/performance/pmedian/pmedian.dat
@@ -0,0 +1,3 @@
+param N := 10;
+param M := 6;
+param P := 3;
diff --git a/examples/performance/pmedian.test4.dat b/examples/performance/pmedian/pmedian.test4.dat
similarity index 100%
rename from examples/performance/pmedian.test4.dat
rename to examples/performance/pmedian/pmedian.test4.dat
diff --git a/examples/performance/pmedian.test6.dat b/examples/performance/pmedian/pmedian.test6.dat
similarity index 100%
rename from examples/performance/pmedian.test6.dat
rename to examples/performance/pmedian/pmedian.test6.dat
diff --git a/examples/performance/pmedian.test7.dat b/examples/performance/pmedian/pmedian.test7.dat
similarity index 100%
rename from examples/performance/pmedian.test7.dat
rename to examples/performance/pmedian/pmedian.test7.dat
diff --git a/examples/performance/pmedian/pmedian.test8.dat b/examples/performance/pmedian/pmedian.test8.dat
new file mode 100644
index 00000000000..044c08b17de
--- /dev/null
+++ b/examples/performance/pmedian/pmedian.test8.dat
@@ -0,0 +1,3 @@
+param N := 640;
+param M := 640;
+param P := 1;
diff --git a/examples/performance/pmedian.py b/examples/performance/pmedian/pmedian1.py
similarity index 100%
rename from examples/performance/pmedian.py
rename to examples/performance/pmedian/pmedian1.py
diff --git a/examples/performance/pmedian/pmedian2.py b/examples/performance/pmedian/pmedian2.py
new file mode 100644
index 00000000000..a4bca62560a
--- /dev/null
+++ b/examples/performance/pmedian/pmedian2.py
@@ -0,0 +1,53 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+
+
+from pyomo.environ import *
+
+def pyomo_create_model(options=None, model_options=None):
+ import random
+
+ random.seed(1000)
+
+ model = AbstractModel()
+
+ model.N = Param(within=PositiveIntegers)
+
+ model.Locations = RangeSet(1,model.N)
+
+ model.P = Param(within=RangeSet(1,model.N))
+
+ model.M = Param(within=PositiveIntegers)
+
+ model.Customers = RangeSet(1,model.M)
+
+ model.d = Param(model.Locations, model.Customers, initialize=lambda n, m, model : random.uniform(1.0,2.0), within=Reals)
+
+ model.x = Var(model.Locations, model.Customers, bounds=(0.0,1.0), initialize=0.0)
+
+ model.y = Var(model.Locations, bounds=(0.0, 1.0), initialize=0.0)
+
+ def rule(model):
+ return Sum(model.d[n,m]*model.x[n,m] for n in model.Locations for m in model.Customers)
+ model.obj = Objective(rule=rule)
+
+ def rule(model, m):
+ return (Sum(model.x[n,m] for n in model.Locations), 1.0)
+ model.single_x = Constraint(model.Customers, rule=rule)
+
+ def rule(model, n,m):
+ return (None, model.x[n,m] - model.y[n], 0.0)
+ model.bound_y = Constraint(model.Locations, model.Customers, rule=rule)
+
+ def rule(model):
+ return (Sum(model.y[n] for n in model.Locations) - model.P, 0.0)
+ model.num_facilities = Constraint(rule=rule)
+
+ return model
diff --git a/examples/pyomo/amplbook2/diet.py b/examples/pyomo/amplbook2/diet.py
index e7e65598695..18f2093aac5 100644
--- a/examples/pyomo/amplbook2/diet.py
+++ b/examples/pyomo/amplbook2/diet.py
@@ -43,7 +43,7 @@ def Buy_bounds(model, i):
model.Buy = Var(model.FOOD, bounds=Buy_bounds)
def Objective_rule(model):
- return summation(model.cost, model.Buy)
+ return sum_product(model.cost, model.Buy)
model.totalcost = Objective(rule=Objective_rule)
def Diet_rule(model, i):
diff --git a/examples/pyomo/amplbook2/dieti.py b/examples/pyomo/amplbook2/dieti.py
index 96eb137a339..d6c6713543e 100644
--- a/examples/pyomo/amplbook2/dieti.py
+++ b/examples/pyomo/amplbook2/dieti.py
@@ -43,7 +43,7 @@ def Buy_bounds(model,i):
model.Buy = Var(model.FOOD, bounds=Buy_bounds, domain=Integers)
def Objective_rule(model):
- return summation(model.cost, model.Buy)
+ return sum_product(model.cost, model.Buy)
model.totalcost = Objective(rule=Objective_rule)
def Diet_rule(model, i):
diff --git a/examples/pyomo/amplbook2/econ2min.py b/examples/pyomo/amplbook2/econ2min.py
index 19dd0ee9517..114dcec60d9 100644
--- a/examples/pyomo/amplbook2/econ2min.py
+++ b/examples/pyomo/amplbook2/econ2min.py
@@ -46,7 +46,7 @@ def Level_bounds(model, i):
# ***********************************
def Total_Cost_rule(model):
- return summation(model.cost, model.Level)
+ return sum_product(model.cost, model.Level)
model.Total_Cost = Objective(rule=Total_Cost_rule, doc='minimize total cost')
def Demand_rule(model, i):
diff --git a/examples/pyomo/amplbook2/econmin.py b/examples/pyomo/amplbook2/econmin.py
index db7fc66c4ec..56bfdb44971 100644
--- a/examples/pyomo/amplbook2/econmin.py
+++ b/examples/pyomo/amplbook2/econmin.py
@@ -39,7 +39,7 @@
# ***********************************
def Total_Cost_rule(model):
- return summation(model.cost, model.Level)
+ return sum_product(model.cost, model.Level)
model.Total_Cost = Objective(rule=Total_Cost_rule)
def Demand_rule(model, i):
diff --git a/examples/pyomo/amplbook2/prod.py b/examples/pyomo/amplbook2/prod.py
index 8432cd009bc..e60e15ca30f 100644
--- a/examples/pyomo/amplbook2/prod.py
+++ b/examples/pyomo/amplbook2/prod.py
@@ -33,7 +33,7 @@ def Objective_rule(model):
# Time Constraint
def Time_rule(model):
- return summation(model.X, denom=model.a) <= model.b
+ return sum_product(model.X, denom=model.a) <= model.b
model.Time = Constraint(rule=Time_rule)
# Limit Constraint
diff --git a/examples/pyomo/amplbook2/steel.py b/examples/pyomo/amplbook2/steel.py
index 39f4a43c30d..adf4027886e 100644
--- a/examples/pyomo/amplbook2/steel.py
+++ b/examples/pyomo/amplbook2/steel.py
@@ -34,7 +34,7 @@ def Make_bounds(model,i):
model.Make = Var(model.PROD, bounds=Make_bounds)
def Objective_rule(model):
- return summation(model.profit, model.Make)
+ return sum_product(model.profit, model.Make)
model.Total_Profit = Objective(rule=Objective_rule, sense=maximize)
def Time_rule(model):
@@ -44,5 +44,5 @@ def Time_rule(model):
return ans < model.avail
def XTime_rule(model):
- return summation(model.Make, denom=(model.rate,) ) < model.avail
+ return sum_product(model.Make, denom=(model.rate,) ) < model.avail
#model.Time = Constraint(rule=Time_rule)
diff --git a/examples/pyomo/amplbook2/steel3.py b/examples/pyomo/amplbook2/steel3.py
index 95fa7b2f2a7..aa66bdbb943 100644
--- a/examples/pyomo/amplbook2/steel3.py
+++ b/examples/pyomo/amplbook2/steel3.py
@@ -36,9 +36,9 @@ def Make_bounds(model, i):
model.Make = Var(model.PROD, bounds=Make_bounds)
def Objective_rule(model):
- return summation(model.profit, model.Make)
+ return sum_product(model.profit, model.Make)
model.totalprofit = Objective(rule=Objective_rule, sense=maximize)
def Time_rule(model):
- return summation(model.Make, denom=(model.rate)) < model.avail
+ return sum_product(model.Make, denom=(model.rate)) < model.avail
model.Time = Constraint(rule=Time_rule)
diff --git a/examples/pyomo/amplbook2/steel4.py b/examples/pyomo/amplbook2/steel4.py
index 01d31a9c69a..2d9291a2dbb 100644
--- a/examples/pyomo/amplbook2/steel4.py
+++ b/examples/pyomo/amplbook2/steel4.py
@@ -38,7 +38,7 @@ def Make_bounds(model,i):
model.Make = Var(model.PROD, bounds=Make_bounds)
def Objective_rule (model):
- return summation(model.profit, model.Make)
+ return sum_product(model.profit, model.Make)
model.Total_Profit = Objective(rule=Objective_rule, sense=maximize)
def Timelim_rule(model, s):
diff --git a/examples/pyomo/callbacks/sc.py b/examples/pyomo/callbacks/sc.py
index 07de6764837..1dea6f4a753 100644
--- a/examples/pyomo/callbacks/sc.py
+++ b/examples/pyomo/callbacks/sc.py
@@ -155,7 +155,7 @@ def J_rule(model):
# Objective
#
def cost_rule(model):
- return summation(model.w, model.x)
+ return sum_product(model.w, model.x)
model.cost = Objective(rule=cost_rule)
#
diff --git a/examples/pyomo/callbacks/tsp.py b/examples/pyomo/callbacks/tsp.py
index 0aa7a47a4aa..843140295da 100644
--- a/examples/pyomo/callbacks/tsp.py
+++ b/examples/pyomo/callbacks/tsp.py
@@ -70,7 +70,7 @@ def d_rule(model, i, j):
#
#
# Minimize tour length
- model.tour_length = Objective(expr=summation(model.d, model.Z))
+ model.tour_length = Objective(expr=sum_product(model.d, model.Z))
#
# Each vertex has degree 2
def Degrees_rule(model, i):
diff --git a/examples/pyomo/connectors/network_flow.py b/examples/pyomo/connectors/network_flow.py
index d6975a596b6..b17947d85d8 100644
--- a/examples/pyomo/connectors/network_flow.py
+++ b/examples/pyomo/connectors/network_flow.py
@@ -29,13 +29,13 @@ def pipe_rule(pipe, i):
def node_rule(node, i):
def _mass_balance(node, flows):
- return node.model().demands[i] == summation(flows)
+ return node.model().demands[i] == sum_product(flows)
node.flow = VarList()
node.pressure = Var( within=NonNegativeReals )
node.port = Connector()
#node.port.add(node.flow,
- # aggregate=lambda n,v: n.model().demands[id] == summation(v))
+ # aggregate=lambda n,v: n.model().demands[id] == sum_product(v))
node.port.add( node.flow, aggregate=_mass_balance )
node.port.add( node.pressure )
diff --git a/examples/pyomo/connectors/network_flow_proposed.py b/examples/pyomo/connectors/network_flow_proposed.py
index 97b500eeb4e..48eb1dd2180 100644
--- a/examples/pyomo/connectors/network_flow_proposed.py
+++ b/examples/pyomo/connectors/network_flow_proposed.py
@@ -30,7 +30,7 @@ def pipe_rule(model, pipe, id):
def node_rule(model, node, id):
def _mass_balance(model, node, flows):
- return node.demand == summation(flows)
+ return node.demand == sum_product(flows)
node.demand = Param( within=Reals, default=0 )
@@ -38,7 +38,7 @@ def _mass_balance(model, node, flows):
node.pressure = Var( within=NonNegativeReals )
node.port = Connector()
#node.port.add( node.flow,
- # aggregate=lambda m,n,v: m.demands[id] == summation(v) )
+ # aggregate=lambda m,n,v: m.demands[id] == sum_product(v) )
node.port.add( node.flow, aggregate=_mass_balance )
node.port.add( node.pressure )
diff --git a/examples/pyomo/core/integrality2.py b/examples/pyomo/core/integrality2.py
index 2b5f1599f5b..489f8a9fbbe 100644
--- a/examples/pyomo/core/integrality2.py
+++ b/examples/pyomo/core/integrality2.py
@@ -13,7 +13,7 @@
M = ConcreteModel()
M.x = Var([1,2,3], within=Boolean)
-M.o = Objective(expr=summation(M.x))
+M.o = Objective(expr=sum_product(M.x))
M.c1 = Constraint(expr=4*M.x[1]+M.x[2] >= 1)
M.c2 = Constraint(expr=M.x[2]+4*M.x[3] >= 1)
diff --git a/examples/pyomo/piecewise/indexed.py b/examples/pyomo/piecewise/indexed.py
index 44b25643a44..c6c5aa52314 100644
--- a/examples/pyomo/piecewise/indexed.py
+++ b/examples/pyomo/piecewise/indexed.py
@@ -54,4 +54,4 @@ def f(model,t1,t2,x):
# maximize the sum of Z over its index
# This is just a simple example of how to implement indexed variables. All indices
# of Z will have the same solution.
-model.obj = Objective(expr= summation(model.Z) , sense=maximize)
+model.obj = Objective(expr= sum_product(model.Z) , sense=maximize)
diff --git a/examples/pyomo/piecewise/indexed_points.py b/examples/pyomo/piecewise/indexed_points.py
index 0f28b198641..40a62694d24 100644
--- a/examples/pyomo/piecewise/indexed_points.py
+++ b/examples/pyomo/piecewise/indexed_points.py
@@ -35,4 +35,4 @@
model.c.add(model.x[2] >= 2.0)
model.c.add(model.x[3] >= 3.1)
-model.o = Objective(expr=summation(model.y))
+model.o = Objective(expr=sum_product(model.y))
diff --git a/examples/pyomo/sos/DepotSiting.py b/examples/pyomo/sos/DepotSiting.py
index 486ac213a59..72c072a0792 100644
--- a/examples/pyomo/sos/DepotSiting.py
+++ b/examples/pyomo/sos/DepotSiting.py
@@ -32,7 +32,7 @@
# ensure that one of the sites is selected (enforce binary).
def enforce_site_selected_binary_rule(model):
- return summation(model.SiteSelected) == 1
+ return sum_product(model.SiteSelected) == 1
model.EnforceSiteSelectedBinary = Constraint(rule=enforce_site_selected_binary_rule)
# the objective is to minimize the cost to satisfy all customers.
diff --git a/examples/pyomo/sos/sos2_piecewise.py b/examples/pyomo/sos/sos2_piecewise.py
index 268980a42a0..5ac8a03e2a5 100644
--- a/examples/pyomo/sos/sos2_piecewise.py
+++ b/examples/pyomo/sos/sos2_piecewise.py
@@ -43,7 +43,7 @@ def sos_var_indices_init(model):
model.Fx = Var(model.index_set) # range variable
model.y = Var(model.sos_var_indices,within=NonNegativeReals) # SOS2 variable
-model.obj = Objective(expr=summation(model.Fx), sense=maximize)
+model.obj = Objective(expr=sum_product(model.Fx), sense=maximize)
def constraint1_rule(model,t):
return model.x[t] == sum(model.y[t,i]*DOMAIN_PTS[t][i] for i in xrange(len(DOMAIN_PTS[t])) )
diff --git a/examples/pyomo/suffixes/gurobi_ampl_basis.py b/examples/pyomo/suffixes/gurobi_ampl_basis.py
index 7c0b0199090..6fe387eb126 100644
--- a/examples/pyomo/suffixes/gurobi_ampl_basis.py
+++ b/examples/pyomo/suffixes/gurobi_ampl_basis.py
@@ -62,7 +62,7 @@
model = ConcreteModel()
model.s = Set(initialize=[1,2,3])
model.x = Var(model.s,within=NonNegativeReals)
-model.obj = Objective(expr=summation(model.x))
+model.obj = Objective(expr=sum_product(model.x))
model.con = Constraint(model.s, rule=lambda model,i: model.x[i] >= i-1)
###
diff --git a/examples/pyomo/suffixes/gurobi_ampl_example.py b/examples/pyomo/suffixes/gurobi_ampl_example.py
index b557ac62c33..220cf8b799b 100644
--- a/examples/pyomo/suffixes/gurobi_ampl_example.py
+++ b/examples/pyomo/suffixes/gurobi_ampl_example.py
@@ -46,7 +46,7 @@
model = ConcreteModel()
model.s = Set(initialize=[1,2,3])
model.x = Var(model.s,within=NonNegativeReals)
-model.obj = Objective(expr=summation(model.x))
+model.obj = Objective(expr=sum_product(model.x))
model.con = Constraint(model.s, rule=lambda model,i: model.x[i] >= i-1)
###
diff --git a/examples/pysp/farmer/concrete/ReferenceModel.py b/examples/pysp/farmer/concrete/ReferenceModel.py
index 2b0ee3b3096..4c7311b4616 100644
--- a/examples/pysp/farmer/concrete/ReferenceModel.py
+++ b/examples/pysp/farmer/concrete/ReferenceModel.py
@@ -59,7 +59,7 @@
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=ConstrainTotalAcreage_rule)
@@ -83,13 +83,13 @@ def EnforceQuotas_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return summation(model.PlantingCostPerAcre, model.DevotedAcreage)
+ return sum_product(model.PlantingCostPerAcre, model.DevotedAcreage)
model.FirstStageCost = Expression(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return expr
model.SecondStageCost = Expression(rule=ComputeSecondStageCost_rule)
diff --git a/examples/pysp/farmer/expr_maxmodels/ReferenceModel.py b/examples/pysp/farmer/expr_maxmodels/ReferenceModel.py
index e7997279443..7f6cb9b913c 100644
--- a/examples/pysp/farmer/expr_maxmodels/ReferenceModel.py
+++ b/examples/pysp/farmer/expr_maxmodels/ReferenceModel.py
@@ -63,7 +63,7 @@ def super_quota_selling_price_validate (model, value, i):
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=ConstrainTotalAcreage_rule)
@@ -87,13 +87,13 @@ def EnforceQuotas_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return -summation(model.PlantingCostPerAcre, model.DevotedAcreage)
+ return -sum_product(model.PlantingCostPerAcre, model.DevotedAcreage)
model.FirstStageCost = Expression(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return -expr
model.SecondStageCost = Expression(rule=ComputeSecondStageCost_rule)
diff --git a/examples/pysp/farmer/expr_models/ReferenceModel.py b/examples/pysp/farmer/expr_models/ReferenceModel.py
index b1ae4a2970f..70a6d85967a 100644
--- a/examples/pysp/farmer/expr_models/ReferenceModel.py
+++ b/examples/pysp/farmer/expr_models/ReferenceModel.py
@@ -63,7 +63,7 @@ def super_quota_selling_price_validate (model, value, i):
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=ConstrainTotalAcreage_rule)
@@ -87,13 +87,13 @@ def EnforceQuotas_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return summation(model.PlantingCostPerAcre, model.DevotedAcreage)
+ return sum_product(model.PlantingCostPerAcre, model.DevotedAcreage)
model.FirstStageCost = Expression(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return expr
model.SecondStageCost = Expression(rule=ComputeSecondStageCost_rule)
diff --git a/examples/pysp/farmer/maxmodels/ReferenceModel.py b/examples/pysp/farmer/maxmodels/ReferenceModel.py
index 366833deb5a..894e2e6d1cd 100644
--- a/examples/pysp/farmer/maxmodels/ReferenceModel.py
+++ b/examples/pysp/farmer/maxmodels/ReferenceModel.py
@@ -66,7 +66,7 @@ def super_quota_selling_price_validate (model, value, i):
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=ConstrainTotalAcreage_rule)
@@ -90,14 +90,14 @@ def EnforceQuotas_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return model.FirstStageCost - (-1.0 * summation(model.PlantingCostPerAcre, model.DevotedAcreage)) == 0.0
+ return model.FirstStageCost - (-1.0 * sum_product(model.PlantingCostPerAcre, model.DevotedAcreage)) == 0.0
model.ComputeFirstStageCost = Constraint(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return (model.SecondStageCost - (-1.0 * expr)) == 0.0
model.ComputeSecondStageCost = Constraint(rule=ComputeSecondStageCost_rule)
diff --git a/examples/pysp/farmer/models/ReferenceModel.py b/examples/pysp/farmer/models/ReferenceModel.py
index 0fb096d574a..9620fe73916 100644
--- a/examples/pysp/farmer/models/ReferenceModel.py
+++ b/examples/pysp/farmer/models/ReferenceModel.py
@@ -63,7 +63,7 @@ def super_quota_selling_price_validate (model, value, i):
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=ConstrainTotalAcreage_rule)
@@ -87,14 +87,14 @@ def EnforceQuotas_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return summation(model.PlantingCostPerAcre, model.DevotedAcreage)
+ return sum_product(model.PlantingCostPerAcre, model.DevotedAcreage)
model.FirstStageCost = Expression(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return expr
model.SecondStageCost = Expression(rule=ComputeSecondStageCost_rule)
diff --git a/examples/pysp/farmer/smps_model/ReferenceModel.py b/examples/pysp/farmer/smps_model/ReferenceModel.py
index 892200ef8c4..4cc7ef8471a 100644
--- a/examples/pysp/farmer/smps_model/ReferenceModel.py
+++ b/examples/pysp/farmer/smps_model/ReferenceModel.py
@@ -72,7 +72,7 @@ def super_quota_selling_price_validate (model, value, i):
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = \
Constraint(rule=ConstrainTotalAcreage_rule)
@@ -104,13 +104,13 @@ def LimitAmountSold_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return summation(model.PlantingCostPerAcre, model.DevotedAcreage)
+ return sum_product(model.PlantingCostPerAcre, model.DevotedAcreage)
model.FirstStageCost = Expression(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return expr
model.SecondStageCost = Expression(rule=ComputeSecondStageCost_rule)
diff --git a/examples/pysp/farmerWintegers/models/ReferenceModel.py b/examples/pysp/farmerWintegers/models/ReferenceModel.py
index 7c28831570e..032d336b1d5 100644
--- a/examples/pysp/farmerWintegers/models/ReferenceModel.py
+++ b/examples/pysp/farmerWintegers/models/ReferenceModel.py
@@ -66,7 +66,7 @@ def super_quota_selling_price_validate (model, value, i):
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=ConstrainTotalAcreage_rule)
@@ -90,14 +90,14 @@ def EnforceQuotas_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return model.FirstStageCost - summation(model.PlantingCostPerAcre, model.DevotedAcreage) == 0.0
+ return model.FirstStageCost - sum_product(model.PlantingCostPerAcre, model.DevotedAcreage) == 0.0
model.ComputeFirstStageCost = Constraint(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return (model.SecondStageCost - expr) == 0.0
model.ComputeSecondStageCost = Constraint(rule=ComputeSecondStageCost_rule)
diff --git a/examples/pysp/farmerWintegers/smps_model/ReferenceModel.py b/examples/pysp/farmerWintegers/smps_model/ReferenceModel.py
index e241c5ebb86..97a9cab4fa0 100644
--- a/examples/pysp/farmerWintegers/smps_model/ReferenceModel.py
+++ b/examples/pysp/farmerWintegers/smps_model/ReferenceModel.py
@@ -66,7 +66,7 @@ def super_quota_selling_price_validate (model, value, i):
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=ConstrainTotalAcreage_rule)
@@ -90,14 +90,14 @@ def EnforceQuotas_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return model.FirstStageCost - summation(model.PlantingCostPerAcre, model.DevotedAcreage) == 0.0
+ return model.FirstStageCost - sum_product(model.PlantingCostPerAcre, model.DevotedAcreage) == 0.0
model.ComputeFirstStageCost = Constraint(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return (model.SecondStageCost - expr) == 0.0
model.ComputeSecondStageCost = Constraint(rule=ComputeSecondStageCost_rule)
diff --git a/examples/pysp/farmerWpiecewise/models/ReferenceModel.py b/examples/pysp/farmerWpiecewise/models/ReferenceModel.py
index f316a6e6321..0b7a5d94a80 100644
--- a/examples/pysp/farmerWpiecewise/models/ReferenceModel.py
+++ b/examples/pysp/farmerWpiecewise/models/ReferenceModel.py
@@ -103,7 +103,7 @@ def profit_function(m, c, x):
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=ConstrainTotalAcreage_rule)
@@ -122,12 +122,12 @@ def LimitAmountSold_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return model.FirstStageCost - summation(model.PlantingCostPerAcre, model.DevotedAcreage) == 0.0
+ return model.FirstStageCost - sum_product(model.PlantingCostPerAcre, model.DevotedAcreage) == 0.0
model.ComputeFirstStageCost = Constraint(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- return model.SecondStageCost - (summation(model.PurchasePrice, model.QuantityPurchased) - summation(model.Profit)) == 0.0
+ return model.SecondStageCost - (sum_product(model.PurchasePrice, model.QuantityPurchased) - sum_product(model.Profit)) == 0.0
model.ComputeSecondStageCost = Constraint(rule=ComputeSecondStageCost_rule)
diff --git a/examples/pysp/farmerWrent/models/ReferenceModel.py b/examples/pysp/farmerWrent/models/ReferenceModel.py
index 160118620fe..b0311b4295c 100644
--- a/examples/pysp/farmerWrent/models/ReferenceModel.py
+++ b/examples/pysp/farmerWrent/models/ReferenceModel.py
@@ -70,7 +70,7 @@ def super_quota_selling_price_validate (model, value, i):
#
def total_acreage_rule(model):
- return summation(model.DevotedAcreage) + model.RentedOutAcreage <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) + model.RentedOutAcreage <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=total_acreage_rule)
@@ -94,14 +94,14 @@ def enforce_quotas_rule(model, i):
#
def first_stage_cost_rule(model):
- return model.FirstStageCost - summation(model.PlantingCostPerAcre, model.DevotedAcreage) + model.RentedOutAcreage * model.RentOutRatePerAcre == 0.0
+ return model.FirstStageCost - sum_product(model.PlantingCostPerAcre, model.DevotedAcreage) + model.RentedOutAcreage * model.RentOutRatePerAcre == 0.0
model.ComputeFirstStageCost = Constraint(rule=first_stage_cost_rule)
def second_stage_cost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return (model.SecondStageCost - expr) == 0.0
model.ComputeSecondStageCost = Constraint(rule=second_stage_cost_rule)
diff --git a/examples/pysp/farmer_generated/model.py b/examples/pysp/farmer_generated/model.py
index ae10a1915ed..a009fbc06be 100644
--- a/examples/pysp/farmer_generated/model.py
+++ b/examples/pysp/farmer_generated/model.py
@@ -59,7 +59,7 @@
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=ConstrainTotalAcreage_rule)
@@ -83,13 +83,13 @@ def EnforceQuotas_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return summation(model.PlantingCostPerAcre, model.DevotedAcreage)
+ return sum_product(model.PlantingCostPerAcre, model.DevotedAcreage)
model.FirstStageCost = Expression(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return expr
model.SecondStageCost = Expression(rule=ComputeSecondStageCost_rule)
diff --git a/examples/pysp/finance/models/ReferenceModel.py b/examples/pysp/finance/models/ReferenceModel.py
index 1e3f3946526..1e6003c0096 100644
--- a/examples/pysp/finance/models/ReferenceModel.py
+++ b/examples/pysp/finance/models/ReferenceModel.py
@@ -100,6 +100,6 @@ def compute_final_wealth_rule(model):
# A active scenario objective equivalent to that generated by PySP is
# included here for informational purposes.
def total_wealth_rule(model):
- return summation(model.Wealth)+model.FinalWealth
+ return sum_product(model.Wealth)+model.FinalWealth
model.Total_Wealth_Objective = Objective(rule=total_wealth_rule, sense=maximize)
diff --git a/examples/pysp/forestry/models-nb-yr/ReferenceModel.py b/examples/pysp/forestry/models-nb-yr/ReferenceModel.py
index a22e96a89cf..5fe59cd6c7d 100644
--- a/examples/pysp/forestry/models-nb-yr/ReferenceModel.py
+++ b/examples/pysp/forestry/models-nb-yr/ReferenceModel.py
@@ -313,6 +313,6 @@ def stage_profit_rule(model, t):
# A active scenario objective equivalent to that generated by PySP is
# included here for informational purposes.
def total_profit_rule(model):
- return summation(model.AnoProfit)
+ return sum_product(model.AnoProfit)
model.Production_Profit_Objective = Objective(rule=total_profit_rule, sense=maximize)
diff --git a/examples/pysp/hydro/models/ReferenceModel.py b/examples/pysp/hydro/models/ReferenceModel.py
index ad51789cd5a..4518a909ead 100644
--- a/examples/pysp/hydro/models/ReferenceModel.py
+++ b/examples/pysp/hydro/models/ReferenceModel.py
@@ -129,5 +129,5 @@ def fcfe_rule(model):
# A active scenario objective equivalent to that generated by PySP is
# included here for informational purposes.
def total_cost_rule(model):
- return summation(model.StageCost)
+ return sum_product(model.StageCost)
model.Objective_rule = Objective(rule=total_cost_rule, sense=minimize)
diff --git a/examples/pysp/networkflow/CCmodels/ReferenceModel.py b/examples/pysp/networkflow/CCmodels/ReferenceModel.py
index cf239f6affb..29aadd3a72a 100644
--- a/examples/pysp/networkflow/CCmodels/ReferenceModel.py
+++ b/examples/pysp/networkflow/CCmodels/ReferenceModel.py
@@ -146,7 +146,7 @@ def demand_service_threshold_rule(model, k, l):
# establish the value for delta
def establish_delta_rule(model):
- return summation(model.UnmetDemand) <= model.BigM * (1-model.delta)
+ return sum_product(model.UnmetDemand) <= model.BigM * (1-model.delta)
model.Establishdelta = Constraint(rule=establish_delta_rule)
#
@@ -154,11 +154,11 @@ def establish_delta_rule(model):
#
def compute_first_stage_cost_rule(model):
- return (model.FirstStageCost - summation(model.CapCost, model.x) - summation(model.b0Cost, model.b0)) == 0.0
+ return (model.FirstStageCost - sum_product(model.CapCost, model.x) - sum_product(model.b0Cost, model.b0)) == 0.0
model.ComputeFirstStageCost = Constraint(rule=compute_first_stage_cost_rule)
def compute_second_stage_cost_rule(model):
- return model.SecondStageCost == summation(model.FCost, model.b) - (model.lambdaMult * model.delta)
+ return model.SecondStageCost == sum_product(model.FCost, model.b) - (model.lambdaMult * model.delta)
model.ComputeSecondStageCost = Constraint(rule=compute_second_stage_cost_rule)
def fofx_rule(model):
diff --git a/examples/pysp/networkflow/models-cc/ReferenceModel.py b/examples/pysp/networkflow/models-cc/ReferenceModel.py
index b9fafa7e38b..2cd099c7359 100644
--- a/examples/pysp/networkflow/models-cc/ReferenceModel.py
+++ b/examples/pysp/networkflow/models-cc/ReferenceModel.py
@@ -143,7 +143,7 @@ def demand_service_threshold_rule(model, k, l):
# establish the value for delta
def establish_delta_rule(model):
- return summation(model.UnmetDemand) <= model.BigM * (1-model.delta)
+ return sum_product(model.UnmetDemand) <= model.BigM * (1-model.delta)
model.Establishdelta = Constraint(rule=establish_delta_rule)
#
@@ -151,11 +151,11 @@ def establish_delta_rule(model):
#
def compute_first_stage_cost_rule(model):
- return (model.FirstStageCost - summation(model.CapCost, model.x) - summation(model.b0Cost, model.b0)) == 0.0
+ return (model.FirstStageCost - sum_product(model.CapCost, model.x) - sum_product(model.b0Cost, model.b0)) == 0.0
model.ComputeFirstStageCost = Constraint(rule=compute_first_stage_cost_rule)
def compute_second_stage_cost_rule(model):
- return model.SecondStageCost == summation(model.FCost, model.b) - (model.lambdaMult * model.delta)
+ return model.SecondStageCost == sum_product(model.FCost, model.b) - (model.lambdaMult * model.delta)
model.ComputeSecondStageCost = Constraint(rule=compute_second_stage_cost_rule)
def fofx_rule(model):
diff --git a/examples/pysp/networkflow/models-discrete/ReferenceModel.py b/examples/pysp/networkflow/models-discrete/ReferenceModel.py
index 7093c835178..cff3760ef0a 100644
--- a/examples/pysp/networkflow/models-discrete/ReferenceModel.py
+++ b/examples/pysp/networkflow/models-discrete/ReferenceModel.py
@@ -121,11 +121,11 @@ def no_arc_capacity_unless_bought_constraint_rule(model, i, j):
#
def compute_first_stage_cost_rule(model):
- return (model.FirstStageCost - summation(model.CapCost, model.x) - summation(model.b0Cost, model.b0)) == 0.0
+ return (model.FirstStageCost - sum_product(model.CapCost, model.x) - sum_product(model.b0Cost, model.b0)) == 0.0
model.ComputeFirstStageCost = Constraint(rule=compute_first_stage_cost_rule)
def compute_second_stage_cost_rule(model):
- return (model.SecondStageCost - summation(model.FCost, model.b)) == 0.0
+ return (model.SecondStageCost - sum_product(model.FCost, model.b)) == 0.0
model.ComputeSecondStageCost = Constraint(rule=compute_second_stage_cost_rule)
#
diff --git a/examples/pysp/networkflow/models/ReferenceModel.py b/examples/pysp/networkflow/models/ReferenceModel.py
index 3c7c90be20f..eec83a92c1d 100644
--- a/examples/pysp/networkflow/models/ReferenceModel.py
+++ b/examples/pysp/networkflow/models/ReferenceModel.py
@@ -115,11 +115,11 @@ def no_arc_capacity_unless_bought_constraint_rule(model, i, j):
#
def compute_first_stage_cost_rule(model):
- return (model.FirstStageCost - summation(model.CapCost, model.x) - summation(model.b0Cost, model.b0)) == 0.0
+ return (model.FirstStageCost - sum_product(model.CapCost, model.x) - sum_product(model.b0Cost, model.b0)) == 0.0
model.ComputeFirstStageCost = Constraint(rule=compute_first_stage_cost_rule)
def compute_second_stage_cost_rule(model):
- return (model.SecondStageCost - summation(model.FCost, model.b)) == 0.0
+ return (model.SecondStageCost - sum_product(model.FCost, model.b)) == 0.0
model.ComputeSecondStageCost = Constraint(rule=compute_second_stage_cost_rule)
#
diff --git a/examples/pysp/networkflow/smps_model/ReferenceModel.py b/examples/pysp/networkflow/smps_model/ReferenceModel.py
index 0a3ada19110..5a885f86f4e 100644
--- a/examples/pysp/networkflow/smps_model/ReferenceModel.py
+++ b/examples/pysp/networkflow/smps_model/ReferenceModel.py
@@ -121,12 +121,12 @@ def no_arc_capacity_unless_bought_constraint_rule(model, i, j):
#
def compute_first_stage_cost_rule(model):
- return (model.FirstStageCost - summation(model.CapCost, model.x) - summation(model.b0Cost, model.b0)) == 0.0
+ return (model.FirstStageCost - sum_product(model.CapCost, model.x) - sum_product(model.b0Cost, model.b0)) == 0.0
model.ComputeFirstStageCost = Constraint(rule=compute_first_stage_cost_rule)
# this is a Var and constraint to help DDSIP (dlw, Aug 2016)
def compute_second_stage_cost_rule(model):
- return (model.SecondStageCost - summation(model.FCost, model.b)) == 0.0
+ return (model.SecondStageCost - sum_product(model.FCost, model.b)) == 0.0
model.ComputeSecondStageCost = Constraint(rule=compute_second_stage_cost_rule)
#
diff --git a/examples/pysp/scripting/embedded.py b/examples/pysp/scripting/embedded.py
index d5e1fd89a60..d376b8cd5b6 100644
--- a/examples/pysp/scripting/embedded.py
+++ b/examples/pysp/scripting/embedded.py
@@ -51,7 +51,7 @@
model.cost = Expression([1,2], initialize=0.0)
model.cost[1].expr = 0
model.cost[2].expr = model.t
-model.obj = Objective(expr= summation(model.cost))
+model.obj = Objective(expr= sum_product(model.cost))
model.cons = ConstraintList()
model.cons.add(model.t >= (model.c-model.b)*model.x + model.b*model.d)
model.cons.add(model.t >= (model.c+model.h)*model.x - model.h*model.d)
diff --git a/examples/pysp/sizes/CCmodels/ReferenceModel.py b/examples/pysp/sizes/CCmodels/ReferenceModel.py
index de6e3932af1..348c7def3de 100644
--- a/examples/pysp/sizes/CCmodels/ReferenceModel.py
+++ b/examples/pysp/sizes/CCmodels/ReferenceModel.py
@@ -118,7 +118,7 @@ def establish_dforsize_rule(model, i):
# it "wants to be a one" so don't let it unless it should be
def establish_dIndicator_rule(model):
- return model.dIndicator * model.NumSizes <= summation(model.dforsize)
+ return model.dIndicator * model.NumSizes <= sum_product(model.dforsize)
model.establish_dIndicator = Constraint(rule=establish_dIndicator_rule)
diff --git a/pyomo/bilevel/plugins/dual.py b/pyomo/bilevel/plugins/dual.py
index 2cbb877453f..e22f8727442 100644
--- a/pyomo/bilevel/plugins/dual.py
+++ b/pyomo/bilevel/plugins/dual.py
@@ -10,7 +10,7 @@
from pyomo.util.plugin import alias
from pyomo.core.base import Constraint, Objective, Block
-from pyomo.repn import generate_canonical_repn
+from pyomo.repn import generate_standard_repn
from pyomo.core.base.plugin import TransformationFactory
from pyomo.core.base import Var, Set
from pyomo.bilevel.plugins.transform import Base_BilevelTransformation
@@ -75,7 +75,7 @@ def _xfrm_bilinearities(self, dual):
if degree > 2:
raise "RuntimeError: Cannot transform a model with polynomial degree %d" % degree
if degree == 2:
- terms = generate_canonical_repn(con.body)
- for term in terms:
- print("%s %s %s" % (name, ndx, term))
+ terms = generate_standard_repn(con.body)
+ for i, var in enumerate(terms.quadratic_vars):
+ print("%s %s %s" % (i, str(var), str(terms.quadratic_coefs[i])))
diff --git a/pyomo/bilevel/plugins/lcp.py b/pyomo/bilevel/plugins/lcp.py
index bbc420a0389..7a1c814efb9 100644
--- a/pyomo/bilevel/plugins/lcp.py
+++ b/pyomo/bilevel/plugins/lcp.py
@@ -12,7 +12,7 @@
import logging
from pyomo.core.base import Block, VarList, ConstraintList, Objective, Var, Constraint, maximize, ComponentUID, Set
-from pyomo.repn import generate_canonical_repn
+from pyomo.repn import generate_standard_repn
from pyomo.repn.collect import collect_linear_terms
from pyomo.util.plugin import alias
from pyomo.mpec import ComplementarityList, complements
@@ -98,11 +98,10 @@ def _add_optimality_conditions(self, instance, submodel):
else:
d_sense = 1
#
- # Iterate through the variables in the canonical representation
+ # Iterate through the variables in the representation
#
- o_terms = generate_canonical_repn(odata.expr, compute_values=False)
- for i in range(len(o_terms.variables)):
- var = o_terms.variables[i]
+ o_terms = generate_standard_repn(odata.expr, compute_values=False)
+ for i, var in enumerate(o_terms.linear_vars):
if var.parent_component().local_name in self._fixed_upper_vars:
#
# Skip fixed upper variables
@@ -113,7 +112,7 @@ def _add_optimality_conditions(self, instance, submodel):
# negated if the objective is maximized.
#
id_ = id(var)
- d2[id_] = d_sense * o_terms.linear[i]
+ d2[id_] = d_sense * o_terms.linear_coefs[i]
if not id_ in sids_set:
sids_set.add(id_)
sids_list.append(id_)
@@ -192,13 +191,12 @@ def _add_optimality_conditions(self, instance, submodel):
#
# Store the coefficients for the contraint variables that are not fixed
#
- c_terms = generate_canonical_repn(cdata.body, compute_values=False)
- for i in range(len(c_terms.variables)):
- var = c_terms.variables[i]
+ c_terms = generate_standard_repn(cdata.body, compute_values=False)
+ for i, var in enumerate(c_terms.linear_vars):
if var.parent_component().local_name in self._fixed_upper_vars:
continue
id_ = id(var)
- B2.setdefault(id_,{}).setdefault(id(cdata),c_terms.linear[i])
+ B2.setdefault(id_,{}).setdefault(id(cdata),c_terms.linear_coefs[i])
if not id_ in sids_set:
sids_set.add(id_)
sids_list.append(id_)
diff --git a/pyomo/bilevel/plugins/solver1.py b/pyomo/bilevel/plugins/solver1.py
index 45bfa719663..0d9d972e7d0 100644
--- a/pyomo/bilevel/plugins/solver1.py
+++ b/pyomo/bilevel/plugins/solver1.py
@@ -118,7 +118,7 @@ def _apply_solver(self):
data.activate()
dual_submodel = getattr(self._instance, name_+'_dual')
dual_submodel.deactivate()
- pyomo.util.PyomoAPIFactory('pyomo.repn.compute_canonical_repn')({}, model=submodel)
+ pyomo.util.PyomoAPIFactory('pyomo.repn.compute_standard_repn')({}, model=submodel)
self._instance.reclassify_component_type(name_, Block)
# use the with block here so that deactivation of the
# solver plugin always occurs thereby avoiding memory
diff --git a/pyomo/bilevel/tests/test_bard511_linear_mpec.txt b/pyomo/bilevel/tests/test_bard511_linear_mpec.txt
index 6d90610c805..72be41c7b9a 100644
--- a/pyomo/bilevel/tests/test_bard511_linear_mpec.txt
+++ b/pyomo/bilevel/tests/test_bard511_linear_mpec.txt
@@ -20,17 +20,17 @@
4 Constraint Declarations
c1 : Size=1, Index=None, Active=False
- Key : Lower : Body : Upper : Active
- None : -Inf : - x - y : -3.0 : False
+ Key : Lower : Body : Upper : Active
+ None : -Inf : - x - y : -3.0 : False
c2 : Size=1, Index=None, Active=False
- Key : Lower : Body : Upper : Active
- None : -Inf : - 2*x + y : 0.0 : False
+ Key : Lower : Body : Upper : Active
+ None : -Inf : -2*x + y : 0.0 : False
c3 : Size=1, Index=None, Active=False
Key : Lower : Body : Upper : Active
None : -Inf : 2*x + y : 12.0 : False
c4 : Size=1, Index=None, Active=False
- Key : Lower : Body : Upper : Active
- None : -Inf : - 3*x + 2*y : -4.0 : False
+ Key : Lower : Body : Upper : Active
+ None : -Inf : -3*x + 2*y : -4.0 : False
5 Declarations: o c1 c2 c3 c4
sub_kkt : Size=1, Index=None, Active=True
@@ -64,11 +64,11 @@
2 Complementarity Declarations
c2 : Size=4, Index=sub_kkt.c2_index, Active=True
- Key : Arg0 : Arg1 : Active
- 1 : - x - y <= -3.0 : 0.0 <= sub_kkt.u[1] : True
- 2 : - 2*x + y <= 0.0 : 0.0 <= sub_kkt.u[2] : True
- 3 : 2*x + y <= 12.0 : 0.0 <= sub_kkt.u[3] : True
- 4 : - 3*x + 2*y <= -4.0 : 0.0 <= sub_kkt.u[4] : True
+ Key : Arg0 : Arg1 : Active
+ 1 : - x - y <= -3.0 : 0.0 <= sub_kkt.u[1] : True
+ 2 : -2*x + y <= 0.0 : 0.0 <= sub_kkt.u[2] : True
+ 3 : 2*x + y <= 12.0 : 0.0 <= sub_kkt.u[3] : True
+ 4 : -3*x + 2*y <= -4.0 : 0.0 <= sub_kkt.u[4] : True
c3 : Size=1, Index=sub_kkt.c3_index, Active=True
Key : Arg0 : Arg1 : Active
1 : 0.0 <= y : 0.0 <= sub_kkt.v[1] : True
diff --git a/pyomo/contrib/gdpopt/GDPopt.py b/pyomo/contrib/gdpopt/GDPopt.py
index c53c0f2de85..302c95ff733 100644
--- a/pyomo/contrib/gdpopt/GDPopt.py
+++ b/pyomo/contrib/gdpopt/GDPopt.py
@@ -28,7 +28,7 @@
from six import iteritems
import pyomo.util.plugin
-from pyomo.core.base import expr as EXPR
+from pyomo.core.expr import current as EXPR
from pyomo.core.base import (Block, Constraint, ConstraintList, Expression,
Objective, Set, Suffix, TransformationFactory,
Var, maximize, minimize, value)
diff --git a/pyomo/contrib/preprocessing/plugins/bounds_to_vars.py b/pyomo/contrib/preprocessing/plugins/bounds_to_vars.py
index 344f9f12203..eb9f8c30568 100644
--- a/pyomo/contrib/preprocessing/plugins/bounds_to_vars.py
+++ b/pyomo/contrib/preprocessing/plugins/bounds_to_vars.py
@@ -1,14 +1,13 @@
"""Transformation to convert explicit bounds to variable bounds."""
+
from __future__ import division
import textwrap
from pyomo.core.base.constraint import Constraint
-from pyomo.core.kernel.numvalue import value
+from pyomo.core.expr.numvalue import value
from pyomo.core.plugins.transform.hierarchy import IsomorphicTransformation
from pyomo.util.plugin import alias
-from pyomo.repn.canonical_repn import generate_canonical_repn
-
-__author__ = "Qi Chen "
+from pyomo.repn import generate_standard_repn
class ConstraintToVarBoundTransform(IsomorphicTransformation):
@@ -17,7 +16,6 @@ class ConstraintToVarBoundTransform(IsomorphicTransformation):
Looks for constraints of form k*v + c1 <= c2. Changes bound on v to match
(c2 - c1)/k if it results in a tighter bound. Also does the same thing for
lower bounds.
-
"""
alias('contrib.constraints_to_var_bounds',
@@ -41,38 +39,57 @@ def _apply_to(self, model):
active=True,
descend_into=True):
# Check if the constraint is k * x + c1 <= c2 or c2 <= k * x + c1
- if constr.body.polynomial_degree() == 1:
- repn = generate_canonical_repn(constr.body)
- if repn.variables is not None and len(repn.variables) == 1:
- var = repn.variables[0]
- const = repn.constant if repn.constant is not None else 0
- coef = float(repn.linear[0])
- if coef == 0:
- # This can happen when a one element of a bilinear term
- # is fixed to zero. Obviously, do not divide by zero.
- pass
- else:
- if constr.upper is not None:
- newbound = (value(constr.upper) - const) / coef
- if coef > 0:
- var.setub(min(var.ub, newbound)
- if var.ub is not None
- else newbound)
- elif coef < 0:
- var.setlb(max(var.lb, newbound)
- if var.lb is not None
- else newbound)
- if constr.lower is not None:
- newbound = (value(constr.lower) - const) / coef
- if coef > 0:
- var.setlb(max(var.lb, newbound)
- if var.lb is not None
- else newbound)
- elif coef < 0:
- var.setub(min(var.ub, newbound)
- if var.ub is not None
- else newbound)
- constr.deactivate()
+ repn = generate_standard_repn(constr.body)
+ if repn.is_linear():
+ if len(repn.linear_vars) == 0:
+ var = None
+ const = repn.constant
+ coef = 0
+ elif len(repn.linear_vars) == 1:
+ var = repn.linear_vars[0]
+ const = repn.constant
+ coef = float(repn.linear_coefs[0])
+ else:
+ continue
+ if coef == 0:
+ # If a value is zero, we ignore it so we don't
+ # raise a divide-by-dero exception. We can
+ # safely deactivate this constraint as long as
+ # the constant is within the constraint bounds.
+ if constr.upper is not None \
+ and (value(constr.upper) - const) < 0:
+ # This constraint is trivially infeasible.
+ # We need to leave it in the model so that
+ # the writer complains.
+ continue
+ if constr.lower is not None \
+ and (value(constr.lower) - const) > 0:
+ # This constraint is trivially infeasible.
+ # We need to leave it in the model so that
+ # the writer complains.
+ continue
+ else:
+ if constr.upper is not None:
+ newbound = (value(constr.upper) - const) / coef
+ if coef > 0:
+ var.setub(min(var.ub, newbound)
+ if var.ub is not None
+ else newbound)
+ elif coef < 0:
+ var.setlb(max(var.lb, newbound)
+ if var.lb is not None
+ else newbound)
+ if constr.lower is not None:
+ newbound = (value(constr.lower) - const) / coef
+ if coef > 0:
+ var.setlb(max(var.lb, newbound)
+ if var.lb is not None
+ else newbound)
+ elif coef < 0:
+ var.setub(min(var.ub, newbound)
+ if var.ub is not None
+ else newbound)
+
# Sometimes deactivating the constraint will remove a
# variable from all active constraints, so that it won't be
# updated during the optimization. Therefore, we need to
@@ -81,8 +98,10 @@ def _apply_to(self, model):
# deactivating is not an invalid constraint, but rather we
# are moving its implied bound directly onto the variable.
if (var.has_lb() and var.value is not None
- and var.value < var.lb):
+ and var.value < var.lb):
var.set_value(var.lb)
if (var.has_ub() and var.value is not None
- and var.value > var.ub):
+ and var.value > var.ub):
var.set_value(var.ub)
+
+ constr.deactivate()
diff --git a/pyomo/contrib/preprocessing/plugins/deactivate_trivial_constraints.py b/pyomo/contrib/preprocessing/plugins/deactivate_trivial_constraints.py
index 70f87413f01..9a7eed1302a 100644
--- a/pyomo/contrib/preprocessing/plugins/deactivate_trivial_constraints.py
+++ b/pyomo/contrib/preprocessing/plugins/deactivate_trivial_constraints.py
@@ -5,7 +5,7 @@
from pyomo.core.base.constraint import Constraint
from pyomo.core.kernel.component_set import ComponentSet
-from pyomo.core.kernel.numvalue import value
+from pyomo.core.expr.numvalue import value
from pyomo.core.plugins.transform.hierarchy import IsomorphicTransformation
from pyomo.util.plugin import alias
diff --git a/pyomo/contrib/preprocessing/plugins/detect_fixed_vars.py b/pyomo/contrib/preprocessing/plugins/detect_fixed_vars.py
index d6a03fb5130..8c169d49a2d 100644
--- a/pyomo/contrib/preprocessing/plugins/detect_fixed_vars.py
+++ b/pyomo/contrib/preprocessing/plugins/detect_fixed_vars.py
@@ -5,7 +5,7 @@
from six import iteritems
from pyomo.core.base.var import Var
-from pyomo.core.kernel.numvalue import value
+from pyomo.core.expr.numvalue import value
from pyomo.core.plugins.transform.hierarchy import IsomorphicTransformation
from pyomo.util.plugin import alias
from pyomo.core.kernel.component_map import ComponentMap
diff --git a/pyomo/contrib/preprocessing/plugins/equality_propagate.py b/pyomo/contrib/preprocessing/plugins/equality_propagate.py
index eef06be1a4b..076377ae32c 100644
--- a/pyomo/contrib/preprocessing/plugins/equality_propagate.py
+++ b/pyomo/contrib/preprocessing/plugins/equality_propagate.py
@@ -3,11 +3,11 @@
from pyomo.core.base.constraint import Constraint
from pyomo.core.base.suffix import Suffix
+from pyomo.core.expr.numvalue import value
from pyomo.core.kernel.component_set import ComponentSet
from pyomo.core.kernel.component_map import ComponentMap
-from pyomo.core.kernel.numvalue import value
from pyomo.core.plugins.transform.hierarchy import IsomorphicTransformation
-from pyomo.repn.canonical_repn import generate_canonical_repn
+from pyomo.repn.standard_repn import generate_standard_repn
from pyomo.util.plugin import alias
@@ -29,11 +29,11 @@ def _build_equality_set(m):
# Check to make sure the constraint is of form v1 - v2 == 0
if (value(constr.lower) == 0 and value(constr.upper) == 0 and
constr.body.polynomial_degree() == 1):
- repn = generate_canonical_repn(constr.body)
+ repn = generate_standard_repn(constr.body)
# only take the variables with nonzero coefficients
- vars_ = [v for i, v in enumerate(repn.variables) if repn.linear[i]]
+ vars_ = [v for i, v in enumerate(repn.linear_vars) if repn.linear_coefs[i]]
if (len(vars_) == 2 and
- sorted(l for l in repn.linear if l) == [-1, 1]):
+ sorted(l for l in repn.linear_coefs if l) == [-1, 1]):
# this is an a == b constraint.
v1 = vars_[0]
v2 = vars_[1]
@@ -54,11 +54,11 @@ def _detect_fixed_variables(m):
active=True,
descend_into=True):
if constr.equality and constr.body.polynomial_degree() == 1:
- repn = generate_canonical_repn(constr.body)
- if len(repn.variables) == 1 and repn.linear[0]:
- var = repn.variables[0]
- coef = float(repn.linear[0])
- const = repn.constant if repn.constant is not None else 0
+ repn = generate_standard_repn(constr.body)
+ if len(repn.linear_vars) == 1 and repn.linear_coefs[0]:
+ var = repn.linear_vars[0]
+ coef = float(repn.linear_coefs[0])
+ const = repn.constant
var_val = (value(constr.lower) - value(const)) / coef
var.fix(var_val)
new_fixed_vars.add(var)
diff --git a/pyomo/contrib/preprocessing/plugins/init_vars.py b/pyomo/contrib/preprocessing/plugins/init_vars.py
index e0e3892af7c..a1cb7a14f00 100644
--- a/pyomo/contrib/preprocessing/plugins/init_vars.py
+++ b/pyomo/contrib/preprocessing/plugins/init_vars.py
@@ -4,7 +4,7 @@
import textwrap
from pyomo.core.base.var import Var
-from pyomo.core.kernel.numvalue import value
+from pyomo.core.expr.numvalue import value
from pyomo.core.plugins.transform.hierarchy import IsomorphicTransformation
from pyomo.util.plugin import alias
diff --git a/pyomo/contrib/preprocessing/plugins/remove_zero_terms.py b/pyomo/contrib/preprocessing/plugins/remove_zero_terms.py
index f9c6ea48417..12ea02f8a46 100644
--- a/pyomo/contrib/preprocessing/plugins/remove_zero_terms.py
+++ b/pyomo/contrib/preprocessing/plugins/remove_zero_terms.py
@@ -4,9 +4,12 @@
import textwrap
+from pyutilib.math.util import isclose
+from pyomo.core.expr import current as EXPR
+from pyomo.core import quicksum
from pyomo.core.base.constraint import Constraint
from pyomo.core.plugins.transform.hierarchy import IsomorphicTransformation
-from pyomo.repn.canonical_repn import generate_canonical_repn
+from pyomo.repn import generate_standard_repn
from pyomo.util.plugin import alias
@@ -36,18 +39,18 @@ def _apply_to(self, model):
ctype=Constraint, active=True, descend_into=True):
if not constr.body.polynomial_degree() == 1:
continue # we currently only process linear constraints
- repn = generate_canonical_repn(constr.body)
+ repn = generate_standard_repn(constr.body)
# get the index of all nonzero coefficient variables
nonzero_vars_indx = [
- i for i, _ in enumerate(repn.variables)
- if not repn.linear[i] == 0
+ i for i, _ in enumerate(repn.linear_vars)
+ if not repn.linear_coefs[i] == 0
]
- const = repn.constant if repn.constant is not None else 0
+ const = repn.constant
# reconstitute the constraint, including only variable terms with
# nonzero coefficients
- constr_body = sum(repn.linear[i] * repn.variables[i]
+ constr_body = quicksum(repn.linear_coefs[i] * repn.linear_vars[i]
for i in nonzero_vars_indx) + const
if constr.equality:
constr.set_value(constr_body == constr.upper)
@@ -57,5 +60,4 @@ def _apply_to(self, model):
constr.set_value(constr_body <= constr.upper)
else:
# constraint is a bounded inequality of form a <= x <= b.
- # I don't think this is a great idea, but ¯\_(ツ)_/¯
- constr.set_value(constr.lower <= constr_body <= constr.upper)
+ constr.set_value(EXPR.inequality(constr.lower, constr_body, constr.upper))
diff --git a/pyomo/contrib/preprocessing/plugins/zero_sum_propagator.py b/pyomo/contrib/preprocessing/plugins/zero_sum_propagator.py
index 593b90a3ead..035417c414f 100644
--- a/pyomo/contrib/preprocessing/plugins/zero_sum_propagator.py
+++ b/pyomo/contrib/preprocessing/plugins/zero_sum_propagator.py
@@ -1,10 +1,10 @@
"""Transformation to propagate a zero value to terms of a sum."""
import textwrap
+from pyomo.core.expr.numvalue import value
from pyomo.core.base.constraint import Constraint
-from pyomo.core.kernel.numvalue import value
from pyomo.core.plugins.transform.hierarchy import IsomorphicTransformation
-from pyomo.repn.canonical_repn import generate_canonical_repn
+from pyomo.repn.standard_repn import generate_standard_repn
from pyomo.util.plugin import alias
__author__ = "Qi Chen "
@@ -44,7 +44,7 @@ def _apply_to(self, instance):
if not constr.body.polynomial_degree() == 1:
continue # constraint not linear. Skip.
- repn = generate_canonical_repn(constr.body)
+ repn = generate_standard_repn(constr.body)
if (constr.has_ub() and (
(repn.constant is None and value(constr.upper) == 0) or
repn.constant == value(constr.upper)
@@ -55,16 +55,16 @@ def _apply_to(self, instance):
# variable has 0 coefficient
coef == 0 or
# variable is non-negative and has non-negative coefficient
- (repn.variables[i].has_lb() and
- value(repn.variables[i].lb) >= 0 and
+ (repn.linear_vars[i].has_lb() and
+ value(repn.linear_vars[i].lb) >= 0 and
coef >= 0) or
# variable is non-positive and has non-positive coefficient
- (repn.variables[i].has_ub() and
- value(repn.variables[i].ub) <= 0 and
- coef <= 0) for i, coef in enumerate(repn.linear)):
- for i, coef in enumerate(repn.linear):
+ (repn.linear_vars[i].has_ub() and
+ value(repn.linear_vars[i].ub) <= 0 and
+ coef <= 0) for i,coef in enumerate(repn.linear_coefs)):
+ for i, coef in enumerate(repn.linear_coefs):
if not coef == 0:
- repn.variables[i].fix(0)
+ repn.linear_vars[i].fix(0)
continue
if (constr.has_lb() and (
(repn.constant is None and value(constr.lower) == 0) or
@@ -76,13 +76,13 @@ def _apply_to(self, instance):
# variable has 0 coefficient
coef == 0 or
# variable is non-negative and has non-positive coefficient
- (repn.variables[i].has_lb() and
- value(repn.variables[i].lb) >= 0 and
+ (repn.linear_vars[i].has_lb() and
+ value(repn.linear_vars[i].lb) >= 0 and
coef <= 0) or
# variable is non-positive and has non-negative coefficient
- (repn.variables[i].has_ub() and
- value(repn.variables[i].ub) <= 0 and
- coef >= 0) for i, coef in enumerate(repn.linear)):
- for i, coef in enumerate(repn.linear):
+ (repn.linear_vars[i].has_ub() and
+ value(repn.linear_vars[i].ub) <= 0 and
+ coef >= 0) for i, coef in enumerate(repn.linear_coefs)):
+ for i, coef in enumerate(repn.linear_coefs):
if not coef == 0:
- repn.variables[i].fix(0)
+ repn.linear_vars[i].fix(0)
diff --git a/pyomo/contrib/preprocessing/tests/test_bounds_to_vars_xfrm.py b/pyomo/contrib/preprocessing/tests/test_bounds_to_vars_xfrm.py
index 8490c7b1b1e..1d0fdd07dc3 100644
--- a/pyomo/contrib/preprocessing/tests/test_bounds_to_vars_xfrm.py
+++ b/pyomo/contrib/preprocessing/tests/test_bounds_to_vars_xfrm.py
@@ -32,13 +32,13 @@ def test_constraint_to_var_bound(self):
# at this point in time, do not expect for v1 to be fixed
self.assertFalse(m2.v1.fixed)
- self.assertEquals(value(m2.v2.lb), -2)
+ self.assertEqual(value(m2.v2.lb), -2)
self.assertFalse(m2.v2.has_ub())
- self.assertEquals(value(m2.v3.ub), 5)
+ self.assertEqual(value(m2.v3.ub), 5)
self.assertFalse(m2.v3.has_lb())
- self.assertEquals(value(m2.v4.ub), 5)
+ self.assertEqual(value(m2.v4.ub), 5)
self.assertFalse(m2.v4.has_lb())
self.assertEquals(value(m2.v6.lb), 2)
@@ -53,13 +53,13 @@ def test_constraint_to_var_bound(self):
# at this point in time, do not expect for v1 to be fixed
self.assertFalse(m.v1.fixed)
- self.assertEquals(value(m.v2.lb), -2)
+ self.assertEqual(value(m.v2.lb), -2)
self.assertFalse(m.v2.has_ub())
- self.assertEquals(value(m.v3.ub), 5)
+ self.assertEqual(value(m.v3.ub), 5)
self.assertFalse(m.v3.has_lb())
- self.assertEquals(value(m.v4.ub), 5)
+ self.assertEqual(value(m.v4.ub), 5)
self.assertFalse(m.v4.has_lb())
def test_zero_coefficient(self):
diff --git a/pyomo/contrib/preprocessing/tests/test_zero_term_removal.py b/pyomo/contrib/preprocessing/tests/test_zero_term_removal.py
index e28012ac355..60835100200 100644
--- a/pyomo/contrib/preprocessing/tests/test_zero_term_removal.py
+++ b/pyomo/contrib/preprocessing/tests/test_zero_term_removal.py
@@ -2,7 +2,7 @@
import pyutilib.th as unittest
from pyomo.environ import (ConcreteModel, Constraint, TransformationFactory,
Var)
-from pyomo.core.base.expr import identify_variables
+from pyomo.core.expr import current as EXPR
__author__ = "Qi Chen "
@@ -20,20 +20,20 @@ def test_zero_term_removal(self):
m.c = Constraint(expr=m.v0 == m.v1 * m.v2 + m.v3)
m.c2 = Constraint(expr=m.v1 * m.v2 + m.v3 <= m.v0)
m.c3 = Constraint(expr=m.v0 <= m.v1 * m.v2 + m.v3)
- m.c4 = Constraint(expr=1 <= m.v1 * m.v2 + m.v3 <= 3)
+ m.c4 = Constraint(expr=EXPR.inequality(1, m.v1 * m.v2 + m.v3, 3))
m.v1.fix(0)
TransformationFactory('contrib.remove_zero_terms').apply_to(m)
m.v1.unfix()
# Check that the term no longer exists
self.assertFalse(any(id(m.v1) == id(v)
- for v in identify_variables(m.c.body)))
+ for v in EXPR.identify_variables(m.c.body)))
self.assertFalse(any(id(m.v1) == id(v)
- for v in identify_variables(m.c2.body)))
+ for v in EXPR.identify_variables(m.c2.body)))
self.assertFalse(any(id(m.v1) == id(v)
- for v in identify_variables(m.c3.body)))
+ for v in EXPR.identify_variables(m.c3.body)))
self.assertFalse(any(id(m.v1) == id(v)
- for v in identify_variables(m.c4.body)))
+ for v in EXPR.identify_variables(m.c4.body)))
if __name__ == '__main__':
diff --git a/pyomo/contrib/trustregion/tests/TestPyomoInterface.py b/pyomo/contrib/trustregion/tests/TestPyomoInterface.py
index 03a50c33a77..5b5302d7304 100644
--- a/pyomo/contrib/trustregion/tests/TestPyomoInterface.py
+++ b/pyomo/contrib/trustregion/tests/TestPyomoInterface.py
@@ -2,11 +2,19 @@
import pyutilib.th as unittest
-from pyomo.core.base.expr import identify_variables
+from pyomo.core.expr.current import identify_variables
from pyomo.environ import *
from pyomo.opt import check_available_solvers
-from pyomo.contrib.trustregion.PyomoInterface import *
+try:
+ import numpy
+ numpy_available = True
+ from pyomo.contrib.trustregion.PyomoInterface import *
+except:
+ numpy_available = False
+
+
+@unittest.skipIf(numpy_available==False, "Skipping pyomo.contrib.trustregion tests because numpy is not installed.")
class TestPyomoInterfaceInitialization(unittest.TestCase):
def setUp(self):
m = ConcreteModel()
diff --git a/pyomo/core/__init__.py b/pyomo/core/__init__.py
index 9a0ac47c028..608fbfdcfac 100644
--- a/pyomo/core/__init__.py
+++ b/pyomo/core/__init__.py
@@ -11,10 +11,12 @@
from pyomo.util.plugin import PluginGlobals
PluginGlobals.add_env("pyomo")
-from pyomo.core.base import *
-import pyomo.core.base._pyomo
+from pyomo.core.expr import *
+import pyomo.core.kernel
import pyomo.core.data
+import pyomo.core.base._pyomo
+from pyomo.core.base import *
import pyomo.core.preprocess
-import pyomo.core.kernel
+from pyomo.core.util import *
PluginGlobals.pop_env()
diff --git a/pyomo/core/base/PyomoModel.py b/pyomo/core/base/PyomoModel.py
index 6f45879bc9e..922dbf34b5a 100644
--- a/pyomo/core/base/PyomoModel.py
+++ b/pyomo/core/base/PyomoModel.py
@@ -41,14 +41,14 @@
from pyomo.util._task import pyomo_api
from pyomo.util.deprecation import deprecation_warning
-from pyomo.core.kernel import expr_common
+from pyomo.core.expr import expr_common
+from pyomo.core.expr.symbol_map import SymbolMap
from pyomo.core.base.var import _VarData, Var
from pyomo.core.base.constraint import Constraint
from pyomo.core.base.objective import Objective
from pyomo.core.base.set_types import *
from pyomo.core.base.suffix import active_import_suffix_generator
-from pyomo.core.base.symbol_map import SymbolMap
from pyomo.core.base.indexed_component import IndexedComponent
from pyomo.core.base.DataPortal import *
from pyomo.core.base.plugin import *
@@ -868,7 +868,6 @@ def _load_model_data(self, modeldata, namespaces, **kwds):
continue
self._initialize_component(modeldata, namespaces, component_name, profile_memory)
-
if False:
total_time = time.time() - start_time
if isinstance(component, IndexedComponent):
diff --git a/pyomo/core/base/__init__.py b/pyomo/core/base/__init__.py
index 01871729d1c..5af777405f1 100644
--- a/pyomo/core/base/__init__.py
+++ b/pyomo/core/base/__init__.py
@@ -8,19 +8,15 @@
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
-import pyomo.core.kernel
-from pyomo.core.base.config import PyomoOptions
-
+from pyomo.core.expr.numvalue import *
from pyomo.core.kernel import (ComponentMap,
minimize,
maximize)
+from pyomo.core.base.config import PyomoOptions
-from pyomo.core.base.plugin import *
-from pyomo.core.base.expr import *
-from pyomo.core.base.numvalue import *
+from pyomo.core.base.expression import *
from pyomo.core.base.label import *
from pyomo.core.base.DataPortal import *
-from pyomo.core.base.symbol_map import *
#
# Components
@@ -38,16 +34,17 @@
from pyomo.core.base.piecewise import *
from pyomo.core.base.suffix import *
from pyomo.core.base.external import *
-from pyomo.core.base.expression import *
+from pyomo.core.base.symbol_map import *
#
from pyomo.core.base.set_types import *
from pyomo.core.base.misc import *
from pyomo.core.base.block import *
from pyomo.core.base.PyomoModel import *
+from pyomo.core.base.plugin import *
#
import pyomo.core.base._pyomo
#
-from pyomo.core.base.util import *
+import pyomo.core.base.util
from pyomo.core.base.rangeset import *
from pyomo.core.base.instance2dat import *
diff --git a/pyomo/core/base/alias.py b/pyomo/core/base/alias.py
index 48f9e5d2e8f..ca39938483a 100644
--- a/pyomo/core/base/alias.py
+++ b/pyomo/core/base/alias.py
@@ -34,8 +34,8 @@
# plugins (e.g., extra variables), but I think when an expression
# is generated due to forwarding NumValue base class methods, this
# results in the Alias (e.g., for a Var) getting replaced with its
-# aliased object in the expression. So problem writers and
-# canonical_repn could possibly never encounter Aliases (if we're
+# aliased object in the expression. So problem writers
+# could possibly never encounter Aliases (if we're
# careful).
class Alias(Component):
diff --git a/pyomo/core/base/block.py b/pyomo/core/base/block.py
index 8bf2129308c..0ef93d5ffeb 100644
--- a/pyomo/core/base/block.py
+++ b/pyomo/core/base/block.py
@@ -498,10 +498,8 @@ def __getstate__(self):
ans = dict(self.__dict__)
ans.update(super(_BlockData, self).__getstate__())
# Note sure why we are deleting these...
- if '_canonical_repn' in ans:
- del ans['_canonical_repn']
- if '_ampl_repn' in ans:
- del ans['_ampl_repn']
+ if '_repn' in ans:
+ del ans['_repn']
return ans
#
diff --git a/pyomo/core/base/component.py b/pyomo/core/base/component.py
index d22df38b547..2a90c1f62f1 100644
--- a/pyomo/core/base/component.py
+++ b/pyomo/core/base/component.py
@@ -87,7 +87,7 @@ def __deepcopy__(self, memo):
# copy.
#
# Nominally, expressions only point to ComponentData
- # derivatives. However, with the developemtn of Expression
+ # derivatives. However, with the development of Expression
# Templates (and the corresponding _GetItemExpression object),
# expressions can refer to container (non-Simple) components, so
# we need to override __deepcopy__ for both Component and
@@ -429,11 +429,14 @@ def __str__(self):
"""Return the component name"""
return self.name
- def to_string(self, ostream=None, verbose=None, precedence=0, labeler=None):
- """Write the component name to a buffer"""
- if ostream is None:
- ostream = sys.stdout
- ostream.write(self.__str__())
+ def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False):
+ """Return the component name"""
+ if compute_values:
+ try:
+ return str(self())
+ except:
+ pass
+ return self.name
def getname(self, fully_qualified=False, name_buffer=None):
"""
@@ -712,17 +715,22 @@ def __str__(self):
"""Return a string with the component name and index"""
return self.name
- def to_string(self, ostream=None, verbose=None, precedence=0, labeler=None):
+ def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False):
"""
- Write the component name and index to a buffer,
+ Return a string representation of this component,
applying the labeler if passed one.
"""
- if ostream is None:
- ostream = sys.stdout
+ if compute_values:
+ try:
+ return str(self())
+ except:
+ pass
+ if smap:
+ return smap.getSymbol(self, labeler)
if labeler is not None:
- ostream.write(labeler(self))
+ return labeler(self)
else:
- ostream.write(self.__str__())
+ return self.__str__()
def getname(self, fully_qualified=False, name_buffer=None):
"""Return a string with the component name and index"""
diff --git a/pyomo/core/base/connector.py b/pyomo/core/base/connector.py
index ff3d63b5900..b49c75bb0db 100644
--- a/pyomo/core/base/connector.py
+++ b/pyomo/core/base/connector.py
@@ -74,7 +74,7 @@ def is_constant(self):
"""
return False
- def _potentially_variable(self):
+ def is_potentially_variable(self):
"""Return True as connectors may (should!) contain variables"""
return True
diff --git a/pyomo/core/base/constraint.py b/pyomo/core/base/constraint.py
index 99479250267..c5dbb7420a2 100644
--- a/pyomo/core/base/constraint.py
+++ b/pyomo/core/base/constraint.py
@@ -18,13 +18,14 @@
import pyutilib.math
from pyomo.util.timing import ConstructionTimer
-from pyomo.core.base import expr as EXPR
-from pyomo.core.base.plugin import register_component
-from pyomo.core.base.numvalue import (ZeroConstant,
+from pyomo.core.expr import current as EXPR
+from pyomo.core.expr.numvalue import (ZeroConstant,
value,
as_numeric,
is_constant,
+ native_numeric_types,
_sub)
+from pyomo.core.base.plugin import register_component
from pyomo.core.base.component import ActiveComponentData
from pyomo.core.base.indexed_component import \
( ActiveIndexedComponent,
@@ -405,19 +406,15 @@ def set_value(self, expr):
arg1 = as_numeric(arg1)
self._equality = True
- if arg1 is None or (not arg1._potentially_variable()):
+ if arg1 is None or (not arg1.is_potentially_variable()):
self._lower = self._upper = arg1
self._body = arg0
- elif arg0 is None or (not arg0._potentially_variable()):
+ elif arg0 is None or (not arg0.is_potentially_variable()):
self._lower = self._upper = arg0
self._body = arg1
else:
- with EXPR.bypass_clone_check():
- self._lower = self._upper = ZeroConstant
- self._body = arg0
- self._body -= arg1
- #self._body = EXPR.generate_expression_bypassCloneCheck(
- # _sub, arg0, arg1)
+ self._lower = self._upper = ZeroConstant
+ self._body = arg0 - arg1
#
# Form inequality expression
#
@@ -425,7 +422,7 @@ def set_value(self, expr):
arg0 = expr[0]
if arg0 is not None:
arg0 = as_numeric(arg0)
- if arg0._potentially_variable():
+ if arg0.is_potentially_variable():
raise ValueError(
"Constraint '%s' found a 3-tuple (lower,"
" expression, upper) but the lower "
@@ -440,7 +437,7 @@ def set_value(self, expr):
arg2 = expr[2]
if arg2 is not None:
arg2 = as_numeric(arg2)
- if arg2._potentially_variable():
+ if arg2.is_potentially_variable():
raise ValueError(
"Constraint '%s' found a 3-tuple (lower,"
" expression, upper) but the upper "
@@ -469,14 +466,14 @@ def set_value(self, expr):
"Constraint '%s' does not have a proper "
"value. Found '%s'\nExpecting a tuple or "
"equation. Examples:"
- "\n summation(model.costs) == model.income"
+ "\n sum(model.costs) == model.income"
"\n (0, model.price[item], 50)"
% (self.name, str(expr)))
except AttributeError:
msg = ("Constraint '%s' does not have a proper "
"value. Found '%s'\nExpecting a tuple or "
"equation. Examples:"
- "\n summation(model.costs) == model.income"
+ "\n sum(model.costs) == model.income"
"\n (0, model.price[item], 50)"
% (self.name, str(expr)))
if type(expr) is bool:
@@ -498,111 +495,86 @@ def set_value(self, expr):
# user did ( var < 1 > 0 ) (which also results in a non-None
# chainedInequality value)
#
- if EXPR.generate_relational_expression.chainedInequality is not None:
- raise TypeError(EXPR.chainedInequalityErrorMessage())
+ if EXPR._using_chained_inequality and EXPR._chainedInequality.prev is not None:
+ raise TypeError(EXPR._chainedInequality.error_message())
#
# Process relational expressions
# (i.e. explicit '==', '<', and '<=')
#
if relational_expr:
- if _expr_type is EXPR._EqualityExpression:
+ if _expr_type is EXPR.EqualityExpression:
# Equality expression: only 2 arguments!
self._equality = True
- _args = expr._args
- # Explicitly dereference the original arglist (otherwise
- # this runs afoul of the getrefcount logic)
- expr._args = []
-
- if not _args[1]._potentially_variable():
- self._lower = self._upper = _args[1]
- self._body = _args[0]
- elif not _args[0]._potentially_variable():
- self._lower = self._upper = _args[0]
- self._body = _args[1]
- else:
- with EXPR.bypass_clone_check():
- self._lower = self._upper = ZeroConstant
- self._body = _args[0]
- self._body -= _args[1]
- #self._body = EXPR.generate_expression_bypassCloneCheck(
- # _sub, _args[0], _args[1] )
- else:
- # Inequality expression: 2 or 3 arguments
- if expr._strict:
- try:
- _strict = any(expr._strict)
- except:
- _strict = True
- if _strict:
- #
- # We can relax this when:
- # (a) we have a need for this
- # (b) we have problem writer that
- # explicitly handles this
- # (c) we make sure that all problem writers
- # that don't handle this make it known
- # to the user through an error or
- # warning
- #
- raise ValueError(
- "Constraint '%s' encountered a strict "
- "inequality expression ('>' or '<'). All"
- " constraints must be formulated using "
- "using '<=', '>=', or '=='."
- % (self.name))
-
- _args = expr._args
- # Explicitly dereference the original arglist (otherwise
- # this runs afoul of the getrefcount logic)
- expr._args = []
-
- if len(_args) == 3:
- if _args[0]._potentially_variable():
- raise ValueError(
- "Constraint '%s' found a double-sided "
- "inequality expression (lower <= "
- "expression <= upper) but the lower "
- "bound was not data or an expression "
- "restricted to storage of data."
- % (self.name))
- if _args[2]._potentially_variable():
- raise ValueError(
- "Constraint '%s' found a double-sided "\
- "inequality expression (lower <= "
- "expression <= upper) but the upper "
- "bound was not data or an expression "
- "restricted to storage of data."
- % (self.name))
-
- self._lower = _args[0]
- self._body = _args[1]
- self._upper = _args[2]
+ if expr.arg(1).__class__ in native_numeric_types or not expr.arg(1).is_potentially_variable():
+ self._lower = self._upper = expr.arg(1)
+ self._body = expr.arg(0)
+ elif expr.arg(0).__class__ in native_numeric_types or not expr.arg(0).is_potentially_variable():
+ self._lower = self._upper = expr.arg(0)
+ self._body = expr.arg(1)
+ else:
+ self._lower = self._upper = ZeroConstant
+ self._body = expr.arg(0) - expr.arg(1)
+ elif _expr_type is EXPR.InequalityExpression:
+ if expr._strict:
+ raise ValueError(
+ "Constraint '%s' encountered a strict "
+ "inequality expression ('>' or '<'). All"
+ " constraints must be formulated using "
+ "using '<=', '>=', or '=='."
+ % (self.name))
+
+ if not expr.arg(1).is_potentially_variable():
+ self._lower = None
+ self._body = expr.arg(0)
+ self._upper = expr.arg(1)
+ elif not expr.arg(0).is_potentially_variable():
+ self._lower = expr.arg(0)
+ self._body = expr.arg(1)
+ self._upper = None
else:
- if not _args[1]._potentially_variable():
- self._lower = None
- self._body = _args[0]
- self._upper = _args[1]
- elif not _args[0]._potentially_variable():
- self._lower = _args[0]
- self._body = _args[1]
- self._upper = None
- else:
- with EXPR.bypass_clone_check():
- self._lower = None
- self._body = _args[0]
- self._body -= _args[1]
- self._upper = ZeroConstant
- #self._body = EXPR.generate_expression_bypassCloneCheck(
- # _sub, _args[0], _args[1])
+ self._lower = None
+ self._body = expr.arg(0)
+ self._body -= expr.arg(1)
+ self._upper = ZeroConstant
+
+
+ else: # RangedExpression
+ if any(expr._strict):
+ raise ValueError(
+ "Constraint '%s' encountered a strict "
+ "inequality expression ('>' or '<'). All"
+ " constraints must be formulated using "
+ "using '<=', '>=', or '=='."
+ % (self.name))
+
+ #if expr.arg(0).is_potentially_variable():
+ # raise ValueError(
+ # "Constraint '%s' found a double-sided "
+ # "inequality expression (lower <= "
+ # "expression <= upper) but the lower "
+ # "bound was not data or an expression "
+ # "restricted to storage of data."
+ # % (self.name))
+ #if expr.arg(2).is_potentially_variable():
+ # raise ValueError(
+ # "Constraint '%s' found a double-sided "\
+ # "inequality expression (lower <= "
+ # "expression <= upper) but the upper "
+ # "bound was not data or an expression "
+ # "restricted to storage of data."
+ # % (self.name))
+
+ self._lower = expr.arg(0)
+ self._body = expr.arg(1)
+ self._upper = expr.arg(2)
#
- # Replace numeric bound values with a NumericConstant object,
- # and reset the values to 'None' if they are 'infinite'
+ # Reset the values to 'None' if they are 'infinite'
#
if (self._lower is not None) and is_constant(self._lower):
- val = self._lower()
+ val = self._lower if self._lower.__class__ in native_numeric_types else self._lower()
if not pyutilib.math.is_finite(val):
if val > 0:
raise ValueError(
@@ -615,7 +587,7 @@ def set_value(self, expr):
"lower bound." % (self.name))
if (self._upper is not None) and is_constant(self._upper):
- val = self._upper()
+ val = self._upper if self._upper.__class__ in native_numeric_types else self._upper()
if not pyutilib.math.is_finite(val):
if val < 0:
raise ValueError(
@@ -652,6 +624,7 @@ def get_value(self):
return self._lower <= self._body
return self._lower <= self._body <= self._upper
+
class Constraint(ActiveIndexedComponent):
"""
This modeling component defines a constraint expression using a
@@ -871,18 +844,15 @@ def _check_skip_add(self, index, expr):
# non-None, but the expression will be a bool. For
# example, model.a < 1 > 0.
#
- if EXPR.generate_relational_expression.\
- chainedInequality is not None:
+ if EXPR._using_chained_inequality and EXPR._chainedInequality.prev is not None:
buf = StringIO()
- EXPR.generate_relational_expression.\
- chainedInequality.pprint(buf)
+ EXPR._chainedInequality.prev.pprint(buf)
#
# We are about to raise an exception, so it's OK to
# reset chainedInequality
#
- EXPR.generate_relational_expression.\
- chainedInequality = None
+ EXPR._chainedInequality.prev = None
raise ValueError(
"Invalid chained (2-sided) inequality detected. "
"The expression is resolving to %s instead of a "
diff --git a/pyomo/core/base/expr_common.py b/pyomo/core/base/expr_common.py
deleted file mode 100644
index e5f963af4f7..00000000000
--- a/pyomo/core/base/expr_common.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# ___________________________________________________________________________
-#
-# Pyomo: Python Optimization Modeling Objects
-# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
-# rights in this software.
-# This software is distributed under the 3-clause BSD License.
-# ___________________________________________________________________________
-
-import sys
-from pyomo.core.kernel import expr_common
-sys.modules[__name__] = expr_common
diff --git a/pyomo/core/base/expr_pyomo4.py b/pyomo/core/base/expr_pyomo4.py
deleted file mode 100644
index 252eae876e6..00000000000
--- a/pyomo/core/base/expr_pyomo4.py
+++ /dev/null
@@ -1,13 +0,0 @@
-# ___________________________________________________________________________
-#
-# Pyomo: Python Optimization Modeling Objects
-# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
-# rights in this software.
-# This software is distributed under the 3-clause BSD License.
-# ___________________________________________________________________________
-
-import sys
-from pyomo.core.kernel import expr_pyomo4
-sys.modules[__name__] = expr_pyomo4
diff --git a/pyomo/core/base/expression.py b/pyomo/core/base/expression.py
index 3e2c5c471ef..3accde31b6e 100644
--- a/pyomo/core/base/expression.py
+++ b/pyomo/core/base/expression.py
@@ -15,8 +15,10 @@
from weakref import ref as weakref_ref
from pyomo.util.timing import ConstructionTimer
-from pyomo.core.base.plugin import register_component
+
+from pyomo.core.expr import current as EXPR
from pyomo.core.base.component import ComponentData
+from pyomo.core.base.plugin import register_component
from pyomo.core.base.indexed_component import (
IndexedComponent,
UnindexedComponent_set, )
@@ -24,9 +26,6 @@
tabular_writer)
from pyomo.core.base.numvalue import (NumericValue,
as_numeric)
-import pyomo.core.base.expr
-from pyomo.core.base.expr_common import \
- ensure_independent_trees as safe_mode
from pyomo.core.base.util import is_functor
from six import iteritems
@@ -36,7 +35,7 @@
class _ExpressionData(NumericValue):
"""
- An object that defines an expression that is never cloned
+ An object that defines a named expression.
Public Class Attributes
expr The expression owned by this data.
@@ -54,28 +53,39 @@ def __call__(self, exception=True):
return None
return self.expr(exception=exception)
- #
- # Ducktyping _ExpressionBase functionality
- #
+ def is_named_expression_type(self):
+ """A boolean indicating whether this in a named expression."""
+ return True
- def is_expression(self):
+ def is_expression_type(self):
"""A boolean indicating whether this in an expression."""
return True
+ def arg(self, index):
+ if index < 0 or index >= 1:
+ raise KeyError("Invalid index for expression argument: %d" % index)
+ return self.expr
+
@property
- def _args(self):
- """A tuple of subexpressions involved in this expressions operation."""
+ def _args_(self):
return (self.expr,)
- def _arguments(self):
- """A tuple of subexpressions involved in this expressions operation."""
- return (self.expr,)
+ @property
+ def args(self):
+ yield self.expr
+
+ def nargs(self):
+ return 1
def _precedence(self):
return 0
- def _to_string_prefix(self, ostream, verbose):
- ostream.write(self.name)
+ def _to_string(self, values, verbose, smap, compute_values):
+ if verbose:
+ return "%s{%s}" % (str(self), values[0])
+ if self.expr is None:
+ return "%s{None}" % str(self)
+ return values[0]
def clone(self):
"""Return a clone of this expression (no-op)."""
@@ -86,46 +96,15 @@ def _apply_operation(self, result):
# result
return result[0]
- def _is_constant_combiner(self):
- # We cannot allow elimination/simplification of Expression objects
- return lambda x: False
-
- def _is_fixed_combiner(self):
- return lambda x: x[0]
-
- def _potentially_variable_combiner(self):
- # Expression objects are potentially variable by definition
- return lambda x: True
-
def polynomial_degree(self):
"""A tuple of subexpressions involved in this expressions operation."""
return self.expr.polynomial_degree()
- def _polynomial_degree(self, result):
- return result.pop()
-
- def to_string(self, ostream=None, verbose=None, precedence=0, labeler=None):
- if ostream is None:
- ostream = sys.stdout
- _verbose = pyomo.core.base.expr_common.TO_STRING_VERBOSE if \
- verbose is None else verbose
- if _verbose:
- ostream.write(str(self))
- ostream.write("{")
- if self.expr is None:
- ostream.write("Undefined")
- else:
- self.expr.to_string( ostream=ostream, verbose=verbose,
- precedence=precedence, labeler=labeler )
- if _verbose:
- ostream.write("}")
+ def _compute_polynomial_degree(self, result):
+ return result[0]
- @property
- def _parent_expr(self):
- return None
- @_parent_expr.setter
- def _parent_expr(self, value):
- raise NotImplementedError
+ def _is_fixed(self, values):
+ return values[0]
#
# Abstract Interface
@@ -150,9 +129,10 @@ def is_fixed(self):
# _ExpressionData should never return False because
# they can store subexpressions that contain variables
- def _potentially_variable(self):
+ def is_potentially_variable(self):
return True
+
class _GeneralExpressionDataImpl(_ExpressionData):
"""
An object that defines an expression that is never cloned
@@ -165,36 +145,41 @@ class _GeneralExpressionDataImpl(_ExpressionData):
expr The expression owned by this data.
"""
- __pickle_slots__ = ('_expr',)
+ __pickle_slots__ = ('_expr', '_is_owned')
# any derived classes need to declare these as their slots,
# but ignore them in their __getstate__ implementation
- __expression_slots__ = __pickle_slots__ + (('_parent_expr',) if safe_mode else ())
+ __expression_slots__ = __pickle_slots__
__slots__ = ()
def __init__(self, expr=None):
self._expr = as_numeric(expr) if (expr is not None) else None
- if safe_mode:
- self._parent_expr = None
+ self._is_owned = True
+
+ def create_node_with_local_data(self, values, memo=None):
+ """
+ Construct a simple expression after constructing the
+ contained expression.
+
+ This class provides a consistent interface for constructing a
+ node, which is used in tree visitor scripts.
+ """
+ if id(self) in memo:
+ return memo[id(self)]
+ obj = SimpleExpression()
+ obj.construct()
+ obj.expr = values[0]
+ return obj
def __getstate__(self):
state = super(_GeneralExpressionDataImpl, self).__getstate__()
for i in _GeneralExpressionDataImpl.__expression_slots__:
state[i] = getattr(self, i)
- if safe_mode:
- state['_parent_expr'] = None
- if self._parent_expr is not None:
- _parent_expr = self._parent_expr()
- if _parent_expr is not None:
- state['_parent_expr'] = _parent_expr
return state
def __setstate__(self, state):
super(_GeneralExpressionDataImpl, self).__setstate__(state)
- if safe_mode:
- if self._parent_expr is not None:
- self._parent_expr = weakref_ref(self._parent_expr)
#
# Abstract Interface
diff --git a/pyomo/core/base/external.py b/pyomo/core/base/external.py
index 48bdf5d1646..05f67f80da8 100644
--- a/pyomo/core/base/external.py
+++ b/pyomo/core/base/external.py
@@ -18,9 +18,9 @@
Structure, POINTER, CFUNCTYPE, cdll, byref,
c_int, c_long, c_ulong, c_double, c_byte, c_char_p, c_void_p )
-from pyomo.core.base.numvalue import as_numeric
+from pyomo.core.expr.numvalue import as_numeric, native_types, NonNumericValue
+from pyomo.core.expr import current as EXPR
from pyomo.core.base.component import Component
-from pyomo.core.base import expr as EXPR
__all__ = ( 'ExternalFunction', )
@@ -31,7 +31,9 @@
logger = logging.getLogger('pyomo.core')
+
class ExternalFunction(Component):
+
def __new__(cls, *args, **kwds):
if cls != ExternalFunction:
return super(ExternalFunction, cls).__new__(cls)
@@ -54,11 +56,32 @@ def __init__(self, *args, **kwds):
self._index = None
def __call__(self, *args):
- idxs = reversed(six.moves.xrange(len(args)))
- for i in idxs:
- if type(args[i]) is types.GeneratorType:
- args = args[:i] + tuple(args[i]) + args[i+1:]
- return EXPR._ExternalFunctionExpression(self, args)
+ args_ = []
+ for arg in args:
+ if type(arg) is types.GeneratorType:
+ args_.extend(val for val in arg)
+ else:
+ args_.append(arg)
+ #
+ # Loop and do two thing:
+ # 1. Wrap non-numeric arguments
+ # 2. See if we have a potentially variable argument
+ #
+ pv = False
+ for i,arg in enumerate(args_):
+ try:
+ # Q: Is there a better way to test if a value is an object
+ # not in native_types and not a standard expression type?
+ if arg.__class__ in native_types or arg.is_expression_type():
+ pass
+ if not arg.__class__ in native_types and arg.is_potentially_variable():
+ pv = True
+ except AttributeError:
+ args_[i] = NonNumericValue(arg)
+ #
+ if pv:
+ return EXPR.ExternalFunctionExpression(args_, self)
+ return EXPR.NPV_ExternalFunctionExpression(args_, self)
def evaluate(self, args):
raise NotImplementedError(
@@ -66,6 +89,7 @@ def evaluate(self, args):
class AMPLExternalFunction(ExternalFunction):
+
def __init__(self, *args, **kwds):
if args:
raise ValueError(
@@ -86,8 +110,14 @@ def evaluate(self, args):
"external library %s.\n\tAvailable functions: (%s)"
% ( self._function, self._library,
', '.join(self._known_functions.keys()) ) )
-
- arglist = _ARGLIST( *args )
+ #
+ args_ = []
+ for arg in args:
+ if arg.__class__ is NonNumericValue:
+ args_.append(arg.value)
+ else:
+ args_.append(arg)
+ arglist = _ARGLIST( *args_ )
fcn = self._known_functions[self._function][0]
return fcn(byref(arglist))
@@ -163,11 +193,17 @@ def __call__(self, *args):
def evaluate(self, args):
if args.__class__ is types.GeneratorType:
args = tuple(args)
- _id = args[0]
+ args_ = []
+ for arg in args:
+ if arg.__class__ is NonNumericValue:
+ args_.append(arg.value)
+ else:
+ args_.append(arg)
+ _id = args_[0]
if _id != self._fcn_id:
raise RuntimeError(
"PythonCallbackFunction called with invalid Global ID" )
- return self._fcn(*args[1:])
+ return self._fcn(*args_[1:])
class _ARGLIST(Structure):
diff --git a/pyomo/core/base/indexed_component.py b/pyomo/core/base/indexed_component.py
index 26d040406e8..abfd01c7251 100644
--- a/pyomo/core/base/indexed_component.py
+++ b/pyomo/core/base/indexed_component.py
@@ -537,8 +537,8 @@ def __getitem__(self, index):
# due to circular imports (expr imports _VarData
# imports indexed_component, but we need expr
# here
- from pyomo.core.base import expr as EXPR
- if index.__class__ is EXPR._GetItemExpression:
+ from pyomo.core.expr import current as EXPR
+ if index.__class__ is EXPR.GetItemExpression:
return index
index = self._validate_index(index)
# _processUnhashableIndex could have found a slice, or
@@ -771,8 +771,8 @@ def _processUnhashableIndex(self, idx, _exception=None):
# due to circular imports (expr imports _VarData
# imports indexed_component, but we need expr
# here
- from pyomo.core.base import expr as EXPR
- return EXPR._GetItemExpression(self, idx)
+ from pyomo.core.expr import current as EXPR
+ return EXPR.GetItemExpression(tuple(idx), self)
except:
# There are other ways we could get an exception
# that is not TemplateExpressionError; most notably,
diff --git a/pyomo/core/base/numvalue.py b/pyomo/core/base/numvalue.py
index 6ace66f16cb..8b37704656e 100644
--- a/pyomo/core/base/numvalue.py
+++ b/pyomo/core/base/numvalue.py
@@ -9,5 +9,5 @@
# ___________________________________________________________________________
import sys
-from pyomo.core.kernel import numvalue
+from pyomo.core.expr import numvalue
sys.modules[__name__] = numvalue
diff --git a/pyomo/core/base/objective.py b/pyomo/core/base/objective.py
index 86cfff3bc44..0213cad0532 100644
--- a/pyomo/core/base/objective.py
+++ b/pyomo/core/base/objective.py
@@ -22,19 +22,17 @@
import inspect
from pyomo.util.timing import ConstructionTimer
-from pyomo.core.base.numvalue import as_numeric, value
+from pyomo.core.expr.numvalue import as_numeric, value
+from pyomo.core.expr import current as EXPR
from pyomo.core.base.plugin import register_component
from pyomo.core.base.component import ActiveComponentData
-from pyomo.core.base.indexed_component import (
- ActiveIndexedComponent,
- UnindexedComponent_set,
- _get_indexed_component_data_name,
-)
+from pyomo.core.base.indexed_component import (ActiveIndexedComponent,
+ UnindexedComponent_set)
from pyomo.core.base.expression import (_ExpressionData,
_GeneralExpressionDataImpl)
from pyomo.core.base.misc import apply_indexed_rule, tabular_writer
from pyomo.core.base.sets import Set
-from pyomo.core.kernel import minimize, maximize
+from pyomo.core.base import minimize, maximize
from six import iteritems
diff --git a/pyomo/core/base/param.py b/pyomo/core/base/param.py
index 27158a50da9..9c985b77fd9 100644
--- a/pyomo/core/base/param.py
+++ b/pyomo/core/base/param.py
@@ -139,13 +139,23 @@ def is_constant(self):
"""
return False
- def _potentially_variable(self):
+ def is_variable_type(self):
+ """
+ Returns False because this is not a variable object.
+ """
+ return False
+
+ def is_expression_type(self):
+ """Returns False because this is not an expression"""
+ return False
+
+ def is_potentially_variable(self):
"""
Returns False because this object can never reference variables.
"""
return False
- def _polynomial_degree(self, result):
+ def _compute_polynomial_degree(self, result):
"""
Returns 0 because this object can never reference variables.
"""
@@ -236,6 +246,10 @@ def __iter__(self):
return self._data.__iter__()
return self._index.__iter__()
+ def is_expression_type(self):
+ """Returns False because this is not an expression"""
+ return False
+
#
# These are "sparse equivalent" access / iteration methods that
# only loop over the defined data.
diff --git a/pyomo/core/base/rangeset.py b/pyomo/core/base/rangeset.py
index ac337dada75..59315bede49 100644
--- a/pyomo/core/base/rangeset.py
+++ b/pyomo/core/base/rangeset.py
@@ -15,11 +15,10 @@
from six.moves import xrange
from pyomo.util.timing import ConstructionTimer
+from pyomo.core.expr.numvalue import value
from pyomo.core.base.sets import OrderedSimpleSet
-from pyomo.core.base.expr import _ExpressionBase
from pyomo.core.base.set_types import Integers, Reals
from pyomo.core.base.misc import apply_indexed_rule
-from pyomo.core.base.numvalue import value
from pyomo.core.base.plugin import register_component
logger = logging.getLogger('pyomo.core')
diff --git a/pyomo/core/base/symbol_map.py b/pyomo/core/base/symbol_map.py
index 0b3f4eb2342..9a23252c7e5 100644
--- a/pyomo/core/base/symbol_map.py
+++ b/pyomo/core/base/symbol_map.py
@@ -8,7 +8,7 @@
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
-from pyomo.core.kernel.symbol_map import *
+from pyomo.core.expr.symbol_map import *
from pyomo.core.base.label import TextLabeler
def symbol_map_from_instance(instance):
diff --git a/pyomo/core/base/symbolic.py b/pyomo/core/base/symbolic.py
index 70faf6ec253..321562bff31 100644
--- a/pyomo/core/base/symbolic.py
+++ b/pyomo/core/base/symbolic.py
@@ -8,9 +8,11 @@
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
+from six import StringIO
+import pyutilib.misc
from pyomo import core
-from pyomo.core.base import expr_common, expr as EXPR
-from pyomo.core.base.numvalue import native_types
+from pyomo.core.expr import current as EXPR
+from pyomo.core.expr import native_types
from pyomo.util import DeveloperError
_sympy_available = True
@@ -24,7 +26,7 @@ def _prod(*x):
return ans
def _sum(*x):
- return sum(i for i in x)
+ return sum(x_ for x_ in x)
def _nondifferentiable(*x):
raise NondifferentiableError(
@@ -53,6 +55,26 @@ def _nondifferentiable(*x):
sympy.floor: lambda x: core.floor(x),
sympy.Derivative: _nondifferentiable,
}
+
+ _functionMap = {
+ 'exp': sympy.exp,
+ 'log': sympy.log,
+ 'log10': lambda x: sympy.log(x)/sympy.log(10),
+ 'sin': sympy.sin,
+ 'asin': sympy.asin,
+ 'sinh': sympy.sinh,
+ 'asinh': sympy.asinh,
+ 'cos': sympy.cos,
+ 'acos': sympy.acos,
+ 'cosh': sympy.cosh,
+ 'acosh': sympy.acosh,
+ 'tan': sympy.tan,
+ 'atan': sympy.atan,
+ 'tanh': sympy.tanh,
+ 'atanh': sympy.atanh,
+ 'ceil': sympy.ceiling,
+ 'floor': sympy.floor,
+ }
except ImportError: #pragma:nocover
_sympy_available = False
@@ -86,22 +108,29 @@ def differentiate(expr, wrt=None, wrt_list=None):
raise RuntimeError(
"The sympy module is not available. "
"Cannot perform automatic symbolic differentiation.")
-
if not (( wrt is None ) ^ ( wrt_list is None )):
raise ValueError(
"differentiate(): Must specify exactly one of wrt and wrt_list")
+ #
+ # Setup the WRT list
+ #
if wrt is not None:
wrt_list = [ wrt ]
else:
# Copy the list because we will normalize things in place below
wrt_list = list(wrt_list)
-
+ #
+ # Setup mapping dictionaries
+ #
pyomo_vars = list(EXPR.identify_variables(expr))
+ pyomo_vars = sorted(pyomo_vars, key=lambda x: str(x))
sympy_vars = [sympy.var('x%s'% i) for i in range(len(pyomo_vars))]
sympy2pyomo = dict( zip(sympy_vars, pyomo_vars) )
pyomo2sympy = dict( (id(pyomo_vars[i]), sympy_vars[i])
for i in range(len(pyomo_vars)) )
-
+ #
+ # Process WRT information
+ #
ans = []
for i, target in enumerate(wrt_list):
if target.__class__ is not tuple:
@@ -113,106 +142,132 @@ def differentiate(expr, wrt=None, wrt_list=None):
break
wrt_list[i] = tuple( pyomo2sympy.get(id(var),None) for var in target )
ans.append(0 if mismatch_target else None)
-
+ #
# If there is nothing to do, do nothing
+ #
if all(i is not None for i in ans):
return ans if wrt is None else ans[0]
-
- tmp_expr = EXPR.clone_expression( expr, substitute=pyomo2sympy )
- tmp_expr = _map_intrinsic_functions(tmp_expr, sympy2pyomo)
- tmp_expr = str(tmp_expr)
-
- sympy_expr = sympy.sympify(
- tmp_expr, locals=dict((str(x), x) for x in sympy_vars) )
-
+ #
+ # Create sympy expression
+ #
+ sympy_expr = sympify_expression(expr, sympy2pyomo, pyomo2sympy)
+ #
+ # Differentiate for each WRT variable, and map the
+ # result back into a Pyomo expression tree.
+ #
for i, target in enumerate(wrt_list):
if ans[i] is None:
sympy_ans = sympy_expr.diff(*target)
ans[i] = _map_sympy2pyomo(sympy_ans, sympy2pyomo)
-
+ #
+ # Return the answer
+ #
return ans if wrt is None else ans[0]
-def _map_intrinsic_functions(expr, sympySymbols):
- coopr3_mode = expr_common.mode is expr_common.Mode.coopr3_trees
+# =====================================================
+# sympify_expression
+# =====================================================
+
+class SympifyVisitor(EXPR.ExpressionValueVisitor):
+
+ def __init__(self, native_or_sympy_types, pyomo2sympy):
+ self.native_or_sympy_types = native_or_sympy_types
+ self.pyomo2sympy = pyomo2sympy
+
+ def visit(self, node, values):
+ if node.__class__ is EXPR.UnaryFunctionExpression:
+ return _functionMap[node._name](values[0])
+ else:
+ return node._apply_operation(values)
+
+ def visiting_potential_leaf(self, node):
+ #
+ # Don't replace native or sympy types
+ #
+ if type(node) in self.native_or_sympy_types:
+ return True, node
+ #
+ # Replace pyomo variables with sympy variables
+ #
+ if id(node) in self.pyomo2sympy:
+ return True, self.pyomo2sympy[id(node)]
+ #
+ # Replace constants
+ #
+ if not node.is_potentially_variable():
+ return True, value(node)
+ #
+ # Don't replace anything else
+ #
+ return False, None
+
+ def finalize(self, ans):
+ return ans
+
+def sympify_expression(expr, sympySymbols, pyomo2sympy):
+ #
+ # Handle simple cases
+ #
+ if expr.__class__ in native_types:
+ return expr
+ if not expr.is_expression_type():
+ if id(expr) in pyomo2sympy:
+ return pyomo2sympy[id(expr)]
+ return expr
+ #
+ # Create the visitor and call it.
+ #
native_or_sympy_types = set(native_types)
native_or_sympy_types.add( type(list(sympySymbols)[0]) )
+ visitor = SympifyVisitor(native_or_sympy_types, pyomo2sympy)
+ return visitor.dfs_postorder_stack(expr)
+
+
+# =====================================================
+# _map_sympy2pyomo
+# =====================================================
+
+class Sympy2PyomoVisitor(pyutilib.misc.ValueVisitor):
- _stack = [ ([expr], 0, 1) ]
- while _stack:
- _argList, _idx, _len = _stack.pop()
- while _idx < _len:
- _sub = _argList[_idx]
- _idx += 1
- if type(_sub) in native_or_sympy_types:
- pass
- elif _sub.is_expression():
- # Substitute intrinsic function names
- if _sub.__class__ is EXPR._IntrinsicFunctionExpression:
- if _sub._name == 'ceil':
- _sub._name = 'ceiling'
- if _sub._name == 'log10':
- _sub._name = 'log'
- _sub = _sub / EXPR.log(10)
- if _argList.__class__ is tuple:
- # Scary: this assumes the args are ONLY
- # stored in the _args attribute of the
- # parent node. This is true for everything
- # except Coopr3 _ProductExpression.
- # Fortunately, those arguments are lists
- # (and not tuples), so we will hit the
- # in-place modification below. This is also
- # not the case for the root node -- but we
- # also force that to be a list above.
- tmp = list(_argList)
- tmp[_idx-1] = _sub
- _argList = tuple(tmp)
- _stack[-1][0][ _stack[-1][1]-1 ]._args = _argList
- else:
- _argList[_idx-1] = _sub
-
- _stack.append(( _argList, _idx, _len ))
- if coopr3_mode and type(_sub) is EXPR._ProductExpression:
- if _sub._denominator:
- _stack.append(
- (_sub._denominator, 0, len(_sub._denominator)) )
- _argList = _sub._numerator
- else:
- _argList = _sub._args
- _idx = 0
- _len = len(_argList)
- return _argList[0]
+ def __init__(self, sympy2pyomo):
+ self.sympy2pyomo = sympy2pyomo
+ def visit(self, node, values):
+ """ Visit nodes that have been expanded """
+ _sympyOp = node
+ _op = _operatorMap.get( type(_sympyOp), None )
+ if _op is None:
+ raise DeveloperError(
+ "sympy expression type '%s' not found in the operator "
+ "map" % type(_sympyOp) )
+ return _op(*tuple(values))
+
+ def visiting_potential_leaf(self, node):
+ """
+ Visiting a potential leaf.
+
+ Return True if the node is not expanded.
+ """
+ if not node._args:
+ if node in self.sympy2pyomo:
+ return True, self.sympy2pyomo[node]
+ else:
+ return True, float(node.evalf())
+ return False, None
+
+ def children(self, node):
+ return list(node._args)
+
+ def finalize(self, ans):
+ return ans
def _map_sympy2pyomo(expr, sympy2pyomo):
- _stack = [ ([expr], 0, 1) ]
- while 1:
- _argList, _idx, _len = _stack.pop()
- while _idx < _len:
- _sub = _argList[_idx]
- _idx += 1
- if not _sub._args:
- if _sub in sympy2pyomo:
- _sub = _argList[_idx-1] = sympy2pyomo[_sub]
- else:
- _sub = _argList[_idx-1] = float(_sub.evalf())
- continue
-
- _stack.append(( _argList, _idx, _len ))
- _argList = list(_sub._args)
- _idx = 0
- _len = len(_argList)
-
- # Substitute the operator
- if not _stack:
- return _argList[0]
+ if not expr._args:
+ if expr in sympy2pyomo:
+ return sympy2pyomo[expr]
else:
- _sympyOp = _stack[-1][0][ _stack[-1][1]-1 ]
- _op = _operatorMap.get( type(_sympyOp), None )
- if _op is None:
- raise DeveloperError(
- "sympy expression type '%s' not found in the operator "
- "map for expression %s"
- % (type(_sympyOp), expr) )
- _stack[-1][0][ _stack[-1][1]-1 ] = _op(*tuple(_argList))
- # No return
+ return float(expr.evalf())
+ visitor = Sympy2PyomoVisitor(sympy2pyomo)
+ return visitor.dfs_postorder_stack(expr)
+
diff --git a/pyomo/core/base/template_expr.py b/pyomo/core/base/template_expr.py
index 3f86e158209..9278d0ef655 100644
--- a/pyomo/core/base/template_expr.py
+++ b/pyomo/core/base/template_expr.py
@@ -8,21 +8,34 @@
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
-from pyomo.core.base.numvalue import (
+import copy
+import logging
+from pyomo.core.expr import current as EXPR
+from pyomo.core.expr.numvalue import (
NumericValue, native_numeric_types, as_numeric, value )
import pyomo.core.base
-import logging
+
class TemplateExpressionError(ValueError):
+
def __init__(self, template, *args, **kwds):
self.template = template
super(TemplateExpressionError, self).__init__(*args, **kwds)
class IndexTemplate(NumericValue):
- """This class can be used to greate "template expressions"
+ """A "placeholder" for an index value in template expressions.
+
+ This class is a placeholder for an index value within a template
+ expression. That is, given the expression template for "m.x[i]",
+ where `m.z` is indexed by `m.I`, the expression tree becomes:
+
+ _GetItem:
+ - m.x
+ - IndexTemplate(_set=m.I, _value=None)
Constructor Arguments:
+ _set: the Set from which this IndexTemplate can take values
"""
__slots__ = ('_set', '_value')
@@ -56,7 +69,7 @@ def __deepcopy__(self, memo):
# "Normal" deepcopying outside the context of pyomo.
#
ans = memo[id(self)] = self.__class__.__new__(self.__class__)
- ans.__setstate__(deepcopy(self.__getstate__(), memo))
+ ans.__setstate__(copy.deepcopy(self.__getstate__(), memo))
return ans
# Note: because NONE of the slots on this class need to be edited,
@@ -67,7 +80,9 @@ def __call__(self, exception=True):
Return the value of this object.
"""
if self._value is None:
- raise TemplateExpressionError(self)
+ if exception:
+ raise TemplateExpressionError(self)
+ return None
else:
return self._value
@@ -83,8 +98,13 @@ def is_constant(self):
"""
return False
- def _potentially_variable(self):
- """Returns True because this is a variable."""
+ def is_potentially_variable(self):
+ """Returns False because index values cannot be variables.
+
+ The IndexTemplate represents a placeholder for an index value
+ for an IndexedComponent, and at the moment, Pyomo does not
+ support variable indirection.
+ """
return False
def __str__(self):
@@ -93,10 +113,8 @@ def __str__(self):
def getname(self, fully_qualified=False, name_buffer=None):
return "{"+self._set.getname(fully_qualified, name_buffer)+"}"
- def to_string(self, ostream=None, verbose=None, precedence=0, labeler=None):
- if ostream is None:
- ostream = sys.stdout
- ostream.write( self.name )
+ def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False):
+ return self.name
def set_value(self, value):
# It might be nice to check if the value is valid for the base
@@ -105,15 +123,29 @@ def set_value(self, value):
self._value = value
+class ReplaceTemplateExpression(EXPR.ExpressionReplacementVisitor):
+
+ def __init__(self, substituter, *args):
+ super(ReplaceTemplateExpression,self).__init__(self)
+ self.substituter = substituter
+ self.substituter_args = args
+
+ def visiting_potential_leaf(self, node):
+ if type(node) is EXPR.GetItemExpression or type(node) is IndexTemplate:
+ return True, self.substituter(node, *self.substituter_args)
+
+ if type(node) in native_numeric_types or not node.is_expression_type():
+ return True, node
+
+ return False, None
+
+
def substitute_template_expression(expr, substituter, *args):
"""Substitute IndexTemplates in an expression tree.
This is a general utility function for walking the expression tree
- ans subtituting all occurances of IndexTemplate and
- _GetItemExpression nodes. The routine is a general expression
- walker for both Coopr3 / Pyomo4 expressions. This borrows from
- pseudo-visitor pattern to defer the actual substitution to the
- substituter function / arguments passed to this method.
+ and subtituting all occurances of IndexTemplate and
+ _GetItemExpression nodes.
Args:
substituter: method taking (expression, *args) and returning
@@ -123,67 +155,19 @@ def substitute_template_expression(expr, substituter, *args):
Returns:
a new expression tree with all substitutions done
"""
- # Again, due to circular imports, we cannot import expr at the
- # module scope because this module gets imported by expr
- from pyomo.core.base import expr as EXPR
- from pyomo.core.base import expr_common as common
-
- _stack = [ [[expr.clone()], 0, 1, None] ]
- _stack_idx = 0
- while _stack_idx >= 0:
- _ptr = _stack[_stack_idx]
- while _ptr[1] < _ptr[2]:
- _obj = _ptr[0][_ptr[1]]
- _ptr[1] += 1
- _subType = type(_obj)
- if _subType is EXPR._GetItemExpression or _subType is IndexTemplate:
- if type(_ptr[0]) is tuple:
- _list = list(_ptr[0])
- _list[_ptr[1]-1] = substituter(_obj, *args)
- _ptr[0] = tuple(_list)
- _ptr[3]._args = _list
- else:
- _ptr[0][_ptr[1]-1] = substituter(_obj, *args)
- elif _subType in native_numeric_types or not _obj.is_expression():
- continue
- elif _subType is EXPR._ProductExpression:
- # _ProductExpression is fundamentally different in
- # Coopr3 / Pyomo4 expression systems and must be handled
- # specially.
- if common.mode is common.Mode.coopr3_trees:
- _lists = (_obj._numerator, _obj._denominator)
- else:
- _lists = (_obj._args,)
- for _list in _lists:
- if not _list:
- continue
- _stack_idx += 1
- _ptr = [_list, 0, len(_list), _obj]
- if _stack_idx < len(_stack):
- _stack[_stack_idx] = _ptr
- else:
- _stack.append( _ptr )
- else:
- if not _obj._args:
- continue
- _stack_idx += 1
- _ptr = [_obj._args, 0, len(_obj._args), _obj]
- if _stack_idx < len(_stack):
- _stack[_stack_idx] = _ptr
- else:
- _stack.append( _ptr )
- _stack_idx -= 1
- return _stack[0][0][0]
+ visitor = ReplaceTemplateExpression(substituter, *args)
+ return visitor.dfs_postorder_stack(expr)
class _GetItemIndexer(object):
# Note that this class makes the assumption that only one template
# ever appears in an expression for a single index
+
def __init__(self, expr):
self._base = expr._base
self._args = []
_hash = [ id(self._base) ]
- for x in expr._args:
+ for x in expr.args:
try:
logging.disable(logging.CRITICAL)
val = value(x)
@@ -203,6 +187,12 @@ def __init__(self, expr):
self._hash = tuple(_hash)
+ def nargs(self):
+ return len(self._args)
+
+ def arg(self, i):
+ return self._args[i]
+
def __hash__(self):
return hash(self._hash)
@@ -216,6 +206,7 @@ def __str__(self):
return "%s[%s]" % (
self._base.name, ','.join(str(x) for x in self._args) )
+
def substitute_getitem_with_param(expr, _map):
"""A simple substituter to replace _GetItem nodes with mutable Params.
@@ -223,7 +214,6 @@ def substitute_getitem_with_param(expr, _map):
new Param. For example, this method will create expressions
suitable for passing to DAE integrators
"""
-
if type(expr) is IndexTemplate:
return expr
diff --git a/pyomo/core/base/util.py b/pyomo/core/base/util.py
index 877be0c1161..dcd017993cd 100644
--- a/pyomo/core/base/util.py
+++ b/pyomo/core/base/util.py
@@ -12,115 +12,7 @@
# Utility functions
#
-__all__ = ['summation', 'dot_product', 'sequence', 'prod']
-
import inspect
-from six.moves import xrange
-from functools import reduce
-import operator
-
-
-def prod(factors):
- """
- A utility function to compute the product of a list of factors.
- """
- return reduce(operator.mul, factors, 1)
-
-
-def summation(*args, **kwds):
- """
- A utility function to compute a generalized dot product. The following examples illustrate
- the use of this function:
-
- summation(x)
- Sum the elements of x
-
- summation(x,y)
- Sum the product of elements in x and y
-
- summation(x,y, index=z)
- Sum the product of elements in x and y, over the index set z
-
- summation(x, denom=a)
- Sum the product of x_i/a_i
-
- summation(denom=(a,b))
- Sum the product of 1/(a_i*b_i)
- """
- # breaks import loop between var.py and util.py
- import pyomo.core.base.var
-
- denom = kwds.pop('denom', tuple() )
-
- if type(denom) not in (list, tuple):
- denom = [denom]
- if len(args) == 0 and len(denom) == 0:
- raise ValueError("The summation() command requires at least an " + \
- "argument or a denominator term")
- if 'index' in kwds:
- index=kwds['index']
- else:
- if len(args) > 0:
- iarg=args[-1]
- if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression):
- raise ValueError("Error executing summation(): The last argument value must be a variable or expression object if no 'index' option is specified")
- else:
- iarg=denom[-1]
- if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression):
- raise ValueError("Error executing summation(): The last denom argument value must be a variable or expression object if no 'index' option is specified")
- index = iarg.index_set()
-
- ans = 0
- num_index = range(0,len(args))
- denom_index = range(0,len(denom))
- #
- # Iterate through all indices
- #
- for i in index:
- #
- # Iterate through all arguments
- #
- item = 1
- for j in num_index:
- item *= args[j][i]
- for j in denom_index:
- item /= denom[j][i]
- ans += item
- return ans
-
-
-def dot_product(*args, **kwds):
- """
- A synonym for the summation() function.
- """
- return summation(*args, **kwds)
-
-
-def sequence(*args):
- """
- sequence([start,] stop[, step]) -> generator for a list of integers
-
- Return a generator that creates a list containing an arithmetic
- progression of integers.
- sequence(i, j) returns [i, i+1, i+2, ..., j];
- start defaults to 1.
- step specifies the increment (or decrement)
- For example, sequence(4) returns [1, 2, 3, 4].
- """
- if len(args) == 0:
- raise ValueError('sequence expected at least 1 arguments, got 0')
- if len(args) > 3:
- raise ValueError('sequence expected at most 3 arguments, got %d' % len(args))
- if len(args) == 1:
- return xrange(1,args[0]+1)
- if len(args) == 2:
- return xrange(args[0],args[1]+1)
- return xrange(args[0],args[1]+1,args[2])
-
-
-def xsequence(*args):
- print("WARNING: The xsequence function is deprecated. Use the sequence function, which returns a generator.")
- return sequence(*args)
def is_functor(obj):
diff --git a/pyomo/core/base/var.py b/pyomo/core/base/var.py
index 471f6e6b44f..0928a1b74ce 100644
--- a/pyomo/core/base/var.py
+++ b/pyomo/core/base/var.py
@@ -8,7 +8,7 @@
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
-__all__ = ['Var', '_VarData', 'VarList']
+__all__ = ['Var', '_VarData', '_GeneralVarData', 'VarList', 'SimpleVar']
import logging
from weakref import ref as weakref_ref
@@ -136,11 +136,19 @@ def is_constant(self):
"""Returns False because this is not a constant in an expression."""
return False
- def _potentially_variable(self):
+ def is_variable_type(self):
"""Returns True because this is a variable."""
return True
- def _polynomial_degree(self, result):
+ def is_expression_type(self):
+ """Returns False because this is not an expression"""
+ return False
+
+ def is_potentially_variable(self):
+ """Returns True because this is a variable."""
+ return True
+
+ def _compute_polynomial_degree(self, result):
"""
If the variable is fixed, it represents a constant
is a polynomial with degree 0. Otherwise, it has
@@ -253,6 +261,18 @@ def unfix(self):
free=unfix
+ def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False):
+ """Return the component name"""
+ if self.fixed and compute_values:
+ try:
+ return str(self())
+ except:
+ pass
+ if smap:
+ return smap.getSymbol(self, labeler)
+ return self.name
+
+
class _GeneralVarData(_VarData):
"""
This class defines the data for a single variable.
@@ -433,6 +453,7 @@ def unfix(self):
free = unfix
+
class Var(IndexedComponent):
"""A numeric variable, which may be defined over an index.
@@ -509,6 +530,10 @@ def __init__(self, *args, **kwd):
elif bounds is not None:
raise ValueError("Variable 'bounds' keyword must be a tuple or function")
+ def is_expression_type(self):
+ """Returns False because this is not an expression"""
+ return False
+
def flag_as_stale(self):
"""
Set the 'stale' attribute of every variable data object to True.
diff --git a/pyomo/core/expr/__init__.py b/pyomo/core/expr/__init__.py
new file mode 100644
index 00000000000..92986d5a8e8
--- /dev/null
+++ b/pyomo/core/expr/__init__.py
@@ -0,0 +1,29 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+
+#
+# The definition of __all__ is a bit funky here, because we want to
+# expose symbols in pyomo.core.expr.current that are not included in
+# pyomo.core.expr. The idea is that pyomo.core.expr provides symbols
+# that are used by general users, but pyomo.core.expr.current provides
+# symbols that are used by developers.
+#
+__all__ = []
+
+from pyomo.core.expr import current
+__all__.extend(current._public)
+for obj in current._public:
+ globals()[obj] = getattr(current, obj)
+
+from pyomo.core.expr import numvalue
+__all__.extend(numvalue.__all__)
+for obj in numvalue.__all__:
+ globals()[obj] = getattr(numvalue, obj)
+
diff --git a/pyomo/core/expr/current.py b/pyomo/core/expr/current.py
new file mode 100755
index 00000000000..54656f2a332
--- /dev/null
+++ b/pyomo/core/expr/current.py
@@ -0,0 +1,131 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+
+from __future__ import division
+import math
+import copy
+
+#
+# Data and methods that are exposed when importing pyomo.core.expr
+#
+_public = ['log', 'log10', 'sin', 'cos', 'tan', 'cosh', 'sinh', 'tanh',
+ 'asin', 'acos', 'atan', 'exp', 'sqrt', 'asinh', 'acosh',
+ 'atanh', 'ceil', 'floor']
+
+#
+# Data and methods that are exposed when importing pyomo.core.expr.current
+#
+__all__ = copy.copy(_public)
+
+#
+# Provide a global value that indicates which expression system is being used
+#
+class Mode(object):
+ coopr3_trees = (1,)
+ pyomo4_trees = (2,)
+ pyomo5_trees = (3,)
+mode = Mode.pyomo5_trees
+
+#
+# Pull symbols from the appropriate expression system
+#
+# Pyomo5
+if mode == Mode.pyomo5_trees:
+ from pyomo.core.expr import expr_pyomo5 as curr
+ _public.extend(curr._public)
+ for obj in curr.__all__:
+ globals()[obj] = getattr(curr, obj)
+else:
+ raise ValueError("WEH - Other expression systems aren't working right now.") #pragma: no cover
+
+
+
+# Initialize numvalue functions
+from pyomo.core.expr import numvalue
+numvalue._generate_sum_expression = _generate_sum_expression
+numvalue._generate_mul_expression = _generate_mul_expression
+numvalue._generate_other_expression = _generate_other_expression
+numvalue._generate_relational_expression = _generate_relational_expression
+
+
+def Expr_if(IF=None, THEN=None, ELSE=None):
+ """
+ Function used to construct a logical conditional expression.
+ """
+ return Expr_ifExpression(IF_=IF, THEN_=THEN, ELSE_=ELSE)
+
+#
+# Common intrinsic functions
+#
+from pyomo.core.expr import expr_common as common
+
+#
+# NOTE: abs() and pow() are not defined here, because they are
+# Python operators.
+#
+def ceil(arg):
+ return _generate_intrinsic_function_expression(arg, 'ceil', math.ceil)
+
+def floor(arg):
+ return _generate_intrinsic_function_expression(arg, 'floor', math.floor)
+
+# e ** x
+def exp(arg):
+ return _generate_intrinsic_function_expression(arg, 'exp', math.exp)
+
+def log(arg):
+ return _generate_intrinsic_function_expression(arg, 'log', math.log)
+
+def log10(arg):
+ return _generate_intrinsic_function_expression(arg, 'log10', math.log10)
+
+# FIXME: this is nominally the same as x ** 0.5, but follows a different
+# path and produces a different NL file!
+def sqrt(arg):
+ return _generate_intrinsic_function_expression(arg, 'sqrt', math.sqrt)
+# return _generate_expression(common._pow, arg, 0.5)
+
+
+def sin(arg):
+ return _generate_intrinsic_function_expression(arg, 'sin', math.sin)
+
+def cos(arg):
+ return _generate_intrinsic_function_expression(arg, 'cos', math.cos)
+
+def tan(arg):
+ return _generate_intrinsic_function_expression(arg, 'tan', math.tan)
+
+def sinh(arg):
+ return _generate_intrinsic_function_expression(arg, 'sinh', math.sinh)
+
+def cosh(arg):
+ return _generate_intrinsic_function_expression(arg, 'cosh', math.cosh)
+
+def tanh(arg):
+ return _generate_intrinsic_function_expression(arg, 'tanh', math.tanh)
+
+
+def asin(arg):
+ return _generate_intrinsic_function_expression(arg, 'asin', math.asin)
+
+def acos(arg):
+ return _generate_intrinsic_function_expression(arg, 'acos', math.acos)
+
+def atan(arg):
+ return _generate_intrinsic_function_expression(arg, 'atan', math.atan)
+
+def asinh(arg):
+ return _generate_intrinsic_function_expression(arg, 'asinh', math.asinh)
+
+def acosh(arg):
+ return _generate_intrinsic_function_expression(arg, 'acosh', math.acosh)
+
+def atanh(arg):
+ return _generate_intrinsic_function_expression(arg, 'atanh', math.atanh)
diff --git a/pyomo/core/expr/expr_common.py b/pyomo/core/expr/expr_common.py
new file mode 100644
index 00000000000..46404469dcd
--- /dev/null
+++ b/pyomo/core/expr/expr_common.py
@@ -0,0 +1,56 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+
+TO_STRING_VERBOSE=False
+
+_add = 1
+_sub = 2
+_mul = 3
+_div = 4
+_pow = 5
+_neg = 6
+_abs = 7
+_inplace = 10
+_unary = _neg
+
+_radd = -_add
+_iadd = _inplace+_add
+_rsub = -_sub
+_isub = _inplace+_sub
+_rmul = -_mul
+_imul = _inplace+_mul
+_rdiv = -_div
+_idiv = _inplace+_div
+_rpow = -_pow
+_ipow = _inplace+_pow
+
+_old_etype_strings = {
+ 'add' : _add,
+ 'radd' : -_add,
+ 'iadd' : _inplace+_add,
+ 'sub' : _sub,
+ 'rsub' : -_sub,
+ 'isub' : _inplace+_sub,
+ 'mul' : _mul,
+ 'rmul' : -_mul,
+ 'imul' : _inplace+_mul,
+ 'div' : _div,
+ 'rdiv' : -_div,
+ 'idiv' : _inplace+_div,
+ 'pow' : _pow,
+ 'rpow' : -_pow,
+ 'ipow' : _inplace+_pow,
+ 'neg' : _neg,
+ 'abs' : _abs,
+ }
+
+_eq = 0
+_le = 1
+_lt = 2
diff --git a/pyomo/core/kernel/expr_coopr3.py b/pyomo/core/expr/expr_coopr3.py
similarity index 98%
rename from pyomo/core/kernel/expr_coopr3.py
rename to pyomo/core/expr/expr_coopr3.py
index 9cf6ecf0117..2184ae4a463 100755
--- a/pyomo/core/kernel/expr_coopr3.py
+++ b/pyomo/core/expr/expr_coopr3.py
@@ -14,6 +14,14 @@
import math
import sys
import traceback
+from copy import deepcopy
+
+try:
+ from sys import getrefcount
+ _getrefcount_available = True
+except ImportError:
+ getrefcount = None
+ _getrefcount_available = False
logger = logging.getLogger('pyomo.core')
@@ -27,19 +35,18 @@
#from pyomo.util.plugin import *
#from pyomo.core.kernel.component import Component
-from pyomo.core.kernel.numvalue import *
-from pyomo.core.kernel.numvalue import (native_numeric_types,
+from pyomo.core.expr.numvalue import *
+from pyomo.core.expr.numvalue import (native_numeric_types,
native_types)
-from pyomo.core.kernel.expr_common import \
+from pyomo.core.expr.expr_common import \
(_add, _sub, _mul, _div, _pow,
_neg, _abs, _inplace, _unary,
_radd, _rsub, _rmul, _rdiv, _rpow,
_iadd, _isub, _imul, _idiv, _ipow,
- _lt, _le, _eq, clone_expression,
- chainedInequalityErrorMessage as cIEM,
- _getrefcount_available, getrefcount)
-from pyomo.core.kernel import expr_common as common
+ _lt, _le, _eq,
+ chainedInequalityErrorMessage as cIEM)
+from pyomo.core.expr import expr_common as common
# Wrap the common chainedInequalityErrorMessage to pass the
# local context
@@ -64,6 +71,17 @@ def count(self):
sum = builtins.sum
+
+def compress_expression(exp):
+ return exp
+
+def clone_expression(exp, substitute=None):
+ memo = {'__block_scope__': { id(None): False }}
+ if substitute:
+ memo.update(substitute)
+ return deepcopy(exp, memo)
+
+
def identify_variables(expr,
include_fixed=True,
allow_duplicates=False,
@@ -80,7 +98,7 @@ def identify_variables(expr,
_idx += 1
if type(_sub) in native_types:
pass
- elif _sub.is_expression():
+ elif _sub.is_expression_type():
_stack.append(( _argList, _idx, _len ))
if type(_sub) is _ProductExpression:
if _sub._denominator:
@@ -186,7 +204,7 @@ def _potentially_variable(self):
return True
return False
- def is_expression(self):
+ def is_expression_type(self):
return True
def polynomial_degree(self, ):
@@ -238,7 +256,7 @@ def __str__(self):
class _ExternalFunctionExpression(_ExpressionBase):
__slots__ = ('_fcn',)
- def __init__(self, fcn, args):
+ def __init__(self, args, fcn):
"""Construct a call to an external function"""
_args = tuple(
_generate_expression__clone_if_needed(
@@ -814,7 +832,7 @@ def _apply_operation(self, values):
class _GetItemExpression(_ExpressionBase):
__slots__ = ('_base',)
- def __init__(self, base, args):
+ def __init__(self, args, base):
"""Construct a call to an external function"""
_ExpressionBase.__init__(self, args)
self._base = base
@@ -975,6 +993,7 @@ def __exit__(self, *args):
_generate_expression__noCloneCheck
bypass_clone_check.currently_bypassing = False
+ignore_entangled_expressions = bypass_clone_check
_old_relational_strings = {
@@ -997,13 +1016,13 @@ def generate_expression(etype, _self, other, targetRefs=None):
if etype > _inplace: #and etype < 2*_inplace:#etype[0] == 'i':
#etype = etype[1:]
etype -= _inplace
- if _self.is_expression():
+ if _self.is_expression_type():
_self = _generate_expression__clone_if_needed(_self, 1)
elif _self.is_constant():
_self = _self()
self_type = None
else:
- if _self.is_expression():
+ if _self.is_expression_type():
_self = _generate_expression__clone_if_needed(_self, 0)
elif _self.is_constant():
_self = _self()
@@ -1051,7 +1070,7 @@ def generate_expression(etype, _self, other, targetRefs=None):
pass
other = as_numeric(other)
other_type = other.__class__
- if other.is_expression():
+ if other.is_expression_type():
other = _generate_expression__clone_if_needed(other, 0)
elif other.is_constant():
other = other()
@@ -1441,7 +1460,7 @@ def generate_relational_expression(etype, lhs, rhs):
pass
raise e
- if lhs.is_expression():
+ if lhs.is_expression_type():
lhs = _generate_relational_expression__clone_if_needed(lhs)
if lhs.is_relational():
lhs_is_relational = True
@@ -1460,7 +1479,7 @@ def generate_relational_expression(etype, lhs, rhs):
except AttributeError:
pass
raise e
- if rhs.is_expression():
+ if rhs.is_expression_type():
rhs = _generate_relational_expression__clone_if_needed(rhs)
if rhs.is_relational():
rhs_is_relational = True
@@ -1649,7 +1668,7 @@ def generate_intrinsic_function_expression(arg, name, fcn):
pass
raise e
- if arg.is_expression():
+ if arg.is_expression_type():
arg = _generate_intrinsic_function_expression__clone_if_needed(arg)
return _IntrinsicFunctionExpression(name, 1, (arg,), fcn)
diff --git a/pyomo/core/kernel/expr_pyomo4.py b/pyomo/core/expr/expr_pyomo4.py
similarity index 97%
rename from pyomo/core/kernel/expr_pyomo4.py
rename to pyomo/core/expr/expr_pyomo4.py
index 370479b70d8..11294087e35 100644
--- a/pyomo/core/kernel/expr_pyomo4.py
+++ b/pyomo/core/expr/expr_pyomo4.py
@@ -13,6 +13,14 @@
import logging
import sys
import traceback
+from copy import deepcopy
+
+try:
+ from sys import getrefcount
+ _getrefcount_available = True
+except ImportError:
+ getrefcount = None
+ _getrefcount_available = False
logger = logging.getLogger('pyomo.core')
@@ -20,25 +28,23 @@
from six.moves import xrange, builtins
from weakref import ref
-from pyomo.core.kernel.numvalue import \
+from pyomo.core.expr.numvalue import \
(NumericValue,
NumericConstant,
native_types,
native_numeric_types,
as_numeric,
value)
-from pyomo.core.kernel.expr_common import \
+from pyomo.core.expr.expr_common import \
(bypass_backreference,
- _getrefcount_available,
- getrefcount,
_add, _sub, _mul, _div,
_pow, _neg, _abs, _inplace,
_unary, _radd, _rsub, _rmul,
_rdiv, _rpow, _iadd, _isub,
_imul, _idiv, _ipow, _lt, _le,
- _eq, clone_expression,
+ _eq,
chainedInequalityErrorMessage as cIEM)
-from pyomo.core.kernel import expr_common as common
+from pyomo.core.expr import expr_common as common
UNREFERENCED_EXPR_COUNT = 11
UNREFERENCED_INTRINSIC_EXPR_COUNT = -2
@@ -76,6 +82,15 @@ def _sum_with_iadd(iterable):
sum = builtins.sum if _getrefcount_available else _sum_with_iadd
+def compress_expression(exp):
+ return exp
+
+def clone_expression(exp, substitute=None):
+ memo = {'__block_scope__': { id(None): False }}
+ if substitute:
+ memo.update(substitute)
+ return deepcopy(exp, memo)
+
class clone_counter_context(object):
_count = 0
@@ -109,7 +124,7 @@ def identify_variables(expr,
_idx += 1
if _sub.__class__ in native_types:
pass
- elif _sub.is_expression():
+ elif _sub.is_expression_type():
_stack.append(( _argList, _idx, _len ))
_argList = _sub._args
_idx = 0
@@ -144,7 +159,7 @@ def _generate_expression__clone_if_needed__getrefcount(target, inplace, *objs):
continue
try:
- obj_expr = obj.is_expression()
+ obj_expr = obj.is_expression_type()
except AttributeError:
try:
if obj.is_indexed():
@@ -156,7 +171,7 @@ def _generate_expression__clone_if_needed__getrefcount(target, inplace, *objs):
except AttributeError:
pass
obj = as_numeric(obj)
- obj_expr = obj.is_expression()
+ obj_expr = obj.is_expression_type()
if not obj_expr:
if obj.is_constant():
@@ -188,7 +203,7 @@ def _generate_expression__clone_if_needed__parent_expr(target, inplace, *objs):
continue
try:
- obj_expr = obj.is_expression()
+ obj_expr = obj.is_expression_type()
except AttributeError:
try:
if obj.is_indexed():
@@ -200,7 +215,7 @@ def _generate_expression__clone_if_needed__parent_expr(target, inplace, *objs):
except AttributeError:
pass
obj = as_numeric(obj)
- obj_expr = obj.is_expression()
+ obj_expr = obj.is_expression_type()
if obj_expr:
if obj._parent_expr:
@@ -259,6 +274,9 @@ def __exit__(self, *args):
_generate_expression__noCloneCheck
bypass_clone_check.currently_bypassing = False
+ignore_entangled_expressions = bypass_clone_check
+
+
class _ExpressionBase(NumericValue):
"""An object that defines a mathematical expression that can be evaluated"""
@@ -330,7 +348,7 @@ def __call__(self, exception=None):
_idx += 1
if _sub.__class__ in native_numeric_types:
_result.append( _sub )
- elif _sub.is_expression():
+ elif _sub.is_expression_type():
_stack.append( (_obj, _argList, _idx, _len, _result) )
_obj = _sub
_argList = _sub._args
@@ -373,7 +391,7 @@ def _bool_tree_walker(self, test, combiner, native_result):
_result.append( native_result )
continue
try:
- _isExpr = _sub.is_expression()
+ _isExpr = _sub.is_expression_type()
except AttributeError:
_result.append( native_result )
continue
@@ -476,7 +494,7 @@ def _potentially_variable_combiner(self):
"""
return any
- def is_expression(self):
+ def is_expression_type(self):
return True
@@ -489,7 +507,7 @@ def polynomial_degree(self):
_idx += 1
if _sub.__class__ in native_numeric_types:
_result.append( 0 )
- elif _sub.is_expression():
+ elif _sub.is_expression_type():
if _sub is _LinearExpression:
_result.append( _sub.polynomial_degree() )
else:
@@ -595,7 +613,7 @@ def _precedence(self):
def _to_string_prefix(self, ostream, verbose):
if verbose:
ostream.write(self.getname())
- elif not self._args[0].is_expression \
+ elif not self._args[0].is_expression_type \
and _NegationExpression.PRECEDENCE <= self._args[0]._precedence():
ostream.write("-")
else:
@@ -648,7 +666,7 @@ def _apply_operation(self, result):
class _ExternalFunctionExpression(_ExpressionBase):
__slots__ = ('_fcn',)
- def __init__(self, fcn, args):
+ def __init__(self, args, fcn):
"""Construct a call to an external function"""
# Because this node is created outside the "normal"
# generate_expression route, we will perform all refrence
@@ -657,7 +675,7 @@ def __init__(self, fcn, args):
if not _getrefcount_available:
self._parent_expr = None
for a in self._args:
- if a.__class__ not in native_types and a.is_expression():
+ if a.__class__ not in native_types and a.is_expression_type():
a._parent_expr = bypass_backreference or ref(self)
self._fcn = fcn
@@ -967,13 +985,13 @@ def __iadd__(self, other, targetRefs=-2):
self._args.append(other)
return self
- if other.is_expression():
+ if other.is_expression_type():
if other.__class__ is _SumExpression:
self._args.extend(other._args)
if not _getrefcount_available and not bypass_backreference:
for arg in other._args:
if arg.__class__ not in native_types \
- and arg.is_expression():
+ and arg.is_expression_type():
arg._parent_expr = self
return self
elif other.__class__ is _LinearExpression and \
@@ -1047,13 +1065,13 @@ class _GetItemExpression(_ExpressionBase):
def _precedence(self):
return _GetItemExpression.PRECEDENCE
- def __init__(self, base, args):
+ def __init__(self, args, base):
"""Construct an expression with an operation and a set of arguments"""
self._args = _generate_expression__clone_if_needed(-2, False, *args)
if not _getrefcount_available:
self._parent_expr = None
for a in self._args:
- if a.__class__ not in native_types and a.is_expression():
+ if a.__class__ not in native_types and a.is_expression_type():
a._parent_expr = bypass_backreference or ref(self)
self._base = base
@@ -1135,7 +1153,7 @@ def __init__(self, IF=None, THEN=None, ELSE=None):
if not _getrefcount_available:
self._parent_expr = None
for a in self._args:
- if a.__class__ not in native_types and a.is_expression():
+ if a.__class__ not in native_types and a.is_expression_type():
a._parent_expr = bypass_backreference or ref(self)
self._if, self._then, self._else = self._args
if self._if.__class__ in native_types:
@@ -1278,7 +1296,7 @@ def _to_string_term(self, ostream, _idx, _sub, _name_buffer, verbose):
ostream.write(_sub.getname(True, _name_buffer))
return
ostream.write(str(coef))
- elif coef.is_expression():
+ elif coef.is_expression_type():
coef.to_string( ostream=ostream, verbose=verbose,
precedence=_ProductExpression.PRECEDENCE )
else:
@@ -1323,7 +1341,7 @@ def __iadd__(self, other, targetRefs=-2):
self._const += other
return self
- if other.is_expression():
+ if other.is_expression_type():
if other.__class__ is _LinearExpression:
with bypass_clone_check():
self._const += other._const
@@ -1362,7 +1380,7 @@ def __isub__(self, other, targetRefs=-2):
self._const -= other
return self
- if other.is_expression():
+ if other.is_expression_type():
if other.__class__ is _LinearExpression:
with bypass_clone_check():
self._const -= other._const
@@ -1514,7 +1532,7 @@ def generate_expression(etype, _self, _other, targetRefs=0):
_self_expr = False
_self_var = False
else:
- _self_expr = _self.is_expression()
+ _self_expr = _self.is_expression_type()
_self_var = _self._potentially_variable()
if etype > _inplace:
@@ -1545,7 +1563,7 @@ def generate_expression(etype, _self, _other, targetRefs=0):
_other_var = False
else:
_other_var = _other._potentially_variable()
- _other_expr = _other.is_expression()
+ _other_expr = _other.is_expression_type()
if etype < 0:
#
@@ -1762,9 +1780,9 @@ def generate_relational_expression(etype, lhs, rhs):
" " + buf.getvalue().strip())
ans = _EqualityExpression((lhs,rhs))
if not _getrefcount_available:
- if lhs.is_expression():
+ if lhs.is_expression_type():
lhs._parent_expr = ans
- if rhs.is_expression():
+ if rhs.is_expression_type():
rhs._parent_expr = ans
return ans
else:
@@ -1787,7 +1805,7 @@ def generate_relational_expression(etype, lhs, rhs):
lhs._args = lhs._args + (rhs,)
lhs._strict = lhs._strict + strict
lhs._cloned_from = cloned_from
- if not _getrefcount_available and rhs.is_expression():
+ if not _getrefcount_available and rhs.is_expression_type():
rhs._parent_expr = lhs
return lhs
else:
@@ -1804,7 +1822,7 @@ def generate_relational_expression(etype, lhs, rhs):
rhs._args = (lhs,) + rhs._args
rhs._strict = strict + rhs._strict
rhs._cloned_from = cloned_from
- if not _getrefcount_available and lhs.is_expression():
+ if not _getrefcount_available and lhs.is_expression_type():
lhs._parent_expr = rhs
return rhs
else:
@@ -1816,9 +1834,9 @@ def generate_relational_expression(etype, lhs, rhs):
else:
ans = _InequalityExpression((lhs, rhs), strict, cloned_from)
if not _getrefcount_available:
- if lhs.is_expression():
+ if lhs.is_expression_type():
lhs._parent_expr = ans
- if rhs.is_expression():
+ if rhs.is_expression_type():
rhs._parent_expr = ans
return ans
diff --git a/pyomo/core/expr/expr_pyomo5.c b/pyomo/core/expr/expr_pyomo5.c
new file mode 100644
index 00000000000..c772f1fd576
--- /dev/null
+++ b/pyomo/core/expr/expr_pyomo5.c
@@ -0,0 +1,78776 @@
+/* Generated by Cython 0.27.3 */
+
+/* BEGIN: Cython Metadata
+{
+ "distutils": {
+ "name": "pyomo.core.expr.expr_pyomo5",
+ "sources": [
+ "pyomo/core/expr/expr_pyomo5.pyx"
+ ]
+ },
+ "module_name": "pyomo.core.expr.expr_pyomo5"
+}
+END: Cython Metadata */
+
+#define PY_SSIZE_T_CLEAN
+#include "Python.h"
+#ifndef Py_PYTHON_H
+ #error Python headers needed to compile C extensions, please install development version of Python.
+#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
+ #error Cython requires Python 2.6+ or Python 3.3+.
+#else
+#define CYTHON_ABI "0_27_3"
+#define CYTHON_FUTURE_DIVISION 1
+#include
+#ifndef offsetof
+ #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+ #ifndef __stdcall
+ #define __stdcall
+ #endif
+ #ifndef __cdecl
+ #define __cdecl
+ #endif
+ #ifndef __fastcall
+ #define __fastcall
+ #endif
+#endif
+#ifndef DL_IMPORT
+ #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+ #define DL_EXPORT(t) t
+#endif
+#define __PYX_COMMA ,
+#ifndef HAVE_LONG_LONG
+ #if PY_VERSION_HEX >= 0x02070000
+ #define HAVE_LONG_LONG
+ #endif
+#endif
+#ifndef PY_LONG_LONG
+ #define PY_LONG_LONG LONG_LONG
+#endif
+#ifndef Py_HUGE_VAL
+ #define Py_HUGE_VAL HUGE_VAL
+#endif
+#ifdef PYPY_VERSION
+ #define CYTHON_COMPILING_IN_PYPY 1
+ #define CYTHON_COMPILING_IN_PYSTON 0
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #undef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 0
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #if PY_VERSION_HEX < 0x03050000
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #elif !defined(CYTHON_USE_ASYNC_SLOTS)
+ #define CYTHON_USE_ASYNC_SLOTS 1
+ #endif
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #undef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 1
+ #undef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 0
+ #undef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 0
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
+ #undef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT 0
+ #undef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE 0
+#elif defined(PYSTON_VERSION)
+ #define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 1
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
+ #undef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT 0
+ #undef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE 0
+#else
+ #define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 0
+ #define CYTHON_COMPILING_IN_CPYTHON 1
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
+ #define CYTHON_USE_PYTYPE_LOOKUP 1
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #elif !defined(CYTHON_USE_ASYNC_SLOTS)
+ #define CYTHON_USE_ASYNC_SLOTS 1
+ #endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
+ #define CYTHON_USE_PYLONG_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #if PY_VERSION_HEX < 0x030300F0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #elif !defined(CYTHON_USE_UNICODE_WRITER)
+ #define CYTHON_USE_UNICODE_WRITER 1
+ #endif
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #ifndef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 1
+ #endif
+ #ifndef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 1
+ #endif
+ #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
+ #endif
+ #ifndef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
+ #endif
+#endif
+#if !defined(CYTHON_FAST_PYCCALL)
+#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
+#endif
+#if CYTHON_USE_PYLONG_INTERNALS
+ #include "longintrepr.h"
+ #undef SHIFT
+ #undef BASE
+ #undef MASK
+#endif
+#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
+ #define Py_OptimizeFlag 0
+#endif
+#define __PYX_BUILD_PY_SSIZE_T "n"
+#define CYTHON_FORMAT_SSIZE_T "z"
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyClass_Type
+#else
+ #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyType_Type
+#endif
+#ifndef Py_TPFLAGS_CHECKTYPES
+ #define Py_TPFLAGS_CHECKTYPES 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_INDEX
+ #define Py_TPFLAGS_HAVE_INDEX 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
+ #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_FINALIZE
+ #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
+#if PY_VERSION_HEX < 0x030700A0 || !defined(METH_FASTCALL)
+ #ifndef METH_FASTCALL
+ #define METH_FASTCALL 0x80
+ #endif
+ typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args, Py_ssize_t nargs);
+ typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject **args,
+ Py_ssize_t nargs, PyObject *kwnames);
+#else
+ #define __Pyx_PyCFunctionFast _PyCFunctionFast
+ #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
+#endif
+#if CYTHON_FAST_PYCCALL
+#define __Pyx_PyFastCFunction_Check(func)\
+ ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
+#else
+#define __Pyx_PyFastCFunction_Check(func) 0
+#endif
+#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
+ #define __Pyx_PyThreadState_Current PyThreadState_GET()
+#elif PY_VERSION_HEX >= 0x03060000
+ #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
+#elif PY_VERSION_HEX >= 0x03000000
+ #define __Pyx_PyThreadState_Current PyThreadState_GET()
+#else
+ #define __Pyx_PyThreadState_Current _PyThreadState_Current
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
+#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
+#else
+#define __Pyx_PyDict_NewPresized(n) PyDict_New()
+#endif
+#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
+#else
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
+#endif
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+ #define CYTHON_PEP393_ENABLED 1
+ #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
+ 0 : _PyUnicode_Ready((PyObject *)(op)))
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
+ #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
+ #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
+ #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
+#else
+ #define CYTHON_PEP393_ENABLED 0
+ #define PyUnicode_1BYTE_KIND 1
+ #define PyUnicode_2BYTE_KIND 2
+ #define PyUnicode_4BYTE_KIND 4
+ #define __Pyx_PyUnicode_READY(op) (0)
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
+ #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
+ #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
+ #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+ #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
+#else
+ #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
+ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
+ #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
+ #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
+ #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
+ #define PyObject_Malloc(s) PyMem_Malloc(s)
+ #define PyObject_Free(p) PyMem_Free(p)
+ #define PyObject_Realloc(p) PyMem_Realloc(p)
+#endif
+#if CYTHON_COMPILING_IN_PYSTON
+ #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
+#else
+ #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
+#endif
+#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
+#else
+ #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
+#endif
+#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
+ #define PyObject_ASCII(o) PyObject_Repr(o)
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBaseString_Type PyUnicode_Type
+ #define PyStringObject PyUnicodeObject
+ #define PyString_Type PyUnicode_Type
+ #define PyString_Check PyUnicode_Check
+ #define PyString_CheckExact PyUnicode_CheckExact
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+ #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+ #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
+ #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
+#ifndef PySet_CheckExact
+ #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
+#endif
+#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
+#if PY_MAJOR_VERSION >= 3
+ #define PyIntObject PyLongObject
+ #define PyInt_Type PyLong_Type
+ #define PyInt_Check(op) PyLong_Check(op)
+ #define PyInt_CheckExact(op) PyLong_CheckExact(op)
+ #define PyInt_FromString PyLong_FromString
+ #define PyInt_FromUnicode PyLong_FromUnicode
+ #define PyInt_FromLong PyLong_FromLong
+ #define PyInt_FromSize_t PyLong_FromSize_t
+ #define PyInt_FromSsize_t PyLong_FromSsize_t
+ #define PyInt_AsLong PyLong_AsLong
+ #define PyInt_AS_LONG PyLong_AS_LONG
+ #define PyInt_AsSsize_t PyLong_AsSsize_t
+ #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
+ #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+ #define PyNumber_Int PyNumber_Long
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBoolObject PyLongObject
+#endif
+#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
+ #ifndef PyUnicode_InternFromString
+ #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
+ #endif
+#endif
+#if PY_VERSION_HEX < 0x030200A4
+ typedef long Py_hash_t;
+ #define __Pyx_PyInt_FromHash_t PyInt_FromLong
+ #define __Pyx_PyInt_AsHash_t PyInt_AsLong
+#else
+ #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
+ #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
+#else
+ #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
+#endif
+#ifndef __has_attribute
+ #define __has_attribute(x) 0
+#endif
+#ifndef __has_cpp_attribute
+ #define __has_cpp_attribute(x) 0
+#endif
+#if CYTHON_USE_ASYNC_SLOTS
+ #if PY_VERSION_HEX >= 0x030500B1
+ #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
+ #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
+ #else
+ #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
+ #endif
+#else
+ #define __Pyx_PyType_AsAsync(obj) NULL
+#endif
+#ifndef __Pyx_PyAsyncMethodsStruct
+ typedef struct {
+ unaryfunc am_await;
+ unaryfunc am_aiter;
+ unaryfunc am_anext;
+ } __Pyx_PyAsyncMethodsStruct;
+#endif
+#ifndef CYTHON_RESTRICT
+ #if defined(__GNUC__)
+ #define CYTHON_RESTRICT __restrict__
+ #elif defined(_MSC_VER) && _MSC_VER >= 1400
+ #define CYTHON_RESTRICT __restrict
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_RESTRICT restrict
+ #else
+ #define CYTHON_RESTRICT
+ #endif
+#endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+# if defined(__cplusplus)
+ template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+# else
+# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+# endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+# define CYTHON_NCP_UNUSED
+# else
+# define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
+#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
+#ifdef _MSC_VER
+ #ifndef _MSC_STDINT_H_
+ #if _MSC_VER < 1300
+ typedef unsigned char uint8_t;
+ typedef unsigned int uint32_t;
+ #else
+ typedef unsigned __int8 uint8_t;
+ typedef unsigned __int32 uint32_t;
+ #endif
+ #endif
+#else
+ #include
+#endif
+#ifndef CYTHON_FALLTHROUGH
+ #if defined(__cplusplus) && __cplusplus >= 201103L
+ #if __has_cpp_attribute(fallthrough)
+ #define CYTHON_FALLTHROUGH [[fallthrough]]
+ #elif __has_cpp_attribute(clang::fallthrough)
+ #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
+ #elif __has_cpp_attribute(gnu::fallthrough)
+ #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
+ #endif
+ #endif
+ #ifndef CYTHON_FALLTHROUGH
+ #if __has_attribute(fallthrough)
+ #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
+ #else
+ #define CYTHON_FALLTHROUGH
+ #endif
+ #endif
+ #if defined(__clang__ ) && defined(__apple_build_version__)
+ #if __apple_build_version__ < 7000000
+ #undef CYTHON_FALLTHROUGH
+ #define CYTHON_FALLTHROUGH
+ #endif
+ #endif
+#endif
+
+#ifndef CYTHON_INLINE
+ #if defined(__clang__)
+ #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+ #elif defined(__GNUC__)
+ #define CYTHON_INLINE __inline__
+ #elif defined(_MSC_VER)
+ #define CYTHON_INLINE __inline
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_INLINE inline
+ #else
+ #define CYTHON_INLINE
+ #endif
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+ #define _USE_MATH_DEFINES
+#endif
+#include
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+ float value;
+ memset(&value, 0xFF, sizeof(value));
+ return value;
+}
+#endif
+#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
+#define __Pyx_truncl trunc
+#else
+#define __Pyx_truncl truncl
+#endif
+
+
+#define __PYX_ERR(f_index, lineno, Ln_error) \
+{ \
+ __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
+}
+
+#ifndef __PYX_EXTERN_C
+ #ifdef __cplusplus
+ #define __PYX_EXTERN_C extern "C"
+ #else
+ #define __PYX_EXTERN_C extern
+ #endif
+#endif
+
+#define __PYX_HAVE__pyomo__core__expr__expr_pyomo5
+#define __PYX_HAVE_API__pyomo__core__expr__expr_pyomo5
+#ifdef _OPENMP
+#include
+#endif /* _OPENMP */
+
+#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
+ const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_uchar_cast(c) ((unsigned char)c)
+#define __Pyx_long_cast(x) ((long)x)
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
+ (sizeof(type) < sizeof(Py_ssize_t)) ||\
+ (sizeof(type) > sizeof(Py_ssize_t) &&\
+ likely(v < (type)PY_SSIZE_T_MAX ||\
+ v == (type)PY_SSIZE_T_MAX) &&\
+ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
+ v == (type)PY_SSIZE_T_MIN))) ||\
+ (sizeof(type) == sizeof(Py_ssize_t) &&\
+ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
+ v == (type)PY_SSIZE_T_MAX))) )
+#if defined (__cplusplus) && __cplusplus >= 201103L
+ #include
+ #define __Pyx_sst_abs(value) std::abs(value)
+#elif SIZEOF_INT >= SIZEOF_SIZE_T
+ #define __Pyx_sst_abs(value) abs(value)
+#elif SIZEOF_LONG >= SIZEOF_SIZE_T
+ #define __Pyx_sst_abs(value) labs(value)
+#elif defined (_MSC_VER)
+ #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
+#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define __Pyx_sst_abs(value) llabs(value)
+#elif defined (__GNUC__)
+ #define __Pyx_sst_abs(value) __builtin_llabs(value)
+#else
+ #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
+#endif
+static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+ #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
+#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
+#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
+#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
+#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
+ const Py_UNICODE *u_end = u;
+ while (*u_end++) ;
+ return (size_t)(u_end - u - 1);
+}
+#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
+#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
+#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
+#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
+#define __Pyx_PySequence_Tuple(obj)\
+ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+#if CYTHON_ASSUME_SAFE_MACROS
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
+#else
+#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
+#endif
+#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ PyObject* ascii_chars_u = NULL;
+ PyObject* ascii_chars_b = NULL;
+ const char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ if (strcmp(default_encoding_c, "ascii") == 0) {
+ __Pyx_sys_getdefaultencoding_not_ascii = 0;
+ } else {
+ char ascii_chars[128];
+ int c;
+ for (c = 0; c < 128; c++) {
+ ascii_chars[c] = c;
+ }
+ __Pyx_sys_getdefaultencoding_not_ascii = 1;
+ ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+ if (!ascii_chars_u) goto bad;
+ ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+ if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+ PyErr_Format(
+ PyExc_ValueError,
+ "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+ default_encoding_c);
+ goto bad;
+ }
+ Py_DECREF(ascii_chars_u);
+ Py_DECREF(ascii_chars_b);
+ }
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ Py_XDECREF(ascii_chars_u);
+ Py_XDECREF(ascii_chars_b);
+ return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+ if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
+ strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ return -1;
+}
+#endif
+#endif
+
+
+/* Test for GCC > 2.95 */
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
+ #define likely(x) __builtin_expect(!!(x), 1)
+ #define unlikely(x) __builtin_expect(!!(x), 0)
+#else /* !__GNUC__ or GCC < 2.95 */
+ #define likely(x) (x)
+ #define unlikely(x) (x)
+#endif /* __GNUC__ */
+static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
+
+static PyObject *__pyx_m = NULL;
+static PyObject *__pyx_d;
+static PyObject *__pyx_b;
+static PyObject *__pyx_cython_runtime;
+static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
+static PyObject *__pyx_empty_unicode;
+static int __pyx_lineno;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+
+
+static const char *__pyx_f[] = {
+ "pyomo/core/expr/expr_pyomo5.pyx",
+};
+
+/*--- Type declarations ---*/
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves;
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components;
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables;
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters;
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable;
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr;
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree;
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr;
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template;
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr;
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation;
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr;
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms;
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":338
+ * return self.finalize()
+ *
+ * def xbfs_yield_leaves(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Breadth-first search of an expression tree, except that
+ */
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves {
+ PyObject_HEAD
+ PyObject *__pyx_v_ans;
+ PyObject *__pyx_v_c;
+ PyObject *__pyx_v_current;
+ PyObject *__pyx_v_dq;
+ PyObject *__pyx_v_node;
+ PyObject *__pyx_v_self;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":899
+ *
+ *
+ * def identify_components(expr, component_types): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of nodes
+ */
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components {
+ PyObject_HEAD
+ PyObject *__pyx_v_component_types;
+ PyObject *__pyx_v_expr;
+ PyObject *__pyx_v_v;
+ PyObject *__pyx_v_visitor;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":942
+ *
+ *
+ * def identify_variables(expr, include_fixed=True): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of variables
+ */
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables {
+ PyObject_HEAD
+ PyObject *__pyx_v_expr;
+ PyObject *__pyx_v_include_fixed;
+ PyObject *__pyx_v_v;
+ PyObject *__pyx_v_visitor;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":987
+ *
+ *
+ * def identify_mutable_parameters(expr): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of mutable
+ */
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters {
+ PyObject_HEAD
+ PyObject *__pyx_v_expr;
+ PyObject *__pyx_v_v;
+ PyObject *__pyx_v_visitor;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2311
+ * return self._base.getname(*args, **kwds)
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * if any(arg.is_potentially_variable() for arg in self._args_ if not arg.__class__ in nonpyomo_leaf_types):
+ * for x in itervalues(self._base):
+ */
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable {
+ PyObject_HEAD
+ PyObject *__pyx_v_self;
+};
+
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2312
+ *
+ * def is_potentially_variable(self):
+ * if any(arg.is_potentially_variable() for arg in self._args_ if not arg.__class__ in nonpyomo_leaf_types): # <<<<<<<<<<<<<<
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and x.is_potentially_variable():
+ */
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable *__pyx_outer_scope;
+ PyObject *__pyx_v_arg;
+};
+
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2334
+ * return True
+ *
+ * def _compute_polynomial_degree(self, result): # TODO: coverage # <<<<<<<<<<<<<<
+ * if any(x != 0 for x in result):
+ * return None
+ */
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree {
+ PyObject_HEAD
+ PyObject *__pyx_v_result;
+};
+
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2335
+ *
+ * def _compute_polynomial_degree(self, result): # TODO: coverage
+ * if any(x != 0 for x in result): # <<<<<<<<<<<<<<
+ * return None
+ * ans = 0
+ */
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree *__pyx_outer_scope;
+ PyObject *__pyx_v_x;
+};
+
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2356
+ * return "%s%s" % (self.getname(), values[0])
+ *
+ * def resolve_template(self): # TODO: coverage # <<<<<<<<<<<<<<
+ * return self._base.__getitem__(tuple(value(i) for i in self._args_))
+ *
+ */
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template {
+ PyObject_HEAD
+ PyObject *__pyx_v_self;
+};
+
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2357
+ *
+ * def resolve_template(self): # TODO: coverage
+ * return self._base.__getitem__(tuple(value(i) for i in self._args_)) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template *__pyx_outer_scope;
+ PyObject *__pyx_v_i;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2638
+ * return len(self.linear_vars) > 0
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return value(self.constant) + sum(value(c)*v.value for c,v in zip(self.linear_coefs, self.linear_vars))
+ *
+ */
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation {
+ PyObject_HEAD
+ PyObject *__pyx_v_self;
+};
+
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2639
+ *
+ * def _apply_operation(self, result):
+ * return value(self.constant) + sum(value(c)*v.value for c,v in zip(self.linear_coefs, self.linear_vars)) # <<<<<<<<<<<<<<
+ *
+ * #@profile
+ */
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation *__pyx_outer_scope;
+ PyObject *__pyx_v_c;
+ PyObject *__pyx_v_v;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2787
+ *
+ *
+ * def _decompose_linear_terms(expr, multiplier=1): # <<<<<<<<<<<<<<
+ * """
+ * A generator function that yields tuples for the linear terms
+ */
+struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms {
+ PyObject_HEAD
+ PyObject *__pyx_v_arg;
+ PyObject *__pyx_v_c;
+ PyObject *__pyx_v_expr;
+ PyObject *__pyx_v_multiplier;
+ PyObject *__pyx_v_term;
+ PyObject *__pyx_v_v;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+ PyObject *__pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+};
+
+
+/* --- Runtime support code (head) --- */
+/* Refnanny.proto */
+#ifndef CYTHON_REFNANNY
+ #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+ typedef struct {
+ void (*INCREF)(void*, PyObject*, int);
+ void (*DECREF)(void*, PyObject*, int);
+ void (*GOTREF)(void*, PyObject*, int);
+ void (*GIVEREF)(void*, PyObject*, int);
+ void* (*SetupContext)(const char*, int, const char*);
+ void (*FinishContext)(void**);
+ } __Pyx_RefNannyAPIStruct;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
+ #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ if (acquire_gil) {\
+ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ PyGILState_Release(__pyx_gilstate_save);\
+ } else {\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ }
+#else
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+ #define __Pyx_RefNannyFinishContext()\
+ __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+ #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+ #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+ #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+ #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+ #define __Pyx_RefNannyDeclarations
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)
+ #define __Pyx_RefNannyFinishContext()
+ #define __Pyx_INCREF(r) Py_INCREF(r)
+ #define __Pyx_DECREF(r) Py_DECREF(r)
+ #define __Pyx_GOTREF(r)
+ #define __Pyx_GIVEREF(r)
+ #define __Pyx_XINCREF(r) Py_XINCREF(r)
+ #define __Pyx_XDECREF(r) Py_XDECREF(r)
+ #define __Pyx_XGOTREF(r)
+ #define __Pyx_XGIVEREF(r)
+#endif
+#define __Pyx_XDECREF_SET(r, v) do {\
+ PyObject *tmp = (PyObject *) r;\
+ r = v; __Pyx_XDECREF(tmp);\
+ } while (0)
+#define __Pyx_DECREF_SET(r, v) do {\
+ PyObject *tmp = (PyObject *) r;\
+ r = v; __Pyx_DECREF(tmp);\
+ } while (0)
+#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+
+/* PyObjectGetAttrStr.proto */
+#if CYTHON_USE_TYPE_SLOTS
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_getattro))
+ return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_getattr))
+ return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+ return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+/* GetBuiltinName.proto */
+static PyObject *__Pyx_GetBuiltinName(PyObject *name);
+
+/* RaiseDoubleKeywords.proto */
+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
+
+/* ParseKeywords.proto */
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
+ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
+ const char* function_name);
+
+/* RaiseArgTupleInvalid.proto */
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+ Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
+
+/* GetModuleGlobalName.proto */
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
+
+/* PyCFunctionFastCall.proto */
+#if CYTHON_FAST_PYCCALL
+static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
+#else
+#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
+#endif
+
+/* PyFunctionFastCall.proto */
+#if CYTHON_FAST_PYCALL
+#define __Pyx_PyFunction_FastCall(func, args, nargs)\
+ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
+#else
+#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
+#endif
+#endif
+
+/* PyObjectCall.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
+/* PyObjectCallMethO.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
+#endif
+
+/* PyObjectCallOneArg.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
+
+/* PyObjectCallNoArg.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
+#else
+#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
+#endif
+
+/* PyObjectSetAttrStr.proto */
+#if CYTHON_USE_TYPE_SLOTS
+#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
+static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_setattro))
+ return tp->tp_setattro(obj, attr_name, value);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_setattr))
+ return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
+#endif
+ return PyObject_SetAttr(obj, attr_name, value);
+}
+#else
+#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
+#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
+#endif
+
+/* GetItemInt.proto */
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
+ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
+ __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+ int is_list, int wraparound, int boundscheck);
+
+/* Import.proto */
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
+
+/* ImportFrom.proto */
+static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
+
+/* PySequenceContains.proto */
+static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
+ int result = PySequence_Contains(seq, item);
+ return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
+ PyObject_RichCompare(op1, op2, Py_EQ)
+ #endif
+
+/* ListAppend.proto */
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+ PyListObject* L = (PyListObject*) list;
+ Py_ssize_t len = Py_SIZE(list);
+ if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
+ Py_INCREF(x);
+ PyList_SET_ITEM(list, len, x);
+ Py_SIZE(list) = len+1;
+ return 0;
+ }
+ return PyList_Append(list, x);
+}
+#else
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#endif
+
+/* PyObjectCallMethod1.proto */
+static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
+static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg);
+
+/* append.proto */
+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
+
+/* PyThreadStateGet.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
+#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
+#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
+#else
+#define __Pyx_PyThreadState_declare
+#define __Pyx_PyThreadState_assign
+#define __Pyx_PyErr_Occurred() PyErr_Occurred()
+#endif
+
+/* PyErrFetchRestore.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
+#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
+#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
+#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
+#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
+static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
+#else
+#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
+#endif
+#else
+#define __Pyx_PyErr_Clear() PyErr_Clear()
+#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
+#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
+#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
+#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
+#endif
+
+/* RaiseException.proto */
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
+
+/* RaiseTooManyValuesToUnpack.proto */
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+
+/* RaiseNeedMoreValuesToUnpack.proto */
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+/* IterFinish.proto */
+static CYTHON_INLINE int __Pyx_IterFinish(void);
+
+/* UnpackItemEndCheck.proto */
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
+
+/* PyObjectCallMethod0.proto */
+static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
+
+/* pop.proto */
+static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L);
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L);
+#define __Pyx_PyObject_Pop(L) (likely(PyList_CheckExact(L)) ?\
+ __Pyx_PyList_Pop(L) : __Pyx__PyObject_Pop(L))
+#else
+#define __Pyx_PyList_Pop(L) __Pyx__PyObject_Pop(L)
+#define __Pyx_PyObject_Pop(L) __Pyx__PyObject_Pop(L)
+#endif
+
+/* UnpackUnboundCMethod.proto */
+typedef struct {
+ PyObject *type;
+ PyObject **method_name;
+ PyCFunction func;
+ PyObject *method;
+ int flag;
+} __Pyx_CachedCFunction;
+
+/* CallUnboundCMethod0.proto */
+static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_CallUnboundCMethod0(cfunc, self)\
+ ((likely((cfunc)->func)) ?\
+ (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\
+ (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
+ ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\
+ (PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ?\
+ (PY_VERSION_HEX >= 0x030700A0 ?\
+ (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0) :\
+ (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL)) :\
+ (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
+ (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\
+ __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
+ __Pyx__CallUnboundCMethod0(cfunc, self))
+#else
+#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
+#endif
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
+ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
+#endif
+
+/* SetItemInt.proto */
+#define __Pyx_SetItemInt(o, i, v, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_SetItemInt_Fast(o, (Py_ssize_t)i, v, is_list, wraparound, boundscheck) :\
+ (is_list ? (PyErr_SetString(PyExc_IndexError, "list assignment index out of range"), -1) :\
+ __Pyx_SetItemInt_Generic(o, to_py_func(i), v)))
+static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v);
+static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v,
+ int is_list, int wraparound, int boundscheck);
+
+/* SliceObject.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(
+ PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop,
+ PyObject** py_start, PyObject** py_stop, PyObject** py_slice,
+ int has_cstart, int has_cstop, int wraparound);
+
+/* SaveResetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
+#else
+#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
+#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
+#endif
+
+/* PyErrExceptionMatches.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
+static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
+#else
+#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
+#endif
+
+/* GetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#else
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
+#endif
+
+/* GetAttr.proto */
+static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
+
+/* IncludeStringH.proto */
+#include
+
+/* BytesEquals.proto */
+static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
+
+/* UnicodeEquals.proto */
+static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
+
+/* StrEquals.proto */
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
+#else
+#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
+#endif
+
+/* StringJoin.proto */
+#if PY_MAJOR_VERSION < 3
+#define __Pyx_PyString_Join __Pyx_PyBytes_Join
+#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v))
+#else
+#define __Pyx_PyString_Join PyUnicode_Join
+#define __Pyx_PyBaseString_Join PyUnicode_Join
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ #if PY_MAJOR_VERSION < 3
+ #define __Pyx_PyBytes_Join _PyString_Join
+ #else
+ #define __Pyx_PyBytes_Join _PyBytes_Join
+ #endif
+#else
+static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values);
+#endif
+
+/* None.proto */
+static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
+
+/* ListCompAppend.proto */
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
+ PyListObject* L = (PyListObject*) list;
+ Py_ssize_t len = Py_SIZE(list);
+ if (likely(L->allocated > len)) {
+ Py_INCREF(x);
+ PyList_SET_ITEM(list, len, x);
+ Py_SIZE(list) = len+1;
+ return 0;
+ }
+ return PyList_Append(list, x);
+}
+#else
+#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
+#endif
+
+/* CalculateMetaclass.proto */
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
+
+/* FetchCommonType.proto */
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
+
+/* CythonFunction.proto */
+#define __Pyx_CyFunction_USED 1
+#include
+#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
+#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
+#define __Pyx_CYFUNCTION_CCLASS 0x04
+#define __Pyx_CyFunction_GetClosure(f)\
+ (((__pyx_CyFunctionObject *) (f))->func_closure)
+#define __Pyx_CyFunction_GetClassObj(f)\
+ (((__pyx_CyFunctionObject *) (f))->func_classobj)
+#define __Pyx_CyFunction_Defaults(type, f)\
+ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
+#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
+ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
+typedef struct {
+ PyCFunctionObject func;
+#if PY_VERSION_HEX < 0x030500A0
+ PyObject *func_weakreflist;
+#endif
+ PyObject *func_dict;
+ PyObject *func_name;
+ PyObject *func_qualname;
+ PyObject *func_doc;
+ PyObject *func_globals;
+ PyObject *func_code;
+ PyObject *func_closure;
+ PyObject *func_classobj;
+ void *defaults;
+ int defaults_pyobjects;
+ int flags;
+ PyObject *defaults_tuple;
+ PyObject *defaults_kwdict;
+ PyObject *(*defaults_getter)(PyObject *);
+ PyObject *func_annotations;
+} __pyx_CyFunctionObject;
+static PyTypeObject *__pyx_CyFunctionType = 0;
+#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
+ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
+ int flags, PyObject* qualname,
+ PyObject *self,
+ PyObject *module, PyObject *globals,
+ PyObject* code);
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
+ size_t size,
+ int pyobjects);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
+ PyObject *tuple);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
+ PyObject *dict);
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
+ PyObject *dict);
+static int __pyx_CyFunction_init(void);
+
+/* Py3ClassCreate.proto */
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
+ PyObject *mkw, PyObject *modname, PyObject *doc);
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
+ PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
+
+/* CLineInTraceback.proto */
+#ifdef CYTHON_CLINE_IN_TRACEBACK
+#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
+#else
+static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
+#endif
+
+/* CodeObjectCache.proto */
+typedef struct {
+ PyCodeObject* code_object;
+ int code_line;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+ int count;
+ int max_count;
+ __Pyx_CodeObjectCacheEntry* entries;
+};
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+
+/* AddTraceback.proto */
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+
+/* FastTypeChecks.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
+static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
+#else
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
+#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
+#endif
+
+/* SwapException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#else
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
+#endif
+
+/* CoroutineBase.proto */
+typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
+typedef struct {
+ PyObject_HEAD
+ __pyx_coroutine_body_t body;
+ PyObject *closure;
+ PyObject *exc_type;
+ PyObject *exc_value;
+ PyObject *exc_traceback;
+ PyObject *gi_weakreflist;
+ PyObject *classobj;
+ PyObject *yieldfrom;
+ PyObject *gi_name;
+ PyObject *gi_qualname;
+ PyObject *gi_modulename;
+ int resume_label;
+ char is_running;
+} __pyx_CoroutineObject;
+static __pyx_CoroutineObject *__Pyx__Coroutine_New(
+ PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *closure,
+ PyObject *name, PyObject *qualname, PyObject *module_name);
+static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
+ __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *closure,
+ PyObject *name, PyObject *qualname, PyObject *module_name);
+static int __Pyx_Coroutine_clear(PyObject *self);
+static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
+static PyObject *__Pyx_Coroutine_Close(PyObject *self);
+static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
+#define __Pyx_Coroutine_SwapException(self) {\
+ __Pyx_ExceptionSwap(&(self)->exc_type, &(self)->exc_value, &(self)->exc_traceback);\
+ __Pyx_Coroutine_ResetFrameBackpointer(self);\
+ }
+#define __Pyx_Coroutine_ResetAndClearException(self) {\
+ __Pyx_ExceptionReset((self)->exc_type, (self)->exc_value, (self)->exc_traceback);\
+ (self)->exc_type = (self)->exc_value = (self)->exc_traceback = NULL;\
+ }
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
+ __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
+#else
+#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
+ __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
+#endif
+static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
+static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self);
+
+/* PatchModuleWithCoroutine.proto */
+static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
+
+/* PatchGeneratorABC.proto */
+static int __Pyx_patch_abc(void);
+
+/* Generator.proto */
+#define __Pyx_Generator_USED
+static PyTypeObject *__pyx_GeneratorType = 0;
+#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
+#define __Pyx_Generator_New(body, closure, name, qualname, module_name)\
+ __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname, module_name)
+static PyObject *__Pyx_Generator_Next(PyObject *self);
+static int __pyx_Generator_init(void);
+
+/* CheckBinaryVersion.proto */
+static int __Pyx_check_binary_version(void);
+
+/* InitStrings.proto */
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
+
+
+/* Module declarations from 'pyomo.core.expr.expr_pyomo5' */
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms = 0;
+#define __Pyx_MODULE_NAME "pyomo.core.expr.expr_pyomo5"
+extern int __pyx_module_is_main_pyomo__core__expr__expr_pyomo5;
+int __pyx_module_is_main_pyomo__core__expr__expr_pyomo5 = 0;
+
+/* Implementation of 'pyomo.core.expr.expr_pyomo5' */
+static PyObject *__pyx_builtin_object;
+static PyObject *__pyx_builtin_staticmethod;
+static PyObject *__pyx_builtin_property;
+static PyObject *__pyx_builtin_StopIteration;
+static PyObject *__pyx_builtin_RuntimeError;
+static PyObject *__pyx_builtin_id;
+static PyObject *__pyx_builtin_ValueError;
+static PyObject *__pyx_builtin_super;
+static PyObject *__pyx_builtin_enumerate;
+static PyObject *__pyx_builtin_KeyError;
+static PyObject *__pyx_builtin_NotImplementedError;
+static PyObject *__pyx_builtin_all;
+static PyObject *__pyx_builtin_sum;
+static PyObject *__pyx_builtin_range;
+static PyObject *__pyx_builtin_any;
+static PyObject *__pyx_builtin_zip;
+static PyObject *__pyx_builtin_TypeError;
+static PyObject *__pyx_builtin_ZeroDivisionError;
+static const char __pyx_k_[] = ".";
+static const char __pyx_k_0[] = "'{0}'";
+static const char __pyx_k_1[] = "1";
+static const char __pyx_k_a[] = "a";
+static const char __pyx_k_b[] = "b";
+static const char __pyx_k_c[] = "c";
+static const char __pyx_k_e[] = "e";
+static const char __pyx_k_i[] = "i";
+static const char __pyx_k_j[] = "j";
+static const char __pyx_k_l[] = "l";
+static const char __pyx_k_r[] = "r";
+static const char __pyx_k_s[] = ":\n %s";
+static const char __pyx_k_t[] = "t_";
+static const char __pyx_k_v[] = "v";
+static const char __pyx_k_x[] = "x";
+static const char __pyx_k_IF[] = "IF_";
+static const char __pyx_k_dq[] = "dq";
+static const char __pyx_k_eq[] = "_eq";
+static const char __pyx_k_id[] = "id";
+static const char __pyx_k_if[] = "_if";
+static const char __pyx_k_le[] = "_le";
+static const char __pyx_k_lt[] = "_lt";
+static const char __pyx_k_0_1[] = "{0}({1})";
+static const char __pyx_k_0_2[] = "({0})";
+static const char __pyx_k_0_3[] = "- {0}";
+static const char __pyx_k_1_0[] = "1.0";
+static const char __pyx_k_1_2[] = "-1";
+static const char __pyx_k_Var[] = "Var";
+static const char __pyx_k__16[] = "-";
+static const char __pyx_k__17[] = " ";
+static const char __pyx_k__18[] = "- ";
+static const char __pyx_k__19[] = ", ";
+static const char __pyx_k__20[] = "<";
+static const char __pyx_k__21[] = "<=";
+static const char __pyx_k__26[] = "";
+static const char __pyx_k__27[] = " - ";
+static const char __pyx_k__28[] = " + ";
+static const char __pyx_k__29[] = "(";
+static const char __pyx_k__30[] = "+";
+static const char __pyx_k_abs[] = "abs";
+static const char __pyx_k_add[] = "add";
+static const char __pyx_k_all[] = "all";
+static const char __pyx_k_ans[] = "ans";
+static const char __pyx_k_any[] = "any";
+static const char __pyx_k_arg[] = "arg";
+static const char __pyx_k_b_2[] = "_b";
+static const char __pyx_k_c_2[] = "c_";
+static const char __pyx_k_div[] = "_div";
+static const char __pyx_k_doc[] = "__doc__";
+static const char __pyx_k_exp[] = "exp";
+static const char __pyx_k_fcn[] = "fcn";
+static const char __pyx_k_idx[] = "_idx";
+static const char __pyx_k_l_2[] = "_l";
+static const char __pyx_k_l_3[] = "l_";
+static const char __pyx_k_len[] = "_len";
+static const char __pyx_k_lhs[] = "lhs";
+static const char __pyx_k_msg[] = "msg";
+static const char __pyx_k_mul[] = "_mul";
+static const char __pyx_k_neg[] = "neg";
+static const char __pyx_k_obj[] = "_obj";
+static const char __pyx_k_pop[] = "pop";
+static const char __pyx_k_pow[] = "pow";
+static const char __pyx_k_r_2[] = "_r";
+static const char __pyx_k_r_3[] = "r_";
+static const char __pyx_k_ref[] = "ref";
+static const char __pyx_k_rhs[] = "rhs";
+static const char __pyx_k_s_2[] = " + %s";
+static const char __pyx_k_s_3[] = " - %s";
+static const char __pyx_k_s_4[] = "s";
+static const char __pyx_k_s_s[] = "%s%s";
+static const char __pyx_k_six[] = "six";
+static const char __pyx_k_str[] = "__str__";
+static const char __pyx_k_sub[] = "_sub";
+static const char __pyx_k_sum[] = "sum";
+static const char __pyx_k_sys[] = "sys";
+static const char __pyx_k_tmp[] = "tmp";
+static const char __pyx_k_v_2[] = "v_";
+static const char __pyx_k_val[] = "val";
+static const char __pyx_k_zip[] = "zip";
+static const char __pyx_k_ELSE[] = "ELSE_";
+static const char __pyx_k_THEN[] = "THEN_";
+static const char __pyx_k_args[] = "args";
+static const char __pyx_k_base[] = "base";
+static const char __pyx_k_body[] = "body";
+static const char __pyx_k_bool[] = "__bool__";
+static const char __pyx_k_call[] = "__call__";
+static const char __pyx_k_copy[] = "copy";
+static const char __pyx_k_else[] = "_else";
+static const char __pyx_k_exit[] = "__exit__";
+static const char __pyx_k_expr[] = "expr";
+static const char __pyx_k_fabs[] = "fabs";
+static const char __pyx_k_flag[] = "flag";
+static const char __pyx_k_iadd[] = "_iadd";
+static const char __pyx_k_idiv[] = "_idiv";
+static const char __pyx_k_imul[] = "_imul";
+static const char __pyx_k_info[] = "info";
+static const char __pyx_k_init[] = "__init__";
+static const char __pyx_k_ipow[] = "_ipow";
+static const char __pyx_k_isub[] = "_isub";
+static const char __pyx_k_join[] = "join";
+static const char __pyx_k_kwds[] = "kwds";
+static const char __pyx_k_main[] = "__main__";
+static const char __pyx_k_math[] = "math";
+static const char __pyx_k_memo[] = "memo";
+static const char __pyx_k_name[] = "name";
+static const char __pyx_k_next[] = "next";
+static const char __pyx_k_node[] = "node";
+static const char __pyx_k_prev[] = "prev";
+static const char __pyx_k_prod[] = "prod";
+static const char __pyx_k_radd[] = "_radd";
+static const char __pyx_k_rdiv[] = "_rdiv";
+static const char __pyx_k_repn[] = "repn";
+static const char __pyx_k_rmul[] = "_rmul";
+static const char __pyx_k_rpow[] = "_rpow";
+static const char __pyx_k_rsub[] = "_rsub";
+static const char __pyx_k_seen[] = "seen";
+static const char __pyx_k_self[] = "self";
+static const char __pyx_k_send[] = "send";
+static const char __pyx_k_size[] = "size";
+static const char __pyx_k_smap[] = "smap";
+static const char __pyx_k_term[] = "term";
+static const char __pyx_k_test[] = "__test__";
+static const char __pyx_k_then[] = "_then";
+static const char __pyx_k_xbfs[] = "xbfs";
+static const char __pyx_k_0_1_2[] = "{0}({1}, {2})";
+static const char __pyx_k_0_1_3[] = "{0}**{1}";
+static const char __pyx_k_0_1_4[] = "{0}*{1}";
+static const char __pyx_k_0_1_5[] = "{0} == {1}";
+static const char __pyx_k_0_1_6[] = "{0} {1}";
+static const char __pyx_k_0_1_7[] = "{0} + {1}";
+static const char __pyx_k_0_1_8[] = "{0}{1}";
+static const char __pyx_k_1_0_2[] = "-1.0";
+static const char __pyx_k_1_0_3[] = "(1/{0})";
+static const char __pyx_k_abs_2[] = "_abs";
+static const char __pyx_k_add_2[] = "_add";
+static const char __pyx_k_all_2[] = "__all__";
+static const char __pyx_k_class[] = "__class__";
+static const char __pyx_k_clone[] = "clone";
+static const char __pyx_k_close[] = "close";
+static const char __pyx_k_const[] = "const_";
+static const char __pyx_k_count[] = "_count";
+static const char __pyx_k_deque[] = "deque";
+static const char __pyx_k_enter[] = "__enter__";
+static const char __pyx_k_etype[] = "etype";
+static const char __pyx_k_fcn_2[] = "_fcn";
+static const char __pyx_k_fixed[] = "fixed";
+static const char __pyx_k_limit[] = "limit";
+static const char __pyx_k_lower[] = "lower";
+static const char __pyx_k_match[] = "match";
+static const char __pyx_k_nargs[] = "nargs";
+static const char __pyx_k_neg_2[] = "_neg";
+static const char __pyx_k_obj_2[] = "obj";
+static const char __pyx_k_omult[] = "omult";
+static const char __pyx_k_other[] = "_other";
+static const char __pyx_k_pow_2[] = "_pow";
+static const char __pyx_k_range[] = "range";
+static const char __pyx_k_recip[] = "recip";
+static const char __pyx_k_repn0[] = "repn0";
+static const char __pyx_k_repn1[] = "repn1";
+static const char __pyx_k_repn2[] = "repn2";
+static const char __pyx_k_s_s_2[] = " - %s*%s";
+static const char __pyx_k_s_s_3[] = " + %s*%s";
+static const char __pyx_k_slots[] = "__slots__";
+static const char __pyx_k_stack[] = "_stack";
+static const char __pyx_k_state[] = "state";
+static const char __pyx_k_strip[] = "strip";
+static const char __pyx_k_super[] = "super";
+static const char __pyx_k_terms[] = "terms";
+static const char __pyx_k_throw[] = "throw";
+static const char __pyx_k_types[] = "types";
+static const char __pyx_k_unary[] = "_unary";
+static const char __pyx_k_upper[] = "upper";
+static const char __pyx_k_value[] = "value";
+static const char __pyx_k_visit[] = "visit";
+static const char __pyx_k_append[] = "append";
+static const char __pyx_k_args_2[] = "_args_";
+static const char __pyx_k_base_2[] = "_base";
+static const char __pyx_k_common[] = "common";
+static const char __pyx_k_extend[] = "extend";
+static const char __pyx_k_format[] = "format";
+static const char __pyx_k_import[] = "__import__";
+static const char __pyx_k_islice[] = "islice";
+static const char __pyx_k_logger[] = "logger";
+static const char __pyx_k_module[] = "__module__";
+static const char __pyx_k_name_2[] = "_name";
+static const char __pyx_k_object[] = "object";
+static const char __pyx_k_public[] = "__public__";
+static const char __pyx_k_result[] = "result";
+static const char __pyx_k_self_2[] = "_self";
+static const char __pyx_k_strict[] = "strict";
+static const char __pyx_k_values[] = "values";
+static const char __pyx_k_xrange[] = "xrange";
+static const char __pyx_k_0_1_2_2[] = "{0} {1} {2}";
+static const char __pyx_k_Expr_if[] = "Expr_if";
+static const char __pyx_k_argList[] = "_argList";
+static const char __pyx_k_count_2[] = "count";
+static const char __pyx_k_counter[] = "counter";
+static const char __pyx_k_current[] = "current";
+static const char __pyx_k_divisor[] = "divisor";
+static const char __pyx_k_genexpr[] = "genexpr";
+static const char __pyx_k_getitem[] = "__getitem__";
+static const char __pyx_k_getname[] = "getname";
+static const char __pyx_k_inplace[] = "_inplace";
+static const char __pyx_k_isclose[] = "isclose";
+static const char __pyx_k_labeler[] = "labeler";
+static const char __pyx_k_logging[] = "logging";
+static const char __pyx_k_message[] = "message";
+static const char __pyx_k_mutable[] = "_mutable";
+static const char __pyx_k_nargs_2[] = "_nargs";
+static const char __pyx_k_new_arg[] = "new_arg";
+static const char __pyx_k_nonzero[] = "__nonzero__";
+static const char __pyx_k_popleft[] = "popleft";
+static const char __pyx_k_prepare[] = "__prepare__";
+static const char __pyx_k_verbose[] = "verbose";
+static const char __pyx_k_visitor[] = "visitor";
+static const char __pyx_k_weakref[] = "weakref";
+static const char __pyx_k_KeyError[] = "KeyError";
+static const char __pyx_k_builtins[] = "builtins";
+static const char __pyx_k_constant[] = "constant";
+static const char __pyx_k_deepcopy[] = "deepcopy";
+static const char __pyx_k_evaluate[] = "evaluate";
+static const char __pyx_k_finalize[] = "finalize";
+static const char __pyx_k_getstate[] = "__getstate__";
+static const char __pyx_k_is_fixed[] = "is_fixed";
+static const char __pyx_k_prevExpr[] = "prevExpr";
+static const char __pyx_k_prod_s_s[] = "prod(%s, %s)";
+static const char __pyx_k_property[] = "property";
+static const char __pyx_k_qualname[] = "__qualname__";
+static const char __pyx_k_result_2[] = "_result";
+static const char __pyx_k_strict_2[] = "_strict";
+static const char __pyx_k_0_1_2_3_4[] = "{0} {1} {2} {3} {4}";
+static const char __pyx_k_IVariable[] = "IVariable";
+static const char __pyx_k_ParamData[] = "_ParamData";
+static const char __pyx_k_SymbolMap[] = "SymbolMap";
+static const char __pyx_k_TypeError[] = "TypeError";
+static const char __pyx_k_Undefined[] = "Undefined";
+static const char __pyx_k_call_info[] = "call_info";
+static const char __pyx_k_component[] = "_component";
+static const char __pyx_k_enumerate[] = "enumerate";
+static const char __pyx_k_exception[] = "exception";
+static const char __pyx_k_getLogger[] = "getLogger";
+static const char __pyx_k_getSymbol[] = "getSymbol";
+static const char __pyx_k_itertools[] = "itertools";
+static const char __pyx_k_metaclass[] = "__metaclass__";
+static const char __pyx_k_quadratic[] = "quadratic";
+static const char __pyx_k_six_moves[] = "six.moves";
+static const char __pyx_k_to_string[] = "to_string";
+static const char __pyx_k_traceback[] = "traceback";
+static const char __pyx_k_PRECEDENCE[] = "PRECEDENCE";
+static const char __pyx_k_ValueError[] = "ValueError";
+static const char __pyx_k_as_numeric[] = "as_numeric";
+static const char __pyx_k_deepcopy_2[] = "__deepcopy__";
+static const char __pyx_k_inequality[] = "inequality";
+static const char __pyx_k_is_fixed_2[] = "_is_fixed";
+static const char __pyx_k_is_indexed[] = "is_indexed";
+static const char __pyx_k_itervalues[] = "itervalues";
+static const char __pyx_k_multiplier[] = "multiplier";
+static const char __pyx_k_precedence[] = "_precedence";
+static const char __pyx_k_pyomo_core[] = "pyomo.core";
+static const char __pyx_k_pyomo_repn[] = "pyomo.repn";
+static const char __pyx_k_substitute[] = "substitute";
+static const char __pyx_k_SimpleParam[] = "SimpleParam";
+static const char __pyx_k_SizeVisitor[] = "_SizeVisitor";
+static const char __pyx_k_block_scope[] = "__block_scope__";
+static const char __pyx_k_cloned_from[] = "cloned_from";
+static const char __pyx_k_collections[] = "collections";
+static const char __pyx_k_constructed[] = "_constructed";
+static const char __pyx_k_expr_common[] = "expr_common";
+static const char __pyx_k_is_constant[] = "is_constant";
+static const char __pyx_k_linear_vars[] = "linear_vars";
+static const char __pyx_k_process_arg[] = "_process_arg";
+static const char __pyx_k_shared_args[] = "_shared_args";
+static const char __pyx_k_standardize[] = "standardize";
+static const char __pyx_k_to_string_2[] = "_to_string";
+static const char __pyx_k_CloneVisitor[] = "_CloneVisitor";
+static const char __pyx_k_NumericValue[] = "NumericValue";
+static const char __pyx_k_RuntimeError[] = "RuntimeError";
+static const char __pyx_k_ValueVisitor[] = "ValueVisitor";
+static const char __pyx_k_clone_leaves[] = "clone_leaves";
+static const char __pyx_k_combine_expr[] = "_combine_expr";
+static const char __pyx_k_linear_coefs[] = "linear_coefs";
+static const char __pyx_k_native_types[] = "native_types";
+static const char __pyx_k_staticmethod[] = "staticmethod";
+static const char __pyx_k_string_types[] = "string_types";
+static const char __pyx_k_AbsExpression[] = "AbsExpression";
+static const char __pyx_k_Expr_if_nargs[] = "Expr_if.nargs";
+static const char __pyx_k_PowExpression[] = "PowExpression";
+static const char __pyx_k_SimpleVisitor[] = "SimpleVisitor";
+static const char __pyx_k_StopIteration[] = "StopIteration";
+static const char __pyx_k_SumExpression[] = "_SumExpression";
+static const char __pyx_k_clone_counter[] = "clone_counter";
+static const char __pyx_k_error_message[] = "error_message";
+static const char __pyx_k_extract_stack[] = "extract_stack";
+static const char __pyx_k_include_fixed[] = "include_fixed";
+static const char __pyx_k_is_relational[] = "is_relational";
+static const char __pyx_k_to_expression[] = "to_expression";
+static const char __pyx_k_Expr_if___init[] = "Expr_if.__init__";
+static const char __pyx_k_ExpressionBase[] = "ExpressionBase";
+static const char __pyx_k_IsFixedVisitor[] = "_IsFixedVisitor";
+static const char __pyx_k_compute_values[] = "compute_values";
+static const char __pyx_k_construct_node[] = "construct_node";
+static const char __pyx_k_decompose_term[] = "decompose_term";
+static const char __pyx_k_Expr_if_getname[] = "Expr_if.getname";
+static const char __pyx_k_NumericConstant[] = "NumericConstant";
+static const char __pyx_k_ToStringVisitor[] = "_ToStringVisitor";
+static const char __pyx_k_VariableVisitor[] = "_VariableVisitor";
+static const char __pyx_k_apply_operation[] = "_apply_operation";
+static const char __pyx_k_component_types[] = "component_types";
+static const char __pyx_k_default_labeler[] = "default_labeler";
+static const char __pyx_k_pyomo_core_base[] = "pyomo.core.base";
+static const char __pyx_k_pyomo_core_expr[] = "pyomo.core.expr";
+static const char __pyx_k_ComponentVisitor[] = "_ComponentVisitor";
+static const char __pyx_k_LinearExpression[] = "LinearExpression";
+static const char __pyx_k_RangedExpression[] = "RangedExpression";
+static const char __pyx_k_clone_expression[] = "clone_expression";
+static const char __pyx_k_is_variable_type[] = "is_variable_type";
+static const char __pyx_k_resolve_template[] = "resolve_template";
+static const char __pyx_k_0_1_then_2_else_3[] = "{0}( ( {1} ), then=( {2} ), else=( {3} ) )";
+static const char __pyx_k_EvaluationVisitor[] = "_EvaluationVisitor";
+static const char __pyx_k_Expr_if__is_fixed[] = "Expr_if._is_fixed";
+static const char __pyx_k_GetItemExpression[] = "GetItemExpression";
+static const char __pyx_k_NPV_AbsExpression[] = "NPV_AbsExpression";
+static const char __pyx_k_NPV_PowExpression[] = "NPV_PowExpression";
+static const char __pyx_k_NPV_SumExpression[] = "NPV_SumExpression";
+static const char __pyx_k_PolyDegreeVisitor[] = "_PolyDegreeVisitor";
+static const char __pyx_k_ProductExpression[] = "ProductExpression";
+static const char __pyx_k_SizeVisitor_visit[] = "_SizeVisitor.visit";
+static const char __pyx_k_TO_STRING_VERBOSE[] = "TO_STRING_VERBOSE";
+static const char __pyx_k_ViewSumExpression[] = "ViewSumExpression";
+static const char __pyx_k_ZeroDivisionError[] = "ZeroDivisionError";
+static const char __pyx_k_chainedInequality[] = "_chainedInequality";
+static const char __pyx_k_lhs_is_relational[] = "lhs_is_relational";
+static const char __pyx_k_linear_expression[] = "linear_expression";
+static const char __pyx_k_polynomial_degree[] = "_polynomial_degree";
+static const char __pyx_k_rhs_is_relational[] = "rhs_is_relational";
+static const char __pyx_k_sizeof_expression[] = "_sizeof_expression";
+static const char __pyx_k_xbfs_yield_leaves[] = "xbfs_yield_leaves";
+static const char __pyx_k_CloneVisitor_visit[] = "_CloneVisitor.visit";
+static const char __pyx_k_EqualityExpression[] = "EqualityExpression";
+static const char __pyx_k_Expr_if___getstate[] = "Expr_if.__getstate__";
+static const char __pyx_k_Expr_if__to_string[] = "Expr_if._to_string";
+static const char __pyx_k_ExpressionBase_arg[] = "ExpressionBase.arg";
+static const char __pyx_k_NegationExpression[] = "NegationExpression";
+static const char __pyx_k_SizeVisitor___init[] = "_SizeVisitor.__init__";
+static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
+static const char __pyx_k_identify_variables[] = "identify_variables";
+static const char __pyx_k_is_expression_type[] = "is_expression_type";
+static const char __pyx_k_pyutilib_math_util[] = "pyutilib.math.util";
+static const char __pyx_k_CloneVisitor___init[] = "_CloneVisitor.__init__";
+static const char __pyx_k_Expr_if_is_constant[] = "Expr_if.is_constant";
+static const char __pyx_k_ExpressionBase_args[] = "ExpressionBase.args";
+static const char __pyx_k_ExpressionBase_size[] = "ExpressionBase.size";
+static const char __pyx_k_MutableParamVisitor[] = "_MutableParamVisitor";
+static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
+static const char __pyx_k_compress_expression[] = "compress_expression";
+static const char __pyx_k_deprecation_warning[] = "deprecation_warning";
+static const char __pyx_k_dfs_postorder_stack[] = "dfs_postorder_stack";
+static const char __pyx_k_evaluate_expression[] = "evaluate_expression";
+static const char __pyx_k_expression_is_fixed[] = "_expression_is_fixed";
+static const char __pyx_k_identify_components[] = "identify_components";
+static const char __pyx_k_mutable_sum_context[] = "mutable_sum_context";
+static const char __pyx_k_nonpyomo_leaf_types[] = "nonpyomo_leaf_types";
+static const char __pyx_k_polynomial_degree_2[] = "polynomial_degree";
+static const char __pyx_k_AbsExpression___init[] = "AbsExpression.__init__";
+static const char __pyx_k_ExpressionBase___str[] = "ExpressionBase.__str__";
+static const char __pyx_k_ExpressionBase_clone[] = "ExpressionBase.clone";
+static const char __pyx_k_ExpressionBase_nargs[] = "ExpressionBase.nargs";
+static const char __pyx_k_InequalityExpression[] = "InequalityExpression";
+static const char __pyx_k_IsFixedVisitor_visit[] = "_IsFixedVisitor.visit";
+static const char __pyx_k_ReciprocalExpression[] = "ReciprocalExpression";
+static const char __pyx_k_SizeVisitor_finalize[] = "_SizeVisitor.finalize";
+static const char __pyx_k_expression_to_string[] = "expression_to_string";
+static const char __pyx_k_native_numeric_types[] = "native_numeric_types";
+static const char __pyx_k_nonlinear_expression[] = "nonlinear_expression";
+static const char __pyx_k_ExpressionBase___call[] = "ExpressionBase.__call__";
+static const char __pyx_k_ExpressionBase___init[] = "ExpressionBase.__init__";
+static const char __pyx_k_NPV_ProductExpression[] = "NPV_ProductExpression";
+static const char __pyx_k_PowExpression_getname[] = "PowExpression.getname";
+static const char __pyx_k_Power_expressions_x_y[] = "\n Power expressions::\n\n x**y\n ";
+static const char __pyx_k_SumExpression_getname[] = "_SumExpression.getname";
+static const char __pyx_k_ToStringVisitor_visit[] = "_ToStringVisitor.visit";
+static const char __pyx_k_VariableVisitor_visit[] = "_VariableVisitor.visit";
+static const char __pyx_k_ViewSumExpression_add[] = "ViewSumExpression.add";
+static const char __pyx_k_clone_counter_context[] = "clone_counter_context";
+static const char __pyx_k_pyomo_core_base_param[] = "pyomo.core.base.param";
+static const char __pyx_k_pyutilib_misc_visitor[] = "pyutilib.misc.visitor";
+static const char __pyx_k_ComponentVisitor_visit[] = "_ComponentVisitor.visit";
+static const char __pyx_k_ExpressionBase_getname[] = "ExpressionBase.getname";
+static const char __pyx_k_ExpressionValueVisitor[] = "ExpressionValueVisitor";
+static const char __pyx_k_LinearExpression_nargs[] = "LinearExpression.nargs";
+static const char __pyx_k_NPV_NegationExpression[] = "NPV_NegationExpression";
+static const char __pyx_k_Negation_expressions_x[] = "\n Negation expressions::\n\n - x\n ";
+static const char __pyx_k_RangedExpression_nargs[] = "RangedExpression.nargs";
+static const char __pyx_k_ToStringVisitor___init[] = "_ToStringVisitor.__init__";
+static const char __pyx_k_VariableVisitor___init[] = "_VariableVisitor.__init__";
+static const char __pyx_k_decompose_linear_terms[] = "_decompose_linear_terms";
+static const char __pyx_k_generate_standard_repn[] = "generate_standard_repn";
+static const char __pyx_k_mutable_linear_context[] = "mutable_linear_context";
+static const char __pyx_k_pyomo_util_deprecation[] = "pyomo.util.deprecation";
+static const char __pyx_k_ComponentVisitor___init[] = "_ComponentVisitor.__init__";
+static const char __pyx_k_Equality_expression_x_y[] = "\n Equality expression::\n\n x == y\n ";
+static const char __pyx_k_EvaluationVisitor_visit[] = "_EvaluationVisitor.visit";
+static const char __pyx_k_ExpressionBase_is_fixed[] = "ExpressionBase.is_fixed";
+static const char __pyx_k_GetItemExpression_nargs[] = "GetItemExpression.nargs";
+static const char __pyx_k_LinearExpression___init[] = "LinearExpression.__init__";
+static const char __pyx_k_MutableLinearExpression[] = "_MutableLinearExpression";
+static const char __pyx_k_PolyDegreeVisitor_visit[] = "_PolyDegreeVisitor.visit";
+static const char __pyx_k_PowExpression__is_fixed[] = "PowExpression._is_fixed";
+static const char __pyx_k_Product_expressions_x_y[] = "\n Product expressions::\n\n x*y\n ";
+static const char __pyx_k_RangedExpression___init[] = "RangedExpression.__init__";
+static const char __pyx_k_SimpleExpressionVisitor[] = "SimpleExpressionVisitor";
+static const char __pyx_k_TemplateExpressionError[] = "TemplateExpressionError";
+static const char __pyx_k_UnaryFunctionExpression[] = "UnaryFunctionExpression";
+static const char __pyx_k_ViewSumExpression_nargs[] = "ViewSumExpression.nargs";
+static const char __pyx_k_generate_mul_expression[] = "_generate_mul_expression";
+static const char __pyx_k_generate_sum_expression[] = "_generate_sum_expression";
+static const char __pyx_k_is_potentially_variable[] = "is_potentially_variable";
+static const char __pyx_k_visiting_potential_leaf[] = "visiting_potential_leaf";
+static const char __pyx_k_EqualityExpression_nargs[] = "EqualityExpression.nargs";
+static const char __pyx_k_Expr_if__apply_operation[] = "Expr_if._apply_operation";
+static const char __pyx_k_ExpressionBase___nonzero[] = "ExpressionBase.__nonzero__";
+static const char __pyx_k_ExpressionBase__is_fixed[] = "ExpressionBase._is_fixed";
+static const char __pyx_k_ExpressionBase_to_string[] = "ExpressionBase.to_string";
+static const char __pyx_k_GetItemExpression___init[] = "GetItemExpression.__init__";
+static const char __pyx_k_LinearDecompositionError[] = "LinearDecompositionError";
+static const char __pyx_k_LinearExpression_getname[] = "LinearExpression.getname";
+static const char __pyx_k_LinearOperatorExpression[] = "_LinearOperatorExpression";
+static const char __pyx_k_MutableViewSumExpression[] = "_MutableViewSumExpression";
+static const char __pyx_k_NPV_ReciprocalExpression[] = "NPV_ReciprocalExpression";
+static const char __pyx_k_NegationExpression_nargs[] = "NegationExpression.nargs";
+static const char __pyx_k_PowExpression__to_string[] = "PowExpression._to_string";
+static const char __pyx_k_SumExpression__to_string[] = "_SumExpression._to_string";
+static const char __pyx_k_ViewSumExpression___init[] = "ViewSumExpression.__init__";
+static const char __pyx_k_is_named_expression_type[] = "is_named_expression_type";
+static const char __pyx_k_pyomo_core_expr_numvalue[] = "pyomo.core.expr.numvalue";
+static const char __pyx_k_using_chained_inequality[] = "_using_chained_inequality";
+static const char __pyx_k_ExpressionBase___deepcopy[] = "ExpressionBase.__deepcopy__";
+static const char __pyx_k_ExpressionBase___getstate[] = "ExpressionBase.__getstate__";
+static const char __pyx_k_ExpressionBase__to_string[] = "ExpressionBase._to_string";
+static const char __pyx_k_GetItemExpression_getname[] = "GetItemExpression.getname";
+static const char __pyx_k_LinearExpression_is_fixed[] = "LinearExpression.is_fixed";
+static const char __pyx_k_MutableParamVisitor_visit[] = "_MutableParamVisitor.visit";
+static const char __pyx_k_PowExpression__precedence[] = "PowExpression._precedence";
+static const char __pyx_k_ProductExpression_getname[] = "ProductExpression.getname";
+static const char __pyx_k_SumExpression__precedence[] = "_SumExpression._precedence";
+static const char __pyx_k_Unexpected_nonlinear_term[] = "Unexpected nonlinear term";
+static const char __pyx_k_Unknown_expression_type_s[] = "Unknown expression type '%s'";
+static const char __pyx_k_compute_polynomial_degree[] = "_compute_polynomial_degree";
+static const char __pyx_k_generate_other_expression[] = "_generate_other_expression";
+static const char __pyx_k_ExpressionBase__precedence[] = "ExpressionBase._precedence";
+static const char __pyx_k_ExpressionBase_is_constant[] = "ExpressionBase.is_constant";
+static const char __pyx_k_ExternalFunctionExpression[] = "ExternalFunctionExpression";
+static const char __pyx_k_GetItemExpression_is_fixed[] = "GetItemExpression.is_fixed";
+static const char __pyx_k_InequalityExpression_nargs[] = "InequalityExpression.nargs";
+static const char __pyx_k_MutableParamVisitor___init[] = "_MutableParamVisitor.__init__";
+static const char __pyx_k_NegationExpression_getname[] = "NegationExpression.getname";
+static const char __pyx_k_RangedExpression___nonzero[] = "RangedExpression.__nonzero__";
+static const char __pyx_k_ReciprocalExpression_nargs[] = "ReciprocalExpression.nargs";
+static const char __pyx_k_Reciprocal_expressions_1_x[] = "\n Reciprocal expressions::\n\n 1/x\n ";
+static const char __pyx_k_initialize_expression_data[] = "initialize_expression_data";
+static const char __pyx_k_mutable_sum_context___exit[] = "mutable_sum_context.__exit__";
+static const char __pyx_k_pyomo_core_expr_symbol_map[] = "pyomo.core.expr.symbol_map";
+static const char __pyx_k_GetItemExpression__is_fixed[] = "GetItemExpression._is_fixed";
+static const char __pyx_k_InequalityExpression___init[] = "InequalityExpression.__init__";
+static const char __pyx_k_LinearExpression___deepcopy[] = "LinearExpression.__deepcopy__";
+static const char __pyx_k_LinearExpression___getstate[] = "LinearExpression.__getstate__";
+static const char __pyx_k_LinearExpression__to_string[] = "LinearExpression._to_string";
+static const char __pyx_k_NPV_UnaryFunctionExpression[] = "NPV_UnaryFunctionExpression";
+static const char __pyx_k_RangedExpression___getstate[] = "RangedExpression.__getstate__";
+static const char __pyx_k_RangedExpression__to_string[] = "RangedExpression._to_string";
+static const char __pyx_k_clone_counter_context_count[] = "clone_counter_context.count";
+static const char __pyx_k_identify_mutable_parameters[] = "identify_mutable_parameters";
+static const char __pyx_k_mutable_sum_context___enter[] = "mutable_sum_context.__enter__";
+static const char __pyx_k_pyomo_core_expr_expr_common[] = "pyomo.core.expr.expr_common";
+static const char __pyx_k_pyomo_core_expr_expr_pyomo5[] = "pyomo.core.expr.expr_pyomo5";
+static const char __pyx_k_AbsExpression_construct_node[] = "AbsExpression.construct_node";
+static const char __pyx_k_EqualityExpression___nonzero[] = "EqualityExpression.__nonzero__";
+static const char __pyx_k_ExpressionReplacementVisitor[] = "ExpressionReplacementVisitor";
+static const char __pyx_k_ExpressionValueVisitor_visit[] = "ExpressionValueVisitor.visit";
+static const char __pyx_k_GetItemExpression___getstate[] = "GetItemExpression.__getstate__";
+static const char __pyx_k_GetItemExpression__to_string[] = "GetItemExpression._to_string";
+static const char __pyx_k_LinearExpression__precedence[] = "LinearExpression._precedence";
+static const char __pyx_k_LinearExpression_is_constant[] = "LinearExpression.is_constant";
+static const char __pyx_k_MutableViewSumExpression_add[] = "_MutableViewSumExpression.add";
+static const char __pyx_k_ProductExpression__to_string[] = "ProductExpression._to_string";
+static const char __pyx_k_RangedExpression__precedence[] = "RangedExpression._precedence";
+static const char __pyx_k_RangedExpression_is_constant[] = "RangedExpression.is_constant";
+static const char __pyx_k_ReciprocalExpression_getname[] = "ReciprocalExpression.getname";
+static const char __pyx_k_SimpleExpressionVisitor_xbfs[] = "SimpleExpressionVisitor.xbfs";
+static const char __pyx_k_ViewSumExpression___getstate[] = "ViewSumExpression.__getstate__";
+static const char __pyx_k_ViewSumExpression__to_string[] = "ViewSumExpression._to_string";
+static const char __pyx_k_clone_counter_context___exit[] = "clone_counter_context.__exit__";
+static const char __pyx_k_EqualityExpression__to_string[] = "EqualityExpression._to_string";
+static const char __pyx_k_ExpressionBase_construct_node[] = "ExpressionBase.construct_node";
+static const char __pyx_k_GetItemExpression__precedence[] = "GetItemExpression._precedence";
+static const char __pyx_k_Invalid_inequality_expression[] = "Invalid inequality expression.";
+static const char __pyx_k_NegationExpression__to_string[] = "NegationExpression._to_string";
+static const char __pyx_k_ProductExpression__precedence[] = "ProductExpression._precedence";
+static const char __pyx_k_SimpleExpressionVisitor_visit[] = "SimpleExpressionVisitor.visit";
+static const char __pyx_k_UnaryFunctionExpression_nargs[] = "UnaryFunctionExpression.nargs";
+static const char __pyx_k_ViewSumExpression__precedence[] = "ViewSumExpression._precedence";
+static const char __pyx_k_ViewSumExpression_is_constant[] = "ViewSumExpression.is_constant";
+static const char __pyx_k_clone_counter_context___enter[] = "clone_counter_context.__enter__";
+static const char __pyx_k_mutable_linear_context___exit[] = "mutable_linear_context.__exit__";
+static const char __pyx_k_pyomo_core_base_template_expr[] = "pyomo.core.base.template_expr";
+static const char __pyx_k_An_abstract_class_that_defines[] = "\n An 'abstract' class that defines the polynomial degree for a simple\n linear operator\n ";
+static const char __pyx_k_EqualityExpression__precedence[] = "EqualityExpression._precedence";
+static const char __pyx_k_EqualityExpression_is_constant[] = "EqualityExpression.is_constant";
+static const char __pyx_k_InequalityExpression___nonzero[] = "InequalityExpression.__nonzero__";
+static const char __pyx_k_LinearExpression__combine_expr[] = "LinearExpression._combine_expr";
+static const char __pyx_k_NPV_ExternalFunctionExpression[] = "NPV_ExternalFunctionExpression";
+static const char __pyx_k_NegationExpression__precedence[] = "NegationExpression._precedence";
+static const char __pyx_k_PowExpression__apply_operation[] = "PowExpression._apply_operation";
+static const char __pyx_k_RangedExpression_is_relational[] = "RangedExpression.is_relational";
+static const char __pyx_k_SumExpression__apply_operation[] = "_SumExpression._apply_operation";
+static const char __pyx_k_UnaryFunctionExpression___init[] = "UnaryFunctionExpression.__init__";
+static const char __pyx_k_generate_relational_expression[] = "_generate_relational_expression";
+static const char __pyx_k_mutable_linear_context___enter[] = "mutable_linear_context.__enter__";
+static const char __pyx_k_A_logical_if_then_else_expressi[] = "\n A logical if-then-else expression::\n\n Expr_if(IF_=x, THEN_=y, ELSE_=z)\n\n Args:\n IF_ (expression): A relational expression\n THEN_ (expression): An expression that is used if :attr:`IF_` is true.\n ELSE_ (expression): An expression that is used if :attr:`IF_` is false.\n ";
+static const char __pyx_k_A_mutable_ViewSumExpression_The[] = "\n A mutable ViewSumExpression\n\n The :func:`add` method is slightly different in that it \n does not create a new sum expression, but modifies the\n :attr:`_args_` data in place.\n ";
+static const char __pyx_k_An_expression_object_for_the_fu[] = "\n An expression object for the :func:`abs` function.\n\n Args:\n args (tuple): Children nodes\n ";
+static const char __pyx_k_An_expression_object_linear_pol[] = "\n An expression object linear polynomials.\n\n Args:\n args (tuple): Children nodes\n ";
+static const char __pyx_k_An_expression_object_used_to_de[] = "\n An expression object used to define intrinsic functions (e.g. sin, cos, tan).\n\n Args:\n args (tuple): Children nodes\n name (string): The function name\n fcn: The function that is used to evaluate this expression\n ";
+static const char __pyx_k_An_object_that_defines_a_simple[] = "\n An object that defines a simple summation of expressions\n ";
+static const char __pyx_k_CloneVisitor_visiting_potential[] = "_CloneVisitor.visiting_potential_leaf";
+static const char __pyx_k_Context_manager_for_counting_cl[] = " Context manager for counting cloning events.\n\n This context manager counts the number of times that the\n :func:`clone_expression `\n function is executed.\n ";
+static const char __pyx_k_Context_manager_for_mutable_lin[] = " Context manager for mutable linear sums.\n\n This context manager is used to compute a linear sum while\n treating the summation as a mutable object.\n ";
+static const char __pyx_k_Context_manager_for_mutable_sum[] = " Context manager for mutable sums.\n\n This context manager is used to compute a sum while\n treating the summation as a mutable object.\n ";
+static const char __pyx_k_EvaluationVisitor_visiting_pote[] = "_EvaluationVisitor.visiting_potential_leaf";
+static const char __pyx_k_Expr_if_is_potentially_variable[] = "Expr_if.is_potentially_variable";
+static const char __pyx_k_ExpressionBase__apply_operation[] = "ExpressionBase._apply_operation";
+static const char __pyx_k_ExpressionValueVisitor_finalize[] = "ExpressionValueVisitor.finalize";
+static const char __pyx_k_ExpressionValueVisitor_visiting[] = "ExpressionValueVisitor.visiting_potential_leaf";
+static const char __pyx_k_Expression_to_call_func___getit[] = "\n Expression to call :func:`__getitem__` on the base object.\n ";
+static const char __pyx_k_External_function_expressions_E[] = "\n External function expressions\n\n Example::\n\n model = ConcreteModel()\n model.a = Var()\n model.f = ExternalFunction(library='foo.so', function='bar')\n expr = model.f(model.a)\n\n Args: \n args (tuple): children of this node\n fcn: a class that defines this external function\n ";
+static const char __pyx_k_InequalityExpression___getstate[] = "InequalityExpression.__getstate__";
+static const char __pyx_k_InequalityExpression__to_string[] = "InequalityExpression._to_string";
+static const char __pyx_k_Inequality_expressions_which_de[] = "\n Inequality expressions, which define less-than or\n less-than-or-equal relations::\n\n x < y\n x <= y\n\n Args:\n args (tuple): child nodes\n strict (bool): a flag that indicates whether the inequality is strict\n ";
+static const char __pyx_k_IsFixedVisitor_visiting_potenti[] = "_IsFixedVisitor.visiting_potential_leaf";
+static const char __pyx_k_LinearDecompositionError___init[] = "LinearDecompositionError.__init__";
+static const char __pyx_k_LinearExpression_construct_node[] = "LinearExpression.construct_node";
+static const char __pyx_k_LinearExpression_is_potentially[] = "LinearExpression.is_potentially_variable";
+static const char __pyx_k_LinearOperatorExpression__compu[] = "_LinearOperatorExpression._compute_polynomial_degree";
+static const char __pyx_k_NOTE_This_doesn_t_check_if_comb[] = "\n NOTE: This doesn't check if combiner logic is \n all or any and short-circuit the test. It's\n not clear that that is an important optimization.\n ";
+static const char __pyx_k_Note_This_class_is_a_customizat[] = "\n Note:\n This class is a customization of the PyUtilib :class:`SimpleVisitor\n ` class that is tailored\n to efficiently walk Pyomo expression trees. However, this class\n is not a subclass of the PyUtilib :class:`SimpleVisitor\n ` class because all key methods\n are reimplemented.\n ";
+static const char __pyx_k_PolyDegreeVisitor_visiting_pote[] = "_PolyDegreeVisitor.visiting_potential_leaf";
+static const char __pyx_k_RangedExpression_construct_node[] = "RangedExpression.construct_node";
+static const char __pyx_k_RangedExpression_is_potentially[] = "RangedExpression.is_potentially_variable";
+static const char __pyx_k_Ranged_expressions_which_define[] = "\n Ranged expressions, which define relations with a lower and upper bound::\n\n x < y < z\n x <= y <= z\n\n Args:\n args (tuple): child nodes\n strict (tuple): flags that indicates whether the inequalities are strict\n ";
+static const char __pyx_k_ReciprocalExpression__to_string[] = "ReciprocalExpression._to_string";
+static const char __pyx_k_Sum_expression_x_y_Args_args_li[] = "\n Sum expression::\n\n x + y\n\n Args:\n args (list): Children nodes\n ";
+static const char __pyx_k_The_base_class_for_Pyomo_expres[] = "\n The base class for Pyomo expressions.\n\n This class is used to define nodes in an expression\n tree.\n\n Args:\n args (list or tuple): Children of this node.\n ";
+static const char __pyx_k_ToStringVisitor_visiting_potent[] = "_ToStringVisitor.visiting_potential_leaf";
+static const char __pyx_k_UnaryFunctionExpression_getname[] = "UnaryFunctionExpression.getname";
+static const char __pyx_k_chainedInequality_error_message[] = "_chainedInequality.error_message";
+static const char __pyx_k_generate_intrinsic_function_exp[] = "_generate_intrinsic_function_expression";
+static const char __pyx_k_pyomo_core_expr_expr_pyomo5_pyx[] = "pyomo/core/expr/expr_pyomo5.pyx";
+static const char __pyx_k_s_The_inequality_expression_s_c[] = "%s\n\n The inequality expression:\n %s\n contains non-constant terms (variables) that were evaluated in an\n unexpected Boolean context at\n File '%s', line %s%s\n\n Evaluating Pyomo variables in a Boolean context, e.g.\n if expression <= 5:\n is generally invalid. If you want to obtain the Boolean value of the\n expression based on the current variable values, explicitly evaluate the\n expression using the value() function:\n if value(expression) <= 5:\n or\n if value(expression <= 5):\n ";
+static const char __pyx_k_Argument_for_expression_is_an_in[] = "Argument for expression is an indexed numeric value\nspecified without an index:\n\t%s\nIs this value defined over an index that you did not specify?";
+static const char __pyx_k_Attempting_to_form_a_compound_in[] = "Attempting to form a compound inequality with two %s bounds";
+static const char __pyx_k_Cannot_create_a_compound_inequal[] = "Cannot create a compound inequality with identical upper and lower\n\tbounds using strict inequalities: constraint infeasible:\n\t%s and %s < %s";
+static const char __pyx_k_Cannot_create_an_EqualityExpress[] = "Cannot create an EqualityExpression where one of the sub-expressions is a relational expression:\n ";
+static const char __pyx_k_Cannot_create_an_InequalityExpre[] = "Cannot create an InequalityExpression where both sub-expressions are relational expressions.";
+static const char __pyx_k_Cannot_multiply_a_linear_express[] = "Cannot multiply a linear expression with a variable expression";
+static const char __pyx_k_Chained_inequalities_are_depreca[] = "Chained inequalities are deprecated. Use the inequality() function to express ranged inequality expressions.";
+static const char __pyx_k_Derived_expression_s_failed_to_i[] = "Derived expression (%s) failed to implement getname()";
+static const char __pyx_k_EqualityExpression__apply_operat[] = "EqualityExpression._apply_operation";
+static const char __pyx_k_EqualityExpression_is_potentiall[] = "EqualityExpression.is_potentially_variable";
+static const char __pyx_k_EqualityExpression_is_relational[] = "EqualityExpression.is_relational";
+static const char __pyx_k_Expr_if__compute_polynomial_degr[] = "Expr_if._compute_polynomial_degree";
+static const char __pyx_k_ExpressionBase__compute_polynomi[] = "ExpressionBase._compute_polynomial_degree";
+static const char __pyx_k_ExpressionBase_is_expression_typ[] = "ExpressionBase.is_expression_type";
+static const char __pyx_k_ExpressionBase_is_named_expressi[] = "ExpressionBase.is_named_expression_type";
+static const char __pyx_k_ExpressionBase_is_potentially_va[] = "ExpressionBase.is_potentially_variable";
+static const char __pyx_k_ExpressionBase_polynomial_degree[] = "ExpressionBase.polynomial_degree";
+static const char __pyx_k_ExpressionReplacementVisitor___i[] = "ExpressionReplacementVisitor.__init__";
+static const char __pyx_k_ExpressionReplacementVisitor_con[] = "ExpressionReplacementVisitor.construct_node";
+static const char __pyx_k_ExpressionReplacementVisitor_dfs[] = "ExpressionReplacementVisitor.dfs_postorder_stack";
+static const char __pyx_k_ExpressionReplacementVisitor_fin[] = "ExpressionReplacementVisitor.finalize";
+static const char __pyx_k_ExpressionReplacementVisitor_vis[] = "ExpressionReplacementVisitor.visit";
+static const char __pyx_k_ExpressionValueVisitor_dfs_posto[] = "ExpressionValueVisitor.dfs_postorder_stack";
+static const char __pyx_k_ExternalFunctionExpression___get[] = "ExternalFunctionExpression.__getstate__";
+static const char __pyx_k_ExternalFunctionExpression___ini[] = "ExternalFunctionExpression.__init__";
+static const char __pyx_k_ExternalFunctionExpression__appl[] = "ExternalFunctionExpression._apply_operation";
+static const char __pyx_k_ExternalFunctionExpression__comp[] = "ExternalFunctionExpression._compute_polynomial_degree";
+static const char __pyx_k_ExternalFunctionExpression__to_s[] = "ExternalFunctionExpression._to_string";
+static const char __pyx_k_ExternalFunctionExpression_const[] = "ExternalFunctionExpression.construct_node";
+static const char __pyx_k_ExternalFunctionExpression_getna[] = "ExternalFunctionExpression.getname";
+static const char __pyx_k_ExternalFunctionExpression_nargs[] = "ExternalFunctionExpression.nargs";
+static const char __pyx_k_GetItemExpression__apply_operati[] = "GetItemExpression._apply_operation";
+static const char __pyx_k_GetItemExpression__compute_polyn[] = "GetItemExpression._compute_polynomial_degree..genexpr";
+static const char __pyx_k_GetItemExpression_construct_node[] = "GetItemExpression.construct_node";
+static const char __pyx_k_GetItemExpression_is_potentially[] = "GetItemExpression.is_potentially_variable..genexpr";
+static const char __pyx_k_GetItemExpression_resolve_templa[] = "GetItemExpression.resolve_template..genexpr";
+static const char __pyx_k_InequalityExpression__apply_oper[] = "InequalityExpression._apply_operation";
+static const char __pyx_k_InequalityExpression__precedence[] = "InequalityExpression._precedence";
+static const char __pyx_k_InequalityExpression_construct_n[] = "InequalityExpression.construct_node";
+static const char __pyx_k_InequalityExpression_is_constant[] = "InequalityExpression.is_constant";
+static const char __pyx_k_InequalityExpression_is_potentia[] = "InequalityExpression.is_potentially_variable";
+static const char __pyx_k_InequalityExpression_is_relation[] = "InequalityExpression.is_relational";
+static const char __pyx_k_Invalid_equality_expression_with[] = "Invalid equality expression with strict inequalities.";
+static const char __pyx_k_Invalid_index_for_expression_arg[] = "Invalid index for expression argument: %d";
+static const char __pyx_k_LinearExpression__apply_operatio[] = "LinearExpression._apply_operation..genexpr";
+static const char __pyx_k_LinearExpression__compute_polyno[] = "LinearExpression._compute_polynomial_degree";
+static const char __pyx_k_NPV_AbsExpression_is_potentially[] = "NPV_AbsExpression.is_potentially_variable";
+static const char __pyx_k_NPV_ExternalFunctionExpression_i[] = "NPV_ExternalFunctionExpression.is_potentially_variable";
+static const char __pyx_k_NPV_NegationExpression_is_potent[] = "NPV_NegationExpression.is_potentially_variable";
+static const char __pyx_k_NPV_PowExpression_is_potentially[] = "NPV_PowExpression.is_potentially_variable";
+static const char __pyx_k_NPV_ProductExpression_is_potenti[] = "NPV_ProductExpression.is_potentially_variable";
+static const char __pyx_k_NPV_ReciprocalExpression_is_pote[] = "NPV_ReciprocalExpression.is_potentially_variable";
+static const char __pyx_k_NPV_SumExpression_is_potentially[] = "NPV_SumExpression.is_potentially_variable";
+static const char __pyx_k_NPV_UnaryFunctionExpression_is_p[] = "NPV_UnaryFunctionExpression.is_potentially_variable";
+static const char __pyx_k_NegationExpression__apply_operat[] = "NegationExpression._apply_operation";
+static const char __pyx_k_NegationExpression__compute_poly[] = "NegationExpression._compute_polynomial_degree";
+static const char __pyx_k_PowExpression__compute_polynomia[] = "PowExpression._compute_polynomial_degree";
+static const char __pyx_k_ProductExpression__apply_operati[] = "ProductExpression._apply_operation";
+static const char __pyx_k_ProductExpression__compute_polyn[] = "ProductExpression._compute_polynomial_degree";
+static const char __pyx_k_Quadratic_terms_exist_in_a_produ[] = "Quadratic terms exist in a product expression.";
+static const char __pyx_k_RangedExpression__apply_operatio[] = "RangedExpression._apply_operation";
+static const char __pyx_k_ReciprocalExpression__apply_oper[] = "ReciprocalExpression._apply_operation";
+static const char __pyx_k_ReciprocalExpression__compute_po[] = "ReciprocalExpression._compute_polynomial_degree";
+static const char __pyx_k_ReciprocalExpression__precedence[] = "ReciprocalExpression._precedence";
+static const char __pyx_k_Relational_expression_used_in_an[] = "Relational expression used in an unexpected Boolean context.";
+static const char __pyx_k_SimpleExpressionVisitor_finalize[] = "SimpleExpressionVisitor.finalize";
+static const char __pyx_k_SimpleExpressionVisitor_xbfs_yie[] = "SimpleExpressionVisitor.xbfs_yield_leaves";
+static const char __pyx_k_The_visiting_potential_leaf_meth[] = "The visiting_potential_leaf method needs to be defined.";
+static const char __pyx_k_Unallowed_operation_on_linear_ex[] = "Unallowed operation on linear expression: division with a variable RHS";
+static const char __pyx_k_Unallowed_operation_on_mutable_l[] = "Unallowed operation on mutable linear expression: %d";
+static const char __pyx_k_UnaryFunctionExpression___getsta[] = "UnaryFunctionExpression.__getstate__";
+static const char __pyx_k_UnaryFunctionExpression__apply_o[] = "UnaryFunctionExpression._apply_operation";
+static const char __pyx_k_UnaryFunctionExpression__compute[] = "UnaryFunctionExpression._compute_polynomial_degree";
+static const char __pyx_k_UnaryFunctionExpression__to_stri[] = "UnaryFunctionExpression._to_string";
+static const char __pyx_k_UnaryFunctionExpression_construc[] = "UnaryFunctionExpression.construct_node";
+static const char __pyx_k_Unknown_relational_expression_ty[] = "Unknown relational expression type '%s'";
+static const char __pyx_k_ViewSumExpression__apply_operati[] = "ViewSumExpression._apply_operation";
+static const char __pyx_k_ViewSumExpression_construct_node[] = "ViewSumExpression.construct_node";
+static const char __pyx_k_ViewSumExpression_is_potentially[] = "ViewSumExpression.is_potentially_variable";
+static const char __pyx_k_pyomo_core_kernel_component_vari[] = "pyomo.core.kernel.component_variable";
+static const char __pyx_k_Note_This_class_is_a_customizat_2[] = "\n Note:\n This class is a customization of the PyUtilib :class:`ValueVisitor\n ` class that is tailored\n to efficiently walk Pyomo expression trees. However, this class\n is not a subclass of the PyUtilib :class:`ValueVisitor\n ` class because all key methods\n are reimplemented.\n ";
+static const char __pyx_k_Note_This_class_is_a_customizat_3[] = "\n Note:\n This class is a customization of the PyUtilib :class:`ValueVisitor\n ` class that is tailored\n to support replacement of sub-trees in a Pyomo expression\n tree. However, this class is not a subclass of the PyUtilib\n :class:`ValueVisitor `\n class because all key methods are reimplemented.\n ";
+static const char __pyx_k_Cannot_create_an_InequalityExpre_2[] = "Cannot create an InequalityExpression where one of the sub-expressions is an equality or ranged expression:\n ";
+static const char __pyx_k_Derived_expression_s_failed_to_i_2[] = "Derived expression (%s) failed to implement _apply_operation()";
+static const char __pyx_k_ExpressionReplacementVisitor_vis_2[] = "ExpressionReplacementVisitor.visiting_potential_leaf";
+static const char __pyx_k_GetItemExpression__compute_polyn_2[] = "GetItemExpression._compute_polynomial_degree";
+static const char __pyx_k_GetItemExpression_is_potentially_2[] = "GetItemExpression.is_potentially_variable";
+static const char __pyx_k_GetItemExpression_resolve_templa_2[] = "GetItemExpression.resolve_template";
+static const char __pyx_k_LinearExpression__apply_operatio_2[] = "LinearExpression._apply_operation";
+static PyObject *__pyx_kp_s_;
+static PyObject *__pyx_kp_s_0;
+static PyObject *__pyx_kp_s_0_1;
+static PyObject *__pyx_kp_s_0_1_2;
+static PyObject *__pyx_kp_s_0_1_2_2;
+static PyObject *__pyx_kp_s_0_1_2_3_4;
+static PyObject *__pyx_kp_s_0_1_3;
+static PyObject *__pyx_kp_s_0_1_4;
+static PyObject *__pyx_kp_s_0_1_5;
+static PyObject *__pyx_kp_s_0_1_6;
+static PyObject *__pyx_kp_s_0_1_7;
+static PyObject *__pyx_kp_s_0_1_8;
+static PyObject *__pyx_kp_s_0_1_then_2_else_3;
+static PyObject *__pyx_kp_s_0_2;
+static PyObject *__pyx_kp_s_0_3;
+static PyObject *__pyx_kp_s_1;
+static PyObject *__pyx_kp_s_1_0;
+static PyObject *__pyx_kp_s_1_0_2;
+static PyObject *__pyx_kp_s_1_0_3;
+static PyObject *__pyx_kp_s_1_2;
+static PyObject *__pyx_kp_s_A_logical_if_then_else_expressi;
+static PyObject *__pyx_kp_s_A_mutable_ViewSumExpression_The;
+static PyObject *__pyx_n_s_AbsExpression;
+static PyObject *__pyx_n_s_AbsExpression___init;
+static PyObject *__pyx_n_s_AbsExpression_construct_node;
+static PyObject *__pyx_kp_s_An_abstract_class_that_defines;
+static PyObject *__pyx_kp_s_An_expression_object_for_the_fu;
+static PyObject *__pyx_kp_s_An_expression_object_linear_pol;
+static PyObject *__pyx_kp_s_An_expression_object_used_to_de;
+static PyObject *__pyx_kp_s_An_object_that_defines_a_simple;
+static PyObject *__pyx_kp_s_Argument_for_expression_is_an_in;
+static PyObject *__pyx_kp_s_Attempting_to_form_a_compound_in;
+static PyObject *__pyx_kp_s_Cannot_create_a_compound_inequal;
+static PyObject *__pyx_kp_s_Cannot_create_an_EqualityExpress;
+static PyObject *__pyx_kp_s_Cannot_create_an_InequalityExpre;
+static PyObject *__pyx_kp_s_Cannot_create_an_InequalityExpre_2;
+static PyObject *__pyx_kp_s_Cannot_multiply_a_linear_express;
+static PyObject *__pyx_kp_s_Chained_inequalities_are_depreca;
+static PyObject *__pyx_n_s_CloneVisitor;
+static PyObject *__pyx_n_s_CloneVisitor___init;
+static PyObject *__pyx_n_s_CloneVisitor_visit;
+static PyObject *__pyx_n_s_CloneVisitor_visiting_potential;
+static PyObject *__pyx_n_s_ComponentVisitor;
+static PyObject *__pyx_n_s_ComponentVisitor___init;
+static PyObject *__pyx_n_s_ComponentVisitor_visit;
+static PyObject *__pyx_kp_s_Context_manager_for_counting_cl;
+static PyObject *__pyx_kp_s_Context_manager_for_mutable_lin;
+static PyObject *__pyx_kp_s_Context_manager_for_mutable_sum;
+static PyObject *__pyx_kp_s_Derived_expression_s_failed_to_i;
+static PyObject *__pyx_kp_s_Derived_expression_s_failed_to_i_2;
+static PyObject *__pyx_n_s_ELSE;
+static PyObject *__pyx_n_s_EqualityExpression;
+static PyObject *__pyx_n_s_EqualityExpression___nonzero;
+static PyObject *__pyx_n_s_EqualityExpression__apply_operat;
+static PyObject *__pyx_n_s_EqualityExpression__precedence;
+static PyObject *__pyx_n_s_EqualityExpression__to_string;
+static PyObject *__pyx_n_s_EqualityExpression_is_constant;
+static PyObject *__pyx_n_s_EqualityExpression_is_potentiall;
+static PyObject *__pyx_n_s_EqualityExpression_is_relational;
+static PyObject *__pyx_n_s_EqualityExpression_nargs;
+static PyObject *__pyx_kp_s_Equality_expression_x_y;
+static PyObject *__pyx_n_s_EvaluationVisitor;
+static PyObject *__pyx_n_s_EvaluationVisitor_visit;
+static PyObject *__pyx_n_s_EvaluationVisitor_visiting_pote;
+static PyObject *__pyx_n_s_Expr_if;
+static PyObject *__pyx_n_s_Expr_if___getstate;
+static PyObject *__pyx_n_s_Expr_if___init;
+static PyObject *__pyx_n_s_Expr_if__apply_operation;
+static PyObject *__pyx_n_s_Expr_if__compute_polynomial_degr;
+static PyObject *__pyx_n_s_Expr_if__is_fixed;
+static PyObject *__pyx_n_s_Expr_if__to_string;
+static PyObject *__pyx_n_s_Expr_if_getname;
+static PyObject *__pyx_n_s_Expr_if_is_constant;
+static PyObject *__pyx_n_s_Expr_if_is_potentially_variable;
+static PyObject *__pyx_n_s_Expr_if_nargs;
+static PyObject *__pyx_n_s_ExpressionBase;
+static PyObject *__pyx_n_s_ExpressionBase___call;
+static PyObject *__pyx_n_s_ExpressionBase___deepcopy;
+static PyObject *__pyx_n_s_ExpressionBase___getstate;
+static PyObject *__pyx_n_s_ExpressionBase___init;
+static PyObject *__pyx_n_s_ExpressionBase___nonzero;
+static PyObject *__pyx_n_s_ExpressionBase___str;
+static PyObject *__pyx_n_s_ExpressionBase__apply_operation;
+static PyObject *__pyx_n_s_ExpressionBase__compute_polynomi;
+static PyObject *__pyx_n_s_ExpressionBase__is_fixed;
+static PyObject *__pyx_n_s_ExpressionBase__precedence;
+static PyObject *__pyx_n_s_ExpressionBase__to_string;
+static PyObject *__pyx_n_s_ExpressionBase_arg;
+static PyObject *__pyx_n_s_ExpressionBase_args;
+static PyObject *__pyx_n_s_ExpressionBase_clone;
+static PyObject *__pyx_n_s_ExpressionBase_construct_node;
+static PyObject *__pyx_n_s_ExpressionBase_getname;
+static PyObject *__pyx_n_s_ExpressionBase_is_constant;
+static PyObject *__pyx_n_s_ExpressionBase_is_expression_typ;
+static PyObject *__pyx_n_s_ExpressionBase_is_fixed;
+static PyObject *__pyx_n_s_ExpressionBase_is_named_expressi;
+static PyObject *__pyx_n_s_ExpressionBase_is_potentially_va;
+static PyObject *__pyx_n_s_ExpressionBase_nargs;
+static PyObject *__pyx_n_s_ExpressionBase_polynomial_degree;
+static PyObject *__pyx_n_s_ExpressionBase_size;
+static PyObject *__pyx_n_s_ExpressionBase_to_string;
+static PyObject *__pyx_n_s_ExpressionReplacementVisitor;
+static PyObject *__pyx_n_s_ExpressionReplacementVisitor___i;
+static PyObject *__pyx_n_s_ExpressionReplacementVisitor_con;
+static PyObject *__pyx_n_s_ExpressionReplacementVisitor_dfs;
+static PyObject *__pyx_n_s_ExpressionReplacementVisitor_fin;
+static PyObject *__pyx_n_s_ExpressionReplacementVisitor_vis;
+static PyObject *__pyx_n_s_ExpressionReplacementVisitor_vis_2;
+static PyObject *__pyx_n_s_ExpressionValueVisitor;
+static PyObject *__pyx_n_s_ExpressionValueVisitor_dfs_posto;
+static PyObject *__pyx_n_s_ExpressionValueVisitor_finalize;
+static PyObject *__pyx_n_s_ExpressionValueVisitor_visit;
+static PyObject *__pyx_n_s_ExpressionValueVisitor_visiting;
+static PyObject *__pyx_kp_s_Expression_to_call_func___getit;
+static PyObject *__pyx_n_s_ExternalFunctionExpression;
+static PyObject *__pyx_n_s_ExternalFunctionExpression___get;
+static PyObject *__pyx_n_s_ExternalFunctionExpression___ini;
+static PyObject *__pyx_n_s_ExternalFunctionExpression__appl;
+static PyObject *__pyx_n_s_ExternalFunctionExpression__comp;
+static PyObject *__pyx_n_s_ExternalFunctionExpression__to_s;
+static PyObject *__pyx_n_s_ExternalFunctionExpression_const;
+static PyObject *__pyx_n_s_ExternalFunctionExpression_getna;
+static PyObject *__pyx_n_s_ExternalFunctionExpression_nargs;
+static PyObject *__pyx_kp_s_External_function_expressions_E;
+static PyObject *__pyx_n_s_GetItemExpression;
+static PyObject *__pyx_n_s_GetItemExpression___getstate;
+static PyObject *__pyx_n_s_GetItemExpression___init;
+static PyObject *__pyx_n_s_GetItemExpression__apply_operati;
+static PyObject *__pyx_n_s_GetItemExpression__compute_polyn;
+static PyObject *__pyx_n_s_GetItemExpression__compute_polyn_2;
+static PyObject *__pyx_n_s_GetItemExpression__is_fixed;
+static PyObject *__pyx_n_s_GetItemExpression__precedence;
+static PyObject *__pyx_n_s_GetItemExpression__to_string;
+static PyObject *__pyx_n_s_GetItemExpression_construct_node;
+static PyObject *__pyx_n_s_GetItemExpression_getname;
+static PyObject *__pyx_n_s_GetItemExpression_is_fixed;
+static PyObject *__pyx_n_s_GetItemExpression_is_potentially;
+static PyObject *__pyx_n_s_GetItemExpression_is_potentially_2;
+static PyObject *__pyx_n_s_GetItemExpression_nargs;
+static PyObject *__pyx_n_s_GetItemExpression_resolve_templa;
+static PyObject *__pyx_n_s_GetItemExpression_resolve_templa_2;
+static PyObject *__pyx_n_s_IF;
+static PyObject *__pyx_n_s_IVariable;
+static PyObject *__pyx_n_s_InequalityExpression;
+static PyObject *__pyx_n_s_InequalityExpression___getstate;
+static PyObject *__pyx_n_s_InequalityExpression___init;
+static PyObject *__pyx_n_s_InequalityExpression___nonzero;
+static PyObject *__pyx_n_s_InequalityExpression__apply_oper;
+static PyObject *__pyx_n_s_InequalityExpression__precedence;
+static PyObject *__pyx_n_s_InequalityExpression__to_string;
+static PyObject *__pyx_n_s_InequalityExpression_construct_n;
+static PyObject *__pyx_n_s_InequalityExpression_is_constant;
+static PyObject *__pyx_n_s_InequalityExpression_is_potentia;
+static PyObject *__pyx_n_s_InequalityExpression_is_relation;
+static PyObject *__pyx_n_s_InequalityExpression_nargs;
+static PyObject *__pyx_kp_s_Inequality_expressions_which_de;
+static PyObject *__pyx_kp_s_Invalid_equality_expression_with;
+static PyObject *__pyx_kp_s_Invalid_index_for_expression_arg;
+static PyObject *__pyx_kp_s_Invalid_inequality_expression;
+static PyObject *__pyx_n_s_IsFixedVisitor;
+static PyObject *__pyx_n_s_IsFixedVisitor_visit;
+static PyObject *__pyx_n_s_IsFixedVisitor_visiting_potenti;
+static PyObject *__pyx_n_s_KeyError;
+static PyObject *__pyx_n_s_LinearDecompositionError;
+static PyObject *__pyx_n_s_LinearDecompositionError___init;
+static PyObject *__pyx_n_s_LinearExpression;
+static PyObject *__pyx_n_s_LinearExpression___deepcopy;
+static PyObject *__pyx_n_s_LinearExpression___getstate;
+static PyObject *__pyx_n_s_LinearExpression___init;
+static PyObject *__pyx_n_s_LinearExpression__apply_operatio;
+static PyObject *__pyx_n_s_LinearExpression__apply_operatio_2;
+static PyObject *__pyx_n_s_LinearExpression__combine_expr;
+static PyObject *__pyx_n_s_LinearExpression__compute_polyno;
+static PyObject *__pyx_n_s_LinearExpression__precedence;
+static PyObject *__pyx_n_s_LinearExpression__to_string;
+static PyObject *__pyx_n_s_LinearExpression_construct_node;
+static PyObject *__pyx_n_s_LinearExpression_getname;
+static PyObject *__pyx_n_s_LinearExpression_is_constant;
+static PyObject *__pyx_n_s_LinearExpression_is_fixed;
+static PyObject *__pyx_n_s_LinearExpression_is_potentially;
+static PyObject *__pyx_n_s_LinearExpression_nargs;
+static PyObject *__pyx_n_s_LinearOperatorExpression;
+static PyObject *__pyx_n_s_LinearOperatorExpression__compu;
+static PyObject *__pyx_n_s_MutableLinearExpression;
+static PyObject *__pyx_n_s_MutableParamVisitor;
+static PyObject *__pyx_n_s_MutableParamVisitor___init;
+static PyObject *__pyx_n_s_MutableParamVisitor_visit;
+static PyObject *__pyx_n_s_MutableViewSumExpression;
+static PyObject *__pyx_n_s_MutableViewSumExpression_add;
+static PyObject *__pyx_kp_s_NOTE_This_doesn_t_check_if_comb;
+static PyObject *__pyx_n_s_NPV_AbsExpression;
+static PyObject *__pyx_n_s_NPV_AbsExpression_is_potentially;
+static PyObject *__pyx_n_s_NPV_ExternalFunctionExpression;
+static PyObject *__pyx_n_s_NPV_ExternalFunctionExpression_i;
+static PyObject *__pyx_n_s_NPV_NegationExpression;
+static PyObject *__pyx_n_s_NPV_NegationExpression_is_potent;
+static PyObject *__pyx_n_s_NPV_PowExpression;
+static PyObject *__pyx_n_s_NPV_PowExpression_is_potentially;
+static PyObject *__pyx_n_s_NPV_ProductExpression;
+static PyObject *__pyx_n_s_NPV_ProductExpression_is_potenti;
+static PyObject *__pyx_n_s_NPV_ReciprocalExpression;
+static PyObject *__pyx_n_s_NPV_ReciprocalExpression_is_pote;
+static PyObject *__pyx_n_s_NPV_SumExpression;
+static PyObject *__pyx_n_s_NPV_SumExpression_is_potentially;
+static PyObject *__pyx_n_s_NPV_UnaryFunctionExpression;
+static PyObject *__pyx_n_s_NPV_UnaryFunctionExpression_is_p;
+static PyObject *__pyx_n_s_NegationExpression;
+static PyObject *__pyx_n_s_NegationExpression__apply_operat;
+static PyObject *__pyx_n_s_NegationExpression__compute_poly;
+static PyObject *__pyx_n_s_NegationExpression__precedence;
+static PyObject *__pyx_n_s_NegationExpression__to_string;
+static PyObject *__pyx_n_s_NegationExpression_getname;
+static PyObject *__pyx_n_s_NegationExpression_nargs;
+static PyObject *__pyx_kp_s_Negation_expressions_x;
+static PyObject *__pyx_n_s_NotImplementedError;
+static PyObject *__pyx_kp_s_Note_This_class_is_a_customizat;
+static PyObject *__pyx_kp_s_Note_This_class_is_a_customizat_2;
+static PyObject *__pyx_kp_s_Note_This_class_is_a_customizat_3;
+static PyObject *__pyx_n_s_NumericConstant;
+static PyObject *__pyx_n_s_NumericValue;
+static PyObject *__pyx_n_s_PRECEDENCE;
+static PyObject *__pyx_n_s_ParamData;
+static PyObject *__pyx_n_s_PolyDegreeVisitor;
+static PyObject *__pyx_n_s_PolyDegreeVisitor_visit;
+static PyObject *__pyx_n_s_PolyDegreeVisitor_visiting_pote;
+static PyObject *__pyx_n_s_PowExpression;
+static PyObject *__pyx_n_s_PowExpression__apply_operation;
+static PyObject *__pyx_n_s_PowExpression__compute_polynomia;
+static PyObject *__pyx_n_s_PowExpression__is_fixed;
+static PyObject *__pyx_n_s_PowExpression__precedence;
+static PyObject *__pyx_n_s_PowExpression__to_string;
+static PyObject *__pyx_n_s_PowExpression_getname;
+static PyObject *__pyx_kp_s_Power_expressions_x_y;
+static PyObject *__pyx_n_s_ProductExpression;
+static PyObject *__pyx_n_s_ProductExpression__apply_operati;
+static PyObject *__pyx_n_s_ProductExpression__compute_polyn;
+static PyObject *__pyx_n_s_ProductExpression__precedence;
+static PyObject *__pyx_n_s_ProductExpression__to_string;
+static PyObject *__pyx_n_s_ProductExpression_getname;
+static PyObject *__pyx_kp_s_Product_expressions_x_y;
+static PyObject *__pyx_kp_s_Quadratic_terms_exist_in_a_produ;
+static PyObject *__pyx_n_s_RangedExpression;
+static PyObject *__pyx_n_s_RangedExpression___getstate;
+static PyObject *__pyx_n_s_RangedExpression___init;
+static PyObject *__pyx_n_s_RangedExpression___nonzero;
+static PyObject *__pyx_n_s_RangedExpression__apply_operatio;
+static PyObject *__pyx_n_s_RangedExpression__precedence;
+static PyObject *__pyx_n_s_RangedExpression__to_string;
+static PyObject *__pyx_n_s_RangedExpression_construct_node;
+static PyObject *__pyx_n_s_RangedExpression_is_constant;
+static PyObject *__pyx_n_s_RangedExpression_is_potentially;
+static PyObject *__pyx_n_s_RangedExpression_is_relational;
+static PyObject *__pyx_n_s_RangedExpression_nargs;
+static PyObject *__pyx_kp_s_Ranged_expressions_which_define;
+static PyObject *__pyx_n_s_ReciprocalExpression;
+static PyObject *__pyx_n_s_ReciprocalExpression__apply_oper;
+static PyObject *__pyx_n_s_ReciprocalExpression__compute_po;
+static PyObject *__pyx_n_s_ReciprocalExpression__precedence;
+static PyObject *__pyx_n_s_ReciprocalExpression__to_string;
+static PyObject *__pyx_n_s_ReciprocalExpression_getname;
+static PyObject *__pyx_n_s_ReciprocalExpression_nargs;
+static PyObject *__pyx_kp_s_Reciprocal_expressions_1_x;
+static PyObject *__pyx_kp_s_Relational_expression_used_in_an;
+static PyObject *__pyx_n_s_RuntimeError;
+static PyObject *__pyx_n_s_SimpleExpressionVisitor;
+static PyObject *__pyx_n_s_SimpleExpressionVisitor_finalize;
+static PyObject *__pyx_n_s_SimpleExpressionVisitor_visit;
+static PyObject *__pyx_n_s_SimpleExpressionVisitor_xbfs;
+static PyObject *__pyx_n_s_SimpleExpressionVisitor_xbfs_yie;
+static PyObject *__pyx_n_s_SimpleParam;
+static PyObject *__pyx_n_s_SimpleVisitor;
+static PyObject *__pyx_n_s_SizeVisitor;
+static PyObject *__pyx_n_s_SizeVisitor___init;
+static PyObject *__pyx_n_s_SizeVisitor_finalize;
+static PyObject *__pyx_n_s_SizeVisitor_visit;
+static PyObject *__pyx_n_s_StopIteration;
+static PyObject *__pyx_n_s_SumExpression;
+static PyObject *__pyx_n_s_SumExpression__apply_operation;
+static PyObject *__pyx_n_s_SumExpression__precedence;
+static PyObject *__pyx_n_s_SumExpression__to_string;
+static PyObject *__pyx_n_s_SumExpression_getname;
+static PyObject *__pyx_kp_s_Sum_expression_x_y_Args_args_li;
+static PyObject *__pyx_n_s_SymbolMap;
+static PyObject *__pyx_n_s_THEN;
+static PyObject *__pyx_n_s_TO_STRING_VERBOSE;
+static PyObject *__pyx_n_s_TemplateExpressionError;
+static PyObject *__pyx_kp_s_The_base_class_for_Pyomo_expres;
+static PyObject *__pyx_kp_s_The_visiting_potential_leaf_meth;
+static PyObject *__pyx_n_s_ToStringVisitor;
+static PyObject *__pyx_n_s_ToStringVisitor___init;
+static PyObject *__pyx_n_s_ToStringVisitor_visit;
+static PyObject *__pyx_n_s_ToStringVisitor_visiting_potent;
+static PyObject *__pyx_n_s_TypeError;
+static PyObject *__pyx_kp_s_Unallowed_operation_on_linear_ex;
+static PyObject *__pyx_kp_s_Unallowed_operation_on_mutable_l;
+static PyObject *__pyx_n_s_UnaryFunctionExpression;
+static PyObject *__pyx_n_s_UnaryFunctionExpression___getsta;
+static PyObject *__pyx_n_s_UnaryFunctionExpression___init;
+static PyObject *__pyx_n_s_UnaryFunctionExpression__apply_o;
+static PyObject *__pyx_n_s_UnaryFunctionExpression__compute;
+static PyObject *__pyx_n_s_UnaryFunctionExpression__to_stri;
+static PyObject *__pyx_n_s_UnaryFunctionExpression_construc;
+static PyObject *__pyx_n_s_UnaryFunctionExpression_getname;
+static PyObject *__pyx_n_s_UnaryFunctionExpression_nargs;
+static PyObject *__pyx_n_s_Undefined;
+static PyObject *__pyx_kp_s_Unexpected_nonlinear_term;
+static PyObject *__pyx_kp_s_Unknown_expression_type_s;
+static PyObject *__pyx_kp_s_Unknown_relational_expression_ty;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_n_s_ValueVisitor;
+static PyObject *__pyx_n_s_Var;
+static PyObject *__pyx_n_s_VariableVisitor;
+static PyObject *__pyx_n_s_VariableVisitor___init;
+static PyObject *__pyx_n_s_VariableVisitor_visit;
+static PyObject *__pyx_n_s_ViewSumExpression;
+static PyObject *__pyx_n_s_ViewSumExpression___getstate;
+static PyObject *__pyx_n_s_ViewSumExpression___init;
+static PyObject *__pyx_n_s_ViewSumExpression__apply_operati;
+static PyObject *__pyx_n_s_ViewSumExpression__precedence;
+static PyObject *__pyx_n_s_ViewSumExpression__to_string;
+static PyObject *__pyx_n_s_ViewSumExpression_add;
+static PyObject *__pyx_n_s_ViewSumExpression_construct_node;
+static PyObject *__pyx_n_s_ViewSumExpression_is_constant;
+static PyObject *__pyx_n_s_ViewSumExpression_is_potentially;
+static PyObject *__pyx_n_s_ViewSumExpression_nargs;
+static PyObject *__pyx_n_s_ZeroDivisionError;
+static PyObject *__pyx_kp_s__16;
+static PyObject *__pyx_kp_s__17;
+static PyObject *__pyx_kp_s__18;
+static PyObject *__pyx_kp_s__19;
+static PyObject *__pyx_kp_s__20;
+static PyObject *__pyx_kp_s__21;
+static PyObject *__pyx_kp_s__26;
+static PyObject *__pyx_kp_s__27;
+static PyObject *__pyx_kp_s__28;
+static PyObject *__pyx_kp_s__29;
+static PyObject *__pyx_kp_s__30;
+static PyObject *__pyx_n_s_a;
+static PyObject *__pyx_n_s_abs;
+static PyObject *__pyx_n_s_abs_2;
+static PyObject *__pyx_n_s_add;
+static PyObject *__pyx_n_s_add_2;
+static PyObject *__pyx_n_s_all;
+static PyObject *__pyx_n_s_all_2;
+static PyObject *__pyx_n_s_ans;
+static PyObject *__pyx_n_s_any;
+static PyObject *__pyx_n_s_append;
+static PyObject *__pyx_n_s_apply_operation;
+static PyObject *__pyx_n_s_arg;
+static PyObject *__pyx_n_s_argList;
+static PyObject *__pyx_n_s_args;
+static PyObject *__pyx_n_s_args_2;
+static PyObject *__pyx_n_s_as_numeric;
+static PyObject *__pyx_n_s_b;
+static PyObject *__pyx_n_s_b_2;
+static PyObject *__pyx_n_s_base;
+static PyObject *__pyx_n_s_base_2;
+static PyObject *__pyx_n_s_block_scope;
+static PyObject *__pyx_n_s_body;
+static PyObject *__pyx_n_s_bool;
+static PyObject *__pyx_n_s_builtins;
+static PyObject *__pyx_n_s_c;
+static PyObject *__pyx_n_s_c_2;
+static PyObject *__pyx_n_s_call;
+static PyObject *__pyx_n_s_call_info;
+static PyObject *__pyx_n_s_chainedInequality;
+static PyObject *__pyx_n_s_chainedInequality_error_message;
+static PyObject *__pyx_n_s_class;
+static PyObject *__pyx_n_s_cline_in_traceback;
+static PyObject *__pyx_n_s_clone;
+static PyObject *__pyx_n_s_clone_counter;
+static PyObject *__pyx_n_s_clone_counter_context;
+static PyObject *__pyx_n_s_clone_counter_context___enter;
+static PyObject *__pyx_n_s_clone_counter_context___exit;
+static PyObject *__pyx_n_s_clone_counter_context_count;
+static PyObject *__pyx_n_s_clone_expression;
+static PyObject *__pyx_n_s_clone_leaves;
+static PyObject *__pyx_n_s_cloned_from;
+static PyObject *__pyx_n_s_close;
+static PyObject *__pyx_n_s_collections;
+static PyObject *__pyx_n_s_combine_expr;
+static PyObject *__pyx_n_s_common;
+static PyObject *__pyx_n_s_component;
+static PyObject *__pyx_n_s_component_types;
+static PyObject *__pyx_n_s_compress_expression;
+static PyObject *__pyx_n_s_compute_polynomial_degree;
+static PyObject *__pyx_n_s_compute_values;
+static PyObject *__pyx_n_s_const;
+static PyObject *__pyx_n_s_constant;
+static PyObject *__pyx_n_s_construct_node;
+static PyObject *__pyx_n_s_constructed;
+static PyObject *__pyx_n_s_copy;
+static PyObject *__pyx_n_s_count;
+static PyObject *__pyx_n_s_count_2;
+static PyObject *__pyx_n_s_counter;
+static PyObject *__pyx_n_s_current;
+static PyObject *__pyx_n_s_decompose_linear_terms;
+static PyObject *__pyx_n_s_decompose_term;
+static PyObject *__pyx_n_s_deepcopy;
+static PyObject *__pyx_n_s_deepcopy_2;
+static PyObject *__pyx_n_s_default_labeler;
+static PyObject *__pyx_n_s_deprecation_warning;
+static PyObject *__pyx_n_s_deque;
+static PyObject *__pyx_n_s_dfs_postorder_stack;
+static PyObject *__pyx_n_s_div;
+static PyObject *__pyx_n_s_divisor;
+static PyObject *__pyx_n_s_doc;
+static PyObject *__pyx_n_s_dq;
+static PyObject *__pyx_n_s_e;
+static PyObject *__pyx_n_s_else;
+static PyObject *__pyx_n_s_enter;
+static PyObject *__pyx_n_s_enumerate;
+static PyObject *__pyx_n_s_eq;
+static PyObject *__pyx_n_s_error_message;
+static PyObject *__pyx_n_s_etype;
+static PyObject *__pyx_n_s_evaluate;
+static PyObject *__pyx_n_s_evaluate_expression;
+static PyObject *__pyx_n_s_exception;
+static PyObject *__pyx_n_s_exit;
+static PyObject *__pyx_n_s_exp;
+static PyObject *__pyx_n_s_expr;
+static PyObject *__pyx_n_s_expr_common;
+static PyObject *__pyx_n_s_expression_is_fixed;
+static PyObject *__pyx_n_s_expression_to_string;
+static PyObject *__pyx_n_s_extend;
+static PyObject *__pyx_n_s_extract_stack;
+static PyObject *__pyx_n_s_fabs;
+static PyObject *__pyx_n_s_fcn;
+static PyObject *__pyx_n_s_fcn_2;
+static PyObject *__pyx_n_s_finalize;
+static PyObject *__pyx_n_s_fixed;
+static PyObject *__pyx_n_s_flag;
+static PyObject *__pyx_n_s_format;
+static PyObject *__pyx_n_s_generate_intrinsic_function_exp;
+static PyObject *__pyx_n_s_generate_mul_expression;
+static PyObject *__pyx_n_s_generate_other_expression;
+static PyObject *__pyx_n_s_generate_relational_expression;
+static PyObject *__pyx_n_s_generate_standard_repn;
+static PyObject *__pyx_n_s_generate_sum_expression;
+static PyObject *__pyx_n_s_genexpr;
+static PyObject *__pyx_n_s_getLogger;
+static PyObject *__pyx_n_s_getSymbol;
+static PyObject *__pyx_n_s_getitem;
+static PyObject *__pyx_n_s_getname;
+static PyObject *__pyx_n_s_getstate;
+static PyObject *__pyx_n_s_i;
+static PyObject *__pyx_n_s_iadd;
+static PyObject *__pyx_n_s_id;
+static PyObject *__pyx_n_s_identify_components;
+static PyObject *__pyx_n_s_identify_mutable_parameters;
+static PyObject *__pyx_n_s_identify_variables;
+static PyObject *__pyx_n_s_idiv;
+static PyObject *__pyx_n_s_idx;
+static PyObject *__pyx_n_s_if;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_n_s_imul;
+static PyObject *__pyx_n_s_include_fixed;
+static PyObject *__pyx_n_s_inequality;
+static PyObject *__pyx_n_s_info;
+static PyObject *__pyx_n_s_init;
+static PyObject *__pyx_n_s_initialize_expression_data;
+static PyObject *__pyx_n_s_inplace;
+static PyObject *__pyx_n_s_ipow;
+static PyObject *__pyx_n_s_is_constant;
+static PyObject *__pyx_n_s_is_expression_type;
+static PyObject *__pyx_n_s_is_fixed;
+static PyObject *__pyx_n_s_is_fixed_2;
+static PyObject *__pyx_n_s_is_indexed;
+static PyObject *__pyx_n_s_is_named_expression_type;
+static PyObject *__pyx_n_s_is_potentially_variable;
+static PyObject *__pyx_n_s_is_relational;
+static PyObject *__pyx_n_s_is_variable_type;
+static PyObject *__pyx_n_s_isclose;
+static PyObject *__pyx_n_s_islice;
+static PyObject *__pyx_n_s_isub;
+static PyObject *__pyx_n_s_itertools;
+static PyObject *__pyx_n_s_itervalues;
+static PyObject *__pyx_n_s_j;
+static PyObject *__pyx_n_s_join;
+static PyObject *__pyx_n_s_kwds;
+static PyObject *__pyx_n_s_l;
+static PyObject *__pyx_n_s_l_2;
+static PyObject *__pyx_n_s_l_3;
+static PyObject *__pyx_n_s_labeler;
+static PyObject *__pyx_n_s_le;
+static PyObject *__pyx_n_s_len;
+static PyObject *__pyx_n_s_lhs;
+static PyObject *__pyx_n_s_lhs_is_relational;
+static PyObject *__pyx_n_s_limit;
+static PyObject *__pyx_n_s_linear_coefs;
+static PyObject *__pyx_n_s_linear_expression;
+static PyObject *__pyx_n_s_linear_vars;
+static PyObject *__pyx_n_s_logger;
+static PyObject *__pyx_n_s_logging;
+static PyObject *__pyx_n_s_lower;
+static PyObject *__pyx_n_s_lt;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_match;
+static PyObject *__pyx_n_s_math;
+static PyObject *__pyx_n_s_memo;
+static PyObject *__pyx_n_s_message;
+static PyObject *__pyx_n_s_metaclass;
+static PyObject *__pyx_n_s_module;
+static PyObject *__pyx_n_s_msg;
+static PyObject *__pyx_n_s_mul;
+static PyObject *__pyx_n_s_multiplier;
+static PyObject *__pyx_n_s_mutable;
+static PyObject *__pyx_n_s_mutable_linear_context;
+static PyObject *__pyx_n_s_mutable_linear_context___enter;
+static PyObject *__pyx_n_s_mutable_linear_context___exit;
+static PyObject *__pyx_n_s_mutable_sum_context;
+static PyObject *__pyx_n_s_mutable_sum_context___enter;
+static PyObject *__pyx_n_s_mutable_sum_context___exit;
+static PyObject *__pyx_n_s_name;
+static PyObject *__pyx_n_s_name_2;
+static PyObject *__pyx_n_s_nargs;
+static PyObject *__pyx_n_s_nargs_2;
+static PyObject *__pyx_n_s_native_numeric_types;
+static PyObject *__pyx_n_s_native_types;
+static PyObject *__pyx_n_s_neg;
+static PyObject *__pyx_n_s_neg_2;
+static PyObject *__pyx_n_s_new_arg;
+static PyObject *__pyx_n_s_next;
+static PyObject *__pyx_n_s_node;
+static PyObject *__pyx_n_s_nonlinear_expression;
+static PyObject *__pyx_n_s_nonpyomo_leaf_types;
+static PyObject *__pyx_n_s_nonzero;
+static PyObject *__pyx_n_s_obj;
+static PyObject *__pyx_n_s_obj_2;
+static PyObject *__pyx_n_s_object;
+static PyObject *__pyx_n_s_omult;
+static PyObject *__pyx_n_s_other;
+static PyObject *__pyx_n_s_polynomial_degree;
+static PyObject *__pyx_n_s_polynomial_degree_2;
+static PyObject *__pyx_n_s_pop;
+static PyObject *__pyx_n_s_popleft;
+static PyObject *__pyx_n_s_pow;
+static PyObject *__pyx_n_s_pow_2;
+static PyObject *__pyx_n_s_precedence;
+static PyObject *__pyx_n_s_prepare;
+static PyObject *__pyx_n_s_prev;
+static PyObject *__pyx_n_s_prevExpr;
+static PyObject *__pyx_n_s_process_arg;
+static PyObject *__pyx_n_s_prod;
+static PyObject *__pyx_kp_s_prod_s_s;
+static PyObject *__pyx_n_s_property;
+static PyObject *__pyx_n_s_public;
+static PyObject *__pyx_kp_s_pyomo_core;
+static PyObject *__pyx_n_s_pyomo_core_base;
+static PyObject *__pyx_n_s_pyomo_core_base_param;
+static PyObject *__pyx_n_s_pyomo_core_base_template_expr;
+static PyObject *__pyx_n_s_pyomo_core_expr;
+static PyObject *__pyx_n_s_pyomo_core_expr_expr_common;
+static PyObject *__pyx_n_s_pyomo_core_expr_expr_pyomo5;
+static PyObject *__pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx;
+static PyObject *__pyx_n_s_pyomo_core_expr_numvalue;
+static PyObject *__pyx_n_s_pyomo_core_expr_symbol_map;
+static PyObject *__pyx_n_s_pyomo_core_kernel_component_vari;
+static PyObject *__pyx_n_s_pyomo_repn;
+static PyObject *__pyx_n_s_pyomo_util_deprecation;
+static PyObject *__pyx_n_s_pyutilib_math_util;
+static PyObject *__pyx_n_s_pyutilib_misc_visitor;
+static PyObject *__pyx_n_s_quadratic;
+static PyObject *__pyx_n_s_qualname;
+static PyObject *__pyx_n_s_r;
+static PyObject *__pyx_n_s_r_2;
+static PyObject *__pyx_n_s_r_3;
+static PyObject *__pyx_n_s_radd;
+static PyObject *__pyx_n_s_range;
+static PyObject *__pyx_n_s_rdiv;
+static PyObject *__pyx_n_s_recip;
+static PyObject *__pyx_n_s_ref;
+static PyObject *__pyx_n_s_repn;
+static PyObject *__pyx_n_s_repn0;
+static PyObject *__pyx_n_s_repn1;
+static PyObject *__pyx_n_s_repn2;
+static PyObject *__pyx_n_s_resolve_template;
+static PyObject *__pyx_n_s_result;
+static PyObject *__pyx_n_s_result_2;
+static PyObject *__pyx_n_s_rhs;
+static PyObject *__pyx_n_s_rhs_is_relational;
+static PyObject *__pyx_n_s_rmul;
+static PyObject *__pyx_n_s_rpow;
+static PyObject *__pyx_n_s_rsub;
+static PyObject *__pyx_kp_s_s;
+static PyObject *__pyx_kp_s_s_2;
+static PyObject *__pyx_kp_s_s_3;
+static PyObject *__pyx_n_s_s_4;
+static PyObject *__pyx_kp_s_s_The_inequality_expression_s_c;
+static PyObject *__pyx_kp_s_s_s;
+static PyObject *__pyx_kp_s_s_s_2;
+static PyObject *__pyx_kp_s_s_s_3;
+static PyObject *__pyx_n_s_seen;
+static PyObject *__pyx_n_s_self;
+static PyObject *__pyx_n_s_self_2;
+static PyObject *__pyx_n_s_send;
+static PyObject *__pyx_n_s_shared_args;
+static PyObject *__pyx_n_s_six;
+static PyObject *__pyx_n_s_six_moves;
+static PyObject *__pyx_n_s_size;
+static PyObject *__pyx_n_s_sizeof_expression;
+static PyObject *__pyx_n_s_slots;
+static PyObject *__pyx_n_s_smap;
+static PyObject *__pyx_n_s_stack;
+static PyObject *__pyx_n_s_standardize;
+static PyObject *__pyx_n_s_state;
+static PyObject *__pyx_n_s_staticmethod;
+static PyObject *__pyx_n_s_str;
+static PyObject *__pyx_n_s_strict;
+static PyObject *__pyx_n_s_strict_2;
+static PyObject *__pyx_n_s_string_types;
+static PyObject *__pyx_n_s_strip;
+static PyObject *__pyx_n_s_sub;
+static PyObject *__pyx_n_s_substitute;
+static PyObject *__pyx_n_s_sum;
+static PyObject *__pyx_n_s_super;
+static PyObject *__pyx_n_s_sys;
+static PyObject *__pyx_n_s_t;
+static PyObject *__pyx_n_s_term;
+static PyObject *__pyx_n_s_terms;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_then;
+static PyObject *__pyx_n_s_throw;
+static PyObject *__pyx_n_s_tmp;
+static PyObject *__pyx_n_s_to_expression;
+static PyObject *__pyx_n_s_to_string;
+static PyObject *__pyx_n_s_to_string_2;
+static PyObject *__pyx_n_s_traceback;
+static PyObject *__pyx_n_s_types;
+static PyObject *__pyx_n_s_unary;
+static PyObject *__pyx_n_s_upper;
+static PyObject *__pyx_n_s_using_chained_inequality;
+static PyObject *__pyx_n_s_v;
+static PyObject *__pyx_n_s_v_2;
+static PyObject *__pyx_n_s_val;
+static PyObject *__pyx_n_s_value;
+static PyObject *__pyx_n_s_values;
+static PyObject *__pyx_n_s_verbose;
+static PyObject *__pyx_n_s_visit;
+static PyObject *__pyx_n_s_visiting_potential_leaf;
+static PyObject *__pyx_n_s_visitor;
+static PyObject *__pyx_n_s_weakref;
+static PyObject *__pyx_n_s_x;
+static PyObject *__pyx_n_s_xbfs;
+static PyObject *__pyx_n_s_xbfs_yield_leaves;
+static PyObject *__pyx_n_s_xrange;
+static PyObject *__pyx_n_s_zip;
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_chainedInequality_error_message(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_msg); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_initialize_expression_data(CYTHON_UNUSED PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_2compress_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context___enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_2__exit__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_4count(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context___enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context_2__exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context___enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_2__exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_visit(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_2finalize(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_4xbfs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_6xbfs_yield_leaves(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_visit(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node, CYTHON_UNUSED PyObject *__pyx_v_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_2visiting_potential_leaf(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_4finalize(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_ans); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_6dfs_postorder_stack(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_2visit(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_node, CYTHON_UNUSED PyObject *__pyx_v_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_4visiting_potential_leaf(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_6finalize(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_ans); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_8construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_10dfs_postorder_stack(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_clone_leaves, PyObject *__pyx_v_memo); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_2visit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_4visiting_potential_leaf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_4clone_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_memo, PyObject *__pyx_v_clone_leaves); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_2visit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_4finalize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_6_sizeof_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_visit(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_2visiting_potential_leaf(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_8evaluate_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_exception); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_types); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor_2visit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_10identify_components(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_component_types); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor_2visit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13identify_variables(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_include_fixed); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor_2visit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16identify_mutable_parameters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_visit(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_2visiting_potential_leaf(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_19_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_visit(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_2visiting_potential_leaf(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21_expression_is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_verbose, PyObject *__pyx_v_smap, PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_2visit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_4visiting_potential_leaf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23expression_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_verbose, PyObject *__pyx_v_labeler, PyObject *__pyx_v_smap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_standardize); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_2nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_4arg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_i); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_6args(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_8__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_10__nonzero__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_12__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_exception); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_14__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_16to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_verbose, PyObject *__pyx_v_labeler, PyObject *__pyx_v_smap, PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_18_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_20_to_string(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_22getname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_24clone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_substitute); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_26__deepcopy__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_28construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_30is_constant(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_32is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_34_is_fixed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_36is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_38is_named_expression_type(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_40is_expression_type(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_42size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_44polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_46_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_48_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_2getname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_4_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_6_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_8_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_10_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22NPV_NegationExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_fcn); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_2nargs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_4construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_6__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_8getname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwds); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_10_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_12_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_14_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_30NPV_ExternalFunctionExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression__compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_2_is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_4_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_6_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_8getname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_10_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17NPV_PowExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression__precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_2_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_4getname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_6_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_8_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21NPV_ProductExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_2_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_4_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_6getname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_8_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_10_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_24NPV_ReciprocalExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_25_LinearOperatorExpression__compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_strict); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_2nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_4construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_6__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_8__nonzero__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_10is_relational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_12_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_14_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_16_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_18is_constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_20is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_strict); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_2nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_4construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_6__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_8__nonzero__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_10is_relational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_12_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_14_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_16_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_18is_constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_20is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_25inequality(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lower, PyObject *__pyx_v_body, PyObject *__pyx_v_upper, PyObject *__pyx_v_strict); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_2__nonzero__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_4is_relational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_6_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_8_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_10_to_string(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_12is_constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_14is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression__precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_2_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_4_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_6getname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17NPV_SumExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_2add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_arg); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_4nargs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_6_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_8_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_10construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_12__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_14is_constant(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_16is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_18_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_25_MutableViewSumExpression_add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_arg); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression__precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_2__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_base); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_4nargs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_6construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_8__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_10getname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwds); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_23is_potentially_variable_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_12is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_14is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_16_is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_26_compute_polynomial_degree_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_18_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_20_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_22_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_16resolve_template_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_24resolve_template(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_IF_, PyObject *__pyx_v_THEN_, PyObject *__pyx_v_ELSE_); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_2nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_4__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_6getname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_8_is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_10is_constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_12is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_14_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_16_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_18_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_name, PyObject *__pyx_v_fcn); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_2nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_4construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_6__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_8getname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_10_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_12_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_14_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_27NPV_UnaryFunctionExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arg); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression_2construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17NPV_AbsExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_2nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_4_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_6__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_8__deepcopy__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_memo); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_10construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, PyObject *__pyx_v_memo); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_12getname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_14_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_16is_constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_18is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_20_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_smap, PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_22is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_16_apply_operation_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_24_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_26_combine_expr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_etype, PyObject *__pyx_v__other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_27decompose_term(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_24LinearDecompositionError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_29_decompose_linear_terms(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_multiplier); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_32_process_arg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_34_generate_sum_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_etype, PyObject *__pyx_v__self, PyObject *__pyx_v__other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_36_generate_mul_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_etype, PyObject *__pyx_v__self, PyObject *__pyx_v__other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_38_generate_other_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_etype, PyObject *__pyx_v__self, PyObject *__pyx_v__other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_40_generate_relational_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_etype, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_42_generate_relational_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_etype, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_44_generate_intrinsic_function_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arg, PyObject *__pyx_v_name, PyObject *__pyx_v_fcn); /* proto */
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static __Pyx_CachedCFunction __pyx_umethod_PyList_Type_pop = {0, &__pyx_n_s_pop, 0, 0, 0};
+static PyObject *__pyx_float_0_0;
+static PyObject *__pyx_float_3_5;
+static PyObject *__pyx_int_0;
+static PyObject *__pyx_int_1;
+static PyObject *__pyx_int_2;
+static PyObject *__pyx_int_3;
+static PyObject *__pyx_int_4;
+static PyObject *__pyx_int_6;
+static PyObject *__pyx_int_9;
+static PyObject *__pyx_int_neg_1;
+static PyObject *__pyx_slice__5;
+static PyObject *__pyx_slice__6;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__3;
+static PyObject *__pyx_tuple__4;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_tuple__10;
+static PyObject *__pyx_tuple__11;
+static PyObject *__pyx_tuple__12;
+static PyObject *__pyx_tuple__13;
+static PyObject *__pyx_tuple__14;
+static PyObject *__pyx_tuple__15;
+static PyObject *__pyx_tuple__22;
+static PyObject *__pyx_tuple__23;
+static PyObject *__pyx_tuple__24;
+static PyObject *__pyx_tuple__25;
+static PyObject *__pyx_tuple__31;
+static PyObject *__pyx_tuple__32;
+static PyObject *__pyx_tuple__33;
+static PyObject *__pyx_tuple__34;
+static PyObject *__pyx_tuple__35;
+static PyObject *__pyx_tuple__36;
+static PyObject *__pyx_tuple__37;
+static PyObject *__pyx_tuple__38;
+static PyObject *__pyx_tuple__39;
+static PyObject *__pyx_tuple__40;
+static PyObject *__pyx_tuple__41;
+static PyObject *__pyx_tuple__42;
+static PyObject *__pyx_tuple__43;
+static PyObject *__pyx_tuple__44;
+static PyObject *__pyx_tuple__46;
+static PyObject *__pyx_tuple__48;
+static PyObject *__pyx_tuple__50;
+static PyObject *__pyx_tuple__51;
+static PyObject *__pyx_tuple__53;
+static PyObject *__pyx_tuple__55;
+static PyObject *__pyx_tuple__57;
+static PyObject *__pyx_tuple__58;
+static PyObject *__pyx_tuple__60;
+static PyObject *__pyx_tuple__62;
+static PyObject *__pyx_tuple__63;
+static PyObject *__pyx_tuple__65;
+static PyObject *__pyx_tuple__67;
+static PyObject *__pyx_tuple__68;
+static PyObject *__pyx_tuple__70;
+static PyObject *__pyx_tuple__72;
+static PyObject *__pyx_tuple__74;
+static PyObject *__pyx_tuple__76;
+static PyObject *__pyx_tuple__77;
+static PyObject *__pyx_tuple__79;
+static PyObject *__pyx_tuple__81;
+static PyObject *__pyx_tuple__83;
+static PyObject *__pyx_tuple__85;
+static PyObject *__pyx_tuple__86;
+static PyObject *__pyx_tuple__88;
+static PyObject *__pyx_tuple__89;
+static PyObject *__pyx_tuple__91;
+static PyObject *__pyx_tuple__93;
+static PyObject *__pyx_tuple__95;
+static PyObject *__pyx_tuple__97;
+static PyObject *__pyx_tuple__99;
+static PyObject *__pyx_tuple__101;
+static PyObject *__pyx_tuple__102;
+static PyObject *__pyx_tuple__104;
+static PyObject *__pyx_tuple__106;
+static PyObject *__pyx_tuple__108;
+static PyObject *__pyx_tuple__110;
+static PyObject *__pyx_tuple__112;
+static PyObject *__pyx_tuple__114;
+static PyObject *__pyx_tuple__116;
+static PyObject *__pyx_tuple__118;
+static PyObject *__pyx_tuple__120;
+static PyObject *__pyx_tuple__122;
+static PyObject *__pyx_tuple__124;
+static PyObject *__pyx_tuple__126;
+static PyObject *__pyx_tuple__128;
+static PyObject *__pyx_tuple__130;
+static PyObject *__pyx_tuple__132;
+static PyObject *__pyx_tuple__134;
+static PyObject *__pyx_tuple__136;
+static PyObject *__pyx_tuple__138;
+static PyObject *__pyx_tuple__140;
+static PyObject *__pyx_tuple__142;
+static PyObject *__pyx_tuple__144;
+static PyObject *__pyx_tuple__146;
+static PyObject *__pyx_tuple__148;
+static PyObject *__pyx_tuple__150;
+static PyObject *__pyx_tuple__152;
+static PyObject *__pyx_tuple__154;
+static PyObject *__pyx_tuple__156;
+static PyObject *__pyx_tuple__158;
+static PyObject *__pyx_tuple__160;
+static PyObject *__pyx_tuple__161;
+static PyObject *__pyx_tuple__163;
+static PyObject *__pyx_tuple__165;
+static PyObject *__pyx_tuple__167;
+static PyObject *__pyx_tuple__169;
+static PyObject *__pyx_tuple__171;
+static PyObject *__pyx_tuple__173;
+static PyObject *__pyx_tuple__175;
+static PyObject *__pyx_tuple__176;
+static PyObject *__pyx_tuple__178;
+static PyObject *__pyx_tuple__180;
+static PyObject *__pyx_tuple__181;
+static PyObject *__pyx_tuple__183;
+static PyObject *__pyx_tuple__185;
+static PyObject *__pyx_tuple__187;
+static PyObject *__pyx_tuple__189;
+static PyObject *__pyx_tuple__190;
+static PyObject *__pyx_tuple__192;
+static PyObject *__pyx_tuple__194;
+static PyObject *__pyx_tuple__196;
+static PyObject *__pyx_tuple__198;
+static PyObject *__pyx_tuple__200;
+static PyObject *__pyx_tuple__202;
+static PyObject *__pyx_tuple__204;
+static PyObject *__pyx_tuple__206;
+static PyObject *__pyx_tuple__208;
+static PyObject *__pyx_tuple__210;
+static PyObject *__pyx_tuple__212;
+static PyObject *__pyx_tuple__214;
+static PyObject *__pyx_tuple__216;
+static PyObject *__pyx_tuple__218;
+static PyObject *__pyx_tuple__220;
+static PyObject *__pyx_tuple__222;
+static PyObject *__pyx_tuple__224;
+static PyObject *__pyx_tuple__226;
+static PyObject *__pyx_tuple__228;
+static PyObject *__pyx_tuple__229;
+static PyObject *__pyx_tuple__231;
+static PyObject *__pyx_tuple__232;
+static PyObject *__pyx_tuple__234;
+static PyObject *__pyx_tuple__236;
+static PyObject *__pyx_tuple__238;
+static PyObject *__pyx_tuple__240;
+static PyObject *__pyx_tuple__242;
+static PyObject *__pyx_tuple__244;
+static PyObject *__pyx_tuple__246;
+static PyObject *__pyx_tuple__248;
+static PyObject *__pyx_tuple__250;
+static PyObject *__pyx_tuple__252;
+static PyObject *__pyx_tuple__254;
+static PyObject *__pyx_tuple__256;
+static PyObject *__pyx_tuple__258;
+static PyObject *__pyx_tuple__260;
+static PyObject *__pyx_tuple__262;
+static PyObject *__pyx_tuple__264;
+static PyObject *__pyx_tuple__266;
+static PyObject *__pyx_tuple__268;
+static PyObject *__pyx_tuple__270;
+static PyObject *__pyx_tuple__272;
+static PyObject *__pyx_tuple__274;
+static PyObject *__pyx_tuple__276;
+static PyObject *__pyx_tuple__278;
+static PyObject *__pyx_tuple__280;
+static PyObject *__pyx_tuple__282;
+static PyObject *__pyx_tuple__284;
+static PyObject *__pyx_tuple__286;
+static PyObject *__pyx_tuple__288;
+static PyObject *__pyx_tuple__290;
+static PyObject *__pyx_tuple__291;
+static PyObject *__pyx_tuple__293;
+static PyObject *__pyx_tuple__295;
+static PyObject *__pyx_tuple__297;
+static PyObject *__pyx_tuple__299;
+static PyObject *__pyx_tuple__301;
+static PyObject *__pyx_tuple__303;
+static PyObject *__pyx_tuple__305;
+static PyObject *__pyx_tuple__307;
+static PyObject *__pyx_tuple__309;
+static PyObject *__pyx_tuple__311;
+static PyObject *__pyx_tuple__313;
+static PyObject *__pyx_tuple__314;
+static PyObject *__pyx_tuple__316;
+static PyObject *__pyx_tuple__318;
+static PyObject *__pyx_tuple__320;
+static PyObject *__pyx_tuple__322;
+static PyObject *__pyx_tuple__324;
+static PyObject *__pyx_tuple__326;
+static PyObject *__pyx_tuple__328;
+static PyObject *__pyx_tuple__330;
+static PyObject *__pyx_tuple__332;
+static PyObject *__pyx_tuple__334;
+static PyObject *__pyx_tuple__336;
+static PyObject *__pyx_tuple__338;
+static PyObject *__pyx_tuple__340;
+static PyObject *__pyx_tuple__342;
+static PyObject *__pyx_tuple__344;
+static PyObject *__pyx_tuple__346;
+static PyObject *__pyx_tuple__348;
+static PyObject *__pyx_tuple__350;
+static PyObject *__pyx_tuple__352;
+static PyObject *__pyx_tuple__354;
+static PyObject *__pyx_tuple__356;
+static PyObject *__pyx_tuple__358;
+static PyObject *__pyx_tuple__360;
+static PyObject *__pyx_tuple__362;
+static PyObject *__pyx_tuple__364;
+static PyObject *__pyx_tuple__365;
+static PyObject *__pyx_tuple__367;
+static PyObject *__pyx_tuple__369;
+static PyObject *__pyx_tuple__371;
+static PyObject *__pyx_tuple__373;
+static PyObject *__pyx_tuple__375;
+static PyObject *__pyx_tuple__377;
+static PyObject *__pyx_tuple__379;
+static PyObject *__pyx_tuple__381;
+static PyObject *__pyx_tuple__383;
+static PyObject *__pyx_tuple__385;
+static PyObject *__pyx_tuple__387;
+static PyObject *__pyx_tuple__388;
+static PyObject *__pyx_tuple__390;
+static PyObject *__pyx_tuple__392;
+static PyObject *__pyx_tuple__393;
+static PyObject *__pyx_tuple__395;
+static PyObject *__pyx_tuple__397;
+static PyObject *__pyx_tuple__399;
+static PyObject *__pyx_tuple__401;
+static PyObject *__pyx_tuple__403;
+static PyObject *__pyx_tuple__405;
+static PyObject *__pyx_tuple__407;
+static PyObject *__pyx_tuple__409;
+static PyObject *__pyx_tuple__411;
+static PyObject *__pyx_tuple__413;
+static PyObject *__pyx_tuple__415;
+static PyObject *__pyx_tuple__416;
+static PyObject *__pyx_tuple__418;
+static PyObject *__pyx_tuple__419;
+static PyObject *__pyx_tuple__421;
+static PyObject *__pyx_tuple__423;
+static PyObject *__pyx_tuple__425;
+static PyObject *__pyx_tuple__427;
+static PyObject *__pyx_tuple__429;
+static PyObject *__pyx_tuple__431;
+static PyObject *__pyx_tuple__433;
+static PyObject *__pyx_tuple__435;
+static PyObject *__pyx_tuple__437;
+static PyObject *__pyx_tuple__438;
+static PyObject *__pyx_tuple__440;
+static PyObject *__pyx_tuple__441;
+static PyObject *__pyx_tuple__443;
+static PyObject *__pyx_tuple__445;
+static PyObject *__pyx_tuple__447;
+static PyObject *__pyx_tuple__449;
+static PyObject *__pyx_tuple__451;
+static PyObject *__pyx_tuple__453;
+static PyObject *__pyx_tuple__455;
+static PyObject *__pyx_tuple__457;
+static PyObject *__pyx_tuple__459;
+static PyObject *__pyx_tuple__461;
+static PyObject *__pyx_tuple__463;
+static PyObject *__pyx_tuple__464;
+static PyObject *__pyx_tuple__466;
+static PyObject *__pyx_tuple__467;
+static PyObject *__pyx_tuple__469;
+static PyObject *__pyx_tuple__471;
+static PyObject *__pyx_tuple__473;
+static PyObject *__pyx_tuple__475;
+static PyObject *__pyx_tuple__477;
+static PyObject *__pyx_tuple__479;
+static PyObject *__pyx_tuple__481;
+static PyObject *__pyx_tuple__483;
+static PyObject *__pyx_tuple__485;
+static PyObject *__pyx_tuple__487;
+static PyObject *__pyx_tuple__489;
+static PyObject *__pyx_tuple__491;
+static PyObject *__pyx_tuple__493;
+static PyObject *__pyx_tuple__495;
+static PyObject *__pyx_tuple__497;
+static PyObject *__pyx_tuple__499;
+static PyObject *__pyx_tuple__501;
+static PyObject *__pyx_tuple__503;
+static PyObject *__pyx_tuple__505;
+static PyObject *__pyx_tuple__507;
+static PyObject *__pyx_tuple__509;
+static PyObject *__pyx_tuple__511;
+static PyObject *__pyx_codeobj__45;
+static PyObject *__pyx_codeobj__47;
+static PyObject *__pyx_codeobj__49;
+static PyObject *__pyx_codeobj__52;
+static PyObject *__pyx_codeobj__54;
+static PyObject *__pyx_codeobj__56;
+static PyObject *__pyx_codeobj__59;
+static PyObject *__pyx_codeobj__61;
+static PyObject *__pyx_codeobj__64;
+static PyObject *__pyx_codeobj__66;
+static PyObject *__pyx_codeobj__69;
+static PyObject *__pyx_codeobj__71;
+static PyObject *__pyx_codeobj__73;
+static PyObject *__pyx_codeobj__75;
+static PyObject *__pyx_codeobj__78;
+static PyObject *__pyx_codeobj__80;
+static PyObject *__pyx_codeobj__82;
+static PyObject *__pyx_codeobj__84;
+static PyObject *__pyx_codeobj__87;
+static PyObject *__pyx_codeobj__90;
+static PyObject *__pyx_codeobj__92;
+static PyObject *__pyx_codeobj__94;
+static PyObject *__pyx_codeobj__96;
+static PyObject *__pyx_codeobj__98;
+static PyObject *__pyx_codeobj__100;
+static PyObject *__pyx_codeobj__103;
+static PyObject *__pyx_codeobj__105;
+static PyObject *__pyx_codeobj__107;
+static PyObject *__pyx_codeobj__109;
+static PyObject *__pyx_codeobj__111;
+static PyObject *__pyx_codeobj__113;
+static PyObject *__pyx_codeobj__115;
+static PyObject *__pyx_codeobj__117;
+static PyObject *__pyx_codeobj__119;
+static PyObject *__pyx_codeobj__121;
+static PyObject *__pyx_codeobj__123;
+static PyObject *__pyx_codeobj__125;
+static PyObject *__pyx_codeobj__127;
+static PyObject *__pyx_codeobj__129;
+static PyObject *__pyx_codeobj__131;
+static PyObject *__pyx_codeobj__133;
+static PyObject *__pyx_codeobj__135;
+static PyObject *__pyx_codeobj__137;
+static PyObject *__pyx_codeobj__139;
+static PyObject *__pyx_codeobj__141;
+static PyObject *__pyx_codeobj__143;
+static PyObject *__pyx_codeobj__145;
+static PyObject *__pyx_codeobj__147;
+static PyObject *__pyx_codeobj__149;
+static PyObject *__pyx_codeobj__151;
+static PyObject *__pyx_codeobj__153;
+static PyObject *__pyx_codeobj__155;
+static PyObject *__pyx_codeobj__157;
+static PyObject *__pyx_codeobj__159;
+static PyObject *__pyx_codeobj__162;
+static PyObject *__pyx_codeobj__164;
+static PyObject *__pyx_codeobj__166;
+static PyObject *__pyx_codeobj__168;
+static PyObject *__pyx_codeobj__170;
+static PyObject *__pyx_codeobj__172;
+static PyObject *__pyx_codeobj__174;
+static PyObject *__pyx_codeobj__177;
+static PyObject *__pyx_codeobj__179;
+static PyObject *__pyx_codeobj__182;
+static PyObject *__pyx_codeobj__184;
+static PyObject *__pyx_codeobj__186;
+static PyObject *__pyx_codeobj__188;
+static PyObject *__pyx_codeobj__191;
+static PyObject *__pyx_codeobj__193;
+static PyObject *__pyx_codeobj__195;
+static PyObject *__pyx_codeobj__197;
+static PyObject *__pyx_codeobj__199;
+static PyObject *__pyx_codeobj__201;
+static PyObject *__pyx_codeobj__203;
+static PyObject *__pyx_codeobj__205;
+static PyObject *__pyx_codeobj__207;
+static PyObject *__pyx_codeobj__209;
+static PyObject *__pyx_codeobj__211;
+static PyObject *__pyx_codeobj__213;
+static PyObject *__pyx_codeobj__215;
+static PyObject *__pyx_codeobj__217;
+static PyObject *__pyx_codeobj__219;
+static PyObject *__pyx_codeobj__221;
+static PyObject *__pyx_codeobj__223;
+static PyObject *__pyx_codeobj__225;
+static PyObject *__pyx_codeobj__227;
+static PyObject *__pyx_codeobj__230;
+static PyObject *__pyx_codeobj__233;
+static PyObject *__pyx_codeobj__235;
+static PyObject *__pyx_codeobj__237;
+static PyObject *__pyx_codeobj__239;
+static PyObject *__pyx_codeobj__241;
+static PyObject *__pyx_codeobj__243;
+static PyObject *__pyx_codeobj__245;
+static PyObject *__pyx_codeobj__247;
+static PyObject *__pyx_codeobj__249;
+static PyObject *__pyx_codeobj__251;
+static PyObject *__pyx_codeobj__253;
+static PyObject *__pyx_codeobj__255;
+static PyObject *__pyx_codeobj__257;
+static PyObject *__pyx_codeobj__259;
+static PyObject *__pyx_codeobj__261;
+static PyObject *__pyx_codeobj__263;
+static PyObject *__pyx_codeobj__265;
+static PyObject *__pyx_codeobj__267;
+static PyObject *__pyx_codeobj__269;
+static PyObject *__pyx_codeobj__271;
+static PyObject *__pyx_codeobj__273;
+static PyObject *__pyx_codeobj__275;
+static PyObject *__pyx_codeobj__277;
+static PyObject *__pyx_codeobj__279;
+static PyObject *__pyx_codeobj__281;
+static PyObject *__pyx_codeobj__283;
+static PyObject *__pyx_codeobj__285;
+static PyObject *__pyx_codeobj__287;
+static PyObject *__pyx_codeobj__289;
+static PyObject *__pyx_codeobj__292;
+static PyObject *__pyx_codeobj__294;
+static PyObject *__pyx_codeobj__296;
+static PyObject *__pyx_codeobj__298;
+static PyObject *__pyx_codeobj__300;
+static PyObject *__pyx_codeobj__302;
+static PyObject *__pyx_codeobj__304;
+static PyObject *__pyx_codeobj__306;
+static PyObject *__pyx_codeobj__308;
+static PyObject *__pyx_codeobj__310;
+static PyObject *__pyx_codeobj__312;
+static PyObject *__pyx_codeobj__315;
+static PyObject *__pyx_codeobj__317;
+static PyObject *__pyx_codeobj__319;
+static PyObject *__pyx_codeobj__321;
+static PyObject *__pyx_codeobj__323;
+static PyObject *__pyx_codeobj__325;
+static PyObject *__pyx_codeobj__327;
+static PyObject *__pyx_codeobj__329;
+static PyObject *__pyx_codeobj__331;
+static PyObject *__pyx_codeobj__333;
+static PyObject *__pyx_codeobj__335;
+static PyObject *__pyx_codeobj__337;
+static PyObject *__pyx_codeobj__339;
+static PyObject *__pyx_codeobj__341;
+static PyObject *__pyx_codeobj__343;
+static PyObject *__pyx_codeobj__345;
+static PyObject *__pyx_codeobj__347;
+static PyObject *__pyx_codeobj__349;
+static PyObject *__pyx_codeobj__351;
+static PyObject *__pyx_codeobj__353;
+static PyObject *__pyx_codeobj__355;
+static PyObject *__pyx_codeobj__357;
+static PyObject *__pyx_codeobj__359;
+static PyObject *__pyx_codeobj__361;
+static PyObject *__pyx_codeobj__363;
+static PyObject *__pyx_codeobj__366;
+static PyObject *__pyx_codeobj__368;
+static PyObject *__pyx_codeobj__370;
+static PyObject *__pyx_codeobj__372;
+static PyObject *__pyx_codeobj__374;
+static PyObject *__pyx_codeobj__376;
+static PyObject *__pyx_codeobj__378;
+static PyObject *__pyx_codeobj__380;
+static PyObject *__pyx_codeobj__382;
+static PyObject *__pyx_codeobj__384;
+static PyObject *__pyx_codeobj__386;
+static PyObject *__pyx_codeobj__389;
+static PyObject *__pyx_codeobj__391;
+static PyObject *__pyx_codeobj__394;
+static PyObject *__pyx_codeobj__396;
+static PyObject *__pyx_codeobj__398;
+static PyObject *__pyx_codeobj__400;
+static PyObject *__pyx_codeobj__402;
+static PyObject *__pyx_codeobj__404;
+static PyObject *__pyx_codeobj__406;
+static PyObject *__pyx_codeobj__408;
+static PyObject *__pyx_codeobj__410;
+static PyObject *__pyx_codeobj__412;
+static PyObject *__pyx_codeobj__414;
+static PyObject *__pyx_codeobj__417;
+static PyObject *__pyx_codeobj__420;
+static PyObject *__pyx_codeobj__422;
+static PyObject *__pyx_codeobj__424;
+static PyObject *__pyx_codeobj__426;
+static PyObject *__pyx_codeobj__428;
+static PyObject *__pyx_codeobj__430;
+static PyObject *__pyx_codeobj__432;
+static PyObject *__pyx_codeobj__434;
+static PyObject *__pyx_codeobj__436;
+static PyObject *__pyx_codeobj__439;
+static PyObject *__pyx_codeobj__442;
+static PyObject *__pyx_codeobj__444;
+static PyObject *__pyx_codeobj__446;
+static PyObject *__pyx_codeobj__448;
+static PyObject *__pyx_codeobj__450;
+static PyObject *__pyx_codeobj__452;
+static PyObject *__pyx_codeobj__454;
+static PyObject *__pyx_codeobj__456;
+static PyObject *__pyx_codeobj__458;
+static PyObject *__pyx_codeobj__460;
+static PyObject *__pyx_codeobj__462;
+static PyObject *__pyx_codeobj__465;
+static PyObject *__pyx_codeobj__468;
+static PyObject *__pyx_codeobj__470;
+static PyObject *__pyx_codeobj__472;
+static PyObject *__pyx_codeobj__474;
+static PyObject *__pyx_codeobj__476;
+static PyObject *__pyx_codeobj__478;
+static PyObject *__pyx_codeobj__480;
+static PyObject *__pyx_codeobj__482;
+static PyObject *__pyx_codeobj__484;
+static PyObject *__pyx_codeobj__486;
+static PyObject *__pyx_codeobj__488;
+static PyObject *__pyx_codeobj__490;
+static PyObject *__pyx_codeobj__492;
+static PyObject *__pyx_codeobj__494;
+static PyObject *__pyx_codeobj__496;
+static PyObject *__pyx_codeobj__498;
+static PyObject *__pyx_codeobj__500;
+static PyObject *__pyx_codeobj__502;
+static PyObject *__pyx_codeobj__504;
+static PyObject *__pyx_codeobj__506;
+static PyObject *__pyx_codeobj__508;
+static PyObject *__pyx_codeobj__510;
+static PyObject *__pyx_codeobj__512;
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":122
+ *
+ * @staticmethod
+ * def error_message(msg=None): # <<<<<<<<<<<<<<
+ * if msg is None:
+ * msg = "Relational expression used in an unexpected Boolean context."
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_chainedInequality_1error_message(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18_chainedInequality_1error_message = {"error_message", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_chainedInequality_1error_message, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_chainedInequality_1error_message(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_msg = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("error_message (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_msg,0};
+ PyObject* values[1] = {0};
+ values[0] = ((PyObject *)((PyObject *)Py_None));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_msg);
+ if (value) { values[0] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "error_message") < 0)) __PYX_ERR(0, 122, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_msg = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("error_message", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 122, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._chainedInequality.error_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_chainedInequality_error_message(__pyx_self, __pyx_v_msg);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_chainedInequality_error_message(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_msg) {
+ PyObject *__pyx_v_val = NULL;
+ PyObject *__pyx_v_info = NULL;
+ PyObject *__pyx_v_args = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ __Pyx_RefNannySetupContext("error_message", 0);
+ __Pyx_INCREF(__pyx_v_msg);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":123
+ * @staticmethod
+ * def error_message(msg=None):
+ * if msg is None: # <<<<<<<<<<<<<<
+ * msg = "Relational expression used in an unexpected Boolean context."
+ * val = _chainedInequality.prev.to_string()
+ */
+ __pyx_t_1 = (__pyx_v_msg == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":124
+ * def error_message(msg=None):
+ * if msg is None:
+ * msg = "Relational expression used in an unexpected Boolean context." # <<<<<<<<<<<<<<
+ * val = _chainedInequality.prev.to_string()
+ * # We are about to raise an exception, so it's OK to reset chainedInequality
+ */
+ __Pyx_INCREF(__pyx_kp_s_Relational_expression_used_in_an);
+ __Pyx_DECREF_SET(__pyx_v_msg, __pyx_kp_s_Relational_expression_used_in_an);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":123
+ * @staticmethod
+ * def error_message(msg=None):
+ * if msg is None: # <<<<<<<<<<<<<<
+ * msg = "Relational expression used in an unexpected Boolean context."
+ * val = _chainedInequality.prev.to_string()
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":125
+ * if msg is None:
+ * msg = "Relational expression used in an unexpected Boolean context."
+ * val = _chainedInequality.prev.to_string() # <<<<<<<<<<<<<<
+ * # We are about to raise an exception, so it's OK to reset chainedInequality
+ * info = _chainedInequality.call_info
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_prev); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_to_string); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_val = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":127
+ * val = _chainedInequality.prev.to_string()
+ * # We are about to raise an exception, so it's OK to reset chainedInequality
+ * info = _chainedInequality.call_info # <<<<<<<<<<<<<<
+ * _chainedInequality.call_info = None
+ * _chainedInequality.prev = None
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_call_info); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_info = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":128
+ * # We are about to raise an exception, so it's OK to reset chainedInequality
+ * info = _chainedInequality.call_info
+ * _chainedInequality.call_info = None # <<<<<<<<<<<<<<
+ * _chainedInequality.prev = None
+ *
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_call_info, Py_None) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":129
+ * info = _chainedInequality.call_info
+ * _chainedInequality.call_info = None
+ * _chainedInequality.prev = None # <<<<<<<<<<<<<<
+ *
+ * args = ( str(msg).strip(), val.strip(), info[0], info[1],
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_t_4, __pyx_n_s_prev, Py_None) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":131
+ * _chainedInequality.prev = None
+ *
+ * args = ( str(msg).strip(), val.strip(), info[0], info[1], # <<<<<<<<<<<<<<
+ * ':\n %s' % info[3] if info[3] is not None else '.' )
+ * return """%s
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_msg);
+ __Pyx_GIVEREF(__pyx_v_msg);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_msg);
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_strip); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 131, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_strip); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 131, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_info, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_info, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":132
+ *
+ * args = ( str(msg).strip(), val.strip(), info[0], info[1],
+ * ':\n %s' % info[3] if info[3] is not None else '.' ) # <<<<<<<<<<<<<<
+ * return """%s
+ *
+ */
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_info, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_2 = (__pyx_t_8 != Py_None);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ if ((__pyx_t_2 != 0)) {
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_info, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_s, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_7 = __pyx_t_9;
+ __pyx_t_9 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_kp_s_);
+ __pyx_t_7 = __pyx_kp_s_;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":131
+ * _chainedInequality.prev = None
+ *
+ * args = ( str(msg).strip(), val.strip(), info[0], info[1], # <<<<<<<<<<<<<<
+ * ':\n %s' % info[3] if info[3] is not None else '.' )
+ * return """%s
+ */
+ __pyx_t_9 = PyTuple_New(5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 3, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_9, 4, __pyx_t_7);
+ __pyx_t_4 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_7 = 0;
+ __pyx_v_args = ((PyObject*)__pyx_t_9);
+ __pyx_t_9 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":133
+ * args = ( str(msg).strip(), val.strip(), info[0], info[1],
+ * ':\n %s' % info[3] if info[3] is not None else '.' )
+ * return """%s # <<<<<<<<<<<<<<
+ *
+ * The inequality expression:
+ */
+ __Pyx_XDECREF(__pyx_r);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":149
+ * or
+ * if value(expression <= 5):
+ * """ % args # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_s_The_inequality_expression_s_c, __pyx_v_args); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 149, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_r = __pyx_t_9;
+ __pyx_t_9 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":122
+ *
+ * @staticmethod
+ * def error_message(msg=None): # <<<<<<<<<<<<<<
+ * if msg is None:
+ * msg = "Relational expression used in an unexpected Boolean context."
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._chainedInequality.error_message", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_val);
+ __Pyx_XDECREF(__pyx_v_info);
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_msg);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":158
+ * SimpleParam = None
+ * TemplateExpressionError = None
+ * def initialize_expression_data(): # <<<<<<<<<<<<<<
+ * """
+ * A function used to initialize expression global data.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_1initialize_expression_data(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_initialize_expression_data[] = "\n A function used to initialize expression global data.\n\n This function is necessary to avoid global imports. It is executed\n when ``pyomo.environ`` is imported.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_1initialize_expression_data = {"initialize_expression_data", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_1initialize_expression_data, METH_NOARGS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_initialize_expression_data};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_1initialize_expression_data(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("initialize_expression_data (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_initialize_expression_data(__pyx_self);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_initialize_expression_data(CYTHON_UNUSED PyObject *__pyx_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("initialize_expression_data", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":168
+ * global SimpleParam
+ * global TemplateExpressionError
+ * from pyomo.core.base.param import _ParamData, SimpleParam # <<<<<<<<<<<<<<
+ * from pyomo.core.base.template_expr import TemplateExpressionError
+ *
+ */
+ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_ParamData);
+ __Pyx_GIVEREF(__pyx_n_s_ParamData);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ParamData);
+ __Pyx_INCREF(__pyx_n_s_SimpleParam);
+ __Pyx_GIVEREF(__pyx_n_s_SimpleParam);
+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_SimpleParam);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_core_base_param, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ParamData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ParamData, __pyx_t_1) < 0) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_SimpleParam); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SimpleParam, __pyx_t_1) < 0) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":169
+ * global TemplateExpressionError
+ * from pyomo.core.base.param import _ParamData, SimpleParam
+ * from pyomo.core.base.template_expr import TemplateExpressionError # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_TemplateExpressionError);
+ __Pyx_GIVEREF(__pyx_n_s_TemplateExpressionError);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_TemplateExpressionError);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyomo_core_base_template_expr, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_TemplateExpressionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateExpressionError, __pyx_t_2) < 0) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":158
+ * SimpleParam = None
+ * TemplateExpressionError = None
+ * def initialize_expression_data(): # <<<<<<<<<<<<<<
+ * """
+ * A function used to initialize expression global data.
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.initialize_expression_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":172
+ *
+ *
+ * def compress_expression(expr): # <<<<<<<<<<<<<<
+ * """
+ * Deprecated function that was used to compress deep Pyomo5
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_3compress_expression(PyObject *__pyx_self, PyObject *__pyx_v_expr); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_2compress_expression[] = "\n Deprecated function that was used to compress deep Pyomo5\n expression trees.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_3compress_expression = {"compress_expression", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_3compress_expression, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_2compress_expression};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_3compress_expression(PyObject *__pyx_self, PyObject *__pyx_v_expr) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("compress_expression (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_2compress_expression(__pyx_self, ((PyObject *)__pyx_v_expr));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_2compress_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("compress_expression", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":177
+ * expression trees.
+ * """
+ * return expr # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_expr);
+ __pyx_r = __pyx_v_expr;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":172
+ *
+ *
+ * def compress_expression(expr): # <<<<<<<<<<<<<<
+ * """
+ * Deprecated function that was used to compress deep Pyomo5
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":190
+ * _count = 0
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_1__enter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_1__enter__ = {"__enter__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_1__enter__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_1__enter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context___enter__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context___enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__enter__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":191
+ *
+ * def __enter__(self):
+ * return self # <<<<<<<<<<<<<<
+ *
+ * def __exit__(self, *args):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_r = __pyx_v_self;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":190
+ * _count = 0
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":193
+ * return self
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * pass
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_3__exit__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_3__exit__ = {"__exit__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_3__exit__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_3__exit__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__exit__") < 0)) __PYX_ERR(0, 193, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__exit__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 193, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.clone_counter_context.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_2__exit__(__pyx_self, __pyx_v_self, __pyx_v_args);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_2__exit__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__exit__", 0);
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":197
+ *
+ * @property
+ * def count(self): # <<<<<<<<<<<<<<
+ * """A property that returns the clone count value.
+ * """
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_5count(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_4count[] = "A property that returns the clone count value.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_5count = {"count", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_5count, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_4count};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_5count(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("count (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_4count(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_4count(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("count", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":200
+ * """A property that returns the clone count value.
+ * """
+ * return clone_counter_context._count # <<<<<<<<<<<<<<
+ *
+ * #: A clone counter context manager object that simplifies the
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_clone_counter_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":197
+ *
+ * @property
+ * def count(self): # <<<<<<<<<<<<<<
+ * """A property that returns the clone count value.
+ * """
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.clone_counter_context.count", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":215
+ * """
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * self.e = _MutableViewSumExpression([])
+ * return self.e
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context_1__enter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context_1__enter__ = {"__enter__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context_1__enter__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context_1__enter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context___enter__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context___enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("__enter__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":216
+ *
+ * def __enter__(self):
+ * self.e = _MutableViewSumExpression([]) # <<<<<<<<<<<<<<
+ * return self.e
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_e, __pyx_t_1) < 0) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":217
+ * def __enter__(self):
+ * self.e = _MutableViewSumExpression([])
+ * return self.e # <<<<<<<<<<<<<<
+ *
+ * def __exit__(self, *args):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 217, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":215
+ * """
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * self.e = _MutableViewSumExpression([])
+ * return self.e
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.mutable_sum_context.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":219
+ * return self.e
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * pass
+ * if self.e.__class__ == _MutableViewSumExpression:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context_3__exit__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context_3__exit__ = {"__exit__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context_3__exit__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context_3__exit__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__exit__") < 0)) __PYX_ERR(0, 219, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__exit__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 219, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.mutable_sum_context.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context_2__exit__(__pyx_self, __pyx_v_self, __pyx_v_args);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context_2__exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ __Pyx_RefNannySetupContext("__exit__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":221
+ * def __exit__(self, *args):
+ * pass
+ * if self.e.__class__ == _MutableViewSumExpression: # <<<<<<<<<<<<<<
+ * self.e.__class__ = ViewSumExpression
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableViewSumExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 221, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 221, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":222
+ * pass
+ * if self.e.__class__ == _MutableViewSumExpression:
+ * self.e.__class__ = ViewSumExpression # <<<<<<<<<<<<<<
+ *
+ * #: A context manager object for nonlinear expressions.
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 222, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_class, __pyx_t_3) < 0) __PYX_ERR(0, 222, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":221
+ * def __exit__(self, *args):
+ * pass
+ * if self.e.__class__ == _MutableViewSumExpression: # <<<<<<<<<<<<<<
+ * self.e.__class__ = ViewSumExpression
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":219
+ * return self.e
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * pass
+ * if self.e.__class__ == _MutableViewSumExpression:
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.mutable_sum_context.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":237
+ * """
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * """
+ * The :class:`_MutableLinearExpression `
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_1__enter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context___enter__[] = "\n The :class:`_MutableLinearExpression `\n class is the context that is used to to\n hold the mutable linear sum.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_1__enter__ = {"__enter__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_1__enter__, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context___enter__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_1__enter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context___enter__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context___enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("__enter__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":243
+ * hold the mutable linear sum.
+ * """
+ * self.e = _MutableLinearExpression() # <<<<<<<<<<<<<<
+ * return self.e
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableLinearExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_e, __pyx_t_1) < 0) __PYX_ERR(0, 243, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":244
+ * """
+ * self.e = _MutableLinearExpression()
+ * return self.e # <<<<<<<<<<<<<<
+ *
+ * def __exit__(self, *args):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":237
+ * """
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * """
+ * The :class:`_MutableLinearExpression `
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.mutable_linear_context.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":246
+ * return self.e
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * """
+ * The context is changed to the
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_3__exit__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_2__exit__[] = "\n The context is changed to the \n :class:`LinearExpression `\n class to transform the context into a nonmutable\n form.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_3__exit__ = {"__exit__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_3__exit__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_2__exit__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_3__exit__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__exit__") < 0)) __PYX_ERR(0, 246, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__exit__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 246, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.mutable_linear_context.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_2__exit__(__pyx_self, __pyx_v_self, __pyx_v_args);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_2__exit__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ __Pyx_RefNannySetupContext("__exit__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":253
+ * form.
+ * """
+ * if self.e.__class__ == _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * self.e.__class__ = LinearExpression
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 253, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableLinearExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 253, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_t_2, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 253, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 253, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":254
+ * """
+ * if self.e.__class__ == _MutableLinearExpression:
+ * self.e.__class__ = LinearExpression # <<<<<<<<<<<<<<
+ *
+ * #: A context manager object for linear expressions.
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearExpression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 254, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_e); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_class, __pyx_t_3) < 0) __PYX_ERR(0, 254, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":253
+ * form.
+ * """
+ * if self.e.__class__ == _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * self.e.__class__ = LinearExpression
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":246
+ * return self.e
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * """
+ * The context is changed to the
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.mutable_linear_context.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":279
+ * """
+ *
+ * def visit(self, node): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Visit a node in an expression tree and perform some operation on
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_1visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_visit[] = "\n Visit a node in an expression tree and perform some operation on\n it.\n\n This method should be over-written by a user\n that is creating a sub-class.\n\n Args:\n node: a node in an expression tree\n\n Returns:\n nothing\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_1visit = {"visit", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_1visit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_visit};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_1visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 2, 2, 1); __PYX_ERR(0, 279, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visit") < 0)) __PYX_ERR(0, 279, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 279, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.SimpleExpressionVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_visit(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_visit(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit", 0);
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":295
+ * pass
+ *
+ * def finalize(self): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Return the "final value" of the search.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_3finalize(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_2finalize[] = "\n Return the \"final value\" of the search.\n\n The default implementation returns :const:`None`, because\n the traditional visitor pattern does not return a value.\n\n Returns:\n The final value after the search. Default is :const:`None`.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_3finalize = {"finalize", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_3finalize, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_2finalize};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_3finalize(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_2finalize(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_2finalize(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("finalize", 0);
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":307
+ * pass
+ *
+ * def xbfs(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Breadth-first search of an expression tree,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_5xbfs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_4xbfs[] = "\n Breadth-first search of an expression tree, \n except that leaf nodes are immediately visited.\n\n Note:\n This method has the same functionality as the \n PyUtilib :class:`SimpleVisitor.xbfs `\n method. The difference is that this method\n is tailored to efficiently walk Pyomo expression trees.\n\n Args:\n node: The root node of the expression tree that is searched.\n\n Returns:\n The return value is determined by the :func:`finalize` function,\n which may be defined by the user. Defaults to :const:`None`.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_5xbfs = {"xbfs", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_5xbfs, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_4xbfs};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_5xbfs(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("xbfs (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("xbfs", 1, 2, 2, 1); __PYX_ERR(0, 307, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "xbfs") < 0)) __PYX_ERR(0, 307, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("xbfs", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 307, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.SimpleExpressionVisitor.xbfs", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_4xbfs(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_4xbfs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_v_dq = NULL;
+ PyObject *__pyx_v_current = NULL;
+ PyObject *__pyx_v_c = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ Py_ssize_t __pyx_t_7;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ int __pyx_t_9;
+ int __pyx_t_10;
+ int __pyx_t_11;
+ __Pyx_RefNannySetupContext("xbfs", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":325
+ * which may be defined by the user. Defaults to :const:`None`.
+ * """
+ * dq = deque([node]) # <<<<<<<<<<<<<<
+ * while dq:
+ * current = dq.popleft()
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_deque); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 325, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 325, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyList_SET_ITEM(__pyx_t_3, 0, __pyx_v_node);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 325, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_dq = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":326
+ * """
+ * dq = deque([node])
+ * while dq: # <<<<<<<<<<<<<<
+ * current = dq.popleft()
+ * self.visit(current)
+ */
+ while (1) {
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_dq); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 326, __pyx_L1_error)
+ if (!__pyx_t_6) break;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":327
+ * dq = deque([node])
+ * while dq:
+ * current = dq.popleft() # <<<<<<<<<<<<<<
+ * self.visit(current)
+ * #for c in self.children(current):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_dq, __pyx_n_s_popleft); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 327, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_current, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":328
+ * while dq:
+ * current = dq.popleft()
+ * self.visit(current) # <<<<<<<<<<<<<<
+ * #for c in self.children(current):
+ * for c in current.args:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_visit); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_current); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_current};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_current};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_current);
+ __Pyx_GIVEREF(__pyx_v_current);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_current);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":330
+ * self.visit(current)
+ * #for c in self.children(current):
+ * for c in current.args: # <<<<<<<<<<<<<<
+ * #if self.is_leaf(c):
+ * if c.__class__ in nonpyomo_leaf_types or not c.is_expression_type() or c.nargs() == 0:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_current, __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ } else {
+ __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 330, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_8)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 330, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 330, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_8(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 330, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":332
+ * for c in current.args:
+ * #if self.is_leaf(c):
+ * if c.__class__ in nonpyomo_leaf_types or not c.is_expression_type() or c.nargs() == 0: # <<<<<<<<<<<<<<
+ * self.visit(c)
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_10 = (__pyx_t_9 != 0);
+ if (!__pyx_t_10) {
+ } else {
+ __pyx_t_6 = __pyx_t_10;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_9 = ((!__pyx_t_10) != 0);
+ if (!__pyx_t_9) {
+ } else {
+ __pyx_t_6 = __pyx_t_9;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_nargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 332, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 332, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_6 = __pyx_t_9;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":333
+ * #if self.is_leaf(c):
+ * if c.__class__ in nonpyomo_leaf_types or not c.is_expression_type() or c.nargs() == 0:
+ * self.visit(c) # <<<<<<<<<<<<<<
+ * else:
+ * dq.append(c)
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_visit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 333, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_c); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_c};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_c};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 333, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_c);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 333, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":332
+ * for c in current.args:
+ * #if self.is_leaf(c):
+ * if c.__class__ in nonpyomo_leaf_types or not c.is_expression_type() or c.nargs() == 0: # <<<<<<<<<<<<<<
+ * self.visit(c)
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":335
+ * self.visit(c)
+ * else:
+ * dq.append(c) # <<<<<<<<<<<<<<
+ * return self.finalize()
+ *
+ */
+ /*else*/ {
+ __pyx_t_11 = __Pyx_PyObject_Append(__pyx_v_dq, __pyx_v_c); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 335, __pyx_L1_error)
+ }
+ __pyx_L7:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":330
+ * self.visit(current)
+ * #for c in self.children(current):
+ * for c in current.args: # <<<<<<<<<<<<<<
+ * #if self.is_leaf(c):
+ * if c.__class__ in nonpyomo_leaf_types or not c.is_expression_type() or c.nargs() == 0:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":336
+ * else:
+ * dq.append(c)
+ * return self.finalize() # <<<<<<<<<<<<<<
+ *
+ * def xbfs_yield_leaves(self, node):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_finalize); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 336, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":307
+ * pass
+ *
+ * def xbfs(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Breadth-first search of an expression tree,
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.SimpleExpressionVisitor.xbfs", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_dq);
+ __Pyx_XDECREF(__pyx_v_current);
+ __Pyx_XDECREF(__pyx_v_c);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_8generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":338
+ * return self.finalize()
+ *
+ * def xbfs_yield_leaves(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Breadth-first search of an expression tree, except that
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_7xbfs_yield_leaves(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_6xbfs_yield_leaves[] = "\n Breadth-first search of an expression tree, except that \n leaf nodes are immediately visited.\n\n Note:\n This method has the same functionality as the \n PyUtilib :class:`SimpleVisitor.xbfs_yield_leaves `\n method. The difference is that this method\n is tailored to efficiently walk Pyomo expression trees.\n\n Args:\n node: The root node of the expression tree\n that is searched.\n\n Returns:\n The return value is determined by the :func:`finalize` function,\n which may be defined by the user. Defaults to :const:`None`.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_7xbfs_yield_leaves = {"xbfs_yield_leaves", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_7xbfs_yield_leaves, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_6xbfs_yield_leaves};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_7xbfs_yield_leaves(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("xbfs_yield_leaves (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("xbfs_yield_leaves", 1, 2, 2, 1); __PYX_ERR(0, 338, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "xbfs_yield_leaves") < 0)) __PYX_ERR(0, 338, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("xbfs_yield_leaves", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 338, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.SimpleExpressionVisitor.xbfs_yield_leaves", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_6xbfs_yield_leaves(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_6xbfs_yield_leaves(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("xbfs_yield_leaves", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves *)__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves(__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 338, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
+ __pyx_cur_scope->__pyx_v_node = __pyx_v_node;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_8generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_xbfs_yield_leaves, __pyx_n_s_SimpleExpressionVisitor_xbfs_yie, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!gen)) __PYX_ERR(0, 338, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.SimpleExpressionVisitor.xbfs_yield_leaves", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_8generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ Py_ssize_t __pyx_t_9;
+ PyObject *(*__pyx_t_10)(PyObject *);
+ int __pyx_t_11;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("xbfs_yield_leaves", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L9_resume_from_yield;
+ case 2: goto __pyx_L19_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 338, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":360
+ * # If we start with a leaf, then yield it and stop iteration
+ * #
+ * if node.__class__ in nonpyomo_leaf_types or not node.is_expression_type() or node.nargs() == 0: # <<<<<<<<<<<<<<
+ * ans = self.visit(node)
+ * if not ans is None:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_1 = __pyx_t_5;
+ goto __pyx_L5_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = ((!__pyx_t_5) != 0);
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_1 = __pyx_t_4;
+ goto __pyx_L5_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_node, __pyx_n_s_nargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 360, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_3, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 360, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = __pyx_t_4;
+ __pyx_L5_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":361
+ * #
+ * if node.__class__ in nonpyomo_leaf_types or not node.is_expression_type() or node.nargs() == 0:
+ * ans = self.visit(node) # <<<<<<<<<<<<<<
+ * if not ans is None:
+ * yield ans
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_visit); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_cur_scope->__pyx_v_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_node};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_node};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_cur_scope->__pyx_v_node);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 361, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_cur_scope->__pyx_v_ans = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":362
+ * if node.__class__ in nonpyomo_leaf_types or not node.is_expression_type() or node.nargs() == 0:
+ * ans = self.visit(node)
+ * if not ans is None: # <<<<<<<<<<<<<<
+ * yield ans
+ * raise StopIteration
+ */
+ __pyx_t_1 = (__pyx_cur_scope->__pyx_v_ans != Py_None);
+ __pyx_t_4 = (__pyx_t_1 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":363
+ * ans = self.visit(node)
+ * if not ans is None:
+ * yield ans # <<<<<<<<<<<<<<
+ * raise StopIteration
+ * #
+ */
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ans);
+ __pyx_r = __pyx_cur_scope->__pyx_v_ans;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L9_resume_from_yield:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 363, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":362
+ * if node.__class__ in nonpyomo_leaf_types or not node.is_expression_type() or node.nargs() == 0:
+ * ans = self.visit(node)
+ * if not ans is None: # <<<<<<<<<<<<<<
+ * yield ans
+ * raise StopIteration
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":364
+ * if not ans is None:
+ * yield ans
+ * raise StopIteration # <<<<<<<<<<<<<<
+ * #
+ * # Iterate through the tree.
+ */
+ __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
+ __PYX_ERR(0, 364, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":360
+ * # If we start with a leaf, then yield it and stop iteration
+ * #
+ * if node.__class__ in nonpyomo_leaf_types or not node.is_expression_type() or node.nargs() == 0: # <<<<<<<<<<<<<<
+ * ans = self.visit(node)
+ * if not ans is None:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":368
+ * # Iterate through the tree.
+ * #
+ * dq = deque([node]) # <<<<<<<<<<<<<<
+ * while dq:
+ * current = dq.popleft()
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_deque); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 368, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = PyList_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 368, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_node);
+ PyList_SET_ITEM(__pyx_t_7, 0, __pyx_cur_scope->__pyx_v_node);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 368, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_cur_scope->__pyx_v_dq = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":369
+ * #
+ * dq = deque([node])
+ * while dq: # <<<<<<<<<<<<<<
+ * current = dq.popleft()
+ * #self.visit(current)
+ */
+ while (1) {
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_dq); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 369, __pyx_L1_error)
+ if (!__pyx_t_4) break;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":370
+ * dq = deque([node])
+ * while dq:
+ * current = dq.popleft() # <<<<<<<<<<<<<<
+ * #self.visit(current)
+ * #for c in self.children(current):
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_dq, __pyx_n_s_popleft); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 370, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 370, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_current);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_current, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":373
+ * #self.visit(current)
+ * #for c in self.children(current):
+ * for c in current.args: # <<<<<<<<<<<<<<
+ * #if self.is_leaf(c):
+ * if c.__class__ in nonpyomo_leaf_types or not c.is_expression_type() or c.nargs() == 0:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_current, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0;
+ __pyx_t_10 = NULL;
+ } else {
+ __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 373, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 373, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_10)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 373, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 373, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_10(__pyx_t_3);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 373, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":375
+ * for c in current.args:
+ * #if self.is_leaf(c):
+ * if c.__class__ in nonpyomo_leaf_types or not c.is_expression_type() or c.nargs() == 0: # <<<<<<<<<<<<<<
+ * ans = self.visit(c)
+ * if not ans is None:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_c, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_8, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_5 = (__pyx_t_1 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_4 = __pyx_t_5;
+ goto __pyx_L15_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_c, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_7) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 375, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_1 = ((!__pyx_t_5) != 0);
+ if (!__pyx_t_1) {
+ } else {
+ __pyx_t_4 = __pyx_t_1;
+ goto __pyx_L15_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_c, __pyx_n_s_nargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_7) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 375, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_8, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __pyx_t_1;
+ __pyx_L15_bool_binop_done:;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":376
+ * #if self.is_leaf(c):
+ * if c.__class__ in nonpyomo_leaf_types or not c.is_expression_type() or c.nargs() == 0:
+ * ans = self.visit(c) # <<<<<<<<<<<<<<
+ * if not ans is None:
+ * yield ans
+ */
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_visit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 376, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_cur_scope->__pyx_v_c); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_c};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_cur_scope->__pyx_v_c};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 376, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_cur_scope->__pyx_v_c);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 376, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_ans);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_ans, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":377
+ * if c.__class__ in nonpyomo_leaf_types or not c.is_expression_type() or c.nargs() == 0:
+ * ans = self.visit(c)
+ * if not ans is None: # <<<<<<<<<<<<<<
+ * yield ans
+ * else:
+ */
+ __pyx_t_4 = (__pyx_cur_scope->__pyx_v_ans != Py_None);
+ __pyx_t_1 = (__pyx_t_4 != 0);
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":378
+ * ans = self.visit(c)
+ * if not ans is None:
+ * yield ans # <<<<<<<<<<<<<<
+ * else:
+ * dq.append(c)
+ */
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_ans);
+ __pyx_r = __pyx_cur_scope->__pyx_v_ans;
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_9;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_10;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 2;
+ return __pyx_r;
+ __pyx_L19_resume_from_yield:;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_3);
+ __pyx_t_9 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_10 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 378, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":377
+ * if c.__class__ in nonpyomo_leaf_types or not c.is_expression_type() or c.nargs() == 0:
+ * ans = self.visit(c)
+ * if not ans is None: # <<<<<<<<<<<<<<
+ * yield ans
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":375
+ * for c in current.args:
+ * #if self.is_leaf(c):
+ * if c.__class__ in nonpyomo_leaf_types or not c.is_expression_type() or c.nargs() == 0: # <<<<<<<<<<<<<<
+ * ans = self.visit(c)
+ * if not ans is None:
+ */
+ goto __pyx_L14;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":380
+ * yield ans
+ * else:
+ * dq.append(c) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ /*else*/ {
+ __pyx_t_11 = __Pyx_PyObject_Append(__pyx_cur_scope->__pyx_v_dq, __pyx_cur_scope->__pyx_v_c); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 380, __pyx_L1_error)
+ }
+ __pyx_L14:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":373
+ * #self.visit(current)
+ * #for c in self.children(current):
+ * for c in current.args: # <<<<<<<<<<<<<<
+ * #if self.is_leaf(c):
+ * if c.__class__ in nonpyomo_leaf_types or not c.is_expression_type() or c.nargs() == 0:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":338
+ * return self.finalize()
+ *
+ * def xbfs_yield_leaves(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Breadth-first search of an expression tree, except that
+ */
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("xbfs_yield_leaves", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":394
+ * """
+ *
+ * def visit(self, node, values): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Visit a node in a tree and compute its value using
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_1visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_visit[] = "\n Visit a node in a tree and compute its value using\n the values of its children.\n\n This method should be over-written by a user\n that is creating a sub-class.\n\n Args:\n node: a node in a tree\n values: a list of values of this node's children\n\n Returns:\n The *value* for this node, which is computed using :attr:`values`\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_1visit = {"visit", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_1visit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_visit};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_1visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_node = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,&__pyx_n_s_values,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, 1); __PYX_ERR(0, 394, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, 2); __PYX_ERR(0, 394, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visit") < 0)) __PYX_ERR(0, 394, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ __pyx_v_values = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 394, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionValueVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_visit(__pyx_self, __pyx_v_self, __pyx_v_node, __pyx_v_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_visit(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node, CYTHON_UNUSED PyObject *__pyx_v_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit", 0);
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":411
+ * pass
+ *
+ * def visiting_potential_leaf(self, node): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Visit a node and return its value if it is a leaf.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_3visiting_potential_leaf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_2visiting_potential_leaf[] = " \n Visit a node and return its value if it is a leaf.\n\n Note:\n This method needs to be over-written for a specific\n visitor application.\n\n Args:\n node: a node in a tree\n\n Returns:\n A tuple: ``(flag, value)``. If ``flag`` is False,\n then the node is not a leaf and ``value`` is :const:`None`. \n Otherwise, ``value`` is the computed value for this node.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_3visiting_potential_leaf = {"visiting_potential_leaf", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_3visiting_potential_leaf, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_2visiting_potential_leaf};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_3visiting_potential_leaf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visiting_potential_leaf (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visiting_potential_leaf", 1, 2, 2, 1); __PYX_ERR(0, 411, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visiting_potential_leaf") < 0)) __PYX_ERR(0, 411, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visiting_potential_leaf", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 411, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionValueVisitor.visiting_potential_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_2visiting_potential_leaf(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_2visiting_potential_leaf(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("visiting_potential_leaf", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":427
+ * Otherwise, ``value`` is the computed value for this node.
+ * """
+ * raise RuntimeError("The visiting_potential_leaf method needs to be defined.") # <<<<<<<<<<<<<<
+ *
+ * def finalize(self, ans): #pragma: no cover
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 427, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":411
+ * pass
+ *
+ * def visiting_potential_leaf(self, node): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Visit a node and return its value if it is a leaf.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionValueVisitor.visiting_potential_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":429
+ * raise RuntimeError("The visiting_potential_leaf method needs to be defined.")
+ *
+ * def finalize(self, ans): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * This method defines the return value for the search methods
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_5finalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_4finalize[] = "\n This method defines the return value for the search methods\n in this class.\n\n The default implementation returns the value of the\n initial node (aka the root node), because\n this visitor pattern computes and returns value for each\n node to enable the computation of this value.\n\n Args:\n ans: The final value computed by the search method.\n\n Returns:\n The final value after the search. Defaults to simply\n returning :attr:`ans`.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_5finalize = {"finalize", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_5finalize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_4finalize};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_5finalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_ans = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ans,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ans)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("finalize", 1, 2, 2, 1); __PYX_ERR(0, 429, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "finalize") < 0)) __PYX_ERR(0, 429, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_ans = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("finalize", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 429, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionValueVisitor.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_4finalize(__pyx_self, __pyx_v_self, __pyx_v_ans);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_4finalize(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_ans) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("finalize", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":446
+ * returning :attr:`ans`.
+ * """
+ * return ans # <<<<<<<<<<<<<<
+ *
+ * def dfs_postorder_stack(self, node):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_ans);
+ __pyx_r = __pyx_v_ans;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":429
+ * raise RuntimeError("The visiting_potential_leaf method needs to be defined.")
+ *
+ * def finalize(self, ans): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * This method defines the return value for the search methods
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":448
+ * return ans
+ *
+ * def dfs_postorder_stack(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Perform a depth-first search in postorder using a stack
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_7dfs_postorder_stack(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_6dfs_postorder_stack[] = "\n Perform a depth-first search in postorder using a stack\n implementation.\n\n Note:\n This method has the same functionality as the \n PyUtilib :class:`ValueVisitor.dfs_postorder_stack `\n method. The difference is that this method\n is tailored to efficiently walk Pyomo expression trees.\n\n Args:\n node: The root node of the expression tree\n that is searched.\n\n Returns:\n The return value is determined by the :func:`finalize` function,\n which may be defined by the user.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_7dfs_postorder_stack = {"dfs_postorder_stack", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_7dfs_postorder_stack, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_6dfs_postorder_stack};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_7dfs_postorder_stack(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("dfs_postorder_stack (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("dfs_postorder_stack", 1, 2, 2, 1); __PYX_ERR(0, 448, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dfs_postorder_stack") < 0)) __PYX_ERR(0, 448, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("dfs_postorder_stack", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 448, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionValueVisitor.dfs_postorder_stack", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_6dfs_postorder_stack(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_6dfs_postorder_stack(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_v_flag = NULL;
+ PyObject *__pyx_v_value = NULL;
+ PyObject *__pyx_v__stack = NULL;
+ PyObject *__pyx_v__obj = NULL;
+ PyObject *__pyx_v__argList = NULL;
+ PyObject *__pyx_v__idx = NULL;
+ PyObject *__pyx_v__len = NULL;
+ PyObject *__pyx_v__result = NULL;
+ PyObject *__pyx_v__sub = NULL;
+ PyObject *__pyx_v_ans = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ int __pyx_t_11;
+ __Pyx_RefNannySetupContext("dfs_postorder_stack", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":467
+ * which may be defined by the user.
+ * """
+ * flag, value = self.visiting_potential_leaf(node) # <<<<<<<<<<<<<<
+ * if flag:
+ * return value
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_visiting_potential_leaf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_node};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_node};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 467, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_node);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 467, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 467, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ #else
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 467, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 467, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 467, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ index = 1; __pyx_t_4 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) __PYX_ERR(0, 467, __pyx_L1_error)
+ __pyx_t_5 = NULL;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L4_unpacking_done;
+ __pyx_L3_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 467, __pyx_L1_error)
+ __pyx_L4_unpacking_done:;
+ }
+ __pyx_v_flag = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __pyx_v_value = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":468
+ * """
+ * flag, value = self.visiting_potential_leaf(node)
+ * if flag: # <<<<<<<<<<<<<<
+ * return value
+ * #_stack = [ (node, self.children(node), 0, len(self.children(node)), [])]
+ */
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 468, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":469
+ * flag, value = self.visiting_potential_leaf(node)
+ * if flag:
+ * return value # <<<<<<<<<<<<<<
+ * #_stack = [ (node, self.children(node), 0, len(self.children(node)), [])]
+ * _stack = [ (node, node._args_, 0, node.nargs(), [])]
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_value);
+ __pyx_r = __pyx_v_value;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":468
+ * """
+ * flag, value = self.visiting_potential_leaf(node)
+ * if flag: # <<<<<<<<<<<<<<
+ * return value
+ * #_stack = [ (node, self.children(node), 0, len(self.children(node)), [])]
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":471
+ * return value
+ * #_stack = [ (node, self.children(node), 0, len(self.children(node)), [])]
+ * _stack = [ (node, node._args_, 0, node.nargs(), [])] # <<<<<<<<<<<<<<
+ * #
+ * # Iterate until the stack is empty
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_nargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 471, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_node);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_0);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2);
+ __pyx_t_1 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_v__stack = ((PyObject*)__pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":477
+ * # Note: 1 is faster than True for Python 2.x
+ * #
+ * while 1: # <<<<<<<<<<<<<<
+ * #
+ * # Get the top of the stack
+ */
+ while (1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":486
+ * # _result The return values
+ * #
+ * _obj, _argList, _idx, _len, _result = _stack.pop() # <<<<<<<<<<<<<<
+ * #
+ * # Iterate through the arguments
+ */
+ __pyx_t_2 = __Pyx_PyList_Pop(__pyx_v__stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+ PyObject* sequence = __pyx_t_2;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 5)) {
+ if (size > 5) __Pyx_RaiseTooManyValuesError(5);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 486, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2);
+ __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3);
+ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 4);
+ } else {
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 2);
+ __pyx_t_7 = PyList_GET_ITEM(sequence, 3);
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 4);
+ }
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_8);
+ #else
+ {
+ Py_ssize_t i;
+ PyObject** temps[5] = {&__pyx_t_3,&__pyx_t_4,&__pyx_t_1,&__pyx_t_7,&__pyx_t_8};
+ for (i=0; i < 5; i++) {
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 486, __pyx_L1_error)
+ __Pyx_GOTREF(item);
+ *(temps[i]) = item;
+ }
+ }
+ #endif
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ PyObject** temps[5] = {&__pyx_t_3,&__pyx_t_4,&__pyx_t_1,&__pyx_t_7,&__pyx_t_8};
+ __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = Py_TYPE(__pyx_t_9)->tp_iternext;
+ for (index=0; index < 5; index++) {
+ PyObject* item = __pyx_t_5(__pyx_t_9); if (unlikely(!item)) goto __pyx_L8_unpacking_failed;
+ __Pyx_GOTREF(item);
+ *(temps[index]) = item;
+ }
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_9), 5) < 0) __PYX_ERR(0, 486, __pyx_L1_error)
+ __pyx_t_5 = NULL;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ goto __pyx_L9_unpacking_done;
+ __pyx_L8_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_5 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 486, __pyx_L1_error)
+ __pyx_L9_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v__obj, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __Pyx_XDECREF_SET(__pyx_v__argList, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __Pyx_XDECREF_SET(__pyx_v__idx, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __Pyx_XDECREF_SET(__pyx_v__len, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __Pyx_XDECREF_SET(__pyx_v__result, __pyx_t_8);
+ __pyx_t_8 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":490
+ * # Iterate through the arguments
+ * #
+ * while _idx < _len: # <<<<<<<<<<<<<<
+ * _sub = _argList[_idx]
+ * _idx += 1
+ */
+ while (1) {
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v__idx, __pyx_v__len, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 490, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 490, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (!__pyx_t_6) break;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":491
+ * #
+ * while _idx < _len:
+ * _sub = _argList[_idx] # <<<<<<<<<<<<<<
+ * _idx += 1
+ * flag, value = self.visiting_potential_leaf(_sub)
+ */
+ __pyx_t_2 = PyObject_GetItem(__pyx_v__argList, __pyx_v__idx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_XDECREF_SET(__pyx_v__sub, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":492
+ * while _idx < _len:
+ * _sub = _argList[_idx]
+ * _idx += 1 # <<<<<<<<<<<<<<
+ * flag, value = self.visiting_potential_leaf(_sub)
+ * if flag:
+ */
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v__idx, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v__idx, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":493
+ * _sub = _argList[_idx]
+ * _idx += 1
+ * flag, value = self.visiting_potential_leaf(_sub) # <<<<<<<<<<<<<<
+ * if flag:
+ * _result.append( value )
+ */
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_visiting_potential_leaf); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 493, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v__sub); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v__sub};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v__sub};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(__pyx_v__sub);
+ __Pyx_GIVEREF(__pyx_v__sub);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v__sub);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 493, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+ PyObject* sequence = __pyx_t_2;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 493, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_1);
+ #else
+ __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 493, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 493, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 493, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext;
+ index = 0; __pyx_t_8 = __pyx_t_5(__pyx_t_7); if (unlikely(!__pyx_t_8)) goto __pyx_L12_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_8);
+ index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L12_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_7), 2) < 0) __PYX_ERR(0, 493, __pyx_L1_error)
+ __pyx_t_5 = NULL;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L13_unpacking_done;
+ __pyx_L12_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_5 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 493, __pyx_L1_error)
+ __pyx_L13_unpacking_done:;
+ }
+ __Pyx_DECREF_SET(__pyx_v_flag, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":494
+ * _idx += 1
+ * flag, value = self.visiting_potential_leaf(_sub)
+ * if flag: # <<<<<<<<<<<<<<
+ * _result.append( value )
+ * else:
+ */
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 494, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":495
+ * flag, value = self.visiting_potential_leaf(_sub)
+ * if flag:
+ * _result.append( value ) # <<<<<<<<<<<<<<
+ * else:
+ * #
+ */
+ __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v__result, __pyx_v_value); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 495, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":494
+ * _idx += 1
+ * flag, value = self.visiting_potential_leaf(_sub)
+ * if flag: # <<<<<<<<<<<<<<
+ * _result.append( value )
+ * else:
+ */
+ goto __pyx_L14;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":500
+ * # Push an expression onto the stack
+ * #
+ * _stack.append( (_obj, _argList, _idx, _len, _result) ) # <<<<<<<<<<<<<<
+ * _obj = _sub
+ * #_argList = self.children(_sub)
+ */
+ /*else*/ {
+ __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 500, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v__obj);
+ __Pyx_GIVEREF(__pyx_v__obj);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__obj);
+ __Pyx_INCREF(__pyx_v__argList);
+ __Pyx_GIVEREF(__pyx_v__argList);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v__argList);
+ __Pyx_INCREF(__pyx_v__idx);
+ __Pyx_GIVEREF(__pyx_v__idx);
+ PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v__idx);
+ __Pyx_INCREF(__pyx_v__len);
+ __Pyx_GIVEREF(__pyx_v__len);
+ PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v__len);
+ __Pyx_INCREF(__pyx_v__result);
+ __Pyx_GIVEREF(__pyx_v__result);
+ PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v__result);
+ __pyx_t_10 = __Pyx_PyList_Append(__pyx_v__stack, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 500, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":501
+ * #
+ * _stack.append( (_obj, _argList, _idx, _len, _result) )
+ * _obj = _sub # <<<<<<<<<<<<<<
+ * #_argList = self.children(_sub)
+ * _argList = _sub._args_
+ */
+ __Pyx_INCREF(__pyx_v__sub);
+ __Pyx_DECREF_SET(__pyx_v__obj, __pyx_v__sub);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":503
+ * _obj = _sub
+ * #_argList = self.children(_sub)
+ * _argList = _sub._args_ # <<<<<<<<<<<<<<
+ * _idx = 0
+ * _len = _sub.nargs()
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__sub, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v__argList, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":504
+ * #_argList = self.children(_sub)
+ * _argList = _sub._args_
+ * _idx = 0 # <<<<<<<<<<<<<<
+ * _len = _sub.nargs()
+ * _result = []
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_DECREF_SET(__pyx_v__idx, __pyx_int_0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":505
+ * _argList = _sub._args_
+ * _idx = 0
+ * _len = _sub.nargs() # <<<<<<<<<<<<<<
+ * _result = []
+ * #
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__sub, __pyx_n_s_nargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v__len, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":506
+ * _idx = 0
+ * _len = _sub.nargs()
+ * _result = [] # <<<<<<<<<<<<<<
+ * #
+ * # Process the current node
+ */
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v__result, __pyx_t_2);
+ __pyx_t_2 = 0;
+ }
+ __pyx_L14:;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":510
+ * # Process the current node
+ * #
+ * ans = self.visit(_obj, _result) # <<<<<<<<<<<<<<
+ * if _stack:
+ * #
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_visit); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 510, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v__obj, __pyx_v__result};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v__obj, __pyx_v__result};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 510, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v__obj);
+ __Pyx_GIVEREF(__pyx_v__obj);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_11, __pyx_v__obj);
+ __Pyx_INCREF(__pyx_v__result);
+ __Pyx_GIVEREF(__pyx_v__result);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_11, __pyx_v__result);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 510, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_ans, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":511
+ * #
+ * ans = self.visit(_obj, _result)
+ * if _stack: # <<<<<<<<<<<<<<
+ * #
+ * # "return" the recursion by putting the return value on the end of the results stack
+ */
+ __pyx_t_6 = (__pyx_v__stack != Py_None) && (PyList_GET_SIZE(__pyx_v__stack) != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":515
+ * # "return" the recursion by putting the return value on the end of the results stack
+ * #
+ * _stack[-1][-1].append( ans ) # <<<<<<<<<<<<<<
+ * else:
+ * return self.finalize(ans)
+ */
+ __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v__stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 515, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_ans); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 515, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":511
+ * #
+ * ans = self.visit(_obj, _result)
+ * if _stack: # <<<<<<<<<<<<<<
+ * #
+ * # "return" the recursion by putting the return value on the end of the results stack
+ */
+ goto __pyx_L15;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":517
+ * _stack[-1][-1].append( ans )
+ * else:
+ * return self.finalize(ans) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_finalize); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_ans); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_ans};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_ans};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 517, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(__pyx_v_ans);
+ __Pyx_GIVEREF(__pyx_v_ans);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_ans);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 517, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+ }
+ __pyx_L15:;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":448
+ * return ans
+ *
+ * def dfs_postorder_stack(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Perform a depth-first search in postorder using a stack
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionValueVisitor.dfs_postorder_stack", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_flag);
+ __Pyx_XDECREF(__pyx_v_value);
+ __Pyx_XDECREF(__pyx_v__stack);
+ __Pyx_XDECREF(__pyx_v__obj);
+ __Pyx_XDECREF(__pyx_v__argList);
+ __Pyx_XDECREF(__pyx_v__idx);
+ __Pyx_XDECREF(__pyx_v__len);
+ __Pyx_XDECREF(__pyx_v__result);
+ __Pyx_XDECREF(__pyx_v__sub);
+ __Pyx_XDECREF(__pyx_v_ans);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":531
+ * """
+ *
+ * def __init__(self, memo=None): # <<<<<<<<<<<<<<
+ * """
+ * Contruct a visitor that is tailored to support the
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor___init__[] = "\n Contruct a visitor that is tailored to support the\n replacement of sub-trees in a pyomo expression tree.\n\n Args:\n memo (dict): A dictionary mapping object ids to \n objects. This dictionary has the same semantics as\n the memo object used with ``copy.deepcopy``. Defaults\n to None, which indicates that no user-defined\n dictionary is used.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_1__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor___init__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_memo = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_memo,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)((PyObject *)Py_None));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memo);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 531, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_memo = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 531, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionReplacementVisitor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor___init__(__pyx_self, __pyx_v_self, __pyx_v_memo);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":543
+ * dictionary is used.
+ * """
+ * if memo is None: # <<<<<<<<<<<<<<
+ * self.memo = {'__block_scope__': { id(None): False }}
+ * else:
+ */
+ __pyx_t_1 = (__pyx_v_memo == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":544
+ * """
+ * if memo is None:
+ * self.memo = {'__block_scope__': { id(None): False }} # <<<<<<<<<<<<<<
+ * else:
+ * self.memo = memo #pragma: no cover
+ */
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_t_4, __pyx_t_5, Py_False) < 0) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_block_scope, __pyx_t_4) < 0) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_memo, __pyx_t_3) < 0) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":543
+ * dictionary is used.
+ * """
+ * if memo is None: # <<<<<<<<<<<<<<
+ * self.memo = {'__block_scope__': { id(None): False }}
+ * else:
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":546
+ * self.memo = {'__block_scope__': { id(None): False }}
+ * else:
+ * self.memo = memo #pragma: no cover # <<<<<<<<<<<<<<
+ *
+ * def visit(self, node, values):
+ */
+ /*else*/ {
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_memo, __pyx_v_memo) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
+ }
+ __pyx_L3:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":531
+ * """
+ *
+ * def __init__(self, memo=None): # <<<<<<<<<<<<<<
+ * """
+ * Contruct a visitor that is tailored to support the
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionReplacementVisitor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":548
+ * self.memo = memo #pragma: no cover
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """
+ * Visit and clone nodes that have been expanded.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_3visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_2visit[] = "\n Visit and clone nodes that have been expanded.\n\n Note:\n This method normally does not need to be re-defined\n by a user.\n\n Args:\n node: The node that will be cloned.\n values (list): The list of child nodes that have been\n cloned. These values are used to define the \n cloned node.\n\n Returns:\n The cloned node. Default is to simply return the node.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_3visit = {"visit", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_3visit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_2visit};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_3visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,&__pyx_n_s_values,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, 1); __PYX_ERR(0, 548, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, 2); __PYX_ERR(0, 548, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visit") < 0)) __PYX_ERR(0, 548, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ __pyx_v_values = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 548, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionReplacementVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_2visit(__pyx_self, __pyx_v_self, __pyx_v_node, __pyx_v_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_2visit(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_node, CYTHON_UNUSED PyObject *__pyx_v_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":565
+ * The cloned node. Default is to simply return the node.
+ * """
+ * return node # <<<<<<<<<<<<<<
+ *
+ * def visiting_potential_leaf(self, node): #pragma: no cover
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_node);
+ __pyx_r = __pyx_v_node;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":548
+ * self.memo = memo #pragma: no cover
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """
+ * Visit and clone nodes that have been expanded.
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":567
+ * return node
+ *
+ * def visiting_potential_leaf(self, node): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Visit a node and return a cloned node if it is a leaf.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_5visiting_potential_leaf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_4visiting_potential_leaf[] = " \n Visit a node and return a cloned node if it is a leaf.\n\n Note:\n This method needs to be over-written for a specific\n visitor application.\n\n Args:\n node: a node in a tree\n\n Returns:\n A tuple: ``(flag, value)``. If ``flag`` is False,\n then the node is not a leaf and ``value`` is :const:`None`. \n Otherwise, ``value`` is a cloned node.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_5visiting_potential_leaf = {"visiting_potential_leaf", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_5visiting_potential_leaf, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_4visiting_potential_leaf};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_5visiting_potential_leaf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visiting_potential_leaf (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visiting_potential_leaf", 1, 2, 2, 1); __PYX_ERR(0, 567, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visiting_potential_leaf") < 0)) __PYX_ERR(0, 567, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visiting_potential_leaf", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 567, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionReplacementVisitor.visiting_potential_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_4visiting_potential_leaf(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_4visiting_potential_leaf(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("visiting_potential_leaf", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":583
+ * Otherwise, ``value`` is a cloned node.
+ * """
+ * raise RuntimeError("The visiting_potential_leaf method needs to be defined.") # <<<<<<<<<<<<<<
+ *
+ * def finalize(self, ans):
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 583, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":567
+ * return node
+ *
+ * def visiting_potential_leaf(self, node): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Visit a node and return a cloned node if it is a leaf.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionReplacementVisitor.visiting_potential_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":585
+ * raise RuntimeError("The visiting_potential_leaf method needs to be defined.")
+ *
+ * def finalize(self, ans): # <<<<<<<<<<<<<<
+ * """
+ * This method defines the return value for the search methods
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_7finalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_6finalize[] = "\n This method defines the return value for the search methods\n in this class.\n\n The default implementation returns the value of the\n initial node (aka the root node), because\n this visitor pattern computes and returns value for each\n node to enable the computation of this value.\n\n Args:\n ans: The final value computed by the search method.\n\n Returns:\n The final value after the search. Defaults to simply\n returning :attr:`ans`.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_7finalize = {"finalize", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_7finalize, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_6finalize};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_7finalize(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_ans = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_ans,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ans)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("finalize", 1, 2, 2, 1); __PYX_ERR(0, 585, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "finalize") < 0)) __PYX_ERR(0, 585, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_ans = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("finalize", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 585, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionReplacementVisitor.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_6finalize(__pyx_self, __pyx_v_self, __pyx_v_ans);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_6finalize(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_ans) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("finalize", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":602
+ * returning :attr:`ans`.
+ * """
+ * return ans # <<<<<<<<<<<<<<
+ *
+ * def construct_node(self, node, values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_ans);
+ __pyx_r = __pyx_v_ans;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":585
+ * raise RuntimeError("The visiting_potential_leaf method needs to be defined.")
+ *
+ * def finalize(self, ans): # <<<<<<<<<<<<<<
+ * """
+ * This method defines the return value for the search methods
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":604
+ * return ans
+ *
+ * def construct_node(self, node, values): # <<<<<<<<<<<<<<
+ * """
+ * Call the expression construct_node() method.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_9construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_8construct_node[] = "\n Call the expression construct_node() method.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_9construct_node = {"construct_node", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_9construct_node, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_8construct_node};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_9construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("construct_node (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,&__pyx_n_s_values,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 1); __PYX_ERR(0, 604, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 2); __PYX_ERR(0, 604, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "construct_node") < 0)) __PYX_ERR(0, 604, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ __pyx_v_values = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 604, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionReplacementVisitor.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_8construct_node(__pyx_self, __pyx_v_self, __pyx_v_node, __pyx_v_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_8construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("construct_node", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":608
+ * Call the expression construct_node() method.
+ * """
+ * return node.construct_node( tuple(values), self.memo ) # <<<<<<<<<<<<<<
+ *
+ * def dfs_postorder_stack(self, node):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_construct_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 608, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_memo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 608, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 608, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":604
+ * return ans
+ *
+ * def construct_node(self, node, values): # <<<<<<<<<<<<<<
+ * """
+ * Call the expression construct_node() method.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionReplacementVisitor.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":610
+ * return node.construct_node( tuple(values), self.memo )
+ *
+ * def dfs_postorder_stack(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Perform a depth-first search in postorder using a stack
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_11dfs_postorder_stack(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_10dfs_postorder_stack[] = "\n Perform a depth-first search in postorder using a stack\n implementation.\n\n This method replaces subtrees. This method detects if the\n :func:`visit` method returns a different object. If so, then\n the node has been replaced and search process is adapted\n to replace all subsequent parent nodes in the tree.\n\n Note:\n This method has the same functionality as the \n PyUtilib :class:`ValueVisitor.dfs_postorder_stack `\n method that is tailored to support the\n replacement of sub-trees in a Pyomo expression tree.\n\n Args:\n node: The root node of the expression tree\n that is searched.\n\n Returns:\n The return value is determined by the :func:`finalize` function,\n which may be defined by the user.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_11dfs_postorder_stack = {"dfs_postorder_stack", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_11dfs_postorder_stack, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_10dfs_postorder_stack};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_11dfs_postorder_stack(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("dfs_postorder_stack (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("dfs_postorder_stack", 1, 2, 2, 1); __PYX_ERR(0, 610, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "dfs_postorder_stack") < 0)) __PYX_ERR(0, 610, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("dfs_postorder_stack", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 610, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionReplacementVisitor.dfs_postorder_stack", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_10dfs_postorder_stack(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_10dfs_postorder_stack(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_v_flag = NULL;
+ PyObject *__pyx_v_value = NULL;
+ PyObject *__pyx_v__stack = NULL;
+ PyObject *__pyx_v__obj = NULL;
+ PyObject *__pyx_v__argList = NULL;
+ PyObject *__pyx_v__idx = NULL;
+ PyObject *__pyx_v__len = NULL;
+ PyObject *__pyx_v__result = NULL;
+ PyObject *__pyx_v__sub = NULL;
+ PyObject *__pyx_v_ans = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ int __pyx_t_11;
+ int __pyx_t_12;
+ __Pyx_RefNannySetupContext("dfs_postorder_stack", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":634
+ * which may be defined by the user.
+ * """
+ * flag, value = self.visiting_potential_leaf(node) # <<<<<<<<<<<<<<
+ * if flag:
+ * return value
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_visiting_potential_leaf); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_node};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_node};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_node);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 634, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ #else
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 634, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 634, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_2 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ index = 1; __pyx_t_4 = __pyx_t_5(__pyx_t_3); if (unlikely(!__pyx_t_4)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_3), 2) < 0) __PYX_ERR(0, 634, __pyx_L1_error)
+ __pyx_t_5 = NULL;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L4_unpacking_done;
+ __pyx_L3_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 634, __pyx_L1_error)
+ __pyx_L4_unpacking_done:;
+ }
+ __pyx_v_flag = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __pyx_v_value = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":635
+ * """
+ * flag, value = self.visiting_potential_leaf(node)
+ * if flag: # <<<<<<<<<<<<<<
+ * return value
+ * #_stack = [ (node, self.children(node), 0, len(self.children(node)), [])]
+ */
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 635, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":636
+ * flag, value = self.visiting_potential_leaf(node)
+ * if flag:
+ * return value # <<<<<<<<<<<<<<
+ * #_stack = [ (node, self.children(node), 0, len(self.children(node)), [])]
+ * _stack = [ (node, node._args_, 0, node.nargs(), [False])]
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_value);
+ __pyx_r = __pyx_v_value;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":635
+ * """
+ * flag, value = self.visiting_potential_leaf(node)
+ * if flag: # <<<<<<<<<<<<<<
+ * return value
+ * #_stack = [ (node, self.children(node), 0, len(self.children(node)), [])]
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":638
+ * return value
+ * #_stack = [ (node, self.children(node), 0, len(self.children(node)), [])]
+ * _stack = [ (node, node._args_, 0, node.nargs(), [False])] # <<<<<<<<<<<<<<
+ * #
+ * # Iterate until the stack is empty
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_nargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 638, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(Py_False);
+ __Pyx_GIVEREF(Py_False);
+ PyList_SET_ITEM(__pyx_t_2, 0, Py_False);
+ __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_node);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_int_0);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_2);
+ __pyx_t_1 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_v__stack = ((PyObject*)__pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":644
+ * # Note: 1 is faster than True for Python 2.x
+ * #
+ * while 1: # <<<<<<<<<<<<<<
+ * #
+ * # Get the top of the stack
+ */
+ while (1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":653
+ * # _result The 'dirty' flag followed by return values
+ * #
+ * _obj, _argList, _idx, _len, _result = _stack.pop() # <<<<<<<<<<<<<<
+ * #
+ * # Iterate through the arguments
+ */
+ __pyx_t_2 = __Pyx_PyList_Pop(__pyx_v__stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+ PyObject* sequence = __pyx_t_2;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 5)) {
+ if (size > 5) __Pyx_RaiseTooManyValuesError(5);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 653, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 2);
+ __pyx_t_7 = PyTuple_GET_ITEM(sequence, 3);
+ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 4);
+ } else {
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 2);
+ __pyx_t_7 = PyList_GET_ITEM(sequence, 3);
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 4);
+ }
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_8);
+ #else
+ {
+ Py_ssize_t i;
+ PyObject** temps[5] = {&__pyx_t_3,&__pyx_t_4,&__pyx_t_1,&__pyx_t_7,&__pyx_t_8};
+ for (i=0; i < 5; i++) {
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 653, __pyx_L1_error)
+ __Pyx_GOTREF(item);
+ *(temps[i]) = item;
+ }
+ }
+ #endif
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ PyObject** temps[5] = {&__pyx_t_3,&__pyx_t_4,&__pyx_t_1,&__pyx_t_7,&__pyx_t_8};
+ __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 653, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = Py_TYPE(__pyx_t_9)->tp_iternext;
+ for (index=0; index < 5; index++) {
+ PyObject* item = __pyx_t_5(__pyx_t_9); if (unlikely(!item)) goto __pyx_L8_unpacking_failed;
+ __Pyx_GOTREF(item);
+ *(temps[index]) = item;
+ }
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_9), 5) < 0) __PYX_ERR(0, 653, __pyx_L1_error)
+ __pyx_t_5 = NULL;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ goto __pyx_L9_unpacking_done;
+ __pyx_L8_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_5 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 653, __pyx_L1_error)
+ __pyx_L9_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v__obj, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __Pyx_XDECREF_SET(__pyx_v__argList, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __Pyx_XDECREF_SET(__pyx_v__idx, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __Pyx_XDECREF_SET(__pyx_v__len, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __Pyx_XDECREF_SET(__pyx_v__result, __pyx_t_8);
+ __pyx_t_8 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":657
+ * # Iterate through the arguments
+ * #
+ * while _idx < _len: # <<<<<<<<<<<<<<
+ * _sub = _argList[_idx]
+ * _idx += 1
+ */
+ while (1) {
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v__idx, __pyx_v__len, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 657, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (!__pyx_t_6) break;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":658
+ * #
+ * while _idx < _len:
+ * _sub = _argList[_idx] # <<<<<<<<<<<<<<
+ * _idx += 1
+ * flag, value = self.visiting_potential_leaf(_sub)
+ */
+ __pyx_t_2 = PyObject_GetItem(__pyx_v__argList, __pyx_v__idx); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 658, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_XDECREF_SET(__pyx_v__sub, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":659
+ * while _idx < _len:
+ * _sub = _argList[_idx]
+ * _idx += 1 # <<<<<<<<<<<<<<
+ * flag, value = self.visiting_potential_leaf(_sub)
+ * if flag:
+ */
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v__idx, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v__idx, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":660
+ * _sub = _argList[_idx]
+ * _idx += 1
+ * flag, value = self.visiting_potential_leaf(_sub) # <<<<<<<<<<<<<<
+ * if flag:
+ * if id(value) != id(_sub):
+ */
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_visiting_potential_leaf); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 660, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v__sub); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v__sub};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v__sub};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(__pyx_v__sub);
+ __Pyx_GIVEREF(__pyx_v__sub);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v__sub);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 660, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+ PyObject* sequence = __pyx_t_2;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 660, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_1);
+ #else
+ __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 660, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 660, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 660, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = Py_TYPE(__pyx_t_7)->tp_iternext;
+ index = 0; __pyx_t_8 = __pyx_t_5(__pyx_t_7); if (unlikely(!__pyx_t_8)) goto __pyx_L12_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_8);
+ index = 1; __pyx_t_1 = __pyx_t_5(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L12_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_7), 2) < 0) __PYX_ERR(0, 660, __pyx_L1_error)
+ __pyx_t_5 = NULL;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L13_unpacking_done;
+ __pyx_L12_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_5 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 660, __pyx_L1_error)
+ __pyx_L13_unpacking_done:;
+ }
+ __Pyx_DECREF_SET(__pyx_v_flag, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __Pyx_DECREF_SET(__pyx_v_value, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":661
+ * _idx += 1
+ * flag, value = self.visiting_potential_leaf(_sub)
+ * if flag: # <<<<<<<<<<<<<<
+ * if id(value) != id(_sub):
+ * _result[0] = True
+ */
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_flag); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 661, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":662
+ * flag, value = self.visiting_potential_leaf(_sub)
+ * if flag:
+ * if id(value) != id(_sub): # <<<<<<<<<<<<<<
+ * _result[0] = True
+ * _result.append( value )
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_value);
+ __Pyx_GIVEREF(__pyx_v_value);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_value);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v__sub);
+ __Pyx_GIVEREF(__pyx_v__sub);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__sub);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 662, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_8, Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 662, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":663
+ * if flag:
+ * if id(value) != id(_sub):
+ * _result[0] = True # <<<<<<<<<<<<<<
+ * _result.append( value )
+ * else:
+ */
+ if (unlikely(__Pyx_SetItemInt(__pyx_v__result, 0, Py_True, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 663, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":662
+ * flag, value = self.visiting_potential_leaf(_sub)
+ * if flag:
+ * if id(value) != id(_sub): # <<<<<<<<<<<<<<
+ * _result[0] = True
+ * _result.append( value )
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":664
+ * if id(value) != id(_sub):
+ * _result[0] = True
+ * _result.append( value ) # <<<<<<<<<<<<<<
+ * else:
+ * #
+ */
+ __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v__result, __pyx_v_value); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 664, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":661
+ * _idx += 1
+ * flag, value = self.visiting_potential_leaf(_sub)
+ * if flag: # <<<<<<<<<<<<<<
+ * if id(value) != id(_sub):
+ * _result[0] = True
+ */
+ goto __pyx_L14;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":669
+ * # Push an expression onto the stack
+ * #
+ * _stack.append( (_obj, _argList, _idx, _len, _result) ) # <<<<<<<<<<<<<<
+ * _obj = _sub
+ * #_argList = self.children(_sub)
+ */
+ /*else*/ {
+ __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v__obj);
+ __Pyx_GIVEREF(__pyx_v__obj);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__obj);
+ __Pyx_INCREF(__pyx_v__argList);
+ __Pyx_GIVEREF(__pyx_v__argList);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v__argList);
+ __Pyx_INCREF(__pyx_v__idx);
+ __Pyx_GIVEREF(__pyx_v__idx);
+ PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v__idx);
+ __Pyx_INCREF(__pyx_v__len);
+ __Pyx_GIVEREF(__pyx_v__len);
+ PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_v__len);
+ __Pyx_INCREF(__pyx_v__result);
+ __Pyx_GIVEREF(__pyx_v__result);
+ PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_v__result);
+ __pyx_t_10 = __Pyx_PyList_Append(__pyx_v__stack, __pyx_t_2); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 669, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":670
+ * #
+ * _stack.append( (_obj, _argList, _idx, _len, _result) )
+ * _obj = _sub # <<<<<<<<<<<<<<
+ * #_argList = self.children(_sub)
+ * _argList = _sub._args_
+ */
+ __Pyx_INCREF(__pyx_v__sub);
+ __Pyx_DECREF_SET(__pyx_v__obj, __pyx_v__sub);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":672
+ * _obj = _sub
+ * #_argList = self.children(_sub)
+ * _argList = _sub._args_ # <<<<<<<<<<<<<<
+ * _idx = 0
+ * _len = _sub.nargs()
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__sub, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v__argList, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":673
+ * #_argList = self.children(_sub)
+ * _argList = _sub._args_
+ * _idx = 0 # <<<<<<<<<<<<<<
+ * _len = _sub.nargs()
+ * _result = [False]
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_DECREF_SET(__pyx_v__idx, __pyx_int_0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":674
+ * _argList = _sub._args_
+ * _idx = 0
+ * _len = _sub.nargs() # <<<<<<<<<<<<<<
+ * _result = [False]
+ * #
+ */
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v__sub, __pyx_n_s_nargs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 674, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF_SET(__pyx_v__len, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":675
+ * _idx = 0
+ * _len = _sub.nargs()
+ * _result = [False] # <<<<<<<<<<<<<<
+ * #
+ * # Process the current node
+ */
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 675, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(Py_False);
+ __Pyx_GIVEREF(Py_False);
+ PyList_SET_ITEM(__pyx_t_2, 0, Py_False);
+ __Pyx_DECREF_SET(__pyx_v__result, __pyx_t_2);
+ __pyx_t_2 = 0;
+ }
+ __pyx_L14:;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":684
+ * # call the ExpressionReplacementVisitor.visit() function.
+ * #
+ * ans = self.visit(_obj, _result[1:]) # <<<<<<<<<<<<<<
+ * if _result[0] and id(ans) == id(_obj):
+ * ans = self.construct_node(_obj, _result[1:])
+ */
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_visit); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 684, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = __Pyx_PyObject_GetSlice(__pyx_v__result, 1, 0, NULL, NULL, &__pyx_slice__5, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 684, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v__obj, __pyx_t_1};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v__obj, __pyx_t_1};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 684, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v__obj);
+ __Pyx_GIVEREF(__pyx_v__obj);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_11, __pyx_v__obj);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_11, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 684, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_ans, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":685
+ * #
+ * ans = self.visit(_obj, _result[1:])
+ * if _result[0] and id(ans) == id(_obj): # <<<<<<<<<<<<<<
+ * ans = self.construct_node(_obj, _result[1:])
+ * if _stack:
+ */
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v__result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 685, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_12) {
+ } else {
+ __pyx_t_6 = __pyx_t_12;
+ goto __pyx_L17_bool_binop_done;
+ }
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_ans);
+ __Pyx_GIVEREF(__pyx_v_ans);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ans);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 685, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v__obj);
+ __Pyx_GIVEREF(__pyx_v__obj);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__obj);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 685, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_RichCompare(__pyx_t_8, __pyx_t_4, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 685, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 685, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_6 = __pyx_t_12;
+ __pyx_L17_bool_binop_done:;
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":686
+ * ans = self.visit(_obj, _result[1:])
+ * if _result[0] and id(ans) == id(_obj):
+ * ans = self.construct_node(_obj, _result[1:]) # <<<<<<<<<<<<<<
+ * if _stack:
+ * if _result[0]:
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_construct_node); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = __Pyx_PyObject_GetSlice(__pyx_v__result, 1, 0, NULL, NULL, &__pyx_slice__6, 1, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v__obj, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v__obj, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_1) {
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v__obj);
+ __Pyx_GIVEREF(__pyx_v__obj);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_11, __pyx_v__obj);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_11, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF_SET(__pyx_v_ans, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":685
+ * #
+ * ans = self.visit(_obj, _result[1:])
+ * if _result[0] and id(ans) == id(_obj): # <<<<<<<<<<<<<<
+ * ans = self.construct_node(_obj, _result[1:])
+ * if _stack:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":687
+ * if _result[0] and id(ans) == id(_obj):
+ * ans = self.construct_node(_obj, _result[1:])
+ * if _stack: # <<<<<<<<<<<<<<
+ * if _result[0]:
+ * _stack[-1][-1][0] = True
+ */
+ __pyx_t_6 = (__pyx_v__stack != Py_None) && (PyList_GET_SIZE(__pyx_v__stack) != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":688
+ * ans = self.construct_node(_obj, _result[1:])
+ * if _stack:
+ * if _result[0]: # <<<<<<<<<<<<<<
+ * _stack[-1][-1][0] = True
+ * #
+ */
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v__result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 688, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 688, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":689
+ * if _stack:
+ * if _result[0]:
+ * _stack[-1][-1][0] = True # <<<<<<<<<<<<<<
+ * #
+ * # "return" the recursion by putting the return value on the end of the results stack
+ */
+ __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v__stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 689, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_2, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 689, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(__Pyx_SetItemInt(__pyx_t_4, 0, Py_True, long, 1, __Pyx_PyInt_From_long, 0, 0, 1) < 0)) __PYX_ERR(0, 689, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":688
+ * ans = self.construct_node(_obj, _result[1:])
+ * if _stack:
+ * if _result[0]: # <<<<<<<<<<<<<<
+ * _stack[-1][-1][0] = True
+ * #
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":693
+ * # "return" the recursion by putting the return value on the end of the results stack
+ * #
+ * _stack[-1][-1].append( ans ) # <<<<<<<<<<<<<<
+ * else:
+ * return self.finalize(ans)
+ */
+ __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v__stack, -1L, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 693, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 693, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_2, __pyx_v_ans); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 693, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":687
+ * if _result[0] and id(ans) == id(_obj):
+ * ans = self.construct_node(_obj, _result[1:])
+ * if _stack: # <<<<<<<<<<<<<<
+ * if _result[0]:
+ * _stack[-1][-1][0] = True
+ */
+ goto __pyx_L19;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":695
+ * _stack[-1][-1].append( ans )
+ * else:
+ * return self.finalize(ans) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_finalize); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 695, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_ans); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_ans};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_ans};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 695, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(__pyx_v_ans);
+ __Pyx_GIVEREF(__pyx_v_ans);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v_ans);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 695, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+ __pyx_L19:;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":610
+ * return node.construct_node( tuple(values), self.memo )
+ *
+ * def dfs_postorder_stack(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Perform a depth-first search in postorder using a stack
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionReplacementVisitor.dfs_postorder_stack", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_flag);
+ __Pyx_XDECREF(__pyx_v_value);
+ __Pyx_XDECREF(__pyx_v__stack);
+ __Pyx_XDECREF(__pyx_v__obj);
+ __Pyx_XDECREF(__pyx_v__argList);
+ __Pyx_XDECREF(__pyx_v__idx);
+ __Pyx_XDECREF(__pyx_v__len);
+ __Pyx_XDECREF(__pyx_v__result);
+ __Pyx_XDECREF(__pyx_v__sub);
+ __Pyx_XDECREF(__pyx_v_ans);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":711
+ * class _CloneVisitor(ExpressionValueVisitor):
+ *
+ * def __init__(self, clone_leaves=False, memo=None): # <<<<<<<<<<<<<<
+ * self.clone_leaves = clone_leaves
+ * self.memo = memo
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_clone_leaves = 0;
+ PyObject *__pyx_v_memo = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_clone_leaves,&__pyx_n_s_memo,0};
+ PyObject* values[3] = {0,0,0};
+ values[1] = ((PyObject *)((PyObject *)Py_False));
+ values[2] = ((PyObject *)((PyObject *)Py_None));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_clone_leaves);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memo);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 711, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_clone_leaves = values[1];
+ __pyx_v_memo = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 711, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._CloneVisitor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor___init__(__pyx_self, __pyx_v_self, __pyx_v_clone_leaves, __pyx_v_memo);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_clone_leaves, PyObject *__pyx_v_memo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":712
+ *
+ * def __init__(self, clone_leaves=False, memo=None):
+ * self.clone_leaves = clone_leaves # <<<<<<<<<<<<<<
+ * self.memo = memo
+ *
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_clone_leaves, __pyx_v_clone_leaves) < 0) __PYX_ERR(0, 712, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":713
+ * def __init__(self, clone_leaves=False, memo=None):
+ * self.clone_leaves = clone_leaves
+ * self.memo = memo # <<<<<<<<<<<<<<
+ *
+ * def visit(self, node, values):
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_memo, __pyx_v_memo) < 0) __PYX_ERR(0, 713, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":711
+ * class _CloneVisitor(ExpressionValueVisitor):
+ *
+ * def __init__(self, clone_leaves=False, memo=None): # <<<<<<<<<<<<<<
+ * self.clone_leaves = clone_leaves
+ * self.memo = memo
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._CloneVisitor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":715
+ * self.memo = memo
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node.construct_node( tuple(values), self.memo )
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_3visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_2visit[] = " Visit nodes that have been expanded ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_3visit = {"visit", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_3visit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_2visit};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_3visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,&__pyx_n_s_values,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, 1); __PYX_ERR(0, 715, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, 2); __PYX_ERR(0, 715, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visit") < 0)) __PYX_ERR(0, 715, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ __pyx_v_values = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 715, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._CloneVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_2visit(__pyx_self, __pyx_v_self, __pyx_v_node, __pyx_v_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_2visit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("visit", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":717
+ * def visit(self, node, values):
+ * """ Visit nodes that have been expanded """
+ * return node.construct_node( tuple(values), self.memo ) # <<<<<<<<<<<<<<
+ *
+ * def visiting_potential_leaf(self, node):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_construct_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 717, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_v_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 717, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_memo); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 717, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 717, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 717, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":715
+ * self.memo = memo
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node.construct_node( tuple(values), self.memo )
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._CloneVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":719
+ * return node.construct_node( tuple(values), self.memo )
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_5visiting_potential_leaf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_4visiting_potential_leaf[] = " \n Visiting a potential leaf.\n\n Return True if the node is not expanded.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_5visiting_potential_leaf = {"visiting_potential_leaf", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_5visiting_potential_leaf, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_4visiting_potential_leaf};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_5visiting_potential_leaf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visiting_potential_leaf (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visiting_potential_leaf", 1, 2, 2, 1); __PYX_ERR(0, 719, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visiting_potential_leaf") < 0)) __PYX_ERR(0, 719, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visiting_potential_leaf", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 719, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._CloneVisitor.visiting_potential_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_4visiting_potential_leaf(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_4visiting_potential_leaf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ __Pyx_RefNannySetupContext("visiting_potential_leaf", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":725
+ * Return True if the node is not expanded.
+ * """
+ * if node.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * #
+ * # Store a native or numeric object
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 725, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":729
+ * # Store a native or numeric object
+ * #
+ * return True, deepcopy(node, self.memo) # <<<<<<<<<<<<<<
+ *
+ * if not node.is_expression_type():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_deepcopy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_memo); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 729, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_node, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_node, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 729, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_node);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 729, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 729, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, Py_True);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":725
+ * Return True if the node is not expanded.
+ * """
+ * if node.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * #
+ * # Store a native or numeric object
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":731
+ * return True, deepcopy(node, self.memo)
+ *
+ * if not node.is_expression_type(): # <<<<<<<<<<<<<<
+ * #
+ * # Store a leave object that is cloned
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 731, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 731, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":735
+ * # Store a leave object that is cloned
+ * #
+ * if self.clone_leaves: # <<<<<<<<<<<<<<
+ * return True, deepcopy(node, self.memo)
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_clone_leaves); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 735, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 735, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":736
+ * #
+ * if self.clone_leaves:
+ * return True, deepcopy(node, self.memo) # <<<<<<<<<<<<<<
+ * else:
+ * return True, node
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_deepcopy); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_memo); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_node, __pyx_t_8};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_node, __pyx_t_8};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_node);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, Py_True);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":735
+ * # Store a leave object that is cloned
+ * #
+ * if self.clone_leaves: # <<<<<<<<<<<<<<
+ * return True, deepcopy(node, self.memo)
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":738
+ * return True, deepcopy(node, self.memo)
+ * else:
+ * return True, node # <<<<<<<<<<<<<<
+ *
+ * if not self.clone_leaves and node.is_named_expression_type():
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, Py_True);
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_node);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":731
+ * return True, deepcopy(node, self.memo)
+ *
+ * if not node.is_expression_type(): # <<<<<<<<<<<<<<
+ * #
+ * # Store a leave object that is cloned
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":740
+ * return True, node
+ *
+ * if not self.clone_leaves and node.is_named_expression_type(): # <<<<<<<<<<<<<<
+ * #
+ * # If we are not cloning leaves, then
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_clone_leaves); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 740, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_9 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_9) {
+ } else {
+ __pyx_t_3 = __pyx_t_9;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_named_expression_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 740, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 740, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __pyx_t_9;
+ __pyx_L7_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":746
+ * # named expression.
+ * #
+ * return True, node # <<<<<<<<<<<<<<
+ *
+ * return False, None
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, Py_True);
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_node);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":740
+ * return True, node
+ *
+ * if not self.clone_leaves and node.is_named_expression_type(): # <<<<<<<<<<<<<<
+ * #
+ * # If we are not cloning leaves, then
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":748
+ * return True, node
+ *
+ * return False, None # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_tuple__7);
+ __pyx_r = __pyx_tuple__7;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":719
+ * return node.construct_node( tuple(values), self.memo )
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._CloneVisitor.visiting_potential_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":751
+ *
+ *
+ * def clone_expression(expr, memo=None, clone_leaves=True): # <<<<<<<<<<<<<<
+ * """A function that is used to clone an expression.
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_5clone_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_4clone_expression[] = "A function that is used to clone an expression.\n\n Cloning is roughly equivalent to calling ``copy.deepcopy``.\n However, the :attr:`clone_leaves` argument can be used to \n clone only interior (i.e. non-leaf) nodes in the expression\n tree. Note that named expression objects are treated as\n leaves when :attr:`clone_leaves` is :const:`True`, and hence\n those subexpressions are not cloned.\n\n This function uses a non-recursive \n logic, which makes it more scalable than the logic in \n ``copy.deepcopy``.\n\n Args:\n expr: The expression that will be cloned.\n memo (dict): A dictionary mapping object ids to \n objects. This dictionary has the same semantics as\n the memo object used with ``copy.deepcopy``. Defaults\n to None, which indicates that no user-defined\n dictionary is used.\n clone_leaves (bool): If True, then leaves are\n cloned along with the rest of the expression. \n Defaults to :const:`True`.\n \n Returns: \n The cloned expression.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_5clone_expression = {"clone_expression", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_5clone_expression, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_4clone_expression};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_5clone_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_expr = 0;
+ PyObject *__pyx_v_memo = 0;
+ PyObject *__pyx_v_clone_leaves = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("clone_expression (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_expr,&__pyx_n_s_memo,&__pyx_n_s_clone_leaves,0};
+ PyObject* values[3] = {0,0,0};
+ values[1] = ((PyObject *)Py_None);
+ values[2] = ((PyObject *)Py_True);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_expr)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memo);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_clone_leaves);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "clone_expression") < 0)) __PYX_ERR(0, 751, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_expr = values[0];
+ __pyx_v_memo = values[1];
+ __pyx_v_clone_leaves = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("clone_expression", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 751, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.clone_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_4clone_expression(__pyx_self, __pyx_v_expr, __pyx_v_memo, __pyx_v_clone_leaves);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_4clone_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_memo, PyObject *__pyx_v_clone_leaves) {
+ PyObject *__pyx_v_visitor = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("clone_expression", 0);
+ __Pyx_INCREF(__pyx_v_memo);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":779
+ * The cloned expression.
+ * """
+ * clone_counter_context._count += 1 # <<<<<<<<<<<<<<
+ * if not memo:
+ * memo = {'__block_scope__': { id(None): False }}
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_clone_counter_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_count); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 779, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_clone_counter_context); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_count, __pyx_t_1) < 0) __PYX_ERR(0, 779, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":780
+ * """
+ * clone_counter_context._count += 1
+ * if not memo: # <<<<<<<<<<<<<<
+ * memo = {'__block_scope__': { id(None): False }}
+ * #
+ */
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_memo); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 780, __pyx_L1_error)
+ __pyx_t_4 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":781
+ * clone_counter_context._count += 1
+ * if not memo:
+ * memo = {'__block_scope__': { id(None): False }} # <<<<<<<<<<<<<<
+ * #
+ * visitor = _CloneVisitor(clone_leaves=clone_leaves, memo=memo)
+ */
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 781, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 781, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_5, Py_False) < 0) __PYX_ERR(0, 781, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_block_scope, __pyx_t_1) < 0) __PYX_ERR(0, 781, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_memo, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":780
+ * """
+ * clone_counter_context._count += 1
+ * if not memo: # <<<<<<<<<<<<<<
+ * memo = {'__block_scope__': { id(None): False }}
+ * #
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":783
+ * memo = {'__block_scope__': { id(None): False }}
+ * #
+ * visitor = _CloneVisitor(clone_leaves=clone_leaves, memo=memo) # <<<<<<<<<<<<<<
+ * return visitor.dfs_postorder_stack(expr)
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_CloneVisitor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_clone_leaves, __pyx_v_clone_leaves) < 0) __PYX_ERR(0, 783, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_memo, __pyx_v_memo) < 0) __PYX_ERR(0, 783, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_visitor = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":784
+ * #
+ * visitor = _CloneVisitor(clone_leaves=clone_leaves, memo=memo)
+ * return visitor.dfs_postorder_stack(expr) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_visitor, __pyx_n_s_dfs_postorder_stack); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_expr); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_expr};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_expr};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_expr);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":751
+ *
+ *
+ * def clone_expression(expr, memo=None, clone_leaves=True): # <<<<<<<<<<<<<<
+ * """A function that is used to clone an expression.
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.clone_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_visitor);
+ __Pyx_XDECREF(__pyx_v_memo);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":793
+ * class _SizeVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * self.counter = 0
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_1__init__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor___init__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":794
+ *
+ * def __init__(self):
+ * self.counter = 0 # <<<<<<<<<<<<<<
+ *
+ * def visit(self, node):
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_int_0) < 0) __PYX_ERR(0, 794, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":793
+ * class _SizeVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * self.counter = 0
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._SizeVisitor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":796
+ * self.counter = 0
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * self.counter += 1
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_3visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_3visit = {"visit", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_3visit, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_3visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 2, 2, 1); __PYX_ERR(0, 796, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visit") < 0)) __PYX_ERR(0, 796, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 796, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._SizeVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_2visit(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_2visit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_node) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("visit", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":797
+ *
+ * def visit(self, node):
+ * self.counter += 1 # <<<<<<<<<<<<<<
+ *
+ * def finalize(self):
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 797, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 797, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_counter, __pyx_t_2) < 0) __PYX_ERR(0, 797, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":796
+ * self.counter = 0
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * self.counter += 1
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._SizeVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":799
+ * self.counter += 1
+ *
+ * def finalize(self): # <<<<<<<<<<<<<<
+ * return self.counter
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_5finalize(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_5finalize = {"finalize", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_5finalize, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_5finalize(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("finalize (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_4finalize(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_4finalize(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("finalize", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":800
+ *
+ * def finalize(self):
+ * return self.counter # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_counter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 800, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":799
+ * self.counter += 1
+ *
+ * def finalize(self): # <<<<<<<<<<<<<<
+ * return self.counter
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._SizeVisitor.finalize", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":803
+ *
+ *
+ * def _sizeof_expression(expr): # <<<<<<<<<<<<<<
+ * """
+ * Return the number of nodes in the expression tree.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7_sizeof_expression(PyObject *__pyx_self, PyObject *__pyx_v_expr); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_6_sizeof_expression[] = "\n Return the number of nodes in the expression tree.\n\n Args:\n expr: The root node of an expression tree.\n\n Returns:\n A non-negative integer that is the number of \n interior and leaf nodes in the expression tree.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7_sizeof_expression = {"_sizeof_expression", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7_sizeof_expression, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_6_sizeof_expression};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7_sizeof_expression(PyObject *__pyx_self, PyObject *__pyx_v_expr) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_sizeof_expression (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_6_sizeof_expression(__pyx_self, ((PyObject *)__pyx_v_expr));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_6_sizeof_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) {
+ PyObject *__pyx_v_visitor = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("_sizeof_expression", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":814
+ * interior and leaf nodes in the expression tree.
+ * """
+ * visitor = _SizeVisitor() # <<<<<<<<<<<<<<
+ * return visitor.xbfs(expr)
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SizeVisitor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 814, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_visitor = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":815
+ * """
+ * visitor = _SizeVisitor()
+ * return visitor.xbfs(expr) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_visitor, __pyx_n_s_xbfs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 815, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_expr};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_expr};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 815, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_expr);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 815, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":803
+ *
+ *
+ * def _sizeof_expression(expr): # <<<<<<<<<<<<<<
+ * """
+ * Return the number of nodes in the expression tree.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._sizeof_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_visitor);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":824
+ * class _EvaluationVisitor(ExpressionValueVisitor):
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node._apply_operation(values)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_1visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_visit[] = " Visit nodes that have been expanded ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_1visit = {"visit", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_1visit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_visit};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_1visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,&__pyx_n_s_values,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, 1); __PYX_ERR(0, 824, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, 2); __PYX_ERR(0, 824, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visit") < 0)) __PYX_ERR(0, 824, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ __pyx_v_values = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 824, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._EvaluationVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_visit(__pyx_self, __pyx_v_self, __pyx_v_node, __pyx_v_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_visit(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("visit", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":826
+ * def visit(self, node, values):
+ * """ Visit nodes that have been expanded """
+ * return node._apply_operation(values) # <<<<<<<<<<<<<<
+ *
+ * def visiting_potential_leaf(self, node):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_apply_operation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_values};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_values};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_values);
+ __Pyx_GIVEREF(__pyx_v_values);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_values);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":824
+ * class _EvaluationVisitor(ExpressionValueVisitor):
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node._apply_operation(values)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._EvaluationVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":828
+ * return node._apply_operation(values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_3visiting_potential_leaf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_2visiting_potential_leaf[] = " \n Visiting a potential leaf.\n\n Return True if the node is not expanded.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_3visiting_potential_leaf = {"visiting_potential_leaf", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_3visiting_potential_leaf, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_2visiting_potential_leaf};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_3visiting_potential_leaf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visiting_potential_leaf (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visiting_potential_leaf", 1, 2, 2, 1); __PYX_ERR(0, 828, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visiting_potential_leaf") < 0)) __PYX_ERR(0, 828, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visiting_potential_leaf", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 828, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._EvaluationVisitor.visiting_potential_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_2visiting_potential_leaf(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_2visiting_potential_leaf(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("visiting_potential_leaf", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":834
+ * Return True if the node is not expanded.
+ * """
+ * if node.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * return True, node
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 834, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 834, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":835
+ * """
+ * if node.__class__ in nonpyomo_leaf_types:
+ * return True, node # <<<<<<<<<<<<<<
+ *
+ * if node.is_variable_type():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, Py_True);
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_node);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":834
+ * Return True if the node is not expanded.
+ * """
+ * if node.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * return True, node
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":837
+ * return True, node
+ *
+ * if node.is_variable_type(): # <<<<<<<<<<<<<<
+ * return True, value(node)
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_variable_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 837, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 837, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 837, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":838
+ *
+ * if node.is_variable_type():
+ * return True, value(node) # <<<<<<<<<<<<<<
+ *
+ * if not node.is_expression_type():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_node};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_node};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 838, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_node);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 838, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, Py_True);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":837
+ * return True, node
+ *
+ * if node.is_variable_type(): # <<<<<<<<<<<<<<
+ * return True, value(node)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":840
+ * return True, value(node)
+ *
+ * if not node.is_expression_type(): # <<<<<<<<<<<<<<
+ * return True, value(node)
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 840, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 840, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 840, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 840, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":841
+ *
+ * if not node.is_expression_type():
+ * return True, value(node) # <<<<<<<<<<<<<<
+ *
+ * return False, None
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 841, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_node};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_node};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 841, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_node);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 841, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 841, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, Py_True);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":840
+ * return True, value(node)
+ *
+ * if not node.is_expression_type(): # <<<<<<<<<<<<<<
+ * return True, value(node)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":843
+ * return True, value(node)
+ *
+ * return False, None # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_tuple__9);
+ __pyx_r = __pyx_tuple__9;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":828
+ * return node._apply_operation(values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._EvaluationVisitor.visiting_potential_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":846
+ *
+ *
+ * def evaluate_expression(exp, exception=True): # <<<<<<<<<<<<<<
+ * """
+ * Evaluate the value of the expression.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_9evaluate_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_8evaluate_expression[] = "\n Evaluate the value of the expression.\n\n Args:\n expr: The root node of an expression tree.\n exception (bool): A flag that indicates whether \n exceptions are raised. If this flag is\n :const:`False`, then an exception that\n occurs while evaluating the expression \n is caught and the return value is :const:`None`.\n Default is :const:`True`.\n\n Returns:\n A floating point value if the expression evaluates\n normally, or :const:`None` if an exception occurs\n and is caught.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_9evaluate_expression = {"evaluate_expression", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_9evaluate_expression, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_8evaluate_expression};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_9evaluate_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_exception = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("evaluate_expression (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_exception,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)Py_True);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exception);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "evaluate_expression") < 0)) __PYX_ERR(0, 846, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_exception = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("evaluate_expression", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 846, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.evaluate_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_8evaluate_expression(__pyx_self, __pyx_v_exp, __pyx_v_exception);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_8evaluate_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_exception) {
+ PyObject *__pyx_v_visitor = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ int __pyx_t_9;
+ __Pyx_RefNannySetupContext("evaluate_expression", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":864
+ * and is caught.
+ * """
+ * try: # <<<<<<<<<<<<<<
+ * visitor = _EvaluationVisitor()
+ * return visitor.dfs_postorder_stack(exp)
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":865
+ * """
+ * try:
+ * visitor = _EvaluationVisitor() # <<<<<<<<<<<<<<
+ * return visitor.dfs_postorder_stack(exp)
+ *
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_EvaluationVisitor); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 865, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 865, __pyx_L3_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 865, __pyx_L3_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_v_visitor = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":866
+ * try:
+ * visitor = _EvaluationVisitor()
+ * return visitor.dfs_postorder_stack(exp) # <<<<<<<<<<<<<<
+ *
+ * except TemplateExpressionError: #pragma: no cover
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_visitor, __pyx_n_s_dfs_postorder_stack); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 866, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_exp); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 866, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_exp};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 866, __pyx_L3_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_exp};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 866, __pyx_L3_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 866, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_v_exp);
+ __Pyx_GIVEREF(__pyx_v_exp);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_exp);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 866, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L7_try_return;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":864
+ * and is caught.
+ * """
+ * try: # <<<<<<<<<<<<<<
+ * visitor = _EvaluationVisitor()
+ * return visitor.dfs_postorder_stack(exp)
+ */
+ }
+ __pyx_L3_error:;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":868
+ * return visitor.dfs_postorder_stack(exp)
+ *
+ * except TemplateExpressionError: #pragma: no cover # <<<<<<<<<<<<<<
+ * if exception:
+ * raise
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_TemplateExpressionError); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 868, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_8) {
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.evaluate_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_5, &__pyx_t_7) < 0) __PYX_ERR(0, 868, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":869
+ *
+ * except TemplateExpressionError: #pragma: no cover
+ * if exception: # <<<<<<<<<<<<<<
+ * raise
+ * return None
+ */
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_exception); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 869, __pyx_L5_except_error)
+ if (__pyx_t_9) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":870
+ * except TemplateExpressionError: #pragma: no cover
+ * if exception:
+ * raise # <<<<<<<<<<<<<<
+ * return None
+ * except ValueError:
+ */
+ __Pyx_GIVEREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ErrRestoreWithState(__pyx_t_4, __pyx_t_5, __pyx_t_7);
+ __pyx_t_4 = 0; __pyx_t_5 = 0; __pyx_t_7 = 0;
+ __PYX_ERR(0, 870, __pyx_L5_except_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":869
+ *
+ * except TemplateExpressionError: #pragma: no cover
+ * if exception: # <<<<<<<<<<<<<<
+ * raise
+ * return None
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":871
+ * if exception:
+ * raise
+ * return None # <<<<<<<<<<<<<<
+ * except ValueError:
+ * if exception:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L6_except_return;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":872
+ * raise
+ * return None
+ * except ValueError: # <<<<<<<<<<<<<<
+ * if exception:
+ * raise
+ */
+ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
+ if (__pyx_t_8) {
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.evaluate_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_5, &__pyx_t_4) < 0) __PYX_ERR(0, 872, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":873
+ * return None
+ * except ValueError:
+ * if exception: # <<<<<<<<<<<<<<
+ * raise
+ * return None
+ */
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_exception); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 873, __pyx_L5_except_error)
+ if (__pyx_t_9) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":874
+ * except ValueError:
+ * if exception:
+ * raise # <<<<<<<<<<<<<<
+ * return None
+ *
+ */
+ __Pyx_GIVEREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_4);
+ __Pyx_ErrRestoreWithState(__pyx_t_7, __pyx_t_5, __pyx_t_4);
+ __pyx_t_7 = 0; __pyx_t_5 = 0; __pyx_t_4 = 0;
+ __PYX_ERR(0, 874, __pyx_L5_except_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":873
+ * return None
+ * except ValueError:
+ * if exception: # <<<<<<<<<<<<<<
+ * raise
+ * return None
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":875
+ * if exception:
+ * raise
+ * return None # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L6_except_return;
+ }
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":864
+ * and is caught.
+ * """
+ * try: # <<<<<<<<<<<<<<
+ * visitor = _EvaluationVisitor()
+ * return visitor.dfs_postorder_stack(exp)
+ */
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L1_error;
+ __pyx_L7_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L0;
+ __pyx_L6_except_return:;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":846
+ *
+ *
+ * def evaluate_expression(exp, exception=True): # <<<<<<<<<<<<<<
+ * """
+ * Evaluate the value of the expression.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.evaluate_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_visitor);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":884
+ * class _ComponentVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self, types): # <<<<<<<<<<<<<<
+ * self.seen = set()
+ * if types.__class__ is set:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_types = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_types,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_types)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 884, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 884, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_types = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 884, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._ComponentVisitor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor___init__(__pyx_self, __pyx_v_self, __pyx_v_types);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_types) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":885
+ *
+ * def __init__(self, types):
+ * self.seen = set() # <<<<<<<<<<<<<<
+ * if types.__class__ is set:
+ * self.types = types
+ */
+ __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_seen, __pyx_t_1) < 0) __PYX_ERR(0, 885, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":886
+ * def __init__(self, types):
+ * self.seen = set()
+ * if types.__class__ is set: # <<<<<<<<<<<<<<
+ * self.types = types
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_types, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 886, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = (__pyx_t_1 == ((PyObject *)(&PySet_Type)));
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":887
+ * self.seen = set()
+ * if types.__class__ is set:
+ * self.types = types # <<<<<<<<<<<<<<
+ * else:
+ * self.types = set(types)
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_types, __pyx_v_types) < 0) __PYX_ERR(0, 887, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":886
+ * def __init__(self, types):
+ * self.seen = set()
+ * if types.__class__ is set: # <<<<<<<<<<<<<<
+ * self.types = types
+ * else:
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":889
+ * self.types = types
+ * else:
+ * self.types = set(types) # <<<<<<<<<<<<<<
+ *
+ * def visit(self, node):
+ */
+ /*else*/ {
+ __pyx_t_1 = PySet_New(__pyx_v_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 889, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_types, __pyx_t_1) < 0) __PYX_ERR(0, 889, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __pyx_L3:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":884
+ * class _ComponentVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self, types): # <<<<<<<<<<<<<<
+ * self.seen = set()
+ * if types.__class__ is set:
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._ComponentVisitor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":891
+ * self.types = set(types)
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * if node.__class__ in self.types:
+ * if id(node) in self.seen:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor_3visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor_3visit = {"visit", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor_3visit, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor_3visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 2, 2, 1); __PYX_ERR(0, 891, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visit") < 0)) __PYX_ERR(0, 891, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 891, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._ComponentVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor_2visit(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor_2visit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("visit", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":892
+ *
+ * def visit(self, node):
+ * if node.__class__ in self.types: # <<<<<<<<<<<<<<
+ * if id(node) in self.seen:
+ * return
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 892, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 892, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 892, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":893
+ * def visit(self, node):
+ * if node.__class__ in self.types:
+ * if id(node) in self.seen: # <<<<<<<<<<<<<<
+ * return
+ * self.seen.add(id(node))
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_node);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_seen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":894
+ * if node.__class__ in self.types:
+ * if id(node) in self.seen:
+ * return # <<<<<<<<<<<<<<
+ * self.seen.add(id(node))
+ * return node
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":893
+ * def visit(self, node):
+ * if node.__class__ in self.types:
+ * if id(node) in self.seen: # <<<<<<<<<<<<<<
+ * return
+ * self.seen.add(id(node))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":895
+ * if id(node) in self.seen:
+ * return
+ * self.seen.add(id(node)) # <<<<<<<<<<<<<<
+ * return node
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_seen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_add); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 895, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 895, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_node);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 895, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 895, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 895, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":896
+ * return
+ * self.seen.add(id(node))
+ * return node # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_node);
+ __pyx_r = __pyx_v_node;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":892
+ *
+ * def visit(self, node):
+ * if node.__class__ in self.types: # <<<<<<<<<<<<<<
+ * if id(node) in self.seen:
+ * return
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":891
+ * self.types = set(types)
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * if node.__class__ in self.types:
+ * if id(node) in self.seen:
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._ComponentVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_12generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":899
+ *
+ *
+ * def identify_components(expr, component_types): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of nodes
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_11identify_components(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_10identify_components[] = "\n A generator that yields a sequence of nodes\n in an expression tree that belong to a specified set.\n\n Args:\n expr: The root node of an expression tree.\n component_types (set or list): A set of class \n types that will be matched during the search.\n\n Yields:\n Each node that is found.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_11identify_components = {"identify_components", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_11identify_components, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_10identify_components};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_11identify_components(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_expr = 0;
+ PyObject *__pyx_v_component_types = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("identify_components (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_expr,&__pyx_n_s_component_types,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_expr)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_component_types)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("identify_components", 1, 2, 2, 1); __PYX_ERR(0, 899, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "identify_components") < 0)) __PYX_ERR(0, 899, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_expr = values[0];
+ __pyx_v_component_types = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("identify_components", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 899, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.identify_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_10identify_components(__pyx_self, __pyx_v_expr, __pyx_v_component_types);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_10identify_components(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_component_types) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("identify_components", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components *)__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components(__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 899, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_v_expr = __pyx_v_expr;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_expr);
+ __pyx_cur_scope->__pyx_v_component_types = __pyx_v_component_types;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_component_types);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_component_types);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_12generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_identify_components, __pyx_n_s_identify_components, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!gen)) __PYX_ERR(0, 899, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.identify_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_12generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ Py_ssize_t __pyx_t_5;
+ PyObject *(*__pyx_t_6)(PyObject *);
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("identify_components", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 899, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":917
+ * # in the expression.
+ * #
+ * visitor = _ComponentVisitor(component_types) # <<<<<<<<<<<<<<
+ * for v in visitor.xbfs_yield_leaves(expr):
+ * yield v
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ComponentVisitor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 917, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_component_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_component_types};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_component_types};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 917, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_component_types);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_component_types);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_cur_scope->__pyx_v_component_types);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 917, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_v_visitor = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":918
+ * #
+ * visitor = _ComponentVisitor(component_types)
+ * for v in visitor.xbfs_yield_leaves(expr): # <<<<<<<<<<<<<<
+ * yield v
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_visitor, __pyx_n_s_xbfs_yield_leaves); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_expr};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_cur_scope->__pyx_v_expr};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 918, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_cur_scope->__pyx_v_expr);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
+ __pyx_t_6 = NULL;
+ } else {
+ __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 918, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 918, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_6)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 918, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 918, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 918, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_6(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 918, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":919
+ * visitor = _ComponentVisitor(component_types)
+ * for v in visitor.xbfs_yield_leaves(expr):
+ * yield v # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_v);
+ __pyx_r = __pyx_cur_scope->__pyx_v_v;
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_2);
+ __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 919, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":918
+ * #
+ * visitor = _ComponentVisitor(component_types)
+ * for v in visitor.xbfs_yield_leaves(expr): # <<<<<<<<<<<<<<
+ * yield v
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":899
+ *
+ *
+ * def identify_components(expr, component_types): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of nodes
+ */
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("identify_components", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":928
+ * class _VariableVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * self.seen = set()
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor_1__init__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor___init__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":929
+ *
+ * def __init__(self):
+ * self.seen = set() # <<<<<<<<<<<<<<
+ *
+ * def visit(self, node):
+ */
+ __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 929, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_seen, __pyx_t_1) < 0) __PYX_ERR(0, 929, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":928
+ * class _VariableVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * self.seen = set()
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._VariableVisitor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":931
+ * self.seen = set()
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * if node.__class__ in nonpyomo_leaf_types:
+ * return
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor_3visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor_3visit = {"visit", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor_3visit, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor_3visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 2, 2, 1); __PYX_ERR(0, 931, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visit") < 0)) __PYX_ERR(0, 931, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 931, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._VariableVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor_2visit(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor_2visit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("visit", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":932
+ *
+ * def visit(self, node):
+ * if node.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * return
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 932, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 932, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 932, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":933
+ * def visit(self, node):
+ * if node.__class__ in nonpyomo_leaf_types:
+ * return # <<<<<<<<<<<<<<
+ *
+ * if node.is_variable_type():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":932
+ *
+ * def visit(self, node):
+ * if node.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * return
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":935
+ * return
+ *
+ * if node.is_variable_type(): # <<<<<<<<<<<<<<
+ * if id(node) in self.seen:
+ * return
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_variable_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 935, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 935, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 935, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":936
+ *
+ * if node.is_variable_type():
+ * if id(node) in self.seen: # <<<<<<<<<<<<<<
+ * return
+ * self.seen.add(id(node))
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_node);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 936, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_seen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 936, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 936, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":937
+ * if node.is_variable_type():
+ * if id(node) in self.seen:
+ * return # <<<<<<<<<<<<<<
+ * self.seen.add(id(node))
+ * return node
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":936
+ *
+ * if node.is_variable_type():
+ * if id(node) in self.seen: # <<<<<<<<<<<<<<
+ * return
+ * self.seen.add(id(node))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":938
+ * if id(node) in self.seen:
+ * return
+ * self.seen.add(id(node)) # <<<<<<<<<<<<<<
+ * return node
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_seen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_add); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 938, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_node);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 938, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 938, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 938, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":939
+ * return
+ * self.seen.add(id(node))
+ * return node # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_node);
+ __pyx_r = __pyx_v_node;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":935
+ * return
+ *
+ * if node.is_variable_type(): # <<<<<<<<<<<<<<
+ * if id(node) in self.seen:
+ * return
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":931
+ * self.seen = set()
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * if node.__class__ in nonpyomo_leaf_types:
+ * return
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._VariableVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_15generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":942
+ *
+ *
+ * def identify_variables(expr, include_fixed=True): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of variables
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14identify_variables(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_13identify_variables[] = "\n A generator that yields a sequence of variables \n in an expression tree.\n\n Args:\n expr: The root node of an expression tree.\n include_fixed (bool): If :const:`True`, then\n this generator will yield variables whose\n value is fixed. Defaults to :const:`True`.\n\n Yields:\n Each variable that is found.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14identify_variables = {"identify_variables", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14identify_variables, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_13identify_variables};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14identify_variables(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_expr = 0;
+ PyObject *__pyx_v_include_fixed = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("identify_variables (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_expr,&__pyx_n_s_include_fixed,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)Py_True);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_expr)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_include_fixed);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "identify_variables") < 0)) __PYX_ERR(0, 942, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_expr = values[0];
+ __pyx_v_include_fixed = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("identify_variables", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 942, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.identify_variables", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13identify_variables(__pyx_self, __pyx_v_expr, __pyx_v_include_fixed);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13identify_variables(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_include_fixed) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("identify_variables", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables *)__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables(__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 942, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_v_expr = __pyx_v_expr;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_expr);
+ __pyx_cur_scope->__pyx_v_include_fixed = __pyx_v_include_fixed;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_include_fixed);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_include_fixed);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_15generator2, (PyObject *) __pyx_cur_scope, __pyx_n_s_identify_variables, __pyx_n_s_identify_variables, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!gen)) __PYX_ERR(0, 942, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.identify_variables", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_15generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ Py_ssize_t __pyx_t_6;
+ PyObject *(*__pyx_t_7)(PyObject *);
+ int __pyx_t_8;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("identify_variables", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L7_resume_from_yield;
+ case 2: goto __pyx_L11_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 942, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":956
+ * Each variable that is found.
+ * """
+ * visitor = _VariableVisitor() # <<<<<<<<<<<<<<
+ * if include_fixed:
+ * for v in visitor.xbfs_yield_leaves(expr):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_VariableVisitor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 956, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 956, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_v_visitor = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":957
+ * """
+ * visitor = _VariableVisitor()
+ * if include_fixed: # <<<<<<<<<<<<<<
+ * for v in visitor.xbfs_yield_leaves(expr):
+ * yield v
+ */
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_cur_scope->__pyx_v_include_fixed); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 957, __pyx_L1_error)
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":958
+ * visitor = _VariableVisitor()
+ * if include_fixed:
+ * for v in visitor.xbfs_yield_leaves(expr): # <<<<<<<<<<<<<<
+ * yield v
+ * else:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_visitor, __pyx_n_s_xbfs_yield_leaves); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_expr};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_expr};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_cur_scope->__pyx_v_expr);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 958, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 958, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 958, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_7(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 958, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":959
+ * if include_fixed:
+ * for v in visitor.xbfs_yield_leaves(expr):
+ * yield v # <<<<<<<<<<<<<<
+ * else:
+ * for v in visitor.xbfs_yield_leaves(expr):
+ */
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_v);
+ __pyx_r = __pyx_cur_scope->__pyx_v_v;
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_6;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_7;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L7_resume_from_yield:;
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_2);
+ __pyx_t_6 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_7 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 959, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":958
+ * visitor = _VariableVisitor()
+ * if include_fixed:
+ * for v in visitor.xbfs_yield_leaves(expr): # <<<<<<<<<<<<<<
+ * yield v
+ * else:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":957
+ * """
+ * visitor = _VariableVisitor()
+ * if include_fixed: # <<<<<<<<<<<<<<
+ * for v in visitor.xbfs_yield_leaves(expr):
+ * yield v
+ */
+ goto __pyx_L4;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":961
+ * yield v
+ * else:
+ * for v in visitor.xbfs_yield_leaves(expr): # <<<<<<<<<<<<<<
+ * if not v.is_fixed():
+ * yield v
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_visitor, __pyx_n_s_xbfs_yield_leaves); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_cur_scope->__pyx_v_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_expr};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_cur_scope->__pyx_v_expr};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 961, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_cur_scope->__pyx_v_expr);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 961, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 961, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 961, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 961, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 961, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_7(__pyx_t_1);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 961, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":962
+ * else:
+ * for v in visitor.xbfs_yield_leaves(expr):
+ * if not v.is_fixed(): # <<<<<<<<<<<<<<
+ * yield v
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_v, __pyx_n_s_is_fixed); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 962, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 962, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 962, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":963
+ * for v in visitor.xbfs_yield_leaves(expr):
+ * if not v.is_fixed():
+ * yield v # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_v);
+ __pyx_r = __pyx_cur_scope->__pyx_v_v;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_6;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_7;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 2;
+ return __pyx_r;
+ __pyx_L11_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_6 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_7 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 963, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":962
+ * else:
+ * for v in visitor.xbfs_yield_leaves(expr):
+ * if not v.is_fixed(): # <<<<<<<<<<<<<<
+ * yield v
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":961
+ * yield v
+ * else:
+ * for v in visitor.xbfs_yield_leaves(expr): # <<<<<<<<<<<<<<
+ * if not v.is_fixed():
+ * yield v
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __pyx_L4:;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":942
+ *
+ *
+ * def identify_variables(expr, include_fixed=True): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of variables
+ */
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("identify_variables", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":972
+ * class _MutableParamVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * self.seen = set()
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor_1__init__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor___init__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":973
+ *
+ * def __init__(self):
+ * self.seen = set() # <<<<<<<<<<<<<<
+ *
+ * def visit(self, node):
+ */
+ __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 973, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_seen, __pyx_t_1) < 0) __PYX_ERR(0, 973, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":972
+ * class _MutableParamVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * self.seen = set()
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._MutableParamVisitor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":975
+ * self.seen = set()
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * if node.__class__ in nonpyomo_leaf_types:
+ * return
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor_3visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor_3visit = {"visit", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor_3visit, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor_3visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 2, 2, 1); __PYX_ERR(0, 975, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visit") < 0)) __PYX_ERR(0, 975, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 975, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._MutableParamVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor_2visit(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor_2visit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("visit", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":976
+ *
+ * def visit(self, node):
+ * if node.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * return
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 976, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 976, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 976, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":977
+ * def visit(self, node):
+ * if node.__class__ in nonpyomo_leaf_types:
+ * return # <<<<<<<<<<<<<<
+ *
+ * # TODO: Confirm that this has the right semantics
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":976
+ *
+ * def visit(self, node):
+ * if node.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * return
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":980
+ *
+ * # TODO: Confirm that this has the right semantics
+ * if not node.is_variable_type() and node.is_fixed(): # <<<<<<<<<<<<<<
+ * if id(node) in self.seen:
+ * return
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_variable_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 980, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 980, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 980, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_6 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_6) {
+ } else {
+ __pyx_t_4 = __pyx_t_6;
+ goto __pyx_L5_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_fixed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 980, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 980, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 980, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 980, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __pyx_t_6;
+ __pyx_L5_bool_binop_done:;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":981
+ * # TODO: Confirm that this has the right semantics
+ * if not node.is_variable_type() and node.is_fixed():
+ * if id(node) in self.seen: # <<<<<<<<<<<<<<
+ * return
+ * self.seen.add(id(node))
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_node);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 981, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_seen); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 981, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 981, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_6 = (__pyx_t_4 != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":982
+ * if not node.is_variable_type() and node.is_fixed():
+ * if id(node) in self.seen:
+ * return # <<<<<<<<<<<<<<
+ * self.seen.add(id(node))
+ * return node
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":981
+ * # TODO: Confirm that this has the right semantics
+ * if not node.is_variable_type() and node.is_fixed():
+ * if id(node) in self.seen: # <<<<<<<<<<<<<<
+ * return
+ * self.seen.add(id(node))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":983
+ * if id(node) in self.seen:
+ * return
+ * self.seen.add(id(node)) # <<<<<<<<<<<<<<
+ * return node
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_seen); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_add); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 983, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 983, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_node);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 983, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_7};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 983, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 983, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":984
+ * return
+ * self.seen.add(id(node))
+ * return node # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_node);
+ __pyx_r = __pyx_v_node;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":980
+ *
+ * # TODO: Confirm that this has the right semantics
+ * if not node.is_variable_type() and node.is_fixed(): # <<<<<<<<<<<<<<
+ * if id(node) in self.seen:
+ * return
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":975
+ * self.seen = set()
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * if node.__class__ in nonpyomo_leaf_types:
+ * return
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._MutableParamVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_18generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":987
+ *
+ *
+ * def identify_mutable_parameters(expr): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of mutable
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17identify_mutable_parameters(PyObject *__pyx_self, PyObject *__pyx_v_expr); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_16identify_mutable_parameters[] = "\n A generator that yields a sequence of mutable\n parameters in an expression tree.\n\n Args:\n expr: The root node of an expression tree.\n\n Yields:\n Each mutable parameter that is found.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17identify_mutable_parameters = {"identify_mutable_parameters", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17identify_mutable_parameters, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_16identify_mutable_parameters};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17identify_mutable_parameters(PyObject *__pyx_self, PyObject *__pyx_v_expr) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("identify_mutable_parameters (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16identify_mutable_parameters(__pyx_self, ((PyObject *)__pyx_v_expr));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16identify_mutable_parameters(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("identify_mutable_parameters", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters *)__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters(__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 987, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_v_expr = __pyx_v_expr;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_expr);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_18generator3, (PyObject *) __pyx_cur_scope, __pyx_n_s_identify_mutable_parameters, __pyx_n_s_identify_mutable_parameters, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!gen)) __PYX_ERR(0, 987, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.identify_mutable_parameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_18generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ Py_ssize_t __pyx_t_5;
+ PyObject *(*__pyx_t_6)(PyObject *);
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("identify_mutable_parameters", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 987, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":998
+ * Each mutable parameter that is found.
+ * """
+ * visitor = _MutableParamVisitor() # <<<<<<<<<<<<<<
+ * for v in visitor.xbfs_yield_leaves(expr):
+ * yield v
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableParamVisitor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 998, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 998, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_v_visitor = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":999
+ * """
+ * visitor = _MutableParamVisitor()
+ * for v in visitor.xbfs_yield_leaves(expr): # <<<<<<<<<<<<<<
+ * yield v
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_visitor, __pyx_n_s_xbfs_yield_leaves); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_cur_scope->__pyx_v_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_expr};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_cur_scope->__pyx_v_expr};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 999, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_cur_scope->__pyx_v_expr);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_5 = 0;
+ __pyx_t_6 = NULL;
+ } else {
+ __pyx_t_5 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 999, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 999, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_6)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 999, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_5); __Pyx_INCREF(__pyx_t_1); __pyx_t_5++; if (unlikely(0 < 0)) __PYX_ERR(0, 999, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 999, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_6(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 999, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1000
+ * visitor = _MutableParamVisitor()
+ * for v in visitor.xbfs_yield_leaves(expr):
+ * yield v # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_v);
+ __pyx_r = __pyx_cur_scope->__pyx_v_v;
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_5;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_6;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_2);
+ __pyx_t_5 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_6 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 1000, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":999
+ * """
+ * visitor = _MutableParamVisitor()
+ * for v in visitor.xbfs_yield_leaves(expr): # <<<<<<<<<<<<<<
+ * yield v
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":987
+ *
+ *
+ * def identify_mutable_parameters(expr): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of mutable
+ */
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("identify_mutable_parameters", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1009
+ * class _PolyDegreeVisitor(ExpressionValueVisitor):
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node._compute_polynomial_degree(values)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_1visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_visit[] = " Visit nodes that have been expanded ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_1visit = {"visit", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_1visit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_visit};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_1visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,&__pyx_n_s_values,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, 1); __PYX_ERR(0, 1009, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, 2); __PYX_ERR(0, 1009, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visit") < 0)) __PYX_ERR(0, 1009, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ __pyx_v_values = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1009, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._PolyDegreeVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_visit(__pyx_self, __pyx_v_self, __pyx_v_node, __pyx_v_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_visit(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("visit", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1011
+ * def visit(self, node, values):
+ * """ Visit nodes that have been expanded """
+ * return node._compute_polynomial_degree(values) # <<<<<<<<<<<<<<
+ *
+ * def visiting_potential_leaf(self, node):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_compute_polynomial_degree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1011, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_values};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_values};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1011, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_values);
+ __Pyx_GIVEREF(__pyx_v_values);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_values);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1011, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1009
+ * class _PolyDegreeVisitor(ExpressionValueVisitor):
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node._compute_polynomial_degree(values)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._PolyDegreeVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1013
+ * return node._compute_polynomial_degree(values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_3visiting_potential_leaf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_2visiting_potential_leaf[] = " \n Visiting a potential leaf.\n\n Return True if the node is not expanded.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_3visiting_potential_leaf = {"visiting_potential_leaf", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_3visiting_potential_leaf, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_2visiting_potential_leaf};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_3visiting_potential_leaf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visiting_potential_leaf (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visiting_potential_leaf", 1, 2, 2, 1); __PYX_ERR(0, 1013, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visiting_potential_leaf") < 0)) __PYX_ERR(0, 1013, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visiting_potential_leaf", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1013, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._PolyDegreeVisitor.visiting_potential_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_2visiting_potential_leaf(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_2visiting_potential_leaf(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("visiting_potential_leaf", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1019
+ * Return True if the node is not expanded.
+ * """
+ * if node.__class__ in nonpyomo_leaf_types or not node.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return True, 0
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1019, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1019, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_1 = __pyx_t_5;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1019, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1019, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1019, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = ((!__pyx_t_5) != 0);
+ __pyx_t_1 = __pyx_t_4;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1020
+ * """
+ * if node.__class__ in nonpyomo_leaf_types or not node.is_potentially_variable():
+ * return True, 0 # <<<<<<<<<<<<<<
+ *
+ * if not node.is_expression_type():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_tuple__10);
+ __pyx_r = __pyx_tuple__10;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1019
+ * Return True if the node is not expanded.
+ * """
+ * if node.__class__ in nonpyomo_leaf_types or not node.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return True, 0
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1022
+ * return True, 0
+ *
+ * if not node.is_expression_type(): # <<<<<<<<<<<<<<
+ * return True, 0 if node.is_fixed() else 1
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1022, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1022, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1022, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = ((!__pyx_t_1) != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1023
+ *
+ * if not node.is_expression_type():
+ * return True, 0 if node.is_fixed() else 1 # <<<<<<<<<<<<<<
+ *
+ * return False, None
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_fixed); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1023, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1023, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_3 = __pyx_int_0;
+ } else {
+ __Pyx_INCREF(__pyx_int_1);
+ __pyx_t_3 = __pyx_int_1;
+ }
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1023, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, Py_True);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1022
+ * return True, 0
+ *
+ * if not node.is_expression_type(): # <<<<<<<<<<<<<<
+ * return True, 0 if node.is_fixed() else 1
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1025
+ * return True, 0 if node.is_fixed() else 1
+ *
+ * return False, None # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_tuple__11);
+ __pyx_r = __pyx_tuple__11;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1013
+ * return node._compute_polynomial_degree(values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._PolyDegreeVisitor.visiting_potential_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1028
+ *
+ *
+ * def _polynomial_degree(node): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_v_node); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_19_polynomial_degree[] = "\n Return the polynomial degree of the expression.\n\n Args:\n node: The root node of an expression tree.\n\n Returns:\n A non-negative integer that is the polynomial\n degree if the expression is polynomial, or :const:`None` otherwise.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20_polynomial_degree = {"_polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20_polynomial_degree, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_19_polynomial_degree};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_polynomial_degree (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_19_polynomial_degree(__pyx_self, ((PyObject *)__pyx_v_node));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_19_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_v_visitor = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("_polynomial_degree", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1039
+ * degree if the expression is polynomial, or :const:`None` otherwise.
+ * """
+ * visitor = _PolyDegreeVisitor() # <<<<<<<<<<<<<<
+ * return visitor.dfs_postorder_stack(node)
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PolyDegreeVisitor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1039, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1039, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_visitor = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1040
+ * """
+ * visitor = _PolyDegreeVisitor()
+ * return visitor.dfs_postorder_stack(node) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_visitor, __pyx_n_s_dfs_postorder_stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1040, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_node};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_node};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1040, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_node);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1040, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1028
+ *
+ *
+ * def _polynomial_degree(node): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_visitor);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1054
+ * """
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node._is_fixed(values)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_1visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_visit[] = " Visit nodes that have been expanded ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_1visit = {"visit", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_1visit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_visit};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_1visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,&__pyx_n_s_values,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, 1); __PYX_ERR(0, 1054, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, 2); __PYX_ERR(0, 1054, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visit") < 0)) __PYX_ERR(0, 1054, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ __pyx_v_values = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1054, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._IsFixedVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_visit(__pyx_self, __pyx_v_self, __pyx_v_node, __pyx_v_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_visit(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("visit", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1056
+ * def visit(self, node, values):
+ * """ Visit nodes that have been expanded """
+ * return node._is_fixed(values) # <<<<<<<<<<<<<<
+ *
+ * def visiting_potential_leaf(self, node):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_fixed_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1056, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_values};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_values};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1056, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_values);
+ __Pyx_GIVEREF(__pyx_v_values);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_values);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1056, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1054
+ * """
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node._is_fixed(values)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._IsFixedVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1058
+ * return node._is_fixed(values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_3visiting_potential_leaf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_2visiting_potential_leaf[] = " \n Visiting a potential leaf.\n\n Return True if the node is not expanded.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_3visiting_potential_leaf = {"visiting_potential_leaf", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_3visiting_potential_leaf, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_2visiting_potential_leaf};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_3visiting_potential_leaf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visiting_potential_leaf (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visiting_potential_leaf", 1, 2, 2, 1); __PYX_ERR(0, 1058, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visiting_potential_leaf") < 0)) __PYX_ERR(0, 1058, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visiting_potential_leaf", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1058, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._IsFixedVisitor.visiting_potential_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_2visiting_potential_leaf(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_2visiting_potential_leaf(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("visiting_potential_leaf", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1064
+ * Return True if the node is not expanded.
+ * """
+ * if node.__class__ in nonpyomo_leaf_types or not node.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return True, True
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1064, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1064, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_1 = __pyx_t_5;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1064, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1064, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1064, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1064, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = ((!__pyx_t_5) != 0);
+ __pyx_t_1 = __pyx_t_4;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1065
+ * """
+ * if node.__class__ in nonpyomo_leaf_types or not node.is_potentially_variable():
+ * return True, True # <<<<<<<<<<<<<<
+ *
+ * elif not node.is_expression_type():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_tuple__12);
+ __pyx_r = __pyx_tuple__12;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1064
+ * Return True if the node is not expanded.
+ * """
+ * if node.__class__ in nonpyomo_leaf_types or not node.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return True, True
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1067
+ * return True, True
+ *
+ * elif not node.is_expression_type(): # <<<<<<<<<<<<<<
+ * return True, node.is_fixed()
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1067, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1067, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1067, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = ((!__pyx_t_1) != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1068
+ *
+ * elif not node.is_expression_type():
+ * return True, node.is_fixed() # <<<<<<<<<<<<<<
+ *
+ * return False, None
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_fixed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1068, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1068, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, Py_True);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1067
+ * return True, True
+ *
+ * elif not node.is_expression_type(): # <<<<<<<<<<<<<<
+ * return True, node.is_fixed()
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1070
+ * return True, node.is_fixed()
+ *
+ * return False, None # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_tuple__13);
+ __pyx_r = __pyx_tuple__13;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1058
+ * return node._is_fixed(values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._IsFixedVisitor.visiting_potential_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1073
+ *
+ *
+ * def _expression_is_fixed(node): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22_expression_is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_node); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_21_expression_is_fixed[] = "\n Return the polynomial degree of the expression.\n\n Args:\n node: The root node of an expression tree.\n\n Returns:\n A non-negative integer that is the polynomial\n degree if the expression is polynomial, or :const:`None` otherwise.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22_expression_is_fixed = {"_expression_is_fixed", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22_expression_is_fixed, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_21_expression_is_fixed};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22_expression_is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_expression_is_fixed (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21_expression_is_fixed(__pyx_self, ((PyObject *)__pyx_v_node));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21_expression_is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_v_visitor = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("_expression_is_fixed", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1084
+ * degree if the expression is polynomial, or :const:`None` otherwise.
+ * """
+ * visitor = _IsFixedVisitor() # <<<<<<<<<<<<<<
+ * return visitor.dfs_postorder_stack(node)
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_IsFixedVisitor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1084, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1084, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_visitor = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1085
+ * """
+ * visitor = _IsFixedVisitor()
+ * return visitor.dfs_postorder_stack(node) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_visitor, __pyx_n_s_dfs_postorder_stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_node); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_node};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_node};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_node);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1073
+ *
+ *
+ * def _expression_is_fixed(node): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._expression_is_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_visitor);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1094
+ * class _ToStringVisitor(ExpressionValueVisitor):
+ *
+ * def __init__(self, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * super(_ToStringVisitor, self).__init__()
+ * self.verbose = verbose
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_smap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[4] = {0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 1); __PYX_ERR(0, 1094, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 2); __PYX_ERR(0, 1094, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, 3); __PYX_ERR(0, 1094, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1094, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 4) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_verbose = values[1];
+ __pyx_v_smap = values[2];
+ __pyx_v_compute_values = values[3];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 4, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1094, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._ToStringVisitor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor___init__(__pyx_self, __pyx_v_self, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_verbose, PyObject *__pyx_v_smap, PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1095
+ *
+ * def __init__(self, verbose, smap, compute_values):
+ * super(_ToStringVisitor, self).__init__() # <<<<<<<<<<<<<<
+ * self.verbose = verbose
+ * self.smap = smap
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ToStringVisitor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1095, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1096
+ * def __init__(self, verbose, smap, compute_values):
+ * super(_ToStringVisitor, self).__init__()
+ * self.verbose = verbose # <<<<<<<<<<<<<<
+ * self.smap = smap
+ * self.compute_values = compute_values
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_verbose, __pyx_v_verbose) < 0) __PYX_ERR(0, 1096, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1097
+ * super(_ToStringVisitor, self).__init__()
+ * self.verbose = verbose
+ * self.smap = smap # <<<<<<<<<<<<<<
+ * self.compute_values = compute_values
+ *
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_smap, __pyx_v_smap) < 0) __PYX_ERR(0, 1097, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1098
+ * self.verbose = verbose
+ * self.smap = smap
+ * self.compute_values = compute_values # <<<<<<<<<<<<<<
+ *
+ * def visit(self, node, values):
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_compute_values, __pyx_v_compute_values) < 0) __PYX_ERR(0, 1098, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1094
+ * class _ToStringVisitor(ExpressionValueVisitor):
+ *
+ * def __init__(self, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * super(_ToStringVisitor, self).__init__()
+ * self.verbose = verbose
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._ToStringVisitor.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1100
+ * self.compute_values = compute_values
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * tmp = []
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_3visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_2visit[] = " Visit nodes that have been expanded ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_3visit = {"visit", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_3visit, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_2visit};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_3visit(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visit (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,&__pyx_n_s_values,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, 1); __PYX_ERR(0, 1100, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, 2); __PYX_ERR(0, 1100, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visit") < 0)) __PYX_ERR(0, 1100, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ __pyx_v_values = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visit", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1100, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._ToStringVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_2visit(__pyx_self, __pyx_v_self, __pyx_v_node, __pyx_v_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_2visit(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node, PyObject *__pyx_v_values) {
+ PyObject *__pyx_v_tmp = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_v_val = NULL;
+ PyObject *__pyx_v_arg = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ int __pyx_t_8;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ int __pyx_t_12;
+ int __pyx_t_13;
+ PyObject *__pyx_t_14 = NULL;
+ __Pyx_RefNannySetupContext("visit", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1102
+ * def visit(self, node, values):
+ * """ Visit nodes that have been expanded """
+ * tmp = [] # <<<<<<<<<<<<<<
+ * for i,val in enumerate(values):
+ * arg = node._args_[i]
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1102, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_tmp = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1103
+ * """ Visit nodes that have been expanded """
+ * tmp = []
+ * for i,val in enumerate(values): # <<<<<<<<<<<<<<
+ * arg = node._args_[i]
+ *
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_1 = __pyx_int_0;
+ if (likely(PyList_CheckExact(__pyx_v_values)) || PyTuple_CheckExact(__pyx_v_values)) {
+ __pyx_t_2 = __pyx_v_values; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ } else {
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_values); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1103, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1103, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_4)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1103, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1103, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ } else {
+ if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_5); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 1103, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1103, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ }
+ } else {
+ __pyx_t_5 = __pyx_t_4(__pyx_t_2);
+ if (unlikely(!__pyx_t_5)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 1103, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+ __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1103, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1);
+ __pyx_t_1 = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1104
+ * tmp = []
+ * for i,val in enumerate(values):
+ * arg = node._args_[i] # <<<<<<<<<<<<<<
+ *
+ * if arg is None:
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_args_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = PyObject_GetItem(__pyx_t_5, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1106
+ * arg = node._args_[i]
+ *
+ * if arg is None: # <<<<<<<<<<<<<<
+ * tmp.append('Undefined') # TODO: coverage
+ * elif arg.__class__ in native_numeric_types:
+ */
+ __pyx_t_7 = (__pyx_v_arg == Py_None);
+ __pyx_t_8 = (__pyx_t_7 != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1107
+ *
+ * if arg is None:
+ * tmp.append('Undefined') # TODO: coverage # <<<<<<<<<<<<<<
+ * elif arg.__class__ in native_numeric_types:
+ * tmp.append(val)
+ */
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_n_s_Undefined); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1107, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1106
+ * arg = node._args_[i]
+ *
+ * if arg is None: # <<<<<<<<<<<<<<
+ * tmp.append('Undefined') # TODO: coverage
+ * elif arg.__class__ in native_numeric_types:
+ */
+ goto __pyx_L5;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1108
+ * if arg is None:
+ * tmp.append('Undefined') # TODO: coverage
+ * elif arg.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * tmp.append(val)
+ * elif arg.__class__ in nonpyomo_leaf_types:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1108, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_7 = (__pyx_t_8 != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1109
+ * tmp.append('Undefined') # TODO: coverage
+ * elif arg.__class__ in native_numeric_types:
+ * tmp.append(val) # <<<<<<<<<<<<<<
+ * elif arg.__class__ in nonpyomo_leaf_types:
+ * tmp.append("'{0}'".format(val))
+ */
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_v_val); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1109, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1108
+ * if arg is None:
+ * tmp.append('Undefined') # TODO: coverage
+ * elif arg.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * tmp.append(val)
+ * elif arg.__class__ in nonpyomo_leaf_types:
+ */
+ goto __pyx_L5;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1110
+ * elif arg.__class__ in native_numeric_types:
+ * tmp.append(val)
+ * elif arg.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * tmp.append("'{0}'".format(val))
+ * elif arg.is_variable_type():
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1110, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_8 = (__pyx_t_7 != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1111
+ * tmp.append(val)
+ * elif arg.__class__ in nonpyomo_leaf_types:
+ * tmp.append("'{0}'".format(val)) # <<<<<<<<<<<<<<
+ * elif arg.is_variable_type():
+ * tmp.append(val)
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_val); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_val};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1111, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_val};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1111, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_INCREF(__pyx_v_val);
+ __Pyx_GIVEREF(__pyx_v_val);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_val);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_6); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1111, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1110
+ * elif arg.__class__ in native_numeric_types:
+ * tmp.append(val)
+ * elif arg.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * tmp.append("'{0}'".format(val))
+ * elif arg.is_variable_type():
+ */
+ goto __pyx_L5;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1112
+ * elif arg.__class__ in nonpyomo_leaf_types:
+ * tmp.append("'{0}'".format(val))
+ * elif arg.is_variable_type(): # <<<<<<<<<<<<<<
+ * tmp.append(val)
+ * elif not self.verbose and arg.is_expression_type() and node._precedence() < arg._precedence():
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_is_variable_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_11) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1112, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1112, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1112, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1113
+ * tmp.append("'{0}'".format(val))
+ * elif arg.is_variable_type():
+ * tmp.append(val) # <<<<<<<<<<<<<<
+ * elif not self.verbose and arg.is_expression_type() and node._precedence() < arg._precedence():
+ * tmp.append("({0})".format(val))
+ */
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_v_val); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1113, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1112
+ * elif arg.__class__ in nonpyomo_leaf_types:
+ * tmp.append("'{0}'".format(val))
+ * elif arg.is_variable_type(): # <<<<<<<<<<<<<<
+ * tmp.append(val)
+ * elif not self.verbose and arg.is_expression_type() and node._precedence() < arg._precedence():
+ */
+ goto __pyx_L5;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1114
+ * elif arg.is_variable_type():
+ * tmp.append(val)
+ * elif not self.verbose and arg.is_expression_type() and node._precedence() < arg._precedence(): # <<<<<<<<<<<<<<
+ * tmp.append("({0})".format(val))
+ * else:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_verbose); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_12 = ((!__pyx_t_7) != 0);
+ if (__pyx_t_12) {
+ } else {
+ __pyx_t_8 = __pyx_t_12;
+ goto __pyx_L6_bool_binop_done;
+ }
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_11) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1114, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_12) {
+ } else {
+ __pyx_t_8 = __pyx_t_12;
+ goto __pyx_L6_bool_binop_done;
+ }
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_precedence); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_11) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1114, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_precedence); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ }
+ }
+ if (__pyx_t_10) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1114, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = PyObject_RichCompare(__pyx_t_6, __pyx_t_5, Py_LT); __Pyx_XGOTREF(__pyx_t_11); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 1114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_8 = __pyx_t_12;
+ __pyx_L6_bool_binop_done:;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1115
+ * tmp.append(val)
+ * elif not self.verbose and arg.is_expression_type() and node._precedence() < arg._precedence():
+ * tmp.append("({0})".format(val)) # <<<<<<<<<<<<<<
+ * else:
+ * tmp.append(val)
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_2, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_val); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_val};
+ __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1115, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_val};
+ __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1115, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_v_val);
+ __Pyx_GIVEREF(__pyx_v_val);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v_val);
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_10, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_11); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1115, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1114
+ * elif arg.is_variable_type():
+ * tmp.append(val)
+ * elif not self.verbose and arg.is_expression_type() and node._precedence() < arg._precedence(): # <<<<<<<<<<<<<<
+ * tmp.append("({0})".format(val))
+ * else:
+ */
+ goto __pyx_L5;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1117
+ * tmp.append("({0})".format(val))
+ * else:
+ * tmp.append(val) # <<<<<<<<<<<<<<
+ *
+ * return node._to_string(tmp, self.verbose, self.smap, self.compute_values)
+ */
+ /*else*/ {
+ __pyx_t_9 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_v_val); if (unlikely(__pyx_t_9 == ((int)-1))) __PYX_ERR(0, 1117, __pyx_L1_error)
+ }
+ __pyx_L5:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1103
+ * """ Visit nodes that have been expanded """
+ * tmp = []
+ * for i,val in enumerate(values): # <<<<<<<<<<<<<<
+ * arg = node._args_[i]
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1119
+ * tmp.append(val)
+ *
+ * return node._to_string(tmp, self.verbose, self.smap, self.compute_values) # <<<<<<<<<<<<<<
+ *
+ * def visiting_potential_leaf(self, node):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_to_string_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_verbose); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_smap); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compute_values); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_6 = NULL;
+ __pyx_t_13 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_tmp, __pyx_t_11, __pyx_t_5, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[5] = {__pyx_t_6, __pyx_v_tmp, __pyx_t_11, __pyx_t_5, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 4+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(4+__pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_tmp);
+ __Pyx_GIVEREF(__pyx_v_tmp);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_13, __pyx_v_tmp);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_13, __pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_14, 2+__pyx_t_13, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_14, 3+__pyx_t_13, __pyx_t_10);
+ __pyx_t_11 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_10 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1100
+ * self.compute_values = compute_values
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * tmp = []
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._ToStringVisitor.visit", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_tmp);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XDECREF(__pyx_v_val);
+ __Pyx_XDECREF(__pyx_v_arg);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1121
+ * return node._to_string(tmp, self.verbose, self.smap, self.compute_values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_5visiting_potential_leaf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_4visiting_potential_leaf[] = " \n Visiting a potential leaf.\n\n Return True if the node is not expanded.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_5visiting_potential_leaf = {"visiting_potential_leaf", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_5visiting_potential_leaf, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_4visiting_potential_leaf};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_5visiting_potential_leaf(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_node = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("visiting_potential_leaf (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_node,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_node)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("visiting_potential_leaf", 1, 2, 2, 1); __PYX_ERR(0, 1121, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "visiting_potential_leaf") < 0)) __PYX_ERR(0, 1121, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_node = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("visiting_potential_leaf", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1121, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._ToStringVisitor.visiting_potential_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_4visiting_potential_leaf(__pyx_self, __pyx_v_self, __pyx_v_node);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_4visiting_potential_leaf(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_node) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("visiting_potential_leaf", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1127
+ * Return True if the node is not expanded.
+ * """
+ * if node is None: # <<<<<<<<<<<<<<
+ * return True, None # TODO: coverage
+ *
+ */
+ __pyx_t_1 = (__pyx_v_node == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1128
+ * """
+ * if node is None:
+ * return True, None # TODO: coverage # <<<<<<<<<<<<<<
+ *
+ * if node.__class__ in nonpyomo_leaf_types:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_tuple__14);
+ __pyx_r = __pyx_tuple__14;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1127
+ * Return True if the node is not expanded.
+ * """
+ * if node is None: # <<<<<<<<<<<<<<
+ * return True, None # TODO: coverage
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1130
+ * return True, None # TODO: coverage
+ *
+ * if node.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * return True, str(node)
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1130, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1131
+ *
+ * if node.__class__ in nonpyomo_leaf_types:
+ * return True, str(node) # <<<<<<<<<<<<<<
+ *
+ * if node.is_variable_type():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_node);
+ __Pyx_GIVEREF(__pyx_v_node);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_node);
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, Py_True);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1130
+ * return True, None # TODO: coverage
+ *
+ * if node.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * return True, str(node)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1133
+ * return True, str(node)
+ *
+ * if node.is_variable_type(): # <<<<<<<<<<<<<<
+ * if not node.fixed:
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=False)
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_variable_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1133, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1133, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1133, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1133, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1134
+ *
+ * if node.is_variable_type():
+ * if not node.fixed: # <<<<<<<<<<<<<<
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=False)
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=self.compute_values)
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_fixed); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1134, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_2 = ((!__pyx_t_1) != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1135
+ * if node.is_variable_type():
+ * if not node.fixed:
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=False) # <<<<<<<<<<<<<<
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=self.compute_values)
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_to_string); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_verbose); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_verbose, __pyx_t_5) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_smap); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_smap, __pyx_t_5) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_compute_values, Py_False) < 0) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1135, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, Py_True);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1134
+ *
+ * if node.is_variable_type():
+ * if not node.fixed: # <<<<<<<<<<<<<<
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=False)
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=self.compute_values)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1136
+ * if not node.fixed:
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=False)
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=self.compute_values) # <<<<<<<<<<<<<<
+ *
+ * if not node.is_expression_type():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_to_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_verbose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_verbose, __pyx_t_4) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_smap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_smap, __pyx_t_4) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compute_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_compute_values, __pyx_t_4) < 0) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, Py_True);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1133
+ * return True, str(node)
+ *
+ * if node.is_variable_type(): # <<<<<<<<<<<<<<
+ * if not node.fixed:
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=False)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1138
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=self.compute_values)
+ *
+ * if not node.is_expression_type(): # <<<<<<<<<<<<<<
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=self.compute_values)
+ *
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 1138, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_1 = ((!__pyx_t_2) != 0);
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1139
+ *
+ * if not node.is_expression_type():
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=self.compute_values) # <<<<<<<<<<<<<<
+ *
+ * return False, None
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_node, __pyx_n_s_to_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_verbose); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_verbose, __pyx_t_3) < 0) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_smap); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_smap, __pyx_t_3) < 0) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compute_values); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_compute_values, __pyx_t_3) < 0) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, Py_True);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1138
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=self.compute_values)
+ *
+ * if not node.is_expression_type(): # <<<<<<<<<<<<<<
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=self.compute_values)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1141
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=self.compute_values)
+ *
+ * return False, None # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_tuple__15);
+ __pyx_r = __pyx_tuple__15;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1121
+ * return node._to_string(tmp, self.verbose, self.smap, self.compute_values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._ToStringVisitor.visiting_potential_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1144
+ *
+ *
+ * def expression_to_string(expr, verbose=None, labeler=None, smap=None, compute_values=False, standardize=False): # <<<<<<<<<<<<<<
+ * """
+ * Return a string representation of an expression.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_24expression_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_23expression_to_string[] = "\n Return a string representation of an expression.\n\n Args:\n expr: The root node of an expression tree.\n verbose (bool): If :const:`True`, then the output is\n a nested functional form. Otherwise, the output\n is an algebraic expression. Default is :const:`False`.\n labeler: If specified, this labeler is used to label\n variables in the expression.\n smap: If specified, this :class:`SymbolMap ` is\n used to cache labels.\n compute_values (bool): If :const:`True`, then \n parameters and fixed variables are evaluated before the\n expression string is generated. Default is :const:`False`.\n standardize (bool): If :const:`True` and :attr:`verbose` is :const:`False`, then the\n expression form is standardized to pull out constant and linear terms.\n Default is :const:`False`.\n\n Returns:\n A string representation for the expression.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_24expression_to_string = {"expression_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_24expression_to_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_23expression_to_string};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_24expression_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_expr = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_labeler = 0;
+ PyObject *__pyx_v_smap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_v_standardize = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("expression_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_expr,&__pyx_n_s_verbose,&__pyx_n_s_labeler,&__pyx_n_s_smap,&__pyx_n_s_compute_values,&__pyx_n_s_standardize,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ values[1] = ((PyObject *)Py_None);
+ values[2] = ((PyObject *)Py_None);
+ values[3] = ((PyObject *)Py_None);
+ values[4] = ((PyObject *)Py_False);
+ values[5] = ((PyObject *)Py_False);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_expr)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labeler);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values);
+ if (value) { values[4] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_standardize);
+ if (value) { values[5] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "expression_to_string") < 0)) __PYX_ERR(0, 1144, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_expr = values[0];
+ __pyx_v_verbose = values[1];
+ __pyx_v_labeler = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ __pyx_v_standardize = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("expression_to_string", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1144, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.expression_to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23expression_to_string(__pyx_self, __pyx_v_expr, __pyx_v_verbose, __pyx_v_labeler, __pyx_v_smap, __pyx_v_compute_values, __pyx_v_standardize);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23expression_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_verbose, PyObject *__pyx_v_labeler, PyObject *__pyx_v_smap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_standardize) {
+ PyObject *__pyx_v_generate_standard_repn = NULL;
+ PyObject *__pyx_v_repn0 = NULL;
+ PyObject *__pyx_v_repn1 = NULL;
+ PyObject *__pyx_v_repn2 = NULL;
+ PyObject *__pyx_v_repn = NULL;
+ PyObject *__pyx_v_visitor = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ int __pyx_t_13;
+ __Pyx_RefNannySetupContext("expression_to_string", 0);
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_smap);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1167
+ * A string representation for the expression.
+ * """
+ * verbose = common.TO_STRING_VERBOSE if verbose is None else verbose # <<<<<<<<<<<<<<
+ * #
+ * # Standardize the output of expressions if requested (when verbose=False).
+ */
+ __pyx_t_2 = (__pyx_v_verbose == Py_None);
+ if ((__pyx_t_2 != 0)) {
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_common); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_TO_STRING_VERBOSE); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __pyx_t_4;
+ __pyx_t_4 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_v_verbose);
+ __pyx_t_1 = __pyx_v_verbose;
+ }
+ __Pyx_DECREF_SET(__pyx_v_verbose, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1173
+ * # a string.
+ * #
+ * if standardize and not verbose: # <<<<<<<<<<<<<<
+ * from pyomo.repn import generate_standard_repn
+ * try:
+ */
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_standardize); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1173, __pyx_L1_error)
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_2 = __pyx_t_5;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 1173, __pyx_L1_error)
+ __pyx_t_6 = ((!__pyx_t_5) != 0);
+ __pyx_t_2 = __pyx_t_6;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1174
+ * #
+ * if standardize and not verbose:
+ * from pyomo.repn import generate_standard_repn # <<<<<<<<<<<<<<
+ * try:
+ * if expr.__class__ is EqualityExpression:
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_generate_standard_repn);
+ __Pyx_GIVEREF(__pyx_n_s_generate_standard_repn);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_generate_standard_repn);
+ __pyx_t_4 = __Pyx_Import(__pyx_n_s_pyomo_repn, __pyx_t_1, -1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1174, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_4, __pyx_n_s_generate_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1174, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_1);
+ __pyx_v_generate_standard_repn = __pyx_t_1;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1175
+ * if standardize and not verbose:
+ * from pyomo.repn import generate_standard_repn
+ * try: # <<<<<<<<<<<<<<
+ * if expr.__class__ is EqualityExpression:
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
+ __Pyx_XGOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_8);
+ __Pyx_XGOTREF(__pyx_t_9);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1176
+ * from pyomo.repn import generate_standard_repn
+ * try:
+ * if expr.__class__ is EqualityExpression: # <<<<<<<<<<<<<<
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1176, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_EqualityExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1176, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = (__pyx_t_4 == __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_6 = (__pyx_t_2 != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1177
+ * try:
+ * if expr.__class__ is EqualityExpression:
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values) # <<<<<<<<<<<<<<
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ * expr = EqualityExpression( (repn0.to_expression(), repn1.to_expression()) )
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1177, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1177, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1177, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_quadratic, Py_True) < 0) __PYX_ERR(0, 1177, __pyx_L6_error)
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_compute_values, __pyx_v_compute_values) < 0) __PYX_ERR(0, 1177, __pyx_L6_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_generate_standard_repn, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1177, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_repn0 = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1178
+ * if expr.__class__ is EqualityExpression:
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values) # <<<<<<<<<<<<<<
+ * expr = EqualityExpression( (repn0.to_expression(), repn1.to_expression()) )
+ * elif expr.__class__ is InequalityExpression:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1178, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1178, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1178, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_quadratic, Py_True) < 0) __PYX_ERR(0, 1178, __pyx_L6_error)
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_compute_values, __pyx_v_compute_values) < 0) __PYX_ERR(0, 1178, __pyx_L6_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_generate_standard_repn, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1178, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_repn1 = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1179
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ * expr = EqualityExpression( (repn0.to_expression(), repn1.to_expression()) ) # <<<<<<<<<<<<<<
+ * elif expr.__class__ is InequalityExpression:
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_EqualityExpression); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1179, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_repn0, __pyx_n_s_to_expression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1179, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (__pyx_t_11) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L6_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L6_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_repn1, __pyx_n_s_to_expression); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1179, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_10 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_12); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1179, __pyx_L6_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_10 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1179, __pyx_L6_error)
+ }
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1179, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_10);
+ __pyx_t_3 = 0;
+ __pyx_t_10 = 0;
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L6_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_11};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L6_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_11};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L6_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1179, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_11);
+ __pyx_t_11 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1179, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1176
+ * from pyomo.repn import generate_standard_repn
+ * try:
+ * if expr.__class__ is EqualityExpression: # <<<<<<<<<<<<<<
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ */
+ goto __pyx_L12;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1180
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ * expr = EqualityExpression( (repn0.to_expression(), repn1.to_expression()) )
+ * elif expr.__class__ is InequalityExpression: # <<<<<<<<<<<<<<
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1180, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1180, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = (__pyx_t_1 == __pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_2 = (__pyx_t_6 != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1181
+ * expr = EqualityExpression( (repn0.to_expression(), repn1.to_expression()) )
+ * elif expr.__class__ is InequalityExpression:
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values) # <<<<<<<<<<<<<<
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ * expr = InequalityExpression( (repn0.to_expression(), repn1.to_expression()), strict=expr._strict )
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_args_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1181, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1181, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1181, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_quadratic, Py_True) < 0) __PYX_ERR(0, 1181, __pyx_L6_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_compute_values, __pyx_v_compute_values) < 0) __PYX_ERR(0, 1181, __pyx_L6_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_generate_standard_repn, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1181, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_repn0 = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1182
+ * elif expr.__class__ is InequalityExpression:
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values) # <<<<<<<<<<<<<<
+ * expr = InequalityExpression( (repn0.to_expression(), repn1.to_expression()), strict=expr._strict )
+ * elif expr.__class__ is RangedExpression:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1182, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1182, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1182, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_quadratic, Py_True) < 0) __PYX_ERR(0, 1182, __pyx_L6_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_compute_values, __pyx_v_compute_values) < 0) __PYX_ERR(0, 1182, __pyx_L6_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_generate_standard_repn, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1182, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_repn1 = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1183
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ * expr = InequalityExpression( (repn0.to_expression(), repn1.to_expression()), strict=expr._strict ) # <<<<<<<<<<<<<<
+ * elif expr.__class__ is RangedExpression:
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1183, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_repn0, __pyx_n_s_to_expression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_11) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1183, __pyx_L6_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1183, __pyx_L6_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_repn1, __pyx_n_s_to_expression); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1183, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ }
+ }
+ if (__pyx_t_10) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L6_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L6_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1183, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_3);
+ __pyx_t_1 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1183, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11);
+ __pyx_t_11 = 0;
+ __pyx_t_11 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1183, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1183, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_t_11, __pyx_n_s_strict, __pyx_t_1) < 0) __PYX_ERR(0, 1183, __pyx_L6_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1183, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1180
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ * expr = EqualityExpression( (repn0.to_expression(), repn1.to_expression()) )
+ * elif expr.__class__ is InequalityExpression: # <<<<<<<<<<<<<<
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ */
+ goto __pyx_L12;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1184
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ * expr = InequalityExpression( (repn0.to_expression(), repn1.to_expression()), strict=expr._strict )
+ * elif expr.__class__ is RangedExpression: # <<<<<<<<<<<<<<
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1184, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_RangedExpression); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1184, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_2 = (__pyx_t_1 == __pyx_t_11);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_6 = (__pyx_t_2 != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1185
+ * expr = InequalityExpression( (repn0.to_expression(), repn1.to_expression()), strict=expr._strict )
+ * elif expr.__class__ is RangedExpression:
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values) # <<<<<<<<<<<<<<
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ * repn2 = generate_standard_repn(expr._args_[2], quadratic=True, compute_values=compute_values)
+ */
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_args_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1185, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_11, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1185, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1185, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_quadratic, Py_True) < 0) __PYX_ERR(0, 1185, __pyx_L6_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_compute_values, __pyx_v_compute_values) < 0) __PYX_ERR(0, 1185, __pyx_L6_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_generate_standard_repn, __pyx_t_11, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1185, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_repn0 = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1186
+ * elif expr.__class__ is RangedExpression:
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values) # <<<<<<<<<<<<<<
+ * repn2 = generate_standard_repn(expr._args_[2], quadratic=True, compute_values=compute_values)
+ * expr = RangedExpression( (repn0.to_expression(), repn1.to_expression(), repn2.to_expression()), strict=expr._strict )
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1186, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1186, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1186, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_quadratic, Py_True) < 0) __PYX_ERR(0, 1186, __pyx_L6_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_compute_values, __pyx_v_compute_values) < 0) __PYX_ERR(0, 1186, __pyx_L6_error)
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_v_generate_standard_repn, __pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1186, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_repn1 = __pyx_t_11;
+ __pyx_t_11 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1187
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ * repn2 = generate_standard_repn(expr._args_[2], quadratic=True, compute_values=compute_values) # <<<<<<<<<<<<<<
+ * expr = RangedExpression( (repn0.to_expression(), repn1.to_expression(), repn2.to_expression()), strict=expr._strict )
+ * else:
+ */
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_args_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1187, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_11, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1187, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1187, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1187, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_quadratic, Py_True) < 0) __PYX_ERR(0, 1187, __pyx_L6_error)
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_compute_values, __pyx_v_compute_values) < 0) __PYX_ERR(0, 1187, __pyx_L6_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_generate_standard_repn, __pyx_t_11, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1187, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_repn2 = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1188
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ * repn2 = generate_standard_repn(expr._args_[2], quadratic=True, compute_values=compute_values)
+ * expr = RangedExpression( (repn0.to_expression(), repn1.to_expression(), repn2.to_expression()), strict=expr._strict ) # <<<<<<<<<<<<<<
+ * else:
+ * repn = generate_standard_repn(expr, quadratic=True, compute_values=compute_values)
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RangedExpression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_repn0, __pyx_n_s_to_expression); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_repn1, __pyx_n_s_to_expression); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_10) {
+ __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __pyx_t_11 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ }
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_repn2, __pyx_n_s_to_expression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyTuple_New(3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_10, 2, __pyx_t_4);
+ __pyx_t_1 = 0;
+ __pyx_t_11 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_10 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_strict, __pyx_t_11) < 0) __PYX_ERR(0, 1188, __pyx_L6_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, __pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1188, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_11);
+ __pyx_t_11 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1184
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ * expr = InequalityExpression( (repn0.to_expression(), repn1.to_expression()), strict=expr._strict )
+ * elif expr.__class__ is RangedExpression: # <<<<<<<<<<<<<<
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ * repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ */
+ goto __pyx_L12;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1190
+ * expr = RangedExpression( (repn0.to_expression(), repn1.to_expression(), repn2.to_expression()), strict=expr._strict )
+ * else:
+ * repn = generate_standard_repn(expr, quadratic=True, compute_values=compute_values) # <<<<<<<<<<<<<<
+ * expr = repn.to_expression()
+ * except: #pragma: no cover
+ */
+ /*else*/ {
+ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1190, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_v_expr);
+ __pyx_t_10 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1190, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_quadratic, Py_True) < 0) __PYX_ERR(0, 1190, __pyx_L6_error)
+ if (PyDict_SetItem(__pyx_t_10, __pyx_n_s_compute_values, __pyx_v_compute_values) < 0) __PYX_ERR(0, 1190, __pyx_L6_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_v_generate_standard_repn, __pyx_t_11, __pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1190, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_v_repn = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1191
+ * else:
+ * repn = generate_standard_repn(expr, quadratic=True, compute_values=compute_values)
+ * expr = repn.to_expression() # <<<<<<<<<<<<<<
+ * except: #pragma: no cover
+ * #
+ */
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_repn, __pyx_n_s_to_expression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1191, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (__pyx_t_11) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1191, __pyx_L6_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1191, __pyx_L6_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_4);
+ __pyx_t_4 = 0;
+ }
+ __pyx_L12:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1175
+ * if standardize and not verbose:
+ * from pyomo.repn import generate_standard_repn
+ * try: # <<<<<<<<<<<<<<
+ * if expr.__class__ is EqualityExpression:
+ * repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ goto __pyx_L11_try_end;
+ __pyx_L6_error:;
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1192
+ * repn = generate_standard_repn(expr, quadratic=True, compute_values=compute_values)
+ * expr = repn.to_expression()
+ * except: #pragma: no cover # <<<<<<<<<<<<<<
+ * #
+ * # Generation of the standard repn will fail if the
+ */
+ /*except:*/ {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L7_exception_handled;
+ }
+ __pyx_L7_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_XGIVEREF(__pyx_t_9);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
+ __pyx_L11_try_end:;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1173
+ * # a string.
+ * #
+ * if standardize and not verbose: # <<<<<<<<<<<<<<
+ * from pyomo.repn import generate_standard_repn
+ * try:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1205
+ * # Setup the symbol map
+ * #
+ * if labeler is not None: # <<<<<<<<<<<<<<
+ * if smap is None:
+ * smap = SymbolMap()
+ */
+ __pyx_t_6 = (__pyx_v_labeler != Py_None);
+ __pyx_t_2 = (__pyx_t_6 != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1206
+ * #
+ * if labeler is not None:
+ * if smap is None: # <<<<<<<<<<<<<<
+ * smap = SymbolMap()
+ * smap.default_labeler = labeler
+ */
+ __pyx_t_2 = (__pyx_v_smap == Py_None);
+ __pyx_t_6 = (__pyx_t_2 != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1207
+ * if labeler is not None:
+ * if smap is None:
+ * smap = SymbolMap() # <<<<<<<<<<<<<<
+ * smap.default_labeler = labeler
+ * #
+ */
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_SymbolMap); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1207, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (__pyx_t_11) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_10); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1207, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF_SET(__pyx_v_smap, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1206
+ * #
+ * if labeler is not None:
+ * if smap is None: # <<<<<<<<<<<<<<
+ * smap = SymbolMap()
+ * smap.default_labeler = labeler
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1208
+ * if smap is None:
+ * smap = SymbolMap()
+ * smap.default_labeler = labeler # <<<<<<<<<<<<<<
+ * #
+ * # Create and execute the visitor pattern
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_smap, __pyx_n_s_default_labeler, __pyx_v_labeler) < 0) __PYX_ERR(0, 1208, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1205
+ * # Setup the symbol map
+ * #
+ * if labeler is not None: # <<<<<<<<<<<<<<
+ * if smap is None:
+ * smap = SymbolMap()
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1212
+ * # Create and execute the visitor pattern
+ * #
+ * visitor = _ToStringVisitor(verbose, smap, compute_values) # <<<<<<<<<<<<<<
+ * return visitor.dfs_postorder_stack(expr)
+ *
+ */
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_ToStringVisitor); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1212, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = NULL;
+ __pyx_t_13 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_11, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_13, 3+__pyx_t_13); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(3+__pyx_t_13); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1212, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__pyx_t_11) {
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_13, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_smap);
+ __Pyx_GIVEREF(__pyx_v_smap);
+ PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_13, __pyx_v_smap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_3, 2+__pyx_t_13, __pyx_v_compute_values);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1212, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_v_visitor = __pyx_t_4;
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1213
+ * #
+ * visitor = _ToStringVisitor(verbose, smap, compute_values)
+ * return visitor.dfs_postorder_stack(expr) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_visitor, __pyx_n_s_dfs_postorder_stack); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1213, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_v_expr); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1213, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_expr};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1213, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_expr};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1213, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1213, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_expr);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_11, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1213, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1144
+ *
+ *
+ * def expression_to_string(expr, verbose=None, labeler=None, smap=None, compute_values=False, standardize=False): # <<<<<<<<<<<<<<
+ * """
+ * Return a string representation of an expression.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.expression_to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_generate_standard_repn);
+ __Pyx_XDECREF(__pyx_v_repn0);
+ __Pyx_XDECREF(__pyx_v_repn1);
+ __Pyx_XDECREF(__pyx_v_repn2);
+ __Pyx_XDECREF(__pyx_v_repn);
+ __Pyx_XDECREF(__pyx_v_visitor);
+ __Pyx_XDECREF(__pyx_v_expr);
+ __Pyx_XDECREF(__pyx_v_verbose);
+ __Pyx_XDECREF(__pyx_v_smap);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1237
+ * PRECEDENCE = 0
+ *
+ * def __init__(self, args): # <<<<<<<<<<<<<<
+ * self._args_ = args
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 1237, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1237, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1237, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase___init__(__pyx_self, __pyx_v_self, __pyx_v_args);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1238
+ *
+ * def __init__(self, args):
+ * self._args_ = args # <<<<<<<<<<<<<<
+ *
+ * def nargs(self):
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_args_2, __pyx_v_args) < 0) __PYX_ERR(0, 1238, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1237
+ * PRECEDENCE = 0
+ *
+ * def __init__(self, args): # <<<<<<<<<<<<<<
+ * self._args_ = args
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1240
+ * self._args_ = args
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * """
+ * Returns the number of child nodes.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_3nargs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_2nargs[] = "\n Returns the number of child nodes.\n \n By default, Pyomo expressions represent binary operations\n with two arguments.\n \n Note:\n This function does not simply compute the length of\n :attr:`_args_` because some expression classes use\n a subset of the :attr:`_args_` array. Thus, it\n is imperative that developers use this method!\n\n Returns:\n A nonnegative integer that is the number of child nodes.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_3nargs = {"nargs", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_3nargs, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_2nargs};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_3nargs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_2nargs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_2nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1256
+ * A nonnegative integer that is the number of child nodes.
+ * """
+ * return 2 # <<<<<<<<<<<<<<
+ *
+ * def arg(self, i):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_2);
+ __pyx_r = __pyx_int_2;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1240
+ * self._args_ = args
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * """
+ * Returns the number of child nodes.
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1258
+ * return 2
+ *
+ * def arg(self, i): # <<<<<<<<<<<<<<
+ * """
+ * Return the i-th child node.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_5arg(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_4arg[] = "\n Return the i-th child node.\n\n Args:\n i (int): Nonnegative index of the child that is returned.\n\n Returns:\n The i-th child node.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_5arg = {"arg", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_5arg, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_4arg};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_5arg(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_i = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("arg (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_i,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("arg", 1, 2, 2, 1); __PYX_ERR(0, 1258, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "arg") < 0)) __PYX_ERR(0, 1258, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_i = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("arg", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1258, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.arg", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_4arg(__pyx_self, __pyx_v_self, __pyx_v_i);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_4arg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("arg", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1268
+ * The i-th child node.
+ * """
+ * if i >= self.nargs(): # <<<<<<<<<<<<<<
+ * raise KeyError("Invalid index for expression argument: %d" % i)
+ * if i < 0:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1268, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1268, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_t_1, Py_GE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1268, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1268, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1269
+ * """
+ * if i >= self.nargs():
+ * raise KeyError("Invalid index for expression argument: %d" % i) # <<<<<<<<<<<<<<
+ * if i < 0:
+ * return self._args_[self.nargs()+i]
+ */
+ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Invalid_index_for_expression_arg, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_KeyError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 1269, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1268
+ * The i-th child node.
+ * """
+ * if i >= self.nargs(): # <<<<<<<<<<<<<<
+ * raise KeyError("Invalid index for expression argument: %d" % i)
+ * if i < 0:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1270
+ * if i >= self.nargs():
+ * raise KeyError("Invalid index for expression argument: %d" % i)
+ * if i < 0: # <<<<<<<<<<<<<<
+ * return self._args_[self.nargs()+i]
+ * return self._args_[i]
+ */
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_i, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1270, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1270, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1271
+ * raise KeyError("Invalid index for expression argument: %d" % i)
+ * if i < 0:
+ * return self._args_[self.nargs()+i] # <<<<<<<<<<<<<<
+ * return self._args_[i]
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nargs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(__pyx_t_1, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1270
+ * if i >= self.nargs():
+ * raise KeyError("Invalid index for expression argument: %d" % i)
+ * if i < 0: # <<<<<<<<<<<<<<
+ * return self._args_[self.nargs()+i]
+ * return self._args_[i]
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1272
+ * if i < 0:
+ * return self._args_[self.nargs()+i]
+ * return self._args_[i] # <<<<<<<<<<<<<<
+ *
+ * @property
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1272, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1272, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1258
+ * return 2
+ *
+ * def arg(self, i): # <<<<<<<<<<<<<<
+ * """
+ * Return the i-th child node.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.arg", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1275
+ *
+ * @property
+ * def args(self): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields the child nodes.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_7args(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_6args[] = "\n A generator that yields the child nodes.\n\n Yields:\n Each child node in order.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_7args = {"args", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_7args, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_6args};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_7args(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("args (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_6args(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_6args(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ __Pyx_RefNannySetupContext("args", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1282
+ * Each child node in order.
+ * """
+ * return islice(self._args_, self.nargs()) # <<<<<<<<<<<<<<
+ *
+ * def __getstate__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_islice); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1282, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1282, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_4);
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1275
+ *
+ * @property
+ * def args(self): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields the child nodes.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.args", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1284
+ * return islice(self._args_, self.nargs())
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * """
+ * Pickle the expression object
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_9__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_8__getstate__[] = "\n Pickle the expression object\n\n Returns:\n The pickled state.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_9__getstate__ = {"__getstate__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_9__getstate__, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_8__getstate__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_9__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_8__getstate__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_8__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_state = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ __Pyx_RefNannySetupContext("__getstate__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1291
+ * The pickled state.
+ * """
+ * state = super(ExpressionBase, self).__getstate__() # <<<<<<<<<<<<<<
+ * for i in ExpressionBase.__slots__:
+ * state[i] = getattr(self,i)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1291, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_state = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1292
+ * """
+ * state = super(ExpressionBase, self).__getstate__()
+ * for i in ExpressionBase.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self,i)
+ * return state
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_slots); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1292, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1292, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1292, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1292, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1292, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1292, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1292, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_5(__pyx_t_1);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 1292, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1293
+ * state = super(ExpressionBase, self).__getstate__()
+ * for i in ExpressionBase.__slots__:
+ * state[i] = getattr(self,i) # <<<<<<<<<<<<<<
+ * return state
+ *
+ */
+ __pyx_t_3 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (unlikely(PyObject_SetItem(__pyx_v_state, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(0, 1293, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1292
+ * """
+ * state = super(ExpressionBase, self).__getstate__()
+ * for i in ExpressionBase.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self,i)
+ * return state
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1294
+ * for i in ExpressionBase.__slots__:
+ * state[i] = getattr(self,i)
+ * return state # <<<<<<<<<<<<<<
+ *
+ * def __nonzero__(self): #pragma: no cover
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_state);
+ __pyx_r = __pyx_v_state;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1284
+ * return islice(self._args_, self.nargs())
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * """
+ * Pickle the expression object
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_state);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1296
+ * return state
+ *
+ * def __nonzero__(self): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Compute the value of the expression and convert it to
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_11__nonzero__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_10__nonzero__[] = "\n Compute the value of the expression and convert it to\n a boolean.\n\n Returns:\n A boolean value.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_11__nonzero__ = {"__nonzero__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_11__nonzero__, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_10__nonzero__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_11__nonzero__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_10__nonzero__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_10__nonzero__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ __Pyx_RefNannySetupContext("__nonzero__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1304
+ * A boolean value.
+ * """
+ * return bool(self()) # <<<<<<<<<<<<<<
+ *
+ * __bool__ = __nonzero__
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_t_2 = __pyx_v_self; __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1304, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1296
+ * return state
+ *
+ * def __nonzero__(self): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Compute the value of the expression and convert it to
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1308
+ * __bool__ = __nonzero__
+ *
+ * def __call__(self, exception=True): # <<<<<<<<<<<<<<
+ * """
+ * Evaluate the value of the expression tree.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_13__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_12__call__[] = "\n Evaluate the value of the expression tree.\n\n Args:\n exception (bool): If :const:`False`, then\n an exception raised while evaluating\n is captured, and the value returned is\n :const:`None`. Default is :const:`True`.\n\n Returns:\n The value of the expression or :const:`None`.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_13__call__ = {"__call__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_13__call__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_12__call__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_13__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_exception = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_exception,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)((PyObject *)Py_True));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exception);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 1308, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_exception = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1308, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_12__call__(__pyx_self, __pyx_v_self, __pyx_v_exception);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_12__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_exception) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("__call__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1321
+ * The value of the expression or :const:`None`.
+ * """
+ * return evaluate_expression(self, exception) # <<<<<<<<<<<<<<
+ *
+ * def __str__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_evaluate_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1321, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ __pyx_t_4 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_4 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_self, __pyx_v_exception};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_self, __pyx_v_exception};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1321, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_3) {
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_exception);
+ __Pyx_GIVEREF(__pyx_v_exception);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_exception);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1321, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1308
+ * __bool__ = __nonzero__
+ *
+ * def __call__(self, exception=True): # <<<<<<<<<<<<<<
+ * """
+ * Evaluate the value of the expression tree.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1323
+ * return evaluate_expression(self, exception)
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * """
+ * Returns a string description of the expression.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_15__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_14__str__[] = "\n Returns a string description of the expression.\n\n Note:\n The value of ``pyomo.core.expr.expr_common.TO_STRING_VERBOSE``\n is used to configure the execution of this method.\n If this value is :const:`True`, then the string\n representation is a nested function description of the expression.\n The default is :const:`False`, which is an algebraic\n description of the expression.\n\n Returns:\n A string.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_15__str__ = {"__str__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_15__str__, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_14__str__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_15__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_14__str__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_14__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("__str__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1338
+ * A string.
+ * """
+ * return expression_to_string(self, standardize=True) # <<<<<<<<<<<<<<
+ *
+ * def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_expression_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_standardize, Py_True) < 0) __PYX_ERR(0, 1338, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1323
+ * return evaluate_expression(self, exception)
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * """
+ * Returns a string description of the expression.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1340
+ * return expression_to_string(self, standardize=True)
+ *
+ * def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False): # <<<<<<<<<<<<<<
+ * """
+ * Return a string representation of the expression tree.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_17to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_16to_string[] = "\n Return a string representation of the expression tree.\n\n Args:\n verbose (bool): If :const:`True`, then the the string \n representation consists of nested functions. Otherwise,\n the string representation is an algebraic equation.\n Defaults to :const:`False`.\n labeler: An object that generates string labels for \n variables in the expression tree. Defaults to :const:`None`.\n smap: If specified, this :class:`SymbolMap ` is\n used to cache labels for variables.\n compute_values (bool): If :const:`True`, then \n parameters and fixed variables are evaluated before the\n expression string is generated. Default is :const:`False`.\n\n Returns:\n A string representation for the expression tree.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_17to_string = {"to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_17to_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_16to_string};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_17to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_labeler = 0;
+ PyObject *__pyx_v_smap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_verbose,&__pyx_n_s_labeler,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ values[1] = ((PyObject *)((PyObject *)Py_None));
+ values[2] = ((PyObject *)((PyObject *)Py_None));
+ values[3] = ((PyObject *)((PyObject *)Py_None));
+ values[4] = ((PyObject *)((PyObject *)Py_False));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labeler);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values);
+ if (value) { values[4] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_string") < 0)) __PYX_ERR(0, 1340, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_verbose = values[1];
+ __pyx_v_labeler = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("to_string", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1340, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_16to_string(__pyx_self, __pyx_v_self, __pyx_v_verbose, __pyx_v_labeler, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_16to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_verbose, PyObject *__pyx_v_labeler, PyObject *__pyx_v_smap, PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1360
+ * A string representation for the expression tree.
+ * """
+ * return expression_to_string(self, verbose=verbose, labeler=labeler, smap=smap, compute_values=compute_values) # <<<<<<<<<<<<<<
+ *
+ * def _precedence(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_expression_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_verbose, __pyx_v_verbose) < 0) __PYX_ERR(0, 1360, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_labeler, __pyx_v_labeler) < 0) __PYX_ERR(0, 1360, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_smap, __pyx_v_smap) < 0) __PYX_ERR(0, 1360, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_compute_values, __pyx_v_compute_values) < 0) __PYX_ERR(0, 1360, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1340
+ * return expression_to_string(self, standardize=True)
+ *
+ * def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False): # <<<<<<<<<<<<<<
+ * """
+ * Return a string representation of the expression tree.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1362
+ * return expression_to_string(self, verbose=verbose, labeler=labeler, smap=smap, compute_values=compute_values)
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ExpressionBase.PRECEDENCE
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_19_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_19_precedence = {"_precedence", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_19_precedence, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_19_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_precedence (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_18_precedence(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_18_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_precedence", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1363
+ *
+ * def _precedence(self):
+ * return ExpressionBase.PRECEDENCE # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): #pragma: no cover
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1363, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PRECEDENCE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1363, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1362
+ * return expression_to_string(self, verbose=verbose, labeler=labeler, smap=smap, compute_values=compute_values)
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ExpressionBase.PRECEDENCE
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase._precedence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1365
+ * return ExpressionBase.PRECEDENCE
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Construct a string representation for this node, using the string
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_21_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_20_to_string[] = "\n Construct a string representation for this node, using the string\n representations of its children.\n\n This method is called by the :class:`_ToStringVisitor\n ` class. It must\n must be defined in subclasses.\n\n Args:\n values (list): The string representations of the children of this\n node.\n verbose (bool): If :const:`True`, then the the string \n representation consists of nested functions. Otherwise,\n the string representation is an algebraic equation.\n smap: If specified, this :class:`SymbolMap\n ` is\n used to cache labels for variables.\n compute_values (bool): If :const:`True`, then \n parameters and fixed variables are evaluated before the\n expression string is generated.\n\n Returns:\n A string representation for this node.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_21_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_21_to_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_20_to_string};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_21_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_values = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_smap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 1365, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 1365, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 1365, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 1365, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 1365, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1365, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_20_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_20_to_string(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1392
+ * pass
+ *
+ * def getname(self, *args, **kwds): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Return the text name of a function associated with this expression object.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_23getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_22getname[] = "\n Return the text name of a function associated with this expression object.\n\n In general, no arguments are passed to this function.\n\n Args:\n *arg: a variable length list of arguments\n **kwds: keyword arguments\n\n Returns:\n A string name for the function.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_23getname = {"getname", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_23getname, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_22getname};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_23getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_kwds = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname (wrapper)", 0);
+ __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
+ __Pyx_GOTREF(__pyx_v_kwds);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, used_pos_args, "getname") < 0)) __PYX_ERR(0, 1392, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("getname", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1392, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_22getname(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwds);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwds);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_22getname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("getname", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1406
+ * """
+ * raise NotImplementedError("Derived expression (%s) failed to "\
+ * "implement getname()" % ( str(self.__class__), )) # <<<<<<<<<<<<<<
+ *
+ * def clone(self, substitute=None):
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1406, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1406, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Derived_expression_s_failed_to_i, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1406, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1405
+ * A string name for the function.
+ * """
+ * raise NotImplementedError("Derived expression (%s) failed to "\ # <<<<<<<<<<<<<<
+ * "implement getname()" % ( str(self.__class__), ))
+ *
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1405, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1405, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 1405, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1392
+ * pass
+ *
+ * def getname(self, *args, **kwds): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Return the text name of a function associated with this expression object.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1408
+ * "implement getname()" % ( str(self.__class__), ))
+ *
+ * def clone(self, substitute=None): # <<<<<<<<<<<<<<
+ * """
+ * Return a clone of the expression tree.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_25clone(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_24clone[] = "\n Return a clone of the expression tree.\n\n Note:\n This method does not clone the leaves of the tree,\n which are numeric constants and variables. It only \n clones the interior nodes, and expression leaf nodes\n like :class:`_MutableLinearExpression `. However, named expressions are treated \n like leaves, and they are not cloned.\n \n Args:\n substitute (dict): a dictionary that maps object ids to clone\n objects generated earlier during the cloning process.\n\n Returns:\n A new expression tree.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_25clone = {"clone", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_25clone, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_24clone};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_25clone(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_substitute = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("clone (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_substitute,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)((PyObject *)Py_None));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_substitute);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "clone") < 0)) __PYX_ERR(0, 1408, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_substitute = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("clone", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1408, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.clone", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_24clone(__pyx_self, __pyx_v_self, __pyx_v_substitute);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_24clone(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_substitute) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("clone", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1426
+ * A new expression tree.
+ * """
+ * return clone_expression(self, memo=substitute, clone_leaves=False) # <<<<<<<<<<<<<<
+ *
+ * def __deepcopy__(self, memo):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_clone_expression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1426, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1426, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1426, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_memo, __pyx_v_substitute) < 0) __PYX_ERR(0, 1426, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_clone_leaves, Py_False) < 0) __PYX_ERR(0, 1426, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1426, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1408
+ * "implement getname()" % ( str(self.__class__), ))
+ *
+ * def clone(self, substitute=None): # <<<<<<<<<<<<<<
+ * """
+ * Return a clone of the expression tree.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.clone", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1428
+ * return clone_expression(self, memo=substitute, clone_leaves=False)
+ *
+ * def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
+ * """
+ * Return a clone of the expression tree.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_27__deepcopy__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_26__deepcopy__[] = "\n Return a clone of the expression tree.\n\n Note:\n This method clones the leaves of the tree.\n Args:\n memo (dict): a dictionary that maps object ids to clone\n objects generated earlier during the cloning process.\n\n Returns:\n A new expression tree.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_27__deepcopy__ = {"__deepcopy__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_27__deepcopy__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_26__deepcopy__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_27__deepcopy__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_memo = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_memo,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__deepcopy__", 1, 2, 2, 1); __PYX_ERR(0, 1428, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__deepcopy__") < 0)) __PYX_ERR(0, 1428, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_memo = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__deepcopy__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1428, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_26__deepcopy__(__pyx_self, __pyx_v_self, __pyx_v_memo);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_26__deepcopy__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("__deepcopy__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1441
+ * A new expression tree.
+ * """
+ * return clone_expression(self, memo=memo, clone_leaves=True) # <<<<<<<<<<<<<<
+ *
+ * def construct_node(self, args, memo):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_clone_expression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1441, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1441, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1441, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_memo, __pyx_v_memo) < 0) __PYX_ERR(0, 1441, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_clone_leaves, Py_True) < 0) __PYX_ERR(0, 1441, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1441, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1428
+ * return clone_expression(self, memo=substitute, clone_leaves=False)
+ *
+ * def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
+ * """
+ * Return a clone of the expression tree.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1443
+ * return clone_expression(self, memo=memo, clone_leaves=True)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * """
+ * Construct a node using given arguments.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_29construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_28construct_node[] = "\n Construct a node using given arguments. \n \n This class provides a consistent interface for constructing a\n node, which is used in tree visitor scripts. In the simplest\n case, this simply returns::\n\n self.__class__(args))\n\n But in general this constructs a copy of the current\n expression object using local data as well as arguments\n that represent the child nodes. Thus, this method can be viewed\n as a node-level clone method.\n\n Args:\n args (list): A list of child nodes for the new expression\n object\n memo (dict): A dictionary that maps object ids to clone\n objects generated earlier during a cloning process.\n This argument is needed to clone objects that are\n owned by a model, and it can be safely ignored for\n most expression classes.\n\n Returns:\n A new expression object with the same type as the current\n class.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_29construct_node = {"construct_node", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_29construct_node, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_28construct_node};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_29construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_memo = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("construct_node (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_memo,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 1); __PYX_ERR(0, 1443, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 2); __PYX_ERR(0, 1443, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "construct_node") < 0)) __PYX_ERR(0, 1443, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_memo = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1443, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_28construct_node(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_memo);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_28construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("construct_node", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1471
+ * class.
+ * """
+ * return self.__class__(args) # <<<<<<<<<<<<<<
+ *
+ * def is_constant(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_args};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_args};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_args);
+ __Pyx_GIVEREF(__pyx_v_args);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_args);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1443
+ * return clone_expression(self, memo=memo, clone_leaves=True)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * """
+ * Construct a node using given arguments.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1473
+ * return self.__class__(args)
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * """Return True if this expression is an atomic constant
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_31is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_30is_constant[] = "Return True if this expression is an atomic constant\n\n This method contrasts with the is_fixed() method. This method\n returns True if the expression is an atomic constant, that is it\n is composed exclusively of constants and immutable parameters.\n NumericValue objects returning is_constant() == True may be\n simplified to their numeric value at any point without warning.\n\n Note: This defaults to False, but gets redefined in sub-classes.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_31is_constant = {"is_constant", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_31is_constant, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_30is_constant};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_31is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_30is_constant(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_30is_constant(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1484
+ * Note: This defaults to False, but gets redefined in sub-classes.
+ * """
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def is_fixed(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1473
+ * return self.__class__(args)
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * """Return True if this expression is an atomic constant
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1486
+ * return False
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this expression contains no free variables.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_33is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_32is_fixed[] = "\n Return :const:`True` if this expression contains no free variables.\n\n Returns:\n A boolean.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_33is_fixed = {"is_fixed", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_33is_fixed, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_32is_fixed};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_33is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_fixed (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_32is_fixed(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_32is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("is_fixed", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1493
+ * A boolean.
+ * """
+ * return _expression_is_fixed(self) # <<<<<<<<<<<<<<
+ *
+ * def _is_fixed(self, values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_expression_is_fixed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1493, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1493, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_self};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1493, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_self};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1493, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1493, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_self);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1493, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1486
+ * return False
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this expression contains no free variables.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.is_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1495
+ * return _expression_is_fixed(self)
+ *
+ * def _is_fixed(self, values): # <<<<<<<<<<<<<<
+ * """
+ * Compute whether this expression is fixed given
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_35_is_fixed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_34_is_fixed[] = "\n Compute whether this expression is fixed given\n the fixed values of its children.\n\n This method is called by the :class:`_IsFixedVisitor\n ` class. It can\n be over-written by expression classes to customize this\n logic.\n\n Args:\n values (list): A list of boolean values that indicate whether\n the children of this expression are fixed\n\n Returns:\n A boolean that is :const:`True` if the fixed values of the\n children are all :const:`True`.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_35_is_fixed = {"_is_fixed", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_35_is_fixed, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_34_is_fixed};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_35_is_fixed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_is_fixed (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_is_fixed", 1, 2, 2, 1); __PYX_ERR(0, 1495, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_is_fixed") < 0)) __PYX_ERR(0, 1495, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_is_fixed", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1495, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase._is_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_34_is_fixed(__pyx_self, __pyx_v_self, __pyx_v_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_34_is_fixed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_is_fixed", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1513
+ * children are all :const:`True`.
+ * """
+ * return all(values) # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1513, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_values);
+ __Pyx_GIVEREF(__pyx_v_values);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_values);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_all, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1513, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1495
+ * return _expression_is_fixed(self)
+ *
+ * def _is_fixed(self, values): # <<<<<<<<<<<<<<
+ * """
+ * Compute whether this expression is fixed given
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase._is_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1515
+ * return all(values)
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this expression contains variables.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_37is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_36is_potentially_variable[] = "\n Return :const:`True` if this expression contains variables.\n\n This method returns :const:`True` if there are any variables\n within this expression. This method returns :const:`True`\n even if there the variables in the expression are currently\n fixed.\n\n Returns:\n A boolean. Defaults to :const:`True` for expressions.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_37is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_37is_potentially_variable, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_36is_potentially_variable};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_37is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_36is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_36is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1527
+ * A boolean. Defaults to :const:`True` for expressions.
+ * """
+ * return True # <<<<<<<<<<<<<<
+ *
+ * def is_named_expression_type(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1515
+ * return all(values)
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this expression contains variables.
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1529
+ * return True
+ *
+ * def is_named_expression_type(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this object is a named expression.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_39is_named_expression_type(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_38is_named_expression_type[] = "\n Return :const:`True` if this object is a named expression.\n\n This method returns :const:`False` for this class, and it\n is included in other classes within Pyomo that are not named\n expressions, which allows for a check for named expressions \n without evaluating the class type.\n\n Returns:\n A boolean.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_39is_named_expression_type = {"is_named_expression_type", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_39is_named_expression_type, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_38is_named_expression_type};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_39is_named_expression_type(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_named_expression_type (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_38is_named_expression_type(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_38is_named_expression_type(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_named_expression_type", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1541
+ * A boolean.
+ * """
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def is_expression_type(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1529
+ * return True
+ *
+ * def is_named_expression_type(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this object is a named expression.
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1543
+ * return False
+ *
+ * def is_expression_type(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this object is an expression.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_41is_expression_type(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_40is_expression_type[] = "\n Return :const:`True` if this object is an expression.\n\n This method obviously returns :const:`True` for this class, but it\n is included in other classes within Pyomo that are not expressions,\n which allows for a check for expressions without\n evaluating the class type.\n\n Returns:\n A boolean.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_41is_expression_type = {"is_expression_type", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_41is_expression_type, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_40is_expression_type};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_41is_expression_type(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_expression_type (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_40is_expression_type(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_40is_expression_type(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_expression_type", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1555
+ * A boolean.
+ * """
+ * return True # <<<<<<<<<<<<<<
+ *
+ * def size(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1543
+ * return False
+ *
+ * def is_expression_type(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this object is an expression.
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1557
+ * return True
+ *
+ * def size(self): # <<<<<<<<<<<<<<
+ * """
+ * Return the number of nodes in the expression tree.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_43size(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_42size[] = "\n Return the number of nodes in the expression tree.\n\n Returns:\n A nonnegative integer that is the number of interior and leaf\n nodes in the expression tree.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_43size = {"size", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_43size, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_42size};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_43size(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("size (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_42size(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_42size(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("size", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1565
+ * nodes in the expression tree.
+ * """
+ * return _sizeof_expression(self) # <<<<<<<<<<<<<<
+ *
+ * def polynomial_degree(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sizeof_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_self};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_self};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_self);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1557
+ * return True
+ *
+ * def size(self): # <<<<<<<<<<<<<<
+ * """
+ * Return the number of nodes in the expression tree.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.size", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1567
+ * return _sizeof_expression(self)
+ *
+ * def polynomial_degree(self): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_45polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_44polynomial_degree[] = "\n Return the polynomial degree of the expression.\n\n Returns:\n A nonnegative integer that is the polynomial degree of\n the expression, if the expression is polynomial. And\n :const:`None` otherwise.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_45polynomial_degree = {"polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_45polynomial_degree, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_44polynomial_degree};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_45polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("polynomial_degree (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_44polynomial_degree(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_44polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("polynomial_degree", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1576
+ * :const:`None` otherwise.
+ * """
+ * return _polynomial_degree(self) # <<<<<<<<<<<<<<
+ *
+ * def _compute_polynomial_degree(self, values): #pragma: no cover
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_polynomial_degree); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1576, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1576, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_self};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1576, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_self};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1576, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1576, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_self);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1576, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1567
+ * return _sizeof_expression(self)
+ *
+ * def polynomial_degree(self): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase.polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1578
+ * return _polynomial_degree(self)
+ *
+ * def _compute_polynomial_degree(self, values): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Compute the polynomial degree of this expression given
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_47_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_46_compute_polynomial_degree[] = "\n Compute the polynomial degree of this expression given\n the degree values of its children.\n\n This method is called by the :class:`_PolyDegreeVisitor\n ` class. It can\n be over-written by expression classes to customize this\n logic.\n\n Args:\n values (list): A list of values that indicate the degree\n of the children expression.\n\n Returns:\n A nonnegative integer that is the polynomial degree of the\n expression, or :const:`None`. Default is :const:`None`.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_47_compute_polynomial_degree = {"_compute_polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_47_compute_polynomial_degree, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_46_compute_polynomial_degree};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_47_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, 1); __PYX_ERR(0, 1578, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_compute_polynomial_degree") < 0)) __PYX_ERR(0, 1578, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1578, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_46_compute_polynomial_degree(__pyx_self, __pyx_v_self, __pyx_v_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_46_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1596
+ * expression, or :const:`None`. Default is :const:`None`.
+ * """
+ * return None # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result): #pragma: no cover
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1578
+ * return _polynomial_degree(self)
+ *
+ * def _compute_polynomial_degree(self, values): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Compute the polynomial degree of this expression given
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1598
+ * return None
+ *
+ * def _apply_operation(self, result): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Compute the values of this node given the values of its children.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_49_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_48_apply_operation[] = "\n Compute the values of this node given the values of its children.\n\n This method is called by the :class:`_EvaluationVisitor\n ` class. It must\n be over-written by expression classes to customize this logic.\n\n Note:\n This method applies the logical operation of the\n operator to the arguments. It does *not* evaluate\n the arguments in the process, but assumes that they\n have been previously evaluated. But noted that if\n this class contains auxilliary data (e.g. like the\n numeric coefficients in the :class:`LinearExpression\n ` class, then\n those values *must* be evaluated as part of this\n function call. An uninitialized parameter value\n encountered during the execution of this method is\n considered an error.\n\n Args:\n values (list): A list of values that indicate the value\n of the children expressions.\n\n Returns:\n A floating point value for this expression.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_49_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_49_apply_operation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_48_apply_operation};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_49_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 1598, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 1598, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1598, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_48_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_48_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_result) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1627
+ * """
+ * raise NotImplementedError("Derived expression (%s) failed to "\
+ * "implement _apply_operation()" % ( str(self.__class__), )) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1627, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1627, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Derived_expression_s_failed_to_i_2, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1627, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1626
+ * A floating point value for this expression.
+ * """
+ * raise NotImplementedError("Derived expression (%s) failed to "\ # <<<<<<<<<<<<<<
+ * "implement _apply_operation()" % ( str(self.__class__), ))
+ *
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1626, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_NotImplementedError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1626, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 1626, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1598
+ * return None
+ *
+ * def _apply_operation(self, result): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Compute the values of this node given the values of its children.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExpressionBase._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1641
+ * PRECEDENCE = 4
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 1
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_1nargs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_1nargs = {"nargs", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_1nargs, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_1nargs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_nargs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1642
+ *
+ * def nargs(self):
+ * return 1 # <<<<<<<<<<<<<<
+ *
+ * def getname(self, *args, **kwds):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_1);
+ __pyx_r = __pyx_int_1;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1641
+ * PRECEDENCE = 4
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 1
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1644
+ * return 1
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'neg'
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_3getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_3getname = {"getname", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_3getname, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_3getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_kwds = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname (wrapper)", 0);
+ __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
+ __Pyx_GOTREF(__pyx_v_kwds);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, used_pos_args, "getname") < 0)) __PYX_ERR(0, 1644, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("getname", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1644, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.NegationExpression.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_2getname(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwds);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwds);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_2getname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1645
+ *
+ * def getname(self, *args, **kwds):
+ * return 'neg' # <<<<<<<<<<<<<<
+ *
+ * def _compute_polynomial_degree(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_n_s_neg);
+ __pyx_r = __pyx_n_s_neg;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1644
+ * return 1
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'neg'
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1647
+ * return 'neg'
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * return result[0]
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_5_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_5_compute_polynomial_degree = {"_compute_polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_5_compute_polynomial_degree, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_5_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, 1); __PYX_ERR(0, 1647, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_compute_polynomial_degree") < 0)) __PYX_ERR(0, 1647, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1647, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.NegationExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_4_compute_polynomial_degree(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_4_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1648
+ *
+ * def _compute_polynomial_degree(self, result):
+ * return result[0] # <<<<<<<<<<<<<<
+ *
+ * def _precedence(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1648, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1647
+ * return 'neg'
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * return result[0]
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.NegationExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1650
+ * return result[0]
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return NegationExpression.PRECEDENCE
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_7_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_7_precedence = {"_precedence", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_7_precedence, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_7_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_precedence (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_6_precedence(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_6_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_precedence", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1651
+ *
+ * def _precedence(self):
+ * return NegationExpression.PRECEDENCE # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NegationExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1651, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PRECEDENCE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1651, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1650
+ * return result[0]
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return NegationExpression.PRECEDENCE
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.NegationExpression._precedence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1653
+ * return NegationExpression.PRECEDENCE
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_9_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_9_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_9_to_string, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_9_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_smap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 1653, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 1653, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 1653, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 1653, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 1653, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1653, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.NegationExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_8_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_8_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_v_tmp = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1654
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * return "{0}({1})".format(self.getname(), values[0])
+ * tmp = values[0]
+ */
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1654, __pyx_L1_error)
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1655
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0]) # <<<<<<<<<<<<<<
+ * tmp = values[0]
+ * if tmp[0] == '-':
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1655, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1655, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1655, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1655, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1655, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1655, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1655, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1655, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1654
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * return "{0}({1})".format(self.getname(), values[0])
+ * tmp = values[0]
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1656
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ * tmp = values[0] # <<<<<<<<<<<<<<
+ * if tmp[0] == '-':
+ * i = 1
+ */
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_v_tmp = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1657
+ * return "{0}({1})".format(self.getname(), values[0])
+ * tmp = values[0]
+ * if tmp[0] == '-': # <<<<<<<<<<<<<<
+ * i = 1
+ * while tmp[i] == ' ':
+ */
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_tmp, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1657, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__16, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1657, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1658
+ * tmp = values[0]
+ * if tmp[0] == '-':
+ * i = 1 # <<<<<<<<<<<<<<
+ * while tmp[i] == ' ':
+ * i += 1
+ */
+ __Pyx_INCREF(__pyx_int_1);
+ __pyx_v_i = __pyx_int_1;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1659
+ * if tmp[0] == '-':
+ * i = 1
+ * while tmp[i] == ' ': # <<<<<<<<<<<<<<
+ * i += 1
+ * return tmp[i:]
+ */
+ while (1) {
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_tmp, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1659, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__17, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1659, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (!__pyx_t_1) break;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1660
+ * i = 1
+ * while tmp[i] == ' ':
+ * i += 1 # <<<<<<<<<<<<<<
+ * return tmp[i:]
+ * return "- "+tmp
+ */
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_i, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1660, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v_i, __pyx_t_2);
+ __pyx_t_2 = 0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1661
+ * while tmp[i] == ' ':
+ * i += 1
+ * return tmp[i:] # <<<<<<<<<<<<<<
+ * return "- "+tmp
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetSlice(__pyx_v_tmp, 0, 0, &__pyx_v_i, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1661, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1657
+ * return "{0}({1})".format(self.getname(), values[0])
+ * tmp = values[0]
+ * if tmp[0] == '-': # <<<<<<<<<<<<<<
+ * i = 1
+ * while tmp[i] == ' ':
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1662
+ * i += 1
+ * return tmp[i:]
+ * return "- "+tmp # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyNumber_Add(__pyx_kp_s__18, __pyx_v_tmp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1662, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1653
+ * return NegationExpression.PRECEDENCE
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.NegationExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_tmp);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1664
+ * return "- "+tmp
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return -result[0]
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_11_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_11_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_11_apply_operation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_11_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 1664, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 1664, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1664, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.NegationExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_10_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_10_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1665
+ *
+ * def _apply_operation(self, result):
+ * return -result[0] # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1665, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Negative(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1665, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1664
+ * return "- "+tmp
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return -result[0]
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.NegationExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1671
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22NPV_NegationExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22NPV_NegationExpression_1is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22NPV_NegationExpression_1is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_22NPV_NegationExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22NPV_NegationExpression_is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_22NPV_NegationExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1672
+ *
+ * def is_potentially_variable(self):
+ * return False # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1671
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1692
+ * __slots__ = ('_fcn',)
+ *
+ * def __init__(self, args, fcn=None): # <<<<<<<<<<<<<<
+ * self._args_ = args
+ * self._fcn = fcn
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_fcn = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_fcn,0};
+ PyObject* values[3] = {0,0,0};
+ values[2] = ((PyObject *)((PyObject *)Py_None));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 1692, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fcn);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1692, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_fcn = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1692, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExternalFunctionExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression___init__(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_fcn);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_fcn) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1693
+ *
+ * def __init__(self, args, fcn=None):
+ * self._args_ = args # <<<<<<<<<<<<<<
+ * self._fcn = fcn
+ *
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_args_2, __pyx_v_args) < 0) __PYX_ERR(0, 1693, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1694
+ * def __init__(self, args, fcn=None):
+ * self._args_ = args
+ * self._fcn = fcn # <<<<<<<<<<<<<<
+ *
+ * def nargs(self):
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fcn_2, __pyx_v_fcn) < 0) __PYX_ERR(0, 1694, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1692
+ * __slots__ = ('_fcn',)
+ *
+ * def __init__(self, args, fcn=None): # <<<<<<<<<<<<<<
+ * self._args_ = args
+ * self._fcn = fcn
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExternalFunctionExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1696
+ * self._fcn = fcn
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return len(self._args_)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_3nargs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_3nargs = {"nargs", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_3nargs, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_3nargs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_2nargs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_2nargs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ __Pyx_RefNannySetupContext("nargs", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1697
+ *
+ * def nargs(self):
+ * return len(self._args_) # <<<<<<<<<<<<<<
+ *
+ * def construct_node(self, args, memo):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1697, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1697, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1697, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1696
+ * self._fcn = fcn
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return len(self._args_)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExternalFunctionExpression.nargs", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1699
+ * return len(self._args_)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._fcn)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_5construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_5construct_node = {"construct_node", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_5construct_node, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_5construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_memo = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("construct_node (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_memo,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 1); __PYX_ERR(0, 1699, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 2); __PYX_ERR(0, 1699, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "construct_node") < 0)) __PYX_ERR(0, 1699, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_memo = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1699, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExternalFunctionExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_4construct_node(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_memo);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_4construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("construct_node", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1700
+ *
+ * def construct_node(self, args, memo):
+ * return self.__class__(args, self._fcn) # <<<<<<<<<<<<<<
+ *
+ * def __getstate__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1700, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fcn_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1700, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1700, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1700, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1700, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_args);
+ __Pyx_GIVEREF(__pyx_v_args);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1700, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1699
+ * return len(self._args_)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._fcn)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExternalFunctionExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1702
+ * return self.__class__(args, self._fcn)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(ExternalFunctionExpression, self).__getstate__()
+ * for i in ExternalFunctionExpression.__slots__:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_7__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_7__getstate__ = {"__getstate__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_7__getstate__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_7__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_6__getstate__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_6__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_state = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ __Pyx_RefNannySetupContext("__getstate__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1703
+ *
+ * def __getstate__(self):
+ * state = super(ExternalFunctionExpression, self).__getstate__() # <<<<<<<<<<<<<<
+ * for i in ExternalFunctionExpression.__slots__:
+ * state[i] = getattr(self, i)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExternalFunctionExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1703, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1703, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1703, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1703, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1703, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1703, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_state = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1704
+ * def __getstate__(self):
+ * state = super(ExternalFunctionExpression, self).__getstate__()
+ * for i in ExternalFunctionExpression.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self, i)
+ * return state
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExternalFunctionExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1704, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_slots); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1704, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1704, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1704, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1704, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1704, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1704, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1704, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_5(__pyx_t_1);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 1704, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1705
+ * state = super(ExternalFunctionExpression, self).__getstate__()
+ * for i in ExternalFunctionExpression.__slots__:
+ * state[i] = getattr(self, i) # <<<<<<<<<<<<<<
+ * return state
+ *
+ */
+ __pyx_t_3 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1705, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (unlikely(PyObject_SetItem(__pyx_v_state, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(0, 1705, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1704
+ * def __getstate__(self):
+ * state = super(ExternalFunctionExpression, self).__getstate__()
+ * for i in ExternalFunctionExpression.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self, i)
+ * return state
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1706
+ * for i in ExternalFunctionExpression.__slots__:
+ * state[i] = getattr(self, i)
+ * return state # <<<<<<<<<<<<<<
+ *
+ * def getname(self, *args, **kwds): #pragma: no cover
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_state);
+ __pyx_r = __pyx_v_state;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1702
+ * return self.__class__(args, self._fcn)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(ExternalFunctionExpression, self).__getstate__()
+ * for i in ExternalFunctionExpression.__slots__:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExternalFunctionExpression.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_state);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1708
+ * return state
+ *
+ * def getname(self, *args, **kwds): #pragma: no cover # <<<<<<<<<<<<<<
+ * return self._fcn.getname(*args, **kwds)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_9getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_9getname = {"getname", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_9getname, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_9getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_kwds = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname (wrapper)", 0);
+ __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
+ __Pyx_GOTREF(__pyx_v_kwds);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, used_pos_args, "getname") < 0)) __PYX_ERR(0, 1708, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("getname", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1708, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExternalFunctionExpression.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_8getname(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwds);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwds);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_8getname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwds) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("getname", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1709
+ *
+ * def getname(self, *args, **kwds): #pragma: no cover
+ * return self._fcn.getname(*args, **kwds) # <<<<<<<<<<<<<<
+ *
+ * def _compute_polynomial_degree(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fcn_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1709, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1709, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, __pyx_v_kwds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1709, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1708
+ * return state
+ *
+ * def getname(self, *args, **kwds): #pragma: no cover # <<<<<<<<<<<<<<
+ * return self._fcn.getname(*args, **kwds)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExternalFunctionExpression.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1711
+ * return self._fcn.getname(*args, **kwds)
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # If the expression is constant, then
+ * # this is detected earlier. Hence, we can safely
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_11_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_11_compute_polynomial_degree = {"_compute_polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_11_compute_polynomial_degree, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_11_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, 1); __PYX_ERR(0, 1711, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_compute_polynomial_degree") < 0)) __PYX_ERR(0, 1711, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1711, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExternalFunctionExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_10_compute_polynomial_degree(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_10_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_result) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1715
+ * # this is detected earlier. Hence, we can safely
+ * # return None.
+ * return None # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1711
+ * return self._fcn.getname(*args, **kwds)
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # If the expression is constant, then
+ * # this is detected earlier. Hence, we can safely
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1717
+ * return None
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return self._fcn.evaluate( result ) #pragma: no cover
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_13_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_13_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_13_apply_operation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_13_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 1717, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 1717, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1717, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExternalFunctionExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_12_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_12_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1718
+ *
+ * def _apply_operation(self, result):
+ * return self._fcn.evaluate( result ) #pragma: no cover # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fcn_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1718, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_evaluate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1718, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_result};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_result};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1718, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_result);
+ __Pyx_GIVEREF(__pyx_v_result);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_result);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1718, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1717
+ * return None
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return self._fcn.evaluate( result ) #pragma: no cover
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExternalFunctionExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1720
+ * return self._fcn.evaluate( result ) #pragma: no cover
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return "{0}({1})".format(self.getname(), ", ".join(values))
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_15_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_15_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_15_to_string, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_15_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_values = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_smap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 1720, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 1720, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 1720, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 1720, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 1720, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1720, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExternalFunctionExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_14_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_14_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1721
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * return "{0}({1})".format(self.getname(), ", ".join(values)) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1721, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1721, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1721, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1721, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyString_Join(__pyx_kp_s__19, __pyx_v_values); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1721, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1721, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1721, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1721, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1721, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1720
+ * return self._fcn.evaluate( result ) #pragma: no cover
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return "{0}({1})".format(self.getname(), ", ".join(values))
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ExternalFunctionExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1727
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_30NPV_ExternalFunctionExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_30NPV_ExternalFunctionExpression_1is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_30NPV_ExternalFunctionExpression_1is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_30NPV_ExternalFunctionExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_30NPV_ExternalFunctionExpression_is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_30NPV_ExternalFunctionExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1728
+ *
+ * def is_potentially_variable(self):
+ * return False # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1727
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1741
+ * PRECEDENCE = 2
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # PowExpression is a tricky thing. In general, a**b is
+ * # nonpolynomial, however, if b == 0, it is a constant
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_1_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_1_compute_polynomial_degree = {"_compute_polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_1_compute_polynomial_degree, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_1_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, 1); __PYX_ERR(0, 1741, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_compute_polynomial_degree") < 0)) __PYX_ERR(0, 1741, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1741, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.PowExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression__compute_polynomial_degree(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression__compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_v_l = NULL;
+ PyObject *__pyx_v_r = NULL;
+ PyObject *__pyx_v_exp = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ int __pyx_t_8;
+ int __pyx_t_9;
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1748
+ * # call this a non-polynomial expression, these exceptions occur
+ * # too frequently (and in particular, a**2)
+ * l,r = result # <<<<<<<<<<<<<<
+ * if isclose(r, 0):
+ * if isclose(l, 0):
+ */
+ if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) {
+ PyObject* sequence = __pyx_v_result;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 1748, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1748, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1748, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_3 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1748, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1748, __pyx_L1_error)
+ __pyx_t_4 = NULL;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L4_unpacking_done;
+ __pyx_L3_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 1748, __pyx_L1_error)
+ __pyx_L4_unpacking_done:;
+ }
+ __pyx_v_l = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __pyx_v_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1749
+ * # too frequently (and in particular, a**2)
+ * l,r = result
+ * if isclose(r, 0): # <<<<<<<<<<<<<<
+ * if isclose(l, 0):
+ * return 0
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1749, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_r, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1749, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_r, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1749, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1749, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_3) {
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_r);
+ __Pyx_GIVEREF(__pyx_v_r);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_int_0);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1749, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1749, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1750
+ * l,r = result
+ * if isclose(r, 0):
+ * if isclose(l, 0): # <<<<<<<<<<<<<<
+ * return 0
+ * # NOTE: use value before int() so that we don't
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1750, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_l, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1750, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_l, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1750, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1750, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_l);
+ __Pyx_GIVEREF(__pyx_v_l);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __pyx_v_l);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_int_0);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1750, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1751
+ * if isclose(r, 0):
+ * if isclose(l, 0):
+ * return 0 # <<<<<<<<<<<<<<
+ * # NOTE: use value before int() so that we don't
+ * # run into the disabled __int__ method on
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1750
+ * l,r = result
+ * if isclose(r, 0):
+ * if isclose(l, 0): # <<<<<<<<<<<<<<
+ * return 0
+ * # NOTE: use value before int() so that we don't
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1755
+ * # run into the disabled __int__ method on
+ * # NumericValue
+ * exp = value(self._args_[1], exception=False) # <<<<<<<<<<<<<<
+ * if exp is None:
+ * return None
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1755, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1755, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1755, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1755, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1755, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_exception, Py_False) < 0) __PYX_ERR(0, 1755, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1755, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_exp = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1756
+ * # NumericValue
+ * exp = value(self._args_[1], exception=False)
+ * if exp is None: # <<<<<<<<<<<<<<
+ * return None
+ * if exp == int(exp):
+ */
+ __pyx_t_7 = (__pyx_v_exp == Py_None);
+ __pyx_t_8 = (__pyx_t_7 != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1757
+ * exp = value(self._args_[1], exception=False)
+ * if exp is None:
+ * return None # <<<<<<<<<<<<<<
+ * if exp == int(exp):
+ * if l is not None and exp > 0:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1756
+ * # NumericValue
+ * exp = value(self._args_[1], exception=False)
+ * if exp is None: # <<<<<<<<<<<<<<
+ * return None
+ * if exp == int(exp):
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1758
+ * if exp is None:
+ * return None
+ * if exp == int(exp): # <<<<<<<<<<<<<<
+ * if l is not None and exp > 0:
+ * return l * exp
+ */
+ __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_v_exp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1758, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_exp, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1758, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1758, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1759
+ * return None
+ * if exp == int(exp):
+ * if l is not None and exp > 0: # <<<<<<<<<<<<<<
+ * return l * exp
+ * elif exp == 0:
+ */
+ __pyx_t_7 = (__pyx_v_l != Py_None);
+ __pyx_t_9 = (__pyx_t_7 != 0);
+ if (__pyx_t_9) {
+ } else {
+ __pyx_t_8 = __pyx_t_9;
+ goto __pyx_L10_bool_binop_done;
+ }
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_exp, __pyx_int_0, Py_GT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1759, __pyx_L1_error)
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 1759, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_8 = __pyx_t_9;
+ __pyx_L10_bool_binop_done:;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1760
+ * if exp == int(exp):
+ * if l is not None and exp > 0:
+ * return l * exp # <<<<<<<<<<<<<<
+ * elif exp == 0:
+ * return 0
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_v_l, __pyx_v_exp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1760, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1759
+ * return None
+ * if exp == int(exp):
+ * if l is not None and exp > 0: # <<<<<<<<<<<<<<
+ * return l * exp
+ * elif exp == 0:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1761
+ * if l is not None and exp > 0:
+ * return l * exp
+ * elif exp == 0: # <<<<<<<<<<<<<<
+ * return 0
+ * return None
+ */
+ __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v_exp, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1761, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 1761, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1762
+ * return l * exp
+ * elif exp == 0:
+ * return 0 # <<<<<<<<<<<<<<
+ * return None
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1761
+ * if l is not None and exp > 0:
+ * return l * exp
+ * elif exp == 0: # <<<<<<<<<<<<<<
+ * return 0
+ * return None
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1758
+ * if exp is None:
+ * return None
+ * if exp == int(exp): # <<<<<<<<<<<<<<
+ * if l is not None and exp > 0:
+ * return l * exp
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1749
+ * # too frequently (and in particular, a**2)
+ * l,r = result
+ * if isclose(r, 0): # <<<<<<<<<<<<<<
+ * if isclose(l, 0):
+ * return 0
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1763
+ * elif exp == 0:
+ * return 0
+ * return None # <<<<<<<<<<<<<<
+ *
+ * def _is_fixed(self, args):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1741
+ * PRECEDENCE = 2
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # PowExpression is a tricky thing. In general, a**b is
+ * # nonpolynomial, however, if b == 0, it is a constant
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.PowExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_l);
+ __Pyx_XDECREF(__pyx_v_r);
+ __Pyx_XDECREF(__pyx_v_exp);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1765
+ * return None
+ *
+ * def _is_fixed(self, args): # <<<<<<<<<<<<<<
+ * assert(len(args) == 2)
+ * if not args[1]:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_3_is_fixed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_3_is_fixed = {"_is_fixed", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_3_is_fixed, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_3_is_fixed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_is_fixed (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_is_fixed", 1, 2, 2, 1); __PYX_ERR(0, 1765, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_is_fixed") < 0)) __PYX_ERR(0, 1765, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_is_fixed", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1765, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.PowExpression._is_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_2_is_fixed(__pyx_self, __pyx_v_self, __pyx_v_args);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_2_is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ Py_ssize_t __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ int __pyx_t_12;
+ __Pyx_RefNannySetupContext("_is_fixed", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1766
+ *
+ * def _is_fixed(self, args):
+ * assert(len(args) == 2) # <<<<<<<<<<<<<<
+ * if not args[1]:
+ * return False
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ __pyx_t_1 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 1766, __pyx_L1_error)
+ if (unlikely(!((__pyx_t_1 == 2) != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+ __PYX_ERR(0, 1766, __pyx_L1_error)
+ }
+ }
+ #endif
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1767
+ * def _is_fixed(self, args):
+ * assert(len(args) == 2)
+ * if not args[1]: # <<<<<<<<<<<<<<
+ * return False
+ * return args[0] or isclose(value(self._args_[1]), 0)
+ */
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_args, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1767, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 1767, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1768
+ * assert(len(args) == 2)
+ * if not args[1]:
+ * return False # <<<<<<<<<<<<<<
+ * return args[0] or isclose(value(self._args_[1]), 0)
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1767
+ * def _is_fixed(self, args):
+ * assert(len(args) == 2)
+ * if not args[1]: # <<<<<<<<<<<<<<
+ * return False
+ * return args[0] or isclose(value(self._args_[1]), 0)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1769
+ * if not args[1]:
+ * return False
+ * return args[0] or isclose(value(self._args_[1]), 0) # <<<<<<<<<<<<<<
+ *
+ * def _precedence(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ if (!__pyx_t_4) {
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_5);
+ __pyx_t_2 = __pyx_t_5;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = __Pyx_GetItemInt(__pyx_t_9, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_10};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_10};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ __pyx_t_12 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_12 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_int_0};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_int_0};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_12, 2+__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(2+__pyx_t_12); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_12, __pyx_t_7);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_12, __pyx_int_0);
+ __pyx_t_7 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1769, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_INCREF(__pyx_t_5);
+ __pyx_t_2 = __pyx_t_5;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_L4_bool_binop_done:;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1765
+ * return None
+ *
+ * def _is_fixed(self, args): # <<<<<<<<<<<<<<
+ * assert(len(args) == 2)
+ * if not args[1]:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.PowExpression._is_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1771
+ * return args[0] or isclose(value(self._args_[1]), 0)
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return PowExpression.PRECEDENCE
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_5_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_5_precedence = {"_precedence", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_5_precedence, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_5_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_precedence (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_4_precedence(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_4_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_precedence", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1772
+ *
+ * def _precedence(self):
+ * return PowExpression.PRECEDENCE # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_PowExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1772, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PRECEDENCE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1772, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1771
+ * return args[0] or isclose(value(self._args_[1]), 0)
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return PowExpression.PRECEDENCE
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.PowExpression._precedence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1774
+ * return PowExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * return _l ** _r
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_7_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_7_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_7_apply_operation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_7_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 1774, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 1774, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1774, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.PowExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_6_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_6_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_v__l = NULL;
+ PyObject *__pyx_v__r = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1775
+ *
+ * def _apply_operation(self, result):
+ * _l, _r = result # <<<<<<<<<<<<<<
+ * return _l ** _r
+ *
+ */
+ if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) {
+ PyObject* sequence = __pyx_v_result;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 1775, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1775, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1775, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_3 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1775, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1775, __pyx_L1_error)
+ __pyx_t_4 = NULL;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L4_unpacking_done;
+ __pyx_L3_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 1775, __pyx_L1_error)
+ __pyx_L4_unpacking_done:;
+ }
+ __pyx_v__l = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __pyx_v__r = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1776
+ * def _apply_operation(self, result):
+ * _l, _r = result
+ * return _l ** _r # <<<<<<<<<<<<<<
+ *
+ * def getname(self, *args, **kwds):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyNumber_Power(__pyx_v__l, __pyx_v__r, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1776, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1774
+ * return PowExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * return _l ** _r
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.PowExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v__l);
+ __Pyx_XDECREF(__pyx_v__r);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1778
+ * return _l ** _r
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'pow'
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_9getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_9getname = {"getname", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_9getname, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_9getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_kwds = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname (wrapper)", 0);
+ __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
+ __Pyx_GOTREF(__pyx_v_kwds);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, used_pos_args, "getname") < 0)) __PYX_ERR(0, 1778, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("getname", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1778, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.PowExpression.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_8getname(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwds);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwds);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_8getname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1779
+ *
+ * def getname(self, *args, **kwds):
+ * return 'pow' # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_n_s_pow);
+ __pyx_r = __pyx_n_s_pow;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1778
+ * return _l ** _r
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'pow'
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1781
+ * return 'pow'
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_11_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_11_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_11_to_string, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_11_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_smap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 1781, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 1781, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 1781, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 1781, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 1781, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1781, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.PowExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_10_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_10_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1782
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ * return "{0}**{1}".format(values[0], values[1])
+ */
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1782, __pyx_L1_error)
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1783
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1]) # <<<<<<<<<<<<<<
+ * return "{0}**{1}".format(values[0], values[1])
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_2, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1783, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1783, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_values, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_4, __pyx_t_5, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1783, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_4, __pyx_t_5, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1783, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_6);
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1782
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ * return "{0}**{1}".format(values[0], values[1])
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1784
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ * return "{0}**{1}".format(values[0], values[1]) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_3, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_values, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_9, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1784, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_9, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1784, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_t_6);
+ __pyx_t_9 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1781
+ * return 'pow'
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.PowExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1790
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17NPV_PowExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17NPV_PowExpression_1is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17NPV_PowExpression_1is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17NPV_PowExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17NPV_PowExpression_is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17NPV_PowExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1791
+ *
+ * def is_potentially_variable(self):
+ * return False # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1790
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1804
+ * PRECEDENCE = 4
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ProductExpression.PRECEDENCE
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_1_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_1_precedence = {"_precedence", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_1_precedence, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_1_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_precedence (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression__precedence(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression__precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_precedence", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1805
+ *
+ * def _precedence(self):
+ * return ProductExpression.PRECEDENCE # <<<<<<<<<<<<<<
+ *
+ * def _compute_polynomial_degree(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProductExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1805, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PRECEDENCE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1805, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1804
+ * PRECEDENCE = 4
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ProductExpression.PRECEDENCE
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ProductExpression._precedence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1807
+ * return ProductExpression.PRECEDENCE
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # NB: We can't use sum() here because None (non-polynomial)
+ * # overrides a numeric value (and sum() just ignores it - or
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_3_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_3_compute_polynomial_degree = {"_compute_polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_3_compute_polynomial_degree, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_3_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, 1); __PYX_ERR(0, 1807, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_compute_polynomial_degree") < 0)) __PYX_ERR(0, 1807, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1807, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ProductExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_2_compute_polynomial_degree(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_2_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_v_a = NULL;
+ PyObject *__pyx_v_b = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ int __pyx_t_5;
+ int __pyx_t_6;
+ int __pyx_t_7;
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1811
+ * # overrides a numeric value (and sum() just ignores it - or
+ * # errors in py3k)
+ * a, b = result # <<<<<<<<<<<<<<
+ * if a is None or b is None:
+ * return None
+ */
+ if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) {
+ PyObject* sequence = __pyx_v_result;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 1811, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_3 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1811, __pyx_L1_error)
+ __pyx_t_4 = NULL;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L4_unpacking_done;
+ __pyx_L3_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 1811, __pyx_L1_error)
+ __pyx_L4_unpacking_done:;
+ }
+ __pyx_v_a = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __pyx_v_b = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1812
+ * # errors in py3k)
+ * a, b = result
+ * if a is None or b is None: # <<<<<<<<<<<<<<
+ * return None
+ * else:
+ */
+ __pyx_t_6 = (__pyx_v_a == Py_None);
+ __pyx_t_7 = (__pyx_t_6 != 0);
+ if (!__pyx_t_7) {
+ } else {
+ __pyx_t_5 = __pyx_t_7;
+ goto __pyx_L6_bool_binop_done;
+ }
+ __pyx_t_7 = (__pyx_v_b == Py_None);
+ __pyx_t_6 = (__pyx_t_7 != 0);
+ __pyx_t_5 = __pyx_t_6;
+ __pyx_L6_bool_binop_done:;
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1813
+ * a, b = result
+ * if a is None or b is None:
+ * return None # <<<<<<<<<<<<<<
+ * else:
+ * return a + b
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1812
+ * # errors in py3k)
+ * a, b = result
+ * if a is None or b is None: # <<<<<<<<<<<<<<
+ * return None
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1815
+ * return None
+ * else:
+ * return a + b # <<<<<<<<<<<<<<
+ *
+ * def getname(self, *args, **kwds):
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyNumber_Add(__pyx_v_a, __pyx_v_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1815, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1807
+ * return ProductExpression.PRECEDENCE
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # NB: We can't use sum() here because None (non-polynomial)
+ * # overrides a numeric value (and sum() just ignores it - or
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ProductExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_a);
+ __Pyx_XDECREF(__pyx_v_b);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1817
+ * return a + b
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'prod'
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_5getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_5getname = {"getname", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_5getname, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_5getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_kwds = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname (wrapper)", 0);
+ __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
+ __Pyx_GOTREF(__pyx_v_kwds);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, used_pos_args, "getname") < 0)) __PYX_ERR(0, 1817, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("getname", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1817, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ProductExpression.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_4getname(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwds);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwds);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_4getname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1818
+ *
+ * def getname(self, *args, **kwds):
+ * return 'prod' # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_n_s_prod);
+ __pyx_r = __pyx_n_s_prod;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1817
+ * return a + b
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'prod'
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1820
+ * return 'prod'
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * return _l * _r
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_7_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_7_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_7_apply_operation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_7_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 1820, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 1820, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1820, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ProductExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_6_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_6_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_v__l = NULL;
+ PyObject *__pyx_v__r = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1821
+ *
+ * def _apply_operation(self, result):
+ * _l, _r = result # <<<<<<<<<<<<<<
+ * return _l * _r
+ *
+ */
+ if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) {
+ PyObject* sequence = __pyx_v_result;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 1821, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1821, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1821, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_3 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1821, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(0, 1821, __pyx_L1_error)
+ __pyx_t_4 = NULL;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L4_unpacking_done;
+ __pyx_L3_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 1821, __pyx_L1_error)
+ __pyx_L4_unpacking_done:;
+ }
+ __pyx_v__l = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __pyx_v__r = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1822
+ * def _apply_operation(self, result):
+ * _l, _r = result
+ * return _l * _r # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v__l, __pyx_v__r); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1820
+ * return 'prod'
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * return _l * _r
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ProductExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v__l);
+ __Pyx_XDECREF(__pyx_v__r);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1824
+ * return _l * _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_9_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_9_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_9_to_string, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_9_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_smap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 1824, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 1824, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 1824, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 1824, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 1824, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1824, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ProductExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_8_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_8_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1825
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ * if values[0] == "1" or values[0] == "1.0":
+ */
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1825, __pyx_L1_error)
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1826
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1]) # <<<<<<<<<<<<<<
+ * if values[0] == "1" or values[0] == "1.0":
+ * return values[1]
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_2, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1826, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1826, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_values, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_4, __pyx_t_5, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1826, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_4, __pyx_t_5, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1826, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_6);
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1825
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ * if values[0] == "1" or values[0] == "1.0":
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1827
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ * if values[0] == "1" or values[0] == "1.0": # <<<<<<<<<<<<<<
+ * return values[1]
+ * if values[0] == "-1" or values[0] == "-1.0":
+ */
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s_1, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1827, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (!__pyx_t_10) {
+ } else {
+ __pyx_t_1 = __pyx_t_10;
+ goto __pyx_L5_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s_1_0, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1827, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = __pyx_t_10;
+ __pyx_L5_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1828
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ * if values[0] == "1" or values[0] == "1.0":
+ * return values[1] # <<<<<<<<<<<<<<
+ * if values[0] == "-1" or values[0] == "-1.0":
+ * return "- {0}".format(values[1])
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1827
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ * if values[0] == "1" or values[0] == "1.0": # <<<<<<<<<<<<<<
+ * return values[1]
+ * if values[0] == "-1" or values[0] == "-1.0":
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1829
+ * if values[0] == "1" or values[0] == "1.0":
+ * return values[1]
+ * if values[0] == "-1" or values[0] == "-1.0": # <<<<<<<<<<<<<<
+ * return "- {0}".format(values[1])
+ * return "{0}*{1}".format(values[0],values[1])
+ */
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1829, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s_1_2, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1829, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (!__pyx_t_10) {
+ } else {
+ __pyx_t_1 = __pyx_t_10;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1829, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s_1_0_2, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 1829, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = __pyx_t_10;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1830
+ * return values[1]
+ * if values[0] == "-1" or values[0] == "-1.0":
+ * return "- {0}".format(values[1]) # <<<<<<<<<<<<<<
+ * return "{0}*{1}".format(values[0],values[1])
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_3, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1830, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_values, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1830, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1830, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_9};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1830, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_9};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1830, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1830, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1830, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1829
+ * if values[0] == "1" or values[0] == "1.0":
+ * return values[1]
+ * if values[0] == "-1" or values[0] == "-1.0": # <<<<<<<<<<<<<<
+ * return "- {0}".format(values[1])
+ * return "{0}*{1}".format(values[0],values[1])
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1831
+ * if values[0] == "-1" or values[0] == "-1.0":
+ * return "- {0}".format(values[1])
+ * return "{0}*{1}".format(values[0],values[1]) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_4, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_values, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_6 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_t_9};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1831, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_t_9};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1831, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_t_9);
+ __pyx_t_5 = 0;
+ __pyx_t_9 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1824
+ * return _l * _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ProductExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1837
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_21NPV_ProductExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_21NPV_ProductExpression_1is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_21NPV_ProductExpression_1is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_21NPV_ProductExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21NPV_ProductExpression_is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_21NPV_ProductExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1838
+ *
+ * def is_potentially_variable(self):
+ * return False # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1837
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1850
+ * PRECEDENCE = 3.5
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 1
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_1nargs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_1nargs = {"nargs", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_1nargs, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_1nargs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_nargs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1851
+ *
+ * def nargs(self):
+ * return 1 # <<<<<<<<<<<<<<
+ *
+ * def _precedence(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_1);
+ __pyx_r = __pyx_int_1;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1850
+ * PRECEDENCE = 3.5
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 1
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1853
+ * return 1
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ReciprocalExpression.PRECEDENCE
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_3_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_3_precedence = {"_precedence", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_3_precedence, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_3_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_precedence (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_2_precedence(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_2_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_precedence", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1854
+ *
+ * def _precedence(self):
+ * return ReciprocalExpression.PRECEDENCE # <<<<<<<<<<<<<<
+ *
+ * def _compute_polynomial_degree(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReciprocalExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1854, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PRECEDENCE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1854, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1853
+ * return 1
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ReciprocalExpression.PRECEDENCE
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ReciprocalExpression._precedence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1856
+ * return ReciprocalExpression.PRECEDENCE
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * if result[0] is 0:
+ * return 0
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_5_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_5_compute_polynomial_degree = {"_compute_polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_5_compute_polynomial_degree, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_5_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, 1); __PYX_ERR(0, 1856, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_compute_polynomial_degree") < 0)) __PYX_ERR(0, 1856, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1856, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ReciprocalExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_4_compute_polynomial_degree(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_4_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1857
+ *
+ * def _compute_polynomial_degree(self, result):
+ * if result[0] is 0: # <<<<<<<<<<<<<<
+ * return 0
+ * return None
+ */
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1857, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = (__pyx_t_1 == __pyx_int_0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1858
+ * def _compute_polynomial_degree(self, result):
+ * if result[0] is 0:
+ * return 0 # <<<<<<<<<<<<<<
+ * return None
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1857
+ *
+ * def _compute_polynomial_degree(self, result):
+ * if result[0] is 0: # <<<<<<<<<<<<<<
+ * return 0
+ * return None
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1859
+ * if result[0] is 0:
+ * return 0
+ * return None # <<<<<<<<<<<<<<
+ *
+ * def getname(self, *args, **kwds):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1856
+ * return ReciprocalExpression.PRECEDENCE
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * if result[0] is 0:
+ * return 0
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ReciprocalExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1861
+ * return None
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'recip'
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_7getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_7getname = {"getname", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_7getname, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_7getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_kwds = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname (wrapper)", 0);
+ __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
+ __Pyx_GOTREF(__pyx_v_kwds);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, used_pos_args, "getname") < 0)) __PYX_ERR(0, 1861, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("getname", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1861, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ReciprocalExpression.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_6getname(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwds);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwds);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_6getname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1862
+ *
+ * def getname(self, *args, **kwds):
+ * return 'recip' # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_n_s_recip);
+ __pyx_r = __pyx_n_s_recip;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1861
+ * return None
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'recip'
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1864
+ * return 'recip'
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_9_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_9_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_9_to_string, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_9_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_smap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 1864, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 1864, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 1864, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 1864, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 1864, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1864, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ReciprocalExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_8_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_8_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1865
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * return "{0}({1})".format(self.getname(), values[0])
+ * return "(1/{0})".format(values[0])
+ */
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 1865, __pyx_L1_error)
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1866
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0]) # <<<<<<<<<<<<<<
+ * return "(1/{0})".format(values[0])
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1866, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1866, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1866, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1866, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1865
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * return "{0}({1})".format(self.getname(), values[0])
+ * return "(1/{0})".format(values[0])
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1867
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ * return "(1/{0})".format(values[0]) # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_1_0_3, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1867, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1867, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1867, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1867, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1867, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1867, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1867, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1864
+ * return 'recip'
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ReciprocalExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1869
+ * return "(1/{0})".format(values[0])
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return 1 / result[0]
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_11_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_11_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_11_apply_operation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_11_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 1869, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 1869, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1869, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ReciprocalExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_10_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_10_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1870
+ *
+ * def _apply_operation(self, result):
+ * return 1 / result[0] # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1870, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyNumber_Divide(__pyx_int_1, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1870, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1869
+ * return "(1/{0})".format(values[0])
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return 1 / result[0]
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ReciprocalExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1876
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_24NPV_ReciprocalExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_24NPV_ReciprocalExpression_1is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_24NPV_ReciprocalExpression_1is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_24NPV_ReciprocalExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_24NPV_ReciprocalExpression_is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_24NPV_ReciprocalExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1877
+ *
+ * def is_potentially_variable(self):
+ * return False # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1876
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1888
+ * __slots__ = ()
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # NB: We can't use max() here because None (non-polynomial)
+ * # overrides a numeric value (and max() just ignores it)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_25_LinearOperatorExpression_1_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_25_LinearOperatorExpression_1_compute_polynomial_degree = {"_compute_polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_25_LinearOperatorExpression_1_compute_polynomial_degree, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_25_LinearOperatorExpression_1_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, 1); __PYX_ERR(0, 1888, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_compute_polynomial_degree") < 0)) __PYX_ERR(0, 1888, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1888, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._LinearOperatorExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_25_LinearOperatorExpression__compute_polynomial_degree(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_25_LinearOperatorExpression__compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_v_ans = NULL;
+ PyObject *__pyx_v_x = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *(*__pyx_t_3)(PyObject *);
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ int __pyx_t_6;
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1891
+ * # NB: We can't use max() here because None (non-polynomial)
+ * # overrides a numeric value (and max() just ignores it)
+ * ans = 0 # <<<<<<<<<<<<<<
+ * for x in result:
+ * if x is None:
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_v_ans = __pyx_int_0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1892
+ * # overrides a numeric value (and max() just ignores it)
+ * ans = 0
+ * for x in result: # <<<<<<<<<<<<<<
+ * if x is None:
+ * return None
+ */
+ if (likely(PyList_CheckExact(__pyx_v_result)) || PyTuple_CheckExact(__pyx_v_result)) {
+ __pyx_t_1 = __pyx_v_result; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ __pyx_t_3 = NULL;
+ } else {
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1892, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1892, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_3)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1892, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1892, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 1892, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1892, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_3(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 1892, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1893
+ * ans = 0
+ * for x in result:
+ * if x is None: # <<<<<<<<<<<<<<
+ * return None
+ * elif ans < x:
+ */
+ __pyx_t_5 = (__pyx_v_x == Py_None);
+ __pyx_t_6 = (__pyx_t_5 != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1894
+ * for x in result:
+ * if x is None:
+ * return None # <<<<<<<<<<<<<<
+ * elif ans < x:
+ * ans = x
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1893
+ * ans = 0
+ * for x in result:
+ * if x is None: # <<<<<<<<<<<<<<
+ * return None
+ * elif ans < x:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1895
+ * if x is None:
+ * return None
+ * elif ans < x: # <<<<<<<<<<<<<<
+ * ans = x
+ * return ans
+ */
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_ans, __pyx_v_x, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1895, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1895, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1896
+ * return None
+ * elif ans < x:
+ * ans = x # <<<<<<<<<<<<<<
+ * return ans
+ *
+ */
+ __Pyx_INCREF(__pyx_v_x);
+ __Pyx_DECREF_SET(__pyx_v_ans, __pyx_v_x);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1895
+ * if x is None:
+ * return None
+ * elif ans < x: # <<<<<<<<<<<<<<
+ * ans = x
+ * return ans
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1892
+ * # overrides a numeric value (and max() just ignores it)
+ * ans = 0
+ * for x in result: # <<<<<<<<<<<<<<
+ * if x is None:
+ * return None
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1897
+ * elif ans < x:
+ * ans = x
+ * return ans # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_ans);
+ __pyx_r = __pyx_v_ans;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1888
+ * __slots__ = ()
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # NB: We can't use max() here because None (non-polynomial)
+ * # overrides a numeric value (and max() just ignores it)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._LinearOperatorExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_ans);
+ __Pyx_XDECREF(__pyx_v_x);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1915
+ * PRECEDENCE = 9
+ *
+ * def __init__(self, args, strict): # <<<<<<<<<<<<<<
+ * super(RangedExpression,self).__init__(args)
+ * self._strict = strict
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_strict = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_strict,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 1915, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_strict)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 1915, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1915, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_strict = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1915, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.RangedExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression___init__(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_strict);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_strict) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1916
+ *
+ * def __init__(self, args, strict):
+ * super(RangedExpression,self).__init__(args) # <<<<<<<<<<<<<<
+ * self._strict = strict
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RangedExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1916, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1916, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1916, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1916, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_args};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_args};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1916, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_args);
+ __Pyx_GIVEREF(__pyx_v_args);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_args);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1916, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1917
+ * def __init__(self, args, strict):
+ * super(RangedExpression,self).__init__(args)
+ * self._strict = strict # <<<<<<<<<<<<<<
+ *
+ * def nargs(self):
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_strict_2, __pyx_v_strict) < 0) __PYX_ERR(0, 1917, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1915
+ * PRECEDENCE = 9
+ *
+ * def __init__(self, args, strict): # <<<<<<<<<<<<<<
+ * super(RangedExpression,self).__init__(args)
+ * self._strict = strict
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.RangedExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1919
+ * self._strict = strict
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 3
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_3nargs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_3nargs = {"nargs", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_3nargs, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_3nargs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_2nargs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_2nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1920
+ *
+ * def nargs(self):
+ * return 3 # <<<<<<<<<<<<<<
+ *
+ * def construct_node(self, args, memo):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_3);
+ __pyx_r = __pyx_int_3;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1919
+ * self._strict = strict
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 3
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1922
+ * return 3
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._strict)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_5construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_5construct_node = {"construct_node", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_5construct_node, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_5construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_memo = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("construct_node (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_memo,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 1); __PYX_ERR(0, 1922, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 2); __PYX_ERR(0, 1922, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "construct_node") < 0)) __PYX_ERR(0, 1922, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_memo = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1922, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.RangedExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_4construct_node(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_memo);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_4construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("construct_node", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1923
+ *
+ * def construct_node(self, args, memo):
+ * return self.__class__(args, self._strict) # <<<<<<<<<<<<<<
+ *
+ * def __getstate__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1923, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1923, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1923, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1923, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1923, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_args);
+ __Pyx_GIVEREF(__pyx_v_args);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1923, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1922
+ * return 3
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._strict)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.RangedExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1925
+ * return self.__class__(args, self._strict)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(RangedExpression, self).__getstate__()
+ * for i in RangedExpression.__slots__:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_7__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_7__getstate__ = {"__getstate__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_7__getstate__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_7__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_6__getstate__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_6__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_state = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ __Pyx_RefNannySetupContext("__getstate__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1926
+ *
+ * def __getstate__(self):
+ * state = super(RangedExpression, self).__getstate__() # <<<<<<<<<<<<<<
+ * for i in RangedExpression.__slots__:
+ * state[i] = getattr(self, i)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RangedExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1926, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_state = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1927
+ * def __getstate__(self):
+ * state = super(RangedExpression, self).__getstate__()
+ * for i in RangedExpression.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self, i)
+ * return state
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RangedExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1927, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_slots); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1927, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1927, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1927, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1927, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1927, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1927, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1927, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_5(__pyx_t_1);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 1927, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1928
+ * state = super(RangedExpression, self).__getstate__()
+ * for i in RangedExpression.__slots__:
+ * state[i] = getattr(self, i) # <<<<<<<<<<<<<<
+ * return state
+ *
+ */
+ __pyx_t_3 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1928, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (unlikely(PyObject_SetItem(__pyx_v_state, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(0, 1928, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1927
+ * def __getstate__(self):
+ * state = super(RangedExpression, self).__getstate__()
+ * for i in RangedExpression.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self, i)
+ * return state
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1929
+ * for i in RangedExpression.__slots__:
+ * state[i] = getattr(self, i)
+ * return state # <<<<<<<<<<<<<<
+ *
+ * def __nonzero__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_state);
+ __pyx_r = __pyx_v_state;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1925
+ * return self.__class__(args, self._strict)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(RangedExpression, self).__getstate__()
+ * for i in RangedExpression.__slots__:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.RangedExpression.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_state);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1931
+ * return state
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * return bool(self())
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_9__nonzero__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_9__nonzero__ = {"__nonzero__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_9__nonzero__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_9__nonzero__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_8__nonzero__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_8__nonzero__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ __Pyx_RefNannySetupContext("__nonzero__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1932
+ *
+ * def __nonzero__(self):
+ * return bool(self()) # <<<<<<<<<<<<<<
+ *
+ * __bool__ = __nonzero__
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_t_2 = __pyx_v_self; __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1932, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1932, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1931
+ * return state
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * return bool(self())
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.RangedExpression.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1936
+ * __bool__ = __nonzero__
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_11is_relational(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_11is_relational = {"is_relational", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_11is_relational, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_11is_relational(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_relational (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_10is_relational(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_10is_relational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_relational", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1937
+ *
+ * def is_relational(self):
+ * return True # <<<<<<<<<<<<<<
+ *
+ * def _precedence(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1936
+ * __bool__ = __nonzero__
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1939
+ * return True
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return RangedExpression.PRECEDENCE
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_13_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_13_precedence = {"_precedence", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_13_precedence, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_13_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_precedence (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_12_precedence(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_12_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_precedence", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1940
+ *
+ * def _precedence(self):
+ * return RangedExpression.PRECEDENCE # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_RangedExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1940, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PRECEDENCE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1940, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1939
+ * return True
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return RangedExpression.PRECEDENCE
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.RangedExpression._precedence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1942
+ * return RangedExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _b, _r = result
+ * if not self._strict[0]:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_15_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_15_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_15_apply_operation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_15_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 1942, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 1942, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1942, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.RangedExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_14_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_14_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_v__l = NULL;
+ PyObject *__pyx_v__b = NULL;
+ PyObject *__pyx_v__r = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ int __pyx_t_6;
+ int __pyx_t_7;
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1943
+ *
+ * def _apply_operation(self, result):
+ * _l, _b, _r = result # <<<<<<<<<<<<<<
+ * if not self._strict[0]:
+ * if not self._strict[1]:
+ */
+ if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) {
+ PyObject* sequence = __pyx_v_result;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 3)) {
+ if (size > 3) __Pyx_RaiseTooManyValuesError(3);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 1943, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 2);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1943, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1943, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1943, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_4 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1943, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ index = 2; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 3) < 0) __PYX_ERR(0, 1943, __pyx_L1_error)
+ __pyx_t_5 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L4_unpacking_done;
+ __pyx_L3_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 1943, __pyx_L1_error)
+ __pyx_L4_unpacking_done:;
+ }
+ __pyx_v__l = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __pyx_v__b = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __pyx_v__r = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1944
+ * def _apply_operation(self, result):
+ * _l, _b, _r = result
+ * if not self._strict[0]: # <<<<<<<<<<<<<<
+ * if not self._strict[1]:
+ * return _l <= _b and _b <= _r
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1944, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1944, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1944, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_7 = ((!__pyx_t_6) != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1945
+ * _l, _b, _r = result
+ * if not self._strict[0]:
+ * if not self._strict[1]: # <<<<<<<<<<<<<<
+ * return _l <= _b and _b <= _r
+ * else:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1945, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1945, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1945, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = ((!__pyx_t_7) != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1946
+ * if not self._strict[0]:
+ * if not self._strict[1]:
+ * return _l <= _b and _b <= _r # <<<<<<<<<<<<<<
+ * else:
+ * return _l <= _b and _b < _r
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v__l, __pyx_v__b, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1946, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1946, __pyx_L1_error)
+ if (__pyx_t_6) {
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_3 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v__b, __pyx_v__r, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1946, __pyx_L1_error)
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_3 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_L7_bool_binop_done:;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1945
+ * _l, _b, _r = result
+ * if not self._strict[0]:
+ * if not self._strict[1]: # <<<<<<<<<<<<<<
+ * return _l <= _b and _b <= _r
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1948
+ * return _l <= _b and _b <= _r
+ * else:
+ * return _l <= _b and _b < _r # <<<<<<<<<<<<<<
+ * elif not self._strict[1]:
+ * return _l < _b and _b <= _r
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v__l, __pyx_v__b, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1948, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1948, __pyx_L1_error)
+ if (__pyx_t_6) {
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_3 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L9_bool_binop_done;
+ }
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v__b, __pyx_v__r, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1948, __pyx_L1_error)
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_3 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_L9_bool_binop_done:;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1944
+ * def _apply_operation(self, result):
+ * _l, _b, _r = result
+ * if not self._strict[0]: # <<<<<<<<<<<<<<
+ * if not self._strict[1]:
+ * return _l <= _b and _b <= _r
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1949
+ * else:
+ * return _l <= _b and _b < _r
+ * elif not self._strict[1]: # <<<<<<<<<<<<<<
+ * return _l < _b and _b <= _r
+ * else:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1949, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1949, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 1949, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_7 = ((!__pyx_t_6) != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1950
+ * return _l <= _b and _b < _r
+ * elif not self._strict[1]:
+ * return _l < _b and _b <= _r # <<<<<<<<<<<<<<
+ * else:
+ * return _l < _b and _b < _r
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v__l, __pyx_v__b, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1950, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1950, __pyx_L1_error)
+ if (__pyx_t_7) {
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_2 = __pyx_t_3;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L11_bool_binop_done;
+ }
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v__b, __pyx_v__r, Py_LE); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1950, __pyx_L1_error)
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_2 = __pyx_t_3;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_L11_bool_binop_done:;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1949
+ * else:
+ * return _l <= _b and _b < _r
+ * elif not self._strict[1]: # <<<<<<<<<<<<<<
+ * return _l < _b and _b <= _r
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1952
+ * return _l < _b and _b <= _r
+ * else:
+ * return _l < _b and _b < _r # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v__l, __pyx_v__b, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1952, __pyx_L1_error)
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1952, __pyx_L1_error)
+ if (__pyx_t_7) {
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_2 = __pyx_t_3;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L13_bool_binop_done;
+ }
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v__b, __pyx_v__r, Py_LT); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1952, __pyx_L1_error)
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_2 = __pyx_t_3;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_L13_bool_binop_done:;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1942
+ * return RangedExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _b, _r = result
+ * if not self._strict[0]:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.RangedExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v__l);
+ __Pyx_XDECREF(__pyx_v__b);
+ __Pyx_XDECREF(__pyx_v__r);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1954
+ * return _l < _b and _b < _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return "{0} {1} {2} {3} {4}".format(values[0], '<' if self._strict[0] else '<=', values[1], '<' if self._strict[1] else '<=', values[2])
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_17_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_17_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_17_to_string, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_17_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_values = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_smap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 1954, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 1954, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 1954, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 1954, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 1954, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1954, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.RangedExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_16_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_16_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1955
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * return "{0} {1} {2} {3} {4}".format(values[0], '<' if self._strict[0] else '<=', values[1], '<' if self._strict[1] else '<=', values[2]) # <<<<<<<<<<<<<<
+ *
+ * def is_constant(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_2_3_4, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1955, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1955, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1955, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1955, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1955, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_7) {
+ __Pyx_INCREF(__pyx_kp_s__20);
+ __pyx_t_4 = __pyx_kp_s__20;
+ } else {
+ __Pyx_INCREF(__pyx_kp_s__21);
+ __pyx_t_4 = __pyx_kp_s__21;
+ }
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_values, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1955, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1955, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1955, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 1955, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ if (__pyx_t_7) {
+ __Pyx_INCREF(__pyx_kp_s__20);
+ __pyx_t_5 = __pyx_kp_s__20;
+ } else {
+ __Pyx_INCREF(__pyx_kp_s__21);
+ __pyx_t_5 = __pyx_kp_s__21;
+ }
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_values, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 1955, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_8 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_6, __pyx_t_5, __pyx_t_9};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 5+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1955, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[6] = {__pyx_t_8, __pyx_t_3, __pyx_t_4, __pyx_t_6, __pyx_t_5, __pyx_t_9};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 5+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1955, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(5+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 1955, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_10, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_10, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_10, __pyx_t_9);
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_9 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1955, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1954
+ * return _l < _b and _b < _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return "{0} {1} {2} {3} {4}".format(values[0], '<' if self._strict[0] else '<=', values[1], '<' if self._strict[1] else '<=', values[2])
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.RangedExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1957
+ * return "{0} {1} {2} {3} {4}".format(values[0], '<' if self._strict[0] else '<=', values[1], '<' if self._strict[1] else '<=', values[2])
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant()) and \
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_19is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_19is_constant = {"is_constant", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_19is_constant, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_19is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_18is_constant(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_18is_constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("is_constant", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1958
+ *
+ * def is_constant(self):
+ * return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \ # <<<<<<<<<<<<<<
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant()) and \
+ * (self._args_[2].__class__ in native_numeric_types or self._args_[2].is_constant())
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1958, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (!__pyx_t_4) {
+ } else {
+ goto __pyx_L4_next_and;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1958, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1958, __pyx_L1_error)
+ if (__pyx_t_4) {
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_1 = __pyx_t_3;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_L4_next_and:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1959
+ * def is_constant(self):
+ * return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant()) and \ # <<<<<<<<<<<<<<
+ * (self._args_[2].__class__ in native_numeric_types or self._args_[2].is_constant())
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1959, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1959, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1959, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1959, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1959, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (!__pyx_t_4) {
+ } else {
+ goto __pyx_L6_next_and;
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1959, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1959, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1959, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1959, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1959, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1959, __pyx_L1_error)
+ if (__pyx_t_4) {
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_L6_next_and:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1960
+ * return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant()) and \
+ * (self._args_[2].__class__ in native_numeric_types or self._args_[2].is_constant()) # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1960, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1960, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1960, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1960, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1960, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1960, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1960, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1960, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1960, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1960, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1960, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_1 = __pyx_t_3;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_L3_bool_binop_done:;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1957
+ * return "{0} {1} {2} {3} {4}".format(values[0], '<' if self._strict[0] else '<=', values[1], '<' if self._strict[1] else '<=', values[2])
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant()) and \
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.RangedExpression.is_constant", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1962
+ * (self._args_[2].__class__ in native_numeric_types or self._args_[2].is_constant())
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return (self._args_[1].__class__ not in native_numeric_types and \
+ * self._args_[1].is_potentially_variable()) or \
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_21is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_21is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_21is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_21is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_20is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_20is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1963
+ *
+ * def is_potentially_variable(self):
+ * return (self._args_[1].__class__ not in native_numeric_types and \ # <<<<<<<<<<<<<<
+ * self._args_[1].is_potentially_variable()) or \
+ * (self._args_[0].__class__ not in native_numeric_types and \
+ */
+ __Pyx_XDECREF(__pyx_r);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1964
+ * def is_potentially_variable(self):
+ * return (self._args_[1].__class__ not in native_numeric_types and \
+ * self._args_[1].is_potentially_variable()) or \ # <<<<<<<<<<<<<<
+ * (self._args_[0].__class__ not in native_numeric_types and \
+ * self._args_[0].is_potentially_variable()) or \
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1963, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1963
+ *
+ * def is_potentially_variable(self):
+ * return (self._args_[1].__class__ not in native_numeric_types and \ # <<<<<<<<<<<<<<
+ * self._args_[1].is_potentially_variable()) or \
+ * (self._args_[0].__class__ not in native_numeric_types and \
+ */
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1963, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1963, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1963, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1963, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (!__pyx_t_4) {
+ goto __pyx_L4_next_or;
+ } else {
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1964
+ * def is_potentially_variable(self):
+ * return (self._args_[1].__class__ not in native_numeric_types and \
+ * self._args_[1].is_potentially_variable()) or \ # <<<<<<<<<<<<<<
+ * (self._args_[0].__class__ not in native_numeric_types and \
+ * self._args_[0].is_potentially_variable()) or \
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1964, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1964, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1964, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1964, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1964, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1964, __pyx_L1_error)
+ if (!__pyx_t_4) {
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_1 = __pyx_t_3;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_L4_next_or:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1965
+ * return (self._args_[1].__class__ not in native_numeric_types and \
+ * self._args_[1].is_potentially_variable()) or \
+ * (self._args_[0].__class__ not in native_numeric_types and \ # <<<<<<<<<<<<<<
+ * self._args_[0].is_potentially_variable()) or \
+ * (self._args_[2].__class__ not in native_numeric_types and \
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1965, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1965, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1965, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1965, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1965, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (!__pyx_t_4) {
+ goto __pyx_L6_next_or;
+ } else {
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1966
+ * self._args_[1].is_potentially_variable()) or \
+ * (self._args_[0].__class__ not in native_numeric_types and \
+ * self._args_[0].is_potentially_variable()) or \ # <<<<<<<<<<<<<<
+ * (self._args_[2].__class__ not in native_numeric_types and \
+ * self._args_[2].is_potentially_variable())
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1966, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1966, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1966, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1966, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1966, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1966, __pyx_L1_error)
+ if (!__pyx_t_4) {
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_L6_next_or:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1967
+ * (self._args_[0].__class__ not in native_numeric_types and \
+ * self._args_[0].is_potentially_variable()) or \
+ * (self._args_[2].__class__ not in native_numeric_types and \ # <<<<<<<<<<<<<<
+ * self._args_[2].is_potentially_variable())
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1967, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1967, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1967, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1967, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 1967, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1967, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1968
+ * self._args_[0].is_potentially_variable()) or \
+ * (self._args_[2].__class__ not in native_numeric_types and \
+ * self._args_[2].is_potentially_variable()) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1968, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1968, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1968, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1968, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1968, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_1 = __pyx_t_3;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_L3_bool_binop_done:;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1962
+ * (self._args_[2].__class__ in native_numeric_types or self._args_[2].is_constant())
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return (self._args_[1].__class__ not in native_numeric_types and \
+ * self._args_[1].is_potentially_variable()) or \
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.RangedExpression.is_potentially_variable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1987
+ * PRECEDENCE = 9
+ *
+ * def __init__(self, args, strict): # <<<<<<<<<<<<<<
+ * super(InequalityExpression,self).__init__(args)
+ * self._strict = strict
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_strict = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_strict,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 1987, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_strict)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 1987, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 1987, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_strict = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1987, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.InequalityExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression___init__(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_strict);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_strict) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1988
+ *
+ * def __init__(self, args, strict):
+ * super(InequalityExpression,self).__init__(args) # <<<<<<<<<<<<<<
+ * self._strict = strict
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1988, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1988, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1988, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1988, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1988, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_args};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1988, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_args};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1988, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1988, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_args);
+ __Pyx_GIVEREF(__pyx_v_args);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_args);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1988, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1989
+ * def __init__(self, args, strict):
+ * super(InequalityExpression,self).__init__(args)
+ * self._strict = strict # <<<<<<<<<<<<<<
+ *
+ * def nargs(self):
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_strict_2, __pyx_v_strict) < 0) __PYX_ERR(0, 1989, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1987
+ * PRECEDENCE = 9
+ *
+ * def __init__(self, args, strict): # <<<<<<<<<<<<<<
+ * super(InequalityExpression,self).__init__(args)
+ * self._strict = strict
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.InequalityExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1991
+ * self._strict = strict
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 2
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_3nargs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_3nargs = {"nargs", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_3nargs, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_3nargs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_2nargs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_2nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1992
+ *
+ * def nargs(self):
+ * return 2 # <<<<<<<<<<<<<<
+ *
+ * def construct_node(self, args, memo):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_2);
+ __pyx_r = __pyx_int_2;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1991
+ * self._strict = strict
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 2
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1994
+ * return 2
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._strict)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_5construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_5construct_node = {"construct_node", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_5construct_node, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_5construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_memo = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("construct_node (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_memo,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 1); __PYX_ERR(0, 1994, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 2); __PYX_ERR(0, 1994, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "construct_node") < 0)) __PYX_ERR(0, 1994, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_memo = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 1994, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.InequalityExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_4construct_node(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_memo);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_4construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("construct_node", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1995
+ *
+ * def construct_node(self, args, memo):
+ * return self.__class__(args, self._strict) # <<<<<<<<<<<<<<
+ *
+ * def __getstate__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1995, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1995, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1995, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1995, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1995, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_args);
+ __Pyx_GIVEREF(__pyx_v_args);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1995, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1994
+ * return 2
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._strict)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.InequalityExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":1997
+ * return self.__class__(args, self._strict)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(InequalityExpression, self).__getstate__()
+ * for i in InequalityExpression.__slots__:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_7__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_7__getstate__ = {"__getstate__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_7__getstate__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_7__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_6__getstate__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_6__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_state = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ __Pyx_RefNannySetupContext("__getstate__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1998
+ *
+ * def __getstate__(self):
+ * state = super(InequalityExpression, self).__getstate__() # <<<<<<<<<<<<<<
+ * for i in InequalityExpression.__slots__:
+ * state[i] = getattr(self, i)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1998, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1998, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1998, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1998, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1998, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1998, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_state = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1999
+ * def __getstate__(self):
+ * state = super(InequalityExpression, self).__getstate__()
+ * for i in InequalityExpression.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self, i)
+ * return state
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1999, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_slots); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1999, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1999, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1999, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1999, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1999, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 1999, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1999, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_5(__pyx_t_1);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 1999, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2000
+ * state = super(InequalityExpression, self).__getstate__()
+ * for i in InequalityExpression.__slots__:
+ * state[i] = getattr(self, i) # <<<<<<<<<<<<<<
+ * return state
+ *
+ */
+ __pyx_t_3 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2000, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (unlikely(PyObject_SetItem(__pyx_v_state, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(0, 2000, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1999
+ * def __getstate__(self):
+ * state = super(InequalityExpression, self).__getstate__()
+ * for i in InequalityExpression.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self, i)
+ * return state
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2001
+ * for i in InequalityExpression.__slots__:
+ * state[i] = getattr(self, i)
+ * return state # <<<<<<<<<<<<<<
+ *
+ * def __nonzero__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_state);
+ __pyx_r = __pyx_v_state;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1997
+ * return self.__class__(args, self._strict)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(InequalityExpression, self).__getstate__()
+ * for i in InequalityExpression.__slots__:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.InequalityExpression.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_state);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2003
+ * return state
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * if _using_chained_inequality and not self.is_constant(): #pragma: no cover
+ * deprecation_warning("Chained inequalities are deprecated. Use the inequality() function to express ranged inequality expressions.") # Remove in Pyomo 6.0
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_9__nonzero__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_9__nonzero__ = {"__nonzero__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_9__nonzero__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_9__nonzero__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_8__nonzero__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_8__nonzero__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ __Pyx_RefNannySetupContext("__nonzero__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2004
+ *
+ * def __nonzero__(self):
+ * if _using_chained_inequality and not self.is_constant(): #pragma: no cover # <<<<<<<<<<<<<<
+ * deprecation_warning("Chained inequalities are deprecated. Use the inequality() function to express ranged inequality expressions.") # Remove in Pyomo 6.0
+ * _chainedInequality.call_info = traceback.extract_stack(limit=2)[-2]
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_using_chained_inequality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2004, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2004, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_1 = __pyx_t_3;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2004, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2004, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2004, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2004, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_6 = ((!__pyx_t_3) != 0);
+ __pyx_t_1 = __pyx_t_6;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2005
+ * def __nonzero__(self):
+ * if _using_chained_inequality and not self.is_constant(): #pragma: no cover
+ * deprecation_warning("Chained inequalities are deprecated. Use the inequality() function to express ranged inequality expressions.") # Remove in Pyomo 6.0 # <<<<<<<<<<<<<<
+ * _chainedInequality.call_info = traceback.extract_stack(limit=2)[-2]
+ * _chainedInequality.prev = self
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_deprecation_warning); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2005, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2005, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2006
+ * if _using_chained_inequality and not self.is_constant(): #pragma: no cover
+ * deprecation_warning("Chained inequalities are deprecated. Use the inequality() function to express ranged inequality expressions.") # Remove in Pyomo 6.0
+ * _chainedInequality.call_info = traceback.extract_stack(limit=2)[-2] # <<<<<<<<<<<<<<
+ * _chainedInequality.prev = self
+ * return True
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_traceback); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_extract_stack); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_limit, __pyx_int_2) < 0) __PYX_ERR(0, 2006, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_5, -2L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2006, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_t_5, __pyx_n_s_call_info, __pyx_t_4) < 0) __PYX_ERR(0, 2006, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2007
+ * deprecation_warning("Chained inequalities are deprecated. Use the inequality() function to express ranged inequality expressions.") # Remove in Pyomo 6.0
+ * _chainedInequality.call_info = traceback.extract_stack(limit=2)[-2]
+ * _chainedInequality.prev = self # <<<<<<<<<<<<<<
+ * return True
+ * #return bool(self()) # This is needed to apply simple evaluation of inequalities
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2007, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_t_5, __pyx_n_s_prev, __pyx_v_self) < 0) __PYX_ERR(0, 2007, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2008
+ * _chainedInequality.call_info = traceback.extract_stack(limit=2)[-2]
+ * _chainedInequality.prev = self
+ * return True # <<<<<<<<<<<<<<
+ * #return bool(self()) # This is needed to apply simple evaluation of inequalities
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2004
+ *
+ * def __nonzero__(self):
+ * if _using_chained_inequality and not self.is_constant(): #pragma: no cover # <<<<<<<<<<<<<<
+ * deprecation_warning("Chained inequalities are deprecated. Use the inequality() function to express ranged inequality expressions.") # Remove in Pyomo 6.0
+ * _chainedInequality.call_info = traceback.extract_stack(limit=2)[-2]
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2011
+ * #return bool(self()) # This is needed to apply simple evaluation of inequalities
+ *
+ * return bool(self()) # <<<<<<<<<<<<<<
+ *
+ * __bool__ = __nonzero__
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_t_4 = __pyx_v_self; __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2011, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2011, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2011, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2011, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2003
+ * return state
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * if _using_chained_inequality and not self.is_constant(): #pragma: no cover
+ * deprecation_warning("Chained inequalities are deprecated. Use the inequality() function to express ranged inequality expressions.") # Remove in Pyomo 6.0
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.InequalityExpression.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2015
+ * __bool__ = __nonzero__
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_11is_relational(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_11is_relational = {"is_relational", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_11is_relational, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_11is_relational(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_relational (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_10is_relational(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_10is_relational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_relational", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2016
+ *
+ * def is_relational(self):
+ * return True # <<<<<<<<<<<<<<
+ *
+ * def _precedence(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2015
+ * __bool__ = __nonzero__
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2018
+ * return True
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return InequalityExpression.PRECEDENCE
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_13_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_13_precedence = {"_precedence", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_13_precedence, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_13_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_precedence (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_12_precedence(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_12_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_precedence", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2019
+ *
+ * def _precedence(self):
+ * return InequalityExpression.PRECEDENCE # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2019, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PRECEDENCE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2019, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2018
+ * return True
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return InequalityExpression.PRECEDENCE
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.InequalityExpression._precedence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2021
+ * return InequalityExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * if self._strict:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_15_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_15_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_15_apply_operation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_15_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 2021, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 2021, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2021, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.InequalityExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_14_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_14_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_v__l = NULL;
+ PyObject *__pyx_v__r = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ int __pyx_t_5;
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2022
+ *
+ * def _apply_operation(self, result):
+ * _l, _r = result # <<<<<<<<<<<<<<
+ * if self._strict:
+ * return _l < _r
+ */
+ if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) {
+ PyObject* sequence = __pyx_v_result;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 2022, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2022, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2022, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_3 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2022, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2022, __pyx_L1_error)
+ __pyx_t_4 = NULL;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L4_unpacking_done;
+ __pyx_L3_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 2022, __pyx_L1_error)
+ __pyx_L4_unpacking_done:;
+ }
+ __pyx_v__l = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __pyx_v__r = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2023
+ * def _apply_operation(self, result):
+ * _l, _r = result
+ * if self._strict: # <<<<<<<<<<<<<<
+ * return _l < _r
+ * return _l <= _r
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2023, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2023, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2024
+ * _l, _r = result
+ * if self._strict:
+ * return _l < _r # <<<<<<<<<<<<<<
+ * return _l <= _r
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v__l, __pyx_v__r, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2024, __pyx_L1_error)
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2023
+ * def _apply_operation(self, result):
+ * _l, _r = result
+ * if self._strict: # <<<<<<<<<<<<<<
+ * return _l < _r
+ * return _l <= _r
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2025
+ * if self._strict:
+ * return _l < _r
+ * return _l <= _r # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v__l, __pyx_v__r, Py_LE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2025, __pyx_L1_error)
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2021
+ * return InequalityExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * if self._strict:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.InequalityExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v__l);
+ __Pyx_XDECREF(__pyx_v__r);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2027
+ * return _l <= _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if len(values) == 2:
+ * return "{0} {1} {2}".format(values[0], '<' if self._strict else '<=', values[1])
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_17_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_17_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_17_to_string, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_17_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_values = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_smap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 2027, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 2027, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 2027, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 2027, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 2027, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2027, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.InequalityExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_16_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_16_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ Py_ssize_t __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2028
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if len(values) == 2: # <<<<<<<<<<<<<<
+ * return "{0} {1} {2}".format(values[0], '<' if self._strict else '<=', values[1])
+ *
+ */
+ __pyx_t_1 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2028, __pyx_L1_error)
+ __pyx_t_2 = ((__pyx_t_1 == 2) != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2029
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if len(values) == 2:
+ * return "{0} {1} {2}".format(values[0], '<' if self._strict else '<=', values[1]) # <<<<<<<<<<<<<<
+ *
+ * def is_constant(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_2_2, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2029, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2029, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2029, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2029, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (__pyx_t_2) {
+ __Pyx_INCREF(__pyx_kp_s__20);
+ __pyx_t_6 = __pyx_kp_s__20;
+ } else {
+ __Pyx_INCREF(__pyx_kp_s__21);
+ __pyx_t_6 = __pyx_kp_s__21;
+ }
+ __pyx_t_7 = __Pyx_GetItemInt(__pyx_v_values, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2029, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_5, __pyx_t_6, __pyx_t_7};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2029, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_8, __pyx_t_5, __pyx_t_6, __pyx_t_7};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_9, 3+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2029, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(3+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2029, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_9, __pyx_t_7);
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_7 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2029, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2028
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if len(values) == 2: # <<<<<<<<<<<<<<
+ * return "{0} {1} {2}".format(values[0], '<' if self._strict else '<=', values[1])
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2027
+ * return _l <= _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if len(values) == 2:
+ * return "{0} {1} {2}".format(values[0], '<' if self._strict else '<=', values[1])
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.InequalityExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2031
+ * return "{0} {1} {2}".format(values[0], '<' if self._strict else '<=', values[1])
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant())
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_19is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_19is_constant = {"is_constant", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_19is_constant, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_19is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_18is_constant(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_18is_constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("is_constant", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2032
+ *
+ * def is_constant(self):
+ * return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \ # <<<<<<<<<<<<<<
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant())
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2032, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2032, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2032, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2032, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2032, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (!__pyx_t_4) {
+ } else {
+ goto __pyx_L4_next_and;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2032, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2032, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2032, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2032, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2032, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2032, __pyx_L1_error)
+ if (__pyx_t_4) {
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_1 = __pyx_t_3;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_L4_next_and:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2033
+ * def is_constant(self):
+ * return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant()) # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2033, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2033, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2033, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2033, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2033, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2033, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2033, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2033, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2033, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2033, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2033, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_L3_bool_binop_done:;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2031
+ * return "{0} {1} {2}".format(values[0], '<' if self._strict else '<=', values[1])
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant())
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.InequalityExpression.is_constant", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2035
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant())
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return (self._args_[0].__class__ not in native_numeric_types and \
+ * self._args_[0].is_potentially_variable()) or \
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_21is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_21is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_21is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_21is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_20is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_20is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2036
+ *
+ * def is_potentially_variable(self):
+ * return (self._args_[0].__class__ not in native_numeric_types and \ # <<<<<<<<<<<<<<
+ * self._args_[0].is_potentially_variable()) or \
+ * (self._args_[1].__class__ not in native_numeric_types and \
+ */
+ __Pyx_XDECREF(__pyx_r);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2037
+ * def is_potentially_variable(self):
+ * return (self._args_[0].__class__ not in native_numeric_types and \
+ * self._args_[0].is_potentially_variable()) or \ # <<<<<<<<<<<<<<
+ * (self._args_[1].__class__ not in native_numeric_types and \
+ * self._args_[1].is_potentially_variable())
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2036, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2036
+ *
+ * def is_potentially_variable(self):
+ * return (self._args_[0].__class__ not in native_numeric_types and \ # <<<<<<<<<<<<<<
+ * self._args_[0].is_potentially_variable()) or \
+ * (self._args_[1].__class__ not in native_numeric_types and \
+ */
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2036, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2036, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2036, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2036, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (!__pyx_t_4) {
+ goto __pyx_L4_next_or;
+ } else {
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2037
+ * def is_potentially_variable(self):
+ * return (self._args_[0].__class__ not in native_numeric_types and \
+ * self._args_[0].is_potentially_variable()) or \ # <<<<<<<<<<<<<<
+ * (self._args_[1].__class__ not in native_numeric_types and \
+ * self._args_[1].is_potentially_variable())
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2037, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2037, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2037, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2037, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2037, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2037, __pyx_L1_error)
+ if (!__pyx_t_4) {
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_3);
+ __pyx_t_1 = __pyx_t_3;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_L4_next_or:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2038
+ * return (self._args_[0].__class__ not in native_numeric_types and \
+ * self._args_[0].is_potentially_variable()) or \
+ * (self._args_[1].__class__ not in native_numeric_types and \ # <<<<<<<<<<<<<<
+ * self._args_[1].is_potentially_variable())
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2038, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2038, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2038, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2038, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2038, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2038, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2039
+ * self._args_[0].is_potentially_variable()) or \
+ * (self._args_[1].__class__ not in native_numeric_types and \
+ * self._args_[1].is_potentially_variable()) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2039, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2039, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2039, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2039, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2039, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_L3_bool_binop_done:;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2035
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant())
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return (self._args_[0].__class__ not in native_numeric_types and \
+ * self._args_[0].is_potentially_variable()) or \
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.InequalityExpression.is_potentially_variable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2042
+ *
+ *
+ * def inequality(lower=None, body=None, upper=None, strict=False): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that can be used to declare inequality and
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26inequality(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_25inequality[] = "\n A utility function that can be used to declare inequality and\n ranged inequality expressions. The expression::\n\n inequality(2, model.x)\n\n is equivalent to the expression::\n\n 2 <= model.x\n\n The expression::\n\n inequality(2, model.x, 2)\n\n is equivalent to the expression::\n\n 2 <= model.x <= 3\n\n .. note:: This ranged inequality syntax is deprecated in Pyomo.\n This function provides a mechanism for expressing ranged inequalities\n\t without chained inequalities.\n\n Args:\n lower: an expression defines a lower bound\n body: an expression defines the body of a ranged constraint\n upper: an expression defines an upper bound\n strict (bool): A boolean value that indicates whether the inequality\n is strict. Default is :const:`False`.\n\n Returns:\n A relational expression. The expression is an inequality\n if any of the values :attr:`lower`, :attr:`body` or\n :attr:`upper` is :const:`None`. Otherwise, the expression\n is a ranged inequality.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26inequality = {"inequality", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26inequality, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_25inequality};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_26inequality(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_lower = 0;
+ PyObject *__pyx_v_body = 0;
+ PyObject *__pyx_v_upper = 0;
+ PyObject *__pyx_v_strict = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("inequality (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lower,&__pyx_n_s_body,&__pyx_n_s_upper,&__pyx_n_s_strict,0};
+ PyObject* values[4] = {0,0,0,0};
+ values[0] = ((PyObject *)Py_None);
+ values[1] = ((PyObject *)Py_None);
+ values[2] = ((PyObject *)Py_None);
+ values[3] = ((PyObject *)Py_False);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lower);
+ if (value) { values[0] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_body);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_upper);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_strict);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "inequality") < 0)) __PYX_ERR(0, 2042, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_lower = values[0];
+ __pyx_v_body = values[1];
+ __pyx_v_upper = values[2];
+ __pyx_v_strict = values[3];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("inequality", 0, 0, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2042, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.inequality", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_25inequality(__pyx_self, __pyx_v_lower, __pyx_v_body, __pyx_v_upper, __pyx_v_strict);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_25inequality(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_lower, PyObject *__pyx_v_body, PyObject *__pyx_v_upper, PyObject *__pyx_v_strict) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ __Pyx_RefNannySetupContext("inequality", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2078
+ * is a ranged inequality.
+ * """
+ * if lower is None: # <<<<<<<<<<<<<<
+ * if body is None or upper is None:
+ * raise ValueError("Invalid inequality expression.")
+ */
+ __pyx_t_1 = (__pyx_v_lower == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2079
+ * """
+ * if lower is None:
+ * if body is None or upper is None: # <<<<<<<<<<<<<<
+ * raise ValueError("Invalid inequality expression.")
+ * return InequalityExpression((body, upper), strict)
+ */
+ __pyx_t_1 = (__pyx_v_body == Py_None);
+ __pyx_t_3 = (__pyx_t_1 != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __pyx_t_3;
+ goto __pyx_L5_bool_binop_done;
+ }
+ __pyx_t_3 = (__pyx_v_upper == Py_None);
+ __pyx_t_1 = (__pyx_t_3 != 0);
+ __pyx_t_2 = __pyx_t_1;
+ __pyx_L5_bool_binop_done:;
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2080
+ * if lower is None:
+ * if body is None or upper is None:
+ * raise ValueError("Invalid inequality expression.") # <<<<<<<<<<<<<<
+ * return InequalityExpression((body, upper), strict)
+ * if body is None:
+ */
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2080, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(0, 2080, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2079
+ * """
+ * if lower is None:
+ * if body is None or upper is None: # <<<<<<<<<<<<<<
+ * raise ValueError("Invalid inequality expression.")
+ * return InequalityExpression((body, upper), strict)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2081
+ * if body is None or upper is None:
+ * raise ValueError("Invalid inequality expression.")
+ * return InequalityExpression((body, upper), strict) # <<<<<<<<<<<<<<
+ * if body is None:
+ * if lower is None or upper is None:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2081, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2081, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v_body);
+ __Pyx_GIVEREF(__pyx_v_body);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_body);
+ __Pyx_INCREF(__pyx_v_upper);
+ __Pyx_GIVEREF(__pyx_v_upper);
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_upper);
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_strict};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2081, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_v_strict};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2081, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2081, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_6);
+ __Pyx_INCREF(__pyx_v_strict);
+ __Pyx_GIVEREF(__pyx_v_strict);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_v_strict);
+ __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2081, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2078
+ * is a ranged inequality.
+ * """
+ * if lower is None: # <<<<<<<<<<<<<<
+ * if body is None or upper is None:
+ * raise ValueError("Invalid inequality expression.")
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2082
+ * raise ValueError("Invalid inequality expression.")
+ * return InequalityExpression((body, upper), strict)
+ * if body is None: # <<<<<<<<<<<<<<
+ * if lower is None or upper is None:
+ * raise ValueError("Invalid inequality expression.")
+ */
+ __pyx_t_2 = (__pyx_v_body == Py_None);
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2083
+ * return InequalityExpression((body, upper), strict)
+ * if body is None:
+ * if lower is None or upper is None: # <<<<<<<<<<<<<<
+ * raise ValueError("Invalid inequality expression.")
+ * return InequalityExpression((lower, upper), strict)
+ */
+ __pyx_t_2 = (__pyx_v_lower == Py_None);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_1 = __pyx_t_3;
+ goto __pyx_L9_bool_binop_done;
+ }
+ __pyx_t_3 = (__pyx_v_upper == Py_None);
+ __pyx_t_2 = (__pyx_t_3 != 0);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_L9_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2084
+ * if body is None:
+ * if lower is None or upper is None:
+ * raise ValueError("Invalid inequality expression.") # <<<<<<<<<<<<<<
+ * return InequalityExpression((lower, upper), strict)
+ * if upper is None:
+ */
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2084, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(0, 2084, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2083
+ * return InequalityExpression((body, upper), strict)
+ * if body is None:
+ * if lower is None or upper is None: # <<<<<<<<<<<<<<
+ * raise ValueError("Invalid inequality expression.")
+ * return InequalityExpression((lower, upper), strict)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2085
+ * if lower is None or upper is None:
+ * raise ValueError("Invalid inequality expression.")
+ * return InequalityExpression((lower, upper), strict) # <<<<<<<<<<<<<<
+ * if upper is None:
+ * return InequalityExpression((lower, body), strict)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_INCREF(__pyx_v_lower);
+ __Pyx_GIVEREF(__pyx_v_lower);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_lower);
+ __Pyx_INCREF(__pyx_v_upper);
+ __Pyx_GIVEREF(__pyx_v_upper);
+ PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_upper);
+ __pyx_t_6 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_9, __pyx_v_strict};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2085, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_9, __pyx_v_strict};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2085, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_t_9);
+ __Pyx_INCREF(__pyx_v_strict);
+ __Pyx_GIVEREF(__pyx_v_strict);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_strict);
+ __pyx_t_9 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2082
+ * raise ValueError("Invalid inequality expression.")
+ * return InequalityExpression((body, upper), strict)
+ * if body is None: # <<<<<<<<<<<<<<
+ * if lower is None or upper is None:
+ * raise ValueError("Invalid inequality expression.")
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2086
+ * raise ValueError("Invalid inequality expression.")
+ * return InequalityExpression((lower, upper), strict)
+ * if upper is None: # <<<<<<<<<<<<<<
+ * return InequalityExpression((lower, body), strict)
+ * if id(lower) == id(upper):
+ */
+ __pyx_t_1 = (__pyx_v_upper == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2087
+ * return InequalityExpression((lower, upper), strict)
+ * if upper is None:
+ * return InequalityExpression((lower, body), strict) # <<<<<<<<<<<<<<
+ * if id(lower) == id(upper):
+ * if strict:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2087, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2087, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_INCREF(__pyx_v_lower);
+ __Pyx_GIVEREF(__pyx_v_lower);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_lower);
+ __Pyx_INCREF(__pyx_v_body);
+ __Pyx_GIVEREF(__pyx_v_body);
+ PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v_body);
+ __pyx_t_9 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_v_strict};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2087, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_v_strict};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2087, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2087, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_t_7);
+ __Pyx_INCREF(__pyx_v_strict);
+ __Pyx_GIVEREF(__pyx_v_strict);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_v_strict);
+ __pyx_t_7 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2087, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2086
+ * raise ValueError("Invalid inequality expression.")
+ * return InequalityExpression((lower, upper), strict)
+ * if upper is None: # <<<<<<<<<<<<<<
+ * return InequalityExpression((lower, body), strict)
+ * if id(lower) == id(upper):
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2088
+ * if upper is None:
+ * return InequalityExpression((lower, body), strict)
+ * if id(lower) == id(upper): # <<<<<<<<<<<<<<
+ * if strict:
+ * raise ValueError("Invalid equality expression with strict inequalities.")
+ */
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_lower);
+ __Pyx_GIVEREF(__pyx_v_lower);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_lower);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_upper);
+ __Pyx_GIVEREF(__pyx_v_upper);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_upper);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_t_5, __pyx_t_6, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2088, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2088, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2089
+ * return InequalityExpression((lower, body), strict)
+ * if id(lower) == id(upper):
+ * if strict: # <<<<<<<<<<<<<<
+ * raise ValueError("Invalid equality expression with strict inequalities.")
+ * return EqualityExpression((body, lower))
+ */
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_strict); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2089, __pyx_L1_error)
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2090
+ * if id(lower) == id(upper):
+ * if strict:
+ * raise ValueError("Invalid equality expression with strict inequalities.") # <<<<<<<<<<<<<<
+ * return EqualityExpression((body, lower))
+ * return RangedExpression((lower, body, upper), (strict, strict))
+ */
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2090, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(0, 2090, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2089
+ * return InequalityExpression((lower, body), strict)
+ * if id(lower) == id(upper):
+ * if strict: # <<<<<<<<<<<<<<
+ * raise ValueError("Invalid equality expression with strict inequalities.")
+ * return EqualityExpression((body, lower))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2091
+ * if strict:
+ * raise ValueError("Invalid equality expression with strict inequalities.")
+ * return EqualityExpression((body, lower)) # <<<<<<<<<<<<<<
+ * return RangedExpression((lower, body, upper), (strict, strict))
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_EqualityExpression); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2091, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2091, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_body);
+ __Pyx_GIVEREF(__pyx_v_body);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_body);
+ __Pyx_INCREF(__pyx_v_lower);
+ __Pyx_GIVEREF(__pyx_v_lower);
+ PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_lower);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2091, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2091, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_5};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2091, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2091, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2091, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2088
+ * if upper is None:
+ * return InequalityExpression((lower, body), strict)
+ * if id(lower) == id(upper): # <<<<<<<<<<<<<<
+ * if strict:
+ * raise ValueError("Invalid equality expression with strict inequalities.")
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2092
+ * raise ValueError("Invalid equality expression with strict inequalities.")
+ * return EqualityExpression((body, lower))
+ * return RangedExpression((lower, body, upper), (strict, strict)) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_RangedExpression); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = PyTuple_New(3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_INCREF(__pyx_v_lower);
+ __Pyx_GIVEREF(__pyx_v_lower);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_lower);
+ __Pyx_INCREF(__pyx_v_body);
+ __Pyx_GIVEREF(__pyx_v_body);
+ PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_body);
+ __Pyx_INCREF(__pyx_v_upper);
+ __Pyx_GIVEREF(__pyx_v_upper);
+ PyTuple_SET_ITEM(__pyx_t_9, 2, __pyx_v_upper);
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_strict);
+ __Pyx_GIVEREF(__pyx_v_strict);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_strict);
+ __Pyx_INCREF(__pyx_v_strict);
+ __Pyx_GIVEREF(__pyx_v_strict);
+ PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_strict);
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_t_5};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2092, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_t_5};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2092, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_8, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_8, __pyx_t_5);
+ __pyx_t_9 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2042
+ *
+ *
+ * def inequality(lower=None, body=None, upper=None, strict=False): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that can be used to declare inequality and
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.inequality", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2106
+ * PRECEDENCE = 9
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 2
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_1nargs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_1nargs = {"nargs", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_1nargs, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_1nargs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_nargs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2107
+ *
+ * def nargs(self):
+ * return 2 # <<<<<<<<<<<<<<
+ *
+ * def __nonzero__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_2);
+ __pyx_r = __pyx_int_2;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2106
+ * PRECEDENCE = 9
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 2
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2109
+ * return 2
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * return bool(self())
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_3__nonzero__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_3__nonzero__ = {"__nonzero__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_3__nonzero__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_3__nonzero__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_2__nonzero__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_2__nonzero__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ __Pyx_RefNannySetupContext("__nonzero__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2110
+ *
+ * def __nonzero__(self):
+ * return bool(self()) # <<<<<<<<<<<<<<
+ *
+ * __bool__ = __nonzero__
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_t_2 = __pyx_v_self; __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2110, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2110, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2110, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyBool_FromLong((!(!__pyx_t_4))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2109
+ * return 2
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * return bool(self())
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.EqualityExpression.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2114
+ * __bool__ = __nonzero__
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_5is_relational(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_5is_relational = {"is_relational", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_5is_relational, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_5is_relational(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_relational (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_4is_relational(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_4is_relational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_relational", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2115
+ *
+ * def is_relational(self):
+ * return True # <<<<<<<<<<<<<<
+ *
+ * def _precedence(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2114
+ * __bool__ = __nonzero__
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2117
+ * return True
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return EqualityExpression.PRECEDENCE
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_7_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_7_precedence = {"_precedence", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_7_precedence, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_7_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_precedence (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_6_precedence(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_6_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_precedence", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2118
+ *
+ * def _precedence(self):
+ * return EqualityExpression.PRECEDENCE # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_EqualityExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2118, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PRECEDENCE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2118, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2117
+ * return True
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return EqualityExpression.PRECEDENCE
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.EqualityExpression._precedence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2120
+ * return EqualityExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * return _l == _r
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_9_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_9_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_9_apply_operation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_9_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 2120, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 2120, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2120, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.EqualityExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_8_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_8_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_v__l = NULL;
+ PyObject *__pyx_v__r = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2121
+ *
+ * def _apply_operation(self, result):
+ * _l, _r = result # <<<<<<<<<<<<<<
+ * return _l == _r
+ *
+ */
+ if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) {
+ PyObject* sequence = __pyx_v_result;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 2121, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2121, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2121, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_3 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2121, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2121, __pyx_L1_error)
+ __pyx_t_4 = NULL;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L4_unpacking_done;
+ __pyx_L3_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 2121, __pyx_L1_error)
+ __pyx_L4_unpacking_done:;
+ }
+ __pyx_v__l = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __pyx_v__r = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2122
+ * def _apply_operation(self, result):
+ * _l, _r = result
+ * return _l == _r # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v__l, __pyx_v__r, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2122, __pyx_L1_error)
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2120
+ * return EqualityExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * return _l == _r
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.EqualityExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v__l);
+ __Pyx_XDECREF(__pyx_v__r);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2124
+ * return _l == _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return "{0} == {1}".format(values[0], values[1])
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_11_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_11_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_11_to_string, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_11_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_values = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_smap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 2124, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 2124, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 2124, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 2124, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 2124, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2124, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.EqualityExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_10_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_10_to_string(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2125
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * return "{0} == {1}".format(values[0], values[1]) # <<<<<<<<<<<<<<
+ *
+ * def is_constant(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_5, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_values, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2125, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2125, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2124
+ * return _l == _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return "{0} == {1}".format(values[0], values[1])
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.EqualityExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2127
+ * return "{0} == {1}".format(values[0], values[1])
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return self._args_[0].is_constant() and self._args_[1].is_constant()
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_13is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_13is_constant = {"is_constant", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_13is_constant, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_13is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_12is_constant(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_12is_constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ __Pyx_RefNannySetupContext("is_constant", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2128
+ *
+ * def is_constant(self):
+ * return self._args_[0].is_constant() and self._args_[1].is_constant() # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2128, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2128, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2128, __pyx_L1_error)
+ if (__pyx_t_5) {
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2128, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2128, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_L3_bool_binop_done:;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2127
+ * return "{0} == {1}".format(values[0], values[1])
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return self._args_[0].is_constant() and self._args_[1].is_constant()
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.EqualityExpression.is_constant", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2130
+ * return self._args_[0].is_constant() and self._args_[1].is_constant()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return self._args_[0].is_potentially_variable() or self._args_[1].is_potentially_variable()
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_15is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_15is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_15is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_15is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_14is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_14is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2131
+ *
+ * def is_potentially_variable(self):
+ * return self._args_[0].is_potentially_variable() or self._args_[1].is_potentially_variable() # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2131, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2131, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2131, __pyx_L1_error)
+ if (!__pyx_t_5) {
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2131, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2131, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2131, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_L3_bool_binop_done:;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2130
+ * return self._args_[0].is_constant() and self._args_[1].is_constant()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return self._args_[0].is_potentially_variable() or self._args_[1].is_potentially_variable()
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.EqualityExpression.is_potentially_variable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2142
+ * PRECEDENCE = 6
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return _SumExpression.PRECEDENCE
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_1_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_1_precedence = {"_precedence", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_1_precedence, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_1_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_precedence (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression__precedence(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression__precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_precedence", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2143
+ *
+ * def _precedence(self):
+ * return _SumExpression.PRECEDENCE # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_SumExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PRECEDENCE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2142
+ * PRECEDENCE = 6
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return _SumExpression.PRECEDENCE
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._SumExpression._precedence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2145
+ * return _SumExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * l_, r_ = result
+ * return l_ + r_
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_3_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_3_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_3_apply_operation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_3_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 2145, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 2145, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2145, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._SumExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_2_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_2_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_v_l_ = NULL;
+ PyObject *__pyx_v_r_ = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2146
+ *
+ * def _apply_operation(self, result):
+ * l_, r_ = result # <<<<<<<<<<<<<<
+ * return l_ + r_
+ *
+ */
+ if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) {
+ PyObject* sequence = __pyx_v_result;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 2146, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2146, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2146, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_3 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2146, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_2 = __pyx_t_4(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_4(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2146, __pyx_L1_error)
+ __pyx_t_4 = NULL;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L4_unpacking_done;
+ __pyx_L3_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 2146, __pyx_L1_error)
+ __pyx_L4_unpacking_done:;
+ }
+ __pyx_v_l_ = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __pyx_v_r_ = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2147
+ * def _apply_operation(self, result):
+ * l_, r_ = result
+ * return l_ + r_ # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyNumber_Add(__pyx_v_l_, __pyx_v_r_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2147, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2145
+ * return _SumExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * l_, r_ = result
+ * return l_ + r_
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._SumExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_l_);
+ __Pyx_XDECREF(__pyx_v_r_);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2149
+ * return l_ + r_
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_5_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_5_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_5_to_string, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_5_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_smap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 2149, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 2149, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 2149, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 2149, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 2149, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2149, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._SumExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_4_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_4_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2150
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ * if values[1][0] == '-':
+ */
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2150, __pyx_L1_error)
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2151
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1]) # <<<<<<<<<<<<<<
+ * if values[1][0] == '-':
+ * return "{0} {1}".format(values[0],values[1])
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_2, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2151, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2151, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_values, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_4, __pyx_t_5, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2151, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_t_4, __pyx_t_5, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2151, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_6);
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2150
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ * if values[1][0] == '-':
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2152
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ * if values[1][0] == '-': # <<<<<<<<<<<<<<
+ * return "{0} {1}".format(values[0],values[1])
+ * return "{0} + {1}".format(values[0],values[1])
+ */
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2152, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2152, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s__16, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2152, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2153
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ * if values[1][0] == '-':
+ * return "{0} {1}".format(values[0],values[1]) # <<<<<<<<<<<<<<
+ * return "{0} + {1}".format(values[0],values[1])
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_6, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_values, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_9, __pyx_t_6};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2153, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_9, __pyx_t_6};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2153, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_8, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_8, __pyx_t_6);
+ __pyx_t_9 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2152
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ * if values[1][0] == '-': # <<<<<<<<<<<<<<
+ * return "{0} {1}".format(values[0],values[1])
+ * return "{0} + {1}".format(values[0],values[1])
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2154
+ * if values[1][0] == '-':
+ * return "{0} {1}".format(values[0],values[1])
+ * return "{0} + {1}".format(values[0],values[1]) # <<<<<<<<<<<<<<
+ *
+ * def getname(self, *args, **kwds):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_7, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_v_values, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_4, __pyx_t_6};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2154, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_4, __pyx_t_6};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2154, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_t_6);
+ __pyx_t_4 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2149
+ * return l_ + r_
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._SumExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2156
+ * return "{0} + {1}".format(values[0],values[1])
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'sum'
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_7getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_7getname = {"getname", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_7getname, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_7getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_kwds = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname (wrapper)", 0);
+ __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
+ __Pyx_GOTREF(__pyx_v_kwds);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, used_pos_args, "getname") < 0)) __PYX_ERR(0, 2156, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("getname", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2156, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._SumExpression.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_6getname(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwds);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwds);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_6getname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2157
+ *
+ * def getname(self, *args, **kwds):
+ * return 'sum' # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_n_s_sum);
+ __pyx_r = __pyx_n_s_sum;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2156
+ * return "{0} + {1}".format(values[0],values[1])
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'sum'
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2163
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17NPV_SumExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17NPV_SumExpression_1is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17NPV_SumExpression_1is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17NPV_SumExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17NPV_SumExpression_is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17NPV_SumExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2164
+ *
+ * def is_potentially_variable(self):
+ * return False # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2163
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2179
+ * PRECEDENCE = 6
+ *
+ * def __init__(self, args): # <<<<<<<<<<<<<<
+ * self._args_ = args
+ * self._shared_args = False
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2179, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2179, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2179, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ViewSumExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression___init__(__pyx_self, __pyx_v_self, __pyx_v_args);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2180
+ *
+ * def __init__(self, args):
+ * self._args_ = args # <<<<<<<<<<<<<<
+ * self._shared_args = False
+ * self._nargs = len(self._args_)
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_args_2, __pyx_v_args) < 0) __PYX_ERR(0, 2180, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2181
+ * def __init__(self, args):
+ * self._args_ = args
+ * self._shared_args = False # <<<<<<<<<<<<<<
+ * self._nargs = len(self._args_)
+ *
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_shared_args, Py_False) < 0) __PYX_ERR(0, 2181, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2182
+ * self._args_ = args
+ * self._shared_args = False
+ * self._nargs = len(self._args_) # <<<<<<<<<<<<<<
+ *
+ * def add(self, new_arg):
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2182, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2182, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2182, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nargs_2, __pyx_t_1) < 0) __PYX_ERR(0, 2182, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2179
+ * PRECEDENCE = 6
+ *
+ * def __init__(self, args): # <<<<<<<<<<<<<<
+ * self._args_ = args
+ * self._shared_args = False
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ViewSumExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2184
+ * self._nargs = len(self._args_)
+ *
+ * def add(self, new_arg): # <<<<<<<<<<<<<<
+ * if new_arg.__class__ in native_numeric_types and isclose(new_arg,0):
+ * return self
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_3add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_3add = {"add", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_3add, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_3add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_new_arg = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("add (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_new_arg,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new_arg)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, 1); __PYX_ERR(0, 2184, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add") < 0)) __PYX_ERR(0, 2184, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_new_arg = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2184, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ViewSumExpression.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_2add(__pyx_self, __pyx_v_self, __pyx_v_new_arg);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_2add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_arg) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ int __pyx_t_13;
+ Py_ssize_t __pyx_t_14;
+ __Pyx_RefNannySetupContext("add", 0);
+ __Pyx_INCREF(__pyx_v_self);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2185
+ *
+ * def add(self, new_arg):
+ * if new_arg.__class__ in native_numeric_types and isclose(new_arg,0): # <<<<<<<<<<<<<<
+ * return self
+ * # Clone 'self', because ViewSumExpression are immutable
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_arg, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2185, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2185, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2185, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_1 = __pyx_t_5;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2185, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_new_arg, __pyx_int_0};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2185, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_new_arg, __pyx_int_0};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2185, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2185, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_new_arg);
+ __Pyx_GIVEREF(__pyx_v_new_arg);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_new_arg);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2185, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2185, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __pyx_t_5;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2186
+ * def add(self, new_arg):
+ * if new_arg.__class__ in native_numeric_types and isclose(new_arg,0):
+ * return self # <<<<<<<<<<<<<<
+ * # Clone 'self', because ViewSumExpression are immutable
+ * self._shared_args = True
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_r = __pyx_v_self;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2185
+ *
+ * def add(self, new_arg):
+ * if new_arg.__class__ in native_numeric_types and isclose(new_arg,0): # <<<<<<<<<<<<<<
+ * return self
+ * # Clone 'self', because ViewSumExpression are immutable
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2188
+ * return self
+ * # Clone 'self', because ViewSumExpression are immutable
+ * self._shared_args = True # <<<<<<<<<<<<<<
+ * self = self.__class__(self._args_)
+ * #
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_shared_args, Py_True) < 0) __PYX_ERR(0, 2188, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2189
+ * # Clone 'self', because ViewSumExpression are immutable
+ * self._shared_args = True
+ * self = self.__class__(self._args_) # <<<<<<<<<<<<<<
+ * #
+ * if new_arg.__class__ is ViewSumExpression or new_arg.__class__ is _MutableViewSumExpression:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2189, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2189, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2189, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2189, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_8};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2189, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2189, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2189, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_self, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2191
+ * self = self.__class__(self._args_)
+ * #
+ * if new_arg.__class__ is ViewSumExpression or new_arg.__class__ is _MutableViewSumExpression: # <<<<<<<<<<<<<<
+ * self._args_.extend( islice(new_arg._args_, new_arg._nargs) )
+ * elif not new_arg is None:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_arg, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = (__pyx_t_3 == __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_5 != 0);
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_1 = __pyx_t_4;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_arg, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableViewSumExpression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__pyx_t_2 == __pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ __pyx_t_1 = __pyx_t_5;
+ __pyx_L7_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2192
+ * #
+ * if new_arg.__class__ is ViewSumExpression or new_arg.__class__ is _MutableViewSumExpression:
+ * self._args_.extend( islice(new_arg._args_, new_arg._nargs) ) # <<<<<<<<<<<<<<
+ * elif not new_arg is None:
+ * self._args_.append(new_arg)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_extend); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_islice); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_arg, __pyx_n_s_args_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_arg, __pyx_n_s_nargs_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_6, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2192, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_6, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2192, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (__pyx_t_11) {
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_7, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_7, __pyx_t_10);
+ __pyx_t_6 = 0;
+ __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2192, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2192, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2192, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2191
+ * self = self.__class__(self._args_)
+ * #
+ * if new_arg.__class__ is ViewSumExpression or new_arg.__class__ is _MutableViewSumExpression: # <<<<<<<<<<<<<<
+ * self._args_.extend( islice(new_arg._args_, new_arg._nargs) )
+ * elif not new_arg is None:
+ */
+ goto __pyx_L6;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2193
+ * if new_arg.__class__ is ViewSumExpression or new_arg.__class__ is _MutableViewSumExpression:
+ * self._args_.extend( islice(new_arg._args_, new_arg._nargs) )
+ * elif not new_arg is None: # <<<<<<<<<<<<<<
+ * self._args_.append(new_arg)
+ * self._nargs = len(self._args_)
+ */
+ __pyx_t_1 = (__pyx_v_new_arg != Py_None);
+ __pyx_t_5 = (__pyx_t_1 != 0);
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2194
+ * self._args_.extend( islice(new_arg._args_, new_arg._nargs) )
+ * elif not new_arg is None:
+ * self._args_.append(new_arg) # <<<<<<<<<<<<<<
+ * self._nargs = len(self._args_)
+ * return self
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_13 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_new_arg); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 2194, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2193
+ * if new_arg.__class__ is ViewSumExpression or new_arg.__class__ is _MutableViewSumExpression:
+ * self._args_.extend( islice(new_arg._args_, new_arg._nargs) )
+ * elif not new_arg is None: # <<<<<<<<<<<<<<
+ * self._args_.append(new_arg)
+ * self._nargs = len(self._args_)
+ */
+ }
+ __pyx_L6:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2195
+ * elif not new_arg is None:
+ * self._args_.append(new_arg)
+ * self._nargs = len(self._args_) # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2195, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_14 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2195, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2195, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nargs_2, __pyx_t_3) < 0) __PYX_ERR(0, 2195, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2196
+ * self._args_.append(new_arg)
+ * self._nargs = len(self._args_)
+ * return self # <<<<<<<<<<<<<<
+ *
+ * def nargs(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_r = __pyx_v_self;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2184
+ * self._nargs = len(self._args_)
+ *
+ * def add(self, new_arg): # <<<<<<<<<<<<<<
+ * if new_arg.__class__ in native_numeric_types and isclose(new_arg,0):
+ * return self
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ViewSumExpression.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_self);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2198
+ * return self
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return self._nargs
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_5nargs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_5nargs = {"nargs", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_5nargs, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_5nargs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_4nargs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_4nargs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("nargs", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2199
+ *
+ * def nargs(self):
+ * return self._nargs # <<<<<<<<<<<<<<
+ *
+ * def _precedence(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nargs_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2199, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2198
+ * return self
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return self._nargs
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ViewSumExpression.nargs", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2201
+ * return self._nargs
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ViewSumExpression.PRECEDENCE
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_7_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_7_precedence = {"_precedence", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_7_precedence, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_7_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_precedence (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_6_precedence(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_6_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_precedence", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2202
+ *
+ * def _precedence(self):
+ * return ViewSumExpression.PRECEDENCE # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PRECEDENCE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2201
+ * return self._nargs
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ViewSumExpression.PRECEDENCE
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ViewSumExpression._precedence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2204
+ * return ViewSumExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return sum(result)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_9_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_9_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_9_apply_operation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_9_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 2204, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 2204, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2204, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ViewSumExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_8_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_8_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2205
+ *
+ * def _apply_operation(self, result):
+ * return sum(result) # <<<<<<<<<<<<<<
+ *
+ * def construct_node(self, args, memo):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_result);
+ __Pyx_GIVEREF(__pyx_v_result);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_result);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2204
+ * return ViewSumExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return sum(result)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ViewSumExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2207
+ * return sum(result)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(list(args))
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_11construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_11construct_node = {"construct_node", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_11construct_node, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_11construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_memo = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("construct_node (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_memo,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 1); __PYX_ERR(0, 2207, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 2); __PYX_ERR(0, 2207, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "construct_node") < 0)) __PYX_ERR(0, 2207, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_memo = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2207, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ViewSumExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_10construct_node(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_memo);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_10construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("construct_node", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2208
+ *
+ * def construct_node(self, args, memo):
+ * return self.__class__(list(args)) # <<<<<<<<<<<<<<
+ *
+ * def __getstate__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PySequence_List(__pyx_v_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2208, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2208, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2208, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2207
+ * return sum(result)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(list(args))
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ViewSumExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2210
+ * return self.__class__(list(args))
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(ViewSumExpression, self).__getstate__()
+ * for i in ViewSumExpression.__slots__:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_13__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_13__getstate__ = {"__getstate__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_13__getstate__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_13__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_12__getstate__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_12__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_state = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ __Pyx_RefNannySetupContext("__getstate__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2211
+ *
+ * def __getstate__(self):
+ * state = super(ViewSumExpression, self).__getstate__() # <<<<<<<<<<<<<<
+ * for i in ViewSumExpression.__slots__:
+ * state[i] = getattr(self, i)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2211, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2211, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_state = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2212
+ * def __getstate__(self):
+ * state = super(ViewSumExpression, self).__getstate__()
+ * for i in ViewSumExpression.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self, i)
+ * return state
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2212, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_slots); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2212, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2212, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2212, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2212, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2212, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2212, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2212, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_5(__pyx_t_1);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2212, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2213
+ * state = super(ViewSumExpression, self).__getstate__()
+ * for i in ViewSumExpression.__slots__:
+ * state[i] = getattr(self, i) # <<<<<<<<<<<<<<
+ * return state
+ *
+ */
+ __pyx_t_3 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2213, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (unlikely(PyObject_SetItem(__pyx_v_state, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(0, 2213, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2212
+ * def __getstate__(self):
+ * state = super(ViewSumExpression, self).__getstate__()
+ * for i in ViewSumExpression.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self, i)
+ * return state
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2214
+ * for i in ViewSumExpression.__slots__:
+ * state[i] = getattr(self, i)
+ * return state # <<<<<<<<<<<<<<
+ *
+ * def is_constant(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_state);
+ __pyx_r = __pyx_v_state;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2210
+ * return self.__class__(list(args))
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(ViewSumExpression, self).__getstate__()
+ * for i in ViewSumExpression.__slots__:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ViewSumExpression.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_state);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2216
+ * return state
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * #
+ * # In most normal contexts, a ViewSumExpression is non-constant. When
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_15is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_15is_constant = {"is_constant", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_15is_constant, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_15is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_14is_constant(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_14is_constant(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2223
+ * # not constant.
+ * #
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2216
+ * return state
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * #
+ * # In most normal contexts, a ViewSumExpression is non-constant. When
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2225
+ * return False
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * for v in islice(self._args_, self._nargs):
+ * if v.__class__ in nonpyomo_leaf_types:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_17is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_17is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_17is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_17is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_16is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_16is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ Py_ssize_t __pyx_t_8;
+ PyObject *(*__pyx_t_9)(PyObject *);
+ int __pyx_t_10;
+ int __pyx_t_11;
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2226
+ *
+ * def is_potentially_variable(self):
+ * for v in islice(self._args_, self._nargs): # <<<<<<<<<<<<<<
+ * if v.__class__ in nonpyomo_leaf_types:
+ * continue
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_islice); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nargs_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2226, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2226, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_4);
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
+ __pyx_t_9 = NULL;
+ } else {
+ __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2226, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_9)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2226, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 2226, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_9(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2226, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2227
+ * def is_potentially_variable(self):
+ * for v in islice(self._args_, self._nargs):
+ * if v.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * continue
+ * if v.is_variable_type() or v.is_potentially_variable():
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2227, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2227, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_7, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 2227, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_11 = (__pyx_t_10 != 0);
+ if (__pyx_t_11) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2228
+ * for v in islice(self._args_, self._nargs):
+ * if v.__class__ in nonpyomo_leaf_types:
+ * continue # <<<<<<<<<<<<<<
+ * if v.is_variable_type() or v.is_potentially_variable():
+ * return True
+ */
+ goto __pyx_L3_continue;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2227
+ * def is_potentially_variable(self):
+ * for v in islice(self._args_, self._nargs):
+ * if v.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * continue
+ * if v.is_variable_type() or v.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2229
+ * if v.__class__ in nonpyomo_leaf_types:
+ * continue
+ * if v.is_variable_type() or v.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return True
+ * return False
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_is_variable_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2229, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2229, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 2229, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (!__pyx_t_10) {
+ } else {
+ __pyx_t_11 = __pyx_t_10;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2229, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2229, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 2229, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_11 = __pyx_t_10;
+ __pyx_L7_bool_binop_done:;
+ if (__pyx_t_11) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2230
+ * continue
+ * if v.is_variable_type() or v.is_potentially_variable():
+ * return True # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2229
+ * if v.__class__ in nonpyomo_leaf_types:
+ * continue
+ * if v.is_variable_type() or v.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return True
+ * return False
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2226
+ *
+ * def is_potentially_variable(self):
+ * for v in islice(self._args_, self._nargs): # <<<<<<<<<<<<<<
+ * if v.__class__ in nonpyomo_leaf_types:
+ * continue
+ */
+ __pyx_L3_continue:;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2231
+ * if v.is_variable_type() or v.is_potentially_variable():
+ * return True
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2225
+ * return False
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * for v in islice(self._args_, self._nargs):
+ * if v.__class__ in nonpyomo_leaf_types:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ViewSumExpression.is_potentially_variable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2233
+ * return False
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * tmp = [values[0]]
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_19_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_19_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_19_to_string, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_19_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_smap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 2233, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 2233, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 2233, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 2233, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 2233, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2233, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ViewSumExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_18_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_18_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_v_tmp = NULL;
+ Py_ssize_t __pyx_v_i;
+ PyObject *__pyx_v_j = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2234
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * tmp = [values[0]]
+ * for i in range(1,len(values)):
+ */
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2234, __pyx_L1_error)
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2235
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose:
+ * tmp = [values[0]] # <<<<<<<<<<<<<<
+ * for i in range(1,len(values)):
+ * tmp.append(", ")
+ */
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_v_tmp = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2236
+ * if verbose:
+ * tmp = [values[0]]
+ * for i in range(1,len(values)): # <<<<<<<<<<<<<<
+ * tmp.append(", ")
+ * tmp.append(values[i])
+ */
+ __pyx_t_4 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2236, __pyx_L1_error)
+ for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
+ __pyx_v_i = __pyx_t_5;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2237
+ * tmp = [values[0]]
+ * for i in range(1,len(values)):
+ * tmp.append(", ") # <<<<<<<<<<<<<<
+ * tmp.append(values[i])
+ * return "{0}({1})".format(self.getname(), "".join(tmp))
+ */
+ __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_kp_s__19); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2237, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2238
+ * for i in range(1,len(values)):
+ * tmp.append(", ")
+ * tmp.append(values[i]) # <<<<<<<<<<<<<<
+ * return "{0}({1})".format(self.getname(), "".join(tmp))
+ *
+ */
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_3); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2238, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2239
+ * tmp.append(", ")
+ * tmp.append(values[i])
+ * return "{0}({1})".format(self.getname(), "".join(tmp)) # <<<<<<<<<<<<<<
+ *
+ * tmp = [values[0]]
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2239, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2239, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyString_Join(__pyx_kp_s__26, __pyx_v_tmp); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_8};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2239, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_7, __pyx_t_8};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2239, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_t_8);
+ __pyx_t_7 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2234
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * tmp = [values[0]]
+ * for i in range(1,len(values)):
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2241
+ * return "{0}({1})".format(self.getname(), "".join(tmp))
+ *
+ * tmp = [values[0]] # <<<<<<<<<<<<<<
+ * for i in range(1,len(values)):
+ * if values[i][0] == '-':
+ */
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2241, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2241, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_v_tmp = ((PyObject*)__pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2242
+ *
+ * tmp = [values[0]]
+ * for i in range(1,len(values)): # <<<<<<<<<<<<<<
+ * if values[i][0] == '-':
+ * tmp.append(' - ')
+ */
+ __pyx_t_4 = PyObject_Length(__pyx_v_values); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2242, __pyx_L1_error)
+ for (__pyx_t_5 = 1; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
+ __pyx_v_i = __pyx_t_5;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2243
+ * tmp = [values[0]]
+ * for i in range(1,len(values)):
+ * if values[i][0] == '-': # <<<<<<<<<<<<<<
+ * tmp.append(' - ')
+ * j = 1
+ */
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2243, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2243, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s__16, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2243, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2244
+ * for i in range(1,len(values)):
+ * if values[i][0] == '-':
+ * tmp.append(' - ') # <<<<<<<<<<<<<<
+ * j = 1
+ * while values[i][j] == ' ':
+ */
+ __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_kp_s__27); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2244, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2245
+ * if values[i][0] == '-':
+ * tmp.append(' - ')
+ * j = 1 # <<<<<<<<<<<<<<
+ * while values[i][j] == ' ':
+ * j += 1
+ */
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_XDECREF_SET(__pyx_v_j, __pyx_int_1);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2246
+ * tmp.append(' - ')
+ * j = 1
+ * while values[i][j] == ' ': # <<<<<<<<<<<<<<
+ * j += 1
+ * tmp.append(values[i][j:])
+ */
+ while (1) {
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_j); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_2, __pyx_kp_s__17, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2246, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (!__pyx_t_1) break;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2247
+ * j = 1
+ * while values[i][j] == ' ':
+ * j += 1 # <<<<<<<<<<<<<<
+ * tmp.append(values[i][j:])
+ * else:
+ */
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_j, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2247, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v_j, __pyx_t_2);
+ __pyx_t_2 = 0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2248
+ * while values[i][j] == ' ':
+ * j += 1
+ * tmp.append(values[i][j:]) # <<<<<<<<<<<<<<
+ * else:
+ * tmp.append(' + ')
+ */
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2248, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetSlice(__pyx_t_2, 0, 0, &__pyx_v_j, NULL, NULL, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2248, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_3); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2248, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2243
+ * tmp = [values[0]]
+ * for i in range(1,len(values)):
+ * if values[i][0] == '-': # <<<<<<<<<<<<<<
+ * tmp.append(' - ')
+ * j = 1
+ */
+ goto __pyx_L8;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2250
+ * tmp.append(values[i][j:])
+ * else:
+ * tmp.append(' + ') # <<<<<<<<<<<<<<
+ * tmp.append(values[i])
+ * return ''.join(tmp)
+ */
+ /*else*/ {
+ __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_kp_s__28); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2250, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2251
+ * else:
+ * tmp.append(' + ')
+ * tmp.append(values[i]) # <<<<<<<<<<<<<<
+ * return ''.join(tmp)
+ *
+ */
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_values, __pyx_v_i, Py_ssize_t, 1, PyInt_FromSsize_t, 0, 1, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2251, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_3); if (unlikely(__pyx_t_6 == ((int)-1))) __PYX_ERR(0, 2251, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __pyx_L8:;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2252
+ * tmp.append(' + ')
+ * tmp.append(values[i])
+ * return ''.join(tmp) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__26, __pyx_v_tmp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2252, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2233
+ * return False
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * tmp = [values[0]]
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.ViewSumExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_tmp);
+ __Pyx_XDECREF(__pyx_v_j);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2266
+ * __slots__ = ()
+ *
+ * def add(self, new_arg): # <<<<<<<<<<<<<<
+ * if new_arg.__class__ in native_numeric_types and isclose(new_arg,0):
+ * return self
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_25_MutableViewSumExpression_1add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_25_MutableViewSumExpression_1add = {"add", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_25_MutableViewSumExpression_1add, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_25_MutableViewSumExpression_1add(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_new_arg = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("add (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_new_arg,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_new_arg)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, 1); __PYX_ERR(0, 2266, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "add") < 0)) __PYX_ERR(0, 2266, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_new_arg = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("add", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2266, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._MutableViewSumExpression.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_25_MutableViewSumExpression_add(__pyx_self, __pyx_v_self, __pyx_v_new_arg);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_25_MutableViewSumExpression_add(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_new_arg) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ int __pyx_t_13;
+ Py_ssize_t __pyx_t_14;
+ __Pyx_RefNannySetupContext("add", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2267
+ *
+ * def add(self, new_arg):
+ * if new_arg.__class__ in native_numeric_types and isclose(new_arg,0): # <<<<<<<<<<<<<<
+ * return self
+ * # Do not clone 'self', because _MutableViewSumExpression are mutable
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_arg, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2267, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2267, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2267, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_1 = __pyx_t_5;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2267, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_new_arg, __pyx_int_0};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2267, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_new_arg, __pyx_int_0};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2267, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2267, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_new_arg);
+ __Pyx_GIVEREF(__pyx_v_new_arg);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_new_arg);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2267, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2267, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __pyx_t_5;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2268
+ * def add(self, new_arg):
+ * if new_arg.__class__ in native_numeric_types and isclose(new_arg,0):
+ * return self # <<<<<<<<<<<<<<
+ * # Do not clone 'self', because _MutableViewSumExpression are mutable
+ * #self._shared_args = True
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_r = __pyx_v_self;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2267
+ *
+ * def add(self, new_arg):
+ * if new_arg.__class__ in native_numeric_types and isclose(new_arg,0): # <<<<<<<<<<<<<<
+ * return self
+ * # Do not clone 'self', because _MutableViewSumExpression are mutable
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2273
+ * #self = self.__class__(list(self.args))
+ * #
+ * if new_arg.__class__ is ViewSumExpression or new_arg.__class__ is _MutableViewSumExpression: # <<<<<<<<<<<<<<
+ * self._args_.extend( islice(new_arg._args_, new_arg._nargs) )
+ * elif not new_arg is None:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_arg, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = (__pyx_t_3 == __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_5 != 0);
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_1 = __pyx_t_4;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_arg, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableViewSumExpression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__pyx_t_2 == __pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ __pyx_t_1 = __pyx_t_5;
+ __pyx_L7_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2274
+ * #
+ * if new_arg.__class__ is ViewSumExpression or new_arg.__class__ is _MutableViewSumExpression:
+ * self._args_.extend( islice(new_arg._args_, new_arg._nargs) ) # <<<<<<<<<<<<<<
+ * elif not new_arg is None:
+ * self._args_.append(new_arg)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_extend); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_islice); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_arg, __pyx_n_s_args_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_v_new_arg, __pyx_n_s_nargs_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_11 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_9, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2274, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_9, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2274, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (__pyx_t_11) {
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_7, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_7, __pyx_t_10);
+ __pyx_t_9 = 0;
+ __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2274, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2274, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2274, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_12, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2273
+ * #self = self.__class__(list(self.args))
+ * #
+ * if new_arg.__class__ is ViewSumExpression or new_arg.__class__ is _MutableViewSumExpression: # <<<<<<<<<<<<<<
+ * self._args_.extend( islice(new_arg._args_, new_arg._nargs) )
+ * elif not new_arg is None:
+ */
+ goto __pyx_L6;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2275
+ * if new_arg.__class__ is ViewSumExpression or new_arg.__class__ is _MutableViewSumExpression:
+ * self._args_.extend( islice(new_arg._args_, new_arg._nargs) )
+ * elif not new_arg is None: # <<<<<<<<<<<<<<
+ * self._args_.append(new_arg)
+ * self._nargs = len(self._args_)
+ */
+ __pyx_t_1 = (__pyx_v_new_arg != Py_None);
+ __pyx_t_5 = (__pyx_t_1 != 0);
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2276
+ * self._args_.extend( islice(new_arg._args_, new_arg._nargs) )
+ * elif not new_arg is None:
+ * self._args_.append(new_arg) # <<<<<<<<<<<<<<
+ * self._nargs = len(self._args_)
+ * return self
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_13 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_new_arg); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 2276, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2275
+ * if new_arg.__class__ is ViewSumExpression or new_arg.__class__ is _MutableViewSumExpression:
+ * self._args_.extend( islice(new_arg._args_, new_arg._nargs) )
+ * elif not new_arg is None: # <<<<<<<<<<<<<<
+ * self._args_.append(new_arg)
+ * self._nargs = len(self._args_)
+ */
+ }
+ __pyx_L6:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2277
+ * elif not new_arg is None:
+ * self._args_.append(new_arg)
+ * self._nargs = len(self._args_) # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2277, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_14 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_14 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2277, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2277, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nargs_2, __pyx_t_3) < 0) __PYX_ERR(0, 2277, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2278
+ * self._args_.append(new_arg)
+ * self._nargs = len(self._args_)
+ * return self # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_r = __pyx_v_self;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2266
+ * __slots__ = ()
+ *
+ * def add(self, new_arg): # <<<<<<<<<<<<<<
+ * if new_arg.__class__ in native_numeric_types and isclose(new_arg,0):
+ * return self
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._MutableViewSumExpression.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2288
+ * PRECEDENCE = 1
+ *
+ * def _precedence(self): #pragma: no cover # <<<<<<<<<<<<<<
+ * return GetItemExpression.PRECEDENCE
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_1_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_1_precedence = {"_precedence", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_1_precedence, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_1_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_precedence (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression__precedence(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression__precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_precedence", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2289
+ *
+ * def _precedence(self): #pragma: no cover
+ * return GetItemExpression.PRECEDENCE # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, args, base=None):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_GetItemExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2289, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PRECEDENCE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2289, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2288
+ * PRECEDENCE = 1
+ *
+ * def _precedence(self): #pragma: no cover # <<<<<<<<<<<<<<
+ * return GetItemExpression.PRECEDENCE
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression._precedence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2291
+ * return GetItemExpression.PRECEDENCE
+ *
+ * def __init__(self, args, base=None): # <<<<<<<<<<<<<<
+ * """Construct an expression with an operation and a set of arguments"""
+ * self._args_ = args
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_3__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_2__init__[] = "Construct an expression with an operation and a set of arguments";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_3__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_3__init__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_2__init__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_3__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_base = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_base,0};
+ PyObject* values[3] = {0,0,0};
+ values[2] = ((PyObject *)((PyObject *)Py_None));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); __PYX_ERR(0, 2291, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_base);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2291, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_base = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2291, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_2__init__(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_base);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_2__init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_base) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2293
+ * def __init__(self, args, base=None):
+ * """Construct an expression with an operation and a set of arguments"""
+ * self._args_ = args # <<<<<<<<<<<<<<
+ * self._base = base
+ *
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_args_2, __pyx_v_args) < 0) __PYX_ERR(0, 2293, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2294
+ * """Construct an expression with an operation and a set of arguments"""
+ * self._args_ = args
+ * self._base = base # <<<<<<<<<<<<<<
+ *
+ * def nargs(self):
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_base_2, __pyx_v_base) < 0) __PYX_ERR(0, 2294, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2291
+ * return GetItemExpression.PRECEDENCE
+ *
+ * def __init__(self, args, base=None): # <<<<<<<<<<<<<<
+ * """Construct an expression with an operation and a set of arguments"""
+ * self._args_ = args
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2296
+ * self._base = base
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return len(self._args_)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_5nargs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_5nargs = {"nargs", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_5nargs, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_5nargs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_4nargs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_4nargs(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ __Pyx_RefNannySetupContext("nargs", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2297
+ *
+ * def nargs(self):
+ * return len(self._args_) # <<<<<<<<<<<<<<
+ *
+ * def construct_node(self, args, memo):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2297, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2297, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2296
+ * self._base = base
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return len(self._args_)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression.nargs", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2299
+ * return len(self._args_)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._base)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_7construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_7construct_node = {"construct_node", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_7construct_node, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_7construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_memo = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("construct_node (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_memo,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 1); __PYX_ERR(0, 2299, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 2); __PYX_ERR(0, 2299, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "construct_node") < 0)) __PYX_ERR(0, 2299, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_memo = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2299, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_6construct_node(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_memo);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_6construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("construct_node", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2300
+ *
+ * def construct_node(self, args, memo):
+ * return self.__class__(args, self._base) # <<<<<<<<<<<<<<
+ *
+ * def __getstate__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2300, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_v_args, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2300, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_args);
+ __Pyx_GIVEREF(__pyx_v_args);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_args);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2299
+ * return len(self._args_)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._base)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2302
+ * return self.__class__(args, self._base)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(GetItemExpression, self).__getstate__()
+ * for i in GetItemExpression.__slots__:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_9__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_9__getstate__ = {"__getstate__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_9__getstate__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_9__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_8__getstate__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_8__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_state = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ __Pyx_RefNannySetupContext("__getstate__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2303
+ *
+ * def __getstate__(self):
+ * state = super(GetItemExpression, self).__getstate__() # <<<<<<<<<<<<<<
+ * for i in GetItemExpression.__slots__:
+ * state[i] = getattr(self, i)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_GetItemExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2303, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2303, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2303, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_state = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2304
+ * def __getstate__(self):
+ * state = super(GetItemExpression, self).__getstate__()
+ * for i in GetItemExpression.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self, i)
+ * return state
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_GetItemExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_slots); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2304, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2304, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2304, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_5(__pyx_t_1);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2304, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2305
+ * state = super(GetItemExpression, self).__getstate__()
+ * for i in GetItemExpression.__slots__:
+ * state[i] = getattr(self, i) # <<<<<<<<<<<<<<
+ * return state
+ *
+ */
+ __pyx_t_3 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2305, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (unlikely(PyObject_SetItem(__pyx_v_state, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(0, 2305, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2304
+ * def __getstate__(self):
+ * state = super(GetItemExpression, self).__getstate__()
+ * for i in GetItemExpression.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self, i)
+ * return state
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2306
+ * for i in GetItemExpression.__slots__:
+ * state[i] = getattr(self, i)
+ * return state # <<<<<<<<<<<<<<
+ *
+ * def getname(self, *args, **kwds):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_state);
+ __pyx_r = __pyx_v_state;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2302
+ * return self.__class__(args, self._base)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(GetItemExpression, self).__getstate__()
+ * for i in GetItemExpression.__slots__:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_state);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2308
+ * return state
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return self._base.getname(*args, **kwds)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_11getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_11getname = {"getname", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_11getname, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_11getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_kwds = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname (wrapper)", 0);
+ __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
+ __Pyx_GOTREF(__pyx_v_kwds);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, used_pos_args, "getname") < 0)) __PYX_ERR(0, 2308, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("getname", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2308, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_10getname(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwds);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwds);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_10getname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwds) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("getname", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2309
+ *
+ * def getname(self, *args, **kwds):
+ * return self._base.getname(*args, **kwds) # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2309, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2309, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, __pyx_v_kwds); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2309, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2308
+ * return state
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return self._base.getname(*args, **kwds)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2311
+ * return self._base.getname(*args, **kwds)
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * if any(arg.is_potentially_variable() for arg in self._args_ if not arg.__class__ in nonpyomo_leaf_types):
+ * for x in itervalues(self._base):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_13is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_13is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_13is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_13is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_12is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_23is_potentially_variable_2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2312
+ *
+ * def is_potentially_variable(self):
+ * if any(arg.is_potentially_variable() for arg in self._args_ if not arg.__class__ in nonpyomo_leaf_types): # <<<<<<<<<<<<<<
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and x.is_potentially_variable():
+ */
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_23is_potentially_variable_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr *)__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr(__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 2312, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_23is_potentially_variable_2generator5, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_GetItemExpression_is_potentially, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!gen)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression.is_potentially_variable.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_23is_potentially_variable_2generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2312, __pyx_L1_error) }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ } else {
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_4)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_4(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2312, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_arg);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_arg, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_arg, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_5, Py_NE)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_7 = (__pyx_t_6 != 0);
+ if (__pyx_t_7) {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_arg, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_7) {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+ }
+ }
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2311
+ * return self._base.getname(*args, **kwds)
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * if any(arg.is_potentially_variable() for arg in self._args_ if not arg.__class__ in nonpyomo_leaf_types):
+ * for x in itervalues(self._base):
+ */
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_12is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable *__pyx_cur_scope;
+ PyObject *__pyx_v_x = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ Py_ssize_t __pyx_t_7;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ int __pyx_t_9;
+ int __pyx_t_10;
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable *)__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable(__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 2311, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2312
+ *
+ * def is_potentially_variable(self):
+ * if any(arg.is_potentially_variable() for arg in self._args_ if not arg.__class__ in nonpyomo_leaf_types): # <<<<<<<<<<<<<<
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and x.is_potentially_variable():
+ */
+ __pyx_t_1 = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_23is_potentially_variable_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2313
+ * def is_potentially_variable(self):
+ * if any(arg.is_potentially_variable() for arg in self._args_ if not arg.__class__ in nonpyomo_leaf_types):
+ * for x in itervalues(self._base): # <<<<<<<<<<<<<<
+ * if not x.__class__ in nonpyomo_leaf_types and x.is_potentially_variable():
+ * return True
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_itervalues); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2313, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_base_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2313, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2313, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2313, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2313, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2313, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2313, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ } else {
+ __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2313, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2313, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_8)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2313, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2313, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2313, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2313, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_8(__pyx_t_1);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2313, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2314
+ * if any(arg.is_potentially_variable() for arg in self._args_ if not arg.__class__ in nonpyomo_leaf_types):
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and x.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return True
+ * return False
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_6, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2314, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_10 = (__pyx_t_9 != 0);
+ if (__pyx_t_10) {
+ } else {
+ __pyx_t_3 = __pyx_t_10;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2314, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2314, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 2314, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_3 = __pyx_t_10;
+ __pyx_L7_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2315
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and x.is_potentially_variable():
+ * return True # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2314
+ * if any(arg.is_potentially_variable() for arg in self._args_ if not arg.__class__ in nonpyomo_leaf_types):
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and x.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return True
+ * return False
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2313
+ * def is_potentially_variable(self):
+ * if any(arg.is_potentially_variable() for arg in self._args_ if not arg.__class__ in nonpyomo_leaf_types):
+ * for x in itervalues(self._base): # <<<<<<<<<<<<<<
+ * if not x.__class__ in nonpyomo_leaf_types and x.is_potentially_variable():
+ * return True
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2312
+ *
+ * def is_potentially_variable(self):
+ * if any(arg.is_potentially_variable() for arg in self._args_ if not arg.__class__ in nonpyomo_leaf_types): # <<<<<<<<<<<<<<
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and x.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2316
+ * if not x.__class__ in nonpyomo_leaf_types and x.is_potentially_variable():
+ * return True
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def is_fixed(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2311
+ * return self._base.getname(*args, **kwds)
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * if any(arg.is_potentially_variable() for arg in self._args_ if not arg.__class__ in nonpyomo_leaf_types):
+ * for x in itervalues(self._base):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression.is_potentially_variable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_x);
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2318
+ * return False
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * if any(self._args_):
+ * for x in itervalues(self._base):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_15is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_15is_fixed = {"is_fixed", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_15is_fixed, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_15is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_fixed (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_14is_fixed(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_14is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_x = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ Py_ssize_t __pyx_t_7;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ int __pyx_t_9;
+ int __pyx_t_10;
+ __Pyx_RefNannySetupContext("is_fixed", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2319
+ *
+ * def is_fixed(self):
+ * if any(self._args_): # <<<<<<<<<<<<<<
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed():
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2319, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2319, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_any, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2319, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2319, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2320
+ * def is_fixed(self):
+ * if any(self._args_):
+ * for x in itervalues(self._base): # <<<<<<<<<<<<<<
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed():
+ * return False
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2320, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2320, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2320, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ } else {
+ __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2320, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_8)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2320, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2320, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2320, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_8(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2320, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2321
+ * if any(self._args_):
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed(): # <<<<<<<<<<<<<<
+ * return False
+ * return True
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2321, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2321, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_6, Py_NE)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2321, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_10 = (__pyx_t_9 != 0);
+ if (__pyx_t_10) {
+ } else {
+ __pyx_t_3 = __pyx_t_10;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_is_fixed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2321, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2321, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2321, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 2321, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_9 = ((!__pyx_t_10) != 0);
+ __pyx_t_3 = __pyx_t_9;
+ __pyx_L7_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2322
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed():
+ * return False # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2321
+ * if any(self._args_):
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed(): # <<<<<<<<<<<<<<
+ * return False
+ * return True
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2320
+ * def is_fixed(self):
+ * if any(self._args_):
+ * for x in itervalues(self._base): # <<<<<<<<<<<<<<
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed():
+ * return False
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2319
+ *
+ * def is_fixed(self):
+ * if any(self._args_): # <<<<<<<<<<<<<<
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2323
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed():
+ * return False
+ * return True # <<<<<<<<<<<<<<
+ *
+ * def _is_fixed(self, values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2318
+ * return False
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * if any(self._args_):
+ * for x in itervalues(self._base):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression.is_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_x);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2325
+ * return True
+ *
+ * def _is_fixed(self, values): # <<<<<<<<<<<<<<
+ * from pyomo.core.base import Var # TODO
+ * from pyomo.core.kernel.component_variable import IVariable # TODO
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_17_is_fixed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_17_is_fixed = {"_is_fixed", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_17_is_fixed, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_17_is_fixed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_is_fixed (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_is_fixed", 1, 2, 2, 1); __PYX_ERR(0, 2325, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_is_fixed") < 0)) __PYX_ERR(0, 2325, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_is_fixed", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2325, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression._is_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_16_is_fixed(__pyx_self, __pyx_v_self, __pyx_v_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_16_is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values) {
+ PyObject *__pyx_v_Var = NULL;
+ PyObject *__pyx_v_IVariable = NULL;
+ PyObject *__pyx_v_x = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ Py_ssize_t __pyx_t_9;
+ PyObject *(*__pyx_t_10)(PyObject *);
+ __Pyx_RefNannySetupContext("_is_fixed", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2326
+ *
+ * def _is_fixed(self, values):
+ * from pyomo.core.base import Var # TODO # <<<<<<<<<<<<<<
+ * from pyomo.core.kernel.component_variable import IVariable # TODO
+ * if isinstance(self._base, (Var, IVariable)):
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_Var);
+ __Pyx_GIVEREF(__pyx_n_s_Var);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Var);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_core_base, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_1);
+ __pyx_v_Var = __pyx_t_1;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2327
+ * def _is_fixed(self, values):
+ * from pyomo.core.base import Var # TODO
+ * from pyomo.core.kernel.component_variable import IVariable # TODO # <<<<<<<<<<<<<<
+ * if isinstance(self._base, (Var, IVariable)):
+ * for x in itervalues(self._base):
+ */
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2327, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_IVariable);
+ __Pyx_GIVEREF(__pyx_n_s_IVariable);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_IVariable);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyomo_core_kernel_component_vari, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2327, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_IVariable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2327, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_v_IVariable = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2328
+ * from pyomo.core.base import Var # TODO
+ * from pyomo.core.kernel.component_variable import IVariable # TODO
+ * if isinstance(self._base, (Var, IVariable)): # <<<<<<<<<<<<<<
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed():
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_Var);
+ __pyx_t_2 = __pyx_v_Var;
+ __Pyx_INCREF(__pyx_v_IVariable);
+ __pyx_t_3 = __pyx_v_IVariable;
+ __pyx_t_5 = PyObject_IsInstance(__pyx_t_1, __pyx_t_2);
+ __pyx_t_6 = (__pyx_t_5 != 0);
+ if (!__pyx_t_6) {
+ } else {
+ __pyx_t_4 = __pyx_t_6;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_6 = PyObject_IsInstance(__pyx_t_1, __pyx_t_3);
+ __pyx_t_5 = (__pyx_t_6 != 0);
+ __pyx_t_4 = __pyx_t_5;
+ __pyx_L4_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2329
+ * from pyomo.core.kernel.component_variable import IVariable # TODO
+ * if isinstance(self._base, (Var, IVariable)):
+ * for x in itervalues(self._base): # <<<<<<<<<<<<<<
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed():
+ * return False
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2329, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2329, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2329, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2329, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2329, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2329, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2329, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
+ __pyx_t_10 = NULL;
+ } else {
+ __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2329, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2329, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_10)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 2329, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2329, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 2329, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2329, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_10(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2329, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2330
+ * if isinstance(self._base, (Var, IVariable)):
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed(): # <<<<<<<<<<<<<<
+ * return False
+ * return True
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_8, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2330, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_6 = (__pyx_t_4 != 0);
+ if (__pyx_t_6) {
+ } else {
+ __pyx_t_5 = __pyx_t_6;
+ goto __pyx_L9_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_is_fixed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2330, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2330, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2330, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2330, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_4 = ((!__pyx_t_6) != 0);
+ __pyx_t_5 = __pyx_t_4;
+ __pyx_L9_bool_binop_done:;
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2331
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed():
+ * return False # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2330
+ * if isinstance(self._base, (Var, IVariable)):
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed(): # <<<<<<<<<<<<<<
+ * return False
+ * return True
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2329
+ * from pyomo.core.kernel.component_variable import IVariable # TODO
+ * if isinstance(self._base, (Var, IVariable)):
+ * for x in itervalues(self._base): # <<<<<<<<<<<<<<
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed():
+ * return False
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2328
+ * from pyomo.core.base import Var # TODO
+ * from pyomo.core.kernel.component_variable import IVariable # TODO
+ * if isinstance(self._base, (Var, IVariable)): # <<<<<<<<<<<<<<
+ * for x in itervalues(self._base):
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2332
+ * if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed():
+ * return False
+ * return True # <<<<<<<<<<<<<<
+ *
+ * def _compute_polynomial_degree(self, result): # TODO: coverage
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2325
+ * return True
+ *
+ * def _is_fixed(self, values): # <<<<<<<<<<<<<<
+ * from pyomo.core.base import Var # TODO
+ * from pyomo.core.kernel.component_variable import IVariable # TODO
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression._is_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_Var);
+ __Pyx_XDECREF(__pyx_v_IVariable);
+ __Pyx_XDECREF(__pyx_v_x);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2334
+ * return True
+ *
+ * def _compute_polynomial_degree(self, result): # TODO: coverage # <<<<<<<<<<<<<<
+ * if any(x != 0 for x in result):
+ * return None
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_19_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_19_compute_polynomial_degree = {"_compute_polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_19_compute_polynomial_degree, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_19_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, 1); __PYX_ERR(0, 2334, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_compute_polynomial_degree") < 0)) __PYX_ERR(0, 2334, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2334, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_18_compute_polynomial_degree(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_26_compute_polynomial_degree_2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2335
+ *
+ * def _compute_polynomial_degree(self, result): # TODO: coverage
+ * if any(x != 0 for x in result): # <<<<<<<<<<<<<<
+ * return None
+ * ans = 0
+ */
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_26_compute_polynomial_degree_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr *)__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr(__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 2335, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_26_compute_polynomial_degree_2generator6, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_GetItemExpression__compute_polyn, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!gen)) __PYX_ERR(0, 2335, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression._compute_polynomial_degree.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_26_compute_polynomial_degree_2generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *(*__pyx_t_3)(PyObject *);
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2335, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_result)) { __Pyx_RaiseClosureNameError("result"); __PYX_ERR(0, 2335, __pyx_L1_error) }
+ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_result)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_result)) {
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_result; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ __pyx_t_3 = NULL;
+ } else {
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_result); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2335, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2335, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_3)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 2335, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2335, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 2335, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2335, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_3(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2335, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = PyObject_RichCompare(__pyx_cur_scope->__pyx_v_x, __pyx_int_0, Py_NE); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2335, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2335, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_5) {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L0;
+ }
+ }
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2334
+ * return True
+ *
+ * def _compute_polynomial_degree(self, result): # TODO: coverage # <<<<<<<<<<<<<<
+ * if any(x != 0 for x in result):
+ * return None
+ */
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_18_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree *__pyx_cur_scope;
+ PyObject *__pyx_v_ans = NULL;
+ PyObject *__pyx_v_x = NULL;
+ PyObject *__pyx_v_tmp = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ Py_ssize_t __pyx_t_7;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ int __pyx_t_9;
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree *)__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree(__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 2334, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_v_result = __pyx_v_result;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_result);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_result);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2335
+ *
+ * def _compute_polynomial_degree(self, result): # TODO: coverage
+ * if any(x != 0 for x in result): # <<<<<<<<<<<<<<
+ * return None
+ * ans = 0
+ */
+ __pyx_t_1 = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_26_compute_polynomial_degree_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2335, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2335, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2335, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2336
+ * def _compute_polynomial_degree(self, result): # TODO: coverage
+ * if any(x != 0 for x in result):
+ * return None # <<<<<<<<<<<<<<
+ * ans = 0
+ * for x in itervalues(self._base):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2335
+ *
+ * def _compute_polynomial_degree(self, result): # TODO: coverage
+ * if any(x != 0 for x in result): # <<<<<<<<<<<<<<
+ * return None
+ * ans = 0
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2337
+ * if any(x != 0 for x in result):
+ * return None
+ * ans = 0 # <<<<<<<<<<<<<<
+ * for x in itervalues(self._base):
+ * if x.__class__ in nonpyomo_leaf_types:
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_v_ans = __pyx_int_0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2338
+ * return None
+ * ans = 0
+ * for x in itervalues(self._base): # <<<<<<<<<<<<<<
+ * if x.__class__ in nonpyomo_leaf_types:
+ * continue
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_itervalues); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2338, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2338, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2338, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ } else {
+ __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2338, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_8)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2338, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 2338, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_8(__pyx_t_1);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2338, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_x, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2339
+ * ans = 0
+ * for x in itervalues(self._base):
+ * if x.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * continue
+ * tmp = x.polynomial_degree()
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2339, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2339, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2339, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_9 = (__pyx_t_3 != 0);
+ if (__pyx_t_9) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2340
+ * for x in itervalues(self._base):
+ * if x.__class__ in nonpyomo_leaf_types:
+ * continue # <<<<<<<<<<<<<<
+ * tmp = x.polynomial_degree()
+ * if tmp is None:
+ */
+ goto __pyx_L4_continue;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2339
+ * ans = 0
+ * for x in itervalues(self._base):
+ * if x.__class__ in nonpyomo_leaf_types: # <<<<<<<<<<<<<<
+ * continue
+ * tmp = x.polynomial_degree()
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2341
+ * if x.__class__ in nonpyomo_leaf_types:
+ * continue
+ * tmp = x.polynomial_degree() # <<<<<<<<<<<<<<
+ * if tmp is None:
+ * return None
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_polynomial_degree_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2341, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2341, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2341, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_tmp, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2342
+ * continue
+ * tmp = x.polynomial_degree()
+ * if tmp is None: # <<<<<<<<<<<<<<
+ * return None
+ * elif tmp > ans:
+ */
+ __pyx_t_9 = (__pyx_v_tmp == Py_None);
+ __pyx_t_3 = (__pyx_t_9 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2343
+ * tmp = x.polynomial_degree()
+ * if tmp is None:
+ * return None # <<<<<<<<<<<<<<
+ * elif tmp > ans:
+ * ans = tmp
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2342
+ * continue
+ * tmp = x.polynomial_degree()
+ * if tmp is None: # <<<<<<<<<<<<<<
+ * return None
+ * elif tmp > ans:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2344
+ * if tmp is None:
+ * return None
+ * elif tmp > ans: # <<<<<<<<<<<<<<
+ * ans = tmp
+ * return ans
+ */
+ __pyx_t_6 = PyObject_RichCompare(__pyx_v_tmp, __pyx_v_ans, Py_GT); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2344, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2344, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2345
+ * return None
+ * elif tmp > ans:
+ * ans = tmp # <<<<<<<<<<<<<<
+ * return ans
+ *
+ */
+ __Pyx_INCREF(__pyx_v_tmp);
+ __Pyx_DECREF_SET(__pyx_v_ans, __pyx_v_tmp);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2344
+ * if tmp is None:
+ * return None
+ * elif tmp > ans: # <<<<<<<<<<<<<<
+ * ans = tmp
+ * return ans
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2338
+ * return None
+ * ans = 0
+ * for x in itervalues(self._base): # <<<<<<<<<<<<<<
+ * if x.__class__ in nonpyomo_leaf_types:
+ * continue
+ */
+ __pyx_L4_continue:;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2346
+ * elif tmp > ans:
+ * ans = tmp
+ * return ans # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result): # TODO: coverage
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_ans);
+ __pyx_r = __pyx_v_ans;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2334
+ * return True
+ *
+ * def _compute_polynomial_degree(self, result): # TODO: coverage # <<<<<<<<<<<<<<
+ * if any(x != 0 for x in result):
+ * return None
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_ans);
+ __Pyx_XDECREF(__pyx_v_x);
+ __Pyx_XDECREF(__pyx_v_tmp);
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2348
+ * return ans
+ *
+ * def _apply_operation(self, result): # TODO: coverage # <<<<<<<<<<<<<<
+ * return value(self._base.__getitem__( tuple(result) ))
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_21_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_21_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_21_apply_operation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_21_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 2348, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 2348, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2348, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_20_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_20_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2349
+ *
+ * def _apply_operation(self, result): # TODO: coverage
+ * return value(self._base.__getitem__( tuple(result) )) # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_base_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getitem); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2349, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2349, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_4};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2349, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2349, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2349, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2349, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2348
+ * return ans
+ *
+ * def _apply_operation(self, result): # TODO: coverage # <<<<<<<<<<<<<<
+ * return value(self._base.__getitem__( tuple(result) ))
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2351
+ * return value(self._base.__getitem__( tuple(result) ))
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_23_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_23_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_23_to_string, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_23_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_smap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 2351, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 2351, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 2351, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 2351, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 2351, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2351, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_22_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_22_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2352
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * return "{0}({1})".format(self.getname(), values[0])
+ * return "%s%s" % (self.getname(), values[0])
+ */
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2352, __pyx_L1_error)
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2353
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0]) # <<<<<<<<<<<<<<
+ * return "%s%s" % (self.getname(), values[0])
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2353, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2353, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2353, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2353, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2353, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2353, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2353, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2353, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2353, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2352
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * return "{0}({1})".format(self.getname(), values[0])
+ * return "%s%s" % (self.getname(), values[0])
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2354
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ * return "%s%s" % (self.getname(), values[0]) # <<<<<<<<<<<<<<
+ *
+ * def resolve_template(self): # TODO: coverage
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2354, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2354, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
+ __pyx_t_2 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2351
+ * return value(self._base.__getitem__( tuple(result) ))
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2356
+ * return "%s%s" % (self.getname(), values[0])
+ *
+ * def resolve_template(self): # TODO: coverage # <<<<<<<<<<<<<<
+ * return self._base.__getitem__(tuple(value(i) for i in self._args_))
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_25resolve_template(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_25resolve_template = {"resolve_template", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_25resolve_template, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_25resolve_template(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("resolve_template (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_24resolve_template(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_16resolve_template_2generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2357
+ *
+ * def resolve_template(self): # TODO: coverage
+ * return self._base.__getitem__(tuple(value(i) for i in self._args_)) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_16resolve_template_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr *)__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr(__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 2357, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_16resolve_template_2generator7, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_GetItemExpression_resolve_templa, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!gen)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression.resolve_template.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_16resolve_template_2generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2357, __pyx_L1_error) }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ } else {
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_4)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_4(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2357, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_i};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_i};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_i);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_i);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_cur_scope->__pyx_v_i);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_3;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_4;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_2);
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_4 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2356
+ * return "%s%s" % (self.getname(), values[0])
+ *
+ * def resolve_template(self): # TODO: coverage # <<<<<<<<<<<<<<
+ * return self._base.__getitem__(tuple(value(i) for i in self._args_))
+ *
+ */
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_24resolve_template(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("resolve_template", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template *)__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template(__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 2356, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2357
+ *
+ * def resolve_template(self): # TODO: coverage
+ * return self._base.__getitem__(tuple(value(i) for i in self._args_)) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_base_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getitem); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_16resolve_template_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2356
+ * return "%s%s" % (self.getname(), values[0])
+ *
+ * def resolve_template(self): # TODO: coverage # <<<<<<<<<<<<<<
+ * return self._base.__getitem__(tuple(value(i) for i in self._args_))
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.GetItemExpression.resolve_template", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2377
+ * # one uses __call__ for value() and NOT bool().
+ *
+ * def __init__(self, IF_=None, THEN_=None, ELSE_=None): # <<<<<<<<<<<<<<
+ * if type(IF_) is tuple and THEN_==None and ELSE_==None:
+ * IF_, THEN_, ELSE_ = IF_
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_IF_ = 0;
+ PyObject *__pyx_v_THEN_ = 0;
+ PyObject *__pyx_v_ELSE_ = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_IF,&__pyx_n_s_THEN,&__pyx_n_s_ELSE,0};
+ PyObject* values[4] = {0,0,0,0};
+ values[1] = ((PyObject *)((PyObject *)Py_None));
+ values[2] = ((PyObject *)((PyObject *)Py_None));
+ values[3] = ((PyObject *)((PyObject *)Py_None));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_IF);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_THEN);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ELSE);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2377, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_IF_ = values[1];
+ __pyx_v_THEN_ = values[2];
+ __pyx_v_ELSE_ = values[3];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2377, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.Expr_if.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if___init__(__pyx_self, __pyx_v_self, __pyx_v_IF_, __pyx_v_THEN_, __pyx_v_ELSE_);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_IF_, PyObject *__pyx_v_THEN_, PyObject *__pyx_v_ELSE_) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ PyObject *__pyx_t_9 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+ __Pyx_INCREF(__pyx_v_IF_);
+ __Pyx_INCREF(__pyx_v_THEN_);
+ __Pyx_INCREF(__pyx_v_ELSE_);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2378
+ *
+ * def __init__(self, IF_=None, THEN_=None, ELSE_=None):
+ * if type(IF_) is tuple and THEN_==None and ELSE_==None: # <<<<<<<<<<<<<<
+ * IF_, THEN_, ELSE_ = IF_
+ * self._args_ = (IF_, THEN_, ELSE_)
+ */
+ __pyx_t_2 = (((PyObject *)Py_TYPE(__pyx_v_IF_)) == ((PyObject *)(&PyTuple_Type)));
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_1 = __pyx_t_3;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_THEN_, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2378, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2378, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_1 = __pyx_t_3;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_ELSE_, Py_None, Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2378, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2378, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2379
+ * def __init__(self, IF_=None, THEN_=None, ELSE_=None):
+ * if type(IF_) is tuple and THEN_==None and ELSE_==None:
+ * IF_, THEN_, ELSE_ = IF_ # <<<<<<<<<<<<<<
+ * self._args_ = (IF_, THEN_, ELSE_)
+ * self._if = IF_
+ */
+ if ((likely(PyTuple_CheckExact(__pyx_v_IF_))) || (PyList_CheckExact(__pyx_v_IF_))) {
+ PyObject* sequence = __pyx_v_IF_;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 3)) {
+ if (size > 3) __Pyx_RaiseTooManyValuesError(3);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 2379, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 2);
+ } else {
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 2);
+ }
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ #else
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2379, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2379, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2379, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_7 = PyObject_GetIter(__pyx_v_IF_); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2379, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
+ index = 0; __pyx_t_4 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_4)) goto __pyx_L7_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_4);
+ index = 1; __pyx_t_5 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_5)) goto __pyx_L7_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ index = 2; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L7_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 3) < 0) __PYX_ERR(0, 2379, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L8_unpacking_done;
+ __pyx_L7_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 2379, __pyx_L1_error)
+ __pyx_L8_unpacking_done:;
+ }
+ __Pyx_DECREF_SET(__pyx_v_IF_, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __Pyx_DECREF_SET(__pyx_v_THEN_, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __Pyx_DECREF_SET(__pyx_v_ELSE_, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2378
+ *
+ * def __init__(self, IF_=None, THEN_=None, ELSE_=None):
+ * if type(IF_) is tuple and THEN_==None and ELSE_==None: # <<<<<<<<<<<<<<
+ * IF_, THEN_, ELSE_ = IF_
+ * self._args_ = (IF_, THEN_, ELSE_)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2380
+ * if type(IF_) is tuple and THEN_==None and ELSE_==None:
+ * IF_, THEN_, ELSE_ = IF_
+ * self._args_ = (IF_, THEN_, ELSE_) # <<<<<<<<<<<<<<
+ * self._if = IF_
+ * self._then = THEN_
+ */
+ __pyx_t_6 = PyTuple_New(3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2380, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v_IF_);
+ __Pyx_GIVEREF(__pyx_v_IF_);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_IF_);
+ __Pyx_INCREF(__pyx_v_THEN_);
+ __Pyx_GIVEREF(__pyx_v_THEN_);
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_THEN_);
+ __Pyx_INCREF(__pyx_v_ELSE_);
+ __Pyx_GIVEREF(__pyx_v_ELSE_);
+ PyTuple_SET_ITEM(__pyx_t_6, 2, __pyx_v_ELSE_);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_args_2, __pyx_t_6) < 0) __PYX_ERR(0, 2380, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2381
+ * IF_, THEN_, ELSE_ = IF_
+ * self._args_ = (IF_, THEN_, ELSE_)
+ * self._if = IF_ # <<<<<<<<<<<<<<
+ * self._then = THEN_
+ * self._else = ELSE_
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_if, __pyx_v_IF_) < 0) __PYX_ERR(0, 2381, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2382
+ * self._args_ = (IF_, THEN_, ELSE_)
+ * self._if = IF_
+ * self._then = THEN_ # <<<<<<<<<<<<<<
+ * self._else = ELSE_
+ * if self._if.__class__ in native_numeric_types:
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_then, __pyx_v_THEN_) < 0) __PYX_ERR(0, 2382, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2383
+ * self._if = IF_
+ * self._then = THEN_
+ * self._else = ELSE_ # <<<<<<<<<<<<<<
+ * if self._if.__class__ in native_numeric_types:
+ * self._if = as_numeric(self._if)
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_else, __pyx_v_ELSE_) < 0) __PYX_ERR(0, 2383, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2384
+ * self._then = THEN_
+ * self._else = ELSE_
+ * if self._if.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * self._if = as_numeric(self._if)
+ *
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_if); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2384, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_3 = (__pyx_t_1 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2385
+ * self._else = ELSE_
+ * if self._if.__class__ in native_numeric_types:
+ * self._if = as_numeric(self._if) # <<<<<<<<<<<<<<
+ *
+ * def nargs(self):
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_as_numeric); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2385, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_if); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2385, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2385, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2385, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_4};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2385, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2385, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2385, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_if, __pyx_t_6) < 0) __PYX_ERR(0, 2385, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2384
+ * self._then = THEN_
+ * self._else = ELSE_
+ * if self._if.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * self._if = as_numeric(self._if)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2377
+ * # one uses __call__ for value() and NOT bool().
+ *
+ * def __init__(self, IF_=None, THEN_=None, ELSE_=None): # <<<<<<<<<<<<<<
+ * if type(IF_) is tuple and THEN_==None and ELSE_==None:
+ * IF_, THEN_, ELSE_ = IF_
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.Expr_if.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_IF_);
+ __Pyx_XDECREF(__pyx_v_THEN_);
+ __Pyx_XDECREF(__pyx_v_ELSE_);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2387
+ * self._if = as_numeric(self._if)
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 3
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_3nargs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_3nargs = {"nargs", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_3nargs, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_3nargs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_2nargs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_2nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2388
+ *
+ * def nargs(self):
+ * return 3 # <<<<<<<<<<<<<<
+ *
+ * def __getstate__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_3);
+ __pyx_r = __pyx_int_3;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2387
+ * self._if = as_numeric(self._if)
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 3
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2390
+ * return 3
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(Expr_if, self).__getstate__()
+ * for i in Expr_if.__slots__:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_5__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_5__getstate__ = {"__getstate__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_5__getstate__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_5__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_4__getstate__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_4__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_state = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ __Pyx_RefNannySetupContext("__getstate__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2391
+ *
+ * def __getstate__(self):
+ * state = super(Expr_if, self).__getstate__() # <<<<<<<<<<<<<<
+ * for i in Expr_if.__slots__:
+ * state[i] = getattr(self, i)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Expr_if); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2391, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2391, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2391, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2391, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2391, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2391, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_state = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2392
+ * def __getstate__(self):
+ * state = super(Expr_if, self).__getstate__()
+ * for i in Expr_if.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self, i)
+ * return state
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Expr_if); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_slots); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2392, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2392, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2392, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_5(__pyx_t_1);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2392, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2393
+ * state = super(Expr_if, self).__getstate__()
+ * for i in Expr_if.__slots__:
+ * state[i] = getattr(self, i) # <<<<<<<<<<<<<<
+ * return state
+ *
+ */
+ __pyx_t_3 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2393, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (unlikely(PyObject_SetItem(__pyx_v_state, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(0, 2393, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2392
+ * def __getstate__(self):
+ * state = super(Expr_if, self).__getstate__()
+ * for i in Expr_if.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self, i)
+ * return state
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2394
+ * for i in Expr_if.__slots__:
+ * state[i] = getattr(self, i)
+ * return state # <<<<<<<<<<<<<<
+ *
+ * def getname(self, *args, **kwds):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_state);
+ __pyx_r = __pyx_v_state;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2390
+ * return 3
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(Expr_if, self).__getstate__()
+ * for i in Expr_if.__slots__:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.Expr_if.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_state);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2396
+ * return state
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return "Expr_if"
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_7getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_7getname = {"getname", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_7getname, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_7getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_kwds = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname (wrapper)", 0);
+ __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
+ __Pyx_GOTREF(__pyx_v_kwds);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, used_pos_args, "getname") < 0)) __PYX_ERR(0, 2396, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("getname", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2396, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.Expr_if.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_6getname(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwds);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwds);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_6getname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2397
+ *
+ * def getname(self, *args, **kwds):
+ * return "Expr_if" # <<<<<<<<<<<<<<
+ *
+ * def _is_fixed(self, args):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_n_s_Expr_if);
+ __pyx_r = __pyx_n_s_Expr_if;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2396
+ * return state
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return "Expr_if"
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2399
+ * return "Expr_if"
+ *
+ * def _is_fixed(self, args): # <<<<<<<<<<<<<<
+ * assert(len(args) == 3)
+ * if args[0]: #self._if.is_constant():
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_9_is_fixed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_9_is_fixed = {"_is_fixed", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_9_is_fixed, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_9_is_fixed(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_is_fixed (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_is_fixed", 1, 2, 2, 1); __PYX_ERR(0, 2399, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_is_fixed") < 0)) __PYX_ERR(0, 2399, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_is_fixed", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2399, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.Expr_if._is_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_8_is_fixed(__pyx_self, __pyx_v_self, __pyx_v_args);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_8_is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ Py_ssize_t __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("_is_fixed", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2400
+ *
+ * def _is_fixed(self, args):
+ * assert(len(args) == 3) # <<<<<<<<<<<<<<
+ * if args[0]: #self._if.is_constant():
+ * if self._if():
+ */
+ #ifndef CYTHON_WITHOUT_ASSERTIONS
+ if (unlikely(!Py_OptimizeFlag)) {
+ __pyx_t_1 = PyObject_Length(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2400, __pyx_L1_error)
+ if (unlikely(!((__pyx_t_1 == 3) != 0))) {
+ PyErr_SetNone(PyExc_AssertionError);
+ __PYX_ERR(0, 2400, __pyx_L1_error)
+ }
+ }
+ #endif
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2401
+ * def _is_fixed(self, args):
+ * assert(len(args) == 3)
+ * if args[0]: #self._if.is_constant(): # <<<<<<<<<<<<<<
+ * if self._if():
+ * return args[1] #self._then.is_constant()
+ */
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2401, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2401, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2402
+ * assert(len(args) == 3)
+ * if args[0]: #self._if.is_constant():
+ * if self._if(): # <<<<<<<<<<<<<<
+ * return args[1] #self._then.is_constant()
+ * else:
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_if); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2402, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2402, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2402, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2402, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2403
+ * if args[0]: #self._if.is_constant():
+ * if self._if():
+ * return args[1] #self._then.is_constant() # <<<<<<<<<<<<<<
+ * else:
+ * return args[2] #self._else.is_constant()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_args, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2403, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2402
+ * assert(len(args) == 3)
+ * if args[0]: #self._if.is_constant():
+ * if self._if(): # <<<<<<<<<<<<<<
+ * return args[1] #self._then.is_constant()
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2405
+ * return args[1] #self._then.is_constant()
+ * else:
+ * return args[2] #self._else.is_constant() # <<<<<<<<<<<<<<
+ * else:
+ * return False
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2405, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2401
+ * def _is_fixed(self, args):
+ * assert(len(args) == 3)
+ * if args[0]: #self._if.is_constant(): # <<<<<<<<<<<<<<
+ * if self._if():
+ * return args[1] #self._then.is_constant()
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2407
+ * return args[2] #self._else.is_constant()
+ * else:
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def is_constant(self):
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2399
+ * return "Expr_if"
+ *
+ * def _is_fixed(self, args): # <<<<<<<<<<<<<<
+ * assert(len(args) == 3)
+ * if args[0]: #self._if.is_constant():
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.Expr_if._is_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2409
+ * return False
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * if self._if.__class__ in native_numeric_types or self._if.is_constant():
+ * if value(self._if):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_11is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_11is_constant = {"is_constant", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_11is_constant, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_11is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_10is_constant(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_10is_constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("is_constant", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2410
+ *
+ * def is_constant(self):
+ * if self._if.__class__ in native_numeric_types or self._if.is_constant(): # <<<<<<<<<<<<<<
+ * if value(self._if):
+ * return (self._then.__class__ in native_numeric_types or self._then.is_constant())
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_if); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2410, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_1 = __pyx_t_5;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_if); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2410, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2410, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2410, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = __pyx_t_5;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2411
+ * def is_constant(self):
+ * if self._if.__class__ in native_numeric_types or self._if.is_constant():
+ * if value(self._if): # <<<<<<<<<<<<<<
+ * return (self._then.__class__ in native_numeric_types or self._then.is_constant())
+ * else:
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2411, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_if); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2411, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2411, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2411, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_3};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2411, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2411, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2411, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2411, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2412
+ * if self._if.__class__ in native_numeric_types or self._if.is_constant():
+ * if value(self._if):
+ * return (self._then.__class__ in native_numeric_types or self._then.is_constant()) # <<<<<<<<<<<<<<
+ * else:
+ * return (self._else.__class__ in native_numeric_types or self._else.is_constant())
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_then); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2412, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2412, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2412, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2412, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (!__pyx_t_1) {
+ } else {
+ __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2412, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_then); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2412, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2412, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2412, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2412, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_INCREF(__pyx_t_6);
+ __pyx_t_2 = __pyx_t_6;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_L7_bool_binop_done:;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2411
+ * def is_constant(self):
+ * if self._if.__class__ in native_numeric_types or self._if.is_constant():
+ * if value(self._if): # <<<<<<<<<<<<<<
+ * return (self._then.__class__ in native_numeric_types or self._then.is_constant())
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2414
+ * return (self._then.__class__ in native_numeric_types or self._then.is_constant())
+ * else:
+ * return (self._else.__class__ in native_numeric_types or self._else.is_constant()) # <<<<<<<<<<<<<<
+ * else:
+ * return (self._then.__class__ in native_numeric_types or self._then.is_constant()) and (self._else.__class__ in native_numeric_types or self._else.is_constant())
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_else); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2414, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2414, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2414, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2414, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (!__pyx_t_1) {
+ } else {
+ __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2414, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L9_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_else); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2414, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2414, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2414, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2414, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_INCREF(__pyx_t_6);
+ __pyx_t_2 = __pyx_t_6;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_L9_bool_binop_done:;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2410
+ *
+ * def is_constant(self):
+ * if self._if.__class__ in native_numeric_types or self._if.is_constant(): # <<<<<<<<<<<<<<
+ * if value(self._if):
+ * return (self._then.__class__ in native_numeric_types or self._then.is_constant())
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2416
+ * return (self._else.__class__ in native_numeric_types or self._else.is_constant())
+ * else:
+ * return (self._then.__class__ in native_numeric_types or self._then.is_constant()) and (self._else.__class__ in native_numeric_types or self._else.is_constant()) # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_then); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_8, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (!__pyx_t_1) {
+ } else {
+ goto __pyx_L12_next_and;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_then); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ if (__pyx_t_1) {
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_6);
+ __pyx_t_2 = __pyx_t_6;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L11_bool_binop_done;
+ }
+ __pyx_L12_next_and:;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_else); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (!__pyx_t_1) {
+ } else {
+ __pyx_t_6 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L11_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_else); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2416, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_INCREF(__pyx_t_6);
+ __pyx_t_2 = __pyx_t_6;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_L11_bool_binop_done:;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2409
+ * return False
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * if self._if.__class__ in native_numeric_types or self._if.is_constant():
+ * if value(self._if):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.Expr_if.is_constant", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2418
+ * return (self._then.__class__ in native_numeric_types or self._then.is_constant()) and (self._else.__class__ in native_numeric_types or self._else.is_constant())
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return (not self._if.__class__ in native_numeric_types and self._if.is_potentially_variable()) or (not self._then.__class__ in native_numeric_types and self._then.is_potentially_variable()) or (not self._else.__class__ in native_numeric_types and self._else.is_potentially_variable())
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_13is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_13is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_13is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_13is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_12is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_12is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2419
+ *
+ * def is_potentially_variable(self):
+ * return (not self._if.__class__ in native_numeric_types and self._if.is_potentially_variable()) or (not self._then.__class__ in native_numeric_types and self._then.is_potentially_variable()) or (not self._else.__class__ in native_numeric_types and self._else.is_potentially_variable()) # <<<<<<<<<<<<<<
+ *
+ * def _compute_polynomial_degree(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_if); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (!__pyx_t_4) {
+ goto __pyx_L4_next_or;
+ } else {
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_if); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ if (!__pyx_t_4) {
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_L4_next_or:;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_then); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (!__pyx_t_4) {
+ goto __pyx_L6_next_or;
+ } else {
+ }
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_then); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ if (!__pyx_t_4) {
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_L6_next_or:;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_else); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_else); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2419, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_L3_bool_binop_done:;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2418
+ * return (self._then.__class__ in native_numeric_types or self._then.is_constant()) and (self._else.__class__ in native_numeric_types or self._else.is_constant())
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return (not self._if.__class__ in native_numeric_types and self._if.is_potentially_variable()) or (not self._then.__class__ in native_numeric_types and self._then.is_potentially_variable()) or (not self._else.__class__ in native_numeric_types and self._else.is_potentially_variable())
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.Expr_if.is_potentially_variable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2421
+ * return (not self._if.__class__ in native_numeric_types and self._if.is_potentially_variable()) or (not self._then.__class__ in native_numeric_types and self._then.is_potentially_variable()) or (not self._else.__class__ in native_numeric_types and self._else.is_potentially_variable())
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * _if, _then, _else = result
+ * if _if == 0:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_15_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_15_compute_polynomial_degree = {"_compute_polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_15_compute_polynomial_degree, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_15_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, 1); __PYX_ERR(0, 2421, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_compute_polynomial_degree") < 0)) __PYX_ERR(0, 2421, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2421, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.Expr_if._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_14_compute_polynomial_degree(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_14_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_v__if = NULL;
+ PyObject *__pyx_v__then = NULL;
+ PyObject *__pyx_v__else = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2422
+ *
+ * def _compute_polynomial_degree(self, result):
+ * _if, _then, _else = result # <<<<<<<<<<<<<<
+ * if _if == 0:
+ * try:
+ */
+ if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) {
+ PyObject* sequence = __pyx_v_result;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 3)) {
+ if (size > 3) __Pyx_RaiseTooManyValuesError(3);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 2422, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 2);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2422, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2422, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2422, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_4 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2422, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ index = 2; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 3) < 0) __PYX_ERR(0, 2422, __pyx_L1_error)
+ __pyx_t_5 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L4_unpacking_done;
+ __pyx_L3_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 2422, __pyx_L1_error)
+ __pyx_L4_unpacking_done:;
+ }
+ __pyx_v__if = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __pyx_v__then = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __pyx_v__else = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2423
+ * def _compute_polynomial_degree(self, result):
+ * _if, _then, _else = result
+ * if _if == 0: # <<<<<<<<<<<<<<
+ * try:
+ * return _then if self._if() else _else
+ */
+ __pyx_t_3 = __Pyx_PyInt_EqObjC(__pyx_v__if, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2423, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2423, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2424
+ * _if, _then, _else = result
+ * if _if == 0:
+ * try: # <<<<<<<<<<<<<<
+ * return _then if self._if() else _else
+ * except ValueError:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
+ __Pyx_XGOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_8);
+ __Pyx_XGOTREF(__pyx_t_9);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2425
+ * if _if == 0:
+ * try:
+ * return _then if self._if() else _else # <<<<<<<<<<<<<<
+ * except ValueError:
+ * pass
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_if); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2425, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2425, __pyx_L6_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2425, __pyx_L6_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2425, __pyx_L6_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_6) {
+ __Pyx_INCREF(__pyx_v__then);
+ __pyx_t_3 = __pyx_v__then;
+ } else {
+ __Pyx_INCREF(__pyx_v__else);
+ __pyx_t_3 = __pyx_v__else;
+ }
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L10_try_return;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2424
+ * _if, _then, _else = result
+ * if _if == 0:
+ * try: # <<<<<<<<<<<<<<
+ * return _then if self._if() else _else
+ * except ValueError:
+ */
+ }
+ __pyx_L6_error:;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2426
+ * try:
+ * return _then if self._if() else _else
+ * except ValueError: # <<<<<<<<<<<<<<
+ * pass
+ * return None
+ */
+ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
+ if (__pyx_t_10) {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L7_exception_handled;
+ }
+ goto __pyx_L8_except_error;
+ __pyx_L8_except_error:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2424
+ * _if, _then, _else = result
+ * if _if == 0:
+ * try: # <<<<<<<<<<<<<<
+ * return _then if self._if() else _else
+ * except ValueError:
+ */
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_XGIVEREF(__pyx_t_9);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
+ goto __pyx_L1_error;
+ __pyx_L10_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_XGIVEREF(__pyx_t_9);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
+ goto __pyx_L0;
+ __pyx_L7_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_XGIVEREF(__pyx_t_9);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2423
+ * def _compute_polynomial_degree(self, result):
+ * _if, _then, _else = result
+ * if _if == 0: # <<<<<<<<<<<<<<
+ * try:
+ * return _then if self._if() else _else
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2428
+ * except ValueError:
+ * pass
+ * return None # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2421
+ * return (not self._if.__class__ in native_numeric_types and self._if.is_potentially_variable()) or (not self._then.__class__ in native_numeric_types and self._then.is_potentially_variable()) or (not self._else.__class__ in native_numeric_types and self._else.is_potentially_variable())
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * _if, _then, _else = result
+ * if _if == 0:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.Expr_if._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v__if);
+ __Pyx_XDECREF(__pyx_v__then);
+ __Pyx_XDECREF(__pyx_v__else);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2430
+ * return None
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return '{0}( ( {1} ), then=( {2} ), else=( {3} ) )'.format(self.getname(), self._if, self._then, self._else)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_17_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_17_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_17_to_string, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_17_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_values = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_smap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 2430, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 2430, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 2430, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 2430, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 2430, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2430, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.Expr_if._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_16_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_16_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2431
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * return '{0}( ( {1} ), then=( {2} ), else=( {3} ) )'.format(self.getname(), self._if, self._then, self._else) # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_then_2_else_3, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2431, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2431, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2431, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2431, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_if); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2431, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_then); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2431, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_else); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2431, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2431, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[5] = {__pyx_t_7, __pyx_t_3, __pyx_t_4, __pyx_t_5, __pyx_t_6};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_8, 4+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2431, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(4+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 2431, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_8, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_8, __pyx_t_6);
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2431, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2430
+ * return None
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return '{0}( ( {1} ), then=( {2} ), else=( {3} ) )'.format(self.getname(), self._if, self._then, self._else)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.Expr_if._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2433
+ * return '{0}( ( {1} ), then=( {2} ), else=( {3} ) )'.format(self.getname(), self._if, self._then, self._else)
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _if, _then, _else = result
+ * return _then if _if else _else
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_19_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_19_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_19_apply_operation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_19_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 2433, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 2433, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2433, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.Expr_if._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_18_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_18_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_v__if = NULL;
+ PyObject *__pyx_v__then = NULL;
+ PyObject *__pyx_v__else = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ int __pyx_t_6;
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2434
+ *
+ * def _apply_operation(self, result):
+ * _if, _then, _else = result # <<<<<<<<<<<<<<
+ * return _then if _if else _else
+ *
+ */
+ if ((likely(PyTuple_CheckExact(__pyx_v_result))) || (PyList_CheckExact(__pyx_v_result))) {
+ PyObject* sequence = __pyx_v_result;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 3)) {
+ if (size > 3) __Pyx_RaiseTooManyValuesError(3);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 2434, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 2);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2434, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2434, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2434, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_4 = PyObject_GetIter(__pyx_v_result); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2434, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_2 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ index = 2; __pyx_t_3 = __pyx_t_5(__pyx_t_4); if (unlikely(!__pyx_t_3)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_5(__pyx_t_4), 3) < 0) __PYX_ERR(0, 2434, __pyx_L1_error)
+ __pyx_t_5 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L4_unpacking_done;
+ __pyx_L3_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 2434, __pyx_L1_error)
+ __pyx_L4_unpacking_done:;
+ }
+ __pyx_v__if = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __pyx_v__then = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __pyx_v__else = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2435
+ * def _apply_operation(self, result):
+ * _if, _then, _else = result
+ * return _then if _if else _else # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v__if); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 2435, __pyx_L1_error)
+ if (__pyx_t_6) {
+ __Pyx_INCREF(__pyx_v__then);
+ __pyx_t_3 = __pyx_v__then;
+ } else {
+ __Pyx_INCREF(__pyx_v__else);
+ __pyx_t_3 = __pyx_v__else;
+ }
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2433
+ * return '{0}( ( {1} ), then=( {2} ), else=( {3} ) )'.format(self.getname(), self._if, self._then, self._else)
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _if, _then, _else = result
+ * return _then if _if else _else
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.Expr_if._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v__if);
+ __Pyx_XDECREF(__pyx_v__then);
+ __Pyx_XDECREF(__pyx_v__else);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2449
+ * __slots__ = ('_fcn', '_name')
+ *
+ * def __init__(self, args, name=None, fcn=None): # <<<<<<<<<<<<<<
+ * if not type(args) is tuple:
+ * args = (args,)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_name = 0;
+ PyObject *__pyx_v_fcn = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_name,&__pyx_n_s_fcn,0};
+ PyObject* values[4] = {0,0,0,0};
+ values[2] = ((PyObject *)((PyObject *)Py_None));
+ values[3] = ((PyObject *)((PyObject *)Py_None));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); __PYX_ERR(0, 2449, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fcn);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2449, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_name = values[2];
+ __pyx_v_fcn = values[3];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2449, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.UnaryFunctionExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression___init__(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_name, __pyx_v_fcn);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_name, PyObject *__pyx_v_fcn) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+ __Pyx_INCREF(__pyx_v_args);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2450
+ *
+ * def __init__(self, args, name=None, fcn=None):
+ * if not type(args) is tuple: # <<<<<<<<<<<<<<
+ * args = (args,)
+ * self._args_ = args
+ */
+ __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_args)) != ((PyObject *)(&PyTuple_Type)));
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2451
+ * def __init__(self, args, name=None, fcn=None):
+ * if not type(args) is tuple:
+ * args = (args,) # <<<<<<<<<<<<<<
+ * self._args_ = args
+ * self._name = name
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2451, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_args);
+ __Pyx_GIVEREF(__pyx_v_args);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_args);
+ __Pyx_DECREF_SET(__pyx_v_args, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2450
+ *
+ * def __init__(self, args, name=None, fcn=None):
+ * if not type(args) is tuple: # <<<<<<<<<<<<<<
+ * args = (args,)
+ * self._args_ = args
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2452
+ * if not type(args) is tuple:
+ * args = (args,)
+ * self._args_ = args # <<<<<<<<<<<<<<
+ * self._name = name
+ * self._fcn = fcn
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_args_2, __pyx_v_args) < 0) __PYX_ERR(0, 2452, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2453
+ * args = (args,)
+ * self._args_ = args
+ * self._name = name # <<<<<<<<<<<<<<
+ * self._fcn = fcn
+ *
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_name_2, __pyx_v_name) < 0) __PYX_ERR(0, 2453, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2454
+ * self._args_ = args
+ * self._name = name
+ * self._fcn = fcn # <<<<<<<<<<<<<<
+ *
+ * def nargs(self):
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_fcn_2, __pyx_v_fcn) < 0) __PYX_ERR(0, 2454, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2449
+ * __slots__ = ('_fcn', '_name')
+ *
+ * def __init__(self, args, name=None, fcn=None): # <<<<<<<<<<<<<<
+ * if not type(args) is tuple:
+ * args = (args,)
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.UnaryFunctionExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2456
+ * self._fcn = fcn
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 1
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_3nargs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_3nargs = {"nargs", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_3nargs, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_3nargs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_2nargs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_2nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2457
+ *
+ * def nargs(self):
+ * return 1 # <<<<<<<<<<<<<<
+ *
+ * def construct_node(self, args, memo):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_1);
+ __pyx_r = __pyx_int_1;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2456
+ * self._fcn = fcn
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 1
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2459
+ * return 1
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._name, self._fcn)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_5construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_5construct_node = {"construct_node", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_5construct_node, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_5construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_memo = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("construct_node (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_memo,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 1); __PYX_ERR(0, 2459, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 2); __PYX_ERR(0, 2459, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "construct_node") < 0)) __PYX_ERR(0, 2459, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_memo = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2459, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.UnaryFunctionExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_4construct_node(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_memo);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_4construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("construct_node", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2460
+ *
+ * def construct_node(self, args, memo):
+ * return self.__class__(args, self._name, self._fcn) # <<<<<<<<<<<<<<
+ *
+ * def __getstate__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2460, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2460, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fcn_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2460, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_args, __pyx_t_3, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2460, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_args, __pyx_t_3, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 3+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2460, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(3+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2460, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_args);
+ __Pyx_GIVEREF(__pyx_v_args);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_args);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_t_4);
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2460, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2459
+ * return 1
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._name, self._fcn)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.UnaryFunctionExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2462
+ * return self.__class__(args, self._name, self._fcn)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(UnaryFunctionExpression, self).__getstate__()
+ * for i in UnaryFunctionExpression.__slots__:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_7__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_7__getstate__ = {"__getstate__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_7__getstate__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_7__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_6__getstate__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_6__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_state = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ __Pyx_RefNannySetupContext("__getstate__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2463
+ *
+ * def __getstate__(self):
+ * state = super(UnaryFunctionExpression, self).__getstate__() # <<<<<<<<<<<<<<
+ * for i in UnaryFunctionExpression.__slots__:
+ * state[i] = getattr(self, i)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_UnaryFunctionExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2463, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2463, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2463, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2463, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2463, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2463, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_state = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2464
+ * def __getstate__(self):
+ * state = super(UnaryFunctionExpression, self).__getstate__()
+ * for i in UnaryFunctionExpression.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self, i)
+ * return state
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_UnaryFunctionExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2464, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_slots); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2464, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2464, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2464, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2464, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2464, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2464, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2464, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_5(__pyx_t_1);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2464, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2465
+ * state = super(UnaryFunctionExpression, self).__getstate__()
+ * for i in UnaryFunctionExpression.__slots__:
+ * state[i] = getattr(self, i) # <<<<<<<<<<<<<<
+ * return state
+ *
+ */
+ __pyx_t_3 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2465, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (unlikely(PyObject_SetItem(__pyx_v_state, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(0, 2465, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2464
+ * def __getstate__(self):
+ * state = super(UnaryFunctionExpression, self).__getstate__()
+ * for i in UnaryFunctionExpression.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self, i)
+ * return state
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2466
+ * for i in UnaryFunctionExpression.__slots__:
+ * state[i] = getattr(self, i)
+ * return state # <<<<<<<<<<<<<<
+ *
+ * def getname(self, *args, **kwds):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_state);
+ __pyx_r = __pyx_v_state;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2462
+ * return self.__class__(args, self._name, self._fcn)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(UnaryFunctionExpression, self).__getstate__()
+ * for i in UnaryFunctionExpression.__slots__:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.UnaryFunctionExpression.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_state);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2468
+ * return state
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return self._name
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_9getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_9getname = {"getname", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_9getname, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_9getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_kwds = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname (wrapper)", 0);
+ __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
+ __Pyx_GOTREF(__pyx_v_kwds);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, used_pos_args, "getname") < 0)) __PYX_ERR(0, 2468, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("getname", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2468, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.UnaryFunctionExpression.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_8getname(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwds);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwds);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_8getname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("getname", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2469
+ *
+ * def getname(self, *args, **kwds):
+ * return self._name # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2469, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2468
+ * return state
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return self._name
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.UnaryFunctionExpression.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2471
+ * return self._name
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_11_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_11_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_11_to_string, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_11_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_smap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 2471, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 2471, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 2471, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 2471, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 2471, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2471, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.UnaryFunctionExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_10_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_10_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_smap, CYTHON_UNUSED PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2472
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * return "{0}({1})".format(self.getname(), values[0])
+ * if values[0][0] == '(':
+ */
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2472, __pyx_L1_error)
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2473
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0]) # <<<<<<<<<<<<<<
+ * if values[0][0] == '(':
+ * return '{0}{1}'.format(self._name, values[0])
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2473, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2473, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2473, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2473, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2473, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2473, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2473, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2473, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_5);
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2473, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2472
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * if verbose: # <<<<<<<<<<<<<<
+ * return "{0}({1})".format(self.getname(), values[0])
+ * if values[0][0] == '(':
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2474
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ * if values[0][0] == '(': # <<<<<<<<<<<<<<
+ * return '{0}{1}'.format(self._name, values[0])
+ * else:
+ */
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2474, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2474, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = (__Pyx_PyString_Equals(__pyx_t_3, __pyx_kp_s__29, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2474, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2475
+ * return "{0}({1})".format(self.getname(), values[0])
+ * if values[0][0] == '(':
+ * return '{0}{1}'.format(self._name, values[0]) # <<<<<<<<<<<<<<
+ * else:
+ * return '{0}({1})'.format(self._name, values[0])
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1_8, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2475, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2475, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2475, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_8, __pyx_t_5};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2475, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_8, __pyx_t_5};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2475, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2475, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_5);
+ __pyx_t_8 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2475, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2474
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ * if values[0][0] == '(': # <<<<<<<<<<<<<<
+ * return '{0}{1}'.format(self._name, values[0])
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2477
+ * return '{0}{1}'.format(self._name, values[0])
+ * else:
+ * return '{0}({1})'.format(self._name, values[0]) # <<<<<<<<<<<<<<
+ *
+ * def _compute_polynomial_degree(self, result):
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_values, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_8 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_5};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2477, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_5};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2477, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_t_5);
+ __pyx_t_6 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2471
+ * return self._name
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.UnaryFunctionExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2479
+ * return '{0}({1})'.format(self._name, values[0])
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * if result[0] is 0:
+ * return 0
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_13_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_13_compute_polynomial_degree = {"_compute_polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_13_compute_polynomial_degree, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_13_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, 1); __PYX_ERR(0, 2479, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_compute_polynomial_degree") < 0)) __PYX_ERR(0, 2479, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2479, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.UnaryFunctionExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_12_compute_polynomial_degree(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_12_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2480
+ *
+ * def _compute_polynomial_degree(self, result):
+ * if result[0] is 0: # <<<<<<<<<<<<<<
+ * return 0
+ * else:
+ */
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2480, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = (__pyx_t_1 == __pyx_int_0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2481
+ * def _compute_polynomial_degree(self, result):
+ * if result[0] is 0:
+ * return 0 # <<<<<<<<<<<<<<
+ * else:
+ * return None
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2480
+ *
+ * def _compute_polynomial_degree(self, result):
+ * if result[0] is 0: # <<<<<<<<<<<<<<
+ * return 0
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2483
+ * return 0
+ * else:
+ * return None # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result):
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2479
+ * return '{0}({1})'.format(self._name, values[0])
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * if result[0] is 0:
+ * return 0
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.UnaryFunctionExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2485
+ * return None
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return self._fcn(result[0])
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_15_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_15_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_15_apply_operation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_15_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 2485, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 2485, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2485, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.UnaryFunctionExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_14_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_14_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_result) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2486
+ *
+ * def _apply_operation(self, result):
+ * return self._fcn(result[0]) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_fcn_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_result, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2486, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2486, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2486, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2485
+ * return None
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return self._fcn(result[0])
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.UnaryFunctionExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2492
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_27NPV_UnaryFunctionExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_27NPV_UnaryFunctionExpression_1is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_27NPV_UnaryFunctionExpression_1is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_27NPV_UnaryFunctionExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_27NPV_UnaryFunctionExpression_is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_27NPV_UnaryFunctionExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2493
+ *
+ * def is_potentially_variable(self):
+ * return False # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2492
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2507
+ * __slots__ = ()
+ *
+ * def __init__(self, arg): # <<<<<<<<<<<<<<
+ * super(AbsExpression, self).__init__(arg, 'abs', abs)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_arg = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_arg,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2507, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2507, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_arg = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2507, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.AbsExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression___init__(__pyx_self, __pyx_v_self, __pyx_v_arg);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_arg) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2508
+ *
+ * def __init__(self, arg):
+ * super(AbsExpression, self).__init__(arg, 'abs', abs) # <<<<<<<<<<<<<<
+ *
+ * def construct_node(self, args, memo):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_AbsExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetBuiltinName(__pyx_n_s_abs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_arg, __pyx_n_s_abs, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2508, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_v_arg, __pyx_n_s_abs, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2508, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_arg);
+ __Pyx_GIVEREF(__pyx_v_arg);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_v_arg);
+ __Pyx_INCREF(__pyx_n_s_abs);
+ __Pyx_GIVEREF(__pyx_n_s_abs);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_n_s_abs);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2507
+ * __slots__ = ()
+ *
+ * def __init__(self, arg): # <<<<<<<<<<<<<<
+ * super(AbsExpression, self).__init__(arg, 'abs', abs)
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.AbsExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2510
+ * super(AbsExpression, self).__init__(arg, 'abs', abs)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression_3construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression_3construct_node = {"construct_node", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression_3construct_node, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression_3construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_memo = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("construct_node (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_memo,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 1); __PYX_ERR(0, 2510, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 2); __PYX_ERR(0, 2510, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "construct_node") < 0)) __PYX_ERR(0, 2510, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_memo = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2510, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.AbsExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression_2construct_node(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_memo);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression_2construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_memo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("construct_node", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2511
+ *
+ * def construct_node(self, args, memo):
+ * return self.__class__(args) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2511, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2511, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_args};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2511, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_args};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2511, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2511, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_args);
+ __Pyx_GIVEREF(__pyx_v_args);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_args);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2511, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2510
+ * super(AbsExpression, self).__init__(arg, 'abs', abs)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.AbsExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2517
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17NPV_AbsExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17NPV_AbsExpression_1is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17NPV_AbsExpression_1is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_17NPV_AbsExpression_1is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17NPV_AbsExpression_is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_17NPV_AbsExpression_is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2518
+ *
+ * def is_potentially_variable(self):
+ * return False # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2517
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2534
+ * PRECEDENCE = 6
+ *
+ * def __init__(self, args=None): # <<<<<<<<<<<<<<
+ * self.constant = 0
+ * self.linear_coefs = []
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)((PyObject *)Py_None));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2534, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2534, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression___init__(__pyx_self, __pyx_v_self, __pyx_v_args);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2535
+ *
+ * def __init__(self, args=None):
+ * self.constant = 0 # <<<<<<<<<<<<<<
+ * self.linear_coefs = []
+ * self.linear_vars = []
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constant, __pyx_int_0) < 0) __PYX_ERR(0, 2535, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2536
+ * def __init__(self, args=None):
+ * self.constant = 0
+ * self.linear_coefs = [] # <<<<<<<<<<<<<<
+ * self.linear_vars = []
+ * self._args_ = tuple()
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2536, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs, __pyx_t_1) < 0) __PYX_ERR(0, 2536, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2537
+ * self.constant = 0
+ * self.linear_coefs = []
+ * self.linear_vars = [] # <<<<<<<<<<<<<<
+ * self._args_ = tuple()
+ *
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2537, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars, __pyx_t_1) < 0) __PYX_ERR(0, 2537, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2538
+ * self.linear_coefs = []
+ * self.linear_vars = []
+ * self._args_ = tuple() # <<<<<<<<<<<<<<
+ *
+ * def nargs(self):
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2538, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_args_2, __pyx_t_1) < 0) __PYX_ERR(0, 2538, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2534
+ * PRECEDENCE = 6
+ *
+ * def __init__(self, args=None): # <<<<<<<<<<<<<<
+ * self.constant = 0
+ * self.linear_coefs = []
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2540
+ * self._args_ = tuple()
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 0
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_3nargs(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_3nargs = {"nargs", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_3nargs, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_3nargs(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_2nargs(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_2nargs(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("nargs", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2541
+ *
+ * def nargs(self):
+ * return 0 # <<<<<<<<<<<<<<
+ *
+ * def _precedence(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2540
+ * self._args_ = tuple()
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 0
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2543
+ * return 0
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return LinearExpression.PRECEDENCE
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_5_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_5_precedence = {"_precedence", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_5_precedence, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_5_precedence(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_precedence (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_4_precedence(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_4_precedence(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("_precedence", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2544
+ *
+ * def _precedence(self):
+ * return LinearExpression.PRECEDENCE # <<<<<<<<<<<<<<
+ *
+ * def __getstate__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_PRECEDENCE); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2543
+ * return 0
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return LinearExpression.PRECEDENCE
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression._precedence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2546
+ * return LinearExpression.PRECEDENCE
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(LinearExpression, self).__getstate__()
+ * for i in LinearExpression.__slots__:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_7__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_7__getstate__ = {"__getstate__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_7__getstate__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_7__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_6__getstate__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_6__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_state = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ __Pyx_RefNannySetupContext("__getstate__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2547
+ *
+ * def __getstate__(self):
+ * state = super(LinearExpression, self).__getstate__() # <<<<<<<<<<<<<<
+ * for i in LinearExpression.__slots__:
+ * state[i] = getattr(self,i)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2547, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2547, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_state = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2548
+ * def __getstate__(self):
+ * state = super(LinearExpression, self).__getstate__()
+ * for i in LinearExpression.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self,i)
+ * return state
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_slots); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2548, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2548, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2548, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_5(__pyx_t_1);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2548, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2549
+ * state = super(LinearExpression, self).__getstate__()
+ * for i in LinearExpression.__slots__:
+ * state[i] = getattr(self,i) # <<<<<<<<<<<<<<
+ * return state
+ *
+ */
+ __pyx_t_3 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2549, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (unlikely(PyObject_SetItem(__pyx_v_state, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(0, 2549, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2548
+ * def __getstate__(self):
+ * state = super(LinearExpression, self).__getstate__()
+ * for i in LinearExpression.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self,i)
+ * return state
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2550
+ * for i in LinearExpression.__slots__:
+ * state[i] = getattr(self,i)
+ * return state # <<<<<<<<<<<<<<
+ *
+ * def __deepcopy__(self, memo):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_state);
+ __pyx_r = __pyx_v_state;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2546
+ * return LinearExpression.PRECEDENCE
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(LinearExpression, self).__getstate__()
+ * for i in LinearExpression.__slots__:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_state);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2552
+ * return state
+ *
+ * def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
+ * return self.construct_node(None, memo)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_9__deepcopy__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_9__deepcopy__ = {"__deepcopy__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_9__deepcopy__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_9__deepcopy__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_memo = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_memo,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__deepcopy__", 1, 2, 2, 1); __PYX_ERR(0, 2552, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__deepcopy__") < 0)) __PYX_ERR(0, 2552, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_memo = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__deepcopy__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2552, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_8__deepcopy__(__pyx_self, __pyx_v_self, __pyx_v_memo);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_8__deepcopy__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_memo) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("__deepcopy__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2553
+ *
+ * def __deepcopy__(self, memo):
+ * return self.construct_node(None, memo) # <<<<<<<<<<<<<<
+ *
+ * def construct_node(self, args, memo):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_construct_node); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2553, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ __pyx_t_4 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_4 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, Py_None, __pyx_v_memo};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2553, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, Py_None, __pyx_v_memo};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2553, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2553, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_3) {
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ }
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, Py_None);
+ __Pyx_INCREF(__pyx_v_memo);
+ __Pyx_GIVEREF(__pyx_v_memo);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_v_memo);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2553, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2552
+ * return state
+ *
+ * def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
+ * return self.construct_node(None, memo)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2555
+ * return self.construct_node(None, memo)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * repn = self.__class__()
+ * repn.constant = deepcopy(self.constant, memo=memo)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_11construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_11construct_node = {"construct_node", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_11construct_node, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_11construct_node(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_memo = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("construct_node (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_args,&__pyx_n_s_memo,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 1); __PYX_ERR(0, 2555, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_memo)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, 2); __PYX_ERR(0, 2555, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "construct_node") < 0)) __PYX_ERR(0, 2555, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_args = values[1];
+ __pyx_v_memo = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("construct_node", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2555, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_10construct_node(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_memo);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_10construct_node(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, PyObject *__pyx_v_memo) {
+ PyObject *__pyx_v_repn = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("construct_node", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2556
+ *
+ * def construct_node(self, args, memo):
+ * repn = self.__class__() # <<<<<<<<<<<<<<
+ * repn.constant = deepcopy(self.constant, memo=memo)
+ * repn.linear_coefs = deepcopy(self.linear_coefs, memo=memo)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2556, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2556, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2556, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_repn = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2557
+ * def construct_node(self, args, memo):
+ * repn = self.__class__()
+ * repn.constant = deepcopy(self.constant, memo=memo) # <<<<<<<<<<<<<<
+ * repn.linear_coefs = deepcopy(self.linear_coefs, memo=memo)
+ * repn.linear_vars = deepcopy(self.linear_vars, memo=memo)
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_deepcopy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2557, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2557, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2557, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2557, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_memo, __pyx_v_memo) < 0) __PYX_ERR(0, 2557, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2557, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_constant, __pyx_t_4) < 0) __PYX_ERR(0, 2557, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2558
+ * repn = self.__class__()
+ * repn.constant = deepcopy(self.constant, memo=memo)
+ * repn.linear_coefs = deepcopy(self.linear_coefs, memo=memo) # <<<<<<<<<<<<<<
+ * repn.linear_vars = deepcopy(self.linear_vars, memo=memo)
+ * return repn
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_deepcopy); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2558, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2558, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2558, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2558, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_memo, __pyx_v_memo) < 0) __PYX_ERR(0, 2558, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2558, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_linear_coefs, __pyx_t_1) < 0) __PYX_ERR(0, 2558, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2559
+ * repn.constant = deepcopy(self.constant, memo=memo)
+ * repn.linear_coefs = deepcopy(self.linear_coefs, memo=memo)
+ * repn.linear_vars = deepcopy(self.linear_vars, memo=memo) # <<<<<<<<<<<<<<
+ * return repn
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_deepcopy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2559, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2559, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2559, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2559, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_memo, __pyx_v_memo) < 0) __PYX_ERR(0, 2559, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2559, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_linear_vars, __pyx_t_4) < 0) __PYX_ERR(0, 2559, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2560
+ * repn.linear_coefs = deepcopy(self.linear_coefs, memo=memo)
+ * repn.linear_vars = deepcopy(self.linear_vars, memo=memo)
+ * return repn # <<<<<<<<<<<<<<
+ *
+ * def getname(self, *args, **kwds):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_repn);
+ __pyx_r = __pyx_v_repn;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2555
+ * return self.construct_node(None, memo)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * repn = self.__class__()
+ * repn.constant = deepcopy(self.constant, memo=memo)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression.construct_node", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_repn);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2562
+ * return repn
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'sum'
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_13getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_13getname = {"getname", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_13getname, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_13getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_kwds = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname (wrapper)", 0);
+ __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
+ __Pyx_GOTREF(__pyx_v_kwds);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, used_pos_args, "getname") < 0)) __PYX_ERR(0, 2562, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("getname", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2562, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_12getname(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwds);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwds);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_12getname(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args, CYTHON_UNUSED PyObject *__pyx_v_kwds) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2563
+ *
+ * def getname(self, *args, **kwds):
+ * return 'sum' # <<<<<<<<<<<<<<
+ *
+ * def _compute_polynomial_degree(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_n_s_sum);
+ __pyx_r = __pyx_n_s_sum;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2562
+ * return repn
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'sum'
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2565
+ * return 'sum'
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * return 1 if len(self.linear_vars) > 0 else 0
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_15_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_15_compute_polynomial_degree = {"_compute_polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_15_compute_polynomial_degree, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_15_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, 1); __PYX_ERR(0, 2565, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_compute_polynomial_degree") < 0)) __PYX_ERR(0, 2565, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2565, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_14_compute_polynomial_degree(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_14_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_result) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2566
+ *
+ * def _compute_polynomial_degree(self, result):
+ * return 1 if len(self.linear_vars) > 0 else 0 # <<<<<<<<<<<<<<
+ *
+ * def is_constant(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2566, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2566, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (((__pyx_t_3 > 0) != 0)) {
+ __Pyx_INCREF(__pyx_int_1);
+ __pyx_t_1 = __pyx_int_1;
+ } else {
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_1 = __pyx_int_0;
+ }
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2565
+ * return 'sum'
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * return 1 if len(self.linear_vars) > 0 else 0
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2568
+ * return 1 if len(self.linear_vars) > 0 else 0
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return len(self.linear_vars) == 0
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_17is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_17is_constant = {"is_constant", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_17is_constant, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_17is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_16is_constant(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_16is_constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ __Pyx_RefNannySetupContext("is_constant", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2569
+ *
+ * def is_constant(self):
+ * return len(self.linear_vars) == 0 # <<<<<<<<<<<<<<
+ *
+ * def is_fixed(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2569, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2569, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_t_2 == 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2569, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2568
+ * return 1 if len(self.linear_vars) > 0 else 0
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return len(self.linear_vars) == 0
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression.is_constant", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2571
+ * return len(self.linear_vars) == 0
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * if len(self.linear_vars) == 0:
+ * return True
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_19is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_19is_fixed = {"is_fixed", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_19is_fixed, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_19is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_fixed (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_18is_fixed(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_18is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ int __pyx_t_6;
+ __Pyx_RefNannySetupContext("is_fixed", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2572
+ *
+ * def is_fixed(self):
+ * if len(self.linear_vars) == 0: # <<<<<<<<<<<<<<
+ * return True
+ * for v in self.linear_vars:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2572, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2572, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((__pyx_t_2 == 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2573
+ * def is_fixed(self):
+ * if len(self.linear_vars) == 0:
+ * return True # <<<<<<<<<<<<<<
+ * for v in self.linear_vars:
+ * if not v.fixed:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2572
+ *
+ * def is_fixed(self):
+ * if len(self.linear_vars) == 0: # <<<<<<<<<<<<<<
+ * return True
+ * for v in self.linear_vars:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2574
+ * if len(self.linear_vars) == 0:
+ * return True
+ * for v in self.linear_vars: # <<<<<<<<<<<<<<
+ * if not v.fixed:
+ * return False
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2574, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_4 = __pyx_t_1; __Pyx_INCREF(__pyx_t_4); __pyx_t_2 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2574, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2574, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_4))) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 2574, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2574, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_1); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 2574, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_4, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2574, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_5(__pyx_t_4);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2574, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2575
+ * return True
+ * for v in self.linear_vars:
+ * if not v.fixed: # <<<<<<<<<<<<<<
+ * return False
+ * return True
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_fixed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2575, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2575, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_6 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2576
+ * for v in self.linear_vars:
+ * if not v.fixed:
+ * return False # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2575
+ * return True
+ * for v in self.linear_vars:
+ * if not v.fixed: # <<<<<<<<<<<<<<
+ * return False
+ * return True
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2574
+ * if len(self.linear_vars) == 0:
+ * return True
+ * for v in self.linear_vars: # <<<<<<<<<<<<<<
+ * if not v.fixed:
+ * return False
+ */
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2577
+ * if not v.fixed:
+ * return False
+ * return True # <<<<<<<<<<<<<<
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2571
+ * return len(self.linear_vars) == 0
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * if len(self.linear_vars) == 0:
+ * return True
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression.is_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2579
+ * return True
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * tmp = []
+ * if compute_values:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_21_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_21_to_string = {"_to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_21_to_string, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_21_to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_smap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_values,&__pyx_n_s_verbose,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 1); __PYX_ERR(0, 2579, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 2); __PYX_ERR(0, 2579, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 3); __PYX_ERR(0, 2579, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, 4); __PYX_ERR(0, 2579, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_to_string") < 0)) __PYX_ERR(0, 2579, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 5) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ __pyx_v_verbose = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_to_string", 1, 5, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2579, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_20_to_string(__pyx_self, __pyx_v_self, __pyx_v_values, __pyx_v_verbose, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_20_to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_smap, PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_v_tmp = NULL;
+ PyObject *__pyx_v_const_ = NULL;
+ PyObject *__pyx_v_c = NULL;
+ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_v_v_ = NULL;
+ PyObject *__pyx_v_c_ = NULL;
+ PyObject *__pyx_v_s = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ int __pyx_t_8;
+ Py_ssize_t __pyx_t_9;
+ PyObject *(*__pyx_t_10)(PyObject *);
+ PyObject *(*__pyx_t_11)(PyObject *);
+ int __pyx_t_12;
+ int __pyx_t_13;
+ PyObject *__pyx_t_14 = NULL;
+ __Pyx_RefNannySetupContext("_to_string", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2580
+ *
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * tmp = [] # <<<<<<<<<<<<<<
+ * if compute_values:
+ * const_ = value(self.constant)
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2580, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_tmp = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2581
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * tmp = []
+ * if compute_values: # <<<<<<<<<<<<<<
+ * const_ = value(self.constant)
+ * if not isclose(const_,0):
+ */
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2581, __pyx_L1_error)
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2582
+ * tmp = []
+ * if compute_values:
+ * const_ = value(self.constant) # <<<<<<<<<<<<<<
+ * if not isclose(const_,0):
+ * tmp = [str(const_)]
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2582, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2582, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2582, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2582, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2582, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2582, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2582, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_const_ = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2583
+ * if compute_values:
+ * const_ = value(self.constant)
+ * if not isclose(const_,0): # <<<<<<<<<<<<<<
+ * tmp = [str(const_)]
+ * elif self.constant.__class__ in native_numeric_types:
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2583, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_const_, __pyx_int_0};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2583, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_const_, __pyx_int_0};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2583, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2583, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_const_);
+ __Pyx_GIVEREF(__pyx_v_const_);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_7, __pyx_v_const_);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2583, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2583, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = ((!__pyx_t_2) != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2584
+ * const_ = value(self.constant)
+ * if not isclose(const_,0):
+ * tmp = [str(const_)] # <<<<<<<<<<<<<<
+ * elif self.constant.__class__ in native_numeric_types:
+ * if not isclose(self.constant, 0):
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2584, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_const_);
+ __Pyx_GIVEREF(__pyx_v_const_);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_const_);
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2584, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2584, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_tmp, ((PyObject*)__pyx_t_1));
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2583
+ * if compute_values:
+ * const_ = value(self.constant)
+ * if not isclose(const_,0): # <<<<<<<<<<<<<<
+ * tmp = [str(const_)]
+ * elif self.constant.__class__ in native_numeric_types:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2581
+ * def _to_string(self, values, verbose, smap, compute_values):
+ * tmp = []
+ * if compute_values: # <<<<<<<<<<<<<<
+ * const_ = value(self.constant)
+ * if not isclose(const_,0):
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2585
+ * if not isclose(const_,0):
+ * tmp = [str(const_)]
+ * elif self.constant.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if not isclose(self.constant, 0):
+ * tmp = [str(self.constant)]
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2585, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2585, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2585, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2585, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_2 = (__pyx_t_8 != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2586
+ * tmp = [str(const_)]
+ * elif self.constant.__class__ in native_numeric_types:
+ * if not isclose(self.constant, 0): # <<<<<<<<<<<<<<
+ * tmp = [str(self.constant)]
+ * else:
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_int_0};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2586, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_int_0};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2586, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_t_4);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2586, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = ((!__pyx_t_2) != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2587
+ * elif self.constant.__class__ in native_numeric_types:
+ * if not isclose(self.constant, 0):
+ * tmp = [str(self.constant)] # <<<<<<<<<<<<<<
+ * else:
+ * tmp = [self.constant.to_string(compute_values=False)]
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2587, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2587, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2587, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2587, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_tmp, ((PyObject*)__pyx_t_3));
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2586
+ * tmp = [str(const_)]
+ * elif self.constant.__class__ in native_numeric_types:
+ * if not isclose(self.constant, 0): # <<<<<<<<<<<<<<
+ * tmp = [str(self.constant)]
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2585
+ * if not isclose(const_,0):
+ * tmp = [str(const_)]
+ * elif self.constant.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if not isclose(self.constant, 0):
+ * tmp = [str(self.constant)]
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2589
+ * tmp = [str(self.constant)]
+ * else:
+ * tmp = [self.constant.to_string(compute_values=False)] # <<<<<<<<<<<<<<
+ * if verbose:
+ * for c,v in zip(self.linear_coefs, self.linear_vars):
+ */
+ /*else*/ {
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2589, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2589, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2589, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_compute_values, Py_False) < 0) __PYX_ERR(0, 2589, __pyx_L1_error)
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2589, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyList_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2589, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyList_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __Pyx_DECREF_SET(__pyx_v_tmp, ((PyObject*)__pyx_t_3));
+ __pyx_t_3 = 0;
+ }
+ __pyx_L3:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2590
+ * else:
+ * tmp = [self.constant.to_string(compute_values=False)]
+ * if verbose: # <<<<<<<<<<<<<<
+ * for c,v in zip(self.linear_coefs, self.linear_vars):
+ * if smap: # TODO: coverage
+ */
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_verbose); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2590, __pyx_L1_error)
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2591
+ * tmp = [self.constant.to_string(compute_values=False)]
+ * if verbose:
+ * for c,v in zip(self.linear_coefs, self.linear_vars): # <<<<<<<<<<<<<<
+ * if smap: # TODO: coverage
+ * v_ = smap.getSymbol(v)
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
+ __pyx_t_3 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
+ __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
+ __pyx_t_10 = NULL;
+ } else {
+ __pyx_t_9 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2591, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_10)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 2591, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ } else {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_5); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 2591, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ }
+ } else {
+ __pyx_t_5 = __pyx_t_10(__pyx_t_1);
+ if (unlikely(!__pyx_t_5)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2591, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
+ PyObject* sequence = __pyx_t_5;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 2591, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ #else
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext;
+ index = 0; __pyx_t_3 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L9_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ index = 1; __pyx_t_4 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_4)) goto __pyx_L9_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 2591, __pyx_L1_error)
+ __pyx_t_11 = NULL;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L10_unpacking_done;
+ __pyx_L9_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_11 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 2591, __pyx_L1_error)
+ __pyx_L10_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2592
+ * if verbose:
+ * for c,v in zip(self.linear_coefs, self.linear_vars):
+ * if smap: # TODO: coverage # <<<<<<<<<<<<<<
+ * v_ = smap.getSymbol(v)
+ * else:
+ */
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_smap); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2592, __pyx_L1_error)
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2593
+ * for c,v in zip(self.linear_coefs, self.linear_vars):
+ * if smap: # TODO: coverage
+ * v_ = smap.getSymbol(v) # <<<<<<<<<<<<<<
+ * else:
+ * v_ = str(v)
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_smap, __pyx_n_s_getSymbol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2593, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_v); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2593, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_v};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2593, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_v};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2593, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2593, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_v);
+ __Pyx_GIVEREF(__pyx_v_v);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_v);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2593, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v_, __pyx_t_5);
+ __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2592
+ * if verbose:
+ * for c,v in zip(self.linear_coefs, self.linear_vars):
+ * if smap: # TODO: coverage # <<<<<<<<<<<<<<
+ * v_ = smap.getSymbol(v)
+ * else:
+ */
+ goto __pyx_L11;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2595
+ * v_ = smap.getSymbol(v)
+ * else:
+ * v_ = str(v) # <<<<<<<<<<<<<<
+ * if c.__class__ in native_numeric_types or compute_values:
+ * c_ = value(c)
+ */
+ /*else*/ {
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2595, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_v);
+ __Pyx_GIVEREF(__pyx_v_v);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_v);
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2595, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v_, __pyx_t_4);
+ __pyx_t_4 = 0;
+ }
+ __pyx_L11:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2596
+ * else:
+ * v_ = str(v)
+ * if c.__class__ in native_numeric_types or compute_values: # <<<<<<<<<<<<<<
+ * c_ = value(c)
+ * if isclose(c_,1):
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2596, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2596, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2596, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_12 = (__pyx_t_2 != 0);
+ if (!__pyx_t_12) {
+ } else {
+ __pyx_t_8 = __pyx_t_12;
+ goto __pyx_L13_bool_binop_done;
+ }
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2596, __pyx_L1_error)
+ __pyx_t_8 = __pyx_t_12;
+ __pyx_L13_bool_binop_done:;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2597
+ * v_ = str(v)
+ * if c.__class__ in native_numeric_types or compute_values:
+ * c_ = value(c) # <<<<<<<<<<<<<<
+ * if isclose(c_,1):
+ * tmp.append(str(v_))
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2597, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_c); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2597, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_c};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2597, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_c};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2597, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2597, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_c);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_3, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2597, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_c_, __pyx_t_5);
+ __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2598
+ * if c.__class__ in native_numeric_types or compute_values:
+ * c_ = value(c)
+ * if isclose(c_,1): # <<<<<<<<<<<<<<
+ * tmp.append(str(v_))
+ * elif isclose(c_,0):
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2598, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_c_, __pyx_int_1};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2598, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_c_, __pyx_int_1};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2598, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2598, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_3) {
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_c_);
+ __Pyx_GIVEREF(__pyx_v_c_);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_v_c_);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_int_1);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2598, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2598, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2599
+ * c_ = value(c)
+ * if isclose(c_,1):
+ * tmp.append(str(v_)) # <<<<<<<<<<<<<<
+ * elif isclose(c_,0):
+ * continue
+ */
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2599, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_v_);
+ __Pyx_GIVEREF(__pyx_v_v_);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_v_);
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2599, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_4); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 2599, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2598
+ * if c.__class__ in native_numeric_types or compute_values:
+ * c_ = value(c)
+ * if isclose(c_,1): # <<<<<<<<<<<<<<
+ * tmp.append(str(v_))
+ * elif isclose(c_,0):
+ */
+ goto __pyx_L15;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2600
+ * if isclose(c_,1):
+ * tmp.append(str(v_))
+ * elif isclose(c_,0): # <<<<<<<<<<<<<<
+ * continue
+ * else:
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2600, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_c_, __pyx_int_0};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2600, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_c_, __pyx_int_0};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2600, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2600, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_c_);
+ __Pyx_GIVEREF(__pyx_v_c_);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_v_c_);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2600, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2600, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2601
+ * tmp.append(str(v_))
+ * elif isclose(c_,0):
+ * continue # <<<<<<<<<<<<<<
+ * else:
+ * tmp.append("prod(%s, %s)" % (str(c_),str(v_)))
+ */
+ goto __pyx_L7_continue;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2600
+ * if isclose(c_,1):
+ * tmp.append(str(v_))
+ * elif isclose(c_,0): # <<<<<<<<<<<<<<
+ * continue
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2603
+ * continue
+ * else:
+ * tmp.append("prod(%s, %s)" % (str(c_),str(v_))) # <<<<<<<<<<<<<<
+ * else:
+ * tmp.append("prod(%s, %s)" % (str(c), v_))
+ */
+ /*else*/ {
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2603, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_c_);
+ __Pyx_GIVEREF(__pyx_v_c_);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_c_);
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2603, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2603, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_v_);
+ __Pyx_GIVEREF(__pyx_v_v_);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_v_);
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2603, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2603, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
+ __pyx_t_5 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_prod_s_s, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2603, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_3); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 2603, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __pyx_L15:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2596
+ * else:
+ * v_ = str(v)
+ * if c.__class__ in native_numeric_types or compute_values: # <<<<<<<<<<<<<<
+ * c_ = value(c)
+ * if isclose(c_,1):
+ */
+ goto __pyx_L12;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2605
+ * tmp.append("prod(%s, %s)" % (str(c_),str(v_)))
+ * else:
+ * tmp.append("prod(%s, %s)" % (str(c), v_)) # <<<<<<<<<<<<<<
+ * return "{0}({1})".format(self.getname(), ', '.join(tmp))
+ * for c,v in zip(self.linear_coefs, self.linear_vars):
+ */
+ /*else*/ {
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2605, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_c);
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2605, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2605, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+ __Pyx_INCREF(__pyx_v_v_);
+ __Pyx_GIVEREF(__pyx_v_v_);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_v_);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_prod_s_s, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2605, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_4); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 2605, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __pyx_L12:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2591
+ * tmp = [self.constant.to_string(compute_values=False)]
+ * if verbose:
+ * for c,v in zip(self.linear_coefs, self.linear_vars): # <<<<<<<<<<<<<<
+ * if smap: # TODO: coverage
+ * v_ = smap.getSymbol(v)
+ */
+ __pyx_L7_continue:;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2606
+ * else:
+ * tmp.append("prod(%s, %s)" % (str(c), v_))
+ * return "{0}({1})".format(self.getname(), ', '.join(tmp)) # <<<<<<<<<<<<<<
+ * for c,v in zip(self.linear_coefs, self.linear_vars):
+ * if smap:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_kp_s_0_1, __pyx_n_s_format); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2606, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2606, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2606, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2606, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__19, __pyx_v_tmp); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2606, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_5};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2606, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_3, __pyx_t_5};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2606, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2606, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_7, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_7, __pyx_t_5);
+ __pyx_t_3 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2606, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2590
+ * else:
+ * tmp = [self.constant.to_string(compute_values=False)]
+ * if verbose: # <<<<<<<<<<<<<<
+ * for c,v in zip(self.linear_coefs, self.linear_vars):
+ * if smap: # TODO: coverage
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2607
+ * tmp.append("prod(%s, %s)" % (str(c), v_))
+ * return "{0}({1})".format(self.getname(), ', '.join(tmp))
+ * for c,v in zip(self.linear_coefs, self.linear_vars): # <<<<<<<<<<<<<<
+ * if smap:
+ * v_ = smap.getSymbol(v)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_4);
+ __pyx_t_1 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_14, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
+ __pyx_t_14 = __pyx_t_4; __Pyx_INCREF(__pyx_t_14); __pyx_t_9 = 0;
+ __pyx_t_10 = NULL;
+ } else {
+ __pyx_t_9 = -1; __pyx_t_14 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_10 = Py_TYPE(__pyx_t_14)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2607, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_10)) {
+ if (likely(PyList_CheckExact(__pyx_t_14))) {
+ if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_14)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_14, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 2607, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_14, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_14)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_14, __pyx_t_9); __Pyx_INCREF(__pyx_t_4); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 2607, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_14, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_10(__pyx_t_14);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2607, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_4))) || (PyList_CheckExact(__pyx_t_4))) {
+ PyObject* sequence = __pyx_t_4;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 2607, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_11 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_1)) goto __pyx_L18_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_5 = __pyx_t_11(__pyx_t_3); if (unlikely(!__pyx_t_5)) goto __pyx_L18_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_3), 2) < 0) __PYX_ERR(0, 2607, __pyx_L1_error)
+ __pyx_t_11 = NULL;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L19_unpacking_done;
+ __pyx_L18_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_11 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 2607, __pyx_L1_error)
+ __pyx_L19_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5);
+ __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2608
+ * return "{0}({1})".format(self.getname(), ', '.join(tmp))
+ * for c,v in zip(self.linear_coefs, self.linear_vars):
+ * if smap: # <<<<<<<<<<<<<<
+ * v_ = smap.getSymbol(v)
+ * else:
+ */
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_smap); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2608, __pyx_L1_error)
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2609
+ * for c,v in zip(self.linear_coefs, self.linear_vars):
+ * if smap:
+ * v_ = smap.getSymbol(v) # <<<<<<<<<<<<<<
+ * else:
+ * v_ = str(v)
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_smap, __pyx_n_s_getSymbol); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_v); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_v};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2609, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_v};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2609, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_INCREF(__pyx_v_v);
+ __Pyx_GIVEREF(__pyx_v_v);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_v);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v_, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2608
+ * return "{0}({1})".format(self.getname(), ', '.join(tmp))
+ * for c,v in zip(self.linear_coefs, self.linear_vars):
+ * if smap: # <<<<<<<<<<<<<<
+ * v_ = smap.getSymbol(v)
+ * else:
+ */
+ goto __pyx_L20;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2611
+ * v_ = smap.getSymbol(v)
+ * else:
+ * v_ = str(v) # <<<<<<<<<<<<<<
+ * if c.__class__ in native_numeric_types or compute_values:
+ * c_ = value(c)
+ */
+ /*else*/ {
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2611, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_v);
+ __Pyx_GIVEREF(__pyx_v_v);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_v);
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2611, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v_, __pyx_t_5);
+ __pyx_t_5 = 0;
+ }
+ __pyx_L20:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2612
+ * else:
+ * v_ = str(v)
+ * if c.__class__ in native_numeric_types or compute_values: # <<<<<<<<<<<<<<
+ * c_ = value(c)
+ * if isclose(c_,1):
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_class); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2612, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2612, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_12 = (__Pyx_PySequence_ContainsTF(__pyx_t_5, __pyx_t_4, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 2612, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_2 = (__pyx_t_12 != 0);
+ if (!__pyx_t_2) {
+ } else {
+ __pyx_t_8 = __pyx_t_2;
+ goto __pyx_L22_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 2612, __pyx_L1_error)
+ __pyx_t_8 = __pyx_t_2;
+ __pyx_L22_bool_binop_done:;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2613
+ * v_ = str(v)
+ * if c.__class__ in native_numeric_types or compute_values:
+ * c_ = value(c) # <<<<<<<<<<<<<<
+ * if isclose(c_,1):
+ * tmp.append(" + %s" % v_)
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2613, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2613, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_c};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2613, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_c};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2613, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2613, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_c);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2613, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_c_, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2614
+ * if c.__class__ in native_numeric_types or compute_values:
+ * c_ = value(c)
+ * if isclose(c_,1): # <<<<<<<<<<<<<<
+ * tmp.append(" + %s" % v_)
+ * elif isclose(c_,0):
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2614, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_c_, __pyx_int_1};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2614, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_c_, __pyx_int_1};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2614, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2614, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__pyx_t_1) {
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_c_);
+ __Pyx_GIVEREF(__pyx_v_c_);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_v_c_);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_int_1);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2614, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2614, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2615
+ * c_ = value(c)
+ * if isclose(c_,1):
+ * tmp.append(" + %s" % v_) # <<<<<<<<<<<<<<
+ * elif isclose(c_,0):
+ * continue
+ */
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_2, __pyx_v_v_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2615, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_4); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 2615, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2614
+ * if c.__class__ in native_numeric_types or compute_values:
+ * c_ = value(c)
+ * if isclose(c_,1): # <<<<<<<<<<<<<<
+ * tmp.append(" + %s" % v_)
+ * elif isclose(c_,0):
+ */
+ goto __pyx_L24;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2616
+ * if isclose(c_,1):
+ * tmp.append(" + %s" % v_)
+ * elif isclose(c_,0): # <<<<<<<<<<<<<<
+ * continue
+ * elif isclose(c_,-1):
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2616, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_c_, __pyx_int_0};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2616, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_v_c_, __pyx_int_0};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2616, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2616, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__pyx_t_3) {
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_c_);
+ __Pyx_GIVEREF(__pyx_v_c_);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_v_c_);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2616, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2616, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2617
+ * tmp.append(" + %s" % v_)
+ * elif isclose(c_,0):
+ * continue # <<<<<<<<<<<<<<
+ * elif isclose(c_,-1):
+ * tmp.append(" - %s" % v_)
+ */
+ goto __pyx_L16_continue;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2616
+ * if isclose(c_,1):
+ * tmp.append(" + %s" % v_)
+ * elif isclose(c_,0): # <<<<<<<<<<<<<<
+ * continue
+ * elif isclose(c_,-1):
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2618
+ * elif isclose(c_,0):
+ * continue
+ * elif isclose(c_,-1): # <<<<<<<<<<<<<<
+ * tmp.append(" - %s" % v_)
+ * elif c_ < 0:
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2618, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_c_, __pyx_int_neg_1};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2618, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_c_, __pyx_int_neg_1};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2618, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2618, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__pyx_t_1) {
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_c_);
+ __Pyx_GIVEREF(__pyx_v_c_);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_7, __pyx_v_c_);
+ __Pyx_INCREF(__pyx_int_neg_1);
+ __Pyx_GIVEREF(__pyx_int_neg_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_7, __pyx_int_neg_1);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2618, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2618, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2619
+ * continue
+ * elif isclose(c_,-1):
+ * tmp.append(" - %s" % v_) # <<<<<<<<<<<<<<
+ * elif c_ < 0:
+ * tmp.append(" - %s*%s" % (str(math.fabs(c_)), v_))
+ */
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_3, __pyx_v_v_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2619, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_4); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 2619, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2618
+ * elif isclose(c_,0):
+ * continue
+ * elif isclose(c_,-1): # <<<<<<<<<<<<<<
+ * tmp.append(" - %s" % v_)
+ * elif c_ < 0:
+ */
+ goto __pyx_L24;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2620
+ * elif isclose(c_,-1):
+ * tmp.append(" - %s" % v_)
+ * elif c_ < 0: # <<<<<<<<<<<<<<
+ * tmp.append(" - %s*%s" % (str(math.fabs(c_)), v_))
+ * else:
+ */
+ __pyx_t_4 = PyObject_RichCompare(__pyx_v_c_, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2620, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2620, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2621
+ * tmp.append(" - %s" % v_)
+ * elif c_ < 0:
+ * tmp.append(" - %s*%s" % (str(math.fabs(c_)), v_)) # <<<<<<<<<<<<<<
+ * else:
+ * tmp.append(" + %s*%s" % (str(c_), v_))
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2621, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_fabs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2621, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_c_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2621, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_c_};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2621, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_c_};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2621, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2621, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_c_);
+ __Pyx_GIVEREF(__pyx_v_c_);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_c_);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2621, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2621, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2621, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2621, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+ __Pyx_INCREF(__pyx_v_v_);
+ __Pyx_GIVEREF(__pyx_v_v_);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_v_);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_s_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2621, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_4); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 2621, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2620
+ * elif isclose(c_,-1):
+ * tmp.append(" - %s" % v_)
+ * elif c_ < 0: # <<<<<<<<<<<<<<
+ * tmp.append(" - %s*%s" % (str(math.fabs(c_)), v_))
+ * else:
+ */
+ goto __pyx_L24;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2623
+ * tmp.append(" - %s*%s" % (str(math.fabs(c_)), v_))
+ * else:
+ * tmp.append(" + %s*%s" % (str(c_), v_)) # <<<<<<<<<<<<<<
+ * else:
+ * tmp.append(" + %s*%s" % (str(c), v_))
+ */
+ /*else*/ {
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_c_);
+ __Pyx_GIVEREF(__pyx_v_c_);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_c_);
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_v_);
+ __Pyx_GIVEREF(__pyx_v_v_);
+ PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_v_);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_s_3, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_3); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 2623, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __pyx_L24:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2612
+ * else:
+ * v_ = str(v)
+ * if c.__class__ in native_numeric_types or compute_values: # <<<<<<<<<<<<<<
+ * c_ = value(c)
+ * if isclose(c_,1):
+ */
+ goto __pyx_L21;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2625
+ * tmp.append(" + %s*%s" % (str(c_), v_))
+ * else:
+ * tmp.append(" + %s*%s" % (str(c), v_)) # <<<<<<<<<<<<<<
+ * s = "".join(tmp)
+ * if len(s) == 0: #pragma: no cover
+ */
+ /*else*/ {
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2625, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_c);
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2625, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2625, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+ __Pyx_INCREF(__pyx_v_v_);
+ __Pyx_GIVEREF(__pyx_v_v_);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_v_);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_s_s_3, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2625, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_13 = __Pyx_PyList_Append(__pyx_v_tmp, __pyx_t_4); if (unlikely(__pyx_t_13 == ((int)-1))) __PYX_ERR(0, 2625, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __pyx_L21:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2607
+ * tmp.append("prod(%s, %s)" % (str(c), v_))
+ * return "{0}({1})".format(self.getname(), ', '.join(tmp))
+ * for c,v in zip(self.linear_coefs, self.linear_vars): # <<<<<<<<<<<<<<
+ * if smap:
+ * v_ = smap.getSymbol(v)
+ */
+ __pyx_L16_continue:;
+ }
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2626
+ * else:
+ * tmp.append(" + %s*%s" % (str(c), v_))
+ * s = "".join(tmp) # <<<<<<<<<<<<<<
+ * if len(s) == 0: #pragma: no cover
+ * return s
+ */
+ __pyx_t_14 = __Pyx_PyString_Join(__pyx_kp_s__26, __pyx_v_tmp); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2626, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_v_s = ((PyObject*)__pyx_t_14);
+ __pyx_t_14 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2627
+ * tmp.append(" + %s*%s" % (str(c), v_))
+ * s = "".join(tmp)
+ * if len(s) == 0: #pragma: no cover # <<<<<<<<<<<<<<
+ * return s
+ * if s[0] == " ":
+ */
+ __pyx_t_9 = PyObject_Length(__pyx_v_s); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2627, __pyx_L1_error)
+ __pyx_t_8 = ((__pyx_t_9 == 0) != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2628
+ * s = "".join(tmp)
+ * if len(s) == 0: #pragma: no cover
+ * return s # <<<<<<<<<<<<<<
+ * if s[0] == " ":
+ * if s[1] == "+":
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_s);
+ __pyx_r = __pyx_v_s;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2627
+ * tmp.append(" + %s*%s" % (str(c), v_))
+ * s = "".join(tmp)
+ * if len(s) == 0: #pragma: no cover # <<<<<<<<<<<<<<
+ * return s
+ * if s[0] == " ":
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2629
+ * if len(s) == 0: #pragma: no cover
+ * return s
+ * if s[0] == " ": # <<<<<<<<<<<<<<
+ * if s[1] == "+":
+ * return s[3:]
+ */
+ __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_s, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2629, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_14, __pyx_kp_s__17, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2629, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2630
+ * return s
+ * if s[0] == " ":
+ * if s[1] == "+": # <<<<<<<<<<<<<<
+ * return s[3:]
+ * return s[1:]
+ */
+ __pyx_t_14 = __Pyx_GetItemInt(__pyx_v_s, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2630, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_8 = (__Pyx_PyString_Equals(__pyx_t_14, __pyx_kp_s__30, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 2630, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2631
+ * if s[0] == " ":
+ * if s[1] == "+":
+ * return s[3:] # <<<<<<<<<<<<<<
+ * return s[1:]
+ * return s
+ */
+ __Pyx_XDECREF(__pyx_r);
+ if (unlikely(__pyx_v_s == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(0, 2631, __pyx_L1_error)
+ }
+ __pyx_t_14 = PySequence_GetSlice(__pyx_v_s, 3, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2631, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_r = __pyx_t_14;
+ __pyx_t_14 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2630
+ * return s
+ * if s[0] == " ":
+ * if s[1] == "+": # <<<<<<<<<<<<<<
+ * return s[3:]
+ * return s[1:]
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2632
+ * if s[1] == "+":
+ * return s[3:]
+ * return s[1:] # <<<<<<<<<<<<<<
+ * return s
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ if (unlikely(__pyx_v_s == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(0, 2632, __pyx_L1_error)
+ }
+ __pyx_t_14 = PySequence_GetSlice(__pyx_v_s, 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2632, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_r = __pyx_t_14;
+ __pyx_t_14 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2629
+ * if len(s) == 0: #pragma: no cover
+ * return s
+ * if s[0] == " ": # <<<<<<<<<<<<<<
+ * if s[1] == "+":
+ * return s[3:]
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2633
+ * return s[3:]
+ * return s[1:]
+ * return s # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_s);
+ __pyx_r = __pyx_v_s;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2579
+ * return True
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * tmp = []
+ * if compute_values:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression._to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_tmp);
+ __Pyx_XDECREF(__pyx_v_const_);
+ __Pyx_XDECREF(__pyx_v_c);
+ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XDECREF(__pyx_v_v_);
+ __Pyx_XDECREF(__pyx_v_c_);
+ __Pyx_XDECREF(__pyx_v_s);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2635
+ * return s
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return len(self.linear_vars) > 0
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_23is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_23is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_23is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_23is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_22is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_22is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2636
+ *
+ * def is_potentially_variable(self):
+ * return len(self.linear_vars) > 0 # <<<<<<<<<<<<<<
+ *
+ * def _apply_operation(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2636, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2636, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_t_2 > 0)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2636, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2635
+ * return s
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return len(self.linear_vars) > 0
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression.is_potentially_variable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2638
+ * return len(self.linear_vars) > 0
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return value(self.constant) + sum(value(c)*v.value for c,v in zip(self.linear_coefs, self.linear_vars))
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_25_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_25_apply_operation = {"_apply_operation", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_25_apply_operation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_25_apply_operation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_apply_operation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, 1); __PYX_ERR(0, 2638, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_apply_operation") < 0)) __PYX_ERR(0, 2638, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_apply_operation", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2638, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_24_apply_operation(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_16_apply_operation_2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2639
+ *
+ * def _apply_operation(self, result):
+ * return value(self.constant) + sum(value(c)*v.value for c,v in zip(self.linear_coefs, self.linear_vars)) # <<<<<<<<<<<<<<
+ *
+ * #@profile
+ */
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_16_apply_operation_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr *)__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr(__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 2639, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_16_apply_operation_2generator8, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_LinearExpression__apply_operatio, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!gen)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression._apply_operation.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_16_apply_operation_2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L8_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2639, __pyx_L1_error) }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self)) { __Pyx_RaiseClosureNameError("self"); __PYX_ERR(0, 2639, __pyx_L1_error) }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_5(__pyx_t_3);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2639, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+ PyObject* sequence = __pyx_t_2;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 2639, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_7 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L7_unpacking_done;
+ __pyx_L6_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 2639, __pyx_L1_error)
+ __pyx_L7_unpacking_done:;
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_cur_scope->__pyx_v_c); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_c};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_cur_scope->__pyx_v_c};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_cur_scope->__pyx_v_c);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_v, __pyx_n_s_value); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = PyNumber_Multiply(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_r = __pyx_t_7;
+ __pyx_t_7 = 0;
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_4;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_5;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L8_resume_from_yield:;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_3);
+ __pyx_t_4 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_5 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2638
+ * return len(self.linear_vars) > 0
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return value(self.constant) + sum(value(c)*v.value for c,v in zip(self.linear_coefs, self.linear_vars))
+ *
+ */
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_24_apply_operation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_result) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("_apply_operation", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation *)__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation(__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 2638, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_self);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2639
+ *
+ * def _apply_operation(self, result):
+ * return value(self.constant) + sum(value(c)*v.value for c,v in zip(self.linear_coefs, self.linear_vars)) # <<<<<<<<<<<<<<
+ *
+ * #@profile
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_16_apply_operation_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyNumber_Add(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2638
+ * return len(self.linear_vars) > 0
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return value(self.constant) + sum(value(c)*v.value for c,v in zip(self.linear_coefs, self.linear_vars))
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression._apply_operation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2642
+ *
+ * #@profile
+ * def _combine_expr(self, etype, _other): # <<<<<<<<<<<<<<
+ * if etype == _add or etype == _sub or etype == -_add or etype == -_sub:
+ * #
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_27_combine_expr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_27_combine_expr = {"_combine_expr", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_27_combine_expr, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_27_combine_expr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_etype = 0;
+ PyObject *__pyx_v__other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_combine_expr (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_etype,&__pyx_n_s_other,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_combine_expr", 1, 3, 3, 1); __PYX_ERR(0, 2642, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_combine_expr", 1, 3, 3, 2); __PYX_ERR(0, 2642, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_combine_expr") < 0)) __PYX_ERR(0, 2642, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_etype = values[1];
+ __pyx_v__other = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_combine_expr", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2642, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression._combine_expr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_26_combine_expr(__pyx_self, __pyx_v_self, __pyx_v_etype, __pyx_v__other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_26_combine_expr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_etype, PyObject *__pyx_v__other) {
+ PyObject *__pyx_v_omult = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_v_c = NULL;
+ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_v_multiplier = NULL;
+ PyObject *__pyx_v_c_ = NULL;
+ PyObject *__pyx_v_divisor = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ Py_ssize_t __pyx_t_6;
+ PyObject *(*__pyx_t_7)(PyObject *);
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *(*__pyx_t_11)(PyObject *);
+ int __pyx_t_12;
+ int __pyx_t_13;
+ __Pyx_RefNannySetupContext("_combine_expr", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2643
+ * #@profile
+ * def _combine_expr(self, etype, _other):
+ * if etype == _add or etype == _sub or etype == -_add or etype == -_sub: # <<<<<<<<<<<<<<
+ * #
+ * # if etype == _sub, then _MutableLinearExpression - VAL
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_add_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2643, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2643, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_1 = __pyx_t_4;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sub); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2643, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2643, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_1 = __pyx_t_4;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_add_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2643, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2643, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_1 = __pyx_t_4;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sub); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2643, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2643, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = __pyx_t_4;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2648
+ * # if etype == -_sub, then VAL - _MutableLinearExpression
+ * #
+ * if etype == _sub: # <<<<<<<<<<<<<<
+ * omult = -1
+ * else:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sub); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2648, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2649
+ * #
+ * if etype == _sub:
+ * omult = -1 # <<<<<<<<<<<<<<
+ * else:
+ * omult = 1
+ */
+ __Pyx_INCREF(__pyx_int_neg_1);
+ __pyx_v_omult = __pyx_int_neg_1;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2648
+ * # if etype == -_sub, then VAL - _MutableLinearExpression
+ * #
+ * if etype == _sub: # <<<<<<<<<<<<<<
+ * omult = -1
+ * else:
+ */
+ goto __pyx_L8;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2651
+ * omult = -1
+ * else:
+ * omult = 1 # <<<<<<<<<<<<<<
+ * if etype == -_sub:
+ * self.constant *= -1
+ */
+ /*else*/ {
+ __Pyx_INCREF(__pyx_int_1);
+ __pyx_v_omult = __pyx_int_1;
+ }
+ __pyx_L8:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2652
+ * else:
+ * omult = 1
+ * if etype == -_sub: # <<<<<<<<<<<<<<
+ * self.constant *= -1
+ * for i,c in enumerate(self.linear_coefs):
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sub); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2652, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyNumber_Negative(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2652, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2652, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2652, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2653
+ * omult = 1
+ * if etype == -_sub:
+ * self.constant *= -1 # <<<<<<<<<<<<<<
+ * for i,c in enumerate(self.linear_coefs):
+ * self.linear_coefs[i] = -c
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2653, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyNumber_InPlaceMultiply(__pyx_t_3, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2653, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constant, __pyx_t_2) < 0) __PYX_ERR(0, 2653, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2654
+ * if etype == -_sub:
+ * self.constant *= -1
+ * for i,c in enumerate(self.linear_coefs): # <<<<<<<<<<<<<<
+ * self.linear_coefs[i] = -c
+ *
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_2 = __pyx_int_0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2654, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_5 = __pyx_t_3; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2654, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2654, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_5))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2654, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2654, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2654, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2654, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_7(__pyx_t_5);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2654, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
+ __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2654, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2655
+ * self.constant *= -1
+ * for i,c in enumerate(self.linear_coefs):
+ * self.linear_coefs[i] = -c # <<<<<<<<<<<<<<
+ *
+ * if _other.__class__ in native_numeric_types or not _other.is_potentially_variable():
+ */
+ __pyx_t_3 = PyNumber_Negative(__pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2655, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2655, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(0, 2655, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2654
+ * if etype == -_sub:
+ * self.constant *= -1
+ * for i,c in enumerate(self.linear_coefs): # <<<<<<<<<<<<<<
+ * self.linear_coefs[i] = -c
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2652
+ * else:
+ * omult = 1
+ * if etype == -_sub: # <<<<<<<<<<<<<<
+ * self.constant *= -1
+ * for i,c in enumerate(self.linear_coefs):
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2657
+ * self.linear_coefs[i] = -c
+ *
+ * if _other.__class__ in native_numeric_types or not _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * self.constant = self.constant + omult * _other
+ * #
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2657, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2657, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2657, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_9 = (__pyx_t_4 != 0);
+ if (!__pyx_t_9) {
+ } else {
+ __pyx_t_1 = __pyx_t_9;
+ goto __pyx_L13_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2657, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2657, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2657, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2657, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_4 = ((!__pyx_t_9) != 0);
+ __pyx_t_1 = __pyx_t_4;
+ __pyx_L13_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2658
+ *
+ * if _other.__class__ in native_numeric_types or not _other.is_potentially_variable():
+ * self.constant = self.constant + omult * _other # <<<<<<<<<<<<<<
+ * #
+ * # WEH - These seem like uncommon cases, so I think we should defer processing them
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2658, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_omult, __pyx_v__other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2658, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2658, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constant, __pyx_t_3) < 0) __PYX_ERR(0, 2658, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2657
+ * self.linear_coefs[i] = -c
+ *
+ * if _other.__class__ in native_numeric_types or not _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * self.constant = self.constant + omult * _other
+ * #
+ */
+ goto __pyx_L12;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2677
+ * # self.linear_vars.append(v)
+ * else:
+ * for c,v in _decompose_linear_terms(_other, multiplier=omult): # <<<<<<<<<<<<<<
+ * if v is None:
+ * self.constant += c
+ */
+ /*else*/ {
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_decompose_linear_terms); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v__other);
+ __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_multiplier, __pyx_v_omult) < 0) __PYX_ERR(0, 2677, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
+ __pyx_t_5 = __pyx_t_8; __Pyx_INCREF(__pyx_t_5); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2677, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_5))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_8 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2677, __pyx_L1_error)
+ #else
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2677, __pyx_L1_error)
+ #else
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_5, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ }
+ } else {
+ __pyx_t_8 = __pyx_t_7(__pyx_t_5);
+ if (unlikely(!__pyx_t_8)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2677, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
+ PyObject* sequence = __pyx_t_8;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 2677, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ #else
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_10 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2677, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
+ index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L17_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ index = 1; __pyx_t_3 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_3)) goto __pyx_L17_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 2677, __pyx_L1_error)
+ __pyx_t_11 = NULL;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ goto __pyx_L18_unpacking_done;
+ __pyx_L17_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_11 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 2677, __pyx_L1_error)
+ __pyx_L18_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2678
+ * else:
+ * for c,v in _decompose_linear_terms(_other, multiplier=omult):
+ * if v is None: # <<<<<<<<<<<<<<
+ * self.constant += c
+ * else:
+ */
+ __pyx_t_1 = (__pyx_v_v == Py_None);
+ __pyx_t_4 = (__pyx_t_1 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2679
+ * for c,v in _decompose_linear_terms(_other, multiplier=omult):
+ * if v is None:
+ * self.constant += c # <<<<<<<<<<<<<<
+ * else:
+ * self.linear_coefs.append(c)
+ */
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2679, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_v_c); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2679, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constant, __pyx_t_3) < 0) __PYX_ERR(0, 2679, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2678
+ * else:
+ * for c,v in _decompose_linear_terms(_other, multiplier=omult):
+ * if v is None: # <<<<<<<<<<<<<<
+ * self.constant += c
+ * else:
+ */
+ goto __pyx_L19;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2681
+ * self.constant += c
+ * else:
+ * self.linear_coefs.append(c) # <<<<<<<<<<<<<<
+ * self.linear_vars.append(v)
+ *
+ */
+ /*else*/ {
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2681, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_c); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2681, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2682
+ * else:
+ * self.linear_coefs.append(c)
+ * self.linear_vars.append(v) # <<<<<<<<<<<<<<
+ *
+ * elif etype == _mul or etype == -_mul:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2682, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_3, __pyx_v_v); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2682, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __pyx_L19:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2677
+ * # self.linear_vars.append(v)
+ * else:
+ * for c,v in _decompose_linear_terms(_other, multiplier=omult): # <<<<<<<<<<<<<<
+ * if v is None:
+ * self.constant += c
+ */
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __pyx_L12:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2643
+ * #@profile
+ * def _combine_expr(self, etype, _other):
+ * if etype == _add or etype == _sub or etype == -_add or etype == -_sub: # <<<<<<<<<<<<<<
+ * #
+ * # if etype == _sub, then _MutableLinearExpression - VAL
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2684
+ * self.linear_vars.append(v)
+ *
+ * elif etype == _mul or etype == -_mul: # <<<<<<<<<<<<<<
+ * if _other.__class__ in native_numeric_types:
+ * multiplier = _other
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_mul); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2684, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2684, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2684, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (!__pyx_t_1) {
+ } else {
+ __pyx_t_4 = __pyx_t_1;
+ goto __pyx_L20_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_mul); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2684, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = PyNumber_Negative(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2684, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2684, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2684, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __pyx_t_1;
+ __pyx_L20_bool_binop_done:;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2685
+ *
+ * elif etype == _mul or etype == -_mul:
+ * if _other.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * multiplier = _other
+ * elif _other.is_potentially_variable():
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2685, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2685, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2685, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_1 = (__pyx_t_4 != 0);
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2686
+ * elif etype == _mul or etype == -_mul:
+ * if _other.__class__ in native_numeric_types:
+ * multiplier = _other # <<<<<<<<<<<<<<
+ * elif _other.is_potentially_variable():
+ * if len(self.linear_vars) > 0:
+ */
+ __Pyx_INCREF(__pyx_v__other);
+ __pyx_v_multiplier = __pyx_v__other;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2685
+ *
+ * elif etype == _mul or etype == -_mul:
+ * if _other.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * multiplier = _other
+ * elif _other.is_potentially_variable():
+ */
+ goto __pyx_L22;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2687
+ * if _other.__class__ in native_numeric_types:
+ * multiplier = _other
+ * elif _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if len(self.linear_vars) > 0:
+ * raise ValueError("Cannot multiply a linear expression with a variable expression")
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2687, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2687, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2687, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2687, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2688
+ * multiplier = _other
+ * elif _other.is_potentially_variable():
+ * if len(self.linear_vars) > 0: # <<<<<<<<<<<<<<
+ * raise ValueError("Cannot multiply a linear expression with a variable expression")
+ * #
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2688, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = PyObject_Length(__pyx_t_5); if (unlikely(__pyx_t_6 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2688, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_1 = ((__pyx_t_6 > 0) != 0);
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2689
+ * elif _other.is_potentially_variable():
+ * if len(self.linear_vars) > 0:
+ * raise ValueError("Cannot multiply a linear expression with a variable expression") # <<<<<<<<<<<<<<
+ * #
+ * # The linear expression is a constant, so re-initialize it with
+ */
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2689, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __PYX_ERR(0, 2689, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2688
+ * multiplier = _other
+ * elif _other.is_potentially_variable():
+ * if len(self.linear_vars) > 0: # <<<<<<<<<<<<<<
+ * raise ValueError("Cannot multiply a linear expression with a variable expression")
+ * #
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2694
+ * # a single term that multiplies the expression by the constant value.
+ * #
+ * c_ = self.constant # <<<<<<<<<<<<<<
+ * self.constant = 0
+ * for c,v in _decompose_linear_terms(_other):
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2694, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_v_c_ = __pyx_t_5;
+ __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2695
+ * #
+ * c_ = self.constant
+ * self.constant = 0 # <<<<<<<<<<<<<<
+ * for c,v in _decompose_linear_terms(_other):
+ * if v is None:
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constant, __pyx_int_0) < 0) __PYX_ERR(0, 2695, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2696
+ * c_ = self.constant
+ * self.constant = 0
+ * for c,v in _decompose_linear_terms(_other): # <<<<<<<<<<<<<<
+ * if v is None:
+ * self.constant = c*c_
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_decompose_linear_terms); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v__other); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v__other};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v__other};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v__other);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
+ __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ }
+ } else {
+ __pyx_t_5 = __pyx_t_7(__pyx_t_3);
+ if (unlikely(!__pyx_t_5)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2696, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
+ PyObject* sequence = __pyx_t_5;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 2696, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ #else
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_10 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
+ index = 0; __pyx_t_2 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_2)) goto __pyx_L26_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ index = 1; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L26_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) __PYX_ERR(0, 2696, __pyx_L1_error)
+ __pyx_t_11 = NULL;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ goto __pyx_L27_unpacking_done;
+ __pyx_L26_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_11 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 2696, __pyx_L1_error)
+ __pyx_L27_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_8);
+ __pyx_t_8 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2697
+ * self.constant = 0
+ * for c,v in _decompose_linear_terms(_other):
+ * if v is None: # <<<<<<<<<<<<<<
+ * self.constant = c*c_
+ * else:
+ */
+ __pyx_t_1 = (__pyx_v_v == Py_None);
+ __pyx_t_4 = (__pyx_t_1 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2698
+ * for c,v in _decompose_linear_terms(_other):
+ * if v is None:
+ * self.constant = c*c_ # <<<<<<<<<<<<<<
+ * else:
+ * self.linear_vars.append(v)
+ */
+ __pyx_t_5 = PyNumber_Multiply(__pyx_v_c, __pyx_v_c_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2698, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constant, __pyx_t_5) < 0) __PYX_ERR(0, 2698, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2697
+ * self.constant = 0
+ * for c,v in _decompose_linear_terms(_other):
+ * if v is None: # <<<<<<<<<<<<<<
+ * self.constant = c*c_
+ * else:
+ */
+ goto __pyx_L28;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2700
+ * self.constant = c*c_
+ * else:
+ * self.linear_vars.append(v) # <<<<<<<<<<<<<<
+ * self.linear_coefs.append(c*c_)
+ * return self
+ */
+ /*else*/ {
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2700, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_5, __pyx_v_v); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2700, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2701
+ * else:
+ * self.linear_vars.append(v)
+ * self.linear_coefs.append(c*c_) # <<<<<<<<<<<<<<
+ * return self
+ * else:
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2701, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_8 = PyNumber_Multiply(__pyx_v_c, __pyx_v_c_); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2701, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_12 = __Pyx_PyObject_Append(__pyx_t_5, __pyx_t_8); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 2701, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __pyx_L28:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2696
+ * c_ = self.constant
+ * self.constant = 0
+ * for c,v in _decompose_linear_terms(_other): # <<<<<<<<<<<<<<
+ * if v is None:
+ * self.constant = c*c_
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2702
+ * self.linear_vars.append(v)
+ * self.linear_coefs.append(c*c_)
+ * return self # <<<<<<<<<<<<<<
+ * else:
+ * multiplier = _other
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_r = __pyx_v_self;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2687
+ * if _other.__class__ in native_numeric_types:
+ * multiplier = _other
+ * elif _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if len(self.linear_vars) > 0:
+ * raise ValueError("Cannot multiply a linear expression with a variable expression")
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2704
+ * return self
+ * else:
+ * multiplier = _other # <<<<<<<<<<<<<<
+ *
+ * if multiplier.__class__ in native_numeric_types and isclose(multiplier, 0.0):
+ */
+ /*else*/ {
+ __Pyx_INCREF(__pyx_v__other);
+ __pyx_v_multiplier = __pyx_v__other;
+ }
+ __pyx_L22:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2706
+ * multiplier = _other
+ *
+ * if multiplier.__class__ in native_numeric_types and isclose(multiplier, 0.0): # <<<<<<<<<<<<<<
+ * self.constant = 0
+ * self.linear_vars = []
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_multiplier, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2706, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2706, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_8, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2706, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_9 = (__pyx_t_1 != 0);
+ if (__pyx_t_9) {
+ } else {
+ __pyx_t_4 = __pyx_t_9;
+ goto __pyx_L30_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2706, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ __pyx_t_13 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_multiplier, __pyx_float_0_0};
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2706, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_multiplier, __pyx_float_0_0};
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2706, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2706, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_multiplier);
+ __Pyx_GIVEREF(__pyx_v_multiplier);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_13, __pyx_v_multiplier);
+ __Pyx_INCREF(__pyx_float_0_0);
+ __Pyx_GIVEREF(__pyx_float_0_0);
+ PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_13, __pyx_float_0_0);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_2, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2706, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2706, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_4 = __pyx_t_9;
+ __pyx_L30_bool_binop_done:;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2707
+ *
+ * if multiplier.__class__ in native_numeric_types and isclose(multiplier, 0.0):
+ * self.constant = 0 # <<<<<<<<<<<<<<
+ * self.linear_vars = []
+ * self.linear_coefs = []
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constant, __pyx_int_0) < 0) __PYX_ERR(0, 2707, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2708
+ * if multiplier.__class__ in native_numeric_types and isclose(multiplier, 0.0):
+ * self.constant = 0
+ * self.linear_vars = [] # <<<<<<<<<<<<<<
+ * self.linear_coefs = []
+ * else:
+ */
+ __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2708, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars, __pyx_t_8) < 0) __PYX_ERR(0, 2708, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2709
+ * self.constant = 0
+ * self.linear_vars = []
+ * self.linear_coefs = [] # <<<<<<<<<<<<<<
+ * else:
+ * self.constant *= multiplier
+ */
+ __pyx_t_8 = PyList_New(0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2709, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs, __pyx_t_8) < 0) __PYX_ERR(0, 2709, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2706
+ * multiplier = _other
+ *
+ * if multiplier.__class__ in native_numeric_types and isclose(multiplier, 0.0): # <<<<<<<<<<<<<<
+ * self.constant = 0
+ * self.linear_vars = []
+ */
+ goto __pyx_L29;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2711
+ * self.linear_coefs = []
+ * else:
+ * self.constant *= multiplier # <<<<<<<<<<<<<<
+ * for i,c in enumerate(self.linear_coefs):
+ * self.linear_coefs[i] = c*multiplier
+ */
+ /*else*/ {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2711, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_t_8, __pyx_v_multiplier); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2711, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constant, __pyx_t_3) < 0) __PYX_ERR(0, 2711, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2712
+ * else:
+ * self.constant *= multiplier
+ * for i,c in enumerate(self.linear_coefs): # <<<<<<<<<<<<<<
+ * self.linear_coefs[i] = c*multiplier
+ *
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_3 = __pyx_int_0;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2712, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
+ __pyx_t_2 = __pyx_t_8; __Pyx_INCREF(__pyx_t_2); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2712, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2712, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_8 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2712, __pyx_L1_error)
+ #else
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2712, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_6); __Pyx_INCREF(__pyx_t_8); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2712, __pyx_L1_error)
+ #else
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_2, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2712, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ }
+ } else {
+ __pyx_t_8 = __pyx_t_7(__pyx_t_2);
+ if (unlikely(!__pyx_t_8)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2712, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+ __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2712, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3);
+ __pyx_t_3 = __pyx_t_8;
+ __pyx_t_8 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2713
+ * self.constant *= multiplier
+ * for i,c in enumerate(self.linear_coefs):
+ * self.linear_coefs[i] = c*multiplier # <<<<<<<<<<<<<<
+ *
+ * elif etype == _div:
+ */
+ __pyx_t_8 = PyNumber_Multiply(__pyx_v_c, __pyx_v_multiplier); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2713, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2713, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_i, __pyx_t_8) < 0)) __PYX_ERR(0, 2713, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2712
+ * else:
+ * self.constant *= multiplier
+ * for i,c in enumerate(self.linear_coefs): # <<<<<<<<<<<<<<
+ * self.linear_coefs[i] = c*multiplier
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __pyx_L29:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2684
+ * self.linear_vars.append(v)
+ *
+ * elif etype == _mul or etype == -_mul: # <<<<<<<<<<<<<<
+ * if _other.__class__ in native_numeric_types:
+ * multiplier = _other
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2715
+ * self.linear_coefs[i] = c*multiplier
+ *
+ * elif etype == _div: # <<<<<<<<<<<<<<
+ * if _other.__class__ in native_numeric_types:
+ * divisor = _other
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_div); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2715, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2715, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2715, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2716
+ *
+ * elif etype == _div:
+ * if _other.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * divisor = _other
+ * elif _other.is_potentially_variable():
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2716, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2716, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2716, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_9 = (__pyx_t_4 != 0);
+ if (__pyx_t_9) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2717
+ * elif etype == _div:
+ * if _other.__class__ in native_numeric_types:
+ * divisor = _other # <<<<<<<<<<<<<<
+ * elif _other.is_potentially_variable():
+ * raise ValueError("Unallowed operation on linear expression: division with a variable RHS")
+ */
+ __Pyx_INCREF(__pyx_v__other);
+ __pyx_v_divisor = __pyx_v__other;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2716
+ *
+ * elif etype == _div:
+ * if _other.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * divisor = _other
+ * elif _other.is_potentially_variable():
+ */
+ goto __pyx_L34;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2718
+ * if _other.__class__ in native_numeric_types:
+ * divisor = _other
+ * elif _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * raise ValueError("Unallowed operation on linear expression: division with a variable RHS")
+ * else:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2718, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2718, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2718, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2718, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_9) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2719
+ * divisor = _other
+ * elif _other.is_potentially_variable():
+ * raise ValueError("Unallowed operation on linear expression: division with a variable RHS") # <<<<<<<<<<<<<<
+ * else:
+ * divisor = _other
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(0, 2719, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2718
+ * if _other.__class__ in native_numeric_types:
+ * divisor = _other
+ * elif _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * raise ValueError("Unallowed operation on linear expression: division with a variable RHS")
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2721
+ * raise ValueError("Unallowed operation on linear expression: division with a variable RHS")
+ * else:
+ * divisor = _other # <<<<<<<<<<<<<<
+ * self.constant /= divisor
+ * for i,c in enumerate(self.linear_coefs):
+ */
+ /*else*/ {
+ __Pyx_INCREF(__pyx_v__other);
+ __pyx_v_divisor = __pyx_v__other;
+ }
+ __pyx_L34:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2722
+ * else:
+ * divisor = _other
+ * self.constant /= divisor # <<<<<<<<<<<<<<
+ * for i,c in enumerate(self.linear_coefs):
+ * self.linear_coefs[i] = c/divisor
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2722, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyNumber_InPlaceDivide(__pyx_t_3, __pyx_v_divisor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2722, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constant, __pyx_t_2) < 0) __PYX_ERR(0, 2722, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2723
+ * divisor = _other
+ * self.constant /= divisor
+ * for i,c in enumerate(self.linear_coefs): # <<<<<<<<<<<<<<
+ * self.linear_coefs[i] = c/divisor
+ *
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_2 = __pyx_int_0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2723, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_8 = __pyx_t_3; __Pyx_INCREF(__pyx_t_8); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2723, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_7 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2723, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_8))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_8)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2723, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2723, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2723, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2723, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_7(__pyx_t_8);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2723, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
+ __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_2, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2723, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2724
+ * self.constant /= divisor
+ * for i,c in enumerate(self.linear_coefs):
+ * self.linear_coefs[i] = c/divisor # <<<<<<<<<<<<<<
+ *
+ * elif etype == -_div:
+ */
+ __pyx_t_3 = __Pyx_PyNumber_Divide(__pyx_v_c, __pyx_v_divisor); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2724, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2724, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(0, 2724, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2723
+ * divisor = _other
+ * self.constant /= divisor
+ * for i,c in enumerate(self.linear_coefs): # <<<<<<<<<<<<<<
+ * self.linear_coefs[i] = c/divisor
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2715
+ * self.linear_coefs[i] = c*multiplier
+ *
+ * elif etype == _div: # <<<<<<<<<<<<<<
+ * if _other.__class__ in native_numeric_types:
+ * divisor = _other
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2726
+ * self.linear_coefs[i] = c/divisor
+ *
+ * elif etype == -_div: # <<<<<<<<<<<<<<
+ * if self.is_potentially_variable():
+ * raise ValueError("Unallowed operation on linear expression: division with a variable RHS")
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_div); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2726, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = PyNumber_Negative(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2726, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2726, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2726, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_9) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2727
+ *
+ * elif etype == -_div:
+ * if self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * raise ValueError("Unallowed operation on linear expression: division with a variable RHS")
+ * return _other / self.constant
+ */
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2727, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2727, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2727, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2727, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_9) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2728
+ * elif etype == -_div:
+ * if self.is_potentially_variable():
+ * raise ValueError("Unallowed operation on linear expression: division with a variable RHS") # <<<<<<<<<<<<<<
+ * return _other / self.constant
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2728, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 2728, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2727
+ *
+ * elif etype == -_div:
+ * if self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * raise ValueError("Unallowed operation on linear expression: division with a variable RHS")
+ * return _other / self.constant
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2729
+ * if self.is_potentially_variable():
+ * raise ValueError("Unallowed operation on linear expression: division with a variable RHS")
+ * return _other / self.constant # <<<<<<<<<<<<<<
+ *
+ * elif etype == _neg:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2729, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_v__other, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2729, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2726
+ * self.linear_coefs[i] = c/divisor
+ *
+ * elif etype == -_div: # <<<<<<<<<<<<<<
+ * if self.is_potentially_variable():
+ * raise ValueError("Unallowed operation on linear expression: division with a variable RHS")
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2731
+ * return _other / self.constant
+ *
+ * elif etype == _neg: # <<<<<<<<<<<<<<
+ * self.constant *= -1
+ * for i,c in enumerate(self.linear_coefs):
+ */
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_neg_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2731, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_8, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2731, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 2731, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_9) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2732
+ *
+ * elif etype == _neg:
+ * self.constant *= -1 # <<<<<<<<<<<<<<
+ * for i,c in enumerate(self.linear_coefs):
+ * self.linear_coefs[i] = - c
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2732, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = PyNumber_InPlaceMultiply(__pyx_t_2, __pyx_int_neg_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2732, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constant, __pyx_t_8) < 0) __PYX_ERR(0, 2732, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2733
+ * elif etype == _neg:
+ * self.constant *= -1
+ * for i,c in enumerate(self.linear_coefs): # <<<<<<<<<<<<<<
+ * self.linear_coefs[i] = - c
+ *
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_8 = __pyx_int_0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2733, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2733, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2733, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2733, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2733, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_2); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 2733, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2733, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_7(__pyx_t_3);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2733, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_8);
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_8, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2733, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8);
+ __pyx_t_8 = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2734
+ * self.constant *= -1
+ * for i,c in enumerate(self.linear_coefs):
+ * self.linear_coefs[i] = - c # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __pyx_t_2 = PyNumber_Negative(__pyx_v_c); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2734, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2734, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_i, __pyx_t_2) < 0)) __PYX_ERR(0, 2734, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2733
+ * elif etype == _neg:
+ * self.constant *= -1
+ * for i,c in enumerate(self.linear_coefs): # <<<<<<<<<<<<<<
+ * self.linear_coefs[i] = - c
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2731
+ * return _other / self.constant
+ *
+ * elif etype == _neg: # <<<<<<<<<<<<<<
+ * self.constant *= -1
+ * for i,c in enumerate(self.linear_coefs):
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2737
+ *
+ * else:
+ * raise ValueError("Unallowed operation on mutable linear expression: %d" % etype) #pragma: no cover # <<<<<<<<<<<<<<
+ *
+ * return self
+ */
+ /*else*/ {
+ __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_Unallowed_operation_on_mutable_l, __pyx_v_etype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2737, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2737, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2737, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(0, 2737, __pyx_L1_error)
+ }
+ __pyx_L3:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2739
+ * raise ValueError("Unallowed operation on mutable linear expression: %d" % etype) #pragma: no cover
+ *
+ * return self # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_r = __pyx_v_self;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2642
+ *
+ * #@profile
+ * def _combine_expr(self, etype, _other): # <<<<<<<<<<<<<<
+ * if etype == _add or etype == _sub or etype == -_add or etype == -_sub:
+ * #
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearExpression._combine_expr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_omult);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XDECREF(__pyx_v_c);
+ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XDECREF(__pyx_v_multiplier);
+ __Pyx_XDECREF(__pyx_v_c_);
+ __Pyx_XDECREF(__pyx_v_divisor);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2752
+ * #-------------------------------------------------------
+ *
+ * def decompose_term(expr): # <<<<<<<<<<<<<<
+ * """
+ * A function that returns a tuple consisting of (1) a flag indicated
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28decompose_term(PyObject *__pyx_self, PyObject *__pyx_v_expr); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_27decompose_term[] = "\n A function that returns a tuple consisting of (1) a flag indicated\n whether the expression is linear, and (2) a list of tuples that \n represents the terms in the linear expression.\n\n Args:\n expr (expression): The root node of an expression tree\n\n Returns:\n A tuple with the form ``(flag, list)``. If :attr:`flag` is :const:`False`, then\n a nonlinear term has been found, and :const:`list` is :const:`None`.\n Otherwise, :const:`list` is a list of tuples: ``(coef, value)``.\n If :attr:`value` is :const:`None`, then this\n represents a constant term with value :attr:`coef`. Otherwise,\n :attr:`value` is a variable object, and :attr:`coef` is the\n numeric coefficient.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_28decompose_term = {"decompose_term", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28decompose_term, METH_O, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_27decompose_term};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_28decompose_term(PyObject *__pyx_self, PyObject *__pyx_v_expr) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("decompose_term (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_27decompose_term(__pyx_self, ((PyObject *)__pyx_v_expr));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_27decompose_term(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr) {
+ PyObject *__pyx_v_terms = NULL;
+ PyObject *__pyx_v_t_ = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ Py_ssize_t __pyx_t_12;
+ PyObject *(*__pyx_t_13)(PyObject *);
+ int __pyx_t_14;
+ __Pyx_RefNannySetupContext("decompose_term", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2770
+ * numeric coefficient.
+ * """
+ * if expr.__class__ in nonpyomo_leaf_types or not expr.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return True, [(expr,None)]
+ * elif expr.is_variable_type():
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2770, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2770, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2770, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_1 = __pyx_t_5;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2770, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2770, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2770, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2770, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = ((!__pyx_t_5) != 0);
+ __pyx_t_1 = __pyx_t_4;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2771
+ * """
+ * if expr.__class__ in nonpyomo_leaf_types or not expr.is_potentially_variable():
+ * return True, [(expr,None)] # <<<<<<<<<<<<<<
+ * elif expr.is_variable_type():
+ * return True, [(1,expr)]
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2771, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_expr);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2771, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2771, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, Py_True);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2770
+ * numeric coefficient.
+ * """
+ * if expr.__class__ in nonpyomo_leaf_types or not expr.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return True, [(expr,None)]
+ * elif expr.is_variable_type():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2772
+ * if expr.__class__ in nonpyomo_leaf_types or not expr.is_potentially_variable():
+ * return True, [(expr,None)]
+ * elif expr.is_variable_type(): # <<<<<<<<<<<<<<
+ * return True, [(1,expr)]
+ * else:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_is_variable_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2772, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2772, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2772, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2772, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2773
+ * return True, [(expr,None)]
+ * elif expr.is_variable_type():
+ * return True, [(1,expr)] # <<<<<<<<<<<<<<
+ * else:
+ * try:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2773, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_1);
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_expr);
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2773, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2773, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, Py_True);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2772
+ * if expr.__class__ in nonpyomo_leaf_types or not expr.is_potentially_variable():
+ * return True, [(expr,None)]
+ * elif expr.is_variable_type(): # <<<<<<<<<<<<<<
+ * return True, [(1,expr)]
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2775
+ * return True, [(1,expr)]
+ * else:
+ * try: # <<<<<<<<<<<<<<
+ * terms = [t_ for t_ in _decompose_linear_terms(expr)]
+ * return True, terms
+ */
+ /*else*/ {
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_8, &__pyx_t_9);
+ __Pyx_XGOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_8);
+ __Pyx_XGOTREF(__pyx_t_9);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2776
+ * else:
+ * try:
+ * terms = [t_ for t_ in _decompose_linear_terms(expr)] # <<<<<<<<<<<<<<
+ * return True, terms
+ * except LinearDecompositionError:
+ */
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2776, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_decompose_linear_terms); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2776, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2776, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_expr};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2776, __pyx_L6_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_expr};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2776, __pyx_L6_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 2776, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_expr);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2776, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_6 = __pyx_t_2; __Pyx_INCREF(__pyx_t_6); __pyx_t_12 = 0;
+ __pyx_t_13 = NULL;
+ } else {
+ __pyx_t_12 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2776, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_13 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2776, __pyx_L6_error)
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_13)) {
+ if (likely(PyList_CheckExact(__pyx_t_6))) {
+ if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2776, __pyx_L6_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2776, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_12); __Pyx_INCREF(__pyx_t_2); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 2776, __pyx_L6_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2776, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_13(__pyx_t_6);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2776, __pyx_L6_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_t_, __pyx_t_2);
+ __pyx_t_2 = 0;
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_v_t_))) __PYX_ERR(0, 2776, __pyx_L6_error)
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_terms = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2777
+ * try:
+ * terms = [t_ for t_ in _decompose_linear_terms(expr)]
+ * return True, terms # <<<<<<<<<<<<<<
+ * except LinearDecompositionError:
+ * return False, None
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2777, __pyx_L6_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(Py_True);
+ __Pyx_GIVEREF(Py_True);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, Py_True);
+ __Pyx_INCREF(__pyx_v_terms);
+ __Pyx_GIVEREF(__pyx_v_terms);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_terms);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L10_try_return;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2775
+ * return True, [(1,expr)]
+ * else:
+ * try: # <<<<<<<<<<<<<<
+ * terms = [t_ for t_ in _decompose_linear_terms(expr)]
+ * return True, terms
+ */
+ }
+ __pyx_L6_error:;
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2778
+ * terms = [t_ for t_ in _decompose_linear_terms(expr)]
+ * return True, terms
+ * except LinearDecompositionError: # <<<<<<<<<<<<<<
+ * return False, None
+ *
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearDecompositionError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2778, __pyx_L8_except_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_14) {
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.decompose_term", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_2) < 0) __PYX_ERR(0, 2778, __pyx_L8_except_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_2);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2779
+ * return True, terms
+ * except LinearDecompositionError:
+ * return False, None # <<<<<<<<<<<<<<
+ *
+ * class LinearDecompositionError(Exception):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_tuple__34);
+ __pyx_r = __pyx_tuple__34;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L9_except_return;
+ }
+ goto __pyx_L8_except_error;
+ __pyx_L8_except_error:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2775
+ * return True, [(1,expr)]
+ * else:
+ * try: # <<<<<<<<<<<<<<
+ * terms = [t_ for t_ in _decompose_linear_terms(expr)]
+ * return True, terms
+ */
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_XGIVEREF(__pyx_t_9);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
+ goto __pyx_L1_error;
+ __pyx_L10_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_XGIVEREF(__pyx_t_9);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
+ goto __pyx_L0;
+ __pyx_L9_except_return:;
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_XGIVEREF(__pyx_t_9);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_8, __pyx_t_9);
+ goto __pyx_L0;
+ }
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2752
+ * #-------------------------------------------------------
+ *
+ * def decompose_term(expr): # <<<<<<<<<<<<<<
+ * """
+ * A function that returns a tuple consisting of (1) a flag indicated
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.decompose_term", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_terms);
+ __Pyx_XDECREF(__pyx_v_t_);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2783
+ * class LinearDecompositionError(Exception):
+ *
+ * def __init__(self, message): # <<<<<<<<<<<<<<
+ * super(LinearDecompositionError, self).__init__(message)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_24LinearDecompositionError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_24LinearDecompositionError_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_24LinearDecompositionError_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_24LinearDecompositionError_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_message = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_message,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_message)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 2783, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 2783, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_message = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2783, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearDecompositionError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_24LinearDecompositionError___init__(__pyx_self, __pyx_v_self, __pyx_v_message);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_24LinearDecompositionError___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_message) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2784
+ *
+ * def __init__(self, message):
+ * super(LinearDecompositionError, self).__init__(message) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearDecompositionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_message};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2784, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_message};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2784, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_message);
+ __Pyx_GIVEREF(__pyx_v_message);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_message);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2784, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2783
+ * class LinearDecompositionError(Exception):
+ *
+ * def __init__(self, message): # <<<<<<<<<<<<<<
+ * super(LinearDecompositionError, self).__init__(message)
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5.LinearDecompositionError.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_31generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2787
+ *
+ *
+ * def _decompose_linear_terms(expr, multiplier=1): # <<<<<<<<<<<<<<
+ * """
+ * A generator function that yields tuples for the linear terms
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_30_decompose_linear_terms(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_29_decompose_linear_terms[] = "\n A generator function that yields tuples for the linear terms\n in an expression. If nonlinear terms are encountered, this function \n raises the :class:`LinearDecompositionError` exception.\n\n Args:\n expr (expression): The root node of an expression tree\n\n Yields:\n Tuples: ``(coef, value)``. If :attr:`value` is :const:`None`,\n then this represents a constant term with value :attr:`coef`.\n Otherwise, :attr:`value` is a variable object, and :attr:`coef`\n is the numeric coefficient.\n\n Raises:\n :class:`LinearDecompositionError` if a nonlinear term is encountered.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_30_decompose_linear_terms = {"_decompose_linear_terms", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_30_decompose_linear_terms, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_11expr_pyomo5_29_decompose_linear_terms};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_30_decompose_linear_terms(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_expr = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_decompose_linear_terms (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_expr,&__pyx_n_s_multiplier,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)__pyx_int_1);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_expr)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_decompose_linear_terms") < 0)) __PYX_ERR(0, 2787, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_expr = values[0];
+ __pyx_v_multiplier = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_decompose_linear_terms", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2787, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._decompose_linear_terms", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_29_decompose_linear_terms(__pyx_self, __pyx_v_expr, __pyx_v_multiplier);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_29_decompose_linear_terms(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_multiplier) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_decompose_linear_terms", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms *)__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms(__pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 2787, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_v_expr = __pyx_v_expr;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_expr);
+ __pyx_cur_scope->__pyx_v_multiplier = __pyx_v_multiplier;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_multiplier);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_multiplier);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_31generator4, (PyObject *) __pyx_cur_scope, __pyx_n_s_decompose_linear_terms, __pyx_n_s_decompose_linear_terms, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!gen)) __PYX_ERR(0, 2787, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._decompose_linear_terms", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4expr_11expr_pyomo5_31generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ Py_ssize_t __pyx_t_11;
+ PyObject *(*__pyx_t_12)(PyObject *);
+ Py_ssize_t __pyx_t_13;
+ PyObject *(*__pyx_t_14)(PyObject *);
+ PyObject *(*__pyx_t_15)(PyObject *);
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_decompose_linear_terms", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L7_resume_from_yield;
+ case 2: goto __pyx_L8_resume_from_yield;
+ case 3: goto __pyx_L14_resume_from_yield;
+ case 4: goto __pyx_L21_resume_from_yield;
+ case 5: goto __pyx_L24_resume_from_yield;
+ case 6: goto __pyx_L30_resume_from_yield;
+ case 7: goto __pyx_L36_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2787, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2805
+ * :class:`LinearDecompositionError` if a nonlinear term is encountered.
+ * """
+ * if expr.__class__ in native_numeric_types or not expr.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * yield (multiplier*expr,None)
+ * elif expr.is_variable_type():
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2805, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2805, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2805, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_1 = __pyx_t_5;
+ goto __pyx_L5_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2805, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2805, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2805, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2805, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = ((!__pyx_t_5) != 0);
+ __pyx_t_1 = __pyx_t_4;
+ __pyx_L5_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2806
+ * """
+ * if expr.__class__ in native_numeric_types or not expr.is_potentially_variable():
+ * yield (multiplier*expr,None) # <<<<<<<<<<<<<<
+ * elif expr.is_variable_type():
+ * yield (multiplier,expr)
+ */
+ __pyx_t_3 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_multiplier, __pyx_cur_scope->__pyx_v_expr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2806, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2806, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, Py_None);
+ __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L7_resume_from_yield:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2806, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2805
+ * :class:`LinearDecompositionError` if a nonlinear term is encountered.
+ * """
+ * if expr.__class__ in native_numeric_types or not expr.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * yield (multiplier*expr,None)
+ * elif expr.is_variable_type():
+ */
+ goto __pyx_L4;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2807
+ * if expr.__class__ in native_numeric_types or not expr.is_potentially_variable():
+ * yield (multiplier*expr,None)
+ * elif expr.is_variable_type(): # <<<<<<<<<<<<<<
+ * yield (multiplier,expr)
+ * elif expr.__class__ is ProductExpression:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_is_variable_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2807, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2807, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2807, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2807, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2808
+ * yield (multiplier*expr,None)
+ * elif expr.is_variable_type():
+ * yield (multiplier,expr) # <<<<<<<<<<<<<<
+ * elif expr.__class__ is ProductExpression:
+ * if expr._args_[0].__class__ in native_numeric_types or not expr._args_[0].is_potentially_variable():
+ */
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2808, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_multiplier);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_multiplier);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_cur_scope->__pyx_v_multiplier);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_cur_scope->__pyx_v_expr);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 2;
+ return __pyx_r;
+ __pyx_L8_resume_from_yield:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2808, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2807
+ * if expr.__class__ in native_numeric_types or not expr.is_potentially_variable():
+ * yield (multiplier*expr,None)
+ * elif expr.is_variable_type(): # <<<<<<<<<<<<<<
+ * yield (multiplier,expr)
+ * elif expr.__class__ is ProductExpression:
+ */
+ goto __pyx_L4;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2809
+ * elif expr.is_variable_type():
+ * yield (multiplier,expr)
+ * elif expr.__class__ is ProductExpression: # <<<<<<<<<<<<<<
+ * if expr._args_[0].__class__ in native_numeric_types or not expr._args_[0].is_potentially_variable():
+ * for term in _decompose_linear_terms(expr._args_[1], multiplier*expr._args_[0]):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2809, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProductExpression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2809, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = (__pyx_t_2 == __pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = (__pyx_t_1 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2810
+ * yield (multiplier,expr)
+ * elif expr.__class__ is ProductExpression:
+ * if expr._args_[0].__class__ in native_numeric_types or not expr._args_[0].is_potentially_variable(): # <<<<<<<<<<<<<<
+ * for term in _decompose_linear_terms(expr._args_[1], multiplier*expr._args_[0]):
+ * yield term
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2810, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2810, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2810, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2810, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2810, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = (__pyx_t_1 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_4 = __pyx_t_5;
+ goto __pyx_L10_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_args_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2810, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2810, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2810, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2810, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2810, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2810, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = ((!__pyx_t_5) != 0);
+ __pyx_t_4 = __pyx_t_1;
+ __pyx_L10_bool_binop_done:;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2811
+ * elif expr.__class__ is ProductExpression:
+ * if expr._args_[0].__class__ in native_numeric_types or not expr._args_[0].is_potentially_variable():
+ * for term in _decompose_linear_terms(expr._args_[1], multiplier*expr._args_[0]): # <<<<<<<<<<<<<<
+ * yield term
+ * else:
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_decompose_linear_terms); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_args_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_args_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_multiplier, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_t_6);
+ __pyx_t_7 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_11 = 0;
+ __pyx_t_12 = NULL;
+ } else {
+ __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_12 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_12)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2811, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_12(__pyx_t_3);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2811, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_term);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_term, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2812
+ * if expr._args_[0].__class__ in native_numeric_types or not expr._args_[0].is_potentially_variable():
+ * for term in _decompose_linear_terms(expr._args_[1], multiplier*expr._args_[0]):
+ * yield term # <<<<<<<<<<<<<<
+ * else:
+ * raise LinearDecompositionError("Quadratic terms exist in a product expression.")
+ */
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_term);
+ __pyx_r = __pyx_cur_scope->__pyx_v_term;
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_11;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_12;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 3;
+ return __pyx_r;
+ __pyx_L14_resume_from_yield:;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_3);
+ __pyx_t_11 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_12 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2812, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2811
+ * elif expr.__class__ is ProductExpression:
+ * if expr._args_[0].__class__ in native_numeric_types or not expr._args_[0].is_potentially_variable():
+ * for term in _decompose_linear_terms(expr._args_[1], multiplier*expr._args_[0]): # <<<<<<<<<<<<<<
+ * yield term
+ * else:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2810
+ * yield (multiplier,expr)
+ * elif expr.__class__ is ProductExpression:
+ * if expr._args_[0].__class__ in native_numeric_types or not expr._args_[0].is_potentially_variable(): # <<<<<<<<<<<<<<
+ * for term in _decompose_linear_terms(expr._args_[1], multiplier*expr._args_[0]):
+ * yield term
+ */
+ goto __pyx_L9;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2814
+ * yield term
+ * else:
+ * raise LinearDecompositionError("Quadratic terms exist in a product expression.") # <<<<<<<<<<<<<<
+ * elif expr.__class__ is ReciprocalExpression:
+ * # The argument is potentially variable, so this represents a nonlinear term
+ */
+ /*else*/ {
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearDecompositionError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2814, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2814, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 2814, __pyx_L1_error)
+ }
+ __pyx_L9:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2809
+ * elif expr.is_variable_type():
+ * yield (multiplier,expr)
+ * elif expr.__class__ is ProductExpression: # <<<<<<<<<<<<<<
+ * if expr._args_[0].__class__ in native_numeric_types or not expr._args_[0].is_potentially_variable():
+ * for term in _decompose_linear_terms(expr._args_[1], multiplier*expr._args_[0]):
+ */
+ goto __pyx_L4;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2815
+ * else:
+ * raise LinearDecompositionError("Quadratic terms exist in a product expression.")
+ * elif expr.__class__ is ReciprocalExpression: # <<<<<<<<<<<<<<
+ * # The argument is potentially variable, so this represents a nonlinear term
+ * #
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2815, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReciprocalExpression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2815, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__pyx_t_2 == __pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = (__pyx_t_4 != 0);
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2819
+ * #
+ * # NOTE: We're ignoring possible simplifications
+ * raise LinearDecompositionError("Unexpected nonlinear term") # <<<<<<<<<<<<<<
+ * elif expr.__class__ is ViewSumExpression or expr.__class__ is _MutableViewSumExpression:
+ * for arg in expr.args:
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearDecompositionError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 2819, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2815
+ * else:
+ * raise LinearDecompositionError("Quadratic terms exist in a product expression.")
+ * elif expr.__class__ is ReciprocalExpression: # <<<<<<<<<<<<<<
+ * # The argument is potentially variable, so this represents a nonlinear term
+ * #
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2820
+ * # NOTE: We're ignoring possible simplifications
+ * raise LinearDecompositionError("Unexpected nonlinear term")
+ * elif expr.__class__ is ViewSumExpression or expr.__class__ is _MutableViewSumExpression: # <<<<<<<<<<<<<<
+ * for arg in expr.args:
+ * for term in _decompose_linear_terms(arg, multiplier):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2820, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2820, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__pyx_t_2 == __pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_1 = __pyx_t_5;
+ goto __pyx_L15_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2820, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2820, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = (__pyx_t_3 == __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_5 != 0);
+ __pyx_t_1 = __pyx_t_4;
+ __pyx_L15_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2821
+ * raise LinearDecompositionError("Unexpected nonlinear term")
+ * elif expr.__class__ is ViewSumExpression or expr.__class__ is _MutableViewSumExpression:
+ * for arg in expr.args: # <<<<<<<<<<<<<<
+ * for term in _decompose_linear_terms(arg, multiplier):
+ * yield term
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2821, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_11 = 0;
+ __pyx_t_12 = NULL;
+ } else {
+ __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2821, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_12 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2821, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_12)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 2821, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2821, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_2); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 2821, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2821, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_12(__pyx_t_3);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2821, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_arg);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_arg, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2822
+ * elif expr.__class__ is ViewSumExpression or expr.__class__ is _MutableViewSumExpression:
+ * for arg in expr.args:
+ * for term in _decompose_linear_terms(arg, multiplier): # <<<<<<<<<<<<<<
+ * yield term
+ * elif expr.__class__ is NegationExpression:
+ */
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_decompose_linear_terms); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_6 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_arg, __pyx_cur_scope->__pyx_v_multiplier};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2822, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_cur_scope->__pyx_v_arg, __pyx_cur_scope->__pyx_v_multiplier};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2822, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_arg);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_arg);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, __pyx_cur_scope->__pyx_v_arg);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_multiplier);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_multiplier);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_cur_scope->__pyx_v_multiplier);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_10 = __pyx_t_2; __Pyx_INCREF(__pyx_t_10); __pyx_t_13 = 0;
+ __pyx_t_14 = NULL;
+ } else {
+ __pyx_t_13 = -1; __pyx_t_10 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_14 = Py_TYPE(__pyx_t_10)->tp_iternext; if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2822, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_14)) {
+ if (likely(PyList_CheckExact(__pyx_t_10))) {
+ if (__pyx_t_13 >= PyList_GET_SIZE(__pyx_t_10)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_10, __pyx_t_13); __Pyx_INCREF(__pyx_t_2); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 2822, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_10, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_13 >= PyTuple_GET_SIZE(__pyx_t_10)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_10, __pyx_t_13); __Pyx_INCREF(__pyx_t_2); __pyx_t_13++; if (unlikely(0 < 0)) __PYX_ERR(0, 2822, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_10, __pyx_t_13); __pyx_t_13++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_14(__pyx_t_10);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2822, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_term);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_term, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2823
+ * for arg in expr.args:
+ * for term in _decompose_linear_terms(arg, multiplier):
+ * yield term # <<<<<<<<<<<<<<
+ * elif expr.__class__ is NegationExpression:
+ * for term in _decompose_linear_terms(expr._args_[0], -multiplier):
+ */
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_term);
+ __pyx_r = __pyx_cur_scope->__pyx_v_term;
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
+ __Pyx_XGIVEREF(__pyx_t_10);
+ __pyx_cur_scope->__pyx_t_3 = __pyx_t_10;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_11;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_12;
+ __pyx_cur_scope->__pyx_t_4 = __pyx_t_13;
+ __pyx_cur_scope->__pyx_t_5 = __pyx_t_14;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 4;
+ return __pyx_r;
+ __pyx_L21_resume_from_yield:;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_3);
+ __pyx_t_10 = __pyx_cur_scope->__pyx_t_3;
+ __pyx_cur_scope->__pyx_t_3 = 0;
+ __Pyx_XGOTREF(__pyx_t_10);
+ __pyx_t_11 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_12 = __pyx_cur_scope->__pyx_t_2;
+ __pyx_t_13 = __pyx_cur_scope->__pyx_t_4;
+ __pyx_t_14 = __pyx_cur_scope->__pyx_t_5;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2823, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2822
+ * elif expr.__class__ is ViewSumExpression or expr.__class__ is _MutableViewSumExpression:
+ * for arg in expr.args:
+ * for term in _decompose_linear_terms(arg, multiplier): # <<<<<<<<<<<<<<
+ * yield term
+ * elif expr.__class__ is NegationExpression:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2821
+ * raise LinearDecompositionError("Unexpected nonlinear term")
+ * elif expr.__class__ is ViewSumExpression or expr.__class__ is _MutableViewSumExpression:
+ * for arg in expr.args: # <<<<<<<<<<<<<<
+ * for term in _decompose_linear_terms(arg, multiplier):
+ * yield term
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2820
+ * # NOTE: We're ignoring possible simplifications
+ * raise LinearDecompositionError("Unexpected nonlinear term")
+ * elif expr.__class__ is ViewSumExpression or expr.__class__ is _MutableViewSumExpression: # <<<<<<<<<<<<<<
+ * for arg in expr.args:
+ * for term in _decompose_linear_terms(arg, multiplier):
+ */
+ goto __pyx_L4;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2824
+ * for term in _decompose_linear_terms(arg, multiplier):
+ * yield term
+ * elif expr.__class__ is NegationExpression: # <<<<<<<<<<<<<<
+ * for term in _decompose_linear_terms(expr._args_[0], -multiplier):
+ * yield term
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2824, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_NegationExpression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2824, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_1 = (__pyx_t_3 == __pyx_t_10);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_4 = (__pyx_t_1 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2825
+ * yield term
+ * elif expr.__class__ is NegationExpression:
+ * for term in _decompose_linear_terms(expr._args_[0], -multiplier): # <<<<<<<<<<<<<<
+ * yield term
+ * elif expr.__class__ is LinearExpression or expr.__class__ is _MutableLinearExpression:
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_decompose_linear_terms); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2825, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_args_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2825, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2825, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Negative(__pyx_cur_scope->__pyx_v_multiplier); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2825, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_t_2};
+ __pyx_t_10 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2825, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_t_2};
+ __pyx_t_10 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2825, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2825, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_t_2);
+ __pyx_t_7 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2825, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) {
+ __pyx_t_3 = __pyx_t_10; __Pyx_INCREF(__pyx_t_3); __pyx_t_11 = 0;
+ __pyx_t_12 = NULL;
+ } else {
+ __pyx_t_11 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2825, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_12 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2825, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_12)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_10 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_10); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 2825, __pyx_L1_error)
+ #else
+ __pyx_t_10 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2825, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ #endif
+ } else {
+ if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_11); __Pyx_INCREF(__pyx_t_10); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 2825, __pyx_L1_error)
+ #else
+ __pyx_t_10 = PySequence_ITEM(__pyx_t_3, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2825, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ #endif
+ }
+ } else {
+ __pyx_t_10 = __pyx_t_12(__pyx_t_3);
+ if (unlikely(!__pyx_t_10)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2825, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_10);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_term);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_term, __pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_10);
+ __pyx_t_10 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2826
+ * elif expr.__class__ is NegationExpression:
+ * for term in _decompose_linear_terms(expr._args_[0], -multiplier):
+ * yield term # <<<<<<<<<<<<<<
+ * elif expr.__class__ is LinearExpression or expr.__class__ is _MutableLinearExpression:
+ * if expr.constant.__class__ in native_numeric_types and not isclose(expr.constant,0):
+ */
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_term);
+ __pyx_r = __pyx_cur_scope->__pyx_v_term;
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_11;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_12;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 5;
+ return __pyx_r;
+ __pyx_L24_resume_from_yield:;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_3);
+ __pyx_t_11 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_12 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2826, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2825
+ * yield term
+ * elif expr.__class__ is NegationExpression:
+ * for term in _decompose_linear_terms(expr._args_[0], -multiplier): # <<<<<<<<<<<<<<
+ * yield term
+ * elif expr.__class__ is LinearExpression or expr.__class__ is _MutableLinearExpression:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2824
+ * for term in _decompose_linear_terms(arg, multiplier):
+ * yield term
+ * elif expr.__class__ is NegationExpression: # <<<<<<<<<<<<<<
+ * for term in _decompose_linear_terms(expr._args_[0], -multiplier):
+ * yield term
+ */
+ goto __pyx_L4;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2827
+ * for term in _decompose_linear_terms(expr._args_[0], -multiplier):
+ * yield term
+ * elif expr.__class__ is LinearExpression or expr.__class__ is _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * if expr.constant.__class__ in native_numeric_types and not isclose(expr.constant,0):
+ * yield (multiplier*expr.constant,None)
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearExpression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_1 = (__pyx_t_3 == __pyx_t_10);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_5 = (__pyx_t_1 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_4 = __pyx_t_5;
+ goto __pyx_L25_bool_binop_done;
+ }
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_class); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableLinearExpression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = (__pyx_t_10 == __pyx_t_3);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = (__pyx_t_5 != 0);
+ __pyx_t_4 = __pyx_t_1;
+ __pyx_L25_bool_binop_done:;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2828
+ * yield term
+ * elif expr.__class__ is LinearExpression or expr.__class__ is _MutableLinearExpression:
+ * if expr.constant.__class__ in native_numeric_types and not isclose(expr.constant,0): # <<<<<<<<<<<<<<
+ * yield (multiplier*expr.constant,None)
+ * if len(expr.linear_coefs) > 0:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_10, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 2828, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_1 != 0);
+ if (__pyx_t_5) {
+ } else {
+ __pyx_t_4 = __pyx_t_5;
+ goto __pyx_L28_bool_binop_done;
+ }
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_constant); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_2 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_8, __pyx_int_0};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2828, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_8, __pyx_int_0};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2828, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_2) {
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_9, __pyx_t_8);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_9, __pyx_int_0);
+ __pyx_t_8 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 2828, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = ((!__pyx_t_5) != 0);
+ __pyx_t_4 = __pyx_t_1;
+ __pyx_L28_bool_binop_done:;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2829
+ * elif expr.__class__ is LinearExpression or expr.__class__ is _MutableLinearExpression:
+ * if expr.constant.__class__ in native_numeric_types and not isclose(expr.constant,0):
+ * yield (multiplier*expr.constant,None) # <<<<<<<<<<<<<<
+ * if len(expr.linear_coefs) > 0:
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2829, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_multiplier, __pyx_t_3); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2829, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2829, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_10);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, Py_None);
+ __pyx_t_10 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 6;
+ return __pyx_r;
+ __pyx_L30_resume_from_yield:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2829, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2828
+ * yield term
+ * elif expr.__class__ is LinearExpression or expr.__class__ is _MutableLinearExpression:
+ * if expr.constant.__class__ in native_numeric_types and not isclose(expr.constant,0): # <<<<<<<<<<<<<<
+ * yield (multiplier*expr.constant,None)
+ * if len(expr.linear_coefs) > 0:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2830
+ * if expr.constant.__class__ in native_numeric_types and not isclose(expr.constant,0):
+ * yield (multiplier*expr.constant,None)
+ * if len(expr.linear_coefs) > 0: # <<<<<<<<<<<<<<
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ * yield (multiplier*c,v)
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2830, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_11 = PyObject_Length(__pyx_t_3); if (unlikely(__pyx_t_11 == ((Py_ssize_t)-1))) __PYX_ERR(0, 2830, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = ((__pyx_t_11 > 0) != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2831
+ * yield (multiplier*expr.constant,None)
+ * if len(expr.linear_coefs) > 0:
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars): # <<<<<<<<<<<<<<
+ * yield (multiplier*c,v)
+ * else:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_10 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_expr, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_t_10);
+ __pyx_t_3 = 0;
+ __pyx_t_10 = 0;
+ __pyx_t_10 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_7, NULL); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_10)) || PyTuple_CheckExact(__pyx_t_10)) {
+ __pyx_t_7 = __pyx_t_10; __Pyx_INCREF(__pyx_t_7); __pyx_t_11 = 0;
+ __pyx_t_12 = NULL;
+ } else {
+ __pyx_t_11 = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_12 = Py_TYPE(__pyx_t_7)->tp_iternext; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2831, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_12)) {
+ if (likely(PyList_CheckExact(__pyx_t_7))) {
+ if (__pyx_t_11 >= PyList_GET_SIZE(__pyx_t_7)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_10 = PyList_GET_ITEM(__pyx_t_7, __pyx_t_11); __Pyx_INCREF(__pyx_t_10); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 2831, __pyx_L1_error)
+ #else
+ __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ #endif
+ } else {
+ if (__pyx_t_11 >= PyTuple_GET_SIZE(__pyx_t_7)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_10 = PyTuple_GET_ITEM(__pyx_t_7, __pyx_t_11); __Pyx_INCREF(__pyx_t_10); __pyx_t_11++; if (unlikely(0 < 0)) __PYX_ERR(0, 2831, __pyx_L1_error)
+ #else
+ __pyx_t_10 = PySequence_ITEM(__pyx_t_7, __pyx_t_11); __pyx_t_11++; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ #endif
+ }
+ } else {
+ __pyx_t_10 = __pyx_t_12(__pyx_t_7);
+ if (unlikely(!__pyx_t_10)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 2831, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_10);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_10))) || (PyList_CheckExact(__pyx_t_10))) {
+ PyObject* sequence = __pyx_t_10;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 2831, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_8);
+ #else
+ __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 2831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_2 = PyObject_GetIter(__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_15 = Py_TYPE(__pyx_t_2)->tp_iternext;
+ index = 0; __pyx_t_3 = __pyx_t_15(__pyx_t_2); if (unlikely(!__pyx_t_3)) goto __pyx_L34_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ index = 1; __pyx_t_8 = __pyx_t_15(__pyx_t_2); if (unlikely(!__pyx_t_8)) goto __pyx_L34_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_15(__pyx_t_2), 2) < 0) __PYX_ERR(0, 2831, __pyx_L1_error)
+ __pyx_t_15 = NULL;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L35_unpacking_done;
+ __pyx_L34_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_15 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 2831, __pyx_L1_error)
+ __pyx_L35_unpacking_done:;
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_c);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_c, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_v);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_v, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_8);
+ __pyx_t_8 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2832
+ * if len(expr.linear_coefs) > 0:
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ * yield (multiplier*c,v) # <<<<<<<<<<<<<<
+ * else:
+ * raise LinearDecompositionError("Unexpected nonlinear term") #pragma: no cover
+ */
+ __pyx_t_10 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_multiplier, __pyx_cur_scope->__pyx_v_c); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2832, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2832, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_v);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_v);
+ PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_cur_scope->__pyx_v_v);
+ __pyx_t_10 = 0;
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_7;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_11;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_12;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 7;
+ return __pyx_r;
+ __pyx_L36_resume_from_yield:;
+ __pyx_t_7 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_7);
+ __pyx_t_11 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_12 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 2832, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2831
+ * yield (multiplier*expr.constant,None)
+ * if len(expr.linear_coefs) > 0:
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars): # <<<<<<<<<<<<<<
+ * yield (multiplier*c,v)
+ * else:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2830
+ * if expr.constant.__class__ in native_numeric_types and not isclose(expr.constant,0):
+ * yield (multiplier*expr.constant,None)
+ * if len(expr.linear_coefs) > 0: # <<<<<<<<<<<<<<
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ * yield (multiplier*c,v)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2827
+ * for term in _decompose_linear_terms(expr._args_[0], -multiplier):
+ * yield term
+ * elif expr.__class__ is LinearExpression or expr.__class__ is _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * if expr.constant.__class__ in native_numeric_types and not isclose(expr.constant,0):
+ * yield (multiplier*expr.constant,None)
+ */
+ goto __pyx_L4;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2834
+ * yield (multiplier*c,v)
+ * else:
+ * raise LinearDecompositionError("Unexpected nonlinear term") #pragma: no cover # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ /*else*/ {
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearDecompositionError); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 2834, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2834, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_Raise(__pyx_t_8, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __PYX_ERR(0, 2834, __pyx_L1_error)
+ }
+ __pyx_L4:;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2787
+ *
+ *
+ * def _decompose_linear_terms(expr, multiplier=1): # <<<<<<<<<<<<<<
+ * """
+ * A generator function that yields tuples for the linear terms
+ */
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_AddTraceback("_decompose_linear_terms", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2837
+ *
+ *
+ * def _process_arg(obj): # <<<<<<<<<<<<<<
+ * #if False and obj.__class__ is ViewSumExpression or obj.__class__ is _MutableViewSumExpression:
+ * # if ignore_entangled_expressions.detangle[-1] and obj._is_owned:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_33_process_arg(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_33_process_arg = {"_process_arg", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_33_process_arg, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_33_process_arg(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_process_arg (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_32_process_arg(__pyx_self, ((PyObject *)__pyx_v_obj));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_32_process_arg(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ __Pyx_RefNannySetupContext("_process_arg", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2853
+ * # return obj
+ *
+ * if obj.__class__ is NumericConstant: # <<<<<<<<<<<<<<
+ * return value(obj)
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2853, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NumericConstant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2853, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__pyx_t_1 == __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2854
+ *
+ * if obj.__class__ is NumericConstant:
+ * return value(obj) # <<<<<<<<<<<<<<
+ *
+ * if (obj.__class__ is _ParamData or obj.__class__ is SimpleParam) and not obj._component()._mutable:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2854, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2854, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2854, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_obj};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2854, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 2854, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_obj);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2854, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2853
+ * # return obj
+ *
+ * if obj.__class__ is NumericConstant: # <<<<<<<<<<<<<<
+ * return value(obj)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2856
+ * return value(obj)
+ *
+ * if (obj.__class__ is _ParamData or obj.__class__ is SimpleParam) and not obj._component()._mutable: # <<<<<<<<<<<<<<
+ * if not obj._constructed:
+ * return obj
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2856, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ParamData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2856, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = (__pyx_t_2 == __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_7 = (__pyx_t_3 != 0);
+ if (!__pyx_t_7) {
+ } else {
+ goto __pyx_L6_next_and;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2856, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SimpleParam); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2856, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = (__pyx_t_1 == __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_7 != 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_4 = __pyx_t_3;
+ goto __pyx_L5_bool_binop_done;
+ }
+ __pyx_L6_next_and:;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_component); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2856, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2856, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2856, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_mutable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2856, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2856, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_7 = ((!__pyx_t_3) != 0);
+ __pyx_t_4 = __pyx_t_7;
+ __pyx_L5_bool_binop_done:;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2857
+ *
+ * if (obj.__class__ is _ParamData or obj.__class__ is SimpleParam) and not obj._component()._mutable:
+ * if not obj._constructed: # <<<<<<<<<<<<<<
+ * return obj
+ * return obj()
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_constructed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2857, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2857, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_7 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2858
+ * if (obj.__class__ is _ParamData or obj.__class__ is SimpleParam) and not obj._component()._mutable:
+ * if not obj._constructed:
+ * return obj # <<<<<<<<<<<<<<
+ * return obj()
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_obj);
+ __pyx_r = __pyx_v_obj;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2857
+ *
+ * if (obj.__class__ is _ParamData or obj.__class__ is SimpleParam) and not obj._component()._mutable:
+ * if not obj._constructed: # <<<<<<<<<<<<<<
+ * return obj
+ * return obj()
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2859
+ * if not obj._constructed:
+ * return obj
+ * return obj() # <<<<<<<<<<<<<<
+ *
+ * if obj.is_indexed():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_obj);
+ __pyx_t_2 = __pyx_v_obj; __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2859, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2859, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2856
+ * return value(obj)
+ *
+ * if (obj.__class__ is _ParamData or obj.__class__ is SimpleParam) and not obj._component()._mutable: # <<<<<<<<<<<<<<
+ * if not obj._constructed:
+ * return obj
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2861
+ * return obj()
+ *
+ * if obj.is_indexed(): # <<<<<<<<<<<<<<
+ * raise TypeError(
+ * "Argument for expression is an indexed numeric "
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_is_indexed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2861, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2861, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2861, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 2861, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2866
+ * "value\nspecified without an index:\n\t%s\nIs this "
+ * "value defined over an index that you did not specify?"
+ * % (obj.name, ) ) # <<<<<<<<<<<<<<
+ *
+ * return obj
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Argument_for_expression_is_an_in, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2862
+ *
+ * if obj.is_indexed():
+ * raise TypeError( # <<<<<<<<<<<<<<
+ * "Argument for expression is an indexed numeric "
+ * "value\nspecified without an index:\n\t%s\nIs this "
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2862, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2862, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 2862, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2861
+ * return obj()
+ *
+ * if obj.is_indexed(): # <<<<<<<<<<<<<<
+ * raise TypeError(
+ * "Argument for expression is an indexed numeric "
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2868
+ * % (obj.name, ) )
+ *
+ * return obj # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_obj);
+ __pyx_r = __pyx_v_obj;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2837
+ *
+ *
+ * def _process_arg(obj): # <<<<<<<<<<<<<<
+ * #if False and obj.__class__ is ViewSumExpression or obj.__class__ is _MutableViewSumExpression:
+ * # if ignore_entangled_expressions.detangle[-1] and obj._is_owned:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._process_arg", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":2872
+ *
+ * #@profile
+ * def _generate_sum_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ *
+ * if etype > _inplace:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_35_generate_sum_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_35_generate_sum_expression = {"_generate_sum_expression", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_35_generate_sum_expression, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_35_generate_sum_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_etype = 0;
+ PyObject *__pyx_v__self = 0;
+ PyObject *__pyx_v__other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_generate_sum_expression (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_self_2,&__pyx_n_s_other,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_sum_expression", 1, 3, 3, 1); __PYX_ERR(0, 2872, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_sum_expression", 1, 3, 3, 2); __PYX_ERR(0, 2872, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_generate_sum_expression") < 0)) __PYX_ERR(0, 2872, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_etype = values[0];
+ __pyx_v__self = values[1];
+ __pyx_v__other = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_generate_sum_expression", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 2872, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._generate_sum_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_34_generate_sum_expression(__pyx_self, __pyx_v_etype, __pyx_v__self, __pyx_v__other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_34_generate_sum_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_etype, PyObject *__pyx_v__self, PyObject *__pyx_v__other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ int __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ __Pyx_RefNannySetupContext("_generate_sum_expression", 0);
+ __Pyx_INCREF(__pyx_v_etype);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2874
+ * def _generate_sum_expression(etype, _self, _other):
+ *
+ * if etype > _inplace: # <<<<<<<<<<<<<<
+ * etype -= _inplace
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_inplace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2874, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2874, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2874, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2875
+ *
+ * if etype > _inplace:
+ * etype -= _inplace # <<<<<<<<<<<<<<
+ *
+ * if _self.__class__ is _MutableLinearExpression:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_inplace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2875, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_etype, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2875, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_etype, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2874
+ * def _generate_sum_expression(etype, _self, _other):
+ *
+ * if etype > _inplace: # <<<<<<<<<<<<<<
+ * etype -= _inplace
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2877
+ * etype -= _inplace
+ *
+ * if _self.__class__ is _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * try:
+ * if etype >= _unary:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2877, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableLinearExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2877, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__pyx_t_1 == __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2878
+ *
+ * if _self.__class__ is _MutableLinearExpression:
+ * try: # <<<<<<<<<<<<<<
+ * if etype >= _unary:
+ * return _self._combine_expr(etype, None)
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2879
+ * if _self.__class__ is _MutableLinearExpression:
+ * try:
+ * if etype >= _unary: # <<<<<<<<<<<<<<
+ * return _self._combine_expr(etype, None)
+ * if _other.__class__ is not _MutableLinearExpression:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_unary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2879, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_2, Py_GE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2879, __pyx_L5_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2879, __pyx_L5_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2880
+ * try:
+ * if etype >= _unary:
+ * return _self._combine_expr(etype, None) # <<<<<<<<<<<<<<
+ * if _other.__class__ is not _MutableLinearExpression:
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_combine_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2880, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_etype, Py_None};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2880, __pyx_L5_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_etype, Py_None};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2880, __pyx_L5_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2880, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_etype);
+ __Pyx_GIVEREF(__pyx_v_etype);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_etype);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, Py_None);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2880, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L9_try_return;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2879
+ * if _self.__class__ is _MutableLinearExpression:
+ * try:
+ * if etype >= _unary: # <<<<<<<<<<<<<<
+ * return _self._combine_expr(etype, None)
+ * if _other.__class__ is not _MutableLinearExpression:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2881
+ * if etype >= _unary:
+ * return _self._combine_expr(etype, None)
+ * if _other.__class__ is not _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ * _other = _process_arg(_other)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2881, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableLinearExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2881, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__pyx_t_1 != __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2882
+ * return _self._combine_expr(etype, None)
+ * if _other.__class__ is not _MutableLinearExpression:
+ * if not (_other.__class__ in native_types or _other.is_expression_type()): # <<<<<<<<<<<<<<
+ * _other = _process_arg(_other)
+ * return _self._combine_expr(etype, _other)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2882, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2882, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2882, __pyx_L5_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_11 = (__pyx_t_4 != 0);
+ if (!__pyx_t_11) {
+ } else {
+ __pyx_t_3 = __pyx_t_11;
+ goto __pyx_L14_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2882, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2882, __pyx_L5_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2882, __pyx_L5_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2882, __pyx_L5_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __pyx_t_11;
+ __pyx_L14_bool_binop_done:;
+ __pyx_t_11 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_11) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2883
+ * if _other.__class__ is not _MutableLinearExpression:
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ * _other = _process_arg(_other) # <<<<<<<<<<<<<<
+ * return _self._combine_expr(etype, _other)
+ * except LinearDecompositionError:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2883, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v__other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2883, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v__other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2883, __pyx_L5_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v__other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2883, __pyx_L5_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2883, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v__other);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2883, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v__other, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2882
+ * return _self._combine_expr(etype, None)
+ * if _other.__class__ is not _MutableLinearExpression:
+ * if not (_other.__class__ in native_types or _other.is_expression_type()): # <<<<<<<<<<<<<<
+ * _other = _process_arg(_other)
+ * return _self._combine_expr(etype, _other)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2881
+ * if etype >= _unary:
+ * return _self._combine_expr(etype, None)
+ * if _other.__class__ is not _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ * _other = _process_arg(_other)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2884
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ * _other = _process_arg(_other)
+ * return _self._combine_expr(etype, _other) # <<<<<<<<<<<<<<
+ * except LinearDecompositionError:
+ * pass
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_combine_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2884, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_etype, __pyx_v__other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2884, __pyx_L5_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_etype, __pyx_v__other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2884, __pyx_L5_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2884, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_etype);
+ __Pyx_GIVEREF(__pyx_v_etype);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_etype);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v__other);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2884, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L9_try_return;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2878
+ *
+ * if _self.__class__ is _MutableLinearExpression:
+ * try: # <<<<<<<<<<<<<<
+ * if etype >= _unary:
+ * return _self._combine_expr(etype, None)
+ */
+ }
+ __pyx_L5_error:;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2885
+ * _other = _process_arg(_other)
+ * return _self._combine_expr(etype, _other)
+ * except LinearDecompositionError: # <<<<<<<<<<<<<<
+ * pass
+ * elif _other.__class__ is _MutableLinearExpression:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearDecompositionError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2885, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_9) {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L6_exception_handled;
+ }
+ goto __pyx_L7_except_error;
+ __pyx_L7_except_error:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2878
+ *
+ * if _self.__class__ is _MutableLinearExpression:
+ * try: # <<<<<<<<<<<<<<
+ * if etype >= _unary:
+ * return _self._combine_expr(etype, None)
+ */
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L1_error;
+ __pyx_L9_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L0;
+ __pyx_L6_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2877
+ * etype -= _inplace
+ *
+ * if _self.__class__ is _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * try:
+ * if etype >= _unary:
+ */
+ goto __pyx_L4;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2887
+ * except LinearDecompositionError:
+ * pass
+ * elif _other.__class__ is _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * try:
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2887, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableLinearExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2887, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_11 = (__pyx_t_1 == __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_11 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2888
+ * pass
+ * elif _other.__class__ is _MutableLinearExpression:
+ * try: # <<<<<<<<<<<<<<
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ * _self = _process_arg(_self)
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_5);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2889
+ * elif _other.__class__ is _MutableLinearExpression:
+ * try:
+ * if not (_self.__class__ in native_types or _self.is_expression_type()): # <<<<<<<<<<<<<<
+ * _self = _process_arg(_self)
+ * return _other._combine_expr(-etype, _self)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2889, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2889, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2889, __pyx_L16_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = (__pyx_t_11 != 0);
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __pyx_t_4;
+ goto __pyx_L23_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2889, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2889, __pyx_L16_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2889, __pyx_L16_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2889, __pyx_L16_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __pyx_t_4;
+ __pyx_L23_bool_binop_done:;
+ __pyx_t_4 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2890
+ * try:
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ * _self = _process_arg(_self) # <<<<<<<<<<<<<<
+ * return _other._combine_expr(-etype, _self)
+ * except LinearDecompositionError:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2890, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v__self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2890, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v__self};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2890, __pyx_L16_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v__self};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2890, __pyx_L16_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2890, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v__self);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2890, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v__self, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2889
+ * elif _other.__class__ is _MutableLinearExpression:
+ * try:
+ * if not (_self.__class__ in native_types or _self.is_expression_type()): # <<<<<<<<<<<<<<
+ * _self = _process_arg(_self)
+ * return _other._combine_expr(-etype, _self)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2891
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ * _self = _process_arg(_self)
+ * return _other._combine_expr(-etype, _self) # <<<<<<<<<<<<<<
+ * except LinearDecompositionError:
+ * pass
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_combine_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2891, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = PyNumber_Negative(__pyx_v_etype); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2891, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_v__self};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2891, __pyx_L16_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_t_8, __pyx_v__self};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2891, __pyx_L16_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2891, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (__pyx_t_10) {
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_9, __pyx_t_8);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_9, __pyx_v__self);
+ __pyx_t_8 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2891, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L20_try_return;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2888
+ * pass
+ * elif _other.__class__ is _MutableLinearExpression:
+ * try: # <<<<<<<<<<<<<<
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ * _self = _process_arg(_self)
+ */
+ }
+ __pyx_L16_error:;
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2892
+ * _self = _process_arg(_self)
+ * return _other._combine_expr(-etype, _self)
+ * except LinearDecompositionError: # <<<<<<<<<<<<<<
+ * pass
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearDecompositionError); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2892, __pyx_L18_except_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_9) {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L17_exception_handled;
+ }
+ goto __pyx_L18_except_error;
+ __pyx_L18_except_error:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2888
+ * pass
+ * elif _other.__class__ is _MutableLinearExpression:
+ * try: # <<<<<<<<<<<<<<
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ * _self = _process_arg(_self)
+ */
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
+ goto __pyx_L1_error;
+ __pyx_L20_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
+ goto __pyx_L0;
+ __pyx_L17_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2887
+ * except LinearDecompositionError:
+ * pass
+ * elif _other.__class__ is _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * try:
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ */
+ }
+ __pyx_L4:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2899
+ * # need to process it to see if it's entangled.
+ * #
+ * if not (_self.__class__ in native_types or _self.is_expression_type()): # <<<<<<<<<<<<<<
+ * _self = _process_arg(_self)
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2899, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2899, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2899, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_11 = (__pyx_t_3 != 0);
+ if (!__pyx_t_11) {
+ } else {
+ __pyx_t_4 = __pyx_t_11;
+ goto __pyx_L26_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2899, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2899, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2899, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2899, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __pyx_t_11;
+ __pyx_L26_bool_binop_done:;
+ __pyx_t_11 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_11) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2900
+ * #
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ * _self = _process_arg(_self) # <<<<<<<<<<<<<<
+ *
+ * if etype == _neg:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2900, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v__self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2900, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v__self};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2900, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v__self};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2900, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2900, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_v__self);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2900, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v__self, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2899
+ * # need to process it to see if it's entangled.
+ * #
+ * if not (_self.__class__ in native_types or _self.is_expression_type()): # <<<<<<<<<<<<<<
+ * _self = _process_arg(_self)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2902
+ * _self = _process_arg(_self)
+ *
+ * if etype == _neg: # <<<<<<<<<<<<<<
+ * if _self.__class__ in native_numeric_types:
+ * return - _self
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_neg_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2902, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2902, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2902, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_11) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2903
+ *
+ * if etype == _neg:
+ * if _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return - _self
+ * elif _self.is_potentially_variable():
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2903, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2903, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2903, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_11 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2904
+ * if etype == _neg:
+ * if _self.__class__ in native_numeric_types:
+ * return - _self # <<<<<<<<<<<<<<
+ * elif _self.is_potentially_variable():
+ * if _self.__class__ is NegationExpression:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyNumber_Negative(__pyx_v__self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2904, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2903
+ *
+ * if etype == _neg:
+ * if _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return - _self
+ * elif _self.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2905
+ * if _self.__class__ in native_numeric_types:
+ * return - _self
+ * elif _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if _self.__class__ is NegationExpression:
+ * return _self._args_[0]
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2905, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2905, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2905, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2905, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2906
+ * return - _self
+ * elif _self.is_potentially_variable():
+ * if _self.__class__ is NegationExpression: # <<<<<<<<<<<<<<
+ * return _self._args_[0]
+ * return NegationExpression((_self,))
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2906, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NegationExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2906, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = (__pyx_t_2 == __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_11 = (__pyx_t_4 != 0);
+ if (__pyx_t_11) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2907
+ * elif _self.is_potentially_variable():
+ * if _self.__class__ is NegationExpression:
+ * return _self._args_[0] # <<<<<<<<<<<<<<
+ * return NegationExpression((_self,))
+ * else:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2907, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2907, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2906
+ * return - _self
+ * elif _self.is_potentially_variable():
+ * if _self.__class__ is NegationExpression: # <<<<<<<<<<<<<<
+ * return _self._args_[0]
+ * return NegationExpression((_self,))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2908
+ * if _self.__class__ is NegationExpression:
+ * return _self._args_[0]
+ * return NegationExpression((_self,)) # <<<<<<<<<<<<<<
+ * else:
+ * if _self.__class__ is NPV_NegationExpression:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NegationExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2908, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2908, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v__self);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2908, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2908, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2908, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2908, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2908, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2905
+ * if _self.__class__ in native_numeric_types:
+ * return - _self
+ * elif _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if _self.__class__ is NegationExpression:
+ * return _self._args_[0]
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2910
+ * return NegationExpression((_self,))
+ * else:
+ * if _self.__class__ is NPV_NegationExpression: # <<<<<<<<<<<<<<
+ * return _self._args_[0]
+ * return NPV_NegationExpression((_self,))
+ */
+ /*else*/ {
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2910, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_NegationExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2910, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = (__pyx_t_2 == __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = (__pyx_t_11 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2911
+ * else:
+ * if _self.__class__ is NPV_NegationExpression:
+ * return _self._args_[0] # <<<<<<<<<<<<<<
+ * return NPV_NegationExpression((_self,))
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_args_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2911, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2911, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2910
+ * return NegationExpression((_self,))
+ * else:
+ * if _self.__class__ is NPV_NegationExpression: # <<<<<<<<<<<<<<
+ * return _self._args_[0]
+ * return NPV_NegationExpression((_self,))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2912
+ * if _self.__class__ is NPV_NegationExpression:
+ * return _self._args_[0]
+ * return NPV_NegationExpression((_self,)) # <<<<<<<<<<<<<<
+ *
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_NegationExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2912, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2912, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2912, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2912, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2912, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2912, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2912, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2902
+ * _self = _process_arg(_self)
+ *
+ * if etype == _neg: # <<<<<<<<<<<<<<
+ * if _self.__class__ in native_numeric_types:
+ * return - _self
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2914
+ * return NPV_NegationExpression((_self,))
+ *
+ * if not (_other.__class__ in native_types or _other.is_expression_type()): # <<<<<<<<<<<<<<
+ * _other = _process_arg(_other)
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2914, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2914, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2914, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = (__pyx_t_11 != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_4 = __pyx_t_3;
+ goto __pyx_L33_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2914, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2914, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2914, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2914, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __pyx_t_3;
+ __pyx_L33_bool_binop_done:;
+ __pyx_t_3 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2915
+ *
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ * _other = _process_arg(_other) # <<<<<<<<<<<<<<
+ *
+ * if etype < 0:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v__other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v__other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2915, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v__other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2915, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v__other);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v__other, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2914
+ * return NPV_NegationExpression((_self,))
+ *
+ * if not (_other.__class__ in native_types or _other.is_expression_type()): # <<<<<<<<<<<<<<
+ * _other = _process_arg(_other)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2917
+ * _other = _process_arg(_other)
+ *
+ * if etype < 0: # <<<<<<<<<<<<<<
+ * #
+ * # This may seem obvious, but if we are performing an
+ */
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_etype, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2917, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2917, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2924
+ * # completely new expression here.
+ * #
+ * etype *= -1 # <<<<<<<<<<<<<<
+ * _self, _other = _other, _self
+ *
+ */
+ __pyx_t_1 = PyNumber_InPlaceMultiply(__pyx_v_etype, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2924, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_etype, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2925
+ * #
+ * etype *= -1
+ * _self, _other = _other, _self # <<<<<<<<<<<<<<
+ *
+ * if etype == _add:
+ */
+ __pyx_t_5 = __pyx_v__other;
+ __pyx_t_6 = __pyx_v__self;
+ __pyx_v__self = __pyx_t_5;
+ __pyx_t_5 = 0;
+ __pyx_v__other = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2917
+ * _other = _process_arg(_other)
+ *
+ * if etype < 0: # <<<<<<<<<<<<<<
+ * #
+ * # This may seem obvious, but if we are performing an
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2927
+ * _self, _other = _other, _self
+ *
+ * if etype == _add: # <<<<<<<<<<<<<<
+ * #
+ * # x + y
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_add_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2927, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2927, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2927, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2931
+ * # x + y
+ * #
+ * if (_self.__class__ is ViewSumExpression and not _self._shared_args) or \ # <<<<<<<<<<<<<<
+ * _self.__class__ is _MutableViewSumExpression:
+ * return _self.add(_other)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2931, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2931, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = (__pyx_t_2 == __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_11 = (__pyx_t_4 != 0);
+ if (!__pyx_t_11) {
+ goto __pyx_L39_next_or;
+ } else {
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_shared_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2931, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2931, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = ((!__pyx_t_11) != 0);
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __pyx_t_4;
+ goto __pyx_L38_bool_binop_done;
+ }
+ __pyx_L39_next_or:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2932
+ * #
+ * if (_self.__class__ is ViewSumExpression and not _self._shared_args) or \
+ * _self.__class__ is _MutableViewSumExpression: # <<<<<<<<<<<<<<
+ * return _self.add(_other)
+ * elif (_other.__class__ is ViewSumExpression and not _other._shared_args) or \
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2932, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2932, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__pyx_t_1 == __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_11 = (__pyx_t_4 != 0);
+ __pyx_t_3 = __pyx_t_11;
+ __pyx_L38_bool_binop_done:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2931
+ * # x + y
+ * #
+ * if (_self.__class__ is ViewSumExpression and not _self._shared_args) or \ # <<<<<<<<<<<<<<
+ * _self.__class__ is _MutableViewSumExpression:
+ * return _self.add(_other)
+ */
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2933
+ * if (_self.__class__ is ViewSumExpression and not _self._shared_args) or \
+ * _self.__class__ is _MutableViewSumExpression:
+ * return _self.add(_other) # <<<<<<<<<<<<<<
+ * elif (_other.__class__ is ViewSumExpression and not _other._shared_args) or \
+ * _other.__class__ is _MutableViewSumExpression:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2933, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v__other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2933, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v__other};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2933, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v__other};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2933, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2933, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v__other);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2933, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2931
+ * # x + y
+ * #
+ * if (_self.__class__ is ViewSumExpression and not _self._shared_args) or \ # <<<<<<<<<<<<<<
+ * _self.__class__ is _MutableViewSumExpression:
+ * return _self.add(_other)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2934
+ * _self.__class__ is _MutableViewSumExpression:
+ * return _self.add(_other)
+ * elif (_other.__class__ is ViewSumExpression and not _other._shared_args) or \ # <<<<<<<<<<<<<<
+ * _other.__class__ is _MutableViewSumExpression:
+ * return _other.add(_self)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2934, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2934, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = (__pyx_t_2 == __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = (__pyx_t_11 != 0);
+ if (!__pyx_t_4) {
+ goto __pyx_L42_next_or;
+ } else {
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_shared_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2934, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2934, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_11 = ((!__pyx_t_4) != 0);
+ if (!__pyx_t_11) {
+ } else {
+ __pyx_t_3 = __pyx_t_11;
+ goto __pyx_L41_bool_binop_done;
+ }
+ __pyx_L42_next_or:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2935
+ * return _self.add(_other)
+ * elif (_other.__class__ is ViewSumExpression and not _other._shared_args) or \
+ * _other.__class__ is _MutableViewSumExpression: # <<<<<<<<<<<<<<
+ * return _other.add(_self)
+ * elif _other.__class__ in native_numeric_types:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2935, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2935, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_11 = (__pyx_t_1 == __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_11 != 0);
+ __pyx_t_3 = __pyx_t_4;
+ __pyx_L41_bool_binop_done:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2934
+ * _self.__class__ is _MutableViewSumExpression:
+ * return _self.add(_other)
+ * elif (_other.__class__ is ViewSumExpression and not _other._shared_args) or \ # <<<<<<<<<<<<<<
+ * _other.__class__ is _MutableViewSumExpression:
+ * return _other.add(_self)
+ */
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2936
+ * elif (_other.__class__ is ViewSumExpression and not _other._shared_args) or \
+ * _other.__class__ is _MutableViewSumExpression:
+ * return _other.add(_self) # <<<<<<<<<<<<<<
+ * elif _other.__class__ in native_numeric_types:
+ * if _self.__class__ in native_numeric_types:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2936, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v__self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2936, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v__self};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2936, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v__self};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2936, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2936, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v__self);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2936, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2934
+ * _self.__class__ is _MutableViewSumExpression:
+ * return _self.add(_other)
+ * elif (_other.__class__ is ViewSumExpression and not _other._shared_args) or \ # <<<<<<<<<<<<<<
+ * _other.__class__ is _MutableViewSumExpression:
+ * return _other.add(_self)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2937
+ * _other.__class__ is _MutableViewSumExpression:
+ * return _other.add(_self)
+ * elif _other.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _self.__class__ in native_numeric_types:
+ * return _self + _other
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2937, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2937, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2937, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2938
+ * return _other.add(_self)
+ * elif _other.__class__ in native_numeric_types:
+ * if _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return _self + _other
+ * elif _other == 0: #isclose(_other, 0):
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2938, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2938, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2938, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2939
+ * elif _other.__class__ in native_numeric_types:
+ * if _self.__class__ in native_numeric_types:
+ * return _self + _other # <<<<<<<<<<<<<<
+ * elif _other == 0: #isclose(_other, 0):
+ * return _self
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyNumber_Add(__pyx_v__self, __pyx_v__other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2939, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2938
+ * return _other.add(_self)
+ * elif _other.__class__ in native_numeric_types:
+ * if _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return _self + _other
+ * elif _other == 0: #isclose(_other, 0):
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2940
+ * if _self.__class__ in native_numeric_types:
+ * return _self + _other
+ * elif _other == 0: #isclose(_other, 0): # <<<<<<<<<<<<<<
+ * return _self
+ * if _self.is_potentially_variable():
+ */
+ __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v__other, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2940, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2940, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2941
+ * return _self + _other
+ * elif _other == 0: #isclose(_other, 0):
+ * return _self # <<<<<<<<<<<<<<
+ * if _self.is_potentially_variable():
+ * return ViewSumExpression([_self, _other])
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v__self);
+ __pyx_r = __pyx_v__self;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2940
+ * if _self.__class__ in native_numeric_types:
+ * return _self + _other
+ * elif _other == 0: #isclose(_other, 0): # <<<<<<<<<<<<<<
+ * return _self
+ * if _self.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2942
+ * elif _other == 0: #isclose(_other, 0):
+ * return _self
+ * if _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ViewSumExpression([_self, _other])
+ * return NPV_SumExpression((_self, _other))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2942, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_10) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2942, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2942, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2942, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2943
+ * return _self
+ * if _self.is_potentially_variable():
+ * return ViewSumExpression([_self, _other]) # <<<<<<<<<<<<<<
+ * return NPV_SumExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2943, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2943, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyList_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyList_SET_ITEM(__pyx_t_10, 1, __pyx_v__other);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2943, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2943, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2943, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2943, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2943, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2942
+ * elif _other == 0: #isclose(_other, 0):
+ * return _self
+ * if _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ViewSumExpression([_self, _other])
+ * return NPV_SumExpression((_self, _other))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2944
+ * if _self.is_potentially_variable():
+ * return ViewSumExpression([_self, _other])
+ * return NPV_SumExpression((_self, _other)) # <<<<<<<<<<<<<<
+ * elif _self.__class__ in native_numeric_types:
+ * if _self == 0: #isclose(_self, 0):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_SumExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2944, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2944, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_v__other);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2944, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2944, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2944, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2944, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2944, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2937
+ * _other.__class__ is _MutableViewSumExpression:
+ * return _other.add(_self)
+ * elif _other.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _self.__class__ in native_numeric_types:
+ * return _self + _other
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2945
+ * return ViewSumExpression([_self, _other])
+ * return NPV_SumExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _self == 0: #isclose(_self, 0):
+ * return _other
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2945, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2945, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 2945, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2946
+ * return NPV_SumExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types:
+ * if _self == 0: #isclose(_self, 0): # <<<<<<<<<<<<<<
+ * return _other
+ * if _other.is_potentially_variable():
+ */
+ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v__self, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2946, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2946, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2947
+ * elif _self.__class__ in native_numeric_types:
+ * if _self == 0: #isclose(_self, 0):
+ * return _other # <<<<<<<<<<<<<<
+ * if _other.is_potentially_variable():
+ * #return _LinearViewSumExpression((_self, _other))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v__other);
+ __pyx_r = __pyx_v__other;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2946
+ * return NPV_SumExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types:
+ * if _self == 0: #isclose(_self, 0): # <<<<<<<<<<<<<<
+ * return _other
+ * if _other.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2948
+ * if _self == 0: #isclose(_self, 0):
+ * return _other
+ * if _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * #return _LinearViewSumExpression((_self, _other))
+ * return ViewSumExpression([_self, _other])
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2948, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2948, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2948, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2948, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2950
+ * if _other.is_potentially_variable():
+ * #return _LinearViewSumExpression((_self, _other))
+ * return ViewSumExpression([_self, _other]) # <<<<<<<<<<<<<<
+ * return NPV_SumExpression((_self, _other))
+ * elif _other.is_potentially_variable():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2950, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = PyList_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2950, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyList_SET_ITEM(__pyx_t_12, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyList_SET_ITEM(__pyx_t_12, 1, __pyx_v__other);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2950, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2950, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2950, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2950, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2950, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2948
+ * if _self == 0: #isclose(_self, 0):
+ * return _other
+ * if _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * #return _LinearViewSumExpression((_self, _other))
+ * return ViewSumExpression([_self, _other])
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2951
+ * #return _LinearViewSumExpression((_self, _other))
+ * return ViewSumExpression([_self, _other])
+ * return NPV_SumExpression((_self, _other)) # <<<<<<<<<<<<<<
+ * elif _other.is_potentially_variable():
+ * #return _LinearViewSumExpression((_self, _other))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_SumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2951, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2951, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v__other);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2951, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2951, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2951, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2951, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2951, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2945
+ * return ViewSumExpression([_self, _other])
+ * return NPV_SumExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _self == 0: #isclose(_self, 0):
+ * return _other
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2952
+ * return ViewSumExpression([_self, _other])
+ * return NPV_SumExpression((_self, _other))
+ * elif _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * #return _LinearViewSumExpression((_self, _other))
+ * return ViewSumExpression([_self, _other])
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2952, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2952, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2952, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2952, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2954
+ * elif _other.is_potentially_variable():
+ * #return _LinearViewSumExpression((_self, _other))
+ * return ViewSumExpression([_self, _other]) # <<<<<<<<<<<<<<
+ * elif _self.is_potentially_variable():
+ * #return _LinearViewSumExpression((_other, _self))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2954, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = PyList_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2954, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyList_SET_ITEM(__pyx_t_8, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyList_SET_ITEM(__pyx_t_8, 1, __pyx_v__other);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2954, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_8};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2954, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_8};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2954, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2954, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2954, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2952
+ * return ViewSumExpression([_self, _other])
+ * return NPV_SumExpression((_self, _other))
+ * elif _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * #return _LinearViewSumExpression((_self, _other))
+ * return ViewSumExpression([_self, _other])
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2955
+ * #return _LinearViewSumExpression((_self, _other))
+ * return ViewSumExpression([_self, _other])
+ * elif _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * #return _LinearViewSumExpression((_other, _self))
+ * #return ViewSumExpression([_other, _self])
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2955, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2955, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2955, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2955, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2958
+ * #return _LinearViewSumExpression((_other, _self))
+ * #return ViewSumExpression([_other, _self])
+ * return ViewSumExpression([_self, _other]) # <<<<<<<<<<<<<<
+ * else:
+ * return NPV_SumExpression((_self, _other))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = PyList_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyList_SET_ITEM(__pyx_t_12, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyList_SET_ITEM(__pyx_t_12, 1, __pyx_v__other);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2958, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2958, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2958, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2955
+ * #return _LinearViewSumExpression((_self, _other))
+ * return ViewSumExpression([_self, _other])
+ * elif _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * #return _LinearViewSumExpression((_other, _self))
+ * #return ViewSumExpression([_other, _self])
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2960
+ * return ViewSumExpression([_self, _other])
+ * else:
+ * return NPV_SumExpression((_self, _other)) # <<<<<<<<<<<<<<
+ *
+ * elif etype == _sub:
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_SumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2960, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2960, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v__other);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2960, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2960, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2960, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2960, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2960, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2927
+ * _self, _other = _other, _self
+ *
+ * if etype == _add: # <<<<<<<<<<<<<<
+ * #
+ * # x + y
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2962
+ * return NPV_SumExpression((_self, _other))
+ *
+ * elif etype == _sub: # <<<<<<<<<<<<<<
+ * #
+ * # x - y
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_sub); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2962, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2962, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2962, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2966
+ * # x - y
+ * #
+ * if (_self.__class__ is ViewSumExpression and not _self._shared_args) or \ # <<<<<<<<<<<<<<
+ * _self.__class__ is _MutableViewSumExpression:
+ * return _self.add(-_other)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2966, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2966, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = (__pyx_t_2 == __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_11 = (__pyx_t_3 != 0);
+ if (!__pyx_t_11) {
+ goto __pyx_L50_next_or;
+ } else {
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_shared_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2966, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2966, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((!__pyx_t_11) != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_4 = __pyx_t_3;
+ goto __pyx_L49_bool_binop_done;
+ }
+ __pyx_L50_next_or:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2967
+ * #
+ * if (_self.__class__ is ViewSumExpression and not _self._shared_args) or \
+ * _self.__class__ is _MutableViewSumExpression: # <<<<<<<<<<<<<<
+ * return _self.add(-_other)
+ * elif _other.__class__ in native_numeric_types:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2967, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2967, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__pyx_t_1 == __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_11 = (__pyx_t_3 != 0);
+ __pyx_t_4 = __pyx_t_11;
+ __pyx_L49_bool_binop_done:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2966
+ * # x - y
+ * #
+ * if (_self.__class__ is ViewSumExpression and not _self._shared_args) or \ # <<<<<<<<<<<<<<
+ * _self.__class__ is _MutableViewSumExpression:
+ * return _self.add(-_other)
+ */
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2968
+ * if (_self.__class__ is ViewSumExpression and not _self._shared_args) or \
+ * _self.__class__ is _MutableViewSumExpression:
+ * return _self.add(-_other) # <<<<<<<<<<<<<<
+ * elif _other.__class__ in native_numeric_types:
+ * if _self.__class__ in native_numeric_types:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2968, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = PyNumber_Negative(__pyx_v__other); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2968, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2968, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2968, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2968, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2968, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2968, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2966
+ * # x - y
+ * #
+ * if (_self.__class__ is ViewSumExpression and not _self._shared_args) or \ # <<<<<<<<<<<<<<
+ * _self.__class__ is _MutableViewSumExpression:
+ * return _self.add(-_other)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2969
+ * _self.__class__ is _MutableViewSumExpression:
+ * return _self.add(-_other)
+ * elif _other.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _self.__class__ in native_numeric_types:
+ * return _self - _other
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2969, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2969, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2969, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_11 = (__pyx_t_4 != 0);
+ if (__pyx_t_11) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2970
+ * return _self.add(-_other)
+ * elif _other.__class__ in native_numeric_types:
+ * if _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return _self - _other
+ * elif isclose(_other, 0):
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2970, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2970, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2970, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_11 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2971
+ * elif _other.__class__ in native_numeric_types:
+ * if _self.__class__ in native_numeric_types:
+ * return _self - _other # <<<<<<<<<<<<<<
+ * elif isclose(_other, 0):
+ * return _self
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyNumber_Subtract(__pyx_v__self, __pyx_v__other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2971, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2970
+ * return _self.add(-_other)
+ * elif _other.__class__ in native_numeric_types:
+ * if _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return _self - _other
+ * elif isclose(_other, 0):
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2972
+ * if _self.__class__ in native_numeric_types:
+ * return _self - _other
+ * elif isclose(_other, 0): # <<<<<<<<<<<<<<
+ * return _self
+ * if _self.is_potentially_variable():
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2972, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_12 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v__other, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2972, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_12, __pyx_v__other, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2972, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2972, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_12) {
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_v__other);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_int_0);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2972, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2972, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2973
+ * return _self - _other
+ * elif isclose(_other, 0):
+ * return _self # <<<<<<<<<<<<<<
+ * if _self.is_potentially_variable():
+ * #return _LinearViewSumExpression((_self, -_other))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v__self);
+ __pyx_r = __pyx_v__self;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2972
+ * if _self.__class__ in native_numeric_types:
+ * return _self - _other
+ * elif isclose(_other, 0): # <<<<<<<<<<<<<<
+ * return _self
+ * if _self.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2974
+ * elif isclose(_other, 0):
+ * return _self
+ * if _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * #return _LinearViewSumExpression((_self, -_other))
+ * return ViewSumExpression([_self, -_other])
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2974, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2974, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2974, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2974, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2976
+ * if _self.is_potentially_variable():
+ * #return _LinearViewSumExpression((_self, -_other))
+ * return ViewSumExpression([_self, -_other]) # <<<<<<<<<<<<<<
+ * return NPV_SumExpression((_self, -_other))
+ * elif _self.__class__ in native_numeric_types:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2976, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = PyNumber_Negative(__pyx_v__other); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2976, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_12 = PyList_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2976, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyList_SET_ITEM(__pyx_t_12, 0, __pyx_v__self);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyList_SET_ITEM(__pyx_t_12, 1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2976, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_12};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2976, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_12};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2976, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2976, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2976, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2974
+ * elif isclose(_other, 0):
+ * return _self
+ * if _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * #return _LinearViewSumExpression((_self, -_other))
+ * return ViewSumExpression([_self, -_other])
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2977
+ * #return _LinearViewSumExpression((_self, -_other))
+ * return ViewSumExpression([_self, -_other])
+ * return NPV_SumExpression((_self, -_other)) # <<<<<<<<<<<<<<
+ * elif _self.__class__ in native_numeric_types:
+ * if isclose(_self, 0):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_SumExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2977, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = PyNumber_Negative(__pyx_v__other); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2977, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2977, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v__self);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2977, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_12};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2977, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_12};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2977, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2977, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2977, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2969
+ * _self.__class__ is _MutableViewSumExpression:
+ * return _self.add(-_other)
+ * elif _other.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _self.__class__ in native_numeric_types:
+ * return _self - _other
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2978
+ * return ViewSumExpression([_self, -_other])
+ * return NPV_SumExpression((_self, -_other))
+ * elif _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if isclose(_self, 0):
+ * if _other.is_potentially_variable():
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2978, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2978, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 2978, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_11 = (__pyx_t_4 != 0);
+ if (__pyx_t_11) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2979
+ * return NPV_SumExpression((_self, -_other))
+ * elif _self.__class__ in native_numeric_types:
+ * if isclose(_self, 0): # <<<<<<<<<<<<<<
+ * if _other.is_potentially_variable():
+ * return NegationExpression((_other,))
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2979, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v__self, __pyx_int_0};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2979, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v__self, __pyx_int_0};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2979, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2979, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_9, __pyx_v__self);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_9, __pyx_int_0);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2979, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2979, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_11) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2980
+ * elif _self.__class__ in native_numeric_types:
+ * if isclose(_self, 0):
+ * if _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return NegationExpression((_other,))
+ * return NPV_NegationExpression((_other,))
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2980, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2980, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2980, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2980, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_11) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2981
+ * if isclose(_self, 0):
+ * if _other.is_potentially_variable():
+ * return NegationExpression((_other,)) # <<<<<<<<<<<<<<
+ * return NPV_NegationExpression((_other,))
+ * if _other.is_potentially_variable():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NegationExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2981, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2981, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v__other);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2981, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2981, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2981, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2981, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2981, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2980
+ * elif _self.__class__ in native_numeric_types:
+ * if isclose(_self, 0):
+ * if _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return NegationExpression((_other,))
+ * return NPV_NegationExpression((_other,))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2982
+ * if _other.is_potentially_variable():
+ * return NegationExpression((_other,))
+ * return NPV_NegationExpression((_other,)) # <<<<<<<<<<<<<<
+ * if _other.is_potentially_variable():
+ * #return _LinearViewSumExpression((_self, NegationExpression((_other,))))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_NegationExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2982, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2982, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__other);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2982, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2982, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2982, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2982, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2982, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2979
+ * return NPV_SumExpression((_self, -_other))
+ * elif _self.__class__ in native_numeric_types:
+ * if isclose(_self, 0): # <<<<<<<<<<<<<<
+ * if _other.is_potentially_variable():
+ * return NegationExpression((_other,))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2983
+ * return NegationExpression((_other,))
+ * return NPV_NegationExpression((_other,))
+ * if _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * #return _LinearViewSumExpression((_self, NegationExpression((_other,))))
+ * return ViewSumExpression([_self, NegationExpression((_other,))])
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2983, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2983, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2983, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2983, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_11) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2985
+ * if _other.is_potentially_variable():
+ * #return _LinearViewSumExpression((_self, NegationExpression((_other,))))
+ * return ViewSumExpression([_self, NegationExpression((_other,))]) # <<<<<<<<<<<<<<
+ * return NPV_SumExpression((_self, NPV_NegationExpression((_other,))))
+ * elif _other.is_potentially_variable():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_NegationExpression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v__other);
+ __pyx_t_13 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_13);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (!__pyx_t_13) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyList_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2985, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2983
+ * return NegationExpression((_other,))
+ * return NPV_NegationExpression((_other,))
+ * if _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * #return _LinearViewSumExpression((_self, NegationExpression((_other,))))
+ * return ViewSumExpression([_self, NegationExpression((_other,))])
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2986
+ * #return _LinearViewSumExpression((_self, NegationExpression((_other,))))
+ * return ViewSumExpression([_self, NegationExpression((_other,))])
+ * return NPV_SumExpression((_self, NPV_NegationExpression((_other,)))) # <<<<<<<<<<<<<<
+ * elif _other.is_potentially_variable():
+ * #return _LinearViewSumExpression((_self, NegationExpression((_other,))))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_SumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_NegationExpression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v__other);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_8); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_14);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_8};
+ __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_8};
+ __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_14);
+ __pyx_t_14 = 0;
+ __pyx_t_14 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_14)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_14);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_14) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14); __pyx_t_14 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_13, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2986, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2978
+ * return ViewSumExpression([_self, -_other])
+ * return NPV_SumExpression((_self, -_other))
+ * elif _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if isclose(_self, 0):
+ * if _other.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2987
+ * return ViewSumExpression([_self, NegationExpression((_other,))])
+ * return NPV_SumExpression((_self, NPV_NegationExpression((_other,))))
+ * elif _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * #return _LinearViewSumExpression((_self, NegationExpression((_other,))))
+ * return ViewSumExpression([_self, NegationExpression((_other,))])
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2987, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_13 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_13);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_13) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2987, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2987, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2987, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_11) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2989
+ * elif _other.is_potentially_variable():
+ * #return _LinearViewSumExpression((_self, NegationExpression((_other,))))
+ * return ViewSumExpression([_self, NegationExpression((_other,))]) # <<<<<<<<<<<<<<
+ * elif _self.is_potentially_variable():
+ * #return _LinearViewSumExpression((_self, NPV_NegationExpression((_other,))))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_NegationExpression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v__other);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_14};
+ __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_14};
+ __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_14);
+ __pyx_t_14 = 0;
+ __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyList_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_13);
+ __pyx_t_13 = 0;
+ __pyx_t_13 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_13);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_13) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __pyx_t_13 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2989, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2987
+ * return ViewSumExpression([_self, NegationExpression((_other,))])
+ * return NPV_SumExpression((_self, NPV_NegationExpression((_other,))))
+ * elif _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * #return _LinearViewSumExpression((_self, NegationExpression((_other,))))
+ * return ViewSumExpression([_self, NegationExpression((_other,))])
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2990
+ * #return _LinearViewSumExpression((_self, NegationExpression((_other,))))
+ * return ViewSumExpression([_self, NegationExpression((_other,))])
+ * elif _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * #return _LinearViewSumExpression((_self, NPV_NegationExpression((_other,))))
+ * return ViewSumExpression([_self, NPV_NegationExpression((_other,))])
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2990, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2990, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2990, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 2990, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_11) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2992
+ * elif _self.is_potentially_variable():
+ * #return _LinearViewSumExpression((_self, NPV_NegationExpression((_other,))))
+ * return ViewSumExpression([_self, NPV_NegationExpression((_other,))]) # <<<<<<<<<<<<<<
+ * else:
+ * return NPV_SumExpression((_self, NPV_NegationExpression((_other,))))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_NegationExpression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v__other);
+ __pyx_t_14 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_14)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_14);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (!__pyx_t_14) {
+ __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_13};
+ __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_13};
+ __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_14); __pyx_t_14 = NULL;
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_13);
+ __pyx_t_13 = 0;
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_8, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyList_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyList_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyList_SET_ITEM(__pyx_t_10, 1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2992, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2990
+ * #return _LinearViewSumExpression((_self, NegationExpression((_other,))))
+ * return ViewSumExpression([_self, NegationExpression((_other,))])
+ * elif _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * #return _LinearViewSumExpression((_self, NPV_NegationExpression((_other,))))
+ * return ViewSumExpression([_self, NPV_NegationExpression((_other,))])
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2994
+ * return ViewSumExpression([_self, NPV_NegationExpression((_other,))])
+ * else:
+ * return NPV_SumExpression((_self, NPV_NegationExpression((_other,)))) # <<<<<<<<<<<<<<
+ *
+ * raise RuntimeError("Unknown expression type '%s'" % etype) #pragma: no cover
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_SumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_NegationExpression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v__other);
+ __pyx_t_13 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_13);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (!__pyx_t_13) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_12); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2962
+ * return NPV_SumExpression((_self, _other))
+ *
+ * elif etype == _sub: # <<<<<<<<<<<<<<
+ * #
+ * # x - y
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2996
+ * return NPV_SumExpression((_self, NPV_NegationExpression((_other,))))
+ *
+ * raise RuntimeError("Unknown expression type '%s'" % etype) #pragma: no cover # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Unknown_expression_type_s, __pyx_v_etype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2996, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2996, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2996, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 2996, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2872
+ *
+ * #@profile
+ * def _generate_sum_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ *
+ * if etype > _inplace:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._generate_sum_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_etype);
+ __Pyx_XDECREF(__pyx_v__self);
+ __Pyx_XDECREF(__pyx_v__other);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":3000
+ *
+ * #@profile
+ * def _generate_mul_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ *
+ * if etype > _inplace:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_37_generate_mul_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_37_generate_mul_expression = {"_generate_mul_expression", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_37_generate_mul_expression, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_37_generate_mul_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_etype = 0;
+ PyObject *__pyx_v__self = 0;
+ PyObject *__pyx_v__other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_generate_mul_expression (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_self_2,&__pyx_n_s_other,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_mul_expression", 1, 3, 3, 1); __PYX_ERR(0, 3000, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_mul_expression", 1, 3, 3, 2); __PYX_ERR(0, 3000, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_generate_mul_expression") < 0)) __PYX_ERR(0, 3000, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_etype = values[0];
+ __pyx_v__self = values[1];
+ __pyx_v__other = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_generate_mul_expression", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3000, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._generate_mul_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_36_generate_mul_expression(__pyx_self, __pyx_v_etype, __pyx_v__self, __pyx_v__other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_36_generate_mul_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_etype, PyObject *__pyx_v__self, PyObject *__pyx_v__other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ int __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ __Pyx_RefNannySetupContext("_generate_mul_expression", 0);
+ __Pyx_INCREF(__pyx_v_etype);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3002
+ * def _generate_mul_expression(etype, _self, _other):
+ *
+ * if etype > _inplace: # <<<<<<<<<<<<<<
+ * etype -= _inplace
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_inplace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3002, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3002, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3002, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3003
+ *
+ * if etype > _inplace:
+ * etype -= _inplace # <<<<<<<<<<<<<<
+ *
+ * if _self.__class__ is _MutableLinearExpression:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_inplace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3003, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_etype, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3003, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_etype, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3002
+ * def _generate_mul_expression(etype, _self, _other):
+ *
+ * if etype > _inplace: # <<<<<<<<<<<<<<
+ * etype -= _inplace
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3005
+ * etype -= _inplace
+ *
+ * if _self.__class__ is _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * try:
+ * if _other.__class__ is not _MutableLinearExpression:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3005, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableLinearExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3005, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__pyx_t_1 == __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3006
+ *
+ * if _self.__class__ is _MutableLinearExpression:
+ * try: # <<<<<<<<<<<<<<
+ * if _other.__class__ is not _MutableLinearExpression:
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3007
+ * if _self.__class__ is _MutableLinearExpression:
+ * try:
+ * if _other.__class__ is not _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ * _other = _process_arg(_other)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3007, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableLinearExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3007, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = (__pyx_t_2 != __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3008
+ * try:
+ * if _other.__class__ is not _MutableLinearExpression:
+ * if not (_other.__class__ in native_types or _other.is_expression_type()): # <<<<<<<<<<<<<<
+ * _other = _process_arg(_other)
+ * return _self._combine_expr(etype, _other)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3008, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3008, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3008, __pyx_L5_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = (__pyx_t_4 != 0);
+ if (!__pyx_t_8) {
+ } else {
+ __pyx_t_3 = __pyx_t_8;
+ goto __pyx_L13_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3008, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3008, __pyx_L5_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3008, __pyx_L5_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3008, __pyx_L5_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __pyx_t_8;
+ __pyx_L13_bool_binop_done:;
+ __pyx_t_8 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3009
+ * if _other.__class__ is not _MutableLinearExpression:
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ * _other = _process_arg(_other) # <<<<<<<<<<<<<<
+ * return _self._combine_expr(etype, _other)
+ * except LinearDecompositionError:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3009, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v__other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3009, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v__other};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3009, __pyx_L5_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v__other};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3009, __pyx_L5_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3009, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v__other);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3009, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v__other, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3008
+ * try:
+ * if _other.__class__ is not _MutableLinearExpression:
+ * if not (_other.__class__ in native_types or _other.is_expression_type()): # <<<<<<<<<<<<<<
+ * _other = _process_arg(_other)
+ * return _self._combine_expr(etype, _other)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3007
+ * if _self.__class__ is _MutableLinearExpression:
+ * try:
+ * if _other.__class__ is not _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ * _other = _process_arg(_other)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3010
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ * _other = _process_arg(_other)
+ * return _self._combine_expr(etype, _other) # <<<<<<<<<<<<<<
+ * except LinearDecompositionError:
+ * pass
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_combine_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3010, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_etype, __pyx_v__other};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3010, __pyx_L5_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_10, __pyx_v_etype, __pyx_v__other};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3010, __pyx_L5_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3010, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_10) {
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_etype);
+ __Pyx_GIVEREF(__pyx_v_etype);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_11, __pyx_v_etype);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_11, __pyx_v__other);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3010, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L9_try_return;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3006
+ *
+ * if _self.__class__ is _MutableLinearExpression:
+ * try: # <<<<<<<<<<<<<<
+ * if _other.__class__ is not _MutableLinearExpression:
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ */
+ }
+ __pyx_L5_error:;
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3011
+ * _other = _process_arg(_other)
+ * return _self._combine_expr(etype, _other)
+ * except LinearDecompositionError: # <<<<<<<<<<<<<<
+ * pass
+ * elif _other.__class__ is _MutableLinearExpression:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearDecompositionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3011, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_11) {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L6_exception_handled;
+ }
+ goto __pyx_L7_except_error;
+ __pyx_L7_except_error:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3006
+ *
+ * if _self.__class__ is _MutableLinearExpression:
+ * try: # <<<<<<<<<<<<<<
+ * if _other.__class__ is not _MutableLinearExpression:
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ */
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L1_error;
+ __pyx_L9_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L0;
+ __pyx_L6_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3005
+ * etype -= _inplace
+ *
+ * if _self.__class__ is _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * try:
+ * if _other.__class__ is not _MutableLinearExpression:
+ */
+ goto __pyx_L4;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3013
+ * except LinearDecompositionError:
+ * pass
+ * elif _other.__class__ is _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * try:
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3013, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_MutableLinearExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3013, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = (__pyx_t_2 == __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = (__pyx_t_8 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3014
+ * pass
+ * elif _other.__class__ is _MutableLinearExpression:
+ * try: # <<<<<<<<<<<<<<
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ * _self = _process_arg(_self)
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_5);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3015
+ * elif _other.__class__ is _MutableLinearExpression:
+ * try:
+ * if not (_self.__class__ in native_types or _self.is_expression_type()): # <<<<<<<<<<<<<<
+ * _self = _process_arg(_self)
+ * return _other._combine_expr(-etype, _self)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3015, __pyx_L15_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3015, __pyx_L15_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3015, __pyx_L15_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_8 != 0);
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __pyx_t_4;
+ goto __pyx_L22_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3015, __pyx_L15_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3015, __pyx_L15_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3015, __pyx_L15_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3015, __pyx_L15_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __pyx_t_4;
+ __pyx_L22_bool_binop_done:;
+ __pyx_t_4 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3016
+ * try:
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ * _self = _process_arg(_self) # <<<<<<<<<<<<<<
+ * return _other._combine_expr(-etype, _self)
+ * except LinearDecompositionError:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3016, __pyx_L15_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v__self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3016, __pyx_L15_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v__self};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3016, __pyx_L15_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_v__self};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3016, __pyx_L15_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3016, __pyx_L15_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v__self);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3016, __pyx_L15_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v__self, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3015
+ * elif _other.__class__ is _MutableLinearExpression:
+ * try:
+ * if not (_self.__class__ in native_types or _self.is_expression_type()): # <<<<<<<<<<<<<<
+ * _self = _process_arg(_self)
+ * return _other._combine_expr(-etype, _self)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3017
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ * _self = _process_arg(_self)
+ * return _other._combine_expr(-etype, _self) # <<<<<<<<<<<<<<
+ * except LinearDecompositionError:
+ * pass
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_combine_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3017, __pyx_L15_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = PyNumber_Negative(__pyx_v_etype); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3017, __pyx_L15_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_9 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_10, __pyx_v__self};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3017, __pyx_L15_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_t_10, __pyx_v__self};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3017, __pyx_L15_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3017, __pyx_L15_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_v__self);
+ __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3017, __pyx_L15_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L19_try_return;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3014
+ * pass
+ * elif _other.__class__ is _MutableLinearExpression:
+ * try: # <<<<<<<<<<<<<<
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ * _self = _process_arg(_self)
+ */
+ }
+ __pyx_L15_error:;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3018
+ * _self = _process_arg(_self)
+ * return _other._combine_expr(-etype, _self)
+ * except LinearDecompositionError: # <<<<<<<<<<<<<<
+ * pass
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearDecompositionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3018, __pyx_L17_except_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_11 = __Pyx_PyErr_ExceptionMatches(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_11) {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L16_exception_handled;
+ }
+ goto __pyx_L17_except_error;
+ __pyx_L17_except_error:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3014
+ * pass
+ * elif _other.__class__ is _MutableLinearExpression:
+ * try: # <<<<<<<<<<<<<<
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ * _self = _process_arg(_self)
+ */
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
+ goto __pyx_L1_error;
+ __pyx_L19_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
+ goto __pyx_L0;
+ __pyx_L16_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3013
+ * except LinearDecompositionError:
+ * pass
+ * elif _other.__class__ is _MutableLinearExpression: # <<<<<<<<<<<<<<
+ * try:
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ */
+ }
+ __pyx_L4:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3025
+ * # need to process it to see if it's entangled.
+ * #
+ * if not (_self.__class__ in native_types or _self.is_expression_type()): # <<<<<<<<<<<<<<
+ * _self = _process_arg(_self)
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3025, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3025, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3025, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = (__pyx_t_3 != 0);
+ if (!__pyx_t_8) {
+ } else {
+ __pyx_t_4 = __pyx_t_8;
+ goto __pyx_L25_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3025, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3025, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3025, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3025, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __pyx_t_8;
+ __pyx_L25_bool_binop_done:;
+ __pyx_t_8 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3026
+ * #
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ * _self = _process_arg(_self) # <<<<<<<<<<<<<<
+ *
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3026, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v__self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3026, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v__self};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3026, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_v__self};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3026, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3026, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_v__self);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3026, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v__self, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3025
+ * # need to process it to see if it's entangled.
+ * #
+ * if not (_self.__class__ in native_types or _self.is_expression_type()): # <<<<<<<<<<<<<<
+ * _self = _process_arg(_self)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3028
+ * _self = _process_arg(_self)
+ *
+ * if not (_other.__class__ in native_types or _other.is_expression_type()): # <<<<<<<<<<<<<<
+ * _other = _process_arg(_other)
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3028, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3028, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3028, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_8 = __pyx_t_3;
+ goto __pyx_L28_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3028, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_10) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3028, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3028, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3028, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = __pyx_t_3;
+ __pyx_L28_bool_binop_done:;
+ __pyx_t_3 = ((!__pyx_t_8) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3029
+ *
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ * _other = _process_arg(_other) # <<<<<<<<<<<<<<
+ *
+ * if etype < 0:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3029, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v__other); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3029, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v__other};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3029, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v__other};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3029, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3029, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_v__other);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3029, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v__other, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3028
+ * _self = _process_arg(_self)
+ *
+ * if not (_other.__class__ in native_types or _other.is_expression_type()): # <<<<<<<<<<<<<<
+ * _other = _process_arg(_other)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3031
+ * _other = _process_arg(_other)
+ *
+ * if etype < 0: # <<<<<<<<<<<<<<
+ * #
+ * # This may seem obvious, but if we are performing an
+ */
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3031, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3031, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3038
+ * # completely new expression here.
+ * #
+ * etype *= -1 # <<<<<<<<<<<<<<
+ * _self, _other = _other, _self
+ *
+ */
+ __pyx_t_2 = PyNumber_InPlaceMultiply(__pyx_v_etype, __pyx_int_neg_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3038, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v_etype, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3039
+ * #
+ * etype *= -1
+ * _self, _other = _other, _self # <<<<<<<<<<<<<<
+ *
+ * if etype == _mul:
+ */
+ __pyx_t_5 = __pyx_v__other;
+ __pyx_t_6 = __pyx_v__self;
+ __pyx_v__self = __pyx_t_5;
+ __pyx_t_5 = 0;
+ __pyx_v__other = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3031
+ * _other = _process_arg(_other)
+ *
+ * if etype < 0: # <<<<<<<<<<<<<<
+ * #
+ * # This may seem obvious, but if we are performing an
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3041
+ * _self, _other = _other, _self
+ *
+ * if etype == _mul: # <<<<<<<<<<<<<<
+ * #
+ * # x * y
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_mul); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3041, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3041, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3041, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3045
+ * # x * y
+ * #
+ * if _other.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _self.__class__ in native_numeric_types:
+ * return _self * _other
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3045, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3045, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3045, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = (__pyx_t_3 != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3046
+ * #
+ * if _other.__class__ in native_numeric_types:
+ * if _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return _self * _other
+ * elif _other == 0: # isclose(_other, 0)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3046, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3046, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3046, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = (__pyx_t_8 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3047
+ * if _other.__class__ in native_numeric_types:
+ * if _self.__class__ in native_numeric_types:
+ * return _self * _other # <<<<<<<<<<<<<<
+ * elif _other == 0: # isclose(_other, 0)
+ * return 0
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v__self, __pyx_v__other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3047, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3046
+ * #
+ * if _other.__class__ in native_numeric_types:
+ * if _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return _self * _other
+ * elif _other == 0: # isclose(_other, 0)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3048
+ * if _self.__class__ in native_numeric_types:
+ * return _self * _other
+ * elif _other == 0: # isclose(_other, 0) # <<<<<<<<<<<<<<
+ * return 0
+ * elif _other == 1:
+ */
+ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v__other, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3048, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3048, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3049
+ * return _self * _other
+ * elif _other == 0: # isclose(_other, 0)
+ * return 0 # <<<<<<<<<<<<<<
+ * elif _other == 1:
+ * return _self
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3048
+ * if _self.__class__ in native_numeric_types:
+ * return _self * _other
+ * elif _other == 0: # isclose(_other, 0) # <<<<<<<<<<<<<<
+ * return 0
+ * elif _other == 1:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3050
+ * elif _other == 0: # isclose(_other, 0)
+ * return 0
+ * elif _other == 1: # <<<<<<<<<<<<<<
+ * return _self
+ * if _self.is_potentially_variable():
+ */
+ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v__other, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3050, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3050, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3051
+ * return 0
+ * elif _other == 1:
+ * return _self # <<<<<<<<<<<<<<
+ * if _self.is_potentially_variable():
+ * return ProductExpression((_other, _self))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v__self);
+ __pyx_r = __pyx_v__self;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3050
+ * elif _other == 0: # isclose(_other, 0)
+ * return 0
+ * elif _other == 1: # <<<<<<<<<<<<<<
+ * return _self
+ * if _self.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3052
+ * elif _other == 1:
+ * return _self
+ * if _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((_other, _self))
+ * return NPV_ProductExpression((_self, _other))
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3052, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3052, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3052, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3052, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3053
+ * return _self
+ * if _self.is_potentially_variable():
+ * return ProductExpression((_other, _self)) # <<<<<<<<<<<<<<
+ * return NPV_ProductExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProductExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3053, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3053, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v__other);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v__self);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3053, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3053, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3053, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3053, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3053, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3052
+ * elif _other == 1:
+ * return _self
+ * if _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((_other, _self))
+ * return NPV_ProductExpression((_self, _other))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3054
+ * if _self.is_potentially_variable():
+ * return ProductExpression((_other, _self))
+ * return NPV_ProductExpression((_self, _other)) # <<<<<<<<<<<<<<
+ * elif _self.__class__ in native_numeric_types:
+ * if _self == 0: # isclose(_self, 0)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_ProductExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3054, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3054, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v__other);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3054, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_9};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3054, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_9};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3054, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3054, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3054, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3045
+ * # x * y
+ * #
+ * if _other.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _self.__class__ in native_numeric_types:
+ * return _self * _other
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3055
+ * return ProductExpression((_other, _self))
+ * return NPV_ProductExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _self == 0: # isclose(_self, 0)
+ * return 0
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3055, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3055, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3055, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = (__pyx_t_3 != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3056
+ * return NPV_ProductExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types:
+ * if _self == 0: # isclose(_self, 0) # <<<<<<<<<<<<<<
+ * return 0
+ * elif _self == 1:
+ */
+ __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v__self, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3056, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3056, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3057
+ * elif _self.__class__ in native_numeric_types:
+ * if _self == 0: # isclose(_self, 0)
+ * return 0 # <<<<<<<<<<<<<<
+ * elif _self == 1:
+ * return _other
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3056
+ * return NPV_ProductExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types:
+ * if _self == 0: # isclose(_self, 0) # <<<<<<<<<<<<<<
+ * return 0
+ * elif _self == 1:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3058
+ * if _self == 0: # isclose(_self, 0)
+ * return 0
+ * elif _self == 1: # <<<<<<<<<<<<<<
+ * return _other
+ * if _other.is_potentially_variable():
+ */
+ __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v__self, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3058, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3058, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3059
+ * return 0
+ * elif _self == 1:
+ * return _other # <<<<<<<<<<<<<<
+ * if _other.is_potentially_variable():
+ * return ProductExpression((_self, _other))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v__other);
+ __pyx_r = __pyx_v__other;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3058
+ * if _self == 0: # isclose(_self, 0)
+ * return 0
+ * elif _self == 1: # <<<<<<<<<<<<<<
+ * return _other
+ * if _other.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3060
+ * elif _self == 1:
+ * return _other
+ * if _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((_self, _other))
+ * return NPV_ProductExpression((_self, _other))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3060, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_10) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3060, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3060, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3060, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3061
+ * return _other
+ * if _other.is_potentially_variable():
+ * return ProductExpression((_self, _other)) # <<<<<<<<<<<<<<
+ * return NPV_ProductExpression((_self, _other))
+ * elif _other.is_potentially_variable():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProductExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3061, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3061, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v__other);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3061, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3061, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3060
+ * elif _self == 1:
+ * return _other
+ * if _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((_self, _other))
+ * return NPV_ProductExpression((_self, _other))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3062
+ * if _other.is_potentially_variable():
+ * return ProductExpression((_self, _other))
+ * return NPV_ProductExpression((_self, _other)) # <<<<<<<<<<<<<<
+ * elif _other.is_potentially_variable():
+ * return ProductExpression((_self, _other))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_ProductExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3062, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3062, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v__other);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3062, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_12};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3062, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_12};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3062, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3062, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3062, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3055
+ * return ProductExpression((_other, _self))
+ * return NPV_ProductExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _self == 0: # isclose(_self, 0)
+ * return 0
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3063
+ * return ProductExpression((_self, _other))
+ * return NPV_ProductExpression((_self, _other))
+ * elif _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((_self, _other))
+ * elif _self.is_potentially_variable():
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3063, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3063, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3063, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3063, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3064
+ * return NPV_ProductExpression((_self, _other))
+ * elif _other.is_potentially_variable():
+ * return ProductExpression((_self, _other)) # <<<<<<<<<<<<<<
+ * elif _self.is_potentially_variable():
+ * return ProductExpression((_other, _self))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProductExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3064, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3064, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v__other);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3064, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_9};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3064, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_9};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3064, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3064, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3064, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3063
+ * return ProductExpression((_self, _other))
+ * return NPV_ProductExpression((_self, _other))
+ * elif _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((_self, _other))
+ * elif _self.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3065
+ * elif _other.is_potentially_variable():
+ * return ProductExpression((_self, _other))
+ * elif _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((_other, _self))
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3065, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_10) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3065, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3065, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3065, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3066
+ * return ProductExpression((_self, _other))
+ * elif _self.is_potentially_variable():
+ * return ProductExpression((_other, _self)) # <<<<<<<<<<<<<<
+ * else:
+ * return NPV_ProductExpression((_self, _other))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProductExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3066, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3066, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__other);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v__self);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3066, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3066, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3066, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3066, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3066, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3065
+ * elif _other.is_potentially_variable():
+ * return ProductExpression((_self, _other))
+ * elif _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((_other, _self))
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3068
+ * return ProductExpression((_other, _self))
+ * else:
+ * return NPV_ProductExpression((_self, _other)) # <<<<<<<<<<<<<<
+ *
+ * elif etype == _div:
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_ProductExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3068, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3068, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v__other);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3068, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_12};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3068, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_12};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3068, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3068, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3068, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3041
+ * _self, _other = _other, _self
+ *
+ * if etype == _mul: # <<<<<<<<<<<<<<
+ * #
+ * # x * y
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3070
+ * return NPV_ProductExpression((_self, _other))
+ *
+ * elif etype == _div: # <<<<<<<<<<<<<<
+ * #
+ * # x / y
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_div); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3070, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3070, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3070, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3074
+ * # x / y
+ * #
+ * if _other.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _other == 1:
+ * return _self
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3074, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3074, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3074, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_8 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3075
+ * #
+ * if _other.__class__ in native_numeric_types:
+ * if _other == 1: # <<<<<<<<<<<<<<
+ * return _self
+ * elif not _other:
+ */
+ __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v__other, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3075, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3075, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3076
+ * if _other.__class__ in native_numeric_types:
+ * if _other == 1:
+ * return _self # <<<<<<<<<<<<<<
+ * elif not _other:
+ * raise ZeroDivisionError()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v__self);
+ __pyx_r = __pyx_v__self;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3075
+ * #
+ * if _other.__class__ in native_numeric_types:
+ * if _other == 1: # <<<<<<<<<<<<<<
+ * return _self
+ * elif not _other:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3077
+ * if _other == 1:
+ * return _self
+ * elif not _other: # <<<<<<<<<<<<<<
+ * raise ZeroDivisionError()
+ * elif _self.__class__ in native_numeric_types:
+ */
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__other); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3077, __pyx_L1_error)
+ __pyx_t_8 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3078
+ * return _self
+ * elif not _other:
+ * raise ZeroDivisionError() # <<<<<<<<<<<<<<
+ * elif _self.__class__ in native_numeric_types:
+ * return _self / _other
+ */
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_builtin_ZeroDivisionError); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3078, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 3078, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3077
+ * if _other == 1:
+ * return _self
+ * elif not _other: # <<<<<<<<<<<<<<
+ * raise ZeroDivisionError()
+ * elif _self.__class__ in native_numeric_types:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3079
+ * elif not _other:
+ * raise ZeroDivisionError()
+ * elif _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return _self / _other
+ * if _self.is_potentially_variable():
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3079, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3079, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3079, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = (__pyx_t_8 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3080
+ * raise ZeroDivisionError()
+ * elif _self.__class__ in native_numeric_types:
+ * return _self / _other # <<<<<<<<<<<<<<
+ * if _self.is_potentially_variable():
+ * return ProductExpression((1/_other, _self))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyNumber_Divide(__pyx_v__self, __pyx_v__other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3080, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3079
+ * elif not _other:
+ * raise ZeroDivisionError()
+ * elif _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return _self / _other
+ * if _self.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3081
+ * elif _self.__class__ in native_numeric_types:
+ * return _self / _other
+ * if _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((1/_other, _self))
+ * return NPV_ProductExpression((1/_other, _self))
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3081, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3081, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3081, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3081, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3082
+ * return _self / _other
+ * if _self.is_potentially_variable():
+ * return ProductExpression((1/_other, _self)) # <<<<<<<<<<<<<<
+ * return NPV_ProductExpression((1/_other, _self))
+ * elif _self.__class__ in native_numeric_types:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProductExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3082, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = __Pyx_PyNumber_Divide(__pyx_int_1, __pyx_v__other); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3082, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3082, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v__self);
+ __pyx_t_9 = 0;
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3082, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3082, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3082, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3082, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3082, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3081
+ * elif _self.__class__ in native_numeric_types:
+ * return _self / _other
+ * if _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((1/_other, _self))
+ * return NPV_ProductExpression((1/_other, _self))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3083
+ * if _self.is_potentially_variable():
+ * return ProductExpression((1/_other, _self))
+ * return NPV_ProductExpression((1/_other, _self)) # <<<<<<<<<<<<<<
+ * elif _self.__class__ in native_numeric_types:
+ * if isclose(_self, 0):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_ProductExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3083, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = __Pyx_PyNumber_Divide(__pyx_int_1, __pyx_v__other); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3083, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3083, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v__self);
+ __pyx_t_10 = 0;
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3083, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3083, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3083, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3083, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3083, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3074
+ * # x / y
+ * #
+ * if _other.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _other == 1:
+ * return _self
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3084
+ * return ProductExpression((1/_other, _self))
+ * return NPV_ProductExpression((1/_other, _self))
+ * elif _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if isclose(_self, 0):
+ * return 0
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3084, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3084, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3084, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = (__pyx_t_3 != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3085
+ * return NPV_ProductExpression((1/_other, _self))
+ * elif _self.__class__ in native_numeric_types:
+ * if isclose(_self, 0): # <<<<<<<<<<<<<<
+ * return 0
+ * elif _self == 1:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v__self, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3085, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v__self, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3085, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, __pyx_v__self);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_int_0);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3085, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3085, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3086
+ * elif _self.__class__ in native_numeric_types:
+ * if isclose(_self, 0):
+ * return 0 # <<<<<<<<<<<<<<
+ * elif _self == 1:
+ * if _other.is_potentially_variable():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3085
+ * return NPV_ProductExpression((1/_other, _self))
+ * elif _self.__class__ in native_numeric_types:
+ * if isclose(_self, 0): # <<<<<<<<<<<<<<
+ * return 0
+ * elif _self == 1:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3087
+ * if isclose(_self, 0):
+ * return 0
+ * elif _self == 1: # <<<<<<<<<<<<<<
+ * if _other.is_potentially_variable():
+ * return ReciprocalExpression((_other,))
+ */
+ __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v__self, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3087, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3087, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3088
+ * return 0
+ * elif _self == 1:
+ * if _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ReciprocalExpression((_other,))
+ * return NPV_ReciprocalExpression((_other,))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3088, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3088, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3088, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3088, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3089
+ * elif _self == 1:
+ * if _other.is_potentially_variable():
+ * return ReciprocalExpression((_other,)) # <<<<<<<<<<<<<<
+ * return NPV_ReciprocalExpression((_other,))
+ * elif _other.is_potentially_variable():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReciprocalExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3089, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3089, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v__other);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3089, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_12};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3089, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_12};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3089, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3089, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3089, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3088
+ * return 0
+ * elif _self == 1:
+ * if _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ReciprocalExpression((_other,))
+ * return NPV_ReciprocalExpression((_other,))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3090
+ * if _other.is_potentially_variable():
+ * return ReciprocalExpression((_other,))
+ * return NPV_ReciprocalExpression((_other,)) # <<<<<<<<<<<<<<
+ * elif _other.is_potentially_variable():
+ * return ProductExpression((_self, ReciprocalExpression((_other,))))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_ReciprocalExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3090, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3090, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__other);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3090, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3090, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3090, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3090, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3090, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3087
+ * if isclose(_self, 0):
+ * return 0
+ * elif _self == 1: # <<<<<<<<<<<<<<
+ * if _other.is_potentially_variable():
+ * return ReciprocalExpression((_other,))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3091
+ * return ReciprocalExpression((_other,))
+ * return NPV_ReciprocalExpression((_other,))
+ * elif _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((_self, ReciprocalExpression((_other,))))
+ * return NPV_ProductExpression((_self, ReciprocalExpression((_other,))))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3091, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3091, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3091, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3091, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3092
+ * return NPV_ReciprocalExpression((_other,))
+ * elif _other.is_potentially_variable():
+ * return ProductExpression((_self, ReciprocalExpression((_other,)))) # <<<<<<<<<<<<<<
+ * return NPV_ProductExpression((_self, ReciprocalExpression((_other,))))
+ * elif _other.is_potentially_variable():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProductExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReciprocalExpression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v__other);
+ __pyx_t_13 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_13);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (!__pyx_t_13) {
+ __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3092, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
+ __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3092, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
+ __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3092, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3092, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3092, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3092, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3091
+ * return ReciprocalExpression((_other,))
+ * return NPV_ReciprocalExpression((_other,))
+ * elif _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((_self, ReciprocalExpression((_other,))))
+ * return NPV_ProductExpression((_self, ReciprocalExpression((_other,))))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3093
+ * elif _other.is_potentially_variable():
+ * return ProductExpression((_self, ReciprocalExpression((_other,))))
+ * return NPV_ProductExpression((_self, ReciprocalExpression((_other,)))) # <<<<<<<<<<<<<<
+ * elif _other.is_potentially_variable():
+ * return ProductExpression((_self, ReciprocalExpression((_other,))))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_ProductExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReciprocalExpression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v__other);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_9); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_14);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_9};
+ __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_9};
+ __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_14);
+ __pyx_t_14 = 0;
+ __pyx_t_14 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_14)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_14);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_14) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_13 = PyTuple_New(1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_14); __pyx_t_14 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_13, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_13, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3093, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3084
+ * return ProductExpression((1/_other, _self))
+ * return NPV_ProductExpression((1/_other, _self))
+ * elif _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if isclose(_self, 0):
+ * return 0
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3094
+ * return ProductExpression((_self, ReciprocalExpression((_other,))))
+ * return NPV_ProductExpression((_self, ReciprocalExpression((_other,))))
+ * elif _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((_self, ReciprocalExpression((_other,))))
+ * elif _self.is_potentially_variable():
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3094, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_13 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_13);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_13) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3094, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3094, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3094, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3095
+ * return NPV_ProductExpression((_self, ReciprocalExpression((_other,))))
+ * elif _other.is_potentially_variable():
+ * return ProductExpression((_self, ReciprocalExpression((_other,)))) # <<<<<<<<<<<<<<
+ * elif _self.is_potentially_variable():
+ * return ProductExpression((NPV_ReciprocalExpression((_other,)), _self))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProductExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReciprocalExpression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v__other);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_14};
+ __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_14};
+ __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_14);
+ __pyx_t_14 = 0;
+ __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_12, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_13);
+ __pyx_t_13 = 0;
+ __pyx_t_13 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_13);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_13) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_13); __pyx_t_13 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_12, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3095, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3094
+ * return ProductExpression((_self, ReciprocalExpression((_other,))))
+ * return NPV_ProductExpression((_self, ReciprocalExpression((_other,))))
+ * elif _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((_self, ReciprocalExpression((_other,))))
+ * elif _self.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3096
+ * elif _other.is_potentially_variable():
+ * return ProductExpression((_self, ReciprocalExpression((_other,))))
+ * elif _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((NPV_ReciprocalExpression((_other,)), _self))
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3096, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3096, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3096, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 3096, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3097
+ * return ProductExpression((_self, ReciprocalExpression((_other,))))
+ * elif _self.is_potentially_variable():
+ * return ProductExpression((NPV_ReciprocalExpression((_other,)), _self)) # <<<<<<<<<<<<<<
+ * else:
+ * return NPV_ProductExpression((_self, NPV_ReciprocalExpression((_other,))))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProductExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_ReciprocalExpression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v__other);
+ __pyx_t_14 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_14)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_14);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (!__pyx_t_14) {
+ __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_13};
+ __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_13};
+ __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_14); __pyx_t_14 = NULL;
+ __Pyx_GIVEREF(__pyx_t_13);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_13);
+ __pyx_t_13 = 0;
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_9, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v__self);
+ __pyx_t_12 = 0;
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_12) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_12, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3097, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3096
+ * elif _other.is_potentially_variable():
+ * return ProductExpression((_self, ReciprocalExpression((_other,))))
+ * elif _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return ProductExpression((NPV_ReciprocalExpression((_other,)), _self))
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3099
+ * return ProductExpression((NPV_ReciprocalExpression((_other,)), _self))
+ * else:
+ * return NPV_ProductExpression((_self, NPV_ReciprocalExpression((_other,)))) # <<<<<<<<<<<<<<
+ *
+ * raise RuntimeError("Unknown expression type '%s'" % etype) #pragma: no cover
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_ProductExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_ReciprocalExpression); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_12 = PyTuple_New(1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v__other);
+ __pyx_t_13 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_10))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_10);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_10);
+ __Pyx_INCREF(__pyx_t_13);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_10, function);
+ }
+ }
+ if (!__pyx_t_13) {
+ __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_10, __pyx_t_12); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
+ __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_10)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_12};
+ __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_10, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_13); __pyx_t_13 = NULL;
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_12);
+ __pyx_t_12 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_14, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3099, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3070
+ * return NPV_ProductExpression((_self, _other))
+ *
+ * elif etype == _div: # <<<<<<<<<<<<<<
+ * #
+ * # x / y
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3101
+ * return NPV_ProductExpression((_self, NPV_ReciprocalExpression((_other,))))
+ *
+ * raise RuntimeError("Unknown expression type '%s'" % etype) #pragma: no cover # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Unknown_expression_type_s, __pyx_v_etype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3101, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3101, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3101, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 3101, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3000
+ *
+ * #@profile
+ * def _generate_mul_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ *
+ * if etype > _inplace:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._generate_mul_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_etype);
+ __Pyx_XDECREF(__pyx_v__self);
+ __Pyx_XDECREF(__pyx_v__other);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":3105
+ *
+ * #@profile
+ * def _generate_other_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ *
+ * if etype > _inplace:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_39_generate_other_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_39_generate_other_expression = {"_generate_other_expression", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_39_generate_other_expression, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_39_generate_other_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_etype = 0;
+ PyObject *__pyx_v__self = 0;
+ PyObject *__pyx_v__other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_generate_other_expression (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_self_2,&__pyx_n_s_other,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_other_expression", 1, 3, 3, 1); __PYX_ERR(0, 3105, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_other_expression", 1, 3, 3, 2); __PYX_ERR(0, 3105, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_generate_other_expression") < 0)) __PYX_ERR(0, 3105, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_etype = values[0];
+ __pyx_v__self = values[1];
+ __pyx_v__other = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_generate_other_expression", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3105, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._generate_other_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_38_generate_other_expression(__pyx_self, __pyx_v_etype, __pyx_v__self, __pyx_v__other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_38_generate_other_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_etype, PyObject *__pyx_v__self, PyObject *__pyx_v__other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ __Pyx_RefNannySetupContext("_generate_other_expression", 0);
+ __Pyx_INCREF(__pyx_v_etype);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3107
+ * def _generate_other_expression(etype, _self, _other):
+ *
+ * if etype > _inplace: # <<<<<<<<<<<<<<
+ * etype -= _inplace
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_inplace); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3107, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3107, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3107, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3108
+ *
+ * if etype > _inplace:
+ * etype -= _inplace # <<<<<<<<<<<<<<
+ *
+ * #
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_inplace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyNumber_InPlaceSubtract(__pyx_v_etype, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_etype, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3107
+ * def _generate_other_expression(etype, _self, _other):
+ *
+ * if etype > _inplace: # <<<<<<<<<<<<<<
+ * etype -= _inplace
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3114
+ * # need to process it to see if it's entangled.
+ * #
+ * if not (_self.__class__ in native_types or _self.is_expression_type()): # <<<<<<<<<<<<<<
+ * _self = _process_arg(_self)
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_3 = __pyx_t_5;
+ goto __pyx_L5_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3114, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __pyx_t_5;
+ __pyx_L5_bool_binop_done:;
+ __pyx_t_5 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3115
+ * #
+ * if not (_self.__class__ in native_types or _self.is_expression_type()):
+ * _self = _process_arg(_self) # <<<<<<<<<<<<<<
+ *
+ * #
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v__self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v__self};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3115, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v__self};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3115, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v__self);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v__self, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3114
+ * # need to process it to see if it's entangled.
+ * #
+ * if not (_self.__class__ in native_types or _self.is_expression_type()): # <<<<<<<<<<<<<<
+ * _self = _process_arg(_self)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3120
+ * # abs(x)
+ * #
+ * if etype == _abs: # <<<<<<<<<<<<<<
+ * if _self.__class__ in native_numeric_types:
+ * return abs(_self)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_abs_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3120, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3120, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3120, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3121
+ * #
+ * if etype == _abs:
+ * if _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return abs(_self)
+ * elif _self.is_potentially_variable():
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3121, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3121, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3121, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_5 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3122
+ * if etype == _abs:
+ * if _self.__class__ in native_numeric_types:
+ * return abs(_self) # <<<<<<<<<<<<<<
+ * elif _self.is_potentially_variable():
+ * return AbsExpression(_self)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyNumber_Absolute(__pyx_v__self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3121
+ * #
+ * if etype == _abs:
+ * if _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return abs(_self)
+ * elif _self.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3123
+ * if _self.__class__ in native_numeric_types:
+ * return abs(_self)
+ * elif _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return AbsExpression(_self)
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3123, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3123, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3123, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3123, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3124
+ * return abs(_self)
+ * elif _self.is_potentially_variable():
+ * return AbsExpression(_self) # <<<<<<<<<<<<<<
+ * else:
+ * return NPV_AbsExpression(_self)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_AbsExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3124, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v__self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3124, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v__self};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3124, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v__self};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3124, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3124, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v__self);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3124, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3123
+ * if _self.__class__ in native_numeric_types:
+ * return abs(_self)
+ * elif _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return AbsExpression(_self)
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3126
+ * return AbsExpression(_self)
+ * else:
+ * return NPV_AbsExpression(_self) # <<<<<<<<<<<<<<
+ *
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_AbsExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v__self); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v__self};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3126, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v__self};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3126, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v__self);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3120
+ * # abs(x)
+ * #
+ * if etype == _abs: # <<<<<<<<<<<<<<
+ * if _self.__class__ in native_numeric_types:
+ * return abs(_self)
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3128
+ * return NPV_AbsExpression(_self)
+ *
+ * if not (_other.__class__ in native_types or _other.is_expression_type()): # <<<<<<<<<<<<<<
+ * _other = _process_arg(_other)
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3128, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = (__pyx_t_5 != 0);
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __pyx_t_4;
+ goto __pyx_L10_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_7) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3128, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3128, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3128, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __pyx_t_4;
+ __pyx_L10_bool_binop_done:;
+ __pyx_t_4 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3129
+ *
+ * if not (_other.__class__ in native_types or _other.is_expression_type()):
+ * _other = _process_arg(_other) # <<<<<<<<<<<<<<
+ *
+ * if etype < 0:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v__other); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v__other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3129, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v__other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3129, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v__other);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v__other, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3128
+ * return NPV_AbsExpression(_self)
+ *
+ * if not (_other.__class__ in native_types or _other.is_expression_type()): # <<<<<<<<<<<<<<
+ * _other = _process_arg(_other)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3131
+ * _other = _process_arg(_other)
+ *
+ * if etype < 0: # <<<<<<<<<<<<<<
+ * #
+ * # This may seem obvious, but if we are performing an
+ */
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_etype, __pyx_int_0, Py_LT); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3131, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3131, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3138
+ * # completely new expression here.
+ * #
+ * etype *= -1 # <<<<<<<<<<<<<<
+ * _self, _other = _other, _self
+ *
+ */
+ __pyx_t_1 = PyNumber_InPlaceMultiply(__pyx_v_etype, __pyx_int_neg_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3138, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_etype, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3139
+ * #
+ * etype *= -1
+ * _self, _other = _other, _self # <<<<<<<<<<<<<<
+ *
+ * if etype == _pow:
+ */
+ __pyx_t_8 = __pyx_v__other;
+ __pyx_t_9 = __pyx_v__self;
+ __pyx_v__self = __pyx_t_8;
+ __pyx_t_8 = 0;
+ __pyx_v__other = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3131
+ * _other = _process_arg(_other)
+ *
+ * if etype < 0: # <<<<<<<<<<<<<<
+ * #
+ * # This may seem obvious, but if we are performing an
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3141
+ * _self, _other = _other, _self
+ *
+ * if etype == _pow: # <<<<<<<<<<<<<<
+ * if _other.__class__ in native_numeric_types:
+ * if _other == 1:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pow_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3141, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3141, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3142
+ *
+ * if etype == _pow:
+ * if _other.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _other == 1:
+ * return _self
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3142, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3142, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3142, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3143
+ * if etype == _pow:
+ * if _other.__class__ in native_numeric_types:
+ * if _other == 1: # <<<<<<<<<<<<<<
+ * return _self
+ * elif not _other:
+ */
+ __pyx_t_1 = __Pyx_PyInt_EqObjC(__pyx_v__other, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3143, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3144
+ * if _other.__class__ in native_numeric_types:
+ * if _other == 1:
+ * return _self # <<<<<<<<<<<<<<
+ * elif not _other:
+ * return 1
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v__self);
+ __pyx_r = __pyx_v__self;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3143
+ * if etype == _pow:
+ * if _other.__class__ in native_numeric_types:
+ * if _other == 1: # <<<<<<<<<<<<<<
+ * return _self
+ * elif not _other:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3145
+ * if _other == 1:
+ * return _self
+ * elif not _other: # <<<<<<<<<<<<<<
+ * return 1
+ * elif _self.__class__ in native_numeric_types:
+ */
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v__other); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3145, __pyx_L1_error)
+ __pyx_t_4 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3146
+ * return _self
+ * elif not _other:
+ * return 1 # <<<<<<<<<<<<<<
+ * elif _self.__class__ in native_numeric_types:
+ * return _self ** _other
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_1);
+ __pyx_r = __pyx_int_1;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3145
+ * if _other == 1:
+ * return _self
+ * elif not _other: # <<<<<<<<<<<<<<
+ * return 1
+ * elif _self.__class__ in native_numeric_types:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3147
+ * elif not _other:
+ * return 1
+ * elif _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return _self ** _other
+ * elif _self.is_potentially_variable():
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3147, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3147, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3147, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3148
+ * return 1
+ * elif _self.__class__ in native_numeric_types:
+ * return _self ** _other # <<<<<<<<<<<<<<
+ * elif _self.is_potentially_variable():
+ * return PowExpression((_self, _other))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = PyNumber_Power(__pyx_v__self, __pyx_v__other, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3148, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3147
+ * elif not _other:
+ * return 1
+ * elif _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return _self ** _other
+ * elif _self.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3149
+ * elif _self.__class__ in native_numeric_types:
+ * return _self ** _other
+ * elif _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return PowExpression((_self, _other))
+ * return NPV_PowExpression((_self, _other))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3149, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3149, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3149, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3149, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3150
+ * return _self ** _other
+ * elif _self.is_potentially_variable():
+ * return PowExpression((_self, _other)) # <<<<<<<<<<<<<<
+ * return NPV_PowExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_PowExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3150, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3150, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v__other);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3150, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3150, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3150, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3150, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_10, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3150, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3149
+ * elif _self.__class__ in native_numeric_types:
+ * return _self ** _other
+ * elif _self.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return PowExpression((_self, _other))
+ * return NPV_PowExpression((_self, _other))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3151
+ * elif _self.is_potentially_variable():
+ * return PowExpression((_self, _other))
+ * return NPV_PowExpression((_self, _other)) # <<<<<<<<<<<<<<
+ * elif _self.__class__ in native_numeric_types:
+ * if _other.is_potentially_variable():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_PowExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v__other);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3151, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3151, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_10};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3151, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3151, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3142
+ *
+ * if etype == _pow:
+ * if _other.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _other == 1:
+ * return _self
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3152
+ * return PowExpression((_self, _other))
+ * return NPV_PowExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _other.is_potentially_variable():
+ * return PowExpression((_self, _other))
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3152, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3152, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3152, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3153
+ * return NPV_PowExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types:
+ * if _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return PowExpression((_self, _other))
+ * return NPV_PowExpression((_self, _other))
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3153, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_7) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3153, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3153, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3153, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3154
+ * elif _self.__class__ in native_numeric_types:
+ * if _other.is_potentially_variable():
+ * return PowExpression((_self, _other)) # <<<<<<<<<<<<<<
+ * return NPV_PowExpression((_self, _other))
+ * elif _self.is_potentially_variable() or _other.is_potentially_variable():
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PowExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v__other);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3154, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_7};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3154, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_7};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3154, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3154, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3153
+ * return NPV_PowExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types:
+ * if _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return PowExpression((_self, _other))
+ * return NPV_PowExpression((_self, _other))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3155
+ * if _other.is_potentially_variable():
+ * return PowExpression((_self, _other))
+ * return NPV_PowExpression((_self, _other)) # <<<<<<<<<<<<<<
+ * elif _self.is_potentially_variable() or _other.is_potentially_variable():
+ * return PowExpression((_self, _other))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_PowExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v__other);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3155, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3155, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3155, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(1+1); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3152
+ * return PowExpression((_self, _other))
+ * return NPV_PowExpression((_self, _other))
+ * elif _self.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if _other.is_potentially_variable():
+ * return PowExpression((_self, _other))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3156
+ * return PowExpression((_self, _other))
+ * return NPV_PowExpression((_self, _other))
+ * elif _self.is_potentially_variable() or _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return PowExpression((_self, _other))
+ * else:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__self, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3156, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3156, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3156, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (!__pyx_t_3) {
+ } else {
+ __pyx_t_4 = __pyx_t_3;
+ goto __pyx_L17_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__other, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3156, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3156, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3156, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __pyx_t_3;
+ __pyx_L17_bool_binop_done:;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3157
+ * return NPV_PowExpression((_self, _other))
+ * elif _self.is_potentially_variable() or _other.is_potentially_variable():
+ * return PowExpression((_self, _other)) # <<<<<<<<<<<<<<
+ * else:
+ * return NPV_PowExpression((_self, _other))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_PowExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = PyTuple_New(2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 3157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_10, 1, __pyx_v__other);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3157, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3157, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_10};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3157, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_10);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_10);
+ __pyx_t_10 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3156
+ * return PowExpression((_self, _other))
+ * return NPV_PowExpression((_self, _other))
+ * elif _self.is_potentially_variable() or _other.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return PowExpression((_self, _other))
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3159
+ * return PowExpression((_self, _other))
+ * else:
+ * return NPV_PowExpression((_self, _other)) # <<<<<<<<<<<<<<
+ *
+ * raise RuntimeError("Unknown expression type '%s'" % etype) #pragma: no cover
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_PowExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3159, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3159, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_INCREF(__pyx_v__self);
+ __Pyx_GIVEREF(__pyx_v__self);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v__self);
+ __Pyx_INCREF(__pyx_v__other);
+ __Pyx_GIVEREF(__pyx_v__other);
+ PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_v__other);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3159, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_7};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3159, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_t_7};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3159, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3159, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3159, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3141
+ * _self, _other = _other, _self
+ *
+ * if etype == _pow: # <<<<<<<<<<<<<<
+ * if _other.__class__ in native_numeric_types:
+ * if _other == 1:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3161
+ * return NPV_PowExpression((_self, _other))
+ *
+ * raise RuntimeError("Unknown expression type '%s'" % etype) #pragma: no cover # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Unknown_expression_type_s, __pyx_v_etype); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3161, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3161, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3161, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 3161, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3105
+ *
+ * #@profile
+ * def _generate_other_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ *
+ * if etype > _inplace:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._generate_other_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_etype);
+ __Pyx_XDECREF(__pyx_v__self);
+ __Pyx_XDECREF(__pyx_v__other);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":3165
+ *
+ * if _using_chained_inequality:
+ * def _generate_relational_expression(etype, lhs, rhs): #pragma: no cover # <<<<<<<<<<<<<<
+ * # We cannot trust Python not to recycle ID's for temporary POD data
+ * # (e.g., floats). So, if it is a "native" type, we will record the
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_41_generate_relational_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_41_generate_relational_expression = {"_generate_relational_expression", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_41_generate_relational_expression, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_41_generate_relational_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_etype = 0;
+ PyObject *__pyx_v_lhs = 0;
+ PyObject *__pyx_v_rhs = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_generate_relational_expression (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_relational_expression", 1, 3, 3, 1); __PYX_ERR(0, 3165, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_relational_expression", 1, 3, 3, 2); __PYX_ERR(0, 3165, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_generate_relational_expression") < 0)) __PYX_ERR(0, 3165, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_etype = values[0];
+ __pyx_v_lhs = values[1];
+ __pyx_v_rhs = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_generate_relational_expression", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3165, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._generate_relational_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_40_generate_relational_expression(__pyx_self, __pyx_v_etype, __pyx_v_lhs, __pyx_v_rhs);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_40_generate_relational_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_etype, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
+ PyObject *__pyx_v_cloned_from = NULL;
+ int __pyx_v_rhs_is_relational;
+ int __pyx_v_lhs_is_relational;
+ PyObject *__pyx_v_prevExpr = NULL;
+ PyObject *__pyx_v_match = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_v_arg = NULL;
+ PyObject *__pyx_v_val = NULL;
+ int __pyx_v_strict;
+ PyObject *__pyx_v_obj = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ int __pyx_t_7;
+ Py_ssize_t __pyx_t_8;
+ PyObject *(*__pyx_t_9)(PyObject *);
+ int __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ int __pyx_t_13;
+ __Pyx_RefNannySetupContext("_generate_relational_expression", 0);
+ __Pyx_INCREF(__pyx_v_etype);
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_INCREF(__pyx_v_rhs);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3172
+ * # accidentally match an ID
+ * cloned_from = (\
+ * id(lhs) if lhs.__class__ not in native_numeric_types else (0,lhs), # <<<<<<<<<<<<<<
+ * id(rhs) if rhs.__class__ not in native_numeric_types else (0,rhs)
+ * )
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3172, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if ((__pyx_t_4 != 0)) {
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_GIVEREF(__pyx_v_lhs);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_lhs);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ } else {
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_GIVEREF(__pyx_v_lhs);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_lhs);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3173
+ * cloned_from = (\
+ * id(lhs) if lhs.__class__ not in native_numeric_types else (0,lhs),
+ * id(rhs) if rhs.__class__ not in native_numeric_types else (0,rhs) # <<<<<<<<<<<<<<
+ * )
+ * rhs_is_relational = False
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3173, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3173, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_5, Py_NE)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3173, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if ((__pyx_t_4 != 0)) {
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3173, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_rhs);
+ __Pyx_GIVEREF(__pyx_v_rhs);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_rhs);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3173, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_t_3 = 0;
+ } else {
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3173, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_int_0);
+ __Pyx_INCREF(__pyx_v_rhs);
+ __Pyx_GIVEREF(__pyx_v_rhs);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_rhs);
+ __pyx_t_2 = __pyx_t_3;
+ __pyx_t_3 = 0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3172
+ * # accidentally match an ID
+ * cloned_from = (\
+ * id(lhs) if lhs.__class__ not in native_numeric_types else (0,lhs), # <<<<<<<<<<<<<<
+ * id(rhs) if rhs.__class__ not in native_numeric_types else (0,rhs)
+ * )
+ */
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = 0;
+ __pyx_v_cloned_from = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3175
+ * id(rhs) if rhs.__class__ not in native_numeric_types else (0,rhs)
+ * )
+ * rhs_is_relational = False # <<<<<<<<<<<<<<
+ * lhs_is_relational = False
+ *
+ */
+ __pyx_v_rhs_is_relational = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3176
+ * )
+ * rhs_is_relational = False
+ * lhs_is_relational = False # <<<<<<<<<<<<<<
+ *
+ * if not (lhs.__class__ in native_types or lhs.is_expression_type()):
+ */
+ __pyx_v_lhs_is_relational = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3178
+ * lhs_is_relational = False
+ *
+ * if not (lhs.__class__ in native_types or lhs.is_expression_type()): # <<<<<<<<<<<<<<
+ * lhs = _process_arg(lhs)
+ * if not (rhs.__class__ in native_types or rhs.is_expression_type()):
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3178, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3178, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3178, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_7 = (__pyx_t_6 != 0);
+ if (!__pyx_t_7) {
+ } else {
+ __pyx_t_4 = __pyx_t_7;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3178, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3178, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3178, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3178, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __pyx_t_7;
+ __pyx_L4_bool_binop_done:;
+ __pyx_t_7 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3179
+ *
+ * if not (lhs.__class__ in native_types or lhs.is_expression_type()):
+ * lhs = _process_arg(lhs) # <<<<<<<<<<<<<<
+ * if not (rhs.__class__ in native_types or rhs.is_expression_type()):
+ * rhs = _process_arg(rhs)
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_lhs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_lhs};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3179, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_lhs};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3179, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_GIVEREF(__pyx_v_lhs);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_lhs);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_lhs, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3178
+ * lhs_is_relational = False
+ *
+ * if not (lhs.__class__ in native_types or lhs.is_expression_type()): # <<<<<<<<<<<<<<
+ * lhs = _process_arg(lhs)
+ * if not (rhs.__class__ in native_types or rhs.is_expression_type()):
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3180
+ * if not (lhs.__class__ in native_types or lhs.is_expression_type()):
+ * lhs = _process_arg(lhs)
+ * if not (rhs.__class__ in native_types or rhs.is_expression_type()): # <<<<<<<<<<<<<<
+ * rhs = _process_arg(rhs)
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3180, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3180, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3180, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = (__pyx_t_4 != 0);
+ if (!__pyx_t_6) {
+ } else {
+ __pyx_t_7 = __pyx_t_6;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3180, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3180, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3180, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3180, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __pyx_t_6;
+ __pyx_L7_bool_binop_done:;
+ __pyx_t_6 = ((!__pyx_t_7) != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3181
+ * lhs = _process_arg(lhs)
+ * if not (rhs.__class__ in native_types or rhs.is_expression_type()):
+ * rhs = _process_arg(rhs) # <<<<<<<<<<<<<<
+ *
+ * if lhs.__class__ in native_numeric_types:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3181, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_rhs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3181, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_rhs};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3181, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_rhs};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3181, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3181, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_rhs);
+ __Pyx_GIVEREF(__pyx_v_rhs);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_rhs);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3181, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_rhs, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3180
+ * if not (lhs.__class__ in native_types or lhs.is_expression_type()):
+ * lhs = _process_arg(lhs)
+ * if not (rhs.__class__ in native_types or rhs.is_expression_type()): # <<<<<<<<<<<<<<
+ * rhs = _process_arg(rhs)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3183
+ * rhs = _process_arg(rhs)
+ *
+ * if lhs.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * lhs = as_numeric(lhs)
+ * elif lhs.is_relational():
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3183, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_7 = (__pyx_t_6 != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3184
+ *
+ * if lhs.__class__ in native_numeric_types:
+ * lhs = as_numeric(lhs) # <<<<<<<<<<<<<<
+ * elif lhs.is_relational():
+ * lhs_is_relational = True
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_as_numeric); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3184, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_lhs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3184, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_lhs};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3184, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_lhs};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3184, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3184, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_GIVEREF(__pyx_v_lhs);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_lhs);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3184, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_lhs, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3183
+ * rhs = _process_arg(rhs)
+ *
+ * if lhs.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * lhs = as_numeric(lhs)
+ * elif lhs.is_relational():
+ */
+ goto __pyx_L9;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3185
+ * if lhs.__class__ in native_numeric_types:
+ * lhs = as_numeric(lhs)
+ * elif lhs.is_relational(): # <<<<<<<<<<<<<<
+ * lhs_is_relational = True
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_is_relational); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3185, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3185, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3185, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3185, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3186
+ * lhs = as_numeric(lhs)
+ * elif lhs.is_relational():
+ * lhs_is_relational = True # <<<<<<<<<<<<<<
+ *
+ * if rhs.__class__ in native_numeric_types:
+ */
+ __pyx_v_lhs_is_relational = 1;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3185
+ * if lhs.__class__ in native_numeric_types:
+ * lhs = as_numeric(lhs)
+ * elif lhs.is_relational(): # <<<<<<<<<<<<<<
+ * lhs_is_relational = True
+ *
+ */
+ }
+ __pyx_L9:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3188
+ * lhs_is_relational = True
+ *
+ * if rhs.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * rhs = as_numeric(rhs)
+ * elif rhs.is_relational():
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3188, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3188, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3188, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = (__pyx_t_7 != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3189
+ *
+ * if rhs.__class__ in native_numeric_types:
+ * rhs = as_numeric(rhs) # <<<<<<<<<<<<<<
+ * elif rhs.is_relational():
+ * rhs_is_relational = True
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_as_numeric); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3189, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_rhs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3189, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_rhs};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3189, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_rhs};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3189, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3189, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_rhs);
+ __Pyx_GIVEREF(__pyx_v_rhs);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_rhs);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3189, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_rhs, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3188
+ * lhs_is_relational = True
+ *
+ * if rhs.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * rhs = as_numeric(rhs)
+ * elif rhs.is_relational():
+ */
+ goto __pyx_L10;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3190
+ * if rhs.__class__ in native_numeric_types:
+ * rhs = as_numeric(rhs)
+ * elif rhs.is_relational(): # <<<<<<<<<<<<<<
+ * rhs_is_relational = True
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_is_relational); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3190, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3190, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3190, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3190, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3191
+ * rhs = as_numeric(rhs)
+ * elif rhs.is_relational():
+ * rhs_is_relational = True # <<<<<<<<<<<<<<
+ *
+ * if _chainedInequality.prev is not None:
+ */
+ __pyx_v_rhs_is_relational = 1;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3190
+ * if rhs.__class__ in native_numeric_types:
+ * rhs = as_numeric(rhs)
+ * elif rhs.is_relational(): # <<<<<<<<<<<<<<
+ * rhs_is_relational = True
+ *
+ */
+ }
+ __pyx_L10:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3193
+ * rhs_is_relational = True
+ *
+ * if _chainedInequality.prev is not None: # <<<<<<<<<<<<<<
+ * prevExpr = _chainedInequality.prev
+ * match = []
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3193, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_prev); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3193, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_6 = (__pyx_t_2 != Py_None);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_7 = (__pyx_t_6 != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3194
+ *
+ * if _chainedInequality.prev is not None:
+ * prevExpr = _chainedInequality.prev # <<<<<<<<<<<<<<
+ * match = []
+ * # This is tricky because the expression could have been posed
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_prev); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_prevExpr = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3195
+ * if _chainedInequality.prev is not None:
+ * prevExpr = _chainedInequality.prev
+ * match = [] # <<<<<<<<<<<<<<
+ * # This is tricky because the expression could have been posed
+ * # with >= operators, so we must figure out which arguments
+ */
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3195, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_v_match = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3202
+ * # match, and this should be converted into an equality
+ * # expression.
+ * for i,arg in enumerate(_chainedInequality.cloned_from): # <<<<<<<<<<<<<<
+ * if arg == cloned_from[0]:
+ * match.append((i,0))
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_3 = __pyx_int_0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_cloned_from); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
+ __pyx_t_9 = NULL;
+ } else {
+ __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3202, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_9)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 3202, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 3202, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_9(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 3202, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_t_3, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3202, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3);
+ __pyx_t_3 = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3203
+ * # expression.
+ * for i,arg in enumerate(_chainedInequality.cloned_from):
+ * if arg == cloned_from[0]: # <<<<<<<<<<<<<<
+ * match.append((i,0))
+ * elif arg == cloned_from[1]:
+ */
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cloned_from, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3203, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyObject_RichCompare(__pyx_v_arg, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3203, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3203, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3204
+ * for i,arg in enumerate(_chainedInequality.cloned_from):
+ * if arg == cloned_from[0]:
+ * match.append((i,0)) # <<<<<<<<<<<<<<
+ * elif arg == cloned_from[1]:
+ * match.append((i,1))
+ */
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_i);
+ __Pyx_GIVEREF(__pyx_v_i);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_i);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_int_0);
+ __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_match, __pyx_t_5); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3204, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3203
+ * # expression.
+ * for i,arg in enumerate(_chainedInequality.cloned_from):
+ * if arg == cloned_from[0]: # <<<<<<<<<<<<<<
+ * match.append((i,0))
+ * elif arg == cloned_from[1]:
+ */
+ goto __pyx_L14;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3205
+ * if arg == cloned_from[0]:
+ * match.append((i,0))
+ * elif arg == cloned_from[1]: # <<<<<<<<<<<<<<
+ * match.append((i,1))
+ * if etype == _eq:
+ */
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_cloned_from, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_arg, __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3205, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3205, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3206
+ * match.append((i,0))
+ * elif arg == cloned_from[1]:
+ * match.append((i,1)) # <<<<<<<<<<<<<<
+ * if etype == _eq:
+ * raise TypeError(_chainedInequality.error_message())
+ */
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3206, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_i);
+ __Pyx_GIVEREF(__pyx_v_i);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_i);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_1);
+ __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_match, __pyx_t_1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 3206, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3205
+ * if arg == cloned_from[0]:
+ * match.append((i,0))
+ * elif arg == cloned_from[1]: # <<<<<<<<<<<<<<
+ * match.append((i,1))
+ * if etype == _eq:
+ */
+ }
+ __pyx_L14:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3202
+ * # match, and this should be converted into an equality
+ * # expression.
+ * for i,arg in enumerate(_chainedInequality.cloned_from): # <<<<<<<<<<<<<<
+ * if arg == cloned_from[0]:
+ * match.append((i,0))
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3207
+ * elif arg == cloned_from[1]:
+ * match.append((i,1))
+ * if etype == _eq: # <<<<<<<<<<<<<<
+ * raise TypeError(_chainedInequality.error_message())
+ * if len(match) == 1:
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_eq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3207, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3207, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3207, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3208
+ * match.append((i,1))
+ * if etype == _eq:
+ * raise TypeError(_chainedInequality.error_message()) # <<<<<<<<<<<<<<
+ * if len(match) == 1:
+ * if match[0][0] == match[0][1]:
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3208, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3208, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 3208, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3207
+ * elif arg == cloned_from[1]:
+ * match.append((i,1))
+ * if etype == _eq: # <<<<<<<<<<<<<<
+ * raise TypeError(_chainedInequality.error_message())
+ * if len(match) == 1:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3209
+ * if etype == _eq:
+ * raise TypeError(_chainedInequality.error_message())
+ * if len(match) == 1: # <<<<<<<<<<<<<<
+ * if match[0][0] == match[0][1]:
+ * raise TypeError(_chainedInequality.error_message(
+ */
+ __pyx_t_8 = PyList_GET_SIZE(__pyx_v_match); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3209, __pyx_L1_error)
+ __pyx_t_7 = ((__pyx_t_8 == 1) != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3210
+ * raise TypeError(_chainedInequality.error_message())
+ * if len(match) == 1:
+ * if match[0][0] == match[0][1]: # <<<<<<<<<<<<<<
+ * raise TypeError(_chainedInequality.error_message(
+ * "Attempting to form a compound inequality with two "
+ */
+ __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_match, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_match, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyObject_RichCompare(__pyx_t_1, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3210, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3210, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3211
+ * if len(match) == 1:
+ * if match[0][0] == match[0][1]:
+ * raise TypeError(_chainedInequality.error_message( # <<<<<<<<<<<<<<
+ * "Attempting to form a compound inequality with two "
+ * "%s bounds" % ('lower' if match[0][0] else 'upper',)))
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_error_message); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3213
+ * raise TypeError(_chainedInequality.error_message(
+ * "Attempting to form a compound inequality with two "
+ * "%s bounds" % ('lower' if match[0][0] else 'upper',))) # <<<<<<<<<<<<<<
+ * if not match[0][1]:
+ * cloned_from = _chainedInequality.cloned_from + (cloned_from[1],)
+ */
+ __pyx_t_5 = __Pyx_GetItemInt_List(__pyx_v_match, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3213, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_11 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3213, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3213, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ if (__pyx_t_7) {
+ __Pyx_INCREF(__pyx_n_s_lower);
+ __pyx_t_3 = __pyx_n_s_lower;
+ } else {
+ __Pyx_INCREF(__pyx_n_s_upper);
+ __pyx_t_3 = __pyx_n_s_upper;
+ }
+ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3213, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Attempting_to_form_a_compound_in, __pyx_t_11); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3213, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_11) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3211, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_3};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3211, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_11, __pyx_t_3};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3211, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3211
+ * if len(match) == 1:
+ * if match[0][0] == match[0][1]:
+ * raise TypeError(_chainedInequality.error_message( # <<<<<<<<<<<<<<
+ * "Attempting to form a compound inequality with two "
+ * "%s bounds" % ('lower' if match[0][0] else 'upper',)))
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 3211, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3210
+ * raise TypeError(_chainedInequality.error_message())
+ * if len(match) == 1:
+ * if match[0][0] == match[0][1]: # <<<<<<<<<<<<<<
+ * raise TypeError(_chainedInequality.error_message(
+ * "Attempting to form a compound inequality with two "
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3214
+ * "Attempting to form a compound inequality with two "
+ * "%s bounds" % ('lower' if match[0][0] else 'upper',)))
+ * if not match[0][1]: # <<<<<<<<<<<<<<
+ * cloned_from = _chainedInequality.cloned_from + (cloned_from[1],)
+ * lhs = prevExpr
+ */
+ __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_match, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3214, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3214, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3214, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_6 = ((!__pyx_t_7) != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3215
+ * "%s bounds" % ('lower' if match[0][0] else 'upper',)))
+ * if not match[0][1]:
+ * cloned_from = _chainedInequality.cloned_from + (cloned_from[1],) # <<<<<<<<<<<<<<
+ * lhs = prevExpr
+ * lhs_is_relational = True
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3215, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_cloned_from); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3215, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cloned_from, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3215, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3215, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Add(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3215, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF_SET(__pyx_v_cloned_from, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3216
+ * if not match[0][1]:
+ * cloned_from = _chainedInequality.cloned_from + (cloned_from[1],)
+ * lhs = prevExpr # <<<<<<<<<<<<<<
+ * lhs_is_relational = True
+ * else:
+ */
+ __Pyx_INCREF(__pyx_v_prevExpr);
+ __Pyx_DECREF_SET(__pyx_v_lhs, __pyx_v_prevExpr);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3217
+ * cloned_from = _chainedInequality.cloned_from + (cloned_from[1],)
+ * lhs = prevExpr
+ * lhs_is_relational = True # <<<<<<<<<<<<<<
+ * else:
+ * cloned_from = (cloned_from[0],) + _chainedInequality.cloned_from
+ */
+ __pyx_v_lhs_is_relational = 1;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3214
+ * "Attempting to form a compound inequality with two "
+ * "%s bounds" % ('lower' if match[0][0] else 'upper',)))
+ * if not match[0][1]: # <<<<<<<<<<<<<<
+ * cloned_from = _chainedInequality.cloned_from + (cloned_from[1],)
+ * lhs = prevExpr
+ */
+ goto __pyx_L18;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3219
+ * lhs_is_relational = True
+ * else:
+ * cloned_from = (cloned_from[0],) + _chainedInequality.cloned_from # <<<<<<<<<<<<<<
+ * rhs = prevExpr
+ * rhs_is_relational = True
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_v_cloned_from, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3219, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3219, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3219, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_cloned_from); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3219, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Add(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3219, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_cloned_from, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3220
+ * else:
+ * cloned_from = (cloned_from[0],) + _chainedInequality.cloned_from
+ * rhs = prevExpr # <<<<<<<<<<<<<<
+ * rhs_is_relational = True
+ * elif len(match) == 2:
+ */
+ __Pyx_INCREF(__pyx_v_prevExpr);
+ __Pyx_DECREF_SET(__pyx_v_rhs, __pyx_v_prevExpr);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3221
+ * cloned_from = (cloned_from[0],) + _chainedInequality.cloned_from
+ * rhs = prevExpr
+ * rhs_is_relational = True # <<<<<<<<<<<<<<
+ * elif len(match) == 2:
+ * # Special case: implicit equality constraint posed as a <= b <= a
+ */
+ __pyx_v_rhs_is_relational = 1;
+ }
+ __pyx_L18:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3209
+ * if etype == _eq:
+ * raise TypeError(_chainedInequality.error_message())
+ * if len(match) == 1: # <<<<<<<<<<<<<<
+ * if match[0][0] == match[0][1]:
+ * raise TypeError(_chainedInequality.error_message(
+ */
+ goto __pyx_L16;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3222
+ * rhs = prevExpr
+ * rhs_is_relational = True
+ * elif len(match) == 2: # <<<<<<<<<<<<<<
+ * # Special case: implicit equality constraint posed as a <= b <= a
+ * if prevExpr._strict or etype == _lt:
+ */
+ __pyx_t_8 = PyList_GET_SIZE(__pyx_v_match); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 3222, __pyx_L1_error)
+ __pyx_t_6 = ((__pyx_t_8 == 2) != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3224
+ * elif len(match) == 2:
+ * # Special case: implicit equality constraint posed as a <= b <= a
+ * if prevExpr._strict or etype == _lt: # <<<<<<<<<<<<<<
+ * _chainedInequality.prev = None
+ * raise TypeError("Cannot create a compound inequality with "
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_prevExpr, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3224, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3224, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (!__pyx_t_7) {
+ } else {
+ __pyx_t_6 = __pyx_t_7;
+ goto __pyx_L20_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_lt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3224, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3224, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 3224, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_6 = __pyx_t_7;
+ __pyx_L20_bool_binop_done:;
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3225
+ * # Special case: implicit equality constraint posed as a <= b <= a
+ * if prevExpr._strict or etype == _lt:
+ * _chainedInequality.prev = None # <<<<<<<<<<<<<<
+ * raise TypeError("Cannot create a compound inequality with "
+ * "identical upper and lower\n\tbounds using strict "
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3225, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_prev, Py_None) < 0) __PYX_ERR(0, 3225, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3229
+ * "identical upper and lower\n\tbounds using strict "
+ * "inequalities: constraint infeasible:\n\t%s and "
+ * "%s < %s" % ( prevExpr.to_string(), lhs, rhs )) # <<<<<<<<<<<<<<
+ * if match[0] == (0,0):
+ * # This is a particularly weird case where someone
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_prevExpr, __pyx_n_s_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3229, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3229, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_GIVEREF(__pyx_v_lhs);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_lhs);
+ __Pyx_INCREF(__pyx_v_rhs);
+ __Pyx_GIVEREF(__pyx_v_rhs);
+ PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_rhs);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_create_a_compound_inequal, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3226
+ * if prevExpr._strict or etype == _lt:
+ * _chainedInequality.prev = None
+ * raise TypeError("Cannot create a compound inequality with " # <<<<<<<<<<<<<<
+ * "identical upper and lower\n\tbounds using strict "
+ * "inequalities: constraint infeasible:\n\t%s and "
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 3226, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3224
+ * elif len(match) == 2:
+ * # Special case: implicit equality constraint posed as a <= b <= a
+ * if prevExpr._strict or etype == _lt: # <<<<<<<<<<<<<<
+ * _chainedInequality.prev = None
+ * raise TypeError("Cannot create a compound inequality with "
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3230
+ * "inequalities: constraint infeasible:\n\t%s and "
+ * "%s < %s" % ( prevExpr.to_string(), lhs, rhs ))
+ * if match[0] == (0,0): # <<<<<<<<<<<<<<
+ * # This is a particularly weird case where someone
+ * # evaluates the *same* inequality twice in a row. This
+ */
+ __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_match, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3230, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyObject_RichCompare(__pyx_t_2, __pyx_tuple__38, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3230, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3230, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3235
+ * # should always be an error (you can, for example, get
+ * # it with "0 <= a >= 0").
+ * raise TypeError(_chainedInequality.error_message()) # <<<<<<<<<<<<<<
+ * etype = _eq
+ * else:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_error_message); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3235, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3235, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 3235, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3230
+ * "inequalities: constraint infeasible:\n\t%s and "
+ * "%s < %s" % ( prevExpr.to_string(), lhs, rhs ))
+ * if match[0] == (0,0): # <<<<<<<<<<<<<<
+ * # This is a particularly weird case where someone
+ * # evaluates the *same* inequality twice in a row. This
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3236
+ * # it with "0 <= a >= 0").
+ * raise TypeError(_chainedInequality.error_message())
+ * etype = _eq # <<<<<<<<<<<<<<
+ * else:
+ * raise TypeError(_chainedInequality.error_message())
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_eq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3236, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_etype, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3222
+ * rhs = prevExpr
+ * rhs_is_relational = True
+ * elif len(match) == 2: # <<<<<<<<<<<<<<
+ * # Special case: implicit equality constraint posed as a <= b <= a
+ * if prevExpr._strict or etype == _lt:
+ */
+ goto __pyx_L16;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3238
+ * etype = _eq
+ * else:
+ * raise TypeError(_chainedInequality.error_message()) # <<<<<<<<<<<<<<
+ * _chainedInequality.prev = None
+ *
+ */
+ /*else*/ {
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_error_message); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3238, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3238, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 3238, __pyx_L1_error)
+ }
+ __pyx_L16:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3239
+ * else:
+ * raise TypeError(_chainedInequality.error_message())
+ * _chainedInequality.prev = None # <<<<<<<<<<<<<<
+ *
+ * if etype == _eq:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_prev, Py_None) < 0) __PYX_ERR(0, 3239, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3193
+ * rhs_is_relational = True
+ *
+ * if _chainedInequality.prev is not None: # <<<<<<<<<<<<<<
+ * prevExpr = _chainedInequality.prev
+ * match = []
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3241
+ * _chainedInequality.prev = None
+ *
+ * if etype == _eq: # <<<<<<<<<<<<<<
+ * if lhs_is_relational or rhs_is_relational:
+ * if lhs_is_relational:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_eq); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3241, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3241, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3241, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3242
+ *
+ * if etype == _eq:
+ * if lhs_is_relational or rhs_is_relational: # <<<<<<<<<<<<<<
+ * if lhs_is_relational:
+ * val = lhs.to_string()
+ */
+ __pyx_t_7 = (__pyx_v_lhs_is_relational != 0);
+ if (!__pyx_t_7) {
+ } else {
+ __pyx_t_6 = __pyx_t_7;
+ goto __pyx_L25_bool_binop_done;
+ }
+ __pyx_t_7 = (__pyx_v_rhs_is_relational != 0);
+ __pyx_t_6 = __pyx_t_7;
+ __pyx_L25_bool_binop_done:;
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3243
+ * if etype == _eq:
+ * if lhs_is_relational or rhs_is_relational:
+ * if lhs_is_relational: # <<<<<<<<<<<<<<
+ * val = lhs.to_string()
+ * else:
+ */
+ __pyx_t_6 = (__pyx_v_lhs_is_relational != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3244
+ * if lhs_is_relational or rhs_is_relational:
+ * if lhs_is_relational:
+ * val = lhs.to_string() # <<<<<<<<<<<<<<
+ * else:
+ * val = rhs.to_string()
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3244, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3244, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_val = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3243
+ * if etype == _eq:
+ * if lhs_is_relational or rhs_is_relational:
+ * if lhs_is_relational: # <<<<<<<<<<<<<<
+ * val = lhs.to_string()
+ * else:
+ */
+ goto __pyx_L27;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3246
+ * val = lhs.to_string()
+ * else:
+ * val = rhs.to_string() # <<<<<<<<<<<<<<
+ * raise TypeError("Cannot create an EqualityExpression where "\
+ * "one of the sub-expressions is a relational expression:\n"\
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_to_string); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3246, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3246, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_val = __pyx_t_2;
+ __pyx_t_2 = 0;
+ }
+ __pyx_L27:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3249
+ * raise TypeError("Cannot create an EqualityExpression where "\
+ * "one of the sub-expressions is a relational expression:\n"\
+ * " " + val) # <<<<<<<<<<<<<<
+ * _chainedInequality.prev = None
+ * return EqualityExpression((lhs,rhs))
+ */
+ __pyx_t_2 = PyNumber_Add(__pyx_kp_s_Cannot_create_an_EqualityExpress, __pyx_v_val); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3249, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3247
+ * else:
+ * val = rhs.to_string()
+ * raise TypeError("Cannot create an EqualityExpression where "\ # <<<<<<<<<<<<<<
+ * "one of the sub-expressions is a relational expression:\n"\
+ * " " + val)
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3247, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3247, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 3247, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3242
+ *
+ * if etype == _eq:
+ * if lhs_is_relational or rhs_is_relational: # <<<<<<<<<<<<<<
+ * if lhs_is_relational:
+ * val = lhs.to_string()
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3250
+ * "one of the sub-expressions is a relational expression:\n"\
+ * " " + val)
+ * _chainedInequality.prev = None # <<<<<<<<<<<<<<
+ * return EqualityExpression((lhs,rhs))
+ * else:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_prev, Py_None) < 0) __PYX_ERR(0, 3250, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3251
+ * " " + val)
+ * _chainedInequality.prev = None
+ * return EqualityExpression((lhs,rhs)) # <<<<<<<<<<<<<<
+ * else:
+ * if etype == _le:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_EqualityExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3251, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3251, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_GIVEREF(__pyx_v_lhs);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_lhs);
+ __Pyx_INCREF(__pyx_v_rhs);
+ __Pyx_GIVEREF(__pyx_v_rhs);
+ PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_rhs);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3251, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3251, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3251, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3251, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3251, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3241
+ * _chainedInequality.prev = None
+ *
+ * if etype == _eq: # <<<<<<<<<<<<<<
+ * if lhs_is_relational or rhs_is_relational:
+ * if lhs_is_relational:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3253
+ * return EqualityExpression((lhs,rhs))
+ * else:
+ * if etype == _le: # <<<<<<<<<<<<<<
+ * strict = False
+ * elif etype == _lt:
+ */
+ /*else*/ {
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_le); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3253, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3253, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3253, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3254
+ * else:
+ * if etype == _le:
+ * strict = False # <<<<<<<<<<<<<<
+ * elif etype == _lt:
+ * strict = True
+ */
+ __pyx_v_strict = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3253
+ * return EqualityExpression((lhs,rhs))
+ * else:
+ * if etype == _le: # <<<<<<<<<<<<<<
+ * strict = False
+ * elif etype == _lt:
+ */
+ goto __pyx_L28;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3255
+ * if etype == _le:
+ * strict = False
+ * elif etype == _lt: # <<<<<<<<<<<<<<
+ * strict = True
+ * else:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_lt); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3255, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_1, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3255, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 3255, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3256
+ * strict = False
+ * elif etype == _lt:
+ * strict = True # <<<<<<<<<<<<<<
+ * else:
+ * raise ValueError("Unknown relational expression type '%s'" % etype) #pragma: no cover
+ */
+ __pyx_v_strict = 1;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3255
+ * if etype == _le:
+ * strict = False
+ * elif etype == _lt: # <<<<<<<<<<<<<<
+ * strict = True
+ * else:
+ */
+ goto __pyx_L28;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3258
+ * strict = True
+ * else:
+ * raise ValueError("Unknown relational expression type '%s'" % etype) #pragma: no cover # <<<<<<<<<<<<<<
+ * if lhs_is_relational:
+ * if lhs.__class__ is InequalityExpression:
+ */
+ /*else*/ {
+ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_Unknown_relational_expression_ty, __pyx_v_etype); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3258, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3258, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3258, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 3258, __pyx_L1_error)
+ }
+ __pyx_L28:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3259
+ * else:
+ * raise ValueError("Unknown relational expression type '%s'" % etype) #pragma: no cover
+ * if lhs_is_relational: # <<<<<<<<<<<<<<
+ * if lhs.__class__ is InequalityExpression:
+ * if rhs_is_relational:
+ */
+ __pyx_t_6 = (__pyx_v_lhs_is_relational != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3260
+ * raise ValueError("Unknown relational expression type '%s'" % etype) #pragma: no cover
+ * if lhs_is_relational:
+ * if lhs.__class__ is InequalityExpression: # <<<<<<<<<<<<<<
+ * if rhs_is_relational:
+ * raise TypeError("Cannot create an InequalityExpression "\
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = (__pyx_t_2 == __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_7 = (__pyx_t_6 != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3261
+ * if lhs_is_relational:
+ * if lhs.__class__ is InequalityExpression:
+ * if rhs_is_relational: # <<<<<<<<<<<<<<
+ * raise TypeError("Cannot create an InequalityExpression "\
+ * "where both sub-expressions are relational "\
+ */
+ __pyx_t_7 = (__pyx_v_rhs_is_relational != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3262
+ * if lhs.__class__ is InequalityExpression:
+ * if rhs_is_relational:
+ * raise TypeError("Cannot create an InequalityExpression "\ # <<<<<<<<<<<<<<
+ * "where both sub-expressions are relational "\
+ * "expressions.")
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3262, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 3262, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3261
+ * if lhs_is_relational:
+ * if lhs.__class__ is InequalityExpression:
+ * if rhs_is_relational: # <<<<<<<<<<<<<<
+ * raise TypeError("Cannot create an InequalityExpression "\
+ * "where both sub-expressions are relational "\
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3265
+ * "where both sub-expressions are relational "\
+ * "expressions.")
+ * _chainedInequality.prev = None # <<<<<<<<<<<<<<
+ * return RangedExpression(lhs._args_ + (rhs,), (lhs._strict,strict))
+ * else:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3265, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_prev, Py_None) < 0) __PYX_ERR(0, 3265, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3266
+ * "expressions.")
+ * _chainedInequality.prev = None
+ * return RangedExpression(lhs._args_ + (rhs,), (lhs._strict,strict)) # <<<<<<<<<<<<<<
+ * else:
+ * raise TypeError("Cannot create an InequalityExpression "\
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RangedExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_args_2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_rhs);
+ __Pyx_GIVEREF(__pyx_v_rhs);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_rhs);
+ __pyx_t_3 = PyNumber_Add(__pyx_t_11, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_11 = __Pyx_PyBool_FromLong(__pyx_v_strict); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_11);
+ __pyx_t_5 = 0;
+ __pyx_t_11 = 0;
+ __pyx_t_11 = NULL;
+ __pyx_t_13 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_3, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3266, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_3, __pyx_t_12};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3266, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_11) {
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_13, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_13, __pyx_t_12);
+ __pyx_t_3 = 0;
+ __pyx_t_12 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3260
+ * raise ValueError("Unknown relational expression type '%s'" % etype) #pragma: no cover
+ * if lhs_is_relational:
+ * if lhs.__class__ is InequalityExpression: # <<<<<<<<<<<<<<
+ * if rhs_is_relational:
+ * raise TypeError("Cannot create an InequalityExpression "\
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3268
+ * return RangedExpression(lhs._args_ + (rhs,), (lhs._strict,strict))
+ * else:
+ * raise TypeError("Cannot create an InequalityExpression "\ # <<<<<<<<<<<<<<
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + lhs.to_string())
+ */
+ /*else*/ {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3270
+ * raise TypeError("Cannot create an InequalityExpression "\
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + lhs.to_string()) # <<<<<<<<<<<<<<
+ * elif rhs_is_relational:
+ * if rhs.__class__ is InequalityExpression:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_to_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3270, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3270, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3270, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Add(__pyx_kp_s_Cannot_create_an_InequalityExpre_2, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3270, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3268
+ * return RangedExpression(lhs._args_ + (rhs,), (lhs._strict,strict))
+ * else:
+ * raise TypeError("Cannot create an InequalityExpression "\ # <<<<<<<<<<<<<<
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + lhs.to_string())
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3268, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3268, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 3268, __pyx_L1_error)
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3259
+ * else:
+ * raise ValueError("Unknown relational expression type '%s'" % etype) #pragma: no cover
+ * if lhs_is_relational: # <<<<<<<<<<<<<<
+ * if lhs.__class__ is InequalityExpression:
+ * if rhs_is_relational:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3271
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + lhs.to_string())
+ * elif rhs_is_relational: # <<<<<<<<<<<<<<
+ * if rhs.__class__ is InequalityExpression:
+ * _chainedInequality.prev = None
+ */
+ __pyx_t_7 = (__pyx_v_rhs_is_relational != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3272
+ * "or ranged expression:\n " + lhs.to_string())
+ * elif rhs_is_relational:
+ * if rhs.__class__ is InequalityExpression: # <<<<<<<<<<<<<<
+ * _chainedInequality.prev = None
+ * return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict))
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3272, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3272, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = (__pyx_t_2 == __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_6 = (__pyx_t_7 != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3273
+ * elif rhs_is_relational:
+ * if rhs.__class__ is InequalityExpression:
+ * _chainedInequality.prev = None # <<<<<<<<<<<<<<
+ * return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict))
+ * else:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_t_1, __pyx_n_s_prev, Py_None) < 0) __PYX_ERR(0, 3273, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3274
+ * if rhs.__class__ is InequalityExpression:
+ * _chainedInequality.prev = None
+ * return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict)) # <<<<<<<<<<<<<<
+ * else:
+ * raise TypeError("Cannot create an InequalityExpression "\
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_RangedExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_GIVEREF(__pyx_v_lhs);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_lhs);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_args_2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = __Pyx_PyBool_FromLong(__pyx_v_strict); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_11 = PyTuple_New(2); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_11, 1, __pyx_t_5);
+ __pyx_t_12 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ __pyx_t_13 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_11};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3274, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_3, __pyx_t_11};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3274, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_13, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_13, __pyx_t_11);
+ __pyx_t_3 = 0;
+ __pyx_t_11 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3272
+ * "or ranged expression:\n " + lhs.to_string())
+ * elif rhs_is_relational:
+ * if rhs.__class__ is InequalityExpression: # <<<<<<<<<<<<<<
+ * _chainedInequality.prev = None
+ * return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3276
+ * return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict))
+ * else:
+ * raise TypeError("Cannot create an InequalityExpression "\ # <<<<<<<<<<<<<<
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + rhs.to_string())
+ */
+ /*else*/ {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3278
+ * raise TypeError("Cannot create an InequalityExpression "\
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + rhs.to_string()) # <<<<<<<<<<<<<<
+ * else:
+ * obj = InequalityExpression((lhs, rhs), strict)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_to_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3278, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3278, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Add(__pyx_kp_s_Cannot_create_an_InequalityExpre_2, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3276
+ * return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict))
+ * else:
+ * raise TypeError("Cannot create an InequalityExpression "\ # <<<<<<<<<<<<<<
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + rhs.to_string())
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 3276, __pyx_L1_error)
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3271
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + lhs.to_string())
+ * elif rhs_is_relational: # <<<<<<<<<<<<<<
+ * if rhs.__class__ is InequalityExpression:
+ * _chainedInequality.prev = None
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3280
+ * "or ranged expression:\n " + rhs.to_string())
+ * else:
+ * obj = InequalityExpression((lhs, rhs), strict) # <<<<<<<<<<<<<<
+ * #_chainedInequality.prev = obj
+ * _chainedInequality.cloned_from = cloned_from
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 3280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_12 = PyTuple_New(2); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 3280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_GIVEREF(__pyx_v_lhs);
+ PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_v_lhs);
+ __Pyx_INCREF(__pyx_v_rhs);
+ __Pyx_GIVEREF(__pyx_v_rhs);
+ PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_v_rhs);
+ __pyx_t_11 = __Pyx_PyBool_FromLong(__pyx_v_strict); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 3280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_3 = NULL;
+ __pyx_t_13 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_13 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_12, __pyx_t_11};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3280, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_12, __pyx_t_11};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_13, 2+__pyx_t_13); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3280, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_13); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 3280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_3) {
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_12);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_13, __pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_13, __pyx_t_11);
+ __pyx_t_12 = 0;
+ __pyx_t_11 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_obj = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3282
+ * obj = InequalityExpression((lhs, rhs), strict)
+ * #_chainedInequality.prev = obj
+ * _chainedInequality.cloned_from = cloned_from # <<<<<<<<<<<<<<
+ * return obj
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_chainedInequality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_t_2, __pyx_n_s_cloned_from, __pyx_v_cloned_from) < 0) __PYX_ERR(0, 3282, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3283
+ * #_chainedInequality.prev = obj
+ * _chainedInequality.cloned_from = cloned_from
+ * return obj # <<<<<<<<<<<<<<
+ *
+ * else:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_obj);
+ __pyx_r = __pyx_v_obj;
+ goto __pyx_L0;
+ }
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3165
+ *
+ * if _using_chained_inequality:
+ * def _generate_relational_expression(etype, lhs, rhs): #pragma: no cover # <<<<<<<<<<<<<<
+ * # We cannot trust Python not to recycle ID's for temporary POD data
+ * # (e.g., floats). So, if it is a "native" type, we will record the
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._generate_relational_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_cloned_from);
+ __Pyx_XDECREF(__pyx_v_prevExpr);
+ __Pyx_XDECREF(__pyx_v_match);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XDECREF(__pyx_v_arg);
+ __Pyx_XDECREF(__pyx_v_val);
+ __Pyx_XDECREF(__pyx_v_obj);
+ __Pyx_XDECREF(__pyx_v_etype);
+ __Pyx_XDECREF(__pyx_v_lhs);
+ __Pyx_XDECREF(__pyx_v_rhs);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":3287
+ * else:
+ *
+ * def _generate_relational_expression(etype, lhs, rhs): #pragma: no cover # <<<<<<<<<<<<<<
+ * rhs_is_relational = False
+ * lhs_is_relational = False
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_43_generate_relational_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_43_generate_relational_expression = {"_generate_relational_expression", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_43_generate_relational_expression, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_43_generate_relational_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_etype = 0;
+ PyObject *__pyx_v_lhs = 0;
+ PyObject *__pyx_v_rhs = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_generate_relational_expression (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_relational_expression", 1, 3, 3, 1); __PYX_ERR(0, 3287, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_relational_expression", 1, 3, 3, 2); __PYX_ERR(0, 3287, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_generate_relational_expression") < 0)) __PYX_ERR(0, 3287, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_etype = values[0];
+ __pyx_v_lhs = values[1];
+ __pyx_v_rhs = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_generate_relational_expression", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3287, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._generate_relational_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_42_generate_relational_expression(__pyx_self, __pyx_v_etype, __pyx_v_lhs, __pyx_v_rhs);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_42_generate_relational_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_etype, PyObject *__pyx_v_lhs, PyObject *__pyx_v_rhs) {
+ int __pyx_v_rhs_is_relational;
+ int __pyx_v_lhs_is_relational;
+ PyObject *__pyx_v_val = NULL;
+ int __pyx_v_strict;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ __Pyx_RefNannySetupContext("_generate_relational_expression", 0);
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_INCREF(__pyx_v_rhs);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3288
+ *
+ * def _generate_relational_expression(etype, lhs, rhs): #pragma: no cover
+ * rhs_is_relational = False # <<<<<<<<<<<<<<
+ * lhs_is_relational = False
+ *
+ */
+ __pyx_v_rhs_is_relational = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3289
+ * def _generate_relational_expression(etype, lhs, rhs): #pragma: no cover
+ * rhs_is_relational = False
+ * lhs_is_relational = False # <<<<<<<<<<<<<<
+ *
+ * if not (lhs.__class__ in native_types or lhs.is_expression_type()):
+ */
+ __pyx_v_lhs_is_relational = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3291
+ * lhs_is_relational = False
+ *
+ * if not (lhs.__class__ in native_types or lhs.is_expression_type()): # <<<<<<<<<<<<<<
+ * lhs = _process_arg(lhs)
+ * if not (rhs.__class__ in native_types or rhs.is_expression_type()):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3291, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_1 = __pyx_t_5;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3291, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3291, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3291, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __pyx_t_5;
+ __pyx_L4_bool_binop_done:;
+ __pyx_t_5 = ((!__pyx_t_1) != 0);
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3292
+ *
+ * if not (lhs.__class__ in native_types or lhs.is_expression_type()):
+ * lhs = _process_arg(lhs) # <<<<<<<<<<<<<<
+ * if not (rhs.__class__ in native_types or rhs.is_expression_type()):
+ * rhs = _process_arg(rhs)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3292, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_lhs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3292, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_lhs};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3292, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_lhs};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3292, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3292, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_GIVEREF(__pyx_v_lhs);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_lhs);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3292, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_lhs, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3291
+ * lhs_is_relational = False
+ *
+ * if not (lhs.__class__ in native_types or lhs.is_expression_type()): # <<<<<<<<<<<<<<
+ * lhs = _process_arg(lhs)
+ * if not (rhs.__class__ in native_types or rhs.is_expression_type()):
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3293
+ * if not (lhs.__class__ in native_types or lhs.is_expression_type()):
+ * lhs = _process_arg(lhs)
+ * if not (rhs.__class__ in native_types or rhs.is_expression_type()): # <<<<<<<<<<<<<<
+ * rhs = _process_arg(rhs)
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3293, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_1 != 0);
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_5 = __pyx_t_4;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3293, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3293, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3293, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3293, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __pyx_t_4;
+ __pyx_L7_bool_binop_done:;
+ __pyx_t_4 = ((!__pyx_t_5) != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3294
+ * lhs = _process_arg(lhs)
+ * if not (rhs.__class__ in native_types or rhs.is_expression_type()):
+ * rhs = _process_arg(rhs) # <<<<<<<<<<<<<<
+ *
+ * if lhs.__class__ in native_numeric_types:
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3294, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_rhs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3294, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_rhs};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3294, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_rhs};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3294, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3294, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(__pyx_v_rhs);
+ __Pyx_GIVEREF(__pyx_v_rhs);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_rhs);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3294, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_rhs, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3293
+ * if not (lhs.__class__ in native_types or lhs.is_expression_type()):
+ * lhs = _process_arg(lhs)
+ * if not (rhs.__class__ in native_types or rhs.is_expression_type()): # <<<<<<<<<<<<<<
+ * rhs = _process_arg(rhs)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3296
+ * rhs = _process_arg(rhs)
+ *
+ * if lhs.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * # TODO: Why do we need this?
+ * lhs = as_numeric(lhs)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3296, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3296, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3296, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3298
+ * if lhs.__class__ in native_numeric_types:
+ * # TODO: Why do we need this?
+ * lhs = as_numeric(lhs) # <<<<<<<<<<<<<<
+ * elif lhs.is_relational():
+ * lhs_is_relational = True
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_as_numeric); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3298, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_lhs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3298, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_lhs};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3298, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_lhs};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3298, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3298, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_GIVEREF(__pyx_v_lhs);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_lhs);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3298, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_lhs, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3296
+ * rhs = _process_arg(rhs)
+ *
+ * if lhs.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * # TODO: Why do we need this?
+ * lhs = as_numeric(lhs)
+ */
+ goto __pyx_L9;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3299
+ * # TODO: Why do we need this?
+ * lhs = as_numeric(lhs)
+ * elif lhs.is_relational(): # <<<<<<<<<<<<<<
+ * lhs_is_relational = True
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_is_relational); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3299, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_7) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3299, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3299, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3299, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3300
+ * lhs = as_numeric(lhs)
+ * elif lhs.is_relational():
+ * lhs_is_relational = True # <<<<<<<<<<<<<<
+ *
+ * if rhs.__class__ in native_numeric_types:
+ */
+ __pyx_v_lhs_is_relational = 1;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3299
+ * # TODO: Why do we need this?
+ * lhs = as_numeric(lhs)
+ * elif lhs.is_relational(): # <<<<<<<<<<<<<<
+ * lhs_is_relational = True
+ *
+ */
+ }
+ __pyx_L9:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3302
+ * lhs_is_relational = True
+ *
+ * if rhs.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * # TODO: Why do we need this?
+ * rhs = as_numeric(rhs)
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3302, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_5 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3304
+ * if rhs.__class__ in native_numeric_types:
+ * # TODO: Why do we need this?
+ * rhs = as_numeric(rhs) # <<<<<<<<<<<<<<
+ * elif rhs.is_relational():
+ * rhs_is_relational = True
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_as_numeric); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_rhs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_rhs};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3304, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_rhs};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3304, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(__pyx_v_rhs);
+ __Pyx_GIVEREF(__pyx_v_rhs);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_rhs);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3304, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_rhs, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3302
+ * lhs_is_relational = True
+ *
+ * if rhs.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * # TODO: Why do we need this?
+ * rhs = as_numeric(rhs)
+ */
+ goto __pyx_L10;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3305
+ * # TODO: Why do we need this?
+ * rhs = as_numeric(rhs)
+ * elif rhs.is_relational(): # <<<<<<<<<<<<<<
+ * rhs_is_relational = True
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_is_relational); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3305, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3305, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3305, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3305, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3306
+ * rhs = as_numeric(rhs)
+ * elif rhs.is_relational():
+ * rhs_is_relational = True # <<<<<<<<<<<<<<
+ *
+ * if etype == _eq:
+ */
+ __pyx_v_rhs_is_relational = 1;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3305
+ * # TODO: Why do we need this?
+ * rhs = as_numeric(rhs)
+ * elif rhs.is_relational(): # <<<<<<<<<<<<<<
+ * rhs_is_relational = True
+ *
+ */
+ }
+ __pyx_L10:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3308
+ * rhs_is_relational = True
+ *
+ * if etype == _eq: # <<<<<<<<<<<<<<
+ * if lhs_is_relational or rhs_is_relational:
+ * if lhs_is_relational:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_eq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3308, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3308, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3309
+ *
+ * if etype == _eq:
+ * if lhs_is_relational or rhs_is_relational: # <<<<<<<<<<<<<<
+ * if lhs_is_relational:
+ * val = lhs.to_string()
+ */
+ __pyx_t_5 = (__pyx_v_lhs_is_relational != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_4 = __pyx_t_5;
+ goto __pyx_L13_bool_binop_done;
+ }
+ __pyx_t_5 = (__pyx_v_rhs_is_relational != 0);
+ __pyx_t_4 = __pyx_t_5;
+ __pyx_L13_bool_binop_done:;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3310
+ * if etype == _eq:
+ * if lhs_is_relational or rhs_is_relational:
+ * if lhs_is_relational: # <<<<<<<<<<<<<<
+ * val = lhs.to_string()
+ * else:
+ */
+ __pyx_t_4 = (__pyx_v_lhs_is_relational != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3311
+ * if lhs_is_relational or rhs_is_relational:
+ * if lhs_is_relational:
+ * val = lhs.to_string() # <<<<<<<<<<<<<<
+ * else:
+ * val = rhs.to_string()
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_to_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3311, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3311, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_val = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3310
+ * if etype == _eq:
+ * if lhs_is_relational or rhs_is_relational:
+ * if lhs_is_relational: # <<<<<<<<<<<<<<
+ * val = lhs.to_string()
+ * else:
+ */
+ goto __pyx_L15;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3313
+ * val = lhs.to_string()
+ * else:
+ * val = rhs.to_string() # <<<<<<<<<<<<<<
+ * raise TypeError("Cannot create an EqualityExpression where "\
+ * "one of the sub-expressions is a relational expression:\n"\
+ */
+ /*else*/ {
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_to_string); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3313, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3313, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3313, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_val = __pyx_t_3;
+ __pyx_t_3 = 0;
+ }
+ __pyx_L15:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3316
+ * raise TypeError("Cannot create an EqualityExpression where "\
+ * "one of the sub-expressions is a relational expression:\n"\
+ * " " + val) # <<<<<<<<<<<<<<
+ * return EqualityExpression((lhs,rhs))
+ * else:
+ */
+ __pyx_t_3 = PyNumber_Add(__pyx_kp_s_Cannot_create_an_EqualityExpress, __pyx_v_val); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3316, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3314
+ * else:
+ * val = rhs.to_string()
+ * raise TypeError("Cannot create an EqualityExpression where "\ # <<<<<<<<<<<<<<
+ * "one of the sub-expressions is a relational expression:\n"\
+ * " " + val)
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3314, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(0, 3314, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3309
+ *
+ * if etype == _eq:
+ * if lhs_is_relational or rhs_is_relational: # <<<<<<<<<<<<<<
+ * if lhs_is_relational:
+ * val = lhs.to_string()
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3317
+ * "one of the sub-expressions is a relational expression:\n"\
+ * " " + val)
+ * return EqualityExpression((lhs,rhs)) # <<<<<<<<<<<<<<
+ * else:
+ * if etype == _le:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EqualityExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3317, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3317, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_GIVEREF(__pyx_v_lhs);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_lhs);
+ __Pyx_INCREF(__pyx_v_rhs);
+ __Pyx_GIVEREF(__pyx_v_rhs);
+ PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_rhs);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3317, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3317, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3317, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3317, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3317, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3308
+ * rhs_is_relational = True
+ *
+ * if etype == _eq: # <<<<<<<<<<<<<<
+ * if lhs_is_relational or rhs_is_relational:
+ * if lhs_is_relational:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3319
+ * return EqualityExpression((lhs,rhs))
+ * else:
+ * if etype == _le: # <<<<<<<<<<<<<<
+ * strict = False
+ * elif etype == _lt:
+ */
+ /*else*/ {
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_le); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3319, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_3, Py_EQ); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3319, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3319, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3320
+ * else:
+ * if etype == _le:
+ * strict = False # <<<<<<<<<<<<<<
+ * elif etype == _lt:
+ * strict = True
+ */
+ __pyx_v_strict = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3319
+ * return EqualityExpression((lhs,rhs))
+ * else:
+ * if etype == _le: # <<<<<<<<<<<<<<
+ * strict = False
+ * elif etype == _lt:
+ */
+ goto __pyx_L16;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3321
+ * if etype == _le:
+ * strict = False
+ * elif etype == _lt: # <<<<<<<<<<<<<<
+ * strict = True
+ * else:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_lt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3321, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyObject_RichCompare(__pyx_v_etype, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_3); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3321, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3321, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3322
+ * strict = False
+ * elif etype == _lt:
+ * strict = True # <<<<<<<<<<<<<<
+ * else:
+ * raise ValueError("Unknown relational expression type '%s'" % etype) #pragma: no cover
+ */
+ __pyx_v_strict = 1;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3321
+ * if etype == _le:
+ * strict = False
+ * elif etype == _lt: # <<<<<<<<<<<<<<
+ * strict = True
+ * else:
+ */
+ goto __pyx_L16;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3324
+ * strict = True
+ * else:
+ * raise ValueError("Unknown relational expression type '%s'" % etype) #pragma: no cover # <<<<<<<<<<<<<<
+ * if lhs_is_relational:
+ * if lhs.__class__ is InequalityExpression:
+ */
+ /*else*/ {
+ __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Unknown_relational_expression_ty, __pyx_v_etype); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3324, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(0, 3324, __pyx_L1_error)
+ }
+ __pyx_L16:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3325
+ * else:
+ * raise ValueError("Unknown relational expression type '%s'" % etype) #pragma: no cover
+ * if lhs_is_relational: # <<<<<<<<<<<<<<
+ * if lhs.__class__ is InequalityExpression:
+ * if rhs_is_relational:
+ */
+ __pyx_t_4 = (__pyx_v_lhs_is_relational != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3326
+ * raise ValueError("Unknown relational expression type '%s'" % etype) #pragma: no cover
+ * if lhs_is_relational:
+ * if lhs.__class__ is InequalityExpression: # <<<<<<<<<<<<<<
+ * if rhs_is_relational:
+ * raise TypeError("Cannot create an InequalityExpression "\
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3326, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__pyx_t_3 == __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3327
+ * if lhs_is_relational:
+ * if lhs.__class__ is InequalityExpression:
+ * if rhs_is_relational: # <<<<<<<<<<<<<<
+ * raise TypeError("Cannot create an InequalityExpression "\
+ * "where both sub-expressions are relational "\
+ */
+ __pyx_t_5 = (__pyx_v_rhs_is_relational != 0);
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3328
+ * if lhs.__class__ is InequalityExpression:
+ * if rhs_is_relational:
+ * raise TypeError("Cannot create an InequalityExpression "\ # <<<<<<<<<<<<<<
+ * "where both sub-expressions are relational "\
+ * "expressions.")
+ */
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 3328, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3327
+ * if lhs_is_relational:
+ * if lhs.__class__ is InequalityExpression:
+ * if rhs_is_relational: # <<<<<<<<<<<<<<
+ * raise TypeError("Cannot create an InequalityExpression "\
+ * "where both sub-expressions are relational "\
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3331
+ * "where both sub-expressions are relational "\
+ * "expressions.")
+ * return RangedExpression(lhs._args_ + (rhs,), (lhs._strict,strict)) # <<<<<<<<<<<<<<
+ * else:
+ * raise TypeError("Cannot create an InequalityExpression "\
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RangedExpression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_args_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v_rhs);
+ __Pyx_GIVEREF(__pyx_v_rhs);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_rhs);
+ __pyx_t_7 = PyNumber_Add(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_strict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_8);
+ __pyx_t_6 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_t_9};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3331, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_7, __pyx_t_9};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3331, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_10, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_10, __pyx_t_9);
+ __pyx_t_7 = 0;
+ __pyx_t_9 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3331, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3326
+ * raise ValueError("Unknown relational expression type '%s'" % etype) #pragma: no cover
+ * if lhs_is_relational:
+ * if lhs.__class__ is InequalityExpression: # <<<<<<<<<<<<<<
+ * if rhs_is_relational:
+ * raise TypeError("Cannot create an InequalityExpression "\
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3333
+ * return RangedExpression(lhs._args_ + (rhs,), (lhs._strict,strict))
+ * else:
+ * raise TypeError("Cannot create an InequalityExpression "\ # <<<<<<<<<<<<<<
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + lhs.to_string())
+ */
+ /*else*/ {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3335
+ * raise TypeError("Cannot create an InequalityExpression "\
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + lhs.to_string()) # <<<<<<<<<<<<<<
+ * elif rhs_is_relational:
+ * if rhs.__class__ is InequalityExpression:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_lhs, __pyx_n_s_to_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3335, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3335, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3335, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(__pyx_kp_s_Cannot_create_an_InequalityExpre_2, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3335, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3333
+ * return RangedExpression(lhs._args_ + (rhs,), (lhs._strict,strict))
+ * else:
+ * raise TypeError("Cannot create an InequalityExpression "\ # <<<<<<<<<<<<<<
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + lhs.to_string())
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3333, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3333, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(0, 3333, __pyx_L1_error)
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3325
+ * else:
+ * raise ValueError("Unknown relational expression type '%s'" % etype) #pragma: no cover
+ * if lhs_is_relational: # <<<<<<<<<<<<<<
+ * if lhs.__class__ is InequalityExpression:
+ * if rhs_is_relational:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3336
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + lhs.to_string())
+ * elif rhs_is_relational: # <<<<<<<<<<<<<<
+ * if rhs.__class__ is InequalityExpression:
+ * return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict))
+ */
+ __pyx_t_5 = (__pyx_v_rhs_is_relational != 0);
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3337
+ * "or ranged expression:\n " + lhs.to_string())
+ * elif rhs_is_relational:
+ * if rhs.__class__ is InequalityExpression: # <<<<<<<<<<<<<<
+ * return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict))
+ * else:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3337, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3337, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = (__pyx_t_3 == __pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_5 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3338
+ * elif rhs_is_relational:
+ * if rhs.__class__ is InequalityExpression:
+ * return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict)) # <<<<<<<<<<<<<<
+ * else:
+ * raise TypeError("Cannot create an InequalityExpression "\
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_RangedExpression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_GIVEREF(__pyx_v_lhs);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_lhs);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_args_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_7 = PyNumber_Add(__pyx_t_6, __pyx_t_9); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyBool_FromLong(__pyx_v_strict); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_strict_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_6);
+ __pyx_t_9 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3338, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3338, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_t_8);
+ __pyx_t_7 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3337
+ * "or ranged expression:\n " + lhs.to_string())
+ * elif rhs_is_relational:
+ * if rhs.__class__ is InequalityExpression: # <<<<<<<<<<<<<<
+ * return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict))
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3340
+ * return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict))
+ * else:
+ * raise TypeError("Cannot create an InequalityExpression "\ # <<<<<<<<<<<<<<
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + rhs.to_string())
+ */
+ /*else*/ {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3342
+ * raise TypeError("Cannot create an InequalityExpression "\
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + rhs.to_string()) # <<<<<<<<<<<<<<
+ * else:
+ * return InequalityExpression((lhs, rhs), strict)
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_rhs, __pyx_n_s_to_string); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3342, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3342, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3342, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(__pyx_kp_s_Cannot_create_an_InequalityExpre_2, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3342, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3340
+ * return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict))
+ * else:
+ * raise TypeError("Cannot create an InequalityExpression "\ # <<<<<<<<<<<<<<
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + rhs.to_string())
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(0, 3340, __pyx_L1_error)
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3336
+ * "where one of the sub-expressions is an equality "\
+ * "or ranged expression:\n " + lhs.to_string())
+ * elif rhs_is_relational: # <<<<<<<<<<<<<<
+ * if rhs.__class__ is InequalityExpression:
+ * return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict))
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3344
+ * "or ranged expression:\n " + rhs.to_string())
+ * else:
+ * return InequalityExpression((lhs, rhs), strict) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 3344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_INCREF(__pyx_v_lhs);
+ __Pyx_GIVEREF(__pyx_v_lhs);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_lhs);
+ __Pyx_INCREF(__pyx_v_rhs);
+ __Pyx_GIVEREF(__pyx_v_rhs);
+ PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_v_rhs);
+ __pyx_t_8 = __Pyx_PyBool_FromLong(__pyx_v_strict); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 3344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_7 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_t_8};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3344, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_9, __pyx_t_8};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3344, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_10, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_10, __pyx_t_8);
+ __pyx_t_9 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3344, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+ }
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3287
+ * else:
+ *
+ * def _generate_relational_expression(etype, lhs, rhs): #pragma: no cover # <<<<<<<<<<<<<<
+ * rhs_is_relational = False
+ * lhs_is_relational = False
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._generate_relational_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_val);
+ __Pyx_XDECREF(__pyx_v_lhs);
+ __Pyx_XDECREF(__pyx_v_rhs);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/expr_pyomo5.pyx":3347
+ *
+ *
+ * def _generate_intrinsic_function_expression(arg, name, fcn): # <<<<<<<<<<<<<<
+ * if not (arg.__class__ in native_types or arg.is_expression_type()):
+ * arg = _process_arg(arg)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_45_generate_intrinsic_function_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_45_generate_intrinsic_function_expression = {"_generate_intrinsic_function_expression", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_45_generate_intrinsic_function_expression, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_11expr_pyomo5_45_generate_intrinsic_function_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_arg = 0;
+ PyObject *__pyx_v_name = 0;
+ PyObject *__pyx_v_fcn = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_generate_intrinsic_function_expression (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_arg,&__pyx_n_s_name,&__pyx_n_s_fcn,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_arg)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_intrinsic_function_expression", 1, 3, 3, 1); __PYX_ERR(0, 3347, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fcn)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_intrinsic_function_expression", 1, 3, 3, 2); __PYX_ERR(0, 3347, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_generate_intrinsic_function_expression") < 0)) __PYX_ERR(0, 3347, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_arg = values[0];
+ __pyx_v_name = values[1];
+ __pyx_v_fcn = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_generate_intrinsic_function_expression", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 3347, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._generate_intrinsic_function_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_44_generate_intrinsic_function_expression(__pyx_self, __pyx_v_arg, __pyx_v_name, __pyx_v_fcn);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_11expr_pyomo5_44_generate_intrinsic_function_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_arg, PyObject *__pyx_v_name, PyObject *__pyx_v_fcn) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ __Pyx_RefNannySetupContext("_generate_intrinsic_function_expression", 0);
+ __Pyx_INCREF(__pyx_v_arg);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3348
+ *
+ * def _generate_intrinsic_function_expression(arg, name, fcn):
+ * if not (arg.__class__ in native_types or arg.is_expression_type()): # <<<<<<<<<<<<<<
+ * arg = _process_arg(arg)
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 3348, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_1 = __pyx_t_5;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3348, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3348, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3348, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __pyx_t_5;
+ __pyx_L4_bool_binop_done:;
+ __pyx_t_5 = ((!__pyx_t_1) != 0);
+ if (__pyx_t_5) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3349
+ * def _generate_intrinsic_function_expression(arg, name, fcn):
+ * if not (arg.__class__ in native_types or arg.is_expression_type()):
+ * arg = _process_arg(arg) # <<<<<<<<<<<<<<
+ *
+ * if arg.__class__ in native_types:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_process_arg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_arg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_arg};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3349, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_arg};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3349, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_v_arg);
+ __Pyx_GIVEREF(__pyx_v_arg);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_arg);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3349, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_arg, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3348
+ *
+ * def _generate_intrinsic_function_expression(arg, name, fcn):
+ * if not (arg.__class__ in native_types or arg.is_expression_type()): # <<<<<<<<<<<<<<
+ * arg = _process_arg(arg)
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3351
+ * arg = _process_arg(arg)
+ *
+ * if arg.__class__ in native_types: # <<<<<<<<<<<<<<
+ * return fcn(arg)
+ * elif arg.is_potentially_variable():
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3351, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3351, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 3351, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_1 = (__pyx_t_5 != 0);
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3352
+ *
+ * if arg.__class__ in native_types:
+ * return fcn(arg) # <<<<<<<<<<<<<<
+ * elif arg.is_potentially_variable():
+ * return UnaryFunctionExpression(arg, name, fcn)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_fcn);
+ __pyx_t_3 = __pyx_v_fcn; __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_arg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3352, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_arg};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3352, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_v_arg};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3352, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3352, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(__pyx_v_arg);
+ __Pyx_GIVEREF(__pyx_v_arg);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_arg);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3352, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3351
+ * arg = _process_arg(arg)
+ *
+ * if arg.__class__ in native_types: # <<<<<<<<<<<<<<
+ * return fcn(arg)
+ * elif arg.is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3353
+ * if arg.__class__ in native_types:
+ * return fcn(arg)
+ * elif arg.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return UnaryFunctionExpression(arg, name, fcn)
+ * else:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_arg, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3353, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3353, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3353, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 3353, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3354
+ * return fcn(arg)
+ * elif arg.is_potentially_variable():
+ * return UnaryFunctionExpression(arg, name, fcn) # <<<<<<<<<<<<<<
+ * else:
+ * return NPV_UnaryFunctionExpression(arg, name, fcn)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_UnaryFunctionExpression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_arg, __pyx_v_name, __pyx_v_fcn};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3354, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_v_arg, __pyx_v_name, __pyx_v_fcn};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3354, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 3354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_arg);
+ __Pyx_GIVEREF(__pyx_v_arg);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_v_arg);
+ __Pyx_INCREF(__pyx_v_name);
+ __Pyx_GIVEREF(__pyx_v_name);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_v_name);
+ __Pyx_INCREF(__pyx_v_fcn);
+ __Pyx_GIVEREF(__pyx_v_fcn);
+ PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_8, __pyx_v_fcn);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3354, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3353
+ * if arg.__class__ in native_types:
+ * return fcn(arg)
+ * elif arg.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * return UnaryFunctionExpression(arg, name, fcn)
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3356
+ * return UnaryFunctionExpression(arg, name, fcn)
+ * else:
+ * return NPV_UnaryFunctionExpression(arg, name, fcn) # <<<<<<<<<<<<<<
+ *
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_NPV_UnaryFunctionExpression); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 3356, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_arg, __pyx_v_name, __pyx_v_fcn};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3356, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_7, __pyx_v_arg, __pyx_v_name, __pyx_v_fcn};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_8, 3+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3356, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 3356, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_arg);
+ __Pyx_GIVEREF(__pyx_v_arg);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_v_arg);
+ __Pyx_INCREF(__pyx_v_name);
+ __Pyx_GIVEREF(__pyx_v_name);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_v_name);
+ __Pyx_INCREF(__pyx_v_fcn);
+ __Pyx_GIVEREF(__pyx_v_fcn);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_8, __pyx_v_fcn);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3356, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3347
+ *
+ *
+ * def _generate_intrinsic_function_expression(arg, name, fcn): # <<<<<<<<<<<<<<
+ * if not (arg.__class__ in native_types or arg.is_expression_type()):
+ * arg = _process_arg(arg)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.core.expr.expr_pyomo5._generate_intrinsic_function_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_arg);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves *__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves[8];
+static int __pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves[--__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_ans);
+ Py_CLEAR(p->__pyx_v_c);
+ Py_CLEAR(p->__pyx_v_current);
+ Py_CLEAR(p->__pyx_v_dq);
+ Py_CLEAR(p->__pyx_v_node);
+ Py_CLEAR(p->__pyx_v_self);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves)))) {
+ __pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves[__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves++] = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves *)o;
+ if (p->__pyx_v_ans) {
+ e = (*v)(p->__pyx_v_ans, a); if (e) return e;
+ }
+ if (p->__pyx_v_c) {
+ e = (*v)(p->__pyx_v_c, a); if (e) return e;
+ }
+ if (p->__pyx_v_current) {
+ e = (*v)(p->__pyx_v_current, a); if (e) return e;
+ }
+ if (p->__pyx_v_dq) {
+ e = (*v)(p->__pyx_v_dq, a); if (e) return e;
+ }
+ if (p->__pyx_v_node) {
+ e = (*v)(p->__pyx_v_node, a); if (e) return e;
+ }
+ if (p->__pyx_v_self) {
+ e = (*v)(p->__pyx_v_self, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.expr.expr_pyomo5.__pyx_scope_struct__xbfs_yield_leaves", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components *__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components[8];
+static int __pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components[--__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_component_types);
+ Py_CLEAR(p->__pyx_v_expr);
+ Py_CLEAR(p->__pyx_v_v);
+ Py_CLEAR(p->__pyx_v_visitor);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components)))) {
+ __pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components[__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components++] = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components *)o;
+ if (p->__pyx_v_component_types) {
+ e = (*v)(p->__pyx_v_component_types, a); if (e) return e;
+ }
+ if (p->__pyx_v_expr) {
+ e = (*v)(p->__pyx_v_expr, a); if (e) return e;
+ }
+ if (p->__pyx_v_v) {
+ e = (*v)(p->__pyx_v_v, a); if (e) return e;
+ }
+ if (p->__pyx_v_visitor) {
+ e = (*v)(p->__pyx_v_visitor, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.expr.expr_pyomo5.__pyx_scope_struct_1_identify_components", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables *__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables[8];
+static int __pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables[--__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_expr);
+ Py_CLEAR(p->__pyx_v_include_fixed);
+ Py_CLEAR(p->__pyx_v_v);
+ Py_CLEAR(p->__pyx_v_visitor);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables)))) {
+ __pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables[__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables++] = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables *)o;
+ if (p->__pyx_v_expr) {
+ e = (*v)(p->__pyx_v_expr, a); if (e) return e;
+ }
+ if (p->__pyx_v_include_fixed) {
+ e = (*v)(p->__pyx_v_include_fixed, a); if (e) return e;
+ }
+ if (p->__pyx_v_v) {
+ e = (*v)(p->__pyx_v_v, a); if (e) return e;
+ }
+ if (p->__pyx_v_visitor) {
+ e = (*v)(p->__pyx_v_visitor, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.expr.expr_pyomo5.__pyx_scope_struct_2_identify_variables", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters *__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters[8];
+static int __pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters[--__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_expr);
+ Py_CLEAR(p->__pyx_v_v);
+ Py_CLEAR(p->__pyx_v_visitor);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters)))) {
+ __pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters[__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters++] = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters *)o;
+ if (p->__pyx_v_expr) {
+ e = (*v)(p->__pyx_v_expr, a); if (e) return e;
+ }
+ if (p->__pyx_v_v) {
+ e = (*v)(p->__pyx_v_v, a); if (e) return e;
+ }
+ if (p->__pyx_v_visitor) {
+ e = (*v)(p->__pyx_v_visitor, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.expr.expr_pyomo5.__pyx_scope_struct_3_identify_mutable_parameters", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable *__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable[8];
+static int __pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable[--__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_self);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable)))) {
+ __pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable[__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable++] = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable *)o;
+ if (p->__pyx_v_self) {
+ e = (*v)(p->__pyx_v_self, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable(PyObject *o) {
+ PyObject* tmp;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable *)o;
+ tmp = ((PyObject*)p->__pyx_v_self);
+ p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.expr.expr_pyomo5.__pyx_scope_struct_4_is_potentially_variable", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable, /*tp_traverse*/
+ __pyx_tp_clear_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr *__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr[8];
+static int __pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr[--__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_arg);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr)))) {
+ __pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr[__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_arg) {
+ e = (*v)(p->__pyx_v_arg, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.expr.expr_pyomo5.__pyx_scope_struct_5_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree *__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree[8];
+static int __pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree[--__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_result);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree)))) {
+ __pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree[__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree++] = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree *)o;
+ if (p->__pyx_v_result) {
+ e = (*v)(p->__pyx_v_result, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree(PyObject *o) {
+ PyObject* tmp;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree *)o;
+ tmp = ((PyObject*)p->__pyx_v_result);
+ p->__pyx_v_result = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.expr.expr_pyomo5.__pyx_scope_struct_6__compute_polynomial_degree", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree, /*tp_traverse*/
+ __pyx_tp_clear_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr *__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr[8];
+static int __pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr[--__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_x);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr)))) {
+ __pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr[__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr++] = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_x) {
+ e = (*v)(p->__pyx_v_x, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.expr.expr_pyomo5.__pyx_scope_struct_7_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template *__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template[8];
+static int __pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template[--__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_self);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template)))) {
+ __pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template[__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template++] = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template *)o;
+ if (p->__pyx_v_self) {
+ e = (*v)(p->__pyx_v_self, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template(PyObject *o) {
+ PyObject* tmp;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template *)o;
+ tmp = ((PyObject*)p->__pyx_v_self);
+ p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.expr.expr_pyomo5.__pyx_scope_struct_8_resolve_template", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template, /*tp_traverse*/
+ __pyx_tp_clear_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr *__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr[8];
+static int __pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr[--__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_i);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr)))) {
+ __pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr[__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr++] = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_i) {
+ e = (*v)(p->__pyx_v_i, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.expr.expr_pyomo5.__pyx_scope_struct_9_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation *__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation[8];
+static int __pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation[--__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_self);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation)))) {
+ __pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation[__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation++] = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation *)o;
+ if (p->__pyx_v_self) {
+ e = (*v)(p->__pyx_v_self, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation(PyObject *o) {
+ PyObject* tmp;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation *)o;
+ tmp = ((PyObject*)p->__pyx_v_self);
+ p->__pyx_v_self = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.expr.expr_pyomo5.__pyx_scope_struct_10__apply_operation", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation, /*tp_traverse*/
+ __pyx_tp_clear_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr *__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr[8];
+static int __pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr[--__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_c);
+ Py_CLEAR(p->__pyx_v_v);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr)))) {
+ __pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr[__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr++] = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_c) {
+ e = (*v)(p->__pyx_v_c, a); if (e) return e;
+ }
+ if (p->__pyx_v_v) {
+ e = (*v)(p->__pyx_v_v, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.expr.expr_pyomo5.__pyx_scope_struct_11_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms *__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms[8];
+static int __pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms[--__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_arg);
+ Py_CLEAR(p->__pyx_v_c);
+ Py_CLEAR(p->__pyx_v_expr);
+ Py_CLEAR(p->__pyx_v_multiplier);
+ Py_CLEAR(p->__pyx_v_term);
+ Py_CLEAR(p->__pyx_v_v);
+ Py_CLEAR(p->__pyx_t_0);
+ Py_CLEAR(p->__pyx_t_3);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms)))) {
+ __pyx_freelist_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms[__pyx_freecount_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms++] = ((struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms *p = (struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms *)o;
+ if (p->__pyx_v_arg) {
+ e = (*v)(p->__pyx_v_arg, a); if (e) return e;
+ }
+ if (p->__pyx_v_c) {
+ e = (*v)(p->__pyx_v_c, a); if (e) return e;
+ }
+ if (p->__pyx_v_expr) {
+ e = (*v)(p->__pyx_v_expr, a); if (e) return e;
+ }
+ if (p->__pyx_v_multiplier) {
+ e = (*v)(p->__pyx_v_multiplier, a); if (e) return e;
+ }
+ if (p->__pyx_v_term) {
+ e = (*v)(p->__pyx_v_term, a); if (e) return e;
+ }
+ if (p->__pyx_v_v) {
+ e = (*v)(p->__pyx_v_v, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ if (p->__pyx_t_3) {
+ e = (*v)(p->__pyx_t_3, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.expr.expr_pyomo5.__pyx_scope_struct_12__decompose_linear_terms", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static PyMethodDef __pyx_methods[] = {
+ {0, 0, 0, 0}
+};
+
+#if PY_MAJOR_VERSION >= 3
+#if CYTHON_PEP489_MULTI_PHASE_INIT
+static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
+static int __pyx_pymod_exec_expr_pyomo5(PyObject* module); /*proto*/
+static PyModuleDef_Slot __pyx_moduledef_slots[] = {
+ {Py_mod_create, (void*)__pyx_pymod_create},
+ {Py_mod_exec, (void*)__pyx_pymod_exec_expr_pyomo5},
+ {0, NULL}
+};
+#endif
+
+static struct PyModuleDef __pyx_moduledef = {
+ PyModuleDef_HEAD_INIT,
+ "expr_pyomo5",
+ 0, /* m_doc */
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ 0, /* m_size */
+ #else
+ -1, /* m_size */
+ #endif
+ __pyx_methods /* m_methods */,
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ __pyx_moduledef_slots, /* m_slots */
+ #else
+ NULL, /* m_reload */
+ #endif
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL /* m_free */
+};
+#endif
+
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+ {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
+ {&__pyx_kp_s_0, __pyx_k_0, sizeof(__pyx_k_0), 0, 0, 1, 0},
+ {&__pyx_kp_s_0_1, __pyx_k_0_1, sizeof(__pyx_k_0_1), 0, 0, 1, 0},
+ {&__pyx_kp_s_0_1_2, __pyx_k_0_1_2, sizeof(__pyx_k_0_1_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_0_1_2_2, __pyx_k_0_1_2_2, sizeof(__pyx_k_0_1_2_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_0_1_2_3_4, __pyx_k_0_1_2_3_4, sizeof(__pyx_k_0_1_2_3_4), 0, 0, 1, 0},
+ {&__pyx_kp_s_0_1_3, __pyx_k_0_1_3, sizeof(__pyx_k_0_1_3), 0, 0, 1, 0},
+ {&__pyx_kp_s_0_1_4, __pyx_k_0_1_4, sizeof(__pyx_k_0_1_4), 0, 0, 1, 0},
+ {&__pyx_kp_s_0_1_5, __pyx_k_0_1_5, sizeof(__pyx_k_0_1_5), 0, 0, 1, 0},
+ {&__pyx_kp_s_0_1_6, __pyx_k_0_1_6, sizeof(__pyx_k_0_1_6), 0, 0, 1, 0},
+ {&__pyx_kp_s_0_1_7, __pyx_k_0_1_7, sizeof(__pyx_k_0_1_7), 0, 0, 1, 0},
+ {&__pyx_kp_s_0_1_8, __pyx_k_0_1_8, sizeof(__pyx_k_0_1_8), 0, 0, 1, 0},
+ {&__pyx_kp_s_0_1_then_2_else_3, __pyx_k_0_1_then_2_else_3, sizeof(__pyx_k_0_1_then_2_else_3), 0, 0, 1, 0},
+ {&__pyx_kp_s_0_2, __pyx_k_0_2, sizeof(__pyx_k_0_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_0_3, __pyx_k_0_3, sizeof(__pyx_k_0_3), 0, 0, 1, 0},
+ {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
+ {&__pyx_kp_s_1_0, __pyx_k_1_0, sizeof(__pyx_k_1_0), 0, 0, 1, 0},
+ {&__pyx_kp_s_1_0_2, __pyx_k_1_0_2, sizeof(__pyx_k_1_0_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_1_0_3, __pyx_k_1_0_3, sizeof(__pyx_k_1_0_3), 0, 0, 1, 0},
+ {&__pyx_kp_s_1_2, __pyx_k_1_2, sizeof(__pyx_k_1_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_A_logical_if_then_else_expressi, __pyx_k_A_logical_if_then_else_expressi, sizeof(__pyx_k_A_logical_if_then_else_expressi), 0, 0, 1, 0},
+ {&__pyx_kp_s_A_mutable_ViewSumExpression_The, __pyx_k_A_mutable_ViewSumExpression_The, sizeof(__pyx_k_A_mutable_ViewSumExpression_The), 0, 0, 1, 0},
+ {&__pyx_n_s_AbsExpression, __pyx_k_AbsExpression, sizeof(__pyx_k_AbsExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_AbsExpression___init, __pyx_k_AbsExpression___init, sizeof(__pyx_k_AbsExpression___init), 0, 0, 1, 1},
+ {&__pyx_n_s_AbsExpression_construct_node, __pyx_k_AbsExpression_construct_node, sizeof(__pyx_k_AbsExpression_construct_node), 0, 0, 1, 1},
+ {&__pyx_kp_s_An_abstract_class_that_defines, __pyx_k_An_abstract_class_that_defines, sizeof(__pyx_k_An_abstract_class_that_defines), 0, 0, 1, 0},
+ {&__pyx_kp_s_An_expression_object_for_the_fu, __pyx_k_An_expression_object_for_the_fu, sizeof(__pyx_k_An_expression_object_for_the_fu), 0, 0, 1, 0},
+ {&__pyx_kp_s_An_expression_object_linear_pol, __pyx_k_An_expression_object_linear_pol, sizeof(__pyx_k_An_expression_object_linear_pol), 0, 0, 1, 0},
+ {&__pyx_kp_s_An_expression_object_used_to_de, __pyx_k_An_expression_object_used_to_de, sizeof(__pyx_k_An_expression_object_used_to_de), 0, 0, 1, 0},
+ {&__pyx_kp_s_An_object_that_defines_a_simple, __pyx_k_An_object_that_defines_a_simple, sizeof(__pyx_k_An_object_that_defines_a_simple), 0, 0, 1, 0},
+ {&__pyx_kp_s_Argument_for_expression_is_an_in, __pyx_k_Argument_for_expression_is_an_in, sizeof(__pyx_k_Argument_for_expression_is_an_in), 0, 0, 1, 0},
+ {&__pyx_kp_s_Attempting_to_form_a_compound_in, __pyx_k_Attempting_to_form_a_compound_in, sizeof(__pyx_k_Attempting_to_form_a_compound_in), 0, 0, 1, 0},
+ {&__pyx_kp_s_Cannot_create_a_compound_inequal, __pyx_k_Cannot_create_a_compound_inequal, sizeof(__pyx_k_Cannot_create_a_compound_inequal), 0, 0, 1, 0},
+ {&__pyx_kp_s_Cannot_create_an_EqualityExpress, __pyx_k_Cannot_create_an_EqualityExpress, sizeof(__pyx_k_Cannot_create_an_EqualityExpress), 0, 0, 1, 0},
+ {&__pyx_kp_s_Cannot_create_an_InequalityExpre, __pyx_k_Cannot_create_an_InequalityExpre, sizeof(__pyx_k_Cannot_create_an_InequalityExpre), 0, 0, 1, 0},
+ {&__pyx_kp_s_Cannot_create_an_InequalityExpre_2, __pyx_k_Cannot_create_an_InequalityExpre_2, sizeof(__pyx_k_Cannot_create_an_InequalityExpre_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_Cannot_multiply_a_linear_express, __pyx_k_Cannot_multiply_a_linear_express, sizeof(__pyx_k_Cannot_multiply_a_linear_express), 0, 0, 1, 0},
+ {&__pyx_kp_s_Chained_inequalities_are_depreca, __pyx_k_Chained_inequalities_are_depreca, sizeof(__pyx_k_Chained_inequalities_are_depreca), 0, 0, 1, 0},
+ {&__pyx_n_s_CloneVisitor, __pyx_k_CloneVisitor, sizeof(__pyx_k_CloneVisitor), 0, 0, 1, 1},
+ {&__pyx_n_s_CloneVisitor___init, __pyx_k_CloneVisitor___init, sizeof(__pyx_k_CloneVisitor___init), 0, 0, 1, 1},
+ {&__pyx_n_s_CloneVisitor_visit, __pyx_k_CloneVisitor_visit, sizeof(__pyx_k_CloneVisitor_visit), 0, 0, 1, 1},
+ {&__pyx_n_s_CloneVisitor_visiting_potential, __pyx_k_CloneVisitor_visiting_potential, sizeof(__pyx_k_CloneVisitor_visiting_potential), 0, 0, 1, 1},
+ {&__pyx_n_s_ComponentVisitor, __pyx_k_ComponentVisitor, sizeof(__pyx_k_ComponentVisitor), 0, 0, 1, 1},
+ {&__pyx_n_s_ComponentVisitor___init, __pyx_k_ComponentVisitor___init, sizeof(__pyx_k_ComponentVisitor___init), 0, 0, 1, 1},
+ {&__pyx_n_s_ComponentVisitor_visit, __pyx_k_ComponentVisitor_visit, sizeof(__pyx_k_ComponentVisitor_visit), 0, 0, 1, 1},
+ {&__pyx_kp_s_Context_manager_for_counting_cl, __pyx_k_Context_manager_for_counting_cl, sizeof(__pyx_k_Context_manager_for_counting_cl), 0, 0, 1, 0},
+ {&__pyx_kp_s_Context_manager_for_mutable_lin, __pyx_k_Context_manager_for_mutable_lin, sizeof(__pyx_k_Context_manager_for_mutable_lin), 0, 0, 1, 0},
+ {&__pyx_kp_s_Context_manager_for_mutable_sum, __pyx_k_Context_manager_for_mutable_sum, sizeof(__pyx_k_Context_manager_for_mutable_sum), 0, 0, 1, 0},
+ {&__pyx_kp_s_Derived_expression_s_failed_to_i, __pyx_k_Derived_expression_s_failed_to_i, sizeof(__pyx_k_Derived_expression_s_failed_to_i), 0, 0, 1, 0},
+ {&__pyx_kp_s_Derived_expression_s_failed_to_i_2, __pyx_k_Derived_expression_s_failed_to_i_2, sizeof(__pyx_k_Derived_expression_s_failed_to_i_2), 0, 0, 1, 0},
+ {&__pyx_n_s_ELSE, __pyx_k_ELSE, sizeof(__pyx_k_ELSE), 0, 0, 1, 1},
+ {&__pyx_n_s_EqualityExpression, __pyx_k_EqualityExpression, sizeof(__pyx_k_EqualityExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_EqualityExpression___nonzero, __pyx_k_EqualityExpression___nonzero, sizeof(__pyx_k_EqualityExpression___nonzero), 0, 0, 1, 1},
+ {&__pyx_n_s_EqualityExpression__apply_operat, __pyx_k_EqualityExpression__apply_operat, sizeof(__pyx_k_EqualityExpression__apply_operat), 0, 0, 1, 1},
+ {&__pyx_n_s_EqualityExpression__precedence, __pyx_k_EqualityExpression__precedence, sizeof(__pyx_k_EqualityExpression__precedence), 0, 0, 1, 1},
+ {&__pyx_n_s_EqualityExpression__to_string, __pyx_k_EqualityExpression__to_string, sizeof(__pyx_k_EqualityExpression__to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_EqualityExpression_is_constant, __pyx_k_EqualityExpression_is_constant, sizeof(__pyx_k_EqualityExpression_is_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_EqualityExpression_is_potentiall, __pyx_k_EqualityExpression_is_potentiall, sizeof(__pyx_k_EqualityExpression_is_potentiall), 0, 0, 1, 1},
+ {&__pyx_n_s_EqualityExpression_is_relational, __pyx_k_EqualityExpression_is_relational, sizeof(__pyx_k_EqualityExpression_is_relational), 0, 0, 1, 1},
+ {&__pyx_n_s_EqualityExpression_nargs, __pyx_k_EqualityExpression_nargs, sizeof(__pyx_k_EqualityExpression_nargs), 0, 0, 1, 1},
+ {&__pyx_kp_s_Equality_expression_x_y, __pyx_k_Equality_expression_x_y, sizeof(__pyx_k_Equality_expression_x_y), 0, 0, 1, 0},
+ {&__pyx_n_s_EvaluationVisitor, __pyx_k_EvaluationVisitor, sizeof(__pyx_k_EvaluationVisitor), 0, 0, 1, 1},
+ {&__pyx_n_s_EvaluationVisitor_visit, __pyx_k_EvaluationVisitor_visit, sizeof(__pyx_k_EvaluationVisitor_visit), 0, 0, 1, 1},
+ {&__pyx_n_s_EvaluationVisitor_visiting_pote, __pyx_k_EvaluationVisitor_visiting_pote, sizeof(__pyx_k_EvaluationVisitor_visiting_pote), 0, 0, 1, 1},
+ {&__pyx_n_s_Expr_if, __pyx_k_Expr_if, sizeof(__pyx_k_Expr_if), 0, 0, 1, 1},
+ {&__pyx_n_s_Expr_if___getstate, __pyx_k_Expr_if___getstate, sizeof(__pyx_k_Expr_if___getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_Expr_if___init, __pyx_k_Expr_if___init, sizeof(__pyx_k_Expr_if___init), 0, 0, 1, 1},
+ {&__pyx_n_s_Expr_if__apply_operation, __pyx_k_Expr_if__apply_operation, sizeof(__pyx_k_Expr_if__apply_operation), 0, 0, 1, 1},
+ {&__pyx_n_s_Expr_if__compute_polynomial_degr, __pyx_k_Expr_if__compute_polynomial_degr, sizeof(__pyx_k_Expr_if__compute_polynomial_degr), 0, 0, 1, 1},
+ {&__pyx_n_s_Expr_if__is_fixed, __pyx_k_Expr_if__is_fixed, sizeof(__pyx_k_Expr_if__is_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_Expr_if__to_string, __pyx_k_Expr_if__to_string, sizeof(__pyx_k_Expr_if__to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_Expr_if_getname, __pyx_k_Expr_if_getname, sizeof(__pyx_k_Expr_if_getname), 0, 0, 1, 1},
+ {&__pyx_n_s_Expr_if_is_constant, __pyx_k_Expr_if_is_constant, sizeof(__pyx_k_Expr_if_is_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_Expr_if_is_potentially_variable, __pyx_k_Expr_if_is_potentially_variable, sizeof(__pyx_k_Expr_if_is_potentially_variable), 0, 0, 1, 1},
+ {&__pyx_n_s_Expr_if_nargs, __pyx_k_Expr_if_nargs, sizeof(__pyx_k_Expr_if_nargs), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase, __pyx_k_ExpressionBase, sizeof(__pyx_k_ExpressionBase), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase___call, __pyx_k_ExpressionBase___call, sizeof(__pyx_k_ExpressionBase___call), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase___deepcopy, __pyx_k_ExpressionBase___deepcopy, sizeof(__pyx_k_ExpressionBase___deepcopy), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase___getstate, __pyx_k_ExpressionBase___getstate, sizeof(__pyx_k_ExpressionBase___getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase___init, __pyx_k_ExpressionBase___init, sizeof(__pyx_k_ExpressionBase___init), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase___nonzero, __pyx_k_ExpressionBase___nonzero, sizeof(__pyx_k_ExpressionBase___nonzero), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase___str, __pyx_k_ExpressionBase___str, sizeof(__pyx_k_ExpressionBase___str), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase__apply_operation, __pyx_k_ExpressionBase__apply_operation, sizeof(__pyx_k_ExpressionBase__apply_operation), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase__compute_polynomi, __pyx_k_ExpressionBase__compute_polynomi, sizeof(__pyx_k_ExpressionBase__compute_polynomi), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase__is_fixed, __pyx_k_ExpressionBase__is_fixed, sizeof(__pyx_k_ExpressionBase__is_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase__precedence, __pyx_k_ExpressionBase__precedence, sizeof(__pyx_k_ExpressionBase__precedence), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase__to_string, __pyx_k_ExpressionBase__to_string, sizeof(__pyx_k_ExpressionBase__to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase_arg, __pyx_k_ExpressionBase_arg, sizeof(__pyx_k_ExpressionBase_arg), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase_args, __pyx_k_ExpressionBase_args, sizeof(__pyx_k_ExpressionBase_args), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase_clone, __pyx_k_ExpressionBase_clone, sizeof(__pyx_k_ExpressionBase_clone), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase_construct_node, __pyx_k_ExpressionBase_construct_node, sizeof(__pyx_k_ExpressionBase_construct_node), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase_getname, __pyx_k_ExpressionBase_getname, sizeof(__pyx_k_ExpressionBase_getname), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase_is_constant, __pyx_k_ExpressionBase_is_constant, sizeof(__pyx_k_ExpressionBase_is_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase_is_expression_typ, __pyx_k_ExpressionBase_is_expression_typ, sizeof(__pyx_k_ExpressionBase_is_expression_typ), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase_is_fixed, __pyx_k_ExpressionBase_is_fixed, sizeof(__pyx_k_ExpressionBase_is_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase_is_named_expressi, __pyx_k_ExpressionBase_is_named_expressi, sizeof(__pyx_k_ExpressionBase_is_named_expressi), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase_is_potentially_va, __pyx_k_ExpressionBase_is_potentially_va, sizeof(__pyx_k_ExpressionBase_is_potentially_va), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase_nargs, __pyx_k_ExpressionBase_nargs, sizeof(__pyx_k_ExpressionBase_nargs), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase_polynomial_degree, __pyx_k_ExpressionBase_polynomial_degree, sizeof(__pyx_k_ExpressionBase_polynomial_degree), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase_size, __pyx_k_ExpressionBase_size, sizeof(__pyx_k_ExpressionBase_size), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionBase_to_string, __pyx_k_ExpressionBase_to_string, sizeof(__pyx_k_ExpressionBase_to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionReplacementVisitor, __pyx_k_ExpressionReplacementVisitor, sizeof(__pyx_k_ExpressionReplacementVisitor), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionReplacementVisitor___i, __pyx_k_ExpressionReplacementVisitor___i, sizeof(__pyx_k_ExpressionReplacementVisitor___i), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionReplacementVisitor_con, __pyx_k_ExpressionReplacementVisitor_con, sizeof(__pyx_k_ExpressionReplacementVisitor_con), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionReplacementVisitor_dfs, __pyx_k_ExpressionReplacementVisitor_dfs, sizeof(__pyx_k_ExpressionReplacementVisitor_dfs), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionReplacementVisitor_fin, __pyx_k_ExpressionReplacementVisitor_fin, sizeof(__pyx_k_ExpressionReplacementVisitor_fin), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionReplacementVisitor_vis, __pyx_k_ExpressionReplacementVisitor_vis, sizeof(__pyx_k_ExpressionReplacementVisitor_vis), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionReplacementVisitor_vis_2, __pyx_k_ExpressionReplacementVisitor_vis_2, sizeof(__pyx_k_ExpressionReplacementVisitor_vis_2), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionValueVisitor, __pyx_k_ExpressionValueVisitor, sizeof(__pyx_k_ExpressionValueVisitor), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionValueVisitor_dfs_posto, __pyx_k_ExpressionValueVisitor_dfs_posto, sizeof(__pyx_k_ExpressionValueVisitor_dfs_posto), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionValueVisitor_finalize, __pyx_k_ExpressionValueVisitor_finalize, sizeof(__pyx_k_ExpressionValueVisitor_finalize), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionValueVisitor_visit, __pyx_k_ExpressionValueVisitor_visit, sizeof(__pyx_k_ExpressionValueVisitor_visit), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionValueVisitor_visiting, __pyx_k_ExpressionValueVisitor_visiting, sizeof(__pyx_k_ExpressionValueVisitor_visiting), 0, 0, 1, 1},
+ {&__pyx_kp_s_Expression_to_call_func___getit, __pyx_k_Expression_to_call_func___getit, sizeof(__pyx_k_Expression_to_call_func___getit), 0, 0, 1, 0},
+ {&__pyx_n_s_ExternalFunctionExpression, __pyx_k_ExternalFunctionExpression, sizeof(__pyx_k_ExternalFunctionExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_ExternalFunctionExpression___get, __pyx_k_ExternalFunctionExpression___get, sizeof(__pyx_k_ExternalFunctionExpression___get), 0, 0, 1, 1},
+ {&__pyx_n_s_ExternalFunctionExpression___ini, __pyx_k_ExternalFunctionExpression___ini, sizeof(__pyx_k_ExternalFunctionExpression___ini), 0, 0, 1, 1},
+ {&__pyx_n_s_ExternalFunctionExpression__appl, __pyx_k_ExternalFunctionExpression__appl, sizeof(__pyx_k_ExternalFunctionExpression__appl), 0, 0, 1, 1},
+ {&__pyx_n_s_ExternalFunctionExpression__comp, __pyx_k_ExternalFunctionExpression__comp, sizeof(__pyx_k_ExternalFunctionExpression__comp), 0, 0, 1, 1},
+ {&__pyx_n_s_ExternalFunctionExpression__to_s, __pyx_k_ExternalFunctionExpression__to_s, sizeof(__pyx_k_ExternalFunctionExpression__to_s), 0, 0, 1, 1},
+ {&__pyx_n_s_ExternalFunctionExpression_const, __pyx_k_ExternalFunctionExpression_const, sizeof(__pyx_k_ExternalFunctionExpression_const), 0, 0, 1, 1},
+ {&__pyx_n_s_ExternalFunctionExpression_getna, __pyx_k_ExternalFunctionExpression_getna, sizeof(__pyx_k_ExternalFunctionExpression_getna), 0, 0, 1, 1},
+ {&__pyx_n_s_ExternalFunctionExpression_nargs, __pyx_k_ExternalFunctionExpression_nargs, sizeof(__pyx_k_ExternalFunctionExpression_nargs), 0, 0, 1, 1},
+ {&__pyx_kp_s_External_function_expressions_E, __pyx_k_External_function_expressions_E, sizeof(__pyx_k_External_function_expressions_E), 0, 0, 1, 0},
+ {&__pyx_n_s_GetItemExpression, __pyx_k_GetItemExpression, sizeof(__pyx_k_GetItemExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression___getstate, __pyx_k_GetItemExpression___getstate, sizeof(__pyx_k_GetItemExpression___getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression___init, __pyx_k_GetItemExpression___init, sizeof(__pyx_k_GetItemExpression___init), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression__apply_operati, __pyx_k_GetItemExpression__apply_operati, sizeof(__pyx_k_GetItemExpression__apply_operati), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression__compute_polyn, __pyx_k_GetItemExpression__compute_polyn, sizeof(__pyx_k_GetItemExpression__compute_polyn), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression__compute_polyn_2, __pyx_k_GetItemExpression__compute_polyn_2, sizeof(__pyx_k_GetItemExpression__compute_polyn_2), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression__is_fixed, __pyx_k_GetItemExpression__is_fixed, sizeof(__pyx_k_GetItemExpression__is_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression__precedence, __pyx_k_GetItemExpression__precedence, sizeof(__pyx_k_GetItemExpression__precedence), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression__to_string, __pyx_k_GetItemExpression__to_string, sizeof(__pyx_k_GetItemExpression__to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression_construct_node, __pyx_k_GetItemExpression_construct_node, sizeof(__pyx_k_GetItemExpression_construct_node), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression_getname, __pyx_k_GetItemExpression_getname, sizeof(__pyx_k_GetItemExpression_getname), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression_is_fixed, __pyx_k_GetItemExpression_is_fixed, sizeof(__pyx_k_GetItemExpression_is_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression_is_potentially, __pyx_k_GetItemExpression_is_potentially, sizeof(__pyx_k_GetItemExpression_is_potentially), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression_is_potentially_2, __pyx_k_GetItemExpression_is_potentially_2, sizeof(__pyx_k_GetItemExpression_is_potentially_2), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression_nargs, __pyx_k_GetItemExpression_nargs, sizeof(__pyx_k_GetItemExpression_nargs), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression_resolve_templa, __pyx_k_GetItemExpression_resolve_templa, sizeof(__pyx_k_GetItemExpression_resolve_templa), 0, 0, 1, 1},
+ {&__pyx_n_s_GetItemExpression_resolve_templa_2, __pyx_k_GetItemExpression_resolve_templa_2, sizeof(__pyx_k_GetItemExpression_resolve_templa_2), 0, 0, 1, 1},
+ {&__pyx_n_s_IF, __pyx_k_IF, sizeof(__pyx_k_IF), 0, 0, 1, 1},
+ {&__pyx_n_s_IVariable, __pyx_k_IVariable, sizeof(__pyx_k_IVariable), 0, 0, 1, 1},
+ {&__pyx_n_s_InequalityExpression, __pyx_k_InequalityExpression, sizeof(__pyx_k_InequalityExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_InequalityExpression___getstate, __pyx_k_InequalityExpression___getstate, sizeof(__pyx_k_InequalityExpression___getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_InequalityExpression___init, __pyx_k_InequalityExpression___init, sizeof(__pyx_k_InequalityExpression___init), 0, 0, 1, 1},
+ {&__pyx_n_s_InequalityExpression___nonzero, __pyx_k_InequalityExpression___nonzero, sizeof(__pyx_k_InequalityExpression___nonzero), 0, 0, 1, 1},
+ {&__pyx_n_s_InequalityExpression__apply_oper, __pyx_k_InequalityExpression__apply_oper, sizeof(__pyx_k_InequalityExpression__apply_oper), 0, 0, 1, 1},
+ {&__pyx_n_s_InequalityExpression__precedence, __pyx_k_InequalityExpression__precedence, sizeof(__pyx_k_InequalityExpression__precedence), 0, 0, 1, 1},
+ {&__pyx_n_s_InequalityExpression__to_string, __pyx_k_InequalityExpression__to_string, sizeof(__pyx_k_InequalityExpression__to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_InequalityExpression_construct_n, __pyx_k_InequalityExpression_construct_n, sizeof(__pyx_k_InequalityExpression_construct_n), 0, 0, 1, 1},
+ {&__pyx_n_s_InequalityExpression_is_constant, __pyx_k_InequalityExpression_is_constant, sizeof(__pyx_k_InequalityExpression_is_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_InequalityExpression_is_potentia, __pyx_k_InequalityExpression_is_potentia, sizeof(__pyx_k_InequalityExpression_is_potentia), 0, 0, 1, 1},
+ {&__pyx_n_s_InequalityExpression_is_relation, __pyx_k_InequalityExpression_is_relation, sizeof(__pyx_k_InequalityExpression_is_relation), 0, 0, 1, 1},
+ {&__pyx_n_s_InequalityExpression_nargs, __pyx_k_InequalityExpression_nargs, sizeof(__pyx_k_InequalityExpression_nargs), 0, 0, 1, 1},
+ {&__pyx_kp_s_Inequality_expressions_which_de, __pyx_k_Inequality_expressions_which_de, sizeof(__pyx_k_Inequality_expressions_which_de), 0, 0, 1, 0},
+ {&__pyx_kp_s_Invalid_equality_expression_with, __pyx_k_Invalid_equality_expression_with, sizeof(__pyx_k_Invalid_equality_expression_with), 0, 0, 1, 0},
+ {&__pyx_kp_s_Invalid_index_for_expression_arg, __pyx_k_Invalid_index_for_expression_arg, sizeof(__pyx_k_Invalid_index_for_expression_arg), 0, 0, 1, 0},
+ {&__pyx_kp_s_Invalid_inequality_expression, __pyx_k_Invalid_inequality_expression, sizeof(__pyx_k_Invalid_inequality_expression), 0, 0, 1, 0},
+ {&__pyx_n_s_IsFixedVisitor, __pyx_k_IsFixedVisitor, sizeof(__pyx_k_IsFixedVisitor), 0, 0, 1, 1},
+ {&__pyx_n_s_IsFixedVisitor_visit, __pyx_k_IsFixedVisitor_visit, sizeof(__pyx_k_IsFixedVisitor_visit), 0, 0, 1, 1},
+ {&__pyx_n_s_IsFixedVisitor_visiting_potenti, __pyx_k_IsFixedVisitor_visiting_potenti, sizeof(__pyx_k_IsFixedVisitor_visiting_potenti), 0, 0, 1, 1},
+ {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearDecompositionError, __pyx_k_LinearDecompositionError, sizeof(__pyx_k_LinearDecompositionError), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearDecompositionError___init, __pyx_k_LinearDecompositionError___init, sizeof(__pyx_k_LinearDecompositionError___init), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression, __pyx_k_LinearExpression, sizeof(__pyx_k_LinearExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression___deepcopy, __pyx_k_LinearExpression___deepcopy, sizeof(__pyx_k_LinearExpression___deepcopy), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression___getstate, __pyx_k_LinearExpression___getstate, sizeof(__pyx_k_LinearExpression___getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression___init, __pyx_k_LinearExpression___init, sizeof(__pyx_k_LinearExpression___init), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression__apply_operatio, __pyx_k_LinearExpression__apply_operatio, sizeof(__pyx_k_LinearExpression__apply_operatio), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression__apply_operatio_2, __pyx_k_LinearExpression__apply_operatio_2, sizeof(__pyx_k_LinearExpression__apply_operatio_2), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression__combine_expr, __pyx_k_LinearExpression__combine_expr, sizeof(__pyx_k_LinearExpression__combine_expr), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression__compute_polyno, __pyx_k_LinearExpression__compute_polyno, sizeof(__pyx_k_LinearExpression__compute_polyno), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression__precedence, __pyx_k_LinearExpression__precedence, sizeof(__pyx_k_LinearExpression__precedence), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression__to_string, __pyx_k_LinearExpression__to_string, sizeof(__pyx_k_LinearExpression__to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression_construct_node, __pyx_k_LinearExpression_construct_node, sizeof(__pyx_k_LinearExpression_construct_node), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression_getname, __pyx_k_LinearExpression_getname, sizeof(__pyx_k_LinearExpression_getname), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression_is_constant, __pyx_k_LinearExpression_is_constant, sizeof(__pyx_k_LinearExpression_is_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression_is_fixed, __pyx_k_LinearExpression_is_fixed, sizeof(__pyx_k_LinearExpression_is_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression_is_potentially, __pyx_k_LinearExpression_is_potentially, sizeof(__pyx_k_LinearExpression_is_potentially), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression_nargs, __pyx_k_LinearExpression_nargs, sizeof(__pyx_k_LinearExpression_nargs), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearOperatorExpression, __pyx_k_LinearOperatorExpression, sizeof(__pyx_k_LinearOperatorExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearOperatorExpression__compu, __pyx_k_LinearOperatorExpression__compu, sizeof(__pyx_k_LinearOperatorExpression__compu), 0, 0, 1, 1},
+ {&__pyx_n_s_MutableLinearExpression, __pyx_k_MutableLinearExpression, sizeof(__pyx_k_MutableLinearExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_MutableParamVisitor, __pyx_k_MutableParamVisitor, sizeof(__pyx_k_MutableParamVisitor), 0, 0, 1, 1},
+ {&__pyx_n_s_MutableParamVisitor___init, __pyx_k_MutableParamVisitor___init, sizeof(__pyx_k_MutableParamVisitor___init), 0, 0, 1, 1},
+ {&__pyx_n_s_MutableParamVisitor_visit, __pyx_k_MutableParamVisitor_visit, sizeof(__pyx_k_MutableParamVisitor_visit), 0, 0, 1, 1},
+ {&__pyx_n_s_MutableViewSumExpression, __pyx_k_MutableViewSumExpression, sizeof(__pyx_k_MutableViewSumExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_MutableViewSumExpression_add, __pyx_k_MutableViewSumExpression_add, sizeof(__pyx_k_MutableViewSumExpression_add), 0, 0, 1, 1},
+ {&__pyx_kp_s_NOTE_This_doesn_t_check_if_comb, __pyx_k_NOTE_This_doesn_t_check_if_comb, sizeof(__pyx_k_NOTE_This_doesn_t_check_if_comb), 0, 0, 1, 0},
+ {&__pyx_n_s_NPV_AbsExpression, __pyx_k_NPV_AbsExpression, sizeof(__pyx_k_NPV_AbsExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_AbsExpression_is_potentially, __pyx_k_NPV_AbsExpression_is_potentially, sizeof(__pyx_k_NPV_AbsExpression_is_potentially), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_ExternalFunctionExpression, __pyx_k_NPV_ExternalFunctionExpression, sizeof(__pyx_k_NPV_ExternalFunctionExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_ExternalFunctionExpression_i, __pyx_k_NPV_ExternalFunctionExpression_i, sizeof(__pyx_k_NPV_ExternalFunctionExpression_i), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_NegationExpression, __pyx_k_NPV_NegationExpression, sizeof(__pyx_k_NPV_NegationExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_NegationExpression_is_potent, __pyx_k_NPV_NegationExpression_is_potent, sizeof(__pyx_k_NPV_NegationExpression_is_potent), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_PowExpression, __pyx_k_NPV_PowExpression, sizeof(__pyx_k_NPV_PowExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_PowExpression_is_potentially, __pyx_k_NPV_PowExpression_is_potentially, sizeof(__pyx_k_NPV_PowExpression_is_potentially), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_ProductExpression, __pyx_k_NPV_ProductExpression, sizeof(__pyx_k_NPV_ProductExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_ProductExpression_is_potenti, __pyx_k_NPV_ProductExpression_is_potenti, sizeof(__pyx_k_NPV_ProductExpression_is_potenti), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_ReciprocalExpression, __pyx_k_NPV_ReciprocalExpression, sizeof(__pyx_k_NPV_ReciprocalExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_ReciprocalExpression_is_pote, __pyx_k_NPV_ReciprocalExpression_is_pote, sizeof(__pyx_k_NPV_ReciprocalExpression_is_pote), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_SumExpression, __pyx_k_NPV_SumExpression, sizeof(__pyx_k_NPV_SumExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_SumExpression_is_potentially, __pyx_k_NPV_SumExpression_is_potentially, sizeof(__pyx_k_NPV_SumExpression_is_potentially), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_UnaryFunctionExpression, __pyx_k_NPV_UnaryFunctionExpression, sizeof(__pyx_k_NPV_UnaryFunctionExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_NPV_UnaryFunctionExpression_is_p, __pyx_k_NPV_UnaryFunctionExpression_is_p, sizeof(__pyx_k_NPV_UnaryFunctionExpression_is_p), 0, 0, 1, 1},
+ {&__pyx_n_s_NegationExpression, __pyx_k_NegationExpression, sizeof(__pyx_k_NegationExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_NegationExpression__apply_operat, __pyx_k_NegationExpression__apply_operat, sizeof(__pyx_k_NegationExpression__apply_operat), 0, 0, 1, 1},
+ {&__pyx_n_s_NegationExpression__compute_poly, __pyx_k_NegationExpression__compute_poly, sizeof(__pyx_k_NegationExpression__compute_poly), 0, 0, 1, 1},
+ {&__pyx_n_s_NegationExpression__precedence, __pyx_k_NegationExpression__precedence, sizeof(__pyx_k_NegationExpression__precedence), 0, 0, 1, 1},
+ {&__pyx_n_s_NegationExpression__to_string, __pyx_k_NegationExpression__to_string, sizeof(__pyx_k_NegationExpression__to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_NegationExpression_getname, __pyx_k_NegationExpression_getname, sizeof(__pyx_k_NegationExpression_getname), 0, 0, 1, 1},
+ {&__pyx_n_s_NegationExpression_nargs, __pyx_k_NegationExpression_nargs, sizeof(__pyx_k_NegationExpression_nargs), 0, 0, 1, 1},
+ {&__pyx_kp_s_Negation_expressions_x, __pyx_k_Negation_expressions_x, sizeof(__pyx_k_Negation_expressions_x), 0, 0, 1, 0},
+ {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
+ {&__pyx_kp_s_Note_This_class_is_a_customizat, __pyx_k_Note_This_class_is_a_customizat, sizeof(__pyx_k_Note_This_class_is_a_customizat), 0, 0, 1, 0},
+ {&__pyx_kp_s_Note_This_class_is_a_customizat_2, __pyx_k_Note_This_class_is_a_customizat_2, sizeof(__pyx_k_Note_This_class_is_a_customizat_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_Note_This_class_is_a_customizat_3, __pyx_k_Note_This_class_is_a_customizat_3, sizeof(__pyx_k_Note_This_class_is_a_customizat_3), 0, 0, 1, 0},
+ {&__pyx_n_s_NumericConstant, __pyx_k_NumericConstant, sizeof(__pyx_k_NumericConstant), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue, __pyx_k_NumericValue, sizeof(__pyx_k_NumericValue), 0, 0, 1, 1},
+ {&__pyx_n_s_PRECEDENCE, __pyx_k_PRECEDENCE, sizeof(__pyx_k_PRECEDENCE), 0, 0, 1, 1},
+ {&__pyx_n_s_ParamData, __pyx_k_ParamData, sizeof(__pyx_k_ParamData), 0, 0, 1, 1},
+ {&__pyx_n_s_PolyDegreeVisitor, __pyx_k_PolyDegreeVisitor, sizeof(__pyx_k_PolyDegreeVisitor), 0, 0, 1, 1},
+ {&__pyx_n_s_PolyDegreeVisitor_visit, __pyx_k_PolyDegreeVisitor_visit, sizeof(__pyx_k_PolyDegreeVisitor_visit), 0, 0, 1, 1},
+ {&__pyx_n_s_PolyDegreeVisitor_visiting_pote, __pyx_k_PolyDegreeVisitor_visiting_pote, sizeof(__pyx_k_PolyDegreeVisitor_visiting_pote), 0, 0, 1, 1},
+ {&__pyx_n_s_PowExpression, __pyx_k_PowExpression, sizeof(__pyx_k_PowExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_PowExpression__apply_operation, __pyx_k_PowExpression__apply_operation, sizeof(__pyx_k_PowExpression__apply_operation), 0, 0, 1, 1},
+ {&__pyx_n_s_PowExpression__compute_polynomia, __pyx_k_PowExpression__compute_polynomia, sizeof(__pyx_k_PowExpression__compute_polynomia), 0, 0, 1, 1},
+ {&__pyx_n_s_PowExpression__is_fixed, __pyx_k_PowExpression__is_fixed, sizeof(__pyx_k_PowExpression__is_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_PowExpression__precedence, __pyx_k_PowExpression__precedence, sizeof(__pyx_k_PowExpression__precedence), 0, 0, 1, 1},
+ {&__pyx_n_s_PowExpression__to_string, __pyx_k_PowExpression__to_string, sizeof(__pyx_k_PowExpression__to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_PowExpression_getname, __pyx_k_PowExpression_getname, sizeof(__pyx_k_PowExpression_getname), 0, 0, 1, 1},
+ {&__pyx_kp_s_Power_expressions_x_y, __pyx_k_Power_expressions_x_y, sizeof(__pyx_k_Power_expressions_x_y), 0, 0, 1, 0},
+ {&__pyx_n_s_ProductExpression, __pyx_k_ProductExpression, sizeof(__pyx_k_ProductExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_ProductExpression__apply_operati, __pyx_k_ProductExpression__apply_operati, sizeof(__pyx_k_ProductExpression__apply_operati), 0, 0, 1, 1},
+ {&__pyx_n_s_ProductExpression__compute_polyn, __pyx_k_ProductExpression__compute_polyn, sizeof(__pyx_k_ProductExpression__compute_polyn), 0, 0, 1, 1},
+ {&__pyx_n_s_ProductExpression__precedence, __pyx_k_ProductExpression__precedence, sizeof(__pyx_k_ProductExpression__precedence), 0, 0, 1, 1},
+ {&__pyx_n_s_ProductExpression__to_string, __pyx_k_ProductExpression__to_string, sizeof(__pyx_k_ProductExpression__to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_ProductExpression_getname, __pyx_k_ProductExpression_getname, sizeof(__pyx_k_ProductExpression_getname), 0, 0, 1, 1},
+ {&__pyx_kp_s_Product_expressions_x_y, __pyx_k_Product_expressions_x_y, sizeof(__pyx_k_Product_expressions_x_y), 0, 0, 1, 0},
+ {&__pyx_kp_s_Quadratic_terms_exist_in_a_produ, __pyx_k_Quadratic_terms_exist_in_a_produ, sizeof(__pyx_k_Quadratic_terms_exist_in_a_produ), 0, 0, 1, 0},
+ {&__pyx_n_s_RangedExpression, __pyx_k_RangedExpression, sizeof(__pyx_k_RangedExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_RangedExpression___getstate, __pyx_k_RangedExpression___getstate, sizeof(__pyx_k_RangedExpression___getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_RangedExpression___init, __pyx_k_RangedExpression___init, sizeof(__pyx_k_RangedExpression___init), 0, 0, 1, 1},
+ {&__pyx_n_s_RangedExpression___nonzero, __pyx_k_RangedExpression___nonzero, sizeof(__pyx_k_RangedExpression___nonzero), 0, 0, 1, 1},
+ {&__pyx_n_s_RangedExpression__apply_operatio, __pyx_k_RangedExpression__apply_operatio, sizeof(__pyx_k_RangedExpression__apply_operatio), 0, 0, 1, 1},
+ {&__pyx_n_s_RangedExpression__precedence, __pyx_k_RangedExpression__precedence, sizeof(__pyx_k_RangedExpression__precedence), 0, 0, 1, 1},
+ {&__pyx_n_s_RangedExpression__to_string, __pyx_k_RangedExpression__to_string, sizeof(__pyx_k_RangedExpression__to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_RangedExpression_construct_node, __pyx_k_RangedExpression_construct_node, sizeof(__pyx_k_RangedExpression_construct_node), 0, 0, 1, 1},
+ {&__pyx_n_s_RangedExpression_is_constant, __pyx_k_RangedExpression_is_constant, sizeof(__pyx_k_RangedExpression_is_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_RangedExpression_is_potentially, __pyx_k_RangedExpression_is_potentially, sizeof(__pyx_k_RangedExpression_is_potentially), 0, 0, 1, 1},
+ {&__pyx_n_s_RangedExpression_is_relational, __pyx_k_RangedExpression_is_relational, sizeof(__pyx_k_RangedExpression_is_relational), 0, 0, 1, 1},
+ {&__pyx_n_s_RangedExpression_nargs, __pyx_k_RangedExpression_nargs, sizeof(__pyx_k_RangedExpression_nargs), 0, 0, 1, 1},
+ {&__pyx_kp_s_Ranged_expressions_which_define, __pyx_k_Ranged_expressions_which_define, sizeof(__pyx_k_Ranged_expressions_which_define), 0, 0, 1, 0},
+ {&__pyx_n_s_ReciprocalExpression, __pyx_k_ReciprocalExpression, sizeof(__pyx_k_ReciprocalExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_ReciprocalExpression__apply_oper, __pyx_k_ReciprocalExpression__apply_oper, sizeof(__pyx_k_ReciprocalExpression__apply_oper), 0, 0, 1, 1},
+ {&__pyx_n_s_ReciprocalExpression__compute_po, __pyx_k_ReciprocalExpression__compute_po, sizeof(__pyx_k_ReciprocalExpression__compute_po), 0, 0, 1, 1},
+ {&__pyx_n_s_ReciprocalExpression__precedence, __pyx_k_ReciprocalExpression__precedence, sizeof(__pyx_k_ReciprocalExpression__precedence), 0, 0, 1, 1},
+ {&__pyx_n_s_ReciprocalExpression__to_string, __pyx_k_ReciprocalExpression__to_string, sizeof(__pyx_k_ReciprocalExpression__to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_ReciprocalExpression_getname, __pyx_k_ReciprocalExpression_getname, sizeof(__pyx_k_ReciprocalExpression_getname), 0, 0, 1, 1},
+ {&__pyx_n_s_ReciprocalExpression_nargs, __pyx_k_ReciprocalExpression_nargs, sizeof(__pyx_k_ReciprocalExpression_nargs), 0, 0, 1, 1},
+ {&__pyx_kp_s_Reciprocal_expressions_1_x, __pyx_k_Reciprocal_expressions_1_x, sizeof(__pyx_k_Reciprocal_expressions_1_x), 0, 0, 1, 0},
+ {&__pyx_kp_s_Relational_expression_used_in_an, __pyx_k_Relational_expression_used_in_an, sizeof(__pyx_k_Relational_expression_used_in_an), 0, 0, 1, 0},
+ {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
+ {&__pyx_n_s_SimpleExpressionVisitor, __pyx_k_SimpleExpressionVisitor, sizeof(__pyx_k_SimpleExpressionVisitor), 0, 0, 1, 1},
+ {&__pyx_n_s_SimpleExpressionVisitor_finalize, __pyx_k_SimpleExpressionVisitor_finalize, sizeof(__pyx_k_SimpleExpressionVisitor_finalize), 0, 0, 1, 1},
+ {&__pyx_n_s_SimpleExpressionVisitor_visit, __pyx_k_SimpleExpressionVisitor_visit, sizeof(__pyx_k_SimpleExpressionVisitor_visit), 0, 0, 1, 1},
+ {&__pyx_n_s_SimpleExpressionVisitor_xbfs, __pyx_k_SimpleExpressionVisitor_xbfs, sizeof(__pyx_k_SimpleExpressionVisitor_xbfs), 0, 0, 1, 1},
+ {&__pyx_n_s_SimpleExpressionVisitor_xbfs_yie, __pyx_k_SimpleExpressionVisitor_xbfs_yie, sizeof(__pyx_k_SimpleExpressionVisitor_xbfs_yie), 0, 0, 1, 1},
+ {&__pyx_n_s_SimpleParam, __pyx_k_SimpleParam, sizeof(__pyx_k_SimpleParam), 0, 0, 1, 1},
+ {&__pyx_n_s_SimpleVisitor, __pyx_k_SimpleVisitor, sizeof(__pyx_k_SimpleVisitor), 0, 0, 1, 1},
+ {&__pyx_n_s_SizeVisitor, __pyx_k_SizeVisitor, sizeof(__pyx_k_SizeVisitor), 0, 0, 1, 1},
+ {&__pyx_n_s_SizeVisitor___init, __pyx_k_SizeVisitor___init, sizeof(__pyx_k_SizeVisitor___init), 0, 0, 1, 1},
+ {&__pyx_n_s_SizeVisitor_finalize, __pyx_k_SizeVisitor_finalize, sizeof(__pyx_k_SizeVisitor_finalize), 0, 0, 1, 1},
+ {&__pyx_n_s_SizeVisitor_visit, __pyx_k_SizeVisitor_visit, sizeof(__pyx_k_SizeVisitor_visit), 0, 0, 1, 1},
+ {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
+ {&__pyx_n_s_SumExpression, __pyx_k_SumExpression, sizeof(__pyx_k_SumExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_SumExpression__apply_operation, __pyx_k_SumExpression__apply_operation, sizeof(__pyx_k_SumExpression__apply_operation), 0, 0, 1, 1},
+ {&__pyx_n_s_SumExpression__precedence, __pyx_k_SumExpression__precedence, sizeof(__pyx_k_SumExpression__precedence), 0, 0, 1, 1},
+ {&__pyx_n_s_SumExpression__to_string, __pyx_k_SumExpression__to_string, sizeof(__pyx_k_SumExpression__to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_SumExpression_getname, __pyx_k_SumExpression_getname, sizeof(__pyx_k_SumExpression_getname), 0, 0, 1, 1},
+ {&__pyx_kp_s_Sum_expression_x_y_Args_args_li, __pyx_k_Sum_expression_x_y_Args_args_li, sizeof(__pyx_k_Sum_expression_x_y_Args_args_li), 0, 0, 1, 0},
+ {&__pyx_n_s_SymbolMap, __pyx_k_SymbolMap, sizeof(__pyx_k_SymbolMap), 0, 0, 1, 1},
+ {&__pyx_n_s_THEN, __pyx_k_THEN, sizeof(__pyx_k_THEN), 0, 0, 1, 1},
+ {&__pyx_n_s_TO_STRING_VERBOSE, __pyx_k_TO_STRING_VERBOSE, sizeof(__pyx_k_TO_STRING_VERBOSE), 0, 0, 1, 1},
+ {&__pyx_n_s_TemplateExpressionError, __pyx_k_TemplateExpressionError, sizeof(__pyx_k_TemplateExpressionError), 0, 0, 1, 1},
+ {&__pyx_kp_s_The_base_class_for_Pyomo_expres, __pyx_k_The_base_class_for_Pyomo_expres, sizeof(__pyx_k_The_base_class_for_Pyomo_expres), 0, 0, 1, 0},
+ {&__pyx_kp_s_The_visiting_potential_leaf_meth, __pyx_k_The_visiting_potential_leaf_meth, sizeof(__pyx_k_The_visiting_potential_leaf_meth), 0, 0, 1, 0},
+ {&__pyx_n_s_ToStringVisitor, __pyx_k_ToStringVisitor, sizeof(__pyx_k_ToStringVisitor), 0, 0, 1, 1},
+ {&__pyx_n_s_ToStringVisitor___init, __pyx_k_ToStringVisitor___init, sizeof(__pyx_k_ToStringVisitor___init), 0, 0, 1, 1},
+ {&__pyx_n_s_ToStringVisitor_visit, __pyx_k_ToStringVisitor_visit, sizeof(__pyx_k_ToStringVisitor_visit), 0, 0, 1, 1},
+ {&__pyx_n_s_ToStringVisitor_visiting_potent, __pyx_k_ToStringVisitor_visiting_potent, sizeof(__pyx_k_ToStringVisitor_visiting_potent), 0, 0, 1, 1},
+ {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
+ {&__pyx_kp_s_Unallowed_operation_on_linear_ex, __pyx_k_Unallowed_operation_on_linear_ex, sizeof(__pyx_k_Unallowed_operation_on_linear_ex), 0, 0, 1, 0},
+ {&__pyx_kp_s_Unallowed_operation_on_mutable_l, __pyx_k_Unallowed_operation_on_mutable_l, sizeof(__pyx_k_Unallowed_operation_on_mutable_l), 0, 0, 1, 0},
+ {&__pyx_n_s_UnaryFunctionExpression, __pyx_k_UnaryFunctionExpression, sizeof(__pyx_k_UnaryFunctionExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_UnaryFunctionExpression___getsta, __pyx_k_UnaryFunctionExpression___getsta, sizeof(__pyx_k_UnaryFunctionExpression___getsta), 0, 0, 1, 1},
+ {&__pyx_n_s_UnaryFunctionExpression___init, __pyx_k_UnaryFunctionExpression___init, sizeof(__pyx_k_UnaryFunctionExpression___init), 0, 0, 1, 1},
+ {&__pyx_n_s_UnaryFunctionExpression__apply_o, __pyx_k_UnaryFunctionExpression__apply_o, sizeof(__pyx_k_UnaryFunctionExpression__apply_o), 0, 0, 1, 1},
+ {&__pyx_n_s_UnaryFunctionExpression__compute, __pyx_k_UnaryFunctionExpression__compute, sizeof(__pyx_k_UnaryFunctionExpression__compute), 0, 0, 1, 1},
+ {&__pyx_n_s_UnaryFunctionExpression__to_stri, __pyx_k_UnaryFunctionExpression__to_stri, sizeof(__pyx_k_UnaryFunctionExpression__to_stri), 0, 0, 1, 1},
+ {&__pyx_n_s_UnaryFunctionExpression_construc, __pyx_k_UnaryFunctionExpression_construc, sizeof(__pyx_k_UnaryFunctionExpression_construc), 0, 0, 1, 1},
+ {&__pyx_n_s_UnaryFunctionExpression_getname, __pyx_k_UnaryFunctionExpression_getname, sizeof(__pyx_k_UnaryFunctionExpression_getname), 0, 0, 1, 1},
+ {&__pyx_n_s_UnaryFunctionExpression_nargs, __pyx_k_UnaryFunctionExpression_nargs, sizeof(__pyx_k_UnaryFunctionExpression_nargs), 0, 0, 1, 1},
+ {&__pyx_n_s_Undefined, __pyx_k_Undefined, sizeof(__pyx_k_Undefined), 0, 0, 1, 1},
+ {&__pyx_kp_s_Unexpected_nonlinear_term, __pyx_k_Unexpected_nonlinear_term, sizeof(__pyx_k_Unexpected_nonlinear_term), 0, 0, 1, 0},
+ {&__pyx_kp_s_Unknown_expression_type_s, __pyx_k_Unknown_expression_type_s, sizeof(__pyx_k_Unknown_expression_type_s), 0, 0, 1, 0},
+ {&__pyx_kp_s_Unknown_relational_expression_ty, __pyx_k_Unknown_relational_expression_ty, sizeof(__pyx_k_Unknown_relational_expression_ty), 0, 0, 1, 0},
+ {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+ {&__pyx_n_s_ValueVisitor, __pyx_k_ValueVisitor, sizeof(__pyx_k_ValueVisitor), 0, 0, 1, 1},
+ {&__pyx_n_s_Var, __pyx_k_Var, sizeof(__pyx_k_Var), 0, 0, 1, 1},
+ {&__pyx_n_s_VariableVisitor, __pyx_k_VariableVisitor, sizeof(__pyx_k_VariableVisitor), 0, 0, 1, 1},
+ {&__pyx_n_s_VariableVisitor___init, __pyx_k_VariableVisitor___init, sizeof(__pyx_k_VariableVisitor___init), 0, 0, 1, 1},
+ {&__pyx_n_s_VariableVisitor_visit, __pyx_k_VariableVisitor_visit, sizeof(__pyx_k_VariableVisitor_visit), 0, 0, 1, 1},
+ {&__pyx_n_s_ViewSumExpression, __pyx_k_ViewSumExpression, sizeof(__pyx_k_ViewSumExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_ViewSumExpression___getstate, __pyx_k_ViewSumExpression___getstate, sizeof(__pyx_k_ViewSumExpression___getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_ViewSumExpression___init, __pyx_k_ViewSumExpression___init, sizeof(__pyx_k_ViewSumExpression___init), 0, 0, 1, 1},
+ {&__pyx_n_s_ViewSumExpression__apply_operati, __pyx_k_ViewSumExpression__apply_operati, sizeof(__pyx_k_ViewSumExpression__apply_operati), 0, 0, 1, 1},
+ {&__pyx_n_s_ViewSumExpression__precedence, __pyx_k_ViewSumExpression__precedence, sizeof(__pyx_k_ViewSumExpression__precedence), 0, 0, 1, 1},
+ {&__pyx_n_s_ViewSumExpression__to_string, __pyx_k_ViewSumExpression__to_string, sizeof(__pyx_k_ViewSumExpression__to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_ViewSumExpression_add, __pyx_k_ViewSumExpression_add, sizeof(__pyx_k_ViewSumExpression_add), 0, 0, 1, 1},
+ {&__pyx_n_s_ViewSumExpression_construct_node, __pyx_k_ViewSumExpression_construct_node, sizeof(__pyx_k_ViewSumExpression_construct_node), 0, 0, 1, 1},
+ {&__pyx_n_s_ViewSumExpression_is_constant, __pyx_k_ViewSumExpression_is_constant, sizeof(__pyx_k_ViewSumExpression_is_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_ViewSumExpression_is_potentially, __pyx_k_ViewSumExpression_is_potentially, sizeof(__pyx_k_ViewSumExpression_is_potentially), 0, 0, 1, 1},
+ {&__pyx_n_s_ViewSumExpression_nargs, __pyx_k_ViewSumExpression_nargs, sizeof(__pyx_k_ViewSumExpression_nargs), 0, 0, 1, 1},
+ {&__pyx_n_s_ZeroDivisionError, __pyx_k_ZeroDivisionError, sizeof(__pyx_k_ZeroDivisionError), 0, 0, 1, 1},
+ {&__pyx_kp_s__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 1, 0},
+ {&__pyx_kp_s__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 0, 1, 0},
+ {&__pyx_kp_s__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 0, 1, 0},
+ {&__pyx_kp_s__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 0, 1, 0},
+ {&__pyx_kp_s__20, __pyx_k__20, sizeof(__pyx_k__20), 0, 0, 1, 0},
+ {&__pyx_kp_s__21, __pyx_k__21, sizeof(__pyx_k__21), 0, 0, 1, 0},
+ {&__pyx_kp_s__26, __pyx_k__26, sizeof(__pyx_k__26), 0, 0, 1, 0},
+ {&__pyx_kp_s__27, __pyx_k__27, sizeof(__pyx_k__27), 0, 0, 1, 0},
+ {&__pyx_kp_s__28, __pyx_k__28, sizeof(__pyx_k__28), 0, 0, 1, 0},
+ {&__pyx_kp_s__29, __pyx_k__29, sizeof(__pyx_k__29), 0, 0, 1, 0},
+ {&__pyx_kp_s__30, __pyx_k__30, sizeof(__pyx_k__30), 0, 0, 1, 0},
+ {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
+ {&__pyx_n_s_abs, __pyx_k_abs, sizeof(__pyx_k_abs), 0, 0, 1, 1},
+ {&__pyx_n_s_abs_2, __pyx_k_abs_2, sizeof(__pyx_k_abs_2), 0, 0, 1, 1},
+ {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
+ {&__pyx_n_s_add_2, __pyx_k_add_2, sizeof(__pyx_k_add_2), 0, 0, 1, 1},
+ {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
+ {&__pyx_n_s_all_2, __pyx_k_all_2, sizeof(__pyx_k_all_2), 0, 0, 1, 1},
+ {&__pyx_n_s_ans, __pyx_k_ans, sizeof(__pyx_k_ans), 0, 0, 1, 1},
+ {&__pyx_n_s_any, __pyx_k_any, sizeof(__pyx_k_any), 0, 0, 1, 1},
+ {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
+ {&__pyx_n_s_apply_operation, __pyx_k_apply_operation, sizeof(__pyx_k_apply_operation), 0, 0, 1, 1},
+ {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1},
+ {&__pyx_n_s_argList, __pyx_k_argList, sizeof(__pyx_k_argList), 0, 0, 1, 1},
+ {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
+ {&__pyx_n_s_args_2, __pyx_k_args_2, sizeof(__pyx_k_args_2), 0, 0, 1, 1},
+ {&__pyx_n_s_as_numeric, __pyx_k_as_numeric, sizeof(__pyx_k_as_numeric), 0, 0, 1, 1},
+ {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
+ {&__pyx_n_s_b_2, __pyx_k_b_2, sizeof(__pyx_k_b_2), 0, 0, 1, 1},
+ {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
+ {&__pyx_n_s_base_2, __pyx_k_base_2, sizeof(__pyx_k_base_2), 0, 0, 1, 1},
+ {&__pyx_n_s_block_scope, __pyx_k_block_scope, sizeof(__pyx_k_block_scope), 0, 0, 1, 1},
+ {&__pyx_n_s_body, __pyx_k_body, sizeof(__pyx_k_body), 0, 0, 1, 1},
+ {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1},
+ {&__pyx_n_s_builtins, __pyx_k_builtins, sizeof(__pyx_k_builtins), 0, 0, 1, 1},
+ {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
+ {&__pyx_n_s_c_2, __pyx_k_c_2, sizeof(__pyx_k_c_2), 0, 0, 1, 1},
+ {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
+ {&__pyx_n_s_call_info, __pyx_k_call_info, sizeof(__pyx_k_call_info), 0, 0, 1, 1},
+ {&__pyx_n_s_chainedInequality, __pyx_k_chainedInequality, sizeof(__pyx_k_chainedInequality), 0, 0, 1, 1},
+ {&__pyx_n_s_chainedInequality_error_message, __pyx_k_chainedInequality_error_message, sizeof(__pyx_k_chainedInequality_error_message), 0, 0, 1, 1},
+ {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
+ {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
+ {&__pyx_n_s_clone, __pyx_k_clone, sizeof(__pyx_k_clone), 0, 0, 1, 1},
+ {&__pyx_n_s_clone_counter, __pyx_k_clone_counter, sizeof(__pyx_k_clone_counter), 0, 0, 1, 1},
+ {&__pyx_n_s_clone_counter_context, __pyx_k_clone_counter_context, sizeof(__pyx_k_clone_counter_context), 0, 0, 1, 1},
+ {&__pyx_n_s_clone_counter_context___enter, __pyx_k_clone_counter_context___enter, sizeof(__pyx_k_clone_counter_context___enter), 0, 0, 1, 1},
+ {&__pyx_n_s_clone_counter_context___exit, __pyx_k_clone_counter_context___exit, sizeof(__pyx_k_clone_counter_context___exit), 0, 0, 1, 1},
+ {&__pyx_n_s_clone_counter_context_count, __pyx_k_clone_counter_context_count, sizeof(__pyx_k_clone_counter_context_count), 0, 0, 1, 1},
+ {&__pyx_n_s_clone_expression, __pyx_k_clone_expression, sizeof(__pyx_k_clone_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_clone_leaves, __pyx_k_clone_leaves, sizeof(__pyx_k_clone_leaves), 0, 0, 1, 1},
+ {&__pyx_n_s_cloned_from, __pyx_k_cloned_from, sizeof(__pyx_k_cloned_from), 0, 0, 1, 1},
+ {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
+ {&__pyx_n_s_collections, __pyx_k_collections, sizeof(__pyx_k_collections), 0, 0, 1, 1},
+ {&__pyx_n_s_combine_expr, __pyx_k_combine_expr, sizeof(__pyx_k_combine_expr), 0, 0, 1, 1},
+ {&__pyx_n_s_common, __pyx_k_common, sizeof(__pyx_k_common), 0, 0, 1, 1},
+ {&__pyx_n_s_component, __pyx_k_component, sizeof(__pyx_k_component), 0, 0, 1, 1},
+ {&__pyx_n_s_component_types, __pyx_k_component_types, sizeof(__pyx_k_component_types), 0, 0, 1, 1},
+ {&__pyx_n_s_compress_expression, __pyx_k_compress_expression, sizeof(__pyx_k_compress_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_compute_polynomial_degree, __pyx_k_compute_polynomial_degree, sizeof(__pyx_k_compute_polynomial_degree), 0, 0, 1, 1},
+ {&__pyx_n_s_compute_values, __pyx_k_compute_values, sizeof(__pyx_k_compute_values), 0, 0, 1, 1},
+ {&__pyx_n_s_const, __pyx_k_const, sizeof(__pyx_k_const), 0, 0, 1, 1},
+ {&__pyx_n_s_constant, __pyx_k_constant, sizeof(__pyx_k_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_construct_node, __pyx_k_construct_node, sizeof(__pyx_k_construct_node), 0, 0, 1, 1},
+ {&__pyx_n_s_constructed, __pyx_k_constructed, sizeof(__pyx_k_constructed), 0, 0, 1, 1},
+ {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
+ {&__pyx_n_s_count, __pyx_k_count, sizeof(__pyx_k_count), 0, 0, 1, 1},
+ {&__pyx_n_s_count_2, __pyx_k_count_2, sizeof(__pyx_k_count_2), 0, 0, 1, 1},
+ {&__pyx_n_s_counter, __pyx_k_counter, sizeof(__pyx_k_counter), 0, 0, 1, 1},
+ {&__pyx_n_s_current, __pyx_k_current, sizeof(__pyx_k_current), 0, 0, 1, 1},
+ {&__pyx_n_s_decompose_linear_terms, __pyx_k_decompose_linear_terms, sizeof(__pyx_k_decompose_linear_terms), 0, 0, 1, 1},
+ {&__pyx_n_s_decompose_term, __pyx_k_decompose_term, sizeof(__pyx_k_decompose_term), 0, 0, 1, 1},
+ {&__pyx_n_s_deepcopy, __pyx_k_deepcopy, sizeof(__pyx_k_deepcopy), 0, 0, 1, 1},
+ {&__pyx_n_s_deepcopy_2, __pyx_k_deepcopy_2, sizeof(__pyx_k_deepcopy_2), 0, 0, 1, 1},
+ {&__pyx_n_s_default_labeler, __pyx_k_default_labeler, sizeof(__pyx_k_default_labeler), 0, 0, 1, 1},
+ {&__pyx_n_s_deprecation_warning, __pyx_k_deprecation_warning, sizeof(__pyx_k_deprecation_warning), 0, 0, 1, 1},
+ {&__pyx_n_s_deque, __pyx_k_deque, sizeof(__pyx_k_deque), 0, 0, 1, 1},
+ {&__pyx_n_s_dfs_postorder_stack, __pyx_k_dfs_postorder_stack, sizeof(__pyx_k_dfs_postorder_stack), 0, 0, 1, 1},
+ {&__pyx_n_s_div, __pyx_k_div, sizeof(__pyx_k_div), 0, 0, 1, 1},
+ {&__pyx_n_s_divisor, __pyx_k_divisor, sizeof(__pyx_k_divisor), 0, 0, 1, 1},
+ {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
+ {&__pyx_n_s_dq, __pyx_k_dq, sizeof(__pyx_k_dq), 0, 0, 1, 1},
+ {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
+ {&__pyx_n_s_else, __pyx_k_else, sizeof(__pyx_k_else), 0, 0, 1, 1},
+ {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
+ {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
+ {&__pyx_n_s_eq, __pyx_k_eq, sizeof(__pyx_k_eq), 0, 0, 1, 1},
+ {&__pyx_n_s_error_message, __pyx_k_error_message, sizeof(__pyx_k_error_message), 0, 0, 1, 1},
+ {&__pyx_n_s_etype, __pyx_k_etype, sizeof(__pyx_k_etype), 0, 0, 1, 1},
+ {&__pyx_n_s_evaluate, __pyx_k_evaluate, sizeof(__pyx_k_evaluate), 0, 0, 1, 1},
+ {&__pyx_n_s_evaluate_expression, __pyx_k_evaluate_expression, sizeof(__pyx_k_evaluate_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_exception, __pyx_k_exception, sizeof(__pyx_k_exception), 0, 0, 1, 1},
+ {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
+ {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
+ {&__pyx_n_s_expr, __pyx_k_expr, sizeof(__pyx_k_expr), 0, 0, 1, 1},
+ {&__pyx_n_s_expr_common, __pyx_k_expr_common, sizeof(__pyx_k_expr_common), 0, 0, 1, 1},
+ {&__pyx_n_s_expression_is_fixed, __pyx_k_expression_is_fixed, sizeof(__pyx_k_expression_is_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_expression_to_string, __pyx_k_expression_to_string, sizeof(__pyx_k_expression_to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_extend, __pyx_k_extend, sizeof(__pyx_k_extend), 0, 0, 1, 1},
+ {&__pyx_n_s_extract_stack, __pyx_k_extract_stack, sizeof(__pyx_k_extract_stack), 0, 0, 1, 1},
+ {&__pyx_n_s_fabs, __pyx_k_fabs, sizeof(__pyx_k_fabs), 0, 0, 1, 1},
+ {&__pyx_n_s_fcn, __pyx_k_fcn, sizeof(__pyx_k_fcn), 0, 0, 1, 1},
+ {&__pyx_n_s_fcn_2, __pyx_k_fcn_2, sizeof(__pyx_k_fcn_2), 0, 0, 1, 1},
+ {&__pyx_n_s_finalize, __pyx_k_finalize, sizeof(__pyx_k_finalize), 0, 0, 1, 1},
+ {&__pyx_n_s_fixed, __pyx_k_fixed, sizeof(__pyx_k_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_flag, __pyx_k_flag, sizeof(__pyx_k_flag), 0, 0, 1, 1},
+ {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
+ {&__pyx_n_s_generate_intrinsic_function_exp, __pyx_k_generate_intrinsic_function_exp, sizeof(__pyx_k_generate_intrinsic_function_exp), 0, 0, 1, 1},
+ {&__pyx_n_s_generate_mul_expression, __pyx_k_generate_mul_expression, sizeof(__pyx_k_generate_mul_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_generate_other_expression, __pyx_k_generate_other_expression, sizeof(__pyx_k_generate_other_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_generate_relational_expression, __pyx_k_generate_relational_expression, sizeof(__pyx_k_generate_relational_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_generate_standard_repn, __pyx_k_generate_standard_repn, sizeof(__pyx_k_generate_standard_repn), 0, 0, 1, 1},
+ {&__pyx_n_s_generate_sum_expression, __pyx_k_generate_sum_expression, sizeof(__pyx_k_generate_sum_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
+ {&__pyx_n_s_getLogger, __pyx_k_getLogger, sizeof(__pyx_k_getLogger), 0, 0, 1, 1},
+ {&__pyx_n_s_getSymbol, __pyx_k_getSymbol, sizeof(__pyx_k_getSymbol), 0, 0, 1, 1},
+ {&__pyx_n_s_getitem, __pyx_k_getitem, sizeof(__pyx_k_getitem), 0, 0, 1, 1},
+ {&__pyx_n_s_getname, __pyx_k_getname, sizeof(__pyx_k_getname), 0, 0, 1, 1},
+ {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
+ {&__pyx_n_s_iadd, __pyx_k_iadd, sizeof(__pyx_k_iadd), 0, 0, 1, 1},
+ {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
+ {&__pyx_n_s_identify_components, __pyx_k_identify_components, sizeof(__pyx_k_identify_components), 0, 0, 1, 1},
+ {&__pyx_n_s_identify_mutable_parameters, __pyx_k_identify_mutable_parameters, sizeof(__pyx_k_identify_mutable_parameters), 0, 0, 1, 1},
+ {&__pyx_n_s_identify_variables, __pyx_k_identify_variables, sizeof(__pyx_k_identify_variables), 0, 0, 1, 1},
+ {&__pyx_n_s_idiv, __pyx_k_idiv, sizeof(__pyx_k_idiv), 0, 0, 1, 1},
+ {&__pyx_n_s_idx, __pyx_k_idx, sizeof(__pyx_k_idx), 0, 0, 1, 1},
+ {&__pyx_n_s_if, __pyx_k_if, sizeof(__pyx_k_if), 0, 0, 1, 1},
+ {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+ {&__pyx_n_s_imul, __pyx_k_imul, sizeof(__pyx_k_imul), 0, 0, 1, 1},
+ {&__pyx_n_s_include_fixed, __pyx_k_include_fixed, sizeof(__pyx_k_include_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_inequality, __pyx_k_inequality, sizeof(__pyx_k_inequality), 0, 0, 1, 1},
+ {&__pyx_n_s_info, __pyx_k_info, sizeof(__pyx_k_info), 0, 0, 1, 1},
+ {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
+ {&__pyx_n_s_initialize_expression_data, __pyx_k_initialize_expression_data, sizeof(__pyx_k_initialize_expression_data), 0, 0, 1, 1},
+ {&__pyx_n_s_inplace, __pyx_k_inplace, sizeof(__pyx_k_inplace), 0, 0, 1, 1},
+ {&__pyx_n_s_ipow, __pyx_k_ipow, sizeof(__pyx_k_ipow), 0, 0, 1, 1},
+ {&__pyx_n_s_is_constant, __pyx_k_is_constant, sizeof(__pyx_k_is_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_is_expression_type, __pyx_k_is_expression_type, sizeof(__pyx_k_is_expression_type), 0, 0, 1, 1},
+ {&__pyx_n_s_is_fixed, __pyx_k_is_fixed, sizeof(__pyx_k_is_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_is_fixed_2, __pyx_k_is_fixed_2, sizeof(__pyx_k_is_fixed_2), 0, 0, 1, 1},
+ {&__pyx_n_s_is_indexed, __pyx_k_is_indexed, sizeof(__pyx_k_is_indexed), 0, 0, 1, 1},
+ {&__pyx_n_s_is_named_expression_type, __pyx_k_is_named_expression_type, sizeof(__pyx_k_is_named_expression_type), 0, 0, 1, 1},
+ {&__pyx_n_s_is_potentially_variable, __pyx_k_is_potentially_variable, sizeof(__pyx_k_is_potentially_variable), 0, 0, 1, 1},
+ {&__pyx_n_s_is_relational, __pyx_k_is_relational, sizeof(__pyx_k_is_relational), 0, 0, 1, 1},
+ {&__pyx_n_s_is_variable_type, __pyx_k_is_variable_type, sizeof(__pyx_k_is_variable_type), 0, 0, 1, 1},
+ {&__pyx_n_s_isclose, __pyx_k_isclose, sizeof(__pyx_k_isclose), 0, 0, 1, 1},
+ {&__pyx_n_s_islice, __pyx_k_islice, sizeof(__pyx_k_islice), 0, 0, 1, 1},
+ {&__pyx_n_s_isub, __pyx_k_isub, sizeof(__pyx_k_isub), 0, 0, 1, 1},
+ {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
+ {&__pyx_n_s_itervalues, __pyx_k_itervalues, sizeof(__pyx_k_itervalues), 0, 0, 1, 1},
+ {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
+ {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1},
+ {&__pyx_n_s_kwds, __pyx_k_kwds, sizeof(__pyx_k_kwds), 0, 0, 1, 1},
+ {&__pyx_n_s_l, __pyx_k_l, sizeof(__pyx_k_l), 0, 0, 1, 1},
+ {&__pyx_n_s_l_2, __pyx_k_l_2, sizeof(__pyx_k_l_2), 0, 0, 1, 1},
+ {&__pyx_n_s_l_3, __pyx_k_l_3, sizeof(__pyx_k_l_3), 0, 0, 1, 1},
+ {&__pyx_n_s_labeler, __pyx_k_labeler, sizeof(__pyx_k_labeler), 0, 0, 1, 1},
+ {&__pyx_n_s_le, __pyx_k_le, sizeof(__pyx_k_le), 0, 0, 1, 1},
+ {&__pyx_n_s_len, __pyx_k_len, sizeof(__pyx_k_len), 0, 0, 1, 1},
+ {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
+ {&__pyx_n_s_lhs_is_relational, __pyx_k_lhs_is_relational, sizeof(__pyx_k_lhs_is_relational), 0, 0, 1, 1},
+ {&__pyx_n_s_limit, __pyx_k_limit, sizeof(__pyx_k_limit), 0, 0, 1, 1},
+ {&__pyx_n_s_linear_coefs, __pyx_k_linear_coefs, sizeof(__pyx_k_linear_coefs), 0, 0, 1, 1},
+ {&__pyx_n_s_linear_expression, __pyx_k_linear_expression, sizeof(__pyx_k_linear_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_linear_vars, __pyx_k_linear_vars, sizeof(__pyx_k_linear_vars), 0, 0, 1, 1},
+ {&__pyx_n_s_logger, __pyx_k_logger, sizeof(__pyx_k_logger), 0, 0, 1, 1},
+ {&__pyx_n_s_logging, __pyx_k_logging, sizeof(__pyx_k_logging), 0, 0, 1, 1},
+ {&__pyx_n_s_lower, __pyx_k_lower, sizeof(__pyx_k_lower), 0, 0, 1, 1},
+ {&__pyx_n_s_lt, __pyx_k_lt, sizeof(__pyx_k_lt), 0, 0, 1, 1},
+ {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+ {&__pyx_n_s_match, __pyx_k_match, sizeof(__pyx_k_match), 0, 0, 1, 1},
+ {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
+ {&__pyx_n_s_memo, __pyx_k_memo, sizeof(__pyx_k_memo), 0, 0, 1, 1},
+ {&__pyx_n_s_message, __pyx_k_message, sizeof(__pyx_k_message), 0, 0, 1, 1},
+ {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
+ {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
+ {&__pyx_n_s_msg, __pyx_k_msg, sizeof(__pyx_k_msg), 0, 0, 1, 1},
+ {&__pyx_n_s_mul, __pyx_k_mul, sizeof(__pyx_k_mul), 0, 0, 1, 1},
+ {&__pyx_n_s_multiplier, __pyx_k_multiplier, sizeof(__pyx_k_multiplier), 0, 0, 1, 1},
+ {&__pyx_n_s_mutable, __pyx_k_mutable, sizeof(__pyx_k_mutable), 0, 0, 1, 1},
+ {&__pyx_n_s_mutable_linear_context, __pyx_k_mutable_linear_context, sizeof(__pyx_k_mutable_linear_context), 0, 0, 1, 1},
+ {&__pyx_n_s_mutable_linear_context___enter, __pyx_k_mutable_linear_context___enter, sizeof(__pyx_k_mutable_linear_context___enter), 0, 0, 1, 1},
+ {&__pyx_n_s_mutable_linear_context___exit, __pyx_k_mutable_linear_context___exit, sizeof(__pyx_k_mutable_linear_context___exit), 0, 0, 1, 1},
+ {&__pyx_n_s_mutable_sum_context, __pyx_k_mutable_sum_context, sizeof(__pyx_k_mutable_sum_context), 0, 0, 1, 1},
+ {&__pyx_n_s_mutable_sum_context___enter, __pyx_k_mutable_sum_context___enter, sizeof(__pyx_k_mutable_sum_context___enter), 0, 0, 1, 1},
+ {&__pyx_n_s_mutable_sum_context___exit, __pyx_k_mutable_sum_context___exit, sizeof(__pyx_k_mutable_sum_context___exit), 0, 0, 1, 1},
+ {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
+ {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
+ {&__pyx_n_s_nargs, __pyx_k_nargs, sizeof(__pyx_k_nargs), 0, 0, 1, 1},
+ {&__pyx_n_s_nargs_2, __pyx_k_nargs_2, sizeof(__pyx_k_nargs_2), 0, 0, 1, 1},
+ {&__pyx_n_s_native_numeric_types, __pyx_k_native_numeric_types, sizeof(__pyx_k_native_numeric_types), 0, 0, 1, 1},
+ {&__pyx_n_s_native_types, __pyx_k_native_types, sizeof(__pyx_k_native_types), 0, 0, 1, 1},
+ {&__pyx_n_s_neg, __pyx_k_neg, sizeof(__pyx_k_neg), 0, 0, 1, 1},
+ {&__pyx_n_s_neg_2, __pyx_k_neg_2, sizeof(__pyx_k_neg_2), 0, 0, 1, 1},
+ {&__pyx_n_s_new_arg, __pyx_k_new_arg, sizeof(__pyx_k_new_arg), 0, 0, 1, 1},
+ {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
+ {&__pyx_n_s_node, __pyx_k_node, sizeof(__pyx_k_node), 0, 0, 1, 1},
+ {&__pyx_n_s_nonlinear_expression, __pyx_k_nonlinear_expression, sizeof(__pyx_k_nonlinear_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_nonpyomo_leaf_types, __pyx_k_nonpyomo_leaf_types, sizeof(__pyx_k_nonpyomo_leaf_types), 0, 0, 1, 1},
+ {&__pyx_n_s_nonzero, __pyx_k_nonzero, sizeof(__pyx_k_nonzero), 0, 0, 1, 1},
+ {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
+ {&__pyx_n_s_obj_2, __pyx_k_obj_2, sizeof(__pyx_k_obj_2), 0, 0, 1, 1},
+ {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
+ {&__pyx_n_s_omult, __pyx_k_omult, sizeof(__pyx_k_omult), 0, 0, 1, 1},
+ {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
+ {&__pyx_n_s_polynomial_degree, __pyx_k_polynomial_degree, sizeof(__pyx_k_polynomial_degree), 0, 0, 1, 1},
+ {&__pyx_n_s_polynomial_degree_2, __pyx_k_polynomial_degree_2, sizeof(__pyx_k_polynomial_degree_2), 0, 0, 1, 1},
+ {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
+ {&__pyx_n_s_popleft, __pyx_k_popleft, sizeof(__pyx_k_popleft), 0, 0, 1, 1},
+ {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
+ {&__pyx_n_s_pow_2, __pyx_k_pow_2, sizeof(__pyx_k_pow_2), 0, 0, 1, 1},
+ {&__pyx_n_s_precedence, __pyx_k_precedence, sizeof(__pyx_k_precedence), 0, 0, 1, 1},
+ {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
+ {&__pyx_n_s_prev, __pyx_k_prev, sizeof(__pyx_k_prev), 0, 0, 1, 1},
+ {&__pyx_n_s_prevExpr, __pyx_k_prevExpr, sizeof(__pyx_k_prevExpr), 0, 0, 1, 1},
+ {&__pyx_n_s_process_arg, __pyx_k_process_arg, sizeof(__pyx_k_process_arg), 0, 0, 1, 1},
+ {&__pyx_n_s_prod, __pyx_k_prod, sizeof(__pyx_k_prod), 0, 0, 1, 1},
+ {&__pyx_kp_s_prod_s_s, __pyx_k_prod_s_s, sizeof(__pyx_k_prod_s_s), 0, 0, 1, 0},
+ {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1},
+ {&__pyx_n_s_public, __pyx_k_public, sizeof(__pyx_k_public), 0, 0, 1, 1},
+ {&__pyx_kp_s_pyomo_core, __pyx_k_pyomo_core, sizeof(__pyx_k_pyomo_core), 0, 0, 1, 0},
+ {&__pyx_n_s_pyomo_core_base, __pyx_k_pyomo_core_base, sizeof(__pyx_k_pyomo_core_base), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_base_param, __pyx_k_pyomo_core_base_param, sizeof(__pyx_k_pyomo_core_base_param), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_base_template_expr, __pyx_k_pyomo_core_base_template_expr, sizeof(__pyx_k_pyomo_core_base_template_expr), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_expr, __pyx_k_pyomo_core_expr, sizeof(__pyx_k_pyomo_core_expr), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_expr_expr_common, __pyx_k_pyomo_core_expr_expr_common, sizeof(__pyx_k_pyomo_core_expr_expr_common), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_k_pyomo_core_expr_expr_pyomo5, sizeof(__pyx_k_pyomo_core_expr_expr_pyomo5), 0, 0, 1, 1},
+ {&__pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_k_pyomo_core_expr_expr_pyomo5_pyx, sizeof(__pyx_k_pyomo_core_expr_expr_pyomo5_pyx), 0, 0, 1, 0},
+ {&__pyx_n_s_pyomo_core_expr_numvalue, __pyx_k_pyomo_core_expr_numvalue, sizeof(__pyx_k_pyomo_core_expr_numvalue), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_expr_symbol_map, __pyx_k_pyomo_core_expr_symbol_map, sizeof(__pyx_k_pyomo_core_expr_symbol_map), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_kernel_component_vari, __pyx_k_pyomo_core_kernel_component_vari, sizeof(__pyx_k_pyomo_core_kernel_component_vari), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_repn, __pyx_k_pyomo_repn, sizeof(__pyx_k_pyomo_repn), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_util_deprecation, __pyx_k_pyomo_util_deprecation, sizeof(__pyx_k_pyomo_util_deprecation), 0, 0, 1, 1},
+ {&__pyx_n_s_pyutilib_math_util, __pyx_k_pyutilib_math_util, sizeof(__pyx_k_pyutilib_math_util), 0, 0, 1, 1},
+ {&__pyx_n_s_pyutilib_misc_visitor, __pyx_k_pyutilib_misc_visitor, sizeof(__pyx_k_pyutilib_misc_visitor), 0, 0, 1, 1},
+ {&__pyx_n_s_quadratic, __pyx_k_quadratic, sizeof(__pyx_k_quadratic), 0, 0, 1, 1},
+ {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
+ {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
+ {&__pyx_n_s_r_2, __pyx_k_r_2, sizeof(__pyx_k_r_2), 0, 0, 1, 1},
+ {&__pyx_n_s_r_3, __pyx_k_r_3, sizeof(__pyx_k_r_3), 0, 0, 1, 1},
+ {&__pyx_n_s_radd, __pyx_k_radd, sizeof(__pyx_k_radd), 0, 0, 1, 1},
+ {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
+ {&__pyx_n_s_rdiv, __pyx_k_rdiv, sizeof(__pyx_k_rdiv), 0, 0, 1, 1},
+ {&__pyx_n_s_recip, __pyx_k_recip, sizeof(__pyx_k_recip), 0, 0, 1, 1},
+ {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1},
+ {&__pyx_n_s_repn, __pyx_k_repn, sizeof(__pyx_k_repn), 0, 0, 1, 1},
+ {&__pyx_n_s_repn0, __pyx_k_repn0, sizeof(__pyx_k_repn0), 0, 0, 1, 1},
+ {&__pyx_n_s_repn1, __pyx_k_repn1, sizeof(__pyx_k_repn1), 0, 0, 1, 1},
+ {&__pyx_n_s_repn2, __pyx_k_repn2, sizeof(__pyx_k_repn2), 0, 0, 1, 1},
+ {&__pyx_n_s_resolve_template, __pyx_k_resolve_template, sizeof(__pyx_k_resolve_template), 0, 0, 1, 1},
+ {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
+ {&__pyx_n_s_result_2, __pyx_k_result_2, sizeof(__pyx_k_result_2), 0, 0, 1, 1},
+ {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
+ {&__pyx_n_s_rhs_is_relational, __pyx_k_rhs_is_relational, sizeof(__pyx_k_rhs_is_relational), 0, 0, 1, 1},
+ {&__pyx_n_s_rmul, __pyx_k_rmul, sizeof(__pyx_k_rmul), 0, 0, 1, 1},
+ {&__pyx_n_s_rpow, __pyx_k_rpow, sizeof(__pyx_k_rpow), 0, 0, 1, 1},
+ {&__pyx_n_s_rsub, __pyx_k_rsub, sizeof(__pyx_k_rsub), 0, 0, 1, 1},
+ {&__pyx_kp_s_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 0, 1, 0},
+ {&__pyx_kp_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_s_3, __pyx_k_s_3, sizeof(__pyx_k_s_3), 0, 0, 1, 0},
+ {&__pyx_n_s_s_4, __pyx_k_s_4, sizeof(__pyx_k_s_4), 0, 0, 1, 1},
+ {&__pyx_kp_s_s_The_inequality_expression_s_c, __pyx_k_s_The_inequality_expression_s_c, sizeof(__pyx_k_s_The_inequality_expression_s_c), 0, 0, 1, 0},
+ {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0},
+ {&__pyx_kp_s_s_s_2, __pyx_k_s_s_2, sizeof(__pyx_k_s_s_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_s_s_3, __pyx_k_s_s_3, sizeof(__pyx_k_s_s_3), 0, 0, 1, 0},
+ {&__pyx_n_s_seen, __pyx_k_seen, sizeof(__pyx_k_seen), 0, 0, 1, 1},
+ {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
+ {&__pyx_n_s_self_2, __pyx_k_self_2, sizeof(__pyx_k_self_2), 0, 0, 1, 1},
+ {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
+ {&__pyx_n_s_shared_args, __pyx_k_shared_args, sizeof(__pyx_k_shared_args), 0, 0, 1, 1},
+ {&__pyx_n_s_six, __pyx_k_six, sizeof(__pyx_k_six), 0, 0, 1, 1},
+ {&__pyx_n_s_six_moves, __pyx_k_six_moves, sizeof(__pyx_k_six_moves), 0, 0, 1, 1},
+ {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
+ {&__pyx_n_s_sizeof_expression, __pyx_k_sizeof_expression, sizeof(__pyx_k_sizeof_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_slots, __pyx_k_slots, sizeof(__pyx_k_slots), 0, 0, 1, 1},
+ {&__pyx_n_s_smap, __pyx_k_smap, sizeof(__pyx_k_smap), 0, 0, 1, 1},
+ {&__pyx_n_s_stack, __pyx_k_stack, sizeof(__pyx_k_stack), 0, 0, 1, 1},
+ {&__pyx_n_s_standardize, __pyx_k_standardize, sizeof(__pyx_k_standardize), 0, 0, 1, 1},
+ {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
+ {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1},
+ {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
+ {&__pyx_n_s_strict, __pyx_k_strict, sizeof(__pyx_k_strict), 0, 0, 1, 1},
+ {&__pyx_n_s_strict_2, __pyx_k_strict_2, sizeof(__pyx_k_strict_2), 0, 0, 1, 1},
+ {&__pyx_n_s_string_types, __pyx_k_string_types, sizeof(__pyx_k_string_types), 0, 0, 1, 1},
+ {&__pyx_n_s_strip, __pyx_k_strip, sizeof(__pyx_k_strip), 0, 0, 1, 1},
+ {&__pyx_n_s_sub, __pyx_k_sub, sizeof(__pyx_k_sub), 0, 0, 1, 1},
+ {&__pyx_n_s_substitute, __pyx_k_substitute, sizeof(__pyx_k_substitute), 0, 0, 1, 1},
+ {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
+ {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
+ {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
+ {&__pyx_n_s_t, __pyx_k_t, sizeof(__pyx_k_t), 0, 0, 1, 1},
+ {&__pyx_n_s_term, __pyx_k_term, sizeof(__pyx_k_term), 0, 0, 1, 1},
+ {&__pyx_n_s_terms, __pyx_k_terms, sizeof(__pyx_k_terms), 0, 0, 1, 1},
+ {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+ {&__pyx_n_s_then, __pyx_k_then, sizeof(__pyx_k_then), 0, 0, 1, 1},
+ {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
+ {&__pyx_n_s_tmp, __pyx_k_tmp, sizeof(__pyx_k_tmp), 0, 0, 1, 1},
+ {&__pyx_n_s_to_expression, __pyx_k_to_expression, sizeof(__pyx_k_to_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_to_string, __pyx_k_to_string, sizeof(__pyx_k_to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_to_string_2, __pyx_k_to_string_2, sizeof(__pyx_k_to_string_2), 0, 0, 1, 1},
+ {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
+ {&__pyx_n_s_types, __pyx_k_types, sizeof(__pyx_k_types), 0, 0, 1, 1},
+ {&__pyx_n_s_unary, __pyx_k_unary, sizeof(__pyx_k_unary), 0, 0, 1, 1},
+ {&__pyx_n_s_upper, __pyx_k_upper, sizeof(__pyx_k_upper), 0, 0, 1, 1},
+ {&__pyx_n_s_using_chained_inequality, __pyx_k_using_chained_inequality, sizeof(__pyx_k_using_chained_inequality), 0, 0, 1, 1},
+ {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
+ {&__pyx_n_s_v_2, __pyx_k_v_2, sizeof(__pyx_k_v_2), 0, 0, 1, 1},
+ {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
+ {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
+ {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
+ {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1},
+ {&__pyx_n_s_visit, __pyx_k_visit, sizeof(__pyx_k_visit), 0, 0, 1, 1},
+ {&__pyx_n_s_visiting_potential_leaf, __pyx_k_visiting_potential_leaf, sizeof(__pyx_k_visiting_potential_leaf), 0, 0, 1, 1},
+ {&__pyx_n_s_visitor, __pyx_k_visitor, sizeof(__pyx_k_visitor), 0, 0, 1, 1},
+ {&__pyx_n_s_weakref, __pyx_k_weakref, sizeof(__pyx_k_weakref), 0, 0, 1, 1},
+ {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
+ {&__pyx_n_s_xbfs, __pyx_k_xbfs, sizeof(__pyx_k_xbfs), 0, 0, 1, 1},
+ {&__pyx_n_s_xbfs_yield_leaves, __pyx_k_xbfs_yield_leaves, sizeof(__pyx_k_xbfs_yield_leaves), 0, 0, 1, 1},
+ {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
+ {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
+ {0, 0, 0, 0, 0, 0, 0}
+};
+static int __Pyx_InitCachedBuiltins(void) {
+ __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 115, __pyx_L1_error)
+ __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) __PYX_ERR(0, 121, __pyx_L1_error)
+ __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 196, __pyx_L1_error)
+ __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 364, __pyx_L1_error)
+ __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 427, __pyx_L1_error)
+ __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 544, __pyx_L1_error)
+ __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 872, __pyx_L1_error)
+ __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 1095, __pyx_L1_error)
+ __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 1103, __pyx_L1_error)
+ __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 1269, __pyx_L1_error)
+ __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 1405, __pyx_L1_error)
+ __pyx_builtin_all = __Pyx_GetBuiltinName(__pyx_n_s_all); if (!__pyx_builtin_all) __PYX_ERR(0, 1513, __pyx_L1_error)
+ __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 2205, __pyx_L1_error)
+ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 2236, __pyx_L1_error)
+ __pyx_builtin_any = __Pyx_GetBuiltinName(__pyx_n_s_any); if (!__pyx_builtin_any) __PYX_ERR(0, 2319, __pyx_L1_error)
+ __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 2591, __pyx_L1_error)
+ __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 2862, __pyx_L1_error)
+ __pyx_builtin_ZeroDivisionError = __Pyx_GetBuiltinName(__pyx_n_s_ZeroDivisionError); if (!__pyx_builtin_ZeroDivisionError) __PYX_ERR(0, 3078, __pyx_L1_error)
+ return 0;
+ __pyx_L1_error:;
+ return -1;
+}
+
+static int __Pyx_InitCachedConstants(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":427
+ * Otherwise, ``value`` is the computed value for this node.
+ * """
+ * raise RuntimeError("The visiting_potential_leaf method needs to be defined.") # <<<<<<<<<<<<<<
+ *
+ * def finalize(self, ans): #pragma: no cover
+ */
+ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_The_visiting_potential_leaf_meth); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 427, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__2);
+ __Pyx_GIVEREF(__pyx_tuple__2);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":544
+ * """
+ * if memo is None:
+ * self.memo = {'__block_scope__': { id(None): False }} # <<<<<<<<<<<<<<
+ * else:
+ * self.memo = memo #pragma: no cover
+ */
+ __pyx_tuple__3 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__3);
+ __Pyx_GIVEREF(__pyx_tuple__3);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":583
+ * Otherwise, ``value`` is a cloned node.
+ * """
+ * raise RuntimeError("The visiting_potential_leaf method needs to be defined.") # <<<<<<<<<<<<<<
+ *
+ * def finalize(self, ans):
+ */
+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_The_visiting_potential_leaf_meth); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 583, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__4);
+ __Pyx_GIVEREF(__pyx_tuple__4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":684
+ * # call the ExpressionReplacementVisitor.visit() function.
+ * #
+ * ans = self.visit(_obj, _result[1:]) # <<<<<<<<<<<<<<
+ * if _result[0] and id(ans) == id(_obj):
+ * ans = self.construct_node(_obj, _result[1:])
+ */
+ __pyx_slice__5 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__5)) __PYX_ERR(0, 684, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__5);
+ __Pyx_GIVEREF(__pyx_slice__5);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":686
+ * ans = self.visit(_obj, _result[1:])
+ * if _result[0] and id(ans) == id(_obj):
+ * ans = self.construct_node(_obj, _result[1:]) # <<<<<<<<<<<<<<
+ * if _stack:
+ * if _result[0]:
+ */
+ __pyx_slice__6 = PySlice_New(__pyx_int_1, Py_None, Py_None); if (unlikely(!__pyx_slice__6)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_slice__6);
+ __Pyx_GIVEREF(__pyx_slice__6);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":748
+ * return True, node
+ *
+ * return False, None # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_tuple__7 = PyTuple_Pack(2, Py_False, Py_None); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 748, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__7);
+ __Pyx_GIVEREF(__pyx_tuple__7);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":781
+ * clone_counter_context._count += 1
+ * if not memo:
+ * memo = {'__block_scope__': { id(None): False }} # <<<<<<<<<<<<<<
+ * #
+ * visitor = _CloneVisitor(clone_leaves=clone_leaves, memo=memo)
+ */
+ __pyx_tuple__8 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 781, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__8);
+ __Pyx_GIVEREF(__pyx_tuple__8);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":843
+ * return True, value(node)
+ *
+ * return False, None # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_tuple__9 = PyTuple_Pack(2, Py_False, Py_None); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 843, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__9);
+ __Pyx_GIVEREF(__pyx_tuple__9);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1020
+ * """
+ * if node.__class__ in nonpyomo_leaf_types or not node.is_potentially_variable():
+ * return True, 0 # <<<<<<<<<<<<<<
+ *
+ * if not node.is_expression_type():
+ */
+ __pyx_tuple__10 = PyTuple_Pack(2, Py_True, __pyx_int_0); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 1020, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__10);
+ __Pyx_GIVEREF(__pyx_tuple__10);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1025
+ * return True, 0 if node.is_fixed() else 1
+ *
+ * return False, None # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_tuple__11 = PyTuple_Pack(2, Py_False, Py_None); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 1025, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__11);
+ __Pyx_GIVEREF(__pyx_tuple__11);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1065
+ * """
+ * if node.__class__ in nonpyomo_leaf_types or not node.is_potentially_variable():
+ * return True, True # <<<<<<<<<<<<<<
+ *
+ * elif not node.is_expression_type():
+ */
+ __pyx_tuple__12 = PyTuple_Pack(2, Py_True, Py_True); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 1065, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__12);
+ __Pyx_GIVEREF(__pyx_tuple__12);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1070
+ * return True, node.is_fixed()
+ *
+ * return False, None # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_tuple__13 = PyTuple_Pack(2, Py_False, Py_None); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 1070, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__13);
+ __Pyx_GIVEREF(__pyx_tuple__13);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1128
+ * """
+ * if node is None:
+ * return True, None # TODO: coverage # <<<<<<<<<<<<<<
+ *
+ * if node.__class__ in nonpyomo_leaf_types:
+ */
+ __pyx_tuple__14 = PyTuple_Pack(2, Py_True, Py_None); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 1128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__14);
+ __Pyx_GIVEREF(__pyx_tuple__14);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1141
+ * return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=self.compute_values)
+ *
+ * return False, None # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_tuple__15 = PyTuple_Pack(2, Py_False, Py_None); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 1141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__15);
+ __Pyx_GIVEREF(__pyx_tuple__15);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2005
+ * def __nonzero__(self):
+ * if _using_chained_inequality and not self.is_constant(): #pragma: no cover
+ * deprecation_warning("Chained inequalities are deprecated. Use the inequality() function to express ranged inequality expressions.") # Remove in Pyomo 6.0 # <<<<<<<<<<<<<<
+ * _chainedInequality.call_info = traceback.extract_stack(limit=2)[-2]
+ * _chainedInequality.prev = self
+ */
+ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_Chained_inequalities_are_depreca); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 2005, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__22);
+ __Pyx_GIVEREF(__pyx_tuple__22);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2080
+ * if lower is None:
+ * if body is None or upper is None:
+ * raise ValueError("Invalid inequality expression.") # <<<<<<<<<<<<<<
+ * return InequalityExpression((body, upper), strict)
+ * if body is None:
+ */
+ __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_Invalid_inequality_expression); if (unlikely(!__pyx_tuple__23)) __PYX_ERR(0, 2080, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__23);
+ __Pyx_GIVEREF(__pyx_tuple__23);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2084
+ * if body is None:
+ * if lower is None or upper is None:
+ * raise ValueError("Invalid inequality expression.") # <<<<<<<<<<<<<<
+ * return InequalityExpression((lower, upper), strict)
+ * if upper is None:
+ */
+ __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_Invalid_inequality_expression); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 2084, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__24);
+ __Pyx_GIVEREF(__pyx_tuple__24);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2090
+ * if id(lower) == id(upper):
+ * if strict:
+ * raise ValueError("Invalid equality expression with strict inequalities.") # <<<<<<<<<<<<<<
+ * return EqualityExpression((body, lower))
+ * return RangedExpression((lower, body, upper), (strict, strict))
+ */
+ __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_Invalid_equality_expression_with); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 2090, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__25);
+ __Pyx_GIVEREF(__pyx_tuple__25);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2689
+ * elif _other.is_potentially_variable():
+ * if len(self.linear_vars) > 0:
+ * raise ValueError("Cannot multiply a linear expression with a variable expression") # <<<<<<<<<<<<<<
+ * #
+ * # The linear expression is a constant, so re-initialize it with
+ */
+ __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_Cannot_multiply_a_linear_express); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 2689, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__31);
+ __Pyx_GIVEREF(__pyx_tuple__31);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2719
+ * divisor = _other
+ * elif _other.is_potentially_variable():
+ * raise ValueError("Unallowed operation on linear expression: division with a variable RHS") # <<<<<<<<<<<<<<
+ * else:
+ * divisor = _other
+ */
+ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_Unallowed_operation_on_linear_ex); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 2719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__32);
+ __Pyx_GIVEREF(__pyx_tuple__32);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2728
+ * elif etype == -_div:
+ * if self.is_potentially_variable():
+ * raise ValueError("Unallowed operation on linear expression: division with a variable RHS") # <<<<<<<<<<<<<<
+ * return _other / self.constant
+ *
+ */
+ __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_Unallowed_operation_on_linear_ex); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 2728, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__33);
+ __Pyx_GIVEREF(__pyx_tuple__33);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2779
+ * return True, terms
+ * except LinearDecompositionError:
+ * return False, None # <<<<<<<<<<<<<<
+ *
+ * class LinearDecompositionError(Exception):
+ */
+ __pyx_tuple__34 = PyTuple_Pack(2, Py_False, Py_None); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 2779, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__34);
+ __Pyx_GIVEREF(__pyx_tuple__34);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2814
+ * yield term
+ * else:
+ * raise LinearDecompositionError("Quadratic terms exist in a product expression.") # <<<<<<<<<<<<<<
+ * elif expr.__class__ is ReciprocalExpression:
+ * # The argument is potentially variable, so this represents a nonlinear term
+ */
+ __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_Quadratic_terms_exist_in_a_produ); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 2814, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__35);
+ __Pyx_GIVEREF(__pyx_tuple__35);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2819
+ * #
+ * # NOTE: We're ignoring possible simplifications
+ * raise LinearDecompositionError("Unexpected nonlinear term") # <<<<<<<<<<<<<<
+ * elif expr.__class__ is ViewSumExpression or expr.__class__ is _MutableViewSumExpression:
+ * for arg in expr.args:
+ */
+ __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_Unexpected_nonlinear_term); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 2819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__36);
+ __Pyx_GIVEREF(__pyx_tuple__36);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2834
+ * yield (multiplier*c,v)
+ * else:
+ * raise LinearDecompositionError("Unexpected nonlinear term") #pragma: no cover # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_Unexpected_nonlinear_term); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 2834, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__37);
+ __Pyx_GIVEREF(__pyx_tuple__37);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3230
+ * "inequalities: constraint infeasible:\n\t%s and "
+ * "%s < %s" % ( prevExpr.to_string(), lhs, rhs ))
+ * if match[0] == (0,0): # <<<<<<<<<<<<<<
+ * # This is a particularly weird case where someone
+ * # evaluates the *same* inequality twice in a row. This
+ */
+ __pyx_tuple__38 = PyTuple_Pack(2, __pyx_int_0, __pyx_int_0); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 3230, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__38);
+ __Pyx_GIVEREF(__pyx_tuple__38);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3262
+ * if lhs.__class__ is InequalityExpression:
+ * if rhs_is_relational:
+ * raise TypeError("Cannot create an InequalityExpression "\ # <<<<<<<<<<<<<<
+ * "where both sub-expressions are relational "\
+ * "expressions.")
+ */
+ __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_an_InequalityExpre); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 3262, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__39);
+ __Pyx_GIVEREF(__pyx_tuple__39);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3328
+ * if lhs.__class__ is InequalityExpression:
+ * if rhs_is_relational:
+ * raise TypeError("Cannot create an InequalityExpression "\ # <<<<<<<<<<<<<<
+ * "where both sub-expressions are relational "\
+ * "expressions.")
+ */
+ __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_Cannot_create_an_InequalityExpre); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 3328, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__40);
+ __Pyx_GIVEREF(__pyx_tuple__40);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":23
+ * #
+ * __all__ = (
+ * 'linear_expression', # <<<<<<<<<<<<<<
+ * 'nonlinear_expression',
+ * 'inequality',
+ */
+ __pyx_tuple__41 = PyTuple_Pack(53, __pyx_n_s_linear_expression, __pyx_n_s_nonlinear_expression, __pyx_n_s_inequality, __pyx_n_s_mutable_sum_context, __pyx_n_s_mutable_linear_context, __pyx_n_s_decompose_term, __pyx_n_s_clone_counter, __pyx_n_s_clone_counter_context, __pyx_n_s_clone_expression, __pyx_n_s_evaluate_expression, __pyx_n_s_identify_components, __pyx_n_s_identify_variables, __pyx_n_s_identify_mutable_parameters, __pyx_n_s_expression_to_string, __pyx_n_s_ExpressionBase, __pyx_n_s_EqualityExpression, __pyx_n_s_RangedExpression, __pyx_n_s_InequalityExpression, __pyx_n_s_ProductExpression, __pyx_n_s_PowExpression, __pyx_n_s_ExternalFunctionExpression, __pyx_n_s_GetItemExpression, __pyx_n_s_Expr_if, __pyx_n_s_LinearExpression, __pyx_n_s_ReciprocalExpression, __pyx_n_s_NegationExpression, __pyx_n_s_ViewSumExpression, __pyx_n_s_UnaryFunctionExpression, __pyx_n_s_AbsExpression, __pyx_n_s_compress_expression, __pyx_n_s_NPV_NegationExpression, __pyx_n_s_NPV_ExternalFunctionExpression, __pyx_n_s_NPV_PowExpression, __pyx_n_s_NPV_ProductExpression, __pyx_n_s_NPV_ReciprocalExpression, __pyx_n_s_NPV_SumExpression, __pyx_n_s_NPV_UnaryFunctionExpression, __pyx_n_s_NPV_AbsExpression, __pyx_n_s_SimpleExpressionVisitor, __pyx_n_s_ExpressionValueVisitor, __pyx_n_s_ExpressionReplacementVisitor, __pyx_n_s_LinearDecompositionError, __pyx_n_s_SumExpression, __pyx_n_s_MutableViewSumExpression, __pyx_n_s_MutableLinearExpression, __pyx_n_s_decompose_linear_terms, __pyx_n_s_chainedInequality, __pyx_n_s_using_chained_inequality, __pyx_n_s_generate_sum_expression, __pyx_n_s_generate_mul_expression, __pyx_n_s_generate_other_expression, __pyx_n_s_generate_intrinsic_function_exp, __pyx_n_s_generate_relational_expression); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 23, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__41);
+ __Pyx_GIVEREF(__pyx_tuple__41);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":89
+ * from weakref import ref
+ *
+ * logger = logging.getLogger('pyomo.core') # <<<<<<<<<<<<<<
+ *
+ * from pyutilib.misc.visitor import SimpleVisitor, ValueVisitor
+ */
+ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_pyomo_core); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__42);
+ __Pyx_GIVEREF(__pyx_tuple__42);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":115
+ *
+ * if _using_chained_inequality: #pragma: no cover
+ * class _chainedInequality(object): # <<<<<<<<<<<<<<
+ *
+ * prev = None
+ */
+ __pyx_tuple__43 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__43);
+ __Pyx_GIVEREF(__pyx_tuple__43);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":122
+ *
+ * @staticmethod
+ * def error_message(msg=None): # <<<<<<<<<<<<<<
+ * if msg is None:
+ * msg = "Relational expression used in an unexpected Boolean context."
+ */
+ __pyx_tuple__44 = PyTuple_Pack(4, __pyx_n_s_msg, __pyx_n_s_val, __pyx_n_s_info, __pyx_n_s_args); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__44);
+ __Pyx_GIVEREF(__pyx_tuple__44);
+ __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_error_message, 122, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __pyx_tuple__46 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__46);
+ __Pyx_GIVEREF(__pyx_tuple__46);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":158
+ * SimpleParam = None
+ * TemplateExpressionError = None
+ * def initialize_expression_data(): # <<<<<<<<<<<<<<
+ * """
+ * A function used to initialize expression global data.
+ */
+ __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(0, 0, 0, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_initialize_expression_data, 158, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 158, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":172
+ *
+ *
+ * def compress_expression(expr): # <<<<<<<<<<<<<<
+ * """
+ * Deprecated function that was used to compress deep Pyomo5
+ */
+ __pyx_tuple__48 = PyTuple_Pack(1, __pyx_n_s_expr); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__48);
+ __Pyx_GIVEREF(__pyx_tuple__48);
+ __pyx_codeobj__49 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__48, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_compress_expression, 172, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__49)) __PYX_ERR(0, 172, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":180
+ *
+ *
+ * class clone_counter_context(object): # <<<<<<<<<<<<<<
+ * """ Context manager for counting cloning events.
+ *
+ */
+ __pyx_tuple__50 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 180, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__50);
+ __Pyx_GIVEREF(__pyx_tuple__50);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":190
+ * _count = 0
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+ __pyx_tuple__51 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 190, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__51);
+ __Pyx_GIVEREF(__pyx_tuple__51);
+ __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_enter, 190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 190, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":193
+ * return self
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * pass
+ *
+ */
+ __pyx_tuple__53 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__53);
+ __Pyx_GIVEREF(__pyx_tuple__53);
+ __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_exit, 193, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 193, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":197
+ *
+ * @property
+ * def count(self): # <<<<<<<<<<<<<<
+ * """A property that returns the clone count value.
+ * """
+ */
+ __pyx_tuple__55 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 197, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__55);
+ __Pyx_GIVEREF(__pyx_tuple__55);
+ __pyx_codeobj__56 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_count_2, 197, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__56)) __PYX_ERR(0, 197, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":208
+ *
+ *
+ * class mutable_sum_context(object): # <<<<<<<<<<<<<<
+ * """ Context manager for mutable sums.
+ *
+ */
+ __pyx_tuple__57 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__57);
+ __Pyx_GIVEREF(__pyx_tuple__57);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":215
+ * """
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * self.e = _MutableViewSumExpression([])
+ * return self.e
+ */
+ __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 215, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__58);
+ __Pyx_GIVEREF(__pyx_tuple__58);
+ __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_enter, 215, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 215, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":219
+ * return self.e
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * pass
+ * if self.e.__class__ == _MutableViewSumExpression:
+ */
+ __pyx_tuple__60 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 219, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__60);
+ __Pyx_GIVEREF(__pyx_tuple__60);
+ __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_exit, 219, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 219, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":230
+ *
+ *
+ * class mutable_linear_context(object): # <<<<<<<<<<<<<<
+ * """ Context manager for mutable linear sums.
+ *
+ */
+ __pyx_tuple__62 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 230, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__62);
+ __Pyx_GIVEREF(__pyx_tuple__62);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":237
+ * """
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * """
+ * The :class:`_MutableLinearExpression `
+ */
+ __pyx_tuple__63 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 237, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__63);
+ __Pyx_GIVEREF(__pyx_tuple__63);
+ __pyx_codeobj__64 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__63, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_enter, 237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__64)) __PYX_ERR(0, 237, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":246
+ * return self.e
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * """
+ * The context is changed to the
+ */
+ __pyx_tuple__65 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__65);
+ __Pyx_GIVEREF(__pyx_tuple__65);
+ __pyx_codeobj__66 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__65, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_exit, 246, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__66)) __PYX_ERR(0, 246, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":268
+ * #-------------------------------------------------------
+ *
+ * class SimpleExpressionVisitor(object): # <<<<<<<<<<<<<<
+ * """
+ * Note:
+ */
+ __pyx_tuple__67 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__67)) __PYX_ERR(0, 268, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__67);
+ __Pyx_GIVEREF(__pyx_tuple__67);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":279
+ * """
+ *
+ * def visit(self, node): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Visit a node in an expression tree and perform some operation on
+ */
+ __pyx_tuple__68 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 279, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__68);
+ __Pyx_GIVEREF(__pyx_tuple__68);
+ __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visit, 279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 279, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":295
+ * pass
+ *
+ * def finalize(self): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Return the "final value" of the search.
+ */
+ __pyx_tuple__70 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 295, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__70);
+ __Pyx_GIVEREF(__pyx_tuple__70);
+ __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_finalize, 295, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 295, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":307
+ * pass
+ *
+ * def xbfs(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Breadth-first search of an expression tree,
+ */
+ __pyx_tuple__72 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_dq, __pyx_n_s_current, __pyx_n_s_c); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__72);
+ __Pyx_GIVEREF(__pyx_tuple__72);
+ __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_xbfs, 307, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 307, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":338
+ * return self.finalize()
+ *
+ * def xbfs_yield_leaves(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Breadth-first search of an expression tree, except that
+ */
+ __pyx_tuple__74 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_ans, __pyx_n_s_dq, __pyx_n_s_current, __pyx_n_s_c); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__74);
+ __Pyx_GIVEREF(__pyx_tuple__74);
+ __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_xbfs_yield_leaves, 338, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 338, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":383
+ *
+ *
+ * class ExpressionValueVisitor(object): # <<<<<<<<<<<<<<
+ * """
+ * Note:
+ */
+ __pyx_tuple__76 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 383, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__76);
+ __Pyx_GIVEREF(__pyx_tuple__76);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":394
+ * """
+ *
+ * def visit(self, node, values): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Visit a node in a tree and compute its value using
+ */
+ __pyx_tuple__77 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_values); if (unlikely(!__pyx_tuple__77)) __PYX_ERR(0, 394, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__77);
+ __Pyx_GIVEREF(__pyx_tuple__77);
+ __pyx_codeobj__78 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__77, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visit, 394, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__78)) __PYX_ERR(0, 394, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":411
+ * pass
+ *
+ * def visiting_potential_leaf(self, node): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Visit a node and return its value if it is a leaf.
+ */
+ __pyx_tuple__79 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__79)) __PYX_ERR(0, 411, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__79);
+ __Pyx_GIVEREF(__pyx_tuple__79);
+ __pyx_codeobj__80 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__79, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visiting_potential_leaf, 411, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__80)) __PYX_ERR(0, 411, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":429
+ * raise RuntimeError("The visiting_potential_leaf method needs to be defined.")
+ *
+ * def finalize(self, ans): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * This method defines the return value for the search methods
+ */
+ __pyx_tuple__81 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ans); if (unlikely(!__pyx_tuple__81)) __PYX_ERR(0, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__81);
+ __Pyx_GIVEREF(__pyx_tuple__81);
+ __pyx_codeobj__82 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__81, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_finalize, 429, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__82)) __PYX_ERR(0, 429, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":448
+ * return ans
+ *
+ * def dfs_postorder_stack(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Perform a depth-first search in postorder using a stack
+ */
+ __pyx_tuple__83 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_flag, __pyx_n_s_value, __pyx_n_s_stack, __pyx_n_s_obj, __pyx_n_s_argList, __pyx_n_s_idx, __pyx_n_s_len, __pyx_n_s_result_2, __pyx_n_s_sub, __pyx_n_s_ans); if (unlikely(!__pyx_tuple__83)) __PYX_ERR(0, 448, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__83);
+ __Pyx_GIVEREF(__pyx_tuple__83);
+ __pyx_codeobj__84 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__83, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_dfs_postorder_stack, 448, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__84)) __PYX_ERR(0, 448, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":520
+ *
+ *
+ * class ExpressionReplacementVisitor(object): # <<<<<<<<<<<<<<
+ * """
+ * Note:
+ */
+ __pyx_tuple__85 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__85)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__85);
+ __Pyx_GIVEREF(__pyx_tuple__85);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":531
+ * """
+ *
+ * def __init__(self, memo=None): # <<<<<<<<<<<<<<
+ * """
+ * Contruct a visitor that is tailored to support the
+ */
+ __pyx_tuple__86 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__86);
+ __Pyx_GIVEREF(__pyx_tuple__86);
+ __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 531, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __pyx_tuple__88 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__88);
+ __Pyx_GIVEREF(__pyx_tuple__88);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":548
+ * self.memo = memo #pragma: no cover
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """
+ * Visit and clone nodes that have been expanded.
+ */
+ __pyx_tuple__89 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_values); if (unlikely(!__pyx_tuple__89)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__89);
+ __Pyx_GIVEREF(__pyx_tuple__89);
+ __pyx_codeobj__90 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__89, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visit, 548, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__90)) __PYX_ERR(0, 548, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":567
+ * return node
+ *
+ * def visiting_potential_leaf(self, node): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Visit a node and return a cloned node if it is a leaf.
+ */
+ __pyx_tuple__91 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__91)) __PYX_ERR(0, 567, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__91);
+ __Pyx_GIVEREF(__pyx_tuple__91);
+ __pyx_codeobj__92 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__91, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visiting_potential_leaf, 567, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__92)) __PYX_ERR(0, 567, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":585
+ * raise RuntimeError("The visiting_potential_leaf method needs to be defined.")
+ *
+ * def finalize(self, ans): # <<<<<<<<<<<<<<
+ * """
+ * This method defines the return value for the search methods
+ */
+ __pyx_tuple__93 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_ans); if (unlikely(!__pyx_tuple__93)) __PYX_ERR(0, 585, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__93);
+ __Pyx_GIVEREF(__pyx_tuple__93);
+ __pyx_codeobj__94 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__93, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_finalize, 585, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__94)) __PYX_ERR(0, 585, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":604
+ * return ans
+ *
+ * def construct_node(self, node, values): # <<<<<<<<<<<<<<
+ * """
+ * Call the expression construct_node() method.
+ */
+ __pyx_tuple__95 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_values); if (unlikely(!__pyx_tuple__95)) __PYX_ERR(0, 604, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__95);
+ __Pyx_GIVEREF(__pyx_tuple__95);
+ __pyx_codeobj__96 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__95, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_construct_node, 604, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__96)) __PYX_ERR(0, 604, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":610
+ * return node.construct_node( tuple(values), self.memo )
+ *
+ * def dfs_postorder_stack(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Perform a depth-first search in postorder using a stack
+ */
+ __pyx_tuple__97 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_flag, __pyx_n_s_value, __pyx_n_s_stack, __pyx_n_s_obj, __pyx_n_s_argList, __pyx_n_s_idx, __pyx_n_s_len, __pyx_n_s_result_2, __pyx_n_s_sub, __pyx_n_s_ans); if (unlikely(!__pyx_tuple__97)) __PYX_ERR(0, 610, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__97);
+ __Pyx_GIVEREF(__pyx_tuple__97);
+ __pyx_codeobj__98 = (PyObject*)__Pyx_PyCode_New(2, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__97, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_dfs_postorder_stack, 610, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__98)) __PYX_ERR(0, 610, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":711
+ * class _CloneVisitor(ExpressionValueVisitor):
+ *
+ * def __init__(self, clone_leaves=False, memo=None): # <<<<<<<<<<<<<<
+ * self.clone_leaves = clone_leaves
+ * self.memo = memo
+ */
+ __pyx_tuple__99 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_clone_leaves, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__99)) __PYX_ERR(0, 711, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__99);
+ __Pyx_GIVEREF(__pyx_tuple__99);
+ __pyx_codeobj__100 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__99, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 711, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__100)) __PYX_ERR(0, 711, __pyx_L1_error)
+ __pyx_tuple__101 = PyTuple_Pack(2, ((PyObject *)Py_False), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__101)) __PYX_ERR(0, 711, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__101);
+ __Pyx_GIVEREF(__pyx_tuple__101);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":715
+ * self.memo = memo
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node.construct_node( tuple(values), self.memo )
+ */
+ __pyx_tuple__102 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_values); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 715, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__102);
+ __Pyx_GIVEREF(__pyx_tuple__102);
+ __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visit, 715, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 715, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":719
+ * return node.construct_node( tuple(values), self.memo )
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+ __pyx_tuple__104 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__104);
+ __Pyx_GIVEREF(__pyx_tuple__104);
+ __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visiting_potential_leaf, 719, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 719, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":751
+ *
+ *
+ * def clone_expression(expr, memo=None, clone_leaves=True): # <<<<<<<<<<<<<<
+ * """A function that is used to clone an expression.
+ *
+ */
+ __pyx_tuple__106 = PyTuple_Pack(4, __pyx_n_s_expr, __pyx_n_s_memo, __pyx_n_s_clone_leaves, __pyx_n_s_visitor); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 751, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__106);
+ __Pyx_GIVEREF(__pyx_tuple__106);
+ __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_clone_expression, 751, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 751, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":793
+ * class _SizeVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * self.counter = 0
+ *
+ */
+ __pyx_tuple__108 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 793, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__108);
+ __Pyx_GIVEREF(__pyx_tuple__108);
+ __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 793, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 793, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":796
+ * self.counter = 0
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * self.counter += 1
+ *
+ */
+ __pyx_tuple__110 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 796, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__110);
+ __Pyx_GIVEREF(__pyx_tuple__110);
+ __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visit, 796, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 796, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":799
+ * self.counter += 1
+ *
+ * def finalize(self): # <<<<<<<<<<<<<<
+ * return self.counter
+ *
+ */
+ __pyx_tuple__112 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__112);
+ __Pyx_GIVEREF(__pyx_tuple__112);
+ __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_finalize, 799, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 799, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":803
+ *
+ *
+ * def _sizeof_expression(expr): # <<<<<<<<<<<<<<
+ * """
+ * Return the number of nodes in the expression tree.
+ */
+ __pyx_tuple__114 = PyTuple_Pack(2, __pyx_n_s_expr, __pyx_n_s_visitor); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 803, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__114);
+ __Pyx_GIVEREF(__pyx_tuple__114);
+ __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_sizeof_expression, 803, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 803, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":824
+ * class _EvaluationVisitor(ExpressionValueVisitor):
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node._apply_operation(values)
+ */
+ __pyx_tuple__116 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_values); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 824, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__116);
+ __Pyx_GIVEREF(__pyx_tuple__116);
+ __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visit, 824, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 824, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":828
+ * return node._apply_operation(values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+ __pyx_tuple__118 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__118);
+ __Pyx_GIVEREF(__pyx_tuple__118);
+ __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visiting_potential_leaf, 828, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 828, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":846
+ *
+ *
+ * def evaluate_expression(exp, exception=True): # <<<<<<<<<<<<<<
+ * """
+ * Evaluate the value of the expression.
+ */
+ __pyx_tuple__120 = PyTuple_Pack(3, __pyx_n_s_exp, __pyx_n_s_exception, __pyx_n_s_visitor); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 846, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__120);
+ __Pyx_GIVEREF(__pyx_tuple__120);
+ __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_evaluate_expression, 846, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 846, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":884
+ * class _ComponentVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self, types): # <<<<<<<<<<<<<<
+ * self.seen = set()
+ * if types.__class__ is set:
+ */
+ __pyx_tuple__122 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_types); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 884, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__122);
+ __Pyx_GIVEREF(__pyx_tuple__122);
+ __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 884, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 884, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":891
+ * self.types = set(types)
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * if node.__class__ in self.types:
+ * if id(node) in self.seen:
+ */
+ __pyx_tuple__124 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 891, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__124);
+ __Pyx_GIVEREF(__pyx_tuple__124);
+ __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visit, 891, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 891, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":899
+ *
+ *
+ * def identify_components(expr, component_types): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of nodes
+ */
+ __pyx_tuple__126 = PyTuple_Pack(4, __pyx_n_s_expr, __pyx_n_s_component_types, __pyx_n_s_visitor, __pyx_n_s_v); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 899, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__126);
+ __Pyx_GIVEREF(__pyx_tuple__126);
+ __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_identify_components, 899, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 899, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":928
+ * class _VariableVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * self.seen = set()
+ *
+ */
+ __pyx_tuple__128 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 928, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__128);
+ __Pyx_GIVEREF(__pyx_tuple__128);
+ __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 928, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 928, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":931
+ * self.seen = set()
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * if node.__class__ in nonpyomo_leaf_types:
+ * return
+ */
+ __pyx_tuple__130 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 931, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__130);
+ __Pyx_GIVEREF(__pyx_tuple__130);
+ __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visit, 931, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 931, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":942
+ *
+ *
+ * def identify_variables(expr, include_fixed=True): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of variables
+ */
+ __pyx_tuple__132 = PyTuple_Pack(4, __pyx_n_s_expr, __pyx_n_s_include_fixed, __pyx_n_s_visitor, __pyx_n_s_v); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 942, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__132);
+ __Pyx_GIVEREF(__pyx_tuple__132);
+ __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_identify_variables, 942, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 942, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":972
+ * class _MutableParamVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * self.seen = set()
+ *
+ */
+ __pyx_tuple__134 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 972, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__134);
+ __Pyx_GIVEREF(__pyx_tuple__134);
+ __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 972, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 972, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":975
+ * self.seen = set()
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * if node.__class__ in nonpyomo_leaf_types:
+ * return
+ */
+ __pyx_tuple__136 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 975, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__136);
+ __Pyx_GIVEREF(__pyx_tuple__136);
+ __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visit, 975, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 975, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":987
+ *
+ *
+ * def identify_mutable_parameters(expr): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of mutable
+ */
+ __pyx_tuple__138 = PyTuple_Pack(3, __pyx_n_s_expr, __pyx_n_s_visitor, __pyx_n_s_v); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 987, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__138);
+ __Pyx_GIVEREF(__pyx_tuple__138);
+ __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_identify_mutable_parameters, 987, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 987, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1009
+ * class _PolyDegreeVisitor(ExpressionValueVisitor):
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node._compute_polynomial_degree(values)
+ */
+ __pyx_tuple__140 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_values); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 1009, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__140);
+ __Pyx_GIVEREF(__pyx_tuple__140);
+ __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visit, 1009, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 1009, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1013
+ * return node._compute_polynomial_degree(values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+ __pyx_tuple__142 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 1013, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__142);
+ __Pyx_GIVEREF(__pyx_tuple__142);
+ __pyx_codeobj__143 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__142, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visiting_potential_leaf, 1013, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__143)) __PYX_ERR(0, 1013, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1028
+ *
+ *
+ * def _polynomial_degree(node): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+ __pyx_tuple__144 = PyTuple_Pack(2, __pyx_n_s_node, __pyx_n_s_visitor); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 1028, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__144);
+ __Pyx_GIVEREF(__pyx_tuple__144);
+ __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_polynomial_degree, 1028, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 1028, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1054
+ * """
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node._is_fixed(values)
+ */
+ __pyx_tuple__146 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_values); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 1054, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__146);
+ __Pyx_GIVEREF(__pyx_tuple__146);
+ __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visit, 1054, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 1054, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1058
+ * return node._is_fixed(values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+ __pyx_tuple__148 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 1058, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__148);
+ __Pyx_GIVEREF(__pyx_tuple__148);
+ __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visiting_potential_leaf, 1058, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 1058, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1073
+ *
+ *
+ * def _expression_is_fixed(node): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+ __pyx_tuple__150 = PyTuple_Pack(2, __pyx_n_s_node, __pyx_n_s_visitor); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 1073, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__150);
+ __Pyx_GIVEREF(__pyx_tuple__150);
+ __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_expression_is_fixed, 1073, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 1073, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1094
+ * class _ToStringVisitor(ExpressionValueVisitor):
+ *
+ * def __init__(self, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * super(_ToStringVisitor, self).__init__()
+ * self.verbose = verbose
+ */
+ __pyx_tuple__152 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 1094, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__152);
+ __Pyx_GIVEREF(__pyx_tuple__152);
+ __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 1094, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 1094, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1100
+ * self.compute_values = compute_values
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * tmp = []
+ */
+ __pyx_tuple__154 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_node, __pyx_n_s_values, __pyx_n_s_tmp, __pyx_n_s_i, __pyx_n_s_val, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 1100, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__154);
+ __Pyx_GIVEREF(__pyx_tuple__154);
+ __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visit, 1100, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 1100, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1121
+ * return node._to_string(tmp, self.verbose, self.smap, self.compute_values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+ __pyx_tuple__156 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_node); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 1121, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__156);
+ __Pyx_GIVEREF(__pyx_tuple__156);
+ __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_visiting_potential_leaf, 1121, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 1121, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1144
+ *
+ *
+ * def expression_to_string(expr, verbose=None, labeler=None, smap=None, compute_values=False, standardize=False): # <<<<<<<<<<<<<<
+ * """
+ * Return a string representation of an expression.
+ */
+ __pyx_tuple__158 = PyTuple_Pack(12, __pyx_n_s_expr, __pyx_n_s_verbose, __pyx_n_s_labeler, __pyx_n_s_smap, __pyx_n_s_compute_values, __pyx_n_s_standardize, __pyx_n_s_generate_standard_repn, __pyx_n_s_repn0, __pyx_n_s_repn1, __pyx_n_s_repn2, __pyx_n_s_repn, __pyx_n_s_visitor); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 1144, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__158);
+ __Pyx_GIVEREF(__pyx_tuple__158);
+ __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(6, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_expression_to_string, 1144, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 1144, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1234
+ * """
+ *
+ * __slots__ = ('_args_',) # <<<<<<<<<<<<<<
+ * PRECEDENCE = 0
+ *
+ */
+ __pyx_tuple__160 = PyTuple_Pack(1, __pyx_n_s_args_2); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 1234, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__160);
+ __Pyx_GIVEREF(__pyx_tuple__160);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1237
+ * PRECEDENCE = 0
+ *
+ * def __init__(self, args): # <<<<<<<<<<<<<<
+ * self._args_ = args
+ *
+ */
+ __pyx_tuple__161 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__161)) __PYX_ERR(0, 1237, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__161);
+ __Pyx_GIVEREF(__pyx_tuple__161);
+ __pyx_codeobj__162 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__161, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 1237, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__162)) __PYX_ERR(0, 1237, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1240
+ * self._args_ = args
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * """
+ * Returns the number of child nodes.
+ */
+ __pyx_tuple__163 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 1240, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__163);
+ __Pyx_GIVEREF(__pyx_tuple__163);
+ __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nargs, 1240, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 1240, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1258
+ * return 2
+ *
+ * def arg(self, i): # <<<<<<<<<<<<<<
+ * """
+ * Return the i-th child node.
+ */
+ __pyx_tuple__165 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_i); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 1258, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__165);
+ __Pyx_GIVEREF(__pyx_tuple__165);
+ __pyx_codeobj__166 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__165, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_arg, 1258, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__166)) __PYX_ERR(0, 1258, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1275
+ *
+ * @property
+ * def args(self): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields the child nodes.
+ */
+ __pyx_tuple__167 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__167)) __PYX_ERR(0, 1275, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__167);
+ __Pyx_GIVEREF(__pyx_tuple__167);
+ __pyx_codeobj__168 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__167, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_args, 1275, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__168)) __PYX_ERR(0, 1275, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1284
+ * return islice(self._args_, self.nargs())
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * """
+ * Pickle the expression object
+ */
+ __pyx_tuple__169 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_i); if (unlikely(!__pyx_tuple__169)) __PYX_ERR(0, 1284, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__169);
+ __Pyx_GIVEREF(__pyx_tuple__169);
+ __pyx_codeobj__170 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__169, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getstate, 1284, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__170)) __PYX_ERR(0, 1284, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1296
+ * return state
+ *
+ * def __nonzero__(self): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Compute the value of the expression and convert it to
+ */
+ __pyx_tuple__171 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__171)) __PYX_ERR(0, 1296, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__171);
+ __Pyx_GIVEREF(__pyx_tuple__171);
+ __pyx_codeobj__172 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__171, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nonzero, 1296, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__172)) __PYX_ERR(0, 1296, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1308
+ * __bool__ = __nonzero__
+ *
+ * def __call__(self, exception=True): # <<<<<<<<<<<<<<
+ * """
+ * Evaluate the value of the expression tree.
+ */
+ __pyx_tuple__173 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_exception); if (unlikely(!__pyx_tuple__173)) __PYX_ERR(0, 1308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__173);
+ __Pyx_GIVEREF(__pyx_tuple__173);
+ __pyx_codeobj__174 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__173, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_call, 1308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__174)) __PYX_ERR(0, 1308, __pyx_L1_error)
+ __pyx_tuple__175 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__175)) __PYX_ERR(0, 1308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__175);
+ __Pyx_GIVEREF(__pyx_tuple__175);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1323
+ * return evaluate_expression(self, exception)
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * """
+ * Returns a string description of the expression.
+ */
+ __pyx_tuple__176 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__176)) __PYX_ERR(0, 1323, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__176);
+ __Pyx_GIVEREF(__pyx_tuple__176);
+ __pyx_codeobj__177 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__176, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_str, 1323, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__177)) __PYX_ERR(0, 1323, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1340
+ * return expression_to_string(self, standardize=True)
+ *
+ * def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False): # <<<<<<<<<<<<<<
+ * """
+ * Return a string representation of the expression tree.
+ */
+ __pyx_tuple__178 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_verbose, __pyx_n_s_labeler, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__178)) __PYX_ERR(0, 1340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__178);
+ __Pyx_GIVEREF(__pyx_tuple__178);
+ __pyx_codeobj__179 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__178, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string, 1340, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__179)) __PYX_ERR(0, 1340, __pyx_L1_error)
+ __pyx_tuple__180 = PyTuple_Pack(4, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__180)) __PYX_ERR(0, 1340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__180);
+ __Pyx_GIVEREF(__pyx_tuple__180);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1362
+ * return expression_to_string(self, verbose=verbose, labeler=labeler, smap=smap, compute_values=compute_values)
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ExpressionBase.PRECEDENCE
+ *
+ */
+ __pyx_tuple__181 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__181)) __PYX_ERR(0, 1362, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__181);
+ __Pyx_GIVEREF(__pyx_tuple__181);
+ __pyx_codeobj__182 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__181, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_precedence, 1362, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__182)) __PYX_ERR(0, 1362, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1365
+ * return ExpressionBase.PRECEDENCE
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Construct a string representation for this node, using the string
+ */
+ __pyx_tuple__183 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__183)) __PYX_ERR(0, 1365, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__183);
+ __Pyx_GIVEREF(__pyx_tuple__183);
+ __pyx_codeobj__184 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__183, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 1365, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__184)) __PYX_ERR(0, 1365, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1392
+ * pass
+ *
+ * def getname(self, *args, **kwds): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Return the text name of a function associated with this expression object.
+ */
+ __pyx_tuple__185 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__185)) __PYX_ERR(0, 1392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__185);
+ __Pyx_GIVEREF(__pyx_tuple__185);
+ __pyx_codeobj__186 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__185, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getname, 1392, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__186)) __PYX_ERR(0, 1392, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1408
+ * "implement getname()" % ( str(self.__class__), ))
+ *
+ * def clone(self, substitute=None): # <<<<<<<<<<<<<<
+ * """
+ * Return a clone of the expression tree.
+ */
+ __pyx_tuple__187 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_substitute); if (unlikely(!__pyx_tuple__187)) __PYX_ERR(0, 1408, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__187);
+ __Pyx_GIVEREF(__pyx_tuple__187);
+ __pyx_codeobj__188 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__187, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_clone, 1408, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__188)) __PYX_ERR(0, 1408, __pyx_L1_error)
+ __pyx_tuple__189 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__189)) __PYX_ERR(0, 1408, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__189);
+ __Pyx_GIVEREF(__pyx_tuple__189);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1428
+ * return clone_expression(self, memo=substitute, clone_leaves=False)
+ *
+ * def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
+ * """
+ * Return a clone of the expression tree.
+ */
+ __pyx_tuple__190 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__190)) __PYX_ERR(0, 1428, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__190);
+ __Pyx_GIVEREF(__pyx_tuple__190);
+ __pyx_codeobj__191 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__190, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_deepcopy_2, 1428, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__191)) __PYX_ERR(0, 1428, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1443
+ * return clone_expression(self, memo=memo, clone_leaves=True)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * """
+ * Construct a node using given arguments.
+ */
+ __pyx_tuple__192 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__192)) __PYX_ERR(0, 1443, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__192);
+ __Pyx_GIVEREF(__pyx_tuple__192);
+ __pyx_codeobj__193 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__192, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_construct_node, 1443, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__193)) __PYX_ERR(0, 1443, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1473
+ * return self.__class__(args)
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * """Return True if this expression is an atomic constant
+ *
+ */
+ __pyx_tuple__194 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__194)) __PYX_ERR(0, 1473, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__194);
+ __Pyx_GIVEREF(__pyx_tuple__194);
+ __pyx_codeobj__195 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__194, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_constant, 1473, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__195)) __PYX_ERR(0, 1473, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1486
+ * return False
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this expression contains no free variables.
+ */
+ __pyx_tuple__196 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__196)) __PYX_ERR(0, 1486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__196);
+ __Pyx_GIVEREF(__pyx_tuple__196);
+ __pyx_codeobj__197 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__196, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_fixed, 1486, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__197)) __PYX_ERR(0, 1486, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1495
+ * return _expression_is_fixed(self)
+ *
+ * def _is_fixed(self, values): # <<<<<<<<<<<<<<
+ * """
+ * Compute whether this expression is fixed given
+ */
+ __pyx_tuple__198 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_values); if (unlikely(!__pyx_tuple__198)) __PYX_ERR(0, 1495, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__198);
+ __Pyx_GIVEREF(__pyx_tuple__198);
+ __pyx_codeobj__199 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__198, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_fixed_2, 1495, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__199)) __PYX_ERR(0, 1495, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1515
+ * return all(values)
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this expression contains variables.
+ */
+ __pyx_tuple__200 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__200)) __PYX_ERR(0, 1515, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__200);
+ __Pyx_GIVEREF(__pyx_tuple__200);
+ __pyx_codeobj__201 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__200, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 1515, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__201)) __PYX_ERR(0, 1515, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1529
+ * return True
+ *
+ * def is_named_expression_type(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this object is a named expression.
+ */
+ __pyx_tuple__202 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__202)) __PYX_ERR(0, 1529, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__202);
+ __Pyx_GIVEREF(__pyx_tuple__202);
+ __pyx_codeobj__203 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__202, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_named_expression_type, 1529, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__203)) __PYX_ERR(0, 1529, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1543
+ * return False
+ *
+ * def is_expression_type(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this object is an expression.
+ */
+ __pyx_tuple__204 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__204)) __PYX_ERR(0, 1543, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__204);
+ __Pyx_GIVEREF(__pyx_tuple__204);
+ __pyx_codeobj__205 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__204, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_expression_type, 1543, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__205)) __PYX_ERR(0, 1543, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1557
+ * return True
+ *
+ * def size(self): # <<<<<<<<<<<<<<
+ * """
+ * Return the number of nodes in the expression tree.
+ */
+ __pyx_tuple__206 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__206)) __PYX_ERR(0, 1557, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__206);
+ __Pyx_GIVEREF(__pyx_tuple__206);
+ __pyx_codeobj__207 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__206, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_size, 1557, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__207)) __PYX_ERR(0, 1557, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1567
+ * return _sizeof_expression(self)
+ *
+ * def polynomial_degree(self): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+ __pyx_tuple__208 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__208)) __PYX_ERR(0, 1567, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__208);
+ __Pyx_GIVEREF(__pyx_tuple__208);
+ __pyx_codeobj__209 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__208, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_polynomial_degree_2, 1567, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__209)) __PYX_ERR(0, 1567, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1578
+ * return _polynomial_degree(self)
+ *
+ * def _compute_polynomial_degree(self, values): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Compute the polynomial degree of this expression given
+ */
+ __pyx_tuple__210 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_values); if (unlikely(!__pyx_tuple__210)) __PYX_ERR(0, 1578, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__210);
+ __Pyx_GIVEREF(__pyx_tuple__210);
+ __pyx_codeobj__211 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__210, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_compute_polynomial_degree, 1578, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__211)) __PYX_ERR(0, 1578, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1598
+ * return None
+ *
+ * def _apply_operation(self, result): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Compute the values of this node given the values of its children.
+ */
+ __pyx_tuple__212 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__212)) __PYX_ERR(0, 1598, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__212);
+ __Pyx_GIVEREF(__pyx_tuple__212);
+ __pyx_codeobj__213 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__212, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 1598, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__213)) __PYX_ERR(0, 1598, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1641
+ * PRECEDENCE = 4
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 1
+ *
+ */
+ __pyx_tuple__214 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__214)) __PYX_ERR(0, 1641, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__214);
+ __Pyx_GIVEREF(__pyx_tuple__214);
+ __pyx_codeobj__215 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__214, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nargs, 1641, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__215)) __PYX_ERR(0, 1641, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1644
+ * return 1
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'neg'
+ *
+ */
+ __pyx_tuple__216 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__216)) __PYX_ERR(0, 1644, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__216);
+ __Pyx_GIVEREF(__pyx_tuple__216);
+ __pyx_codeobj__217 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__216, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getname, 1644, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__217)) __PYX_ERR(0, 1644, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1647
+ * return 'neg'
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * return result[0]
+ *
+ */
+ __pyx_tuple__218 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__218)) __PYX_ERR(0, 1647, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__218);
+ __Pyx_GIVEREF(__pyx_tuple__218);
+ __pyx_codeobj__219 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__218, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_compute_polynomial_degree, 1647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__219)) __PYX_ERR(0, 1647, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1650
+ * return result[0]
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return NegationExpression.PRECEDENCE
+ *
+ */
+ __pyx_tuple__220 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__220)) __PYX_ERR(0, 1650, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__220);
+ __Pyx_GIVEREF(__pyx_tuple__220);
+ __pyx_codeobj__221 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__220, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_precedence, 1650, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__221)) __PYX_ERR(0, 1650, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1653
+ * return NegationExpression.PRECEDENCE
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+ __pyx_tuple__222 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values, __pyx_n_s_tmp, __pyx_n_s_i); if (unlikely(!__pyx_tuple__222)) __PYX_ERR(0, 1653, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__222);
+ __Pyx_GIVEREF(__pyx_tuple__222);
+ __pyx_codeobj__223 = (PyObject*)__Pyx_PyCode_New(5, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__222, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 1653, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__223)) __PYX_ERR(0, 1653, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1664
+ * return "- "+tmp
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return -result[0]
+ *
+ */
+ __pyx_tuple__224 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__224)) __PYX_ERR(0, 1664, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__224);
+ __Pyx_GIVEREF(__pyx_tuple__224);
+ __pyx_codeobj__225 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__224, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 1664, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__225)) __PYX_ERR(0, 1664, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1671
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_tuple__226 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__226)) __PYX_ERR(0, 1671, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__226);
+ __Pyx_GIVEREF(__pyx_tuple__226);
+ __pyx_codeobj__227 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__226, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 1671, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__227)) __PYX_ERR(0, 1671, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1690
+ * fcn: a class that defines this external function
+ * """
+ * __slots__ = ('_fcn',) # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, args, fcn=None):
+ */
+ __pyx_tuple__228 = PyTuple_Pack(1, __pyx_n_s_fcn_2); if (unlikely(!__pyx_tuple__228)) __PYX_ERR(0, 1690, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__228);
+ __Pyx_GIVEREF(__pyx_tuple__228);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1692
+ * __slots__ = ('_fcn',)
+ *
+ * def __init__(self, args, fcn=None): # <<<<<<<<<<<<<<
+ * self._args_ = args
+ * self._fcn = fcn
+ */
+ __pyx_tuple__229 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_fcn); if (unlikely(!__pyx_tuple__229)) __PYX_ERR(0, 1692, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__229);
+ __Pyx_GIVEREF(__pyx_tuple__229);
+ __pyx_codeobj__230 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__229, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 1692, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__230)) __PYX_ERR(0, 1692, __pyx_L1_error)
+ __pyx_tuple__231 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__231)) __PYX_ERR(0, 1692, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__231);
+ __Pyx_GIVEREF(__pyx_tuple__231);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1696
+ * self._fcn = fcn
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return len(self._args_)
+ *
+ */
+ __pyx_tuple__232 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__232)) __PYX_ERR(0, 1696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__232);
+ __Pyx_GIVEREF(__pyx_tuple__232);
+ __pyx_codeobj__233 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__232, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nargs, 1696, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__233)) __PYX_ERR(0, 1696, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1699
+ * return len(self._args_)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._fcn)
+ *
+ */
+ __pyx_tuple__234 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__234)) __PYX_ERR(0, 1699, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__234);
+ __Pyx_GIVEREF(__pyx_tuple__234);
+ __pyx_codeobj__235 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__234, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_construct_node, 1699, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__235)) __PYX_ERR(0, 1699, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1702
+ * return self.__class__(args, self._fcn)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(ExternalFunctionExpression, self).__getstate__()
+ * for i in ExternalFunctionExpression.__slots__:
+ */
+ __pyx_tuple__236 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_i); if (unlikely(!__pyx_tuple__236)) __PYX_ERR(0, 1702, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__236);
+ __Pyx_GIVEREF(__pyx_tuple__236);
+ __pyx_codeobj__237 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__236, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getstate, 1702, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__237)) __PYX_ERR(0, 1702, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1708
+ * return state
+ *
+ * def getname(self, *args, **kwds): #pragma: no cover # <<<<<<<<<<<<<<
+ * return self._fcn.getname(*args, **kwds)
+ *
+ */
+ __pyx_tuple__238 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__238)) __PYX_ERR(0, 1708, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__238);
+ __Pyx_GIVEREF(__pyx_tuple__238);
+ __pyx_codeobj__239 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__238, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getname, 1708, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__239)) __PYX_ERR(0, 1708, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1711
+ * return self._fcn.getname(*args, **kwds)
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # If the expression is constant, then
+ * # this is detected earlier. Hence, we can safely
+ */
+ __pyx_tuple__240 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__240)) __PYX_ERR(0, 1711, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__240);
+ __Pyx_GIVEREF(__pyx_tuple__240);
+ __pyx_codeobj__241 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__240, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_compute_polynomial_degree, 1711, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__241)) __PYX_ERR(0, 1711, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1717
+ * return None
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return self._fcn.evaluate( result ) #pragma: no cover
+ *
+ */
+ __pyx_tuple__242 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__242)) __PYX_ERR(0, 1717, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__242);
+ __Pyx_GIVEREF(__pyx_tuple__242);
+ __pyx_codeobj__243 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__242, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 1717, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__243)) __PYX_ERR(0, 1717, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1720
+ * return self._fcn.evaluate( result ) #pragma: no cover
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return "{0}({1})".format(self.getname(), ", ".join(values))
+ *
+ */
+ __pyx_tuple__244 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__244)) __PYX_ERR(0, 1720, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__244);
+ __Pyx_GIVEREF(__pyx_tuple__244);
+ __pyx_codeobj__245 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__244, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 1720, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__245)) __PYX_ERR(0, 1720, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1727
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_tuple__246 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__246)) __PYX_ERR(0, 1727, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__246);
+ __Pyx_GIVEREF(__pyx_tuple__246);
+ __pyx_codeobj__247 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__246, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 1727, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__247)) __PYX_ERR(0, 1727, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1741
+ * PRECEDENCE = 2
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # PowExpression is a tricky thing. In general, a**b is
+ * # nonpolynomial, however, if b == 0, it is a constant
+ */
+ __pyx_tuple__248 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_l, __pyx_n_s_r, __pyx_n_s_exp); if (unlikely(!__pyx_tuple__248)) __PYX_ERR(0, 1741, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__248);
+ __Pyx_GIVEREF(__pyx_tuple__248);
+ __pyx_codeobj__249 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__248, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_compute_polynomial_degree, 1741, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__249)) __PYX_ERR(0, 1741, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1765
+ * return None
+ *
+ * def _is_fixed(self, args): # <<<<<<<<<<<<<<
+ * assert(len(args) == 2)
+ * if not args[1]:
+ */
+ __pyx_tuple__250 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__250)) __PYX_ERR(0, 1765, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__250);
+ __Pyx_GIVEREF(__pyx_tuple__250);
+ __pyx_codeobj__251 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__250, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_fixed_2, 1765, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__251)) __PYX_ERR(0, 1765, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1771
+ * return args[0] or isclose(value(self._args_[1]), 0)
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return PowExpression.PRECEDENCE
+ *
+ */
+ __pyx_tuple__252 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__252)) __PYX_ERR(0, 1771, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__252);
+ __Pyx_GIVEREF(__pyx_tuple__252);
+ __pyx_codeobj__253 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__252, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_precedence, 1771, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__253)) __PYX_ERR(0, 1771, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1774
+ * return PowExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * return _l ** _r
+ */
+ __pyx_tuple__254 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_l_2, __pyx_n_s_r_2); if (unlikely(!__pyx_tuple__254)) __PYX_ERR(0, 1774, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__254);
+ __Pyx_GIVEREF(__pyx_tuple__254);
+ __pyx_codeobj__255 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__254, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 1774, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__255)) __PYX_ERR(0, 1774, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1778
+ * return _l ** _r
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'pow'
+ *
+ */
+ __pyx_tuple__256 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__256)) __PYX_ERR(0, 1778, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__256);
+ __Pyx_GIVEREF(__pyx_tuple__256);
+ __pyx_codeobj__257 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__256, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getname, 1778, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__257)) __PYX_ERR(0, 1778, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1781
+ * return 'pow'
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ */
+ __pyx_tuple__258 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__258)) __PYX_ERR(0, 1781, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__258);
+ __Pyx_GIVEREF(__pyx_tuple__258);
+ __pyx_codeobj__259 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__258, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 1781, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__259)) __PYX_ERR(0, 1781, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1790
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_tuple__260 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__260)) __PYX_ERR(0, 1790, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__260);
+ __Pyx_GIVEREF(__pyx_tuple__260);
+ __pyx_codeobj__261 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__260, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 1790, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__261)) __PYX_ERR(0, 1790, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1804
+ * PRECEDENCE = 4
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ProductExpression.PRECEDENCE
+ *
+ */
+ __pyx_tuple__262 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__262)) __PYX_ERR(0, 1804, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__262);
+ __Pyx_GIVEREF(__pyx_tuple__262);
+ __pyx_codeobj__263 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__262, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_precedence, 1804, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__263)) __PYX_ERR(0, 1804, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1807
+ * return ProductExpression.PRECEDENCE
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # NB: We can't use sum() here because None (non-polynomial)
+ * # overrides a numeric value (and sum() just ignores it - or
+ */
+ __pyx_tuple__264 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_a, __pyx_n_s_b); if (unlikely(!__pyx_tuple__264)) __PYX_ERR(0, 1807, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__264);
+ __Pyx_GIVEREF(__pyx_tuple__264);
+ __pyx_codeobj__265 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__264, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_compute_polynomial_degree, 1807, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__265)) __PYX_ERR(0, 1807, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1817
+ * return a + b
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'prod'
+ *
+ */
+ __pyx_tuple__266 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__266)) __PYX_ERR(0, 1817, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__266);
+ __Pyx_GIVEREF(__pyx_tuple__266);
+ __pyx_codeobj__267 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__266, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getname, 1817, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__267)) __PYX_ERR(0, 1817, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1820
+ * return 'prod'
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * return _l * _r
+ */
+ __pyx_tuple__268 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_l_2, __pyx_n_s_r_2); if (unlikely(!__pyx_tuple__268)) __PYX_ERR(0, 1820, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__268);
+ __Pyx_GIVEREF(__pyx_tuple__268);
+ __pyx_codeobj__269 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__268, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 1820, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__269)) __PYX_ERR(0, 1820, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1824
+ * return _l * _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ */
+ __pyx_tuple__270 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__270)) __PYX_ERR(0, 1824, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__270);
+ __Pyx_GIVEREF(__pyx_tuple__270);
+ __pyx_codeobj__271 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__270, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 1824, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__271)) __PYX_ERR(0, 1824, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1837
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_tuple__272 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__272)) __PYX_ERR(0, 1837, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__272);
+ __Pyx_GIVEREF(__pyx_tuple__272);
+ __pyx_codeobj__273 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__272, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 1837, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__273)) __PYX_ERR(0, 1837, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1850
+ * PRECEDENCE = 3.5
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 1
+ *
+ */
+ __pyx_tuple__274 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__274)) __PYX_ERR(0, 1850, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__274);
+ __Pyx_GIVEREF(__pyx_tuple__274);
+ __pyx_codeobj__275 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__274, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nargs, 1850, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__275)) __PYX_ERR(0, 1850, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1853
+ * return 1
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ReciprocalExpression.PRECEDENCE
+ *
+ */
+ __pyx_tuple__276 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__276)) __PYX_ERR(0, 1853, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__276);
+ __Pyx_GIVEREF(__pyx_tuple__276);
+ __pyx_codeobj__277 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__276, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_precedence, 1853, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__277)) __PYX_ERR(0, 1853, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1856
+ * return ReciprocalExpression.PRECEDENCE
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * if result[0] is 0:
+ * return 0
+ */
+ __pyx_tuple__278 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__278)) __PYX_ERR(0, 1856, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__278);
+ __Pyx_GIVEREF(__pyx_tuple__278);
+ __pyx_codeobj__279 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__278, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_compute_polynomial_degree, 1856, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__279)) __PYX_ERR(0, 1856, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1861
+ * return None
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'recip'
+ *
+ */
+ __pyx_tuple__280 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__280)) __PYX_ERR(0, 1861, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__280);
+ __Pyx_GIVEREF(__pyx_tuple__280);
+ __pyx_codeobj__281 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__280, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getname, 1861, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__281)) __PYX_ERR(0, 1861, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1864
+ * return 'recip'
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+ __pyx_tuple__282 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__282)) __PYX_ERR(0, 1864, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__282);
+ __Pyx_GIVEREF(__pyx_tuple__282);
+ __pyx_codeobj__283 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__282, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 1864, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__283)) __PYX_ERR(0, 1864, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1869
+ * return "(1/{0})".format(values[0])
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return 1 / result[0]
+ *
+ */
+ __pyx_tuple__284 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__284)) __PYX_ERR(0, 1869, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__284);
+ __Pyx_GIVEREF(__pyx_tuple__284);
+ __pyx_codeobj__285 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__284, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 1869, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__285)) __PYX_ERR(0, 1869, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1876
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_tuple__286 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__286)) __PYX_ERR(0, 1876, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__286);
+ __Pyx_GIVEREF(__pyx_tuple__286);
+ __pyx_codeobj__287 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__286, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 1876, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__287)) __PYX_ERR(0, 1876, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1888
+ * __slots__ = ()
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # NB: We can't use max() here because None (non-polynomial)
+ * # overrides a numeric value (and max() just ignores it)
+ */
+ __pyx_tuple__288 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_ans, __pyx_n_s_x); if (unlikely(!__pyx_tuple__288)) __PYX_ERR(0, 1888, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__288);
+ __Pyx_GIVEREF(__pyx_tuple__288);
+ __pyx_codeobj__289 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__288, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_compute_polynomial_degree, 1888, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__289)) __PYX_ERR(0, 1888, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1912
+ * """
+ *
+ * __slots__ = ('_strict',) # <<<<<<<<<<<<<<
+ * PRECEDENCE = 9
+ *
+ */
+ __pyx_tuple__290 = PyTuple_Pack(1, __pyx_n_s_strict_2); if (unlikely(!__pyx_tuple__290)) __PYX_ERR(0, 1912, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__290);
+ __Pyx_GIVEREF(__pyx_tuple__290);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1915
+ * PRECEDENCE = 9
+ *
+ * def __init__(self, args, strict): # <<<<<<<<<<<<<<
+ * super(RangedExpression,self).__init__(args)
+ * self._strict = strict
+ */
+ __pyx_tuple__291 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_strict); if (unlikely(!__pyx_tuple__291)) __PYX_ERR(0, 1915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__291);
+ __Pyx_GIVEREF(__pyx_tuple__291);
+ __pyx_codeobj__292 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__291, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 1915, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__292)) __PYX_ERR(0, 1915, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1919
+ * self._strict = strict
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 3
+ *
+ */
+ __pyx_tuple__293 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__293)) __PYX_ERR(0, 1919, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__293);
+ __Pyx_GIVEREF(__pyx_tuple__293);
+ __pyx_codeobj__294 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__293, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nargs, 1919, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__294)) __PYX_ERR(0, 1919, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1922
+ * return 3
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._strict)
+ *
+ */
+ __pyx_tuple__295 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__295)) __PYX_ERR(0, 1922, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__295);
+ __Pyx_GIVEREF(__pyx_tuple__295);
+ __pyx_codeobj__296 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__295, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_construct_node, 1922, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__296)) __PYX_ERR(0, 1922, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1925
+ * return self.__class__(args, self._strict)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(RangedExpression, self).__getstate__()
+ * for i in RangedExpression.__slots__:
+ */
+ __pyx_tuple__297 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_i); if (unlikely(!__pyx_tuple__297)) __PYX_ERR(0, 1925, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__297);
+ __Pyx_GIVEREF(__pyx_tuple__297);
+ __pyx_codeobj__298 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__297, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getstate, 1925, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__298)) __PYX_ERR(0, 1925, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1931
+ * return state
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * return bool(self())
+ *
+ */
+ __pyx_tuple__299 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__299)) __PYX_ERR(0, 1931, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__299);
+ __Pyx_GIVEREF(__pyx_tuple__299);
+ __pyx_codeobj__300 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__299, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nonzero, 1931, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__300)) __PYX_ERR(0, 1931, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1936
+ * __bool__ = __nonzero__
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+ __pyx_tuple__301 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__301)) __PYX_ERR(0, 1936, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__301);
+ __Pyx_GIVEREF(__pyx_tuple__301);
+ __pyx_codeobj__302 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__301, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_relational, 1936, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__302)) __PYX_ERR(0, 1936, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1939
+ * return True
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return RangedExpression.PRECEDENCE
+ *
+ */
+ __pyx_tuple__303 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__303)) __PYX_ERR(0, 1939, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__303);
+ __Pyx_GIVEREF(__pyx_tuple__303);
+ __pyx_codeobj__304 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__303, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_precedence, 1939, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__304)) __PYX_ERR(0, 1939, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1942
+ * return RangedExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _b, _r = result
+ * if not self._strict[0]:
+ */
+ __pyx_tuple__305 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_l_2, __pyx_n_s_b_2, __pyx_n_s_r_2); if (unlikely(!__pyx_tuple__305)) __PYX_ERR(0, 1942, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__305);
+ __Pyx_GIVEREF(__pyx_tuple__305);
+ __pyx_codeobj__306 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__305, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 1942, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__306)) __PYX_ERR(0, 1942, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1954
+ * return _l < _b and _b < _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return "{0} {1} {2} {3} {4}".format(values[0], '<' if self._strict[0] else '<=', values[1], '<' if self._strict[1] else '<=', values[2])
+ *
+ */
+ __pyx_tuple__307 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__307)) __PYX_ERR(0, 1954, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__307);
+ __Pyx_GIVEREF(__pyx_tuple__307);
+ __pyx_codeobj__308 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__307, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 1954, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__308)) __PYX_ERR(0, 1954, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1957
+ * return "{0} {1} {2} {3} {4}".format(values[0], '<' if self._strict[0] else '<=', values[1], '<' if self._strict[1] else '<=', values[2])
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant()) and \
+ */
+ __pyx_tuple__309 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__309)) __PYX_ERR(0, 1957, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__309);
+ __Pyx_GIVEREF(__pyx_tuple__309);
+ __pyx_codeobj__310 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__309, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_constant, 1957, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__310)) __PYX_ERR(0, 1957, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1962
+ * (self._args_[2].__class__ in native_numeric_types or self._args_[2].is_constant())
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return (self._args_[1].__class__ not in native_numeric_types and \
+ * self._args_[1].is_potentially_variable()) or \
+ */
+ __pyx_tuple__311 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__311)) __PYX_ERR(0, 1962, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__311);
+ __Pyx_GIVEREF(__pyx_tuple__311);
+ __pyx_codeobj__312 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__311, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 1962, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__312)) __PYX_ERR(0, 1962, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1984
+ * """
+ *
+ * __slots__ = ('_strict',) # <<<<<<<<<<<<<<
+ * PRECEDENCE = 9
+ *
+ */
+ __pyx_tuple__313 = PyTuple_Pack(1, __pyx_n_s_strict_2); if (unlikely(!__pyx_tuple__313)) __PYX_ERR(0, 1984, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__313);
+ __Pyx_GIVEREF(__pyx_tuple__313);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1987
+ * PRECEDENCE = 9
+ *
+ * def __init__(self, args, strict): # <<<<<<<<<<<<<<
+ * super(InequalityExpression,self).__init__(args)
+ * self._strict = strict
+ */
+ __pyx_tuple__314 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_strict); if (unlikely(!__pyx_tuple__314)) __PYX_ERR(0, 1987, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__314);
+ __Pyx_GIVEREF(__pyx_tuple__314);
+ __pyx_codeobj__315 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__314, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 1987, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__315)) __PYX_ERR(0, 1987, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1991
+ * self._strict = strict
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 2
+ *
+ */
+ __pyx_tuple__316 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__316)) __PYX_ERR(0, 1991, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__316);
+ __Pyx_GIVEREF(__pyx_tuple__316);
+ __pyx_codeobj__317 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__316, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nargs, 1991, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__317)) __PYX_ERR(0, 1991, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1994
+ * return 2
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._strict)
+ *
+ */
+ __pyx_tuple__318 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__318)) __PYX_ERR(0, 1994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__318);
+ __Pyx_GIVEREF(__pyx_tuple__318);
+ __pyx_codeobj__319 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__318, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_construct_node, 1994, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__319)) __PYX_ERR(0, 1994, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1997
+ * return self.__class__(args, self._strict)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(InequalityExpression, self).__getstate__()
+ * for i in InequalityExpression.__slots__:
+ */
+ __pyx_tuple__320 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_i); if (unlikely(!__pyx_tuple__320)) __PYX_ERR(0, 1997, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__320);
+ __Pyx_GIVEREF(__pyx_tuple__320);
+ __pyx_codeobj__321 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__320, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getstate, 1997, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__321)) __PYX_ERR(0, 1997, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2003
+ * return state
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * if _using_chained_inequality and not self.is_constant(): #pragma: no cover
+ * deprecation_warning("Chained inequalities are deprecated. Use the inequality() function to express ranged inequality expressions.") # Remove in Pyomo 6.0
+ */
+ __pyx_tuple__322 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__322)) __PYX_ERR(0, 2003, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__322);
+ __Pyx_GIVEREF(__pyx_tuple__322);
+ __pyx_codeobj__323 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__322, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nonzero, 2003, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__323)) __PYX_ERR(0, 2003, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2015
+ * __bool__ = __nonzero__
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+ __pyx_tuple__324 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__324)) __PYX_ERR(0, 2015, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__324);
+ __Pyx_GIVEREF(__pyx_tuple__324);
+ __pyx_codeobj__325 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__324, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_relational, 2015, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__325)) __PYX_ERR(0, 2015, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2018
+ * return True
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return InequalityExpression.PRECEDENCE
+ *
+ */
+ __pyx_tuple__326 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__326)) __PYX_ERR(0, 2018, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__326);
+ __Pyx_GIVEREF(__pyx_tuple__326);
+ __pyx_codeobj__327 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__326, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_precedence, 2018, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__327)) __PYX_ERR(0, 2018, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2021
+ * return InequalityExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * if self._strict:
+ */
+ __pyx_tuple__328 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_l_2, __pyx_n_s_r_2); if (unlikely(!__pyx_tuple__328)) __PYX_ERR(0, 2021, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__328);
+ __Pyx_GIVEREF(__pyx_tuple__328);
+ __pyx_codeobj__329 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__328, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 2021, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__329)) __PYX_ERR(0, 2021, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2027
+ * return _l <= _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if len(values) == 2:
+ * return "{0} {1} {2}".format(values[0], '<' if self._strict else '<=', values[1])
+ */
+ __pyx_tuple__330 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__330)) __PYX_ERR(0, 2027, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__330);
+ __Pyx_GIVEREF(__pyx_tuple__330);
+ __pyx_codeobj__331 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__330, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 2027, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__331)) __PYX_ERR(0, 2027, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2031
+ * return "{0} {1} {2}".format(values[0], '<' if self._strict else '<=', values[1])
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant())
+ */
+ __pyx_tuple__332 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__332)) __PYX_ERR(0, 2031, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__332);
+ __Pyx_GIVEREF(__pyx_tuple__332);
+ __pyx_codeobj__333 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__332, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_constant, 2031, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__333)) __PYX_ERR(0, 2031, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2035
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant())
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return (self._args_[0].__class__ not in native_numeric_types and \
+ * self._args_[0].is_potentially_variable()) or \
+ */
+ __pyx_tuple__334 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__334)) __PYX_ERR(0, 2035, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__334);
+ __Pyx_GIVEREF(__pyx_tuple__334);
+ __pyx_codeobj__335 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__334, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 2035, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__335)) __PYX_ERR(0, 2035, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2042
+ *
+ *
+ * def inequality(lower=None, body=None, upper=None, strict=False): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that can be used to declare inequality and
+ */
+ __pyx_tuple__336 = PyTuple_Pack(4, __pyx_n_s_lower, __pyx_n_s_body, __pyx_n_s_upper, __pyx_n_s_strict); if (unlikely(!__pyx_tuple__336)) __PYX_ERR(0, 2042, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__336);
+ __Pyx_GIVEREF(__pyx_tuple__336);
+ __pyx_codeobj__337 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__336, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_inequality, 2042, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__337)) __PYX_ERR(0, 2042, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2106
+ * PRECEDENCE = 9
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 2
+ *
+ */
+ __pyx_tuple__338 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__338)) __PYX_ERR(0, 2106, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__338);
+ __Pyx_GIVEREF(__pyx_tuple__338);
+ __pyx_codeobj__339 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__338, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nargs, 2106, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__339)) __PYX_ERR(0, 2106, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2109
+ * return 2
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * return bool(self())
+ *
+ */
+ __pyx_tuple__340 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__340)) __PYX_ERR(0, 2109, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__340);
+ __Pyx_GIVEREF(__pyx_tuple__340);
+ __pyx_codeobj__341 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__340, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nonzero, 2109, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__341)) __PYX_ERR(0, 2109, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2114
+ * __bool__ = __nonzero__
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+ __pyx_tuple__342 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__342)) __PYX_ERR(0, 2114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__342);
+ __Pyx_GIVEREF(__pyx_tuple__342);
+ __pyx_codeobj__343 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__342, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_relational, 2114, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__343)) __PYX_ERR(0, 2114, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2117
+ * return True
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return EqualityExpression.PRECEDENCE
+ *
+ */
+ __pyx_tuple__344 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__344)) __PYX_ERR(0, 2117, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__344);
+ __Pyx_GIVEREF(__pyx_tuple__344);
+ __pyx_codeobj__345 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__344, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_precedence, 2117, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__345)) __PYX_ERR(0, 2117, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2120
+ * return EqualityExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * return _l == _r
+ */
+ __pyx_tuple__346 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_l_2, __pyx_n_s_r_2); if (unlikely(!__pyx_tuple__346)) __PYX_ERR(0, 2120, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__346);
+ __Pyx_GIVEREF(__pyx_tuple__346);
+ __pyx_codeobj__347 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__346, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 2120, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__347)) __PYX_ERR(0, 2120, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2124
+ * return _l == _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return "{0} == {1}".format(values[0], values[1])
+ *
+ */
+ __pyx_tuple__348 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__348)) __PYX_ERR(0, 2124, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__348);
+ __Pyx_GIVEREF(__pyx_tuple__348);
+ __pyx_codeobj__349 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__348, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 2124, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__349)) __PYX_ERR(0, 2124, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2127
+ * return "{0} == {1}".format(values[0], values[1])
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return self._args_[0].is_constant() and self._args_[1].is_constant()
+ *
+ */
+ __pyx_tuple__350 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__350)) __PYX_ERR(0, 2127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__350);
+ __Pyx_GIVEREF(__pyx_tuple__350);
+ __pyx_codeobj__351 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__350, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_constant, 2127, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__351)) __PYX_ERR(0, 2127, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2130
+ * return self._args_[0].is_constant() and self._args_[1].is_constant()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return self._args_[0].is_potentially_variable() or self._args_[1].is_potentially_variable()
+ *
+ */
+ __pyx_tuple__352 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__352)) __PYX_ERR(0, 2130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__352);
+ __Pyx_GIVEREF(__pyx_tuple__352);
+ __pyx_codeobj__353 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__352, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 2130, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__353)) __PYX_ERR(0, 2130, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2142
+ * PRECEDENCE = 6
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return _SumExpression.PRECEDENCE
+ *
+ */
+ __pyx_tuple__354 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__354)) __PYX_ERR(0, 2142, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__354);
+ __Pyx_GIVEREF(__pyx_tuple__354);
+ __pyx_codeobj__355 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__354, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_precedence, 2142, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__355)) __PYX_ERR(0, 2142, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2145
+ * return _SumExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * l_, r_ = result
+ * return l_ + r_
+ */
+ __pyx_tuple__356 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_l_3, __pyx_n_s_r_3); if (unlikely(!__pyx_tuple__356)) __PYX_ERR(0, 2145, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__356);
+ __Pyx_GIVEREF(__pyx_tuple__356);
+ __pyx_codeobj__357 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__356, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 2145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__357)) __PYX_ERR(0, 2145, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2149
+ * return l_ + r_
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ */
+ __pyx_tuple__358 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__358)) __PYX_ERR(0, 2149, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__358);
+ __Pyx_GIVEREF(__pyx_tuple__358);
+ __pyx_codeobj__359 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__358, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 2149, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__359)) __PYX_ERR(0, 2149, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2156
+ * return "{0} + {1}".format(values[0],values[1])
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'sum'
+ *
+ */
+ __pyx_tuple__360 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__360)) __PYX_ERR(0, 2156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__360);
+ __Pyx_GIVEREF(__pyx_tuple__360);
+ __pyx_codeobj__361 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__360, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getname, 2156, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__361)) __PYX_ERR(0, 2156, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2163
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_tuple__362 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__362)) __PYX_ERR(0, 2163, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__362);
+ __Pyx_GIVEREF(__pyx_tuple__362);
+ __pyx_codeobj__363 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__362, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 2163, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__363)) __PYX_ERR(0, 2163, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2176
+ * args (list): Children nodes
+ * """
+ * __slots__ = ('_nargs','_shared_args') # <<<<<<<<<<<<<<
+ * PRECEDENCE = 6
+ *
+ */
+ __pyx_tuple__364 = PyTuple_Pack(2, __pyx_n_s_nargs_2, __pyx_n_s_shared_args); if (unlikely(!__pyx_tuple__364)) __PYX_ERR(0, 2176, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__364);
+ __Pyx_GIVEREF(__pyx_tuple__364);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2179
+ * PRECEDENCE = 6
+ *
+ * def __init__(self, args): # <<<<<<<<<<<<<<
+ * self._args_ = args
+ * self._shared_args = False
+ */
+ __pyx_tuple__365 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__365)) __PYX_ERR(0, 2179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__365);
+ __Pyx_GIVEREF(__pyx_tuple__365);
+ __pyx_codeobj__366 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__365, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 2179, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__366)) __PYX_ERR(0, 2179, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2184
+ * self._nargs = len(self._args_)
+ *
+ * def add(self, new_arg): # <<<<<<<<<<<<<<
+ * if new_arg.__class__ in native_numeric_types and isclose(new_arg,0):
+ * return self
+ */
+ __pyx_tuple__367 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_new_arg); if (unlikely(!__pyx_tuple__367)) __PYX_ERR(0, 2184, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__367);
+ __Pyx_GIVEREF(__pyx_tuple__367);
+ __pyx_codeobj__368 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__367, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_add, 2184, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__368)) __PYX_ERR(0, 2184, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2198
+ * return self
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return self._nargs
+ *
+ */
+ __pyx_tuple__369 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__369)) __PYX_ERR(0, 2198, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__369);
+ __Pyx_GIVEREF(__pyx_tuple__369);
+ __pyx_codeobj__370 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__369, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nargs, 2198, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__370)) __PYX_ERR(0, 2198, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2201
+ * return self._nargs
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ViewSumExpression.PRECEDENCE
+ *
+ */
+ __pyx_tuple__371 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__371)) __PYX_ERR(0, 2201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__371);
+ __Pyx_GIVEREF(__pyx_tuple__371);
+ __pyx_codeobj__372 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__371, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_precedence, 2201, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__372)) __PYX_ERR(0, 2201, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2204
+ * return ViewSumExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return sum(result)
+ *
+ */
+ __pyx_tuple__373 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__373)) __PYX_ERR(0, 2204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__373);
+ __Pyx_GIVEREF(__pyx_tuple__373);
+ __pyx_codeobj__374 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__373, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 2204, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__374)) __PYX_ERR(0, 2204, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2207
+ * return sum(result)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(list(args))
+ *
+ */
+ __pyx_tuple__375 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__375)) __PYX_ERR(0, 2207, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__375);
+ __Pyx_GIVEREF(__pyx_tuple__375);
+ __pyx_codeobj__376 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__375, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_construct_node, 2207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__376)) __PYX_ERR(0, 2207, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2210
+ * return self.__class__(list(args))
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(ViewSumExpression, self).__getstate__()
+ * for i in ViewSumExpression.__slots__:
+ */
+ __pyx_tuple__377 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_i); if (unlikely(!__pyx_tuple__377)) __PYX_ERR(0, 2210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__377);
+ __Pyx_GIVEREF(__pyx_tuple__377);
+ __pyx_codeobj__378 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__377, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getstate, 2210, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__378)) __PYX_ERR(0, 2210, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2216
+ * return state
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * #
+ * # In most normal contexts, a ViewSumExpression is non-constant. When
+ */
+ __pyx_tuple__379 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__379)) __PYX_ERR(0, 2216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__379);
+ __Pyx_GIVEREF(__pyx_tuple__379);
+ __pyx_codeobj__380 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__379, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_constant, 2216, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__380)) __PYX_ERR(0, 2216, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2225
+ * return False
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * for v in islice(self._args_, self._nargs):
+ * if v.__class__ in nonpyomo_leaf_types:
+ */
+ __pyx_tuple__381 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_v); if (unlikely(!__pyx_tuple__381)) __PYX_ERR(0, 2225, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__381);
+ __Pyx_GIVEREF(__pyx_tuple__381);
+ __pyx_codeobj__382 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__381, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 2225, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__382)) __PYX_ERR(0, 2225, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2233
+ * return False
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * tmp = [values[0]]
+ */
+ __pyx_tuple__383 = PyTuple_Pack(8, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values, __pyx_n_s_tmp, __pyx_n_s_i, __pyx_n_s_j); if (unlikely(!__pyx_tuple__383)) __PYX_ERR(0, 2233, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__383);
+ __Pyx_GIVEREF(__pyx_tuple__383);
+ __pyx_codeobj__384 = (PyObject*)__Pyx_PyCode_New(5, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__383, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 2233, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__384)) __PYX_ERR(0, 2233, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2266
+ * __slots__ = ()
+ *
+ * def add(self, new_arg): # <<<<<<<<<<<<<<
+ * if new_arg.__class__ in native_numeric_types and isclose(new_arg,0):
+ * return self
+ */
+ __pyx_tuple__385 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_new_arg); if (unlikely(!__pyx_tuple__385)) __PYX_ERR(0, 2266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__385);
+ __Pyx_GIVEREF(__pyx_tuple__385);
+ __pyx_codeobj__386 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__385, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_add, 2266, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__386)) __PYX_ERR(0, 2266, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2285
+ * Expression to call :func:`__getitem__` on the base object.
+ * """
+ * __slots__ = ('_base',) # <<<<<<<<<<<<<<
+ * PRECEDENCE = 1
+ *
+ */
+ __pyx_tuple__387 = PyTuple_Pack(1, __pyx_n_s_base_2); if (unlikely(!__pyx_tuple__387)) __PYX_ERR(0, 2285, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__387);
+ __Pyx_GIVEREF(__pyx_tuple__387);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2288
+ * PRECEDENCE = 1
+ *
+ * def _precedence(self): #pragma: no cover # <<<<<<<<<<<<<<
+ * return GetItemExpression.PRECEDENCE
+ *
+ */
+ __pyx_tuple__388 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__388)) __PYX_ERR(0, 2288, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__388);
+ __Pyx_GIVEREF(__pyx_tuple__388);
+ __pyx_codeobj__389 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__388, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_precedence, 2288, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__389)) __PYX_ERR(0, 2288, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2291
+ * return GetItemExpression.PRECEDENCE
+ *
+ * def __init__(self, args, base=None): # <<<<<<<<<<<<<<
+ * """Construct an expression with an operation and a set of arguments"""
+ * self._args_ = args
+ */
+ __pyx_tuple__390 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_base); if (unlikely(!__pyx_tuple__390)) __PYX_ERR(0, 2291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__390);
+ __Pyx_GIVEREF(__pyx_tuple__390);
+ __pyx_codeobj__391 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__390, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 2291, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__391)) __PYX_ERR(0, 2291, __pyx_L1_error)
+ __pyx_tuple__392 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__392)) __PYX_ERR(0, 2291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__392);
+ __Pyx_GIVEREF(__pyx_tuple__392);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2296
+ * self._base = base
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return len(self._args_)
+ *
+ */
+ __pyx_tuple__393 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__393)) __PYX_ERR(0, 2296, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__393);
+ __Pyx_GIVEREF(__pyx_tuple__393);
+ __pyx_codeobj__394 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__393, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nargs, 2296, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__394)) __PYX_ERR(0, 2296, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2299
+ * return len(self._args_)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._base)
+ *
+ */
+ __pyx_tuple__395 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__395)) __PYX_ERR(0, 2299, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__395);
+ __Pyx_GIVEREF(__pyx_tuple__395);
+ __pyx_codeobj__396 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__395, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_construct_node, 2299, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__396)) __PYX_ERR(0, 2299, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2302
+ * return self.__class__(args, self._base)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(GetItemExpression, self).__getstate__()
+ * for i in GetItemExpression.__slots__:
+ */
+ __pyx_tuple__397 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_i); if (unlikely(!__pyx_tuple__397)) __PYX_ERR(0, 2302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__397);
+ __Pyx_GIVEREF(__pyx_tuple__397);
+ __pyx_codeobj__398 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__397, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getstate, 2302, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__398)) __PYX_ERR(0, 2302, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2308
+ * return state
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return self._base.getname(*args, **kwds)
+ *
+ */
+ __pyx_tuple__399 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__399)) __PYX_ERR(0, 2308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__399);
+ __Pyx_GIVEREF(__pyx_tuple__399);
+ __pyx_codeobj__400 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__399, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getname, 2308, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__400)) __PYX_ERR(0, 2308, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2311
+ * return self._base.getname(*args, **kwds)
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * if any(arg.is_potentially_variable() for arg in self._args_ if not arg.__class__ in nonpyomo_leaf_types):
+ * for x in itervalues(self._base):
+ */
+ __pyx_tuple__401 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_x, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__401)) __PYX_ERR(0, 2311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__401);
+ __Pyx_GIVEREF(__pyx_tuple__401);
+ __pyx_codeobj__402 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__401, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 2311, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__402)) __PYX_ERR(0, 2311, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2318
+ * return False
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * if any(self._args_):
+ * for x in itervalues(self._base):
+ */
+ __pyx_tuple__403 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_x); if (unlikely(!__pyx_tuple__403)) __PYX_ERR(0, 2318, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__403);
+ __Pyx_GIVEREF(__pyx_tuple__403);
+ __pyx_codeobj__404 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__403, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_fixed, 2318, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__404)) __PYX_ERR(0, 2318, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2325
+ * return True
+ *
+ * def _is_fixed(self, values): # <<<<<<<<<<<<<<
+ * from pyomo.core.base import Var # TODO
+ * from pyomo.core.kernel.component_variable import IVariable # TODO
+ */
+ __pyx_tuple__405 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_Var, __pyx_n_s_IVariable, __pyx_n_s_x); if (unlikely(!__pyx_tuple__405)) __PYX_ERR(0, 2325, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__405);
+ __Pyx_GIVEREF(__pyx_tuple__405);
+ __pyx_codeobj__406 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__405, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_fixed_2, 2325, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__406)) __PYX_ERR(0, 2325, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2334
+ * return True
+ *
+ * def _compute_polynomial_degree(self, result): # TODO: coverage # <<<<<<<<<<<<<<
+ * if any(x != 0 for x in result):
+ * return None
+ */
+ __pyx_tuple__407 = PyTuple_Pack(7, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_ans, __pyx_n_s_x, __pyx_n_s_tmp, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__407)) __PYX_ERR(0, 2334, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__407);
+ __Pyx_GIVEREF(__pyx_tuple__407);
+ __pyx_codeobj__408 = (PyObject*)__Pyx_PyCode_New(2, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__407, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_compute_polynomial_degree, 2334, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__408)) __PYX_ERR(0, 2334, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2348
+ * return ans
+ *
+ * def _apply_operation(self, result): # TODO: coverage # <<<<<<<<<<<<<<
+ * return value(self._base.__getitem__( tuple(result) ))
+ *
+ */
+ __pyx_tuple__409 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__409)) __PYX_ERR(0, 2348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__409);
+ __Pyx_GIVEREF(__pyx_tuple__409);
+ __pyx_codeobj__410 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__409, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 2348, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__410)) __PYX_ERR(0, 2348, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2351
+ * return value(self._base.__getitem__( tuple(result) ))
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+ __pyx_tuple__411 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__411)) __PYX_ERR(0, 2351, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__411);
+ __Pyx_GIVEREF(__pyx_tuple__411);
+ __pyx_codeobj__412 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__411, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 2351, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__412)) __PYX_ERR(0, 2351, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2356
+ * return "%s%s" % (self.getname(), values[0])
+ *
+ * def resolve_template(self): # TODO: coverage # <<<<<<<<<<<<<<
+ * return self._base.__getitem__(tuple(value(i) for i in self._args_))
+ *
+ */
+ __pyx_tuple__413 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__413)) __PYX_ERR(0, 2356, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__413);
+ __Pyx_GIVEREF(__pyx_tuple__413);
+ __pyx_codeobj__414 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__413, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_resolve_template, 2356, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__414)) __PYX_ERR(0, 2356, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2371
+ * ELSE_ (expression): An expression that is used if :attr:`IF_` is false.
+ * """
+ * __slots__ = ('_if','_then','_else') # <<<<<<<<<<<<<<
+ *
+ * # **NOTE**: This class evaluates the branching "_if" expression
+ */
+ __pyx_tuple__415 = PyTuple_Pack(3, __pyx_n_s_if, __pyx_n_s_then, __pyx_n_s_else); if (unlikely(!__pyx_tuple__415)) __PYX_ERR(0, 2371, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__415);
+ __Pyx_GIVEREF(__pyx_tuple__415);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2377
+ * # one uses __call__ for value() and NOT bool().
+ *
+ * def __init__(self, IF_=None, THEN_=None, ELSE_=None): # <<<<<<<<<<<<<<
+ * if type(IF_) is tuple and THEN_==None and ELSE_==None:
+ * IF_, THEN_, ELSE_ = IF_
+ */
+ __pyx_tuple__416 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_IF, __pyx_n_s_THEN, __pyx_n_s_ELSE); if (unlikely(!__pyx_tuple__416)) __PYX_ERR(0, 2377, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__416);
+ __Pyx_GIVEREF(__pyx_tuple__416);
+ __pyx_codeobj__417 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__416, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 2377, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__417)) __PYX_ERR(0, 2377, __pyx_L1_error)
+ __pyx_tuple__418 = PyTuple_Pack(3, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__418)) __PYX_ERR(0, 2377, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__418);
+ __Pyx_GIVEREF(__pyx_tuple__418);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2387
+ * self._if = as_numeric(self._if)
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 3
+ *
+ */
+ __pyx_tuple__419 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__419)) __PYX_ERR(0, 2387, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__419);
+ __Pyx_GIVEREF(__pyx_tuple__419);
+ __pyx_codeobj__420 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__419, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nargs, 2387, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__420)) __PYX_ERR(0, 2387, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2390
+ * return 3
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(Expr_if, self).__getstate__()
+ * for i in Expr_if.__slots__:
+ */
+ __pyx_tuple__421 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_i); if (unlikely(!__pyx_tuple__421)) __PYX_ERR(0, 2390, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__421);
+ __Pyx_GIVEREF(__pyx_tuple__421);
+ __pyx_codeobj__422 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__421, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getstate, 2390, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__422)) __PYX_ERR(0, 2390, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2396
+ * return state
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return "Expr_if"
+ *
+ */
+ __pyx_tuple__423 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__423)) __PYX_ERR(0, 2396, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__423);
+ __Pyx_GIVEREF(__pyx_tuple__423);
+ __pyx_codeobj__424 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__423, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getname, 2396, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__424)) __PYX_ERR(0, 2396, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2399
+ * return "Expr_if"
+ *
+ * def _is_fixed(self, args): # <<<<<<<<<<<<<<
+ * assert(len(args) == 3)
+ * if args[0]: #self._if.is_constant():
+ */
+ __pyx_tuple__425 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__425)) __PYX_ERR(0, 2399, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__425);
+ __Pyx_GIVEREF(__pyx_tuple__425);
+ __pyx_codeobj__426 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__425, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_fixed_2, 2399, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__426)) __PYX_ERR(0, 2399, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2409
+ * return False
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * if self._if.__class__ in native_numeric_types or self._if.is_constant():
+ * if value(self._if):
+ */
+ __pyx_tuple__427 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__427)) __PYX_ERR(0, 2409, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__427);
+ __Pyx_GIVEREF(__pyx_tuple__427);
+ __pyx_codeobj__428 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__427, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_constant, 2409, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__428)) __PYX_ERR(0, 2409, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2418
+ * return (self._then.__class__ in native_numeric_types or self._then.is_constant()) and (self._else.__class__ in native_numeric_types or self._else.is_constant())
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return (not self._if.__class__ in native_numeric_types and self._if.is_potentially_variable()) or (not self._then.__class__ in native_numeric_types and self._then.is_potentially_variable()) or (not self._else.__class__ in native_numeric_types and self._else.is_potentially_variable())
+ *
+ */
+ __pyx_tuple__429 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__429)) __PYX_ERR(0, 2418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__429);
+ __Pyx_GIVEREF(__pyx_tuple__429);
+ __pyx_codeobj__430 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__429, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 2418, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__430)) __PYX_ERR(0, 2418, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2421
+ * return (not self._if.__class__ in native_numeric_types and self._if.is_potentially_variable()) or (not self._then.__class__ in native_numeric_types and self._then.is_potentially_variable()) or (not self._else.__class__ in native_numeric_types and self._else.is_potentially_variable())
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * _if, _then, _else = result
+ * if _if == 0:
+ */
+ __pyx_tuple__431 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_if, __pyx_n_s_then, __pyx_n_s_else); if (unlikely(!__pyx_tuple__431)) __PYX_ERR(0, 2421, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__431);
+ __Pyx_GIVEREF(__pyx_tuple__431);
+ __pyx_codeobj__432 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__431, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_compute_polynomial_degree, 2421, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__432)) __PYX_ERR(0, 2421, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2430
+ * return None
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return '{0}( ( {1} ), then=( {2} ), else=( {3} ) )'.format(self.getname(), self._if, self._then, self._else)
+ *
+ */
+ __pyx_tuple__433 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__433)) __PYX_ERR(0, 2430, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__433);
+ __Pyx_GIVEREF(__pyx_tuple__433);
+ __pyx_codeobj__434 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__433, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 2430, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__434)) __PYX_ERR(0, 2430, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2433
+ * return '{0}( ( {1} ), then=( {2} ), else=( {3} ) )'.format(self.getname(), self._if, self._then, self._else)
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _if, _then, _else = result
+ * return _then if _if else _else
+ */
+ __pyx_tuple__435 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_if, __pyx_n_s_then, __pyx_n_s_else); if (unlikely(!__pyx_tuple__435)) __PYX_ERR(0, 2433, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__435);
+ __Pyx_GIVEREF(__pyx_tuple__435);
+ __pyx_codeobj__436 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__435, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 2433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__436)) __PYX_ERR(0, 2433, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2447
+ * fcn: The function that is used to evaluate this expression
+ * """
+ * __slots__ = ('_fcn', '_name') # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, args, name=None, fcn=None):
+ */
+ __pyx_tuple__437 = PyTuple_Pack(2, __pyx_n_s_fcn_2, __pyx_n_s_name_2); if (unlikely(!__pyx_tuple__437)) __PYX_ERR(0, 2447, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__437);
+ __Pyx_GIVEREF(__pyx_tuple__437);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2449
+ * __slots__ = ('_fcn', '_name')
+ *
+ * def __init__(self, args, name=None, fcn=None): # <<<<<<<<<<<<<<
+ * if not type(args) is tuple:
+ * args = (args,)
+ */
+ __pyx_tuple__438 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_name, __pyx_n_s_fcn); if (unlikely(!__pyx_tuple__438)) __PYX_ERR(0, 2449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__438);
+ __Pyx_GIVEREF(__pyx_tuple__438);
+ __pyx_codeobj__439 = (PyObject*)__Pyx_PyCode_New(4, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__438, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 2449, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__439)) __PYX_ERR(0, 2449, __pyx_L1_error)
+ __pyx_tuple__440 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__440)) __PYX_ERR(0, 2449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__440);
+ __Pyx_GIVEREF(__pyx_tuple__440);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2456
+ * self._fcn = fcn
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 1
+ *
+ */
+ __pyx_tuple__441 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__441)) __PYX_ERR(0, 2456, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__441);
+ __Pyx_GIVEREF(__pyx_tuple__441);
+ __pyx_codeobj__442 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__441, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nargs, 2456, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__442)) __PYX_ERR(0, 2456, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2459
+ * return 1
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._name, self._fcn)
+ *
+ */
+ __pyx_tuple__443 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__443)) __PYX_ERR(0, 2459, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__443);
+ __Pyx_GIVEREF(__pyx_tuple__443);
+ __pyx_codeobj__444 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__443, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_construct_node, 2459, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__444)) __PYX_ERR(0, 2459, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2462
+ * return self.__class__(args, self._name, self._fcn)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(UnaryFunctionExpression, self).__getstate__()
+ * for i in UnaryFunctionExpression.__slots__:
+ */
+ __pyx_tuple__445 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_i); if (unlikely(!__pyx_tuple__445)) __PYX_ERR(0, 2462, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__445);
+ __Pyx_GIVEREF(__pyx_tuple__445);
+ __pyx_codeobj__446 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__445, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getstate, 2462, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__446)) __PYX_ERR(0, 2462, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2468
+ * return state
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return self._name
+ *
+ */
+ __pyx_tuple__447 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__447)) __PYX_ERR(0, 2468, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__447);
+ __Pyx_GIVEREF(__pyx_tuple__447);
+ __pyx_codeobj__448 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__447, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getname, 2468, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__448)) __PYX_ERR(0, 2468, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2471
+ * return self._name
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+ __pyx_tuple__449 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__449)) __PYX_ERR(0, 2471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__449);
+ __Pyx_GIVEREF(__pyx_tuple__449);
+ __pyx_codeobj__450 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__449, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 2471, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__450)) __PYX_ERR(0, 2471, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2479
+ * return '{0}({1})'.format(self._name, values[0])
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * if result[0] is 0:
+ * return 0
+ */
+ __pyx_tuple__451 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__451)) __PYX_ERR(0, 2479, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__451);
+ __Pyx_GIVEREF(__pyx_tuple__451);
+ __pyx_codeobj__452 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__451, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_compute_polynomial_degree, 2479, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__452)) __PYX_ERR(0, 2479, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2485
+ * return None
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return self._fcn(result[0])
+ *
+ */
+ __pyx_tuple__453 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__453)) __PYX_ERR(0, 2485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__453);
+ __Pyx_GIVEREF(__pyx_tuple__453);
+ __pyx_codeobj__454 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__453, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 2485, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__454)) __PYX_ERR(0, 2485, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2492
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_tuple__455 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__455)) __PYX_ERR(0, 2492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__455);
+ __Pyx_GIVEREF(__pyx_tuple__455);
+ __pyx_codeobj__456 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__455, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 2492, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__456)) __PYX_ERR(0, 2492, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2507
+ * __slots__ = ()
+ *
+ * def __init__(self, arg): # <<<<<<<<<<<<<<
+ * super(AbsExpression, self).__init__(arg, 'abs', abs)
+ *
+ */
+ __pyx_tuple__457 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__457)) __PYX_ERR(0, 2507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__457);
+ __Pyx_GIVEREF(__pyx_tuple__457);
+ __pyx_codeobj__458 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__457, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 2507, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__458)) __PYX_ERR(0, 2507, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2510
+ * super(AbsExpression, self).__init__(arg, 'abs', abs)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args)
+ *
+ */
+ __pyx_tuple__459 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__459)) __PYX_ERR(0, 2510, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__459);
+ __Pyx_GIVEREF(__pyx_tuple__459);
+ __pyx_codeobj__460 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__459, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_construct_node, 2510, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__460)) __PYX_ERR(0, 2510, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2517
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_tuple__461 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__461)) __PYX_ERR(0, 2517, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__461);
+ __Pyx_GIVEREF(__pyx_tuple__461);
+ __pyx_codeobj__462 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__461, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 2517, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__462)) __PYX_ERR(0, 2517, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2528
+ * args (tuple): Children nodes
+ * """
+ * __slots__ = ('constant', # The constant term # <<<<<<<<<<<<<<
+ * 'linear_coefs', # Linear coefficients
+ * 'linear_vars') # Linear variables
+ */
+ __pyx_tuple__463 = PyTuple_Pack(3, __pyx_n_s_constant, __pyx_n_s_linear_coefs, __pyx_n_s_linear_vars); if (unlikely(!__pyx_tuple__463)) __PYX_ERR(0, 2528, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__463);
+ __Pyx_GIVEREF(__pyx_tuple__463);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2534
+ * PRECEDENCE = 6
+ *
+ * def __init__(self, args=None): # <<<<<<<<<<<<<<
+ * self.constant = 0
+ * self.linear_coefs = []
+ */
+ __pyx_tuple__464 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args); if (unlikely(!__pyx_tuple__464)) __PYX_ERR(0, 2534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__464);
+ __Pyx_GIVEREF(__pyx_tuple__464);
+ __pyx_codeobj__465 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__464, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 2534, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__465)) __PYX_ERR(0, 2534, __pyx_L1_error)
+ __pyx_tuple__466 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__466)) __PYX_ERR(0, 2534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__466);
+ __Pyx_GIVEREF(__pyx_tuple__466);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2540
+ * self._args_ = tuple()
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 0
+ *
+ */
+ __pyx_tuple__467 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__467)) __PYX_ERR(0, 2540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__467);
+ __Pyx_GIVEREF(__pyx_tuple__467);
+ __pyx_codeobj__468 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__467, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_nargs, 2540, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__468)) __PYX_ERR(0, 2540, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2543
+ * return 0
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return LinearExpression.PRECEDENCE
+ *
+ */
+ __pyx_tuple__469 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__469)) __PYX_ERR(0, 2543, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__469);
+ __Pyx_GIVEREF(__pyx_tuple__469);
+ __pyx_codeobj__470 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__469, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_precedence, 2543, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__470)) __PYX_ERR(0, 2543, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2546
+ * return LinearExpression.PRECEDENCE
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(LinearExpression, self).__getstate__()
+ * for i in LinearExpression.__slots__:
+ */
+ __pyx_tuple__471 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_state, __pyx_n_s_i); if (unlikely(!__pyx_tuple__471)) __PYX_ERR(0, 2546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__471);
+ __Pyx_GIVEREF(__pyx_tuple__471);
+ __pyx_codeobj__472 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__471, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getstate, 2546, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__472)) __PYX_ERR(0, 2546, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2552
+ * return state
+ *
+ * def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
+ * return self.construct_node(None, memo)
+ *
+ */
+ __pyx_tuple__473 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__473)) __PYX_ERR(0, 2552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__473);
+ __Pyx_GIVEREF(__pyx_tuple__473);
+ __pyx_codeobj__474 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__473, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_deepcopy_2, 2552, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__474)) __PYX_ERR(0, 2552, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2555
+ * return self.construct_node(None, memo)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * repn = self.__class__()
+ * repn.constant = deepcopy(self.constant, memo=memo)
+ */
+ __pyx_tuple__475 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_memo, __pyx_n_s_repn); if (unlikely(!__pyx_tuple__475)) __PYX_ERR(0, 2555, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__475);
+ __Pyx_GIVEREF(__pyx_tuple__475);
+ __pyx_codeobj__476 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__475, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_construct_node, 2555, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__476)) __PYX_ERR(0, 2555, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2562
+ * return repn
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'sum'
+ *
+ */
+ __pyx_tuple__477 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_args, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__477)) __PYX_ERR(0, 2562, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__477);
+ __Pyx_GIVEREF(__pyx_tuple__477);
+ __pyx_codeobj__478 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__477, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_getname, 2562, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__478)) __PYX_ERR(0, 2562, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2565
+ * return 'sum'
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * return 1 if len(self.linear_vars) > 0 else 0
+ *
+ */
+ __pyx_tuple__479 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_result); if (unlikely(!__pyx_tuple__479)) __PYX_ERR(0, 2565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__479);
+ __Pyx_GIVEREF(__pyx_tuple__479);
+ __pyx_codeobj__480 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__479, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_compute_polynomial_degree, 2565, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__480)) __PYX_ERR(0, 2565, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2568
+ * return 1 if len(self.linear_vars) > 0 else 0
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return len(self.linear_vars) == 0
+ *
+ */
+ __pyx_tuple__481 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__481)) __PYX_ERR(0, 2568, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__481);
+ __Pyx_GIVEREF(__pyx_tuple__481);
+ __pyx_codeobj__482 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__481, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_constant, 2568, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__482)) __PYX_ERR(0, 2568, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2571
+ * return len(self.linear_vars) == 0
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * if len(self.linear_vars) == 0:
+ * return True
+ */
+ __pyx_tuple__483 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_v); if (unlikely(!__pyx_tuple__483)) __PYX_ERR(0, 2571, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__483);
+ __Pyx_GIVEREF(__pyx_tuple__483);
+ __pyx_codeobj__484 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__483, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_fixed, 2571, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__484)) __PYX_ERR(0, 2571, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2579
+ * return True
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * tmp = []
+ * if compute_values:
+ */
+ __pyx_tuple__485 = PyTuple_Pack(12, __pyx_n_s_self, __pyx_n_s_values, __pyx_n_s_verbose, __pyx_n_s_smap, __pyx_n_s_compute_values, __pyx_n_s_tmp, __pyx_n_s_const, __pyx_n_s_c, __pyx_n_s_v, __pyx_n_s_v_2, __pyx_n_s_c_2, __pyx_n_s_s_4); if (unlikely(!__pyx_tuple__485)) __PYX_ERR(0, 2579, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__485);
+ __Pyx_GIVEREF(__pyx_tuple__485);
+ __pyx_codeobj__486 = (PyObject*)__Pyx_PyCode_New(5, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__485, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_to_string_2, 2579, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__486)) __PYX_ERR(0, 2579, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2635
+ * return s
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return len(self.linear_vars) > 0
+ *
+ */
+ __pyx_tuple__487 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__487)) __PYX_ERR(0, 2635, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__487);
+ __Pyx_GIVEREF(__pyx_tuple__487);
+ __pyx_codeobj__488 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__487, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_is_potentially_variable, 2635, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__488)) __PYX_ERR(0, 2635, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2638
+ * return len(self.linear_vars) > 0
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return value(self.constant) + sum(value(c)*v.value for c,v in zip(self.linear_coefs, self.linear_vars))
+ *
+ */
+ __pyx_tuple__489 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_result, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__489)) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__489);
+ __Pyx_GIVEREF(__pyx_tuple__489);
+ __pyx_codeobj__490 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__489, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_apply_operation, 2638, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__490)) __PYX_ERR(0, 2638, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2642
+ *
+ * #@profile
+ * def _combine_expr(self, etype, _other): # <<<<<<<<<<<<<<
+ * if etype == _add or etype == _sub or etype == -_add or etype == -_sub:
+ * #
+ */
+ __pyx_tuple__491 = PyTuple_Pack(10, __pyx_n_s_self, __pyx_n_s_etype, __pyx_n_s_other, __pyx_n_s_omult, __pyx_n_s_i, __pyx_n_s_c, __pyx_n_s_v, __pyx_n_s_multiplier, __pyx_n_s_c_2, __pyx_n_s_divisor); if (unlikely(!__pyx_tuple__491)) __PYX_ERR(0, 2642, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__491);
+ __Pyx_GIVEREF(__pyx_tuple__491);
+ __pyx_codeobj__492 = (PyObject*)__Pyx_PyCode_New(3, 0, 10, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__491, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_combine_expr, 2642, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__492)) __PYX_ERR(0, 2642, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2752
+ * #-------------------------------------------------------
+ *
+ * def decompose_term(expr): # <<<<<<<<<<<<<<
+ * """
+ * A function that returns a tuple consisting of (1) a flag indicated
+ */
+ __pyx_tuple__493 = PyTuple_Pack(3, __pyx_n_s_expr, __pyx_n_s_terms, __pyx_n_s_t); if (unlikely(!__pyx_tuple__493)) __PYX_ERR(0, 2752, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__493);
+ __Pyx_GIVEREF(__pyx_tuple__493);
+ __pyx_codeobj__494 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__493, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_decompose_term, 2752, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__494)) __PYX_ERR(0, 2752, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2783
+ * class LinearDecompositionError(Exception):
+ *
+ * def __init__(self, message): # <<<<<<<<<<<<<<
+ * super(LinearDecompositionError, self).__init__(message)
+ *
+ */
+ __pyx_tuple__495 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_message); if (unlikely(!__pyx_tuple__495)) __PYX_ERR(0, 2783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__495);
+ __Pyx_GIVEREF(__pyx_tuple__495);
+ __pyx_codeobj__496 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__495, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_init, 2783, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__496)) __PYX_ERR(0, 2783, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2787
+ *
+ *
+ * def _decompose_linear_terms(expr, multiplier=1): # <<<<<<<<<<<<<<
+ * """
+ * A generator function that yields tuples for the linear terms
+ */
+ __pyx_tuple__497 = PyTuple_Pack(6, __pyx_n_s_expr, __pyx_n_s_multiplier, __pyx_n_s_term, __pyx_n_s_arg, __pyx_n_s_c, __pyx_n_s_v); if (unlikely(!__pyx_tuple__497)) __PYX_ERR(0, 2787, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__497);
+ __Pyx_GIVEREF(__pyx_tuple__497);
+ __pyx_codeobj__498 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__497, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_decompose_linear_terms, 2787, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__498)) __PYX_ERR(0, 2787, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2837
+ *
+ *
+ * def _process_arg(obj): # <<<<<<<<<<<<<<
+ * #if False and obj.__class__ is ViewSumExpression or obj.__class__ is _MutableViewSumExpression:
+ * # if ignore_entangled_expressions.detangle[-1] and obj._is_owned:
+ */
+ __pyx_tuple__499 = PyTuple_Pack(1, __pyx_n_s_obj_2); if (unlikely(!__pyx_tuple__499)) __PYX_ERR(0, 2837, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__499);
+ __Pyx_GIVEREF(__pyx_tuple__499);
+ __pyx_codeobj__500 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__499, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_process_arg, 2837, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__500)) __PYX_ERR(0, 2837, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2872
+ *
+ * #@profile
+ * def _generate_sum_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ *
+ * if etype > _inplace:
+ */
+ __pyx_tuple__501 = PyTuple_Pack(3, __pyx_n_s_etype, __pyx_n_s_self_2, __pyx_n_s_other); if (unlikely(!__pyx_tuple__501)) __PYX_ERR(0, 2872, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__501);
+ __Pyx_GIVEREF(__pyx_tuple__501);
+ __pyx_codeobj__502 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__501, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_generate_sum_expression, 2872, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__502)) __PYX_ERR(0, 2872, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3000
+ *
+ * #@profile
+ * def _generate_mul_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ *
+ * if etype > _inplace:
+ */
+ __pyx_tuple__503 = PyTuple_Pack(3, __pyx_n_s_etype, __pyx_n_s_self_2, __pyx_n_s_other); if (unlikely(!__pyx_tuple__503)) __PYX_ERR(0, 3000, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__503);
+ __Pyx_GIVEREF(__pyx_tuple__503);
+ __pyx_codeobj__504 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__503, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_generate_mul_expression, 3000, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__504)) __PYX_ERR(0, 3000, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3105
+ *
+ * #@profile
+ * def _generate_other_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ *
+ * if etype > _inplace:
+ */
+ __pyx_tuple__505 = PyTuple_Pack(3, __pyx_n_s_etype, __pyx_n_s_self_2, __pyx_n_s_other); if (unlikely(!__pyx_tuple__505)) __PYX_ERR(0, 3105, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__505);
+ __Pyx_GIVEREF(__pyx_tuple__505);
+ __pyx_codeobj__506 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__505, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_generate_other_expression, 3105, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__506)) __PYX_ERR(0, 3105, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3165
+ *
+ * if _using_chained_inequality:
+ * def _generate_relational_expression(etype, lhs, rhs): #pragma: no cover # <<<<<<<<<<<<<<
+ * # We cannot trust Python not to recycle ID's for temporary POD data
+ * # (e.g., floats). So, if it is a "native" type, we will record the
+ */
+ __pyx_tuple__507 = PyTuple_Pack(13, __pyx_n_s_etype, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_cloned_from, __pyx_n_s_rhs_is_relational, __pyx_n_s_lhs_is_relational, __pyx_n_s_prevExpr, __pyx_n_s_match, __pyx_n_s_i, __pyx_n_s_arg, __pyx_n_s_val, __pyx_n_s_strict, __pyx_n_s_obj_2); if (unlikely(!__pyx_tuple__507)) __PYX_ERR(0, 3165, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__507);
+ __Pyx_GIVEREF(__pyx_tuple__507);
+ __pyx_codeobj__508 = (PyObject*)__Pyx_PyCode_New(3, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__507, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_generate_relational_expression, 3165, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__508)) __PYX_ERR(0, 3165, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3287
+ * else:
+ *
+ * def _generate_relational_expression(etype, lhs, rhs): #pragma: no cover # <<<<<<<<<<<<<<
+ * rhs_is_relational = False
+ * lhs_is_relational = False
+ */
+ __pyx_tuple__509 = PyTuple_Pack(7, __pyx_n_s_etype, __pyx_n_s_lhs, __pyx_n_s_rhs, __pyx_n_s_rhs_is_relational, __pyx_n_s_lhs_is_relational, __pyx_n_s_val, __pyx_n_s_strict); if (unlikely(!__pyx_tuple__509)) __PYX_ERR(0, 3287, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__509);
+ __Pyx_GIVEREF(__pyx_tuple__509);
+ __pyx_codeobj__510 = (PyObject*)__Pyx_PyCode_New(3, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__509, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_generate_relational_expression, 3287, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__510)) __PYX_ERR(0, 3287, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3347
+ *
+ *
+ * def _generate_intrinsic_function_expression(arg, name, fcn): # <<<<<<<<<<<<<<
+ * if not (arg.__class__ in native_types or arg.is_expression_type()):
+ * arg = _process_arg(arg)
+ */
+ __pyx_tuple__511 = PyTuple_Pack(3, __pyx_n_s_arg, __pyx_n_s_name, __pyx_n_s_fcn); if (unlikely(!__pyx_tuple__511)) __PYX_ERR(0, 3347, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__511);
+ __Pyx_GIVEREF(__pyx_tuple__511);
+ __pyx_codeobj__512 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__511, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_expr_pyomo5_pyx, __pyx_n_s_generate_intrinsic_function_exp, 3347, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__512)) __PYX_ERR(0, 3347, __pyx_L1_error)
+ __Pyx_RefNannyFinishContext();
+ return 0;
+ __pyx_L1_error:;
+ __Pyx_RefNannyFinishContext();
+ return -1;
+}
+
+static int __Pyx_InitGlobals(void) {
+ __pyx_umethod_PyList_Type_pop.type = (PyObject*)&PyList_Type;
+ if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+ __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_3_5 = PyFloat_FromDouble(3.5); if (unlikely(!__pyx_float_3_5)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+ return 0;
+ __pyx_L1_error:;
+ return -1;
+}
+
+#if PY_MAJOR_VERSION < 3
+PyMODINIT_FUNC initexpr_pyomo5(void); /*proto*/
+PyMODINIT_FUNC initexpr_pyomo5(void)
+#else
+PyMODINIT_FUNC PyInit_expr_pyomo5(void); /*proto*/
+PyMODINIT_FUNC PyInit_expr_pyomo5(void)
+#if CYTHON_PEP489_MULTI_PHASE_INIT
+{
+ return PyModuleDef_Init(&__pyx_moduledef);
+}
+static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
+ PyObject *value = PyObject_GetAttrString(spec, from_name);
+ int result = 0;
+ if (likely(value)) {
+ result = PyDict_SetItemString(moddict, to_name, value);
+ Py_DECREF(value);
+ } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_Clear();
+ } else {
+ result = -1;
+ }
+ return result;
+}
+static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
+ PyObject *module = NULL, *moddict, *modname;
+ if (__pyx_m)
+ return __Pyx_NewRef(__pyx_m);
+ modname = PyObject_GetAttrString(spec, "name");
+ if (unlikely(!modname)) goto bad;
+ module = PyModule_NewObject(modname);
+ Py_DECREF(modname);
+ if (unlikely(!module)) goto bad;
+ moddict = PyModule_GetDict(module);
+ if (unlikely(!moddict)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
+ return module;
+bad:
+ Py_XDECREF(module);
+ return NULL;
+}
+
+
+static int __pyx_pymod_exec_expr_pyomo5(PyObject *__pyx_pyinit_module)
+#endif
+#endif
+{
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannyDeclarations
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
+ #endif
+ #if CYTHON_REFNANNY
+ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+ if (!__Pyx_RefNanny) {
+ PyErr_Clear();
+ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+ if (!__Pyx_RefNanny)
+ Py_FatalError("failed to import 'refnanny' module");
+ }
+ #endif
+ __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_expr_pyomo5(void)", 0);
+ if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #ifdef __Pyx_CyFunction_USED
+ if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_FusedFunction_USED
+ if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_Generator_USED
+ if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_StopAsyncIteration_USED
+ if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ /*--- Library function declarations ---*/
+ /*--- Threads initialization code ---*/
+ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+ #ifdef WITH_THREAD /* Python build with threading support? */
+ PyEval_InitThreads();
+ #endif
+ #endif
+ /*--- Module creation code ---*/
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ __pyx_m = __pyx_pyinit_module;
+ Py_INCREF(__pyx_m);
+ #else
+ #if PY_MAJOR_VERSION < 3
+ __pyx_m = Py_InitModule4("expr_pyomo5", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+ #else
+ __pyx_m = PyModule_Create(&__pyx_moduledef);
+ #endif
+ if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
+ Py_INCREF(__pyx_d);
+ __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #if CYTHON_COMPILING_IN_PYPY
+ Py_INCREF(__pyx_b);
+ #endif
+ if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+ /*--- Initialize various global constants etc. ---*/
+ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+ if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ if (__pyx_module_is_main_pyomo__core__expr__expr_pyomo5) {
+ if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ }
+ #if PY_MAJOR_VERSION >= 3
+ {
+ PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
+ if (!PyDict_GetItemString(modules, "pyomo.core.expr.expr_pyomo5")) {
+ if (unlikely(PyDict_SetItemString(modules, "pyomo.core.expr.expr_pyomo5", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ }
+ }
+ #endif
+ /*--- Builtin init code ---*/
+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ /*--- Constants init code ---*/
+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ /*--- Global init code ---*/
+ /*--- Variable export code ---*/
+ /*--- Function export code ---*/
+ /*--- Type init code ---*/
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves) < 0) __PYX_ERR(0, 338, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves = &__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct__xbfs_yield_leaves;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components) < 0) __PYX_ERR(0, 899, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components = &__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_1_identify_components;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables) < 0) __PYX_ERR(0, 942, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables = &__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_2_identify_variables;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters) < 0) __PYX_ERR(0, 987, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters = &__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_3_identify_mutable_parameters;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable) < 0) __PYX_ERR(0, 2311, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable = &__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_4_is_potentially_variable;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr) < 0) __PYX_ERR(0, 2312, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr = &__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_5_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree) < 0) __PYX_ERR(0, 2334, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree = &__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_6__compute_polynomial_degree;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr) < 0) __PYX_ERR(0, 2335, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr = &__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_7_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template) < 0) __PYX_ERR(0, 2356, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template = &__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_8_resolve_template;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr) < 0) __PYX_ERR(0, 2357, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr = &__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_9_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation) < 0) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation = &__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_10__apply_operation;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr) < 0) __PYX_ERR(0, 2639, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr = &__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_11_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms) < 0) __PYX_ERR(0, 2787, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms = &__pyx_type_5pyomo_4core_4expr_11expr_pyomo5___pyx_scope_struct_12__decompose_linear_terms;
+ /*--- Type import code ---*/
+ /*--- Variable import code ---*/
+ /*--- Function import code ---*/
+ /*--- Execution code ---*/
+ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+ if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":13
+ * from __future__ import division
+ *
+ * _using_chained_inequality = True # <<<<<<<<<<<<<<
+ *
+ * #
+ */
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_using_chained_inequality, Py_True) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":18
+ * # These symbols are part of pyomo.core.expr
+ * #
+ * __public__ = ['linear_expression', 'nonlinear_expression', 'inequality'] # <<<<<<<<<<<<<<
+ * #
+ * # These symbols are part of pyomo.core.expr.current
+ */
+ __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_linear_expression);
+ __Pyx_GIVEREF(__pyx_n_s_linear_expression);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_linear_expression);
+ __Pyx_INCREF(__pyx_n_s_nonlinear_expression);
+ __Pyx_GIVEREF(__pyx_n_s_nonlinear_expression);
+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_nonlinear_expression);
+ __Pyx_INCREF(__pyx_n_s_inequality);
+ __Pyx_GIVEREF(__pyx_n_s_inequality);
+ PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_inequality);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_public, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":23
+ * #
+ * __all__ = (
+ * 'linear_expression', # <<<<<<<<<<<<<<
+ * 'nonlinear_expression',
+ * 'inequality',
+ */
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_all_2, __pyx_tuple__41) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":78
+ * )
+ *
+ * import math # <<<<<<<<<<<<<<
+ * import logging
+ * import sys
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":79
+ *
+ * import math
+ * import logging # <<<<<<<<<<<<<<
+ * import sys
+ * import traceback
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_logging, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 79, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_1) < 0) __PYX_ERR(0, 79, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":80
+ * import math
+ * import logging
+ * import sys # <<<<<<<<<<<<<<
+ * import traceback
+ * from copy import deepcopy
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 80, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 80, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":81
+ * import logging
+ * import sys
+ * import traceback # <<<<<<<<<<<<<<
+ * from copy import deepcopy
+ * from collections import deque
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_traceback, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 81, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_traceback, __pyx_t_1) < 0) __PYX_ERR(0, 81, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":82
+ * import sys
+ * import traceback
+ * from copy import deepcopy # <<<<<<<<<<<<<<
+ * from collections import deque
+ * from itertools import islice
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_deepcopy);
+ __Pyx_GIVEREF(__pyx_n_s_deepcopy);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_deepcopy);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_copy, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 82, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_deepcopy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 82, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_deepcopy, __pyx_t_1) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":83
+ * import traceback
+ * from copy import deepcopy
+ * from collections import deque # <<<<<<<<<<<<<<
+ * from itertools import islice
+ * from six import next, string_types, itervalues
+ */
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_deque);
+ __Pyx_GIVEREF(__pyx_n_s_deque);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_deque);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_collections, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 83, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_deque); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 83, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_deque, __pyx_t_2) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":84
+ * from copy import deepcopy
+ * from collections import deque
+ * from itertools import islice # <<<<<<<<<<<<<<
+ * from six import next, string_types, itervalues
+ * from six.moves import xrange, builtins
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_islice);
+ __Pyx_GIVEREF(__pyx_n_s_islice);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_islice);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 84, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_islice); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 84, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_islice, __pyx_t_1) < 0) __PYX_ERR(0, 84, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":85
+ * from collections import deque
+ * from itertools import islice
+ * from six import next, string_types, itervalues # <<<<<<<<<<<<<<
+ * from six.moves import xrange, builtins
+ * from weakref import ref
+ */
+ __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_next);
+ __Pyx_GIVEREF(__pyx_n_s_next);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_next);
+ __Pyx_INCREF(__pyx_n_s_string_types);
+ __Pyx_GIVEREF(__pyx_n_s_string_types);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_string_types);
+ __Pyx_INCREF(__pyx_n_s_itervalues);
+ __Pyx_GIVEREF(__pyx_n_s_itervalues);
+ PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_itervalues);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_six, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_next); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_next, __pyx_t_2) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_string_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_string_types, __pyx_t_2) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_itervalues, __pyx_t_2) < 0) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":86
+ * from itertools import islice
+ * from six import next, string_types, itervalues
+ * from six.moves import xrange, builtins # <<<<<<<<<<<<<<
+ * from weakref import ref
+ *
+ */
+ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_xrange);
+ __Pyx_GIVEREF(__pyx_n_s_xrange);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_xrange);
+ __Pyx_INCREF(__pyx_n_s_builtins);
+ __Pyx_GIVEREF(__pyx_n_s_builtins);
+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_builtins);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_six_moves, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 86, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_xrange); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_xrange, __pyx_t_1) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_builtins); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 86, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_builtins, __pyx_t_1) < 0) __PYX_ERR(0, 86, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":87
+ * from six import next, string_types, itervalues
+ * from six.moves import xrange, builtins
+ * from weakref import ref # <<<<<<<<<<<<<<
+ *
+ * logger = logging.getLogger('pyomo.core')
+ */
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_ref);
+ __Pyx_GIVEREF(__pyx_n_s_ref);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ref);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_weakref, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 87, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ref); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 87, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ref, __pyx_t_2) < 0) __PYX_ERR(0, 87, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":89
+ * from weakref import ref
+ *
+ * logger = logging.getLogger('pyomo.core') # <<<<<<<<<<<<<<
+ *
+ * from pyutilib.misc.visitor import SimpleVisitor, ValueVisitor
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger, __pyx_t_1) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":91
+ * logger = logging.getLogger('pyomo.core')
+ *
+ * from pyutilib.misc.visitor import SimpleVisitor, ValueVisitor # <<<<<<<<<<<<<<
+ * from pyutilib.math.util import isclose
+ *
+ */
+ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_SimpleVisitor);
+ __Pyx_GIVEREF(__pyx_n_s_SimpleVisitor);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SimpleVisitor);
+ __Pyx_INCREF(__pyx_n_s_ValueVisitor);
+ __Pyx_GIVEREF(__pyx_n_s_ValueVisitor);
+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_ValueVisitor);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyutilib_misc_visitor, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_SimpleVisitor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SimpleVisitor, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ValueVisitor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ValueVisitor, __pyx_t_1) < 0) __PYX_ERR(0, 91, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":92
+ *
+ * from pyutilib.misc.visitor import SimpleVisitor, ValueVisitor
+ * from pyutilib.math.util import isclose # <<<<<<<<<<<<<<
+ *
+ * from pyomo.util.deprecation import deprecation_warning
+ */
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_isclose);
+ __Pyx_GIVEREF(__pyx_n_s_isclose);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_isclose);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyutilib_math_util, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_isclose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_isclose, __pyx_t_2) < 0) __PYX_ERR(0, 92, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":94
+ * from pyutilib.math.util import isclose
+ *
+ * from pyomo.util.deprecation import deprecation_warning # <<<<<<<<<<<<<<
+ * from pyomo.core.expr.symbol_map import SymbolMap
+ * from pyomo.core.expr.numvalue import \
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_deprecation_warning);
+ __Pyx_GIVEREF(__pyx_n_s_deprecation_warning);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_deprecation_warning);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_util_deprecation, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_deprecation_warning); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_deprecation_warning, __pyx_t_1) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":95
+ *
+ * from pyomo.util.deprecation import deprecation_warning
+ * from pyomo.core.expr.symbol_map import SymbolMap # <<<<<<<<<<<<<<
+ * from pyomo.core.expr.numvalue import \
+ * (NumericValue,
+ */
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_SymbolMap);
+ __Pyx_GIVEREF(__pyx_n_s_SymbolMap);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SymbolMap);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyomo_core_expr_symbol_map, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_SymbolMap); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SymbolMap, __pyx_t_2) < 0) __PYX_ERR(0, 95, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":97
+ * from pyomo.core.expr.symbol_map import SymbolMap
+ * from pyomo.core.expr.numvalue import \
+ * (NumericValue, # <<<<<<<<<<<<<<
+ * NumericConstant,
+ * native_types,
+ */
+ __pyx_t_1 = PyList_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 97, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_NumericValue);
+ __Pyx_GIVEREF(__pyx_n_s_NumericValue);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_NumericValue);
+ __Pyx_INCREF(__pyx_n_s_NumericConstant);
+ __Pyx_GIVEREF(__pyx_n_s_NumericConstant);
+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_NumericConstant);
+ __Pyx_INCREF(__pyx_n_s_native_types);
+ __Pyx_GIVEREF(__pyx_n_s_native_types);
+ PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_native_types);
+ __Pyx_INCREF(__pyx_n_s_nonpyomo_leaf_types);
+ __Pyx_GIVEREF(__pyx_n_s_nonpyomo_leaf_types);
+ PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_nonpyomo_leaf_types);
+ __Pyx_INCREF(__pyx_n_s_native_numeric_types);
+ __Pyx_GIVEREF(__pyx_n_s_native_numeric_types);
+ PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_native_numeric_types);
+ __Pyx_INCREF(__pyx_n_s_as_numeric);
+ __Pyx_GIVEREF(__pyx_n_s_as_numeric);
+ PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_as_numeric);
+ __Pyx_INCREF(__pyx_n_s_value);
+ __Pyx_GIVEREF(__pyx_n_s_value);
+ PyList_SET_ITEM(__pyx_t_1, 6, __pyx_n_s_value);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":96
+ * from pyomo.util.deprecation import deprecation_warning
+ * from pyomo.core.expr.symbol_map import SymbolMap
+ * from pyomo.core.expr.numvalue import \ # <<<<<<<<<<<<<<
+ * (NumericValue,
+ * NumericConstant,
+ */
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_core_expr_numvalue, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NumericValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericValue, __pyx_t_1) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_NumericConstant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericConstant, __pyx_t_1) < 0) __PYX_ERR(0, 98, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_native_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_native_types, __pyx_t_1) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_nonpyomo_leaf_types, __pyx_t_1) < 0) __PYX_ERR(0, 100, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_native_numeric_types, __pyx_t_1) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_as_numeric); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_as_numeric, __pyx_t_1) < 0) __PYX_ERR(0, 102, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_value, __pyx_t_1) < 0) __PYX_ERR(0, 103, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":105
+ * value)
+ * from pyomo.core.expr.expr_common import \
+ * (_add, _sub, _mul, _div, # <<<<<<<<<<<<<<
+ * _pow, _neg, _abs, _inplace,
+ * _unary, _radd, _rsub, _rmul,
+ */
+ __pyx_t_2 = PyList_New(22); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 105, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_add_2);
+ __Pyx_GIVEREF(__pyx_n_s_add_2);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_add_2);
+ __Pyx_INCREF(__pyx_n_s_sub);
+ __Pyx_GIVEREF(__pyx_n_s_sub);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_sub);
+ __Pyx_INCREF(__pyx_n_s_mul);
+ __Pyx_GIVEREF(__pyx_n_s_mul);
+ PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_mul);
+ __Pyx_INCREF(__pyx_n_s_div);
+ __Pyx_GIVEREF(__pyx_n_s_div);
+ PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_div);
+ __Pyx_INCREF(__pyx_n_s_pow_2);
+ __Pyx_GIVEREF(__pyx_n_s_pow_2);
+ PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_pow_2);
+ __Pyx_INCREF(__pyx_n_s_neg_2);
+ __Pyx_GIVEREF(__pyx_n_s_neg_2);
+ PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_neg_2);
+ __Pyx_INCREF(__pyx_n_s_abs_2);
+ __Pyx_GIVEREF(__pyx_n_s_abs_2);
+ PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_abs_2);
+ __Pyx_INCREF(__pyx_n_s_inplace);
+ __Pyx_GIVEREF(__pyx_n_s_inplace);
+ PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_s_inplace);
+ __Pyx_INCREF(__pyx_n_s_unary);
+ __Pyx_GIVEREF(__pyx_n_s_unary);
+ PyList_SET_ITEM(__pyx_t_2, 8, __pyx_n_s_unary);
+ __Pyx_INCREF(__pyx_n_s_radd);
+ __Pyx_GIVEREF(__pyx_n_s_radd);
+ PyList_SET_ITEM(__pyx_t_2, 9, __pyx_n_s_radd);
+ __Pyx_INCREF(__pyx_n_s_rsub);
+ __Pyx_GIVEREF(__pyx_n_s_rsub);
+ PyList_SET_ITEM(__pyx_t_2, 10, __pyx_n_s_rsub);
+ __Pyx_INCREF(__pyx_n_s_rmul);
+ __Pyx_GIVEREF(__pyx_n_s_rmul);
+ PyList_SET_ITEM(__pyx_t_2, 11, __pyx_n_s_rmul);
+ __Pyx_INCREF(__pyx_n_s_rdiv);
+ __Pyx_GIVEREF(__pyx_n_s_rdiv);
+ PyList_SET_ITEM(__pyx_t_2, 12, __pyx_n_s_rdiv);
+ __Pyx_INCREF(__pyx_n_s_rpow);
+ __Pyx_GIVEREF(__pyx_n_s_rpow);
+ PyList_SET_ITEM(__pyx_t_2, 13, __pyx_n_s_rpow);
+ __Pyx_INCREF(__pyx_n_s_iadd);
+ __Pyx_GIVEREF(__pyx_n_s_iadd);
+ PyList_SET_ITEM(__pyx_t_2, 14, __pyx_n_s_iadd);
+ __Pyx_INCREF(__pyx_n_s_isub);
+ __Pyx_GIVEREF(__pyx_n_s_isub);
+ PyList_SET_ITEM(__pyx_t_2, 15, __pyx_n_s_isub);
+ __Pyx_INCREF(__pyx_n_s_imul);
+ __Pyx_GIVEREF(__pyx_n_s_imul);
+ PyList_SET_ITEM(__pyx_t_2, 16, __pyx_n_s_imul);
+ __Pyx_INCREF(__pyx_n_s_idiv);
+ __Pyx_GIVEREF(__pyx_n_s_idiv);
+ PyList_SET_ITEM(__pyx_t_2, 17, __pyx_n_s_idiv);
+ __Pyx_INCREF(__pyx_n_s_ipow);
+ __Pyx_GIVEREF(__pyx_n_s_ipow);
+ PyList_SET_ITEM(__pyx_t_2, 18, __pyx_n_s_ipow);
+ __Pyx_INCREF(__pyx_n_s_lt);
+ __Pyx_GIVEREF(__pyx_n_s_lt);
+ PyList_SET_ITEM(__pyx_t_2, 19, __pyx_n_s_lt);
+ __Pyx_INCREF(__pyx_n_s_le);
+ __Pyx_GIVEREF(__pyx_n_s_le);
+ PyList_SET_ITEM(__pyx_t_2, 20, __pyx_n_s_le);
+ __Pyx_INCREF(__pyx_n_s_eq);
+ __Pyx_GIVEREF(__pyx_n_s_eq);
+ PyList_SET_ITEM(__pyx_t_2, 21, __pyx_n_s_eq);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":104
+ * as_numeric,
+ * value)
+ * from pyomo.core.expr.expr_common import \ # <<<<<<<<<<<<<<
+ * (_add, _sub, _mul, _div,
+ * _pow, _neg, _abs, _inplace,
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyomo_core_expr_expr_common, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_add_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_2, __pyx_t_2) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_sub); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sub, __pyx_t_2) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_mul); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_mul, __pyx_t_2) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_div); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_div, __pyx_t_2) < 0) __PYX_ERR(0, 105, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_pow_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pow_2, __pyx_t_2) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_neg_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_neg_2, __pyx_t_2) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_abs_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_abs_2, __pyx_t_2) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_inplace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_inplace, __pyx_t_2) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_unary); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_unary, __pyx_t_2) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_radd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_radd, __pyx_t_2) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_rsub); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_rsub, __pyx_t_2) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_rmul); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_rmul, __pyx_t_2) < 0) __PYX_ERR(0, 107, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_rdiv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_rdiv, __pyx_t_2) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_rpow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_rpow, __pyx_t_2) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_iadd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_iadd, __pyx_t_2) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_isub); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_isub, __pyx_t_2) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_imul); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_imul, __pyx_t_2) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_idiv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_idiv, __pyx_t_2) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ipow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ipow, __pyx_t_2) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_lt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_lt, __pyx_t_2) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_le); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_le, __pyx_t_2) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_eq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_eq, __pyx_t_2) < 0) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":111
+ * _imul, _idiv, _ipow, _lt, _le,
+ * _eq)
+ * from pyomo.core.expr import expr_common as common # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_expr_common);
+ __Pyx_GIVEREF(__pyx_n_s_expr_common);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_expr_common);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_core_expr, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_expr_common); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_common, __pyx_t_1) < 0) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":114
+ *
+ *
+ * if _using_chained_inequality: #pragma: no cover # <<<<<<<<<<<<<<
+ * class _chainedInequality(object):
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_using_chained_inequality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":115
+ *
+ * if _using_chained_inequality: #pragma: no cover
+ * class _chainedInequality(object): # <<<<<<<<<<<<<<
+ *
+ * prev = None
+ */
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__43); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__43, __pyx_n_s_chainedInequality, __pyx_n_s_chainedInequality, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":117
+ * class _chainedInequality(object):
+ *
+ * prev = None # <<<<<<<<<<<<<<
+ * call_info = None
+ * cloned_from = []
+ */
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_prev, Py_None) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":118
+ *
+ * prev = None
+ * call_info = None # <<<<<<<<<<<<<<
+ * cloned_from = []
+ *
+ */
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_call_info, Py_None) < 0) __PYX_ERR(0, 118, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":119
+ * prev = None
+ * call_info = None
+ * cloned_from = [] # <<<<<<<<<<<<<<
+ *
+ * @staticmethod
+ */
+ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_cloned_from, __pyx_t_4) < 0) __PYX_ERR(0, 119, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":122
+ *
+ * @staticmethod
+ * def error_message(msg=None): # <<<<<<<<<<<<<<
+ * if msg is None:
+ * msg = "Relational expression used in an unexpected Boolean context."
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18_chainedInequality_1error_message, __Pyx_CYFUNCTION_STATICMETHOD, __pyx_n_s_chainedInequality_error_message, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__46);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":121
+ * cloned_from = []
+ *
+ * @staticmethod # <<<<<<<<<<<<<<
+ * def error_message(msg=None):
+ * if msg is None:
+ */
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 121, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 121, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_error_message, __pyx_t_4) < 0) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":115
+ *
+ * if _using_chained_inequality: #pragma: no cover
+ * class _chainedInequality(object): # <<<<<<<<<<<<<<
+ *
+ * prev = None
+ */
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_chainedInequality, __pyx_tuple__43, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_chainedInequality, __pyx_t_4) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":114
+ *
+ *
+ * if _using_chained_inequality: #pragma: no cover # <<<<<<<<<<<<<<
+ * class _chainedInequality(object):
+ *
+ */
+ goto __pyx_L2;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":152
+ *
+ * else:
+ * _chainedInequality = None # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ /*else*/ {
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_chainedInequality, Py_None) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
+ }
+ __pyx_L2:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":155
+ *
+ *
+ * _ParamData = None # <<<<<<<<<<<<<<
+ * SimpleParam = None
+ * TemplateExpressionError = None
+ */
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ParamData, Py_None) < 0) __PYX_ERR(0, 155, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":156
+ *
+ * _ParamData = None
+ * SimpleParam = None # <<<<<<<<<<<<<<
+ * TemplateExpressionError = None
+ * def initialize_expression_data():
+ */
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SimpleParam, Py_None) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":157
+ * _ParamData = None
+ * SimpleParam = None
+ * TemplateExpressionError = None # <<<<<<<<<<<<<<
+ * def initialize_expression_data():
+ * """
+ */
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_TemplateExpressionError, Py_None) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":158
+ * SimpleParam = None
+ * TemplateExpressionError = None
+ * def initialize_expression_data(): # <<<<<<<<<<<<<<
+ * """
+ * A function used to initialize expression global data.
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_1initialize_expression_data, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 158, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_initialize_expression_data, __pyx_t_2) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":172
+ *
+ *
+ * def compress_expression(expr): # <<<<<<<<<<<<<<
+ * """
+ * Deprecated function that was used to compress deep Pyomo5
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_3compress_expression, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_compress_expression, __pyx_t_2) < 0) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":180
+ *
+ *
+ * class clone_counter_context(object): # <<<<<<<<<<<<<<
+ * """ Context manager for counting cloning events.
+ *
+ */
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__50); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 180, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__50, __pyx_n_s_clone_counter_context, __pyx_n_s_clone_counter_context, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Context_manager_for_counting_cl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 180, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":188
+ * """
+ *
+ * _count = 0 # <<<<<<<<<<<<<<
+ *
+ * def __enter__(self):
+ */
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_count, __pyx_int_0) < 0) __PYX_ERR(0, 188, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":190
+ * _count = 0
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_1__enter__, 0, __pyx_n_s_clone_counter_context___enter, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 190, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_enter, __pyx_t_4) < 0) __PYX_ERR(0, 190, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":193
+ * return self
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * pass
+ *
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_3__exit__, 0, __pyx_n_s_clone_counter_context___exit, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_exit, __pyx_t_4) < 0) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":197
+ *
+ * @property
+ * def count(self): # <<<<<<<<<<<<<<
+ * """A property that returns the clone count value.
+ * """
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_21clone_counter_context_5count, 0, __pyx_n_s_clone_counter_context_count, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__56)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 197, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":196
+ * pass
+ *
+ * @property # <<<<<<<<<<<<<<
+ * def count(self):
+ * """A property that returns the clone count value.
+ */
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_count_2, __pyx_t_4) < 0) __PYX_ERR(0, 197, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":180
+ *
+ *
+ * class clone_counter_context(object): # <<<<<<<<<<<<<<
+ * """ Context manager for counting cloning events.
+ *
+ */
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_clone_counter_context, __pyx_tuple__50, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 180, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_clone_counter_context, __pyx_t_4) < 0) __PYX_ERR(0, 180, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":205
+ * #: use of this context manager. Specifically, different
+ * #: instances of this context manger are not necessary.
+ * clone_counter = clone_counter_context() # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_clone_counter_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_clone_counter, __pyx_t_2) < 0) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":208
+ *
+ *
+ * class mutable_sum_context(object): # <<<<<<<<<<<<<<
+ * """ Context manager for mutable sums.
+ *
+ */
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__57); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__57, __pyx_n_s_mutable_sum_context, __pyx_n_s_mutable_sum_context, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Context_manager_for_mutable_sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":215
+ * """
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * self.e = _MutableViewSumExpression([])
+ * return self.e
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context_1__enter__, 0, __pyx_n_s_mutable_sum_context___enter, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 215, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_enter, __pyx_t_4) < 0) __PYX_ERR(0, 215, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":219
+ * return self.e
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * pass
+ * if self.e.__class__ == _MutableViewSumExpression:
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_19mutable_sum_context_3__exit__, 0, __pyx_n_s_mutable_sum_context___exit, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 219, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_exit, __pyx_t_4) < 0) __PYX_ERR(0, 219, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":208
+ *
+ *
+ * class mutable_sum_context(object): # <<<<<<<<<<<<<<
+ * """ Context manager for mutable sums.
+ *
+ */
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_mutable_sum_context, __pyx_tuple__57, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_mutable_sum_context, __pyx_t_4) < 0) __PYX_ERR(0, 208, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":227
+ * #: This is an instance of the :class:`mutable_sum_contex ` context manager.
+ * #: Different instances of this context manger are not necessary.
+ * nonlinear_expression = mutable_sum_context() # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_mutable_sum_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_nonlinear_expression, __pyx_t_2) < 0) __PYX_ERR(0, 227, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":230
+ *
+ *
+ * class mutable_linear_context(object): # <<<<<<<<<<<<<<
+ * """ Context manager for mutable linear sums.
+ *
+ */
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__62); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__62, __pyx_n_s_mutable_linear_context, __pyx_n_s_mutable_linear_context, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Context_manager_for_mutable_lin); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":237
+ * """
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * """
+ * The :class:`_MutableLinearExpression `
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_1__enter__, 0, __pyx_n_s_mutable_linear_context___enter, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__64)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 237, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_enter, __pyx_t_4) < 0) __PYX_ERR(0, 237, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":246
+ * return self.e
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * """
+ * The context is changed to the
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22mutable_linear_context_3__exit__, 0, __pyx_n_s_mutable_linear_context___exit, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__66)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_exit, __pyx_t_4) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":230
+ *
+ *
+ * class mutable_linear_context(object): # <<<<<<<<<<<<<<
+ * """ Context manager for mutable linear sums.
+ *
+ */
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_mutable_linear_context, __pyx_tuple__62, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 230, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_mutable_linear_context, __pyx_t_4) < 0) __PYX_ERR(0, 230, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":259
+ * #: This is an instance of the :class:`mutable_linear_contex ` context manager.
+ * #: Different instances of this context manger are not necessary.
+ * linear_expression = mutable_linear_context() # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_mutable_linear_context); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 259, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 259, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_linear_expression, __pyx_t_2) < 0) __PYX_ERR(0, 259, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":268
+ * #-------------------------------------------------------
+ *
+ * class SimpleExpressionVisitor(object): # <<<<<<<<<<<<<<
+ * """
+ * Note:
+ */
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__67); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 268, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__67, __pyx_n_s_SimpleExpressionVisitor, __pyx_n_s_SimpleExpressionVisitor, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Note_This_class_is_a_customizat); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 268, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":279
+ * """
+ *
+ * def visit(self, node): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Visit a node in an expression tree and perform some operation on
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_1visit, 0, __pyx_n_s_SimpleExpressionVisitor_visit, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 279, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_visit, __pyx_t_4) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":295
+ * pass
+ *
+ * def finalize(self): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Return the "final value" of the search.
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_3finalize, 0, __pyx_n_s_SimpleExpressionVisitor_finalize, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 295, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_finalize, __pyx_t_4) < 0) __PYX_ERR(0, 295, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":307
+ * pass
+ *
+ * def xbfs(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Breadth-first search of an expression tree,
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_5xbfs, 0, __pyx_n_s_SimpleExpressionVisitor_xbfs, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_xbfs, __pyx_t_4) < 0) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":338
+ * return self.finalize()
+ *
+ * def xbfs_yield_leaves(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Breadth-first search of an expression tree, except that
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23SimpleExpressionVisitor_7xbfs_yield_leaves, 0, __pyx_n_s_SimpleExpressionVisitor_xbfs_yie, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_xbfs_yield_leaves, __pyx_t_4) < 0) __PYX_ERR(0, 338, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":268
+ * #-------------------------------------------------------
+ *
+ * class SimpleExpressionVisitor(object): # <<<<<<<<<<<<<<
+ * """
+ * Note:
+ */
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SimpleExpressionVisitor, __pyx_tuple__67, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 268, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SimpleExpressionVisitor, __pyx_t_4) < 0) __PYX_ERR(0, 268, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":383
+ *
+ *
+ * class ExpressionValueVisitor(object): # <<<<<<<<<<<<<<
+ * """
+ * Note:
+ */
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__76); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__76, __pyx_n_s_ExpressionValueVisitor, __pyx_n_s_ExpressionValueVisitor, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Note_This_class_is_a_customizat_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 383, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":394
+ * """
+ *
+ * def visit(self, node, values): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Visit a node in a tree and compute its value using
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_1visit, 0, __pyx_n_s_ExpressionValueVisitor_visit, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__78)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 394, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_visit, __pyx_t_4) < 0) __PYX_ERR(0, 394, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":411
+ * pass
+ *
+ * def visiting_potential_leaf(self, node): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Visit a node and return its value if it is a leaf.
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_3visiting_potential_leaf, 0, __pyx_n_s_ExpressionValueVisitor_visiting, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__80)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 411, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_visiting_potential_leaf, __pyx_t_4) < 0) __PYX_ERR(0, 411, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":429
+ * raise RuntimeError("The visiting_potential_leaf method needs to be defined.")
+ *
+ * def finalize(self, ans): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * This method defines the return value for the search methods
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_5finalize, 0, __pyx_n_s_ExpressionValueVisitor_finalize, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__82)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_finalize, __pyx_t_4) < 0) __PYX_ERR(0, 429, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":448
+ * return ans
+ *
+ * def dfs_postorder_stack(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Perform a depth-first search in postorder using a stack
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22ExpressionValueVisitor_7dfs_postorder_stack, 0, __pyx_n_s_ExpressionValueVisitor_dfs_posto, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__84)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_dfs_postorder_stack, __pyx_t_4) < 0) __PYX_ERR(0, 448, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":383
+ *
+ *
+ * class ExpressionValueVisitor(object): # <<<<<<<<<<<<<<
+ * """
+ * Note:
+ */
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ExpressionValueVisitor, __pyx_tuple__76, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 383, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ExpressionValueVisitor, __pyx_t_4) < 0) __PYX_ERR(0, 383, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":520
+ *
+ *
+ * class ExpressionReplacementVisitor(object): # <<<<<<<<<<<<<<
+ * """
+ * Note:
+ */
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__85); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_tuple__85, __pyx_n_s_ExpressionReplacementVisitor, __pyx_n_s_ExpressionReplacementVisitor, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Note_This_class_is_a_customizat_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":531
+ * """
+ *
+ * def __init__(self, memo=None): # <<<<<<<<<<<<<<
+ * """
+ * Contruct a visitor that is tailored to support the
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_1__init__, 0, __pyx_n_s_ExpressionReplacementVisitor___i, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_4, __pyx_tuple__88);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":548
+ * self.memo = memo #pragma: no cover
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """
+ * Visit and clone nodes that have been expanded.
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_3visit, 0, __pyx_n_s_ExpressionReplacementVisitor_vis, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__90)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_visit, __pyx_t_4) < 0) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":567
+ * return node
+ *
+ * def visiting_potential_leaf(self, node): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Visit a node and return a cloned node if it is a leaf.
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_5visiting_potential_leaf, 0, __pyx_n_s_ExpressionReplacementVisitor_vis_2, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__92)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 567, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_visiting_potential_leaf, __pyx_t_4) < 0) __PYX_ERR(0, 567, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":585
+ * raise RuntimeError("The visiting_potential_leaf method needs to be defined.")
+ *
+ * def finalize(self, ans): # <<<<<<<<<<<<<<
+ * """
+ * This method defines the return value for the search methods
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_7finalize, 0, __pyx_n_s_ExpressionReplacementVisitor_fin, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__94)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 585, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_finalize, __pyx_t_4) < 0) __PYX_ERR(0, 585, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":604
+ * return ans
+ *
+ * def construct_node(self, node, values): # <<<<<<<<<<<<<<
+ * """
+ * Call the expression construct_node() method.
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_9construct_node, 0, __pyx_n_s_ExpressionReplacementVisitor_con, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__96)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 604, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_construct_node, __pyx_t_4) < 0) __PYX_ERR(0, 604, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":610
+ * return node.construct_node( tuple(values), self.memo )
+ *
+ * def dfs_postorder_stack(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Perform a depth-first search in postorder using a stack
+ */
+ __pyx_t_4 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_28ExpressionReplacementVisitor_11dfs_postorder_stack, 0, __pyx_n_s_ExpressionReplacementVisitor_dfs, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__98)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 610, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyObject_SetItem(__pyx_t_1, __pyx_n_s_dfs_postorder_stack, __pyx_t_4) < 0) __PYX_ERR(0, 610, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":520
+ *
+ *
+ * class ExpressionReplacementVisitor(object): # <<<<<<<<<<<<<<
+ * """
+ * Note:
+ */
+ __pyx_t_4 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ExpressionReplacementVisitor, __pyx_tuple__85, __pyx_t_1, NULL, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ExpressionReplacementVisitor, __pyx_t_4) < 0) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":709
+ * # =====================================================
+ *
+ * class _CloneVisitor(ExpressionValueVisitor): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, clone_leaves=False, memo=None):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionValueVisitor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 709, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 709, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_CloneVisitor, __pyx_n_s_CloneVisitor, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 709, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":711
+ * class _CloneVisitor(ExpressionValueVisitor):
+ *
+ * def __init__(self, clone_leaves=False, memo=None): # <<<<<<<<<<<<<<
+ * self.clone_leaves = clone_leaves
+ * self.memo = memo
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_1__init__, 0, __pyx_n_s_CloneVisitor___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__100)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 711, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__101);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 711, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":715
+ * self.memo = memo
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node.construct_node( tuple(values), self.memo )
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_3visit, 0, __pyx_n_s_CloneVisitor_visit, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 715, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_visit, __pyx_t_5) < 0) __PYX_ERR(0, 715, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":719
+ * return node.construct_node( tuple(values), self.memo )
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13_CloneVisitor_5visiting_potential_leaf, 0, __pyx_n_s_CloneVisitor_visiting_potential, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_visiting_potential_leaf, __pyx_t_5) < 0) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":709
+ * # =====================================================
+ *
+ * class _CloneVisitor(ExpressionValueVisitor): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, clone_leaves=False, memo=None):
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_CloneVisitor, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 709, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_CloneVisitor, __pyx_t_5) < 0) __PYX_ERR(0, 709, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":751
+ *
+ *
+ * def clone_expression(expr, memo=None, clone_leaves=True): # <<<<<<<<<<<<<<
+ * """A function that is used to clone an expression.
+ *
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_5clone_expression, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 751, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_clone_expression, __pyx_t_1) < 0) __PYX_ERR(0, 751, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":791
+ * # =====================================================
+ *
+ * class _SizeVisitor(SimpleExpressionVisitor): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self):
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_SimpleExpressionVisitor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 791, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 791, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_SizeVisitor, __pyx_n_s_SizeVisitor, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 791, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":793
+ * class _SizeVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * self.counter = 0
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_1__init__, 0, __pyx_n_s_SizeVisitor___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 793, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 793, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":796
+ * self.counter = 0
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * self.counter += 1
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_3visit, 0, __pyx_n_s_SizeVisitor_visit, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 796, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_visit, __pyx_t_5) < 0) __PYX_ERR(0, 796, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":799
+ * self.counter += 1
+ *
+ * def finalize(self): # <<<<<<<<<<<<<<
+ * return self.counter
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_12_SizeVisitor_5finalize, 0, __pyx_n_s_SizeVisitor_finalize, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_finalize, __pyx_t_5) < 0) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":791
+ * # =====================================================
+ *
+ * class _SizeVisitor(SimpleExpressionVisitor): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self):
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_SizeVisitor, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 791, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SizeVisitor, __pyx_t_5) < 0) __PYX_ERR(0, 791, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":803
+ *
+ *
+ * def _sizeof_expression(expr): # <<<<<<<<<<<<<<
+ * """
+ * Return the number of nodes in the expression tree.
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7_sizeof_expression, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 803, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sizeof_expression, __pyx_t_2) < 0) __PYX_ERR(0, 803, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":822
+ * # =====================================================
+ *
+ * class _EvaluationVisitor(ExpressionValueVisitor): # <<<<<<<<<<<<<<
+ *
+ * def visit(self, node, values):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionValueVisitor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_EvaluationVisitor, __pyx_n_s_EvaluationVisitor, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":824
+ * class _EvaluationVisitor(ExpressionValueVisitor):
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node._apply_operation(values)
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_1visit, 0, __pyx_n_s_EvaluationVisitor_visit, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 824, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_visit, __pyx_t_5) < 0) __PYX_ERR(0, 824, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":828
+ * return node._apply_operation(values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18_EvaluationVisitor_3visiting_potential_leaf, 0, __pyx_n_s_EvaluationVisitor_visiting_pote, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_visiting_potential_leaf, __pyx_t_5) < 0) __PYX_ERR(0, 828, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":822
+ * # =====================================================
+ *
+ * class _EvaluationVisitor(ExpressionValueVisitor): # <<<<<<<<<<<<<<
+ *
+ * def visit(self, node, values):
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_EvaluationVisitor, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_EvaluationVisitor, __pyx_t_5) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":846
+ *
+ *
+ * def evaluate_expression(exp, exception=True): # <<<<<<<<<<<<<<
+ * """
+ * Evaluate the value of the expression.
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_9evaluate_expression, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 846, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_evaluate_expression, __pyx_t_1) < 0) __PYX_ERR(0, 846, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":882
+ * # =====================================================
+ *
+ * class _ComponentVisitor(SimpleExpressionVisitor): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, types):
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_SimpleExpressionVisitor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 882, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 882, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ComponentVisitor, __pyx_n_s_ComponentVisitor, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 882, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":884
+ * class _ComponentVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self, types): # <<<<<<<<<<<<<<
+ * self.seen = set()
+ * if types.__class__ is set:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor_1__init__, 0, __pyx_n_s_ComponentVisitor___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 884, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 884, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":891
+ * self.types = set(types)
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * if node.__class__ in self.types:
+ * if id(node) in self.seen:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17_ComponentVisitor_3visit, 0, __pyx_n_s_ComponentVisitor_visit, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 891, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_visit, __pyx_t_5) < 0) __PYX_ERR(0, 891, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":882
+ * # =====================================================
+ *
+ * class _ComponentVisitor(SimpleExpressionVisitor): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, types):
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ComponentVisitor, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 882, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ComponentVisitor, __pyx_t_5) < 0) __PYX_ERR(0, 882, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":899
+ *
+ *
+ * def identify_components(expr, component_types): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of nodes
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_11identify_components, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 899, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_identify_components, __pyx_t_2) < 0) __PYX_ERR(0, 899, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":926
+ * # =====================================================
+ *
+ * class _VariableVisitor(SimpleExpressionVisitor): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SimpleExpressionVisitor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_VariableVisitor, __pyx_n_s_VariableVisitor, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":928
+ * class _VariableVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * self.seen = set()
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor_1__init__, 0, __pyx_n_s_VariableVisitor___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 928, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 928, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":931
+ * self.seen = set()
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * if node.__class__ in nonpyomo_leaf_types:
+ * return
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16_VariableVisitor_3visit, 0, __pyx_n_s_VariableVisitor_visit, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 931, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_visit, __pyx_t_5) < 0) __PYX_ERR(0, 931, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":926
+ * # =====================================================
+ *
+ * class _VariableVisitor(SimpleExpressionVisitor): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self):
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_VariableVisitor, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 926, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_VariableVisitor, __pyx_t_5) < 0) __PYX_ERR(0, 926, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":942
+ *
+ *
+ * def identify_variables(expr, include_fixed=True): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of variables
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14identify_variables, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 942, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_identify_variables, __pyx_t_1) < 0) __PYX_ERR(0, 942, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":970
+ * # =====================================================
+ *
+ * class _MutableParamVisitor(SimpleExpressionVisitor): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self):
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_SimpleExpressionVisitor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 970, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 970, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 970, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_MutableParamVisitor, __pyx_n_s_MutableParamVisitor, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 970, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":972
+ * class _MutableParamVisitor(SimpleExpressionVisitor):
+ *
+ * def __init__(self): # <<<<<<<<<<<<<<
+ * self.seen = set()
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor_1__init__, 0, __pyx_n_s_MutableParamVisitor___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 972, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 972, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":975
+ * self.seen = set()
+ *
+ * def visit(self, node): # <<<<<<<<<<<<<<
+ * if node.__class__ in nonpyomo_leaf_types:
+ * return
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20_MutableParamVisitor_3visit, 0, __pyx_n_s_MutableParamVisitor_visit, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 975, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_visit, __pyx_t_5) < 0) __PYX_ERR(0, 975, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":970
+ * # =====================================================
+ *
+ * class _MutableParamVisitor(SimpleExpressionVisitor): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self):
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MutableParamVisitor, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 970, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MutableParamVisitor, __pyx_t_5) < 0) __PYX_ERR(0, 970, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":987
+ *
+ *
+ * def identify_mutable_parameters(expr): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields a sequence of mutable
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17identify_mutable_parameters, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 987, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_identify_mutable_parameters, __pyx_t_2) < 0) __PYX_ERR(0, 987, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1007
+ * # =====================================================
+ *
+ * class _PolyDegreeVisitor(ExpressionValueVisitor): # <<<<<<<<<<<<<<
+ *
+ * def visit(self, node, values):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionValueVisitor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1007, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1007, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_PolyDegreeVisitor, __pyx_n_s_PolyDegreeVisitor, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1007, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1009
+ * class _PolyDegreeVisitor(ExpressionValueVisitor):
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node._compute_polynomial_degree(values)
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_1visit, 0, __pyx_n_s_PolyDegreeVisitor_visit, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1009, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_visit, __pyx_t_5) < 0) __PYX_ERR(0, 1009, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1013
+ * return node._compute_polynomial_degree(values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18_PolyDegreeVisitor_3visiting_potential_leaf, 0, __pyx_n_s_PolyDegreeVisitor_visiting_pote, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__143)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1013, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_visiting_potential_leaf, __pyx_t_5) < 0) __PYX_ERR(0, 1013, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1007
+ * # =====================================================
+ *
+ * class _PolyDegreeVisitor(ExpressionValueVisitor): # <<<<<<<<<<<<<<
+ *
+ * def visit(self, node, values):
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PolyDegreeVisitor, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1007, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_PolyDegreeVisitor, __pyx_t_5) < 0) __PYX_ERR(0, 1007, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1028
+ *
+ *
+ * def _polynomial_degree(node): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20_polynomial_degree, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1028, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_polynomial_degree, __pyx_t_1) < 0) __PYX_ERR(0, 1028, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1047
+ * # =====================================================
+ *
+ * class _IsFixedVisitor(ExpressionValueVisitor): # <<<<<<<<<<<<<<
+ * """
+ * NOTE: This doesn't check if combiner logic is
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionValueVisitor); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1047, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1047, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_IsFixedVisitor, __pyx_n_s_IsFixedVisitor, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_NOTE_This_doesn_t_check_if_comb); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1047, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1054
+ * """
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * return node._is_fixed(values)
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_1visit, 0, __pyx_n_s_IsFixedVisitor_visit, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1054, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_visit, __pyx_t_5) < 0) __PYX_ERR(0, 1054, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1058
+ * return node._is_fixed(values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_15_IsFixedVisitor_3visiting_potential_leaf, 0, __pyx_n_s_IsFixedVisitor_visiting_potenti, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1058, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_visiting_potential_leaf, __pyx_t_5) < 0) __PYX_ERR(0, 1058, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1047
+ * # =====================================================
+ *
+ * class _IsFixedVisitor(ExpressionValueVisitor): # <<<<<<<<<<<<<<
+ * """
+ * NOTE: This doesn't check if combiner logic is
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_IsFixedVisitor, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1047, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_IsFixedVisitor, __pyx_t_5) < 0) __PYX_ERR(0, 1047, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1073
+ *
+ *
+ * def _expression_is_fixed(node): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22_expression_is_fixed, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1073, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_expression_is_fixed, __pyx_t_2) < 0) __PYX_ERR(0, 1073, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1092
+ * # =====================================================
+ *
+ * class _ToStringVisitor(ExpressionValueVisitor): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, verbose, smap, compute_values):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionValueVisitor); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ToStringVisitor, __pyx_n_s_ToStringVisitor, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1094
+ * class _ToStringVisitor(ExpressionValueVisitor):
+ *
+ * def __init__(self, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * super(_ToStringVisitor, self).__init__()
+ * self.verbose = verbose
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_1__init__, 0, __pyx_n_s_ToStringVisitor___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1094, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 1094, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1100
+ * self.compute_values = compute_values
+ *
+ * def visit(self, node, values): # <<<<<<<<<<<<<<
+ * """ Visit nodes that have been expanded """
+ * tmp = []
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_3visit, 0, __pyx_n_s_ToStringVisitor_visit, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1100, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_visit, __pyx_t_5) < 0) __PYX_ERR(0, 1100, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1121
+ * return node._to_string(tmp, self.verbose, self.smap, self.compute_values)
+ *
+ * def visiting_potential_leaf(self, node): # <<<<<<<<<<<<<<
+ * """
+ * Visiting a potential leaf.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16_ToStringVisitor_5visiting_potential_leaf, 0, __pyx_n_s_ToStringVisitor_visiting_potent, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1121, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_visiting_potential_leaf, __pyx_t_5) < 0) __PYX_ERR(0, 1121, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1092
+ * # =====================================================
+ *
+ * class _ToStringVisitor(ExpressionValueVisitor): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, verbose, smap, compute_values):
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ToStringVisitor, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1092, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ToStringVisitor, __pyx_t_5) < 0) __PYX_ERR(0, 1092, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1144
+ *
+ *
+ * def expression_to_string(expr, verbose=None, labeler=None, smap=None, compute_values=False, standardize=False): # <<<<<<<<<<<<<<
+ * """
+ * Return a string representation of an expression.
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_24expression_to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1144, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_expression_to_string, __pyx_t_1) < 0) __PYX_ERR(0, 1144, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1223
+ *
+ *
+ * class ExpressionBase(NumericValue): # <<<<<<<<<<<<<<
+ * """
+ * The base class for Pyomo expressions.
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NumericValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1223, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1223, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_ExpressionBase, __pyx_n_s_ExpressionBase, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_The_base_class_for_Pyomo_expres); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1223, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1234
+ * """
+ *
+ * __slots__ = ('_args_',) # <<<<<<<<<<<<<<
+ * PRECEDENCE = 0
+ *
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_tuple__160) < 0) __PYX_ERR(0, 1234, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1235
+ *
+ * __slots__ = ('_args_',)
+ * PRECEDENCE = 0 # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, args):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRECEDENCE, __pyx_int_0) < 0) __PYX_ERR(0, 1235, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1237
+ * PRECEDENCE = 0
+ *
+ * def __init__(self, args): # <<<<<<<<<<<<<<
+ * self._args_ = args
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_1__init__, 0, __pyx_n_s_ExpressionBase___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__162)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1237, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 1237, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1240
+ * self._args_ = args
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * """
+ * Returns the number of child nodes.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_3nargs, 0, __pyx_n_s_ExpressionBase_nargs, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1240, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nargs, __pyx_t_5) < 0) __PYX_ERR(0, 1240, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1258
+ * return 2
+ *
+ * def arg(self, i): # <<<<<<<<<<<<<<
+ * """
+ * Return the i-th child node.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_5arg, 0, __pyx_n_s_ExpressionBase_arg, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__166)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1258, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_arg, __pyx_t_5) < 0) __PYX_ERR(0, 1258, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1275
+ *
+ * @property
+ * def args(self): # <<<<<<<<<<<<<<
+ * """
+ * A generator that yields the child nodes.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_7args, 0, __pyx_n_s_ExpressionBase_args, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__168)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1275, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1274
+ * return self._args_[i]
+ *
+ * @property # <<<<<<<<<<<<<<
+ * def args(self):
+ * """
+ */
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 1274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1274, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_args, __pyx_t_5) < 0) __PYX_ERR(0, 1275, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1284
+ * return islice(self._args_, self.nargs())
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * """
+ * Pickle the expression object
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_9__getstate__, 0, __pyx_n_s_ExpressionBase___getstate, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__170)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1284, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getstate, __pyx_t_5) < 0) __PYX_ERR(0, 1284, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1296
+ * return state
+ *
+ * def __nonzero__(self): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Compute the value of the expression and convert it to
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_11__nonzero__, 0, __pyx_n_s_ExpressionBase___nonzero, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__172)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1296, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nonzero, __pyx_t_5) < 0) __PYX_ERR(0, 1296, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1306
+ * return bool(self())
+ *
+ * __bool__ = __nonzero__ # <<<<<<<<<<<<<<
+ *
+ * def __call__(self, exception=True):
+ */
+ __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_nonzero);
+ if (unlikely(!__pyx_t_5)) {
+ PyErr_Clear();
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonzero);
+ }
+ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1306, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_bool, __pyx_t_5) < 0) __PYX_ERR(0, 1306, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1308
+ * __bool__ = __nonzero__
+ *
+ * def __call__(self, exception=True): # <<<<<<<<<<<<<<
+ * """
+ * Evaluate the value of the expression tree.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_13__call__, 0, __pyx_n_s_ExpressionBase___call, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__174)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__175);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_call, __pyx_t_5) < 0) __PYX_ERR(0, 1308, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1323
+ * return evaluate_expression(self, exception)
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * """
+ * Returns a string description of the expression.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_15__str__, 0, __pyx_n_s_ExpressionBase___str, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__177)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1323, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_str, __pyx_t_5) < 0) __PYX_ERR(0, 1323, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1340
+ * return expression_to_string(self, standardize=True)
+ *
+ * def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False): # <<<<<<<<<<<<<<
+ * """
+ * Return a string representation of the expression tree.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_17to_string, 0, __pyx_n_s_ExpressionBase_to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__179)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__180);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string, __pyx_t_5) < 0) __PYX_ERR(0, 1340, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1362
+ * return expression_to_string(self, verbose=verbose, labeler=labeler, smap=smap, compute_values=compute_values)
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ExpressionBase.PRECEDENCE
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_19_precedence, 0, __pyx_n_s_ExpressionBase__precedence, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__182)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1362, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_precedence, __pyx_t_5) < 0) __PYX_ERR(0, 1362, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1365
+ * return ExpressionBase.PRECEDENCE
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Construct a string representation for this node, using the string
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_21_to_string, 0, __pyx_n_s_ExpressionBase__to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__184)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1365, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 1365, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1392
+ * pass
+ *
+ * def getname(self, *args, **kwds): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Return the text name of a function associated with this expression object.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_23getname, 0, __pyx_n_s_ExpressionBase_getname, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__186)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getname, __pyx_t_5) < 0) __PYX_ERR(0, 1392, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1408
+ * "implement getname()" % ( str(self.__class__), ))
+ *
+ * def clone(self, substitute=None): # <<<<<<<<<<<<<<
+ * """
+ * Return a clone of the expression tree.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_25clone, 0, __pyx_n_s_ExpressionBase_clone, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__188)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1408, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__189);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_clone, __pyx_t_5) < 0) __PYX_ERR(0, 1408, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1428
+ * return clone_expression(self, memo=substitute, clone_leaves=False)
+ *
+ * def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
+ * """
+ * Return a clone of the expression tree.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_27__deepcopy__, 0, __pyx_n_s_ExpressionBase___deepcopy, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__191)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1428, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_deepcopy_2, __pyx_t_5) < 0) __PYX_ERR(0, 1428, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1443
+ * return clone_expression(self, memo=memo, clone_leaves=True)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * """
+ * Construct a node using given arguments.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_29construct_node, 0, __pyx_n_s_ExpressionBase_construct_node, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__193)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1443, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_construct_node, __pyx_t_5) < 0) __PYX_ERR(0, 1443, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1473
+ * return self.__class__(args)
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * """Return True if this expression is an atomic constant
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_31is_constant, 0, __pyx_n_s_ExpressionBase_is_constant, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__195)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1473, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_constant, __pyx_t_5) < 0) __PYX_ERR(0, 1473, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1486
+ * return False
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this expression contains no free variables.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_33is_fixed, 0, __pyx_n_s_ExpressionBase_is_fixed, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__197)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_fixed, __pyx_t_5) < 0) __PYX_ERR(0, 1486, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1495
+ * return _expression_is_fixed(self)
+ *
+ * def _is_fixed(self, values): # <<<<<<<<<<<<<<
+ * """
+ * Compute whether this expression is fixed given
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_35_is_fixed, 0, __pyx_n_s_ExpressionBase__is_fixed, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__199)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1495, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_fixed_2, __pyx_t_5) < 0) __PYX_ERR(0, 1495, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1515
+ * return all(values)
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this expression contains variables.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_37is_potentially_variable, 0, __pyx_n_s_ExpressionBase_is_potentially_va, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__201)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1515, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 1515, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1529
+ * return True
+ *
+ * def is_named_expression_type(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this object is a named expression.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_39is_named_expression_type, 0, __pyx_n_s_ExpressionBase_is_named_expressi, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__203)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1529, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_named_expression_type, __pyx_t_5) < 0) __PYX_ERR(0, 1529, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1543
+ * return False
+ *
+ * def is_expression_type(self): # <<<<<<<<<<<<<<
+ * """
+ * Return :const:`True` if this object is an expression.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_41is_expression_type, 0, __pyx_n_s_ExpressionBase_is_expression_typ, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__205)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1543, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_expression_type, __pyx_t_5) < 0) __PYX_ERR(0, 1543, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1557
+ * return True
+ *
+ * def size(self): # <<<<<<<<<<<<<<
+ * """
+ * Return the number of nodes in the expression tree.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_43size, 0, __pyx_n_s_ExpressionBase_size, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__207)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1557, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_size, __pyx_t_5) < 0) __PYX_ERR(0, 1557, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1567
+ * return _sizeof_expression(self)
+ *
+ * def polynomial_degree(self): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_45polynomial_degree, 0, __pyx_n_s_ExpressionBase_polynomial_degree, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__209)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1567, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_polynomial_degree_2, __pyx_t_5) < 0) __PYX_ERR(0, 1567, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1578
+ * return _polynomial_degree(self)
+ *
+ * def _compute_polynomial_degree(self, values): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Compute the polynomial degree of this expression given
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_47_compute_polynomial_degree, 0, __pyx_n_s_ExpressionBase__compute_polynomi, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__211)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1578, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_compute_polynomial_degree, __pyx_t_5) < 0) __PYX_ERR(0, 1578, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1598
+ * return None
+ *
+ * def _apply_operation(self, result): #pragma: no cover # <<<<<<<<<<<<<<
+ * """
+ * Compute the values of this node given the values of its children.
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14ExpressionBase_49_apply_operation, 0, __pyx_n_s_ExpressionBase__apply_operation, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__213)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1598, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 1598, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1223
+ *
+ *
+ * class ExpressionBase(NumericValue): # <<<<<<<<<<<<<<
+ * """
+ * The base class for Pyomo expressions.
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_ExpressionBase, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1223, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ExpressionBase, __pyx_t_5) < 0) __PYX_ERR(0, 1223, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1630
+ *
+ *
+ * class NegationExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * Negation expressions::
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1630, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1630, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1630, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_NegationExpression, __pyx_n_s_NegationExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Negation_expressions_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1630, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1637
+ * """
+ *
+ * __slots__ = () # <<<<<<<<<<<<<<
+ *
+ * PRECEDENCE = 4
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 1637, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1639
+ * __slots__ = ()
+ *
+ * PRECEDENCE = 4 # <<<<<<<<<<<<<<
+ *
+ * def nargs(self):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRECEDENCE, __pyx_int_4) < 0) __PYX_ERR(0, 1639, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1641
+ * PRECEDENCE = 4
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 1
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_1nargs, 0, __pyx_n_s_NegationExpression_nargs, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__215)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1641, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nargs, __pyx_t_5) < 0) __PYX_ERR(0, 1641, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1644
+ * return 1
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'neg'
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_3getname, 0, __pyx_n_s_NegationExpression_getname, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__217)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1644, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getname, __pyx_t_5) < 0) __PYX_ERR(0, 1644, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1647
+ * return 'neg'
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * return result[0]
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_5_compute_polynomial_degree, 0, __pyx_n_s_NegationExpression__compute_poly, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__219)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1647, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_compute_polynomial_degree, __pyx_t_5) < 0) __PYX_ERR(0, 1647, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1650
+ * return result[0]
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return NegationExpression.PRECEDENCE
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_7_precedence, 0, __pyx_n_s_NegationExpression__precedence, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__221)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1650, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_precedence, __pyx_t_5) < 0) __PYX_ERR(0, 1650, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1653
+ * return NegationExpression.PRECEDENCE
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_9_to_string, 0, __pyx_n_s_NegationExpression__to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__223)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1653, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 1653, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1664
+ * return "- "+tmp
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return -result[0]
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18NegationExpression_11_apply_operation, 0, __pyx_n_s_NegationExpression__apply_operat, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__225)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1664, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 1664, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1630
+ *
+ *
+ * class NegationExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * Negation expressions::
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_NegationExpression, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1630, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NegationExpression, __pyx_t_5) < 0) __PYX_ERR(0, 1630, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1668
+ *
+ *
+ * class NPV_NegationExpression(NegationExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NegationExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NPV_NegationExpression, __pyx_n_s_NPV_NegationExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1669
+ *
+ * class NPV_NegationExpression(NegationExpression):
+ * __slots__ = () # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 1669, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1671
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_22NPV_NegationExpression_1is_potentially_variable, 0, __pyx_n_s_NPV_NegationExpression_is_potent, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__227)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1671, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 1671, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1668
+ *
+ *
+ * class NPV_NegationExpression(NegationExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NPV_NegationExpression, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NPV_NegationExpression, __pyx_t_5) < 0) __PYX_ERR(0, 1668, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1675
+ *
+ *
+ * class ExternalFunctionExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * External function expressions
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1675, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1675, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1675, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ExternalFunctionExpression, __pyx_n_s_ExternalFunctionExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_External_function_expressions_E); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1675, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1690
+ * fcn: a class that defines this external function
+ * """
+ * __slots__ = ('_fcn',) # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, args, fcn=None):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_tuple__228) < 0) __PYX_ERR(0, 1690, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1692
+ * __slots__ = ('_fcn',)
+ *
+ * def __init__(self, args, fcn=None): # <<<<<<<<<<<<<<
+ * self._args_ = args
+ * self._fcn = fcn
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_1__init__, 0, __pyx_n_s_ExternalFunctionExpression___ini, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__230)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1692, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__231);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 1692, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1696
+ * self._fcn = fcn
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return len(self._args_)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_3nargs, 0, __pyx_n_s_ExternalFunctionExpression_nargs, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__233)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nargs, __pyx_t_5) < 0) __PYX_ERR(0, 1696, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1699
+ * return len(self._args_)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._fcn)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_5construct_node, 0, __pyx_n_s_ExternalFunctionExpression_const, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__235)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1699, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_construct_node, __pyx_t_5) < 0) __PYX_ERR(0, 1699, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1702
+ * return self.__class__(args, self._fcn)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(ExternalFunctionExpression, self).__getstate__()
+ * for i in ExternalFunctionExpression.__slots__:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_7__getstate__, 0, __pyx_n_s_ExternalFunctionExpression___get, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__237)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1702, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getstate, __pyx_t_5) < 0) __PYX_ERR(0, 1702, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1708
+ * return state
+ *
+ * def getname(self, *args, **kwds): #pragma: no cover # <<<<<<<<<<<<<<
+ * return self._fcn.getname(*args, **kwds)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_9getname, 0, __pyx_n_s_ExternalFunctionExpression_getna, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__239)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1708, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getname, __pyx_t_5) < 0) __PYX_ERR(0, 1708, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1711
+ * return self._fcn.getname(*args, **kwds)
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # If the expression is constant, then
+ * # this is detected earlier. Hence, we can safely
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_11_compute_polynomial_degree, 0, __pyx_n_s_ExternalFunctionExpression__comp, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__241)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1711, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_compute_polynomial_degree, __pyx_t_5) < 0) __PYX_ERR(0, 1711, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1717
+ * return None
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return self._fcn.evaluate( result ) #pragma: no cover
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_13_apply_operation, 0, __pyx_n_s_ExternalFunctionExpression__appl, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__243)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1717, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 1717, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1720
+ * return self._fcn.evaluate( result ) #pragma: no cover
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return "{0}({1})".format(self.getname(), ", ".join(values))
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26ExternalFunctionExpression_15_to_string, 0, __pyx_n_s_ExternalFunctionExpression__to_s, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__245)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1720, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 1720, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1675
+ *
+ *
+ * class ExternalFunctionExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * External function expressions
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ExternalFunctionExpression, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1675, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ExternalFunctionExpression, __pyx_t_5) < 0) __PYX_ERR(0, 1675, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1724
+ *
+ *
+ * class NPV_ExternalFunctionExpression(ExternalFunctionExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExternalFunctionExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1724, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1724, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1724, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NPV_ExternalFunctionExpression, __pyx_n_s_NPV_ExternalFunctionExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1724, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1725
+ *
+ * class NPV_ExternalFunctionExpression(ExternalFunctionExpression):
+ * __slots__ = () # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 1725, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1727
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_30NPV_ExternalFunctionExpression_1is_potentially_variable, 0, __pyx_n_s_NPV_ExternalFunctionExpression_i, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__247)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1727, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 1727, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1724
+ *
+ *
+ * class NPV_ExternalFunctionExpression(ExternalFunctionExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NPV_ExternalFunctionExpression, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1724, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NPV_ExternalFunctionExpression, __pyx_t_5) < 0) __PYX_ERR(0, 1724, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1731
+ *
+ *
+ * class PowExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * Power expressions::
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1731, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1731, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1731, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_PowExpression, __pyx_n_s_PowExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Power_expressions_x_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1731, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1738
+ * """
+ *
+ * __slots__ = () # <<<<<<<<<<<<<<
+ * PRECEDENCE = 2
+ *
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 1738, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1739
+ *
+ * __slots__ = ()
+ * PRECEDENCE = 2 # <<<<<<<<<<<<<<
+ *
+ * def _compute_polynomial_degree(self, result):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRECEDENCE, __pyx_int_2) < 0) __PYX_ERR(0, 1739, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1741
+ * PRECEDENCE = 2
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # PowExpression is a tricky thing. In general, a**b is
+ * # nonpolynomial, however, if b == 0, it is a constant
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_1_compute_polynomial_degree, 0, __pyx_n_s_PowExpression__compute_polynomia, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__249)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1741, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_compute_polynomial_degree, __pyx_t_5) < 0) __PYX_ERR(0, 1741, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1765
+ * return None
+ *
+ * def _is_fixed(self, args): # <<<<<<<<<<<<<<
+ * assert(len(args) == 2)
+ * if not args[1]:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_3_is_fixed, 0, __pyx_n_s_PowExpression__is_fixed, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__251)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1765, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_fixed_2, __pyx_t_5) < 0) __PYX_ERR(0, 1765, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1771
+ * return args[0] or isclose(value(self._args_[1]), 0)
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return PowExpression.PRECEDENCE
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_5_precedence, 0, __pyx_n_s_PowExpression__precedence, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__253)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1771, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_precedence, __pyx_t_5) < 0) __PYX_ERR(0, 1771, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1774
+ * return PowExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * return _l ** _r
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_7_apply_operation, 0, __pyx_n_s_PowExpression__apply_operation, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__255)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1774, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 1774, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1778
+ * return _l ** _r
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'pow'
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_9getname, 0, __pyx_n_s_PowExpression_getname, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__257)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1778, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getname, __pyx_t_5) < 0) __PYX_ERR(0, 1778, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1781
+ * return 'pow'
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13PowExpression_11_to_string, 0, __pyx_n_s_PowExpression__to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__259)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1781, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 1781, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1731
+ *
+ *
+ * class PowExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * Power expressions::
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_PowExpression, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1731, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_PowExpression, __pyx_t_5) < 0) __PYX_ERR(0, 1731, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1787
+ *
+ *
+ * class NPV_PowExpression(PowExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_PowExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1787, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1787, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1787, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NPV_PowExpression, __pyx_n_s_NPV_PowExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1787, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1788
+ *
+ * class NPV_PowExpression(PowExpression):
+ * __slots__ = () # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 1788, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1790
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17NPV_PowExpression_1is_potentially_variable, 0, __pyx_n_s_NPV_PowExpression_is_potentially, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__261)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1790, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 1790, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1787
+ *
+ *
+ * class NPV_PowExpression(PowExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NPV_PowExpression, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1787, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NPV_PowExpression, __pyx_t_5) < 0) __PYX_ERR(0, 1787, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1794
+ *
+ *
+ * class ProductExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * Product expressions::
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1794, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1794, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1794, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ProductExpression, __pyx_n_s_ProductExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Product_expressions_x_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1794, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1801
+ * """
+ *
+ * __slots__ = () # <<<<<<<<<<<<<<
+ * PRECEDENCE = 4
+ *
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 1801, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1802
+ *
+ * __slots__ = ()
+ * PRECEDENCE = 4 # <<<<<<<<<<<<<<
+ *
+ * def _precedence(self):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRECEDENCE, __pyx_int_4) < 0) __PYX_ERR(0, 1802, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1804
+ * PRECEDENCE = 4
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ProductExpression.PRECEDENCE
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_1_precedence, 0, __pyx_n_s_ProductExpression__precedence, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__263)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1804, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_precedence, __pyx_t_5) < 0) __PYX_ERR(0, 1804, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1807
+ * return ProductExpression.PRECEDENCE
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # NB: We can't use sum() here because None (non-polynomial)
+ * # overrides a numeric value (and sum() just ignores it - or
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_3_compute_polynomial_degree, 0, __pyx_n_s_ProductExpression__compute_polyn, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__265)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1807, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_compute_polynomial_degree, __pyx_t_5) < 0) __PYX_ERR(0, 1807, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1817
+ * return a + b
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'prod'
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_5getname, 0, __pyx_n_s_ProductExpression_getname, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__267)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1817, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getname, __pyx_t_5) < 0) __PYX_ERR(0, 1817, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1820
+ * return 'prod'
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * return _l * _r
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_7_apply_operation, 0, __pyx_n_s_ProductExpression__apply_operati, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__269)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1820, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 1820, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1824
+ * return _l * _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ProductExpression_9_to_string, 0, __pyx_n_s_ProductExpression__to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__271)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1824, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 1824, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1794
+ *
+ *
+ * class ProductExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * Product expressions::
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ProductExpression, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1794, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ProductExpression, __pyx_t_5) < 0) __PYX_ERR(0, 1794, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1834
+ *
+ *
+ * class NPV_ProductExpression(ProductExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ProductExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1834, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1834, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1834, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NPV_ProductExpression, __pyx_n_s_NPV_ProductExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1834, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1835
+ *
+ * class NPV_ProductExpression(ProductExpression):
+ * __slots__ = () # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 1835, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1837
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_21NPV_ProductExpression_1is_potentially_variable, 0, __pyx_n_s_NPV_ProductExpression_is_potenti, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__273)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1837, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 1837, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1834
+ *
+ *
+ * class NPV_ProductExpression(ProductExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NPV_ProductExpression, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1834, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NPV_ProductExpression, __pyx_t_5) < 0) __PYX_ERR(0, 1834, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1841
+ *
+ *
+ * class ReciprocalExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * Reciprocal expressions::
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1841, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1841, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1841, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ReciprocalExpression, __pyx_n_s_ReciprocalExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Reciprocal_expressions_1_x); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1841, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1847
+ * 1/x
+ * """
+ * __slots__ = () # <<<<<<<<<<<<<<
+ * PRECEDENCE = 3.5
+ *
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 1847, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1848
+ * """
+ * __slots__ = ()
+ * PRECEDENCE = 3.5 # <<<<<<<<<<<<<<
+ *
+ * def nargs(self):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRECEDENCE, __pyx_float_3_5) < 0) __PYX_ERR(0, 1848, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1850
+ * PRECEDENCE = 3.5
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 1
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_1nargs, 0, __pyx_n_s_ReciprocalExpression_nargs, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__275)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1850, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nargs, __pyx_t_5) < 0) __PYX_ERR(0, 1850, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1853
+ * return 1
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ReciprocalExpression.PRECEDENCE
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_3_precedence, 0, __pyx_n_s_ReciprocalExpression__precedence, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__277)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1853, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_precedence, __pyx_t_5) < 0) __PYX_ERR(0, 1853, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1856
+ * return ReciprocalExpression.PRECEDENCE
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * if result[0] is 0:
+ * return 0
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_5_compute_polynomial_degree, 0, __pyx_n_s_ReciprocalExpression__compute_po, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__279)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1856, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_compute_polynomial_degree, __pyx_t_5) < 0) __PYX_ERR(0, 1856, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1861
+ * return None
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'recip'
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_7getname, 0, __pyx_n_s_ReciprocalExpression_getname, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__281)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1861, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getname, __pyx_t_5) < 0) __PYX_ERR(0, 1861, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1864
+ * return 'recip'
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_9_to_string, 0, __pyx_n_s_ReciprocalExpression__to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__283)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1864, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 1864, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1869
+ * return "(1/{0})".format(values[0])
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return 1 / result[0]
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20ReciprocalExpression_11_apply_operation, 0, __pyx_n_s_ReciprocalExpression__apply_oper, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__285)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1869, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 1869, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1841
+ *
+ *
+ * class ReciprocalExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * Reciprocal expressions::
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ReciprocalExpression, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1841, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ReciprocalExpression, __pyx_t_5) < 0) __PYX_ERR(0, 1841, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1873
+ *
+ *
+ * class NPV_ReciprocalExpression(ReciprocalExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ReciprocalExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1873, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1873, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1873, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NPV_ReciprocalExpression, __pyx_n_s_NPV_ReciprocalExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1873, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1874
+ *
+ * class NPV_ReciprocalExpression(ReciprocalExpression):
+ * __slots__ = () # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 1874, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1876
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_24NPV_ReciprocalExpression_1is_potentially_variable, 0, __pyx_n_s_NPV_ReciprocalExpression_is_pote, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__287)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1876, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 1876, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1873
+ *
+ *
+ * class NPV_ReciprocalExpression(ReciprocalExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NPV_ReciprocalExpression, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1873, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NPV_ReciprocalExpression, __pyx_t_5) < 0) __PYX_ERR(0, 1873, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1880
+ *
+ *
+ * class _LinearOperatorExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * An 'abstract' class that defines the polynomial degree for a simple
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1880, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1880, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1880, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_LinearOperatorExpression, __pyx_n_s_LinearOperatorExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_An_abstract_class_that_defines); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1880, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1886
+ * """
+ *
+ * __slots__ = () # <<<<<<<<<<<<<<
+ *
+ * def _compute_polynomial_degree(self, result):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 1886, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1888
+ * __slots__ = ()
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * # NB: We can't use max() here because None (non-polynomial)
+ * # overrides a numeric value (and max() just ignores it)
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_25_LinearOperatorExpression_1_compute_polynomial_degree, 0, __pyx_n_s_LinearOperatorExpression__compu, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__289)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1888, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_compute_polynomial_degree, __pyx_t_5) < 0) __PYX_ERR(0, 1888, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1880
+ *
+ *
+ * class _LinearOperatorExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * An 'abstract' class that defines the polynomial degree for a simple
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_LinearOperatorExpression, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1880, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearOperatorExpression, __pyx_t_5) < 0) __PYX_ERR(0, 1880, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1900
+ *
+ *
+ * class RangedExpression(_LinearOperatorExpression): # <<<<<<<<<<<<<<
+ * """
+ * Ranged expressions, which define relations with a lower and upper bound::
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearOperatorExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1900, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1900, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1900, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_RangedExpression, __pyx_n_s_RangedExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Ranged_expressions_which_define); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1900, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1912
+ * """
+ *
+ * __slots__ = ('_strict',) # <<<<<<<<<<<<<<
+ * PRECEDENCE = 9
+ *
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_tuple__290) < 0) __PYX_ERR(0, 1912, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1913
+ *
+ * __slots__ = ('_strict',)
+ * PRECEDENCE = 9 # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, args, strict):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRECEDENCE, __pyx_int_9) < 0) __PYX_ERR(0, 1913, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1915
+ * PRECEDENCE = 9
+ *
+ * def __init__(self, args, strict): # <<<<<<<<<<<<<<
+ * super(RangedExpression,self).__init__(args)
+ * self._strict = strict
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_1__init__, 0, __pyx_n_s_RangedExpression___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__292)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 1915, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1919
+ * self._strict = strict
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 3
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_3nargs, 0, __pyx_n_s_RangedExpression_nargs, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__294)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1919, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nargs, __pyx_t_5) < 0) __PYX_ERR(0, 1919, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1922
+ * return 3
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._strict)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_5construct_node, 0, __pyx_n_s_RangedExpression_construct_node, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__296)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1922, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_construct_node, __pyx_t_5) < 0) __PYX_ERR(0, 1922, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1925
+ * return self.__class__(args, self._strict)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(RangedExpression, self).__getstate__()
+ * for i in RangedExpression.__slots__:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_7__getstate__, 0, __pyx_n_s_RangedExpression___getstate, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__298)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1925, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getstate, __pyx_t_5) < 0) __PYX_ERR(0, 1925, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1931
+ * return state
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * return bool(self())
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_9__nonzero__, 0, __pyx_n_s_RangedExpression___nonzero, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__300)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1931, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nonzero, __pyx_t_5) < 0) __PYX_ERR(0, 1931, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1934
+ * return bool(self())
+ *
+ * __bool__ = __nonzero__ # <<<<<<<<<<<<<<
+ *
+ * def is_relational(self):
+ */
+ __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_nonzero);
+ if (unlikely(!__pyx_t_5)) {
+ PyErr_Clear();
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonzero);
+ }
+ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1934, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_bool, __pyx_t_5) < 0) __PYX_ERR(0, 1934, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1936
+ * __bool__ = __nonzero__
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_11is_relational, 0, __pyx_n_s_RangedExpression_is_relational, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__302)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1936, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_relational, __pyx_t_5) < 0) __PYX_ERR(0, 1936, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1939
+ * return True
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return RangedExpression.PRECEDENCE
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_13_precedence, 0, __pyx_n_s_RangedExpression__precedence, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__304)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1939, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_precedence, __pyx_t_5) < 0) __PYX_ERR(0, 1939, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1942
+ * return RangedExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _b, _r = result
+ * if not self._strict[0]:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_15_apply_operation, 0, __pyx_n_s_RangedExpression__apply_operatio, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__306)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1942, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 1942, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1954
+ * return _l < _b and _b < _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return "{0} {1} {2} {3} {4}".format(values[0], '<' if self._strict[0] else '<=', values[1], '<' if self._strict[1] else '<=', values[2])
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_17_to_string, 0, __pyx_n_s_RangedExpression__to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__308)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1954, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 1954, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1957
+ * return "{0} {1} {2} {3} {4}".format(values[0], '<' if self._strict[0] else '<=', values[1], '<' if self._strict[1] else '<=', values[2])
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant()) and \
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_19is_constant, 0, __pyx_n_s_RangedExpression_is_constant, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__310)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1957, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_constant, __pyx_t_5) < 0) __PYX_ERR(0, 1957, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1962
+ * (self._args_[2].__class__ in native_numeric_types or self._args_[2].is_constant())
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return (self._args_[1].__class__ not in native_numeric_types and \
+ * self._args_[1].is_potentially_variable()) or \
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16RangedExpression_21is_potentially_variable, 0, __pyx_n_s_RangedExpression_is_potentially, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__312)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1962, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 1962, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1900
+ *
+ *
+ * class RangedExpression(_LinearOperatorExpression): # <<<<<<<<<<<<<<
+ * """
+ * Ranged expressions, which define relations with a lower and upper bound::
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_RangedExpression, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1900, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_RangedExpression, __pyx_t_5) < 0) __PYX_ERR(0, 1900, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1971
+ *
+ *
+ * class InequalityExpression(_LinearOperatorExpression): # <<<<<<<<<<<<<<
+ * """
+ * Inequality expressions, which define less-than or
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearOperatorExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1971, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1971, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1971, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_InequalityExpression, __pyx_n_s_InequalityExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Inequality_expressions_which_de); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 1971, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1984
+ * """
+ *
+ * __slots__ = ('_strict',) # <<<<<<<<<<<<<<
+ * PRECEDENCE = 9
+ *
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_tuple__313) < 0) __PYX_ERR(0, 1984, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1985
+ *
+ * __slots__ = ('_strict',)
+ * PRECEDENCE = 9 # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, args, strict):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRECEDENCE, __pyx_int_9) < 0) __PYX_ERR(0, 1985, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1987
+ * PRECEDENCE = 9
+ *
+ * def __init__(self, args, strict): # <<<<<<<<<<<<<<
+ * super(InequalityExpression,self).__init__(args)
+ * self._strict = strict
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_1__init__, 0, __pyx_n_s_InequalityExpression___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__315)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1987, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 1987, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1991
+ * self._strict = strict
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 2
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_3nargs, 0, __pyx_n_s_InequalityExpression_nargs, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__317)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1991, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nargs, __pyx_t_5) < 0) __PYX_ERR(0, 1991, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1994
+ * return 2
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._strict)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_5construct_node, 0, __pyx_n_s_InequalityExpression_construct_n, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__319)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1994, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_construct_node, __pyx_t_5) < 0) __PYX_ERR(0, 1994, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1997
+ * return self.__class__(args, self._strict)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(InequalityExpression, self).__getstate__()
+ * for i in InequalityExpression.__slots__:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_7__getstate__, 0, __pyx_n_s_InequalityExpression___getstate, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__321)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1997, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getstate, __pyx_t_5) < 0) __PYX_ERR(0, 1997, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2003
+ * return state
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * if _using_chained_inequality and not self.is_constant(): #pragma: no cover
+ * deprecation_warning("Chained inequalities are deprecated. Use the inequality() function to express ranged inequality expressions.") # Remove in Pyomo 6.0
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_9__nonzero__, 0, __pyx_n_s_InequalityExpression___nonzero, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__323)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2003, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nonzero, __pyx_t_5) < 0) __PYX_ERR(0, 2003, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2013
+ * return bool(self())
+ *
+ * __bool__ = __nonzero__ # <<<<<<<<<<<<<<
+ *
+ * def is_relational(self):
+ */
+ __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_nonzero);
+ if (unlikely(!__pyx_t_5)) {
+ PyErr_Clear();
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonzero);
+ }
+ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2013, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_bool, __pyx_t_5) < 0) __PYX_ERR(0, 2013, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2015
+ * __bool__ = __nonzero__
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_11is_relational, 0, __pyx_n_s_InequalityExpression_is_relation, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__325)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2015, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_relational, __pyx_t_5) < 0) __PYX_ERR(0, 2015, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2018
+ * return True
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return InequalityExpression.PRECEDENCE
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_13_precedence, 0, __pyx_n_s_InequalityExpression__precedence, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__327)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2018, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_precedence, __pyx_t_5) < 0) __PYX_ERR(0, 2018, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2021
+ * return InequalityExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * if self._strict:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_15_apply_operation, 0, __pyx_n_s_InequalityExpression__apply_oper, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__329)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2021, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 2021, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2027
+ * return _l <= _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if len(values) == 2:
+ * return "{0} {1} {2}".format(values[0], '<' if self._strict else '<=', values[1])
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_17_to_string, 0, __pyx_n_s_InequalityExpression__to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__331)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2027, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 2027, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2031
+ * return "{0} {1} {2}".format(values[0], '<' if self._strict else '<=', values[1])
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant())
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_19is_constant, 0, __pyx_n_s_InequalityExpression_is_constant, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__333)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2031, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_constant, __pyx_t_5) < 0) __PYX_ERR(0, 2031, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2035
+ * (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant())
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return (self._args_[0].__class__ not in native_numeric_types and \
+ * self._args_[0].is_potentially_variable()) or \
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_20InequalityExpression_21is_potentially_variable, 0, __pyx_n_s_InequalityExpression_is_potentia, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__335)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2035, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 2035, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1971
+ *
+ *
+ * class InequalityExpression(_LinearOperatorExpression): # <<<<<<<<<<<<<<
+ * """
+ * Inequality expressions, which define less-than or
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_InequalityExpression, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 1971, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_InequalityExpression, __pyx_t_5) < 0) __PYX_ERR(0, 1971, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2042
+ *
+ *
+ * def inequality(lower=None, body=None, upper=None, strict=False): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that can be used to declare inequality and
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_26inequality, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2042, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_inequality, __pyx_t_1) < 0) __PYX_ERR(0, 2042, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2096
+ *
+ *
+ * class EqualityExpression(_LinearOperatorExpression): # <<<<<<<<<<<<<<
+ * """
+ * Equality expression::
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearOperatorExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2096, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2096, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2096, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_EqualityExpression, __pyx_n_s_EqualityExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Equality_expression_x_y); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2096, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2103
+ * """
+ *
+ * __slots__ = () # <<<<<<<<<<<<<<
+ * PRECEDENCE = 9
+ *
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 2103, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2104
+ *
+ * __slots__ = ()
+ * PRECEDENCE = 9 # <<<<<<<<<<<<<<
+ *
+ * def nargs(self):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRECEDENCE, __pyx_int_9) < 0) __PYX_ERR(0, 2104, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2106
+ * PRECEDENCE = 9
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 2
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_1nargs, 0, __pyx_n_s_EqualityExpression_nargs, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__339)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2106, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nargs, __pyx_t_5) < 0) __PYX_ERR(0, 2106, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2109
+ * return 2
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * return bool(self())
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_3__nonzero__, 0, __pyx_n_s_EqualityExpression___nonzero, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__341)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2109, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nonzero, __pyx_t_5) < 0) __PYX_ERR(0, 2109, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2112
+ * return bool(self())
+ *
+ * __bool__ = __nonzero__ # <<<<<<<<<<<<<<
+ *
+ * def is_relational(self):
+ */
+ __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_n_s_nonzero);
+ if (unlikely(!__pyx_t_5)) {
+ PyErr_Clear();
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonzero);
+ }
+ if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_bool, __pyx_t_5) < 0) __PYX_ERR(0, 2112, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2114
+ * __bool__ = __nonzero__
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_5is_relational, 0, __pyx_n_s_EqualityExpression_is_relational, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__343)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_relational, __pyx_t_5) < 0) __PYX_ERR(0, 2114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2117
+ * return True
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return EqualityExpression.PRECEDENCE
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_7_precedence, 0, __pyx_n_s_EqualityExpression__precedence, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__345)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2117, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_precedence, __pyx_t_5) < 0) __PYX_ERR(0, 2117, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2120
+ * return EqualityExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _l, _r = result
+ * return _l == _r
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_9_apply_operation, 0, __pyx_n_s_EqualityExpression__apply_operat, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__347)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2120, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 2120, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2124
+ * return _l == _r
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return "{0} == {1}".format(values[0], values[1])
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_11_to_string, 0, __pyx_n_s_EqualityExpression__to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__349)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2124, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 2124, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2127
+ * return "{0} == {1}".format(values[0], values[1])
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return self._args_[0].is_constant() and self._args_[1].is_constant()
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_13is_constant, 0, __pyx_n_s_EqualityExpression_is_constant, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__351)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_constant, __pyx_t_5) < 0) __PYX_ERR(0, 2127, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2130
+ * return self._args_[0].is_constant() and self._args_[1].is_constant()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return self._args_[0].is_potentially_variable() or self._args_[1].is_potentially_variable()
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_18EqualityExpression_15is_potentially_variable, 0, __pyx_n_s_EqualityExpression_is_potentiall, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__353)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 2130, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2096
+ *
+ *
+ * class EqualityExpression(_LinearOperatorExpression): # <<<<<<<<<<<<<<
+ * """
+ * Equality expression::
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_EqualityExpression, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2096, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_EqualityExpression, __pyx_t_5) < 0) __PYX_ERR(0, 2096, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2134
+ *
+ *
+ * class _SumExpression(_LinearOperatorExpression): # <<<<<<<<<<<<<<
+ * """
+ * An object that defines a simple summation of expressions
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearOperatorExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_SumExpression, __pyx_n_s_SumExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_An_object_that_defines_a_simple); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2139
+ * """
+ *
+ * __slots__ = () # <<<<<<<<<<<<<<
+ * PRECEDENCE = 6
+ *
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 2139, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2140
+ *
+ * __slots__ = ()
+ * PRECEDENCE = 6 # <<<<<<<<<<<<<<
+ *
+ * def _precedence(self):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRECEDENCE, __pyx_int_6) < 0) __PYX_ERR(0, 2140, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2142
+ * PRECEDENCE = 6
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return _SumExpression.PRECEDENCE
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_1_precedence, 0, __pyx_n_s_SumExpression__precedence, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__355)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2142, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_precedence, __pyx_t_5) < 0) __PYX_ERR(0, 2142, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2145
+ * return _SumExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * l_, r_ = result
+ * return l_ + r_
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_3_apply_operation, 0, __pyx_n_s_SumExpression__apply_operation, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__357)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2145, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 2145, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2149
+ * return l_ + r_
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_5_to_string, 0, __pyx_n_s_SumExpression__to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__359)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2149, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 2149, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2156
+ * return "{0} + {1}".format(values[0],values[1])
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'sum'
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_14_SumExpression_7getname, 0, __pyx_n_s_SumExpression_getname, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__361)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getname, __pyx_t_5) < 0) __PYX_ERR(0, 2156, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2134
+ *
+ *
+ * class _SumExpression(_LinearOperatorExpression): # <<<<<<<<<<<<<<
+ * """
+ * An object that defines a simple summation of expressions
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_SumExpression, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SumExpression, __pyx_t_5) < 0) __PYX_ERR(0, 2134, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2160
+ *
+ *
+ * class NPV_SumExpression(_SumExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_SumExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2160, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2160, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2160, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NPV_SumExpression, __pyx_n_s_NPV_SumExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2160, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2161
+ *
+ * class NPV_SumExpression(_SumExpression):
+ * __slots__ = () # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 2161, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2163
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17NPV_SumExpression_1is_potentially_variable, 0, __pyx_n_s_NPV_SumExpression_is_potentially, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__363)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2163, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 2163, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2160
+ *
+ *
+ * class NPV_SumExpression(_SumExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NPV_SumExpression, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2160, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NPV_SumExpression, __pyx_t_5) < 0) __PYX_ERR(0, 2160, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2167
+ *
+ *
+ * class ViewSumExpression(_SumExpression): # <<<<<<<<<<<<<<
+ * """
+ * Sum expression::
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_ViewSumExpression, __pyx_n_s_ViewSumExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Sum_expression_x_y_Args_args_li); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2176
+ * args (list): Children nodes
+ * """
+ * __slots__ = ('_nargs','_shared_args') # <<<<<<<<<<<<<<
+ * PRECEDENCE = 6
+ *
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_tuple__364) < 0) __PYX_ERR(0, 2176, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2177
+ * """
+ * __slots__ = ('_nargs','_shared_args')
+ * PRECEDENCE = 6 # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, args):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRECEDENCE, __pyx_int_6) < 0) __PYX_ERR(0, 2177, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2179
+ * PRECEDENCE = 6
+ *
+ * def __init__(self, args): # <<<<<<<<<<<<<<
+ * self._args_ = args
+ * self._shared_args = False
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_1__init__, 0, __pyx_n_s_ViewSumExpression___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__366)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 2179, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2184
+ * self._nargs = len(self._args_)
+ *
+ * def add(self, new_arg): # <<<<<<<<<<<<<<
+ * if new_arg.__class__ in native_numeric_types and isclose(new_arg,0):
+ * return self
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_3add, 0, __pyx_n_s_ViewSumExpression_add, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__368)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2184, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_add, __pyx_t_5) < 0) __PYX_ERR(0, 2184, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2198
+ * return self
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return self._nargs
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_5nargs, 0, __pyx_n_s_ViewSumExpression_nargs, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__370)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2198, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nargs, __pyx_t_5) < 0) __PYX_ERR(0, 2198, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2201
+ * return self._nargs
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return ViewSumExpression.PRECEDENCE
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_7_precedence, 0, __pyx_n_s_ViewSumExpression__precedence, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__372)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2201, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_precedence, __pyx_t_5) < 0) __PYX_ERR(0, 2201, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2204
+ * return ViewSumExpression.PRECEDENCE
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return sum(result)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_9_apply_operation, 0, __pyx_n_s_ViewSumExpression__apply_operati, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__374)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 2204, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2207
+ * return sum(result)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(list(args))
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_11construct_node, 0, __pyx_n_s_ViewSumExpression_construct_node, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__376)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2207, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_construct_node, __pyx_t_5) < 0) __PYX_ERR(0, 2207, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2210
+ * return self.__class__(list(args))
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(ViewSumExpression, self).__getstate__()
+ * for i in ViewSumExpression.__slots__:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_13__getstate__, 0, __pyx_n_s_ViewSumExpression___getstate, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__378)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getstate, __pyx_t_5) < 0) __PYX_ERR(0, 2210, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2216
+ * return state
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * #
+ * # In most normal contexts, a ViewSumExpression is non-constant. When
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_15is_constant, 0, __pyx_n_s_ViewSumExpression_is_constant, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__380)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_constant, __pyx_t_5) < 0) __PYX_ERR(0, 2216, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2225
+ * return False
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * for v in islice(self._args_, self._nargs):
+ * if v.__class__ in nonpyomo_leaf_types:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_17is_potentially_variable, 0, __pyx_n_s_ViewSumExpression_is_potentially, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__382)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2225, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 2225, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2233
+ * return False
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * tmp = [values[0]]
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17ViewSumExpression_19_to_string, 0, __pyx_n_s_ViewSumExpression__to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__384)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2233, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 2233, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2167
+ *
+ *
+ * class ViewSumExpression(_SumExpression): # <<<<<<<<<<<<<<
+ * """
+ * Sum expression::
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_ViewSumExpression, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ViewSumExpression, __pyx_t_5) < 0) __PYX_ERR(0, 2167, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2255
+ *
+ *
+ * class _MutableViewSumExpression(ViewSumExpression): # <<<<<<<<<<<<<<
+ * """
+ * A mutable ViewSumExpression
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2255, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2255, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2255, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_MutableViewSumExpression, __pyx_n_s_MutableViewSumExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_A_mutable_ViewSumExpression_The); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2255, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2264
+ * """
+ *
+ * __slots__ = () # <<<<<<<<<<<<<<
+ *
+ * def add(self, new_arg):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 2264, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2266
+ * __slots__ = ()
+ *
+ * def add(self, new_arg): # <<<<<<<<<<<<<<
+ * if new_arg.__class__ in native_numeric_types and isclose(new_arg,0):
+ * return self
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_25_MutableViewSumExpression_1add, 0, __pyx_n_s_MutableViewSumExpression_add, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__386)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2266, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_add, __pyx_t_5) < 0) __PYX_ERR(0, 2266, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2255
+ *
+ *
+ * class _MutableViewSumExpression(ViewSumExpression): # <<<<<<<<<<<<<<
+ * """
+ * A mutable ViewSumExpression
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MutableViewSumExpression, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2255, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MutableViewSumExpression, __pyx_t_5) < 0) __PYX_ERR(0, 2255, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2281
+ *
+ *
+ * class GetItemExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * Expression to call :func:`__getitem__` on the base object.
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2281, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2281, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2281, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_GetItemExpression, __pyx_n_s_GetItemExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_Expression_to_call_func___getit); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2281, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2285
+ * Expression to call :func:`__getitem__` on the base object.
+ * """
+ * __slots__ = ('_base',) # <<<<<<<<<<<<<<
+ * PRECEDENCE = 1
+ *
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_tuple__387) < 0) __PYX_ERR(0, 2285, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2286
+ * """
+ * __slots__ = ('_base',)
+ * PRECEDENCE = 1 # <<<<<<<<<<<<<<
+ *
+ * def _precedence(self): #pragma: no cover
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRECEDENCE, __pyx_int_1) < 0) __PYX_ERR(0, 2286, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2288
+ * PRECEDENCE = 1
+ *
+ * def _precedence(self): #pragma: no cover # <<<<<<<<<<<<<<
+ * return GetItemExpression.PRECEDENCE
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_1_precedence, 0, __pyx_n_s_GetItemExpression__precedence, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__389)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2288, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_precedence, __pyx_t_5) < 0) __PYX_ERR(0, 2288, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2291
+ * return GetItemExpression.PRECEDENCE
+ *
+ * def __init__(self, args, base=None): # <<<<<<<<<<<<<<
+ * """Construct an expression with an operation and a set of arguments"""
+ * self._args_ = args
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_3__init__, 0, __pyx_n_s_GetItemExpression___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__391)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__392);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 2291, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2296
+ * self._base = base
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return len(self._args_)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_5nargs, 0, __pyx_n_s_GetItemExpression_nargs, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__394)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2296, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nargs, __pyx_t_5) < 0) __PYX_ERR(0, 2296, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2299
+ * return len(self._args_)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._base)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_7construct_node, 0, __pyx_n_s_GetItemExpression_construct_node, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__396)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2299, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_construct_node, __pyx_t_5) < 0) __PYX_ERR(0, 2299, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2302
+ * return self.__class__(args, self._base)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(GetItemExpression, self).__getstate__()
+ * for i in GetItemExpression.__slots__:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_9__getstate__, 0, __pyx_n_s_GetItemExpression___getstate, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__398)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2302, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getstate, __pyx_t_5) < 0) __PYX_ERR(0, 2302, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2308
+ * return state
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return self._base.getname(*args, **kwds)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_11getname, 0, __pyx_n_s_GetItemExpression_getname, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__400)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getname, __pyx_t_5) < 0) __PYX_ERR(0, 2308, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2311
+ * return self._base.getname(*args, **kwds)
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * if any(arg.is_potentially_variable() for arg in self._args_ if not arg.__class__ in nonpyomo_leaf_types):
+ * for x in itervalues(self._base):
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_13is_potentially_variable, 0, __pyx_n_s_GetItemExpression_is_potentially_2, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__402)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2311, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 2311, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2318
+ * return False
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * if any(self._args_):
+ * for x in itervalues(self._base):
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_15is_fixed, 0, __pyx_n_s_GetItemExpression_is_fixed, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__404)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2318, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_fixed, __pyx_t_5) < 0) __PYX_ERR(0, 2318, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2325
+ * return True
+ *
+ * def _is_fixed(self, values): # <<<<<<<<<<<<<<
+ * from pyomo.core.base import Var # TODO
+ * from pyomo.core.kernel.component_variable import IVariable # TODO
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_17_is_fixed, 0, __pyx_n_s_GetItemExpression__is_fixed, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__406)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2325, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_fixed_2, __pyx_t_5) < 0) __PYX_ERR(0, 2325, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2334
+ * return True
+ *
+ * def _compute_polynomial_degree(self, result): # TODO: coverage # <<<<<<<<<<<<<<
+ * if any(x != 0 for x in result):
+ * return None
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_19_compute_polynomial_degree, 0, __pyx_n_s_GetItemExpression__compute_polyn_2, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__408)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2334, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_compute_polynomial_degree, __pyx_t_5) < 0) __PYX_ERR(0, 2334, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2348
+ * return ans
+ *
+ * def _apply_operation(self, result): # TODO: coverage # <<<<<<<<<<<<<<
+ * return value(self._base.__getitem__( tuple(result) ))
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_21_apply_operation, 0, __pyx_n_s_GetItemExpression__apply_operati, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__410)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2348, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 2348, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2351
+ * return value(self._base.__getitem__( tuple(result) ))
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_23_to_string, 0, __pyx_n_s_GetItemExpression__to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__412)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2351, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 2351, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2356
+ * return "%s%s" % (self.getname(), values[0])
+ *
+ * def resolve_template(self): # TODO: coverage # <<<<<<<<<<<<<<
+ * return self._base.__getitem__(tuple(value(i) for i in self._args_))
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17GetItemExpression_25resolve_template, 0, __pyx_n_s_GetItemExpression_resolve_templa_2, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__414)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2356, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_resolve_template, __pyx_t_5) < 0) __PYX_ERR(0, 2356, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2281
+ *
+ *
+ * class GetItemExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * Expression to call :func:`__getitem__` on the base object.
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_GetItemExpression, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2281, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_GetItemExpression, __pyx_t_5) < 0) __PYX_ERR(0, 2281, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2360
+ *
+ *
+ * class Expr_if(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * A logical if-then-else expression::
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionBase); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_Expr_if, __pyx_n_s_Expr_if, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_A_logical_if_then_else_expressi); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2371
+ * ELSE_ (expression): An expression that is used if :attr:`IF_` is false.
+ * """
+ * __slots__ = ('_if','_then','_else') # <<<<<<<<<<<<<<
+ *
+ * # **NOTE**: This class evaluates the branching "_if" expression
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_tuple__415) < 0) __PYX_ERR(0, 2371, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2377
+ * # one uses __call__ for value() and NOT bool().
+ *
+ * def __init__(self, IF_=None, THEN_=None, ELSE_=None): # <<<<<<<<<<<<<<
+ * if type(IF_) is tuple and THEN_==None and ELSE_==None:
+ * IF_, THEN_, ELSE_ = IF_
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_1__init__, 0, __pyx_n_s_Expr_if___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__417)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2377, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__418);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 2377, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2387
+ * self._if = as_numeric(self._if)
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 3
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_3nargs, 0, __pyx_n_s_Expr_if_nargs, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__420)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2387, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nargs, __pyx_t_5) < 0) __PYX_ERR(0, 2387, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2390
+ * return 3
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(Expr_if, self).__getstate__()
+ * for i in Expr_if.__slots__:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_5__getstate__, 0, __pyx_n_s_Expr_if___getstate, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__422)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2390, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getstate, __pyx_t_5) < 0) __PYX_ERR(0, 2390, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2396
+ * return state
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return "Expr_if"
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_7getname, 0, __pyx_n_s_Expr_if_getname, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__424)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2396, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getname, __pyx_t_5) < 0) __PYX_ERR(0, 2396, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2399
+ * return "Expr_if"
+ *
+ * def _is_fixed(self, args): # <<<<<<<<<<<<<<
+ * assert(len(args) == 3)
+ * if args[0]: #self._if.is_constant():
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_9_is_fixed, 0, __pyx_n_s_Expr_if__is_fixed, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__426)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2399, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_fixed_2, __pyx_t_5) < 0) __PYX_ERR(0, 2399, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2409
+ * return False
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * if self._if.__class__ in native_numeric_types or self._if.is_constant():
+ * if value(self._if):
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_11is_constant, 0, __pyx_n_s_Expr_if_is_constant, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__428)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2409, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_constant, __pyx_t_5) < 0) __PYX_ERR(0, 2409, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2418
+ * return (self._then.__class__ in native_numeric_types or self._then.is_constant()) and (self._else.__class__ in native_numeric_types or self._else.is_constant())
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return (not self._if.__class__ in native_numeric_types and self._if.is_potentially_variable()) or (not self._then.__class__ in native_numeric_types and self._then.is_potentially_variable()) or (not self._else.__class__ in native_numeric_types and self._else.is_potentially_variable())
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_13is_potentially_variable, 0, __pyx_n_s_Expr_if_is_potentially_variable, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__430)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 2418, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2421
+ * return (not self._if.__class__ in native_numeric_types and self._if.is_potentially_variable()) or (not self._then.__class__ in native_numeric_types and self._then.is_potentially_variable()) or (not self._else.__class__ in native_numeric_types and self._else.is_potentially_variable())
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * _if, _then, _else = result
+ * if _if == 0:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_15_compute_polynomial_degree, 0, __pyx_n_s_Expr_if__compute_polynomial_degr, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__432)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2421, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_compute_polynomial_degree, __pyx_t_5) < 0) __PYX_ERR(0, 2421, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2430
+ * return None
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * return '{0}( ( {1} ), then=( {2} ), else=( {3} ) )'.format(self.getname(), self._if, self._then, self._else)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_17_to_string, 0, __pyx_n_s_Expr_if__to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__434)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2430, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 2430, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2433
+ * return '{0}( ( {1} ), then=( {2} ), else=( {3} ) )'.format(self.getname(), self._if, self._then, self._else)
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * _if, _then, _else = result
+ * return _then if _if else _else
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_7Expr_if_19_apply_operation, 0, __pyx_n_s_Expr_if__apply_operation, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__436)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2433, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 2433, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2360
+ *
+ *
+ * class Expr_if(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * A logical if-then-else expression::
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Expr_if, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2360, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Expr_if, __pyx_t_5) < 0) __PYX_ERR(0, 2360, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2438
+ *
+ *
+ * class UnaryFunctionExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * An expression object used to define intrinsic functions (e.g. sin, cos, tan).
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2438, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2438, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2438, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_UnaryFunctionExpression, __pyx_n_s_UnaryFunctionExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_An_expression_object_used_to_de); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2438, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2447
+ * fcn: The function that is used to evaluate this expression
+ * """
+ * __slots__ = ('_fcn', '_name') # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, args, name=None, fcn=None):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_tuple__437) < 0) __PYX_ERR(0, 2447, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2449
+ * __slots__ = ('_fcn', '_name')
+ *
+ * def __init__(self, args, name=None, fcn=None): # <<<<<<<<<<<<<<
+ * if not type(args) is tuple:
+ * args = (args,)
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_1__init__, 0, __pyx_n_s_UnaryFunctionExpression___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__439)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__440);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 2449, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2456
+ * self._fcn = fcn
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 1
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_3nargs, 0, __pyx_n_s_UnaryFunctionExpression_nargs, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__442)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2456, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nargs, __pyx_t_5) < 0) __PYX_ERR(0, 2456, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2459
+ * return 1
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args, self._name, self._fcn)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_5construct_node, 0, __pyx_n_s_UnaryFunctionExpression_construc, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__444)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2459, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_construct_node, __pyx_t_5) < 0) __PYX_ERR(0, 2459, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2462
+ * return self.__class__(args, self._name, self._fcn)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(UnaryFunctionExpression, self).__getstate__()
+ * for i in UnaryFunctionExpression.__slots__:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_7__getstate__, 0, __pyx_n_s_UnaryFunctionExpression___getsta, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__446)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2462, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getstate, __pyx_t_5) < 0) __PYX_ERR(0, 2462, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2468
+ * return state
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return self._name
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_9getname, 0, __pyx_n_s_UnaryFunctionExpression_getname, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__448)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2468, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getname, __pyx_t_5) < 0) __PYX_ERR(0, 2468, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2471
+ * return self._name
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * if verbose:
+ * return "{0}({1})".format(self.getname(), values[0])
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_11_to_string, 0, __pyx_n_s_UnaryFunctionExpression__to_stri, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__450)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 2471, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2479
+ * return '{0}({1})'.format(self._name, values[0])
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * if result[0] is 0:
+ * return 0
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_13_compute_polynomial_degree, 0, __pyx_n_s_UnaryFunctionExpression__compute, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__452)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2479, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_compute_polynomial_degree, __pyx_t_5) < 0) __PYX_ERR(0, 2479, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2485
+ * return None
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return self._fcn(result[0])
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_23UnaryFunctionExpression_15_apply_operation, 0, __pyx_n_s_UnaryFunctionExpression__apply_o, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__454)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 2485, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2438
+ *
+ *
+ * class UnaryFunctionExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * An expression object used to define intrinsic functions (e.g. sin, cos, tan).
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_UnaryFunctionExpression, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2438, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_UnaryFunctionExpression, __pyx_t_5) < 0) __PYX_ERR(0, 2438, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2489
+ *
+ *
+ * class NPV_UnaryFunctionExpression(UnaryFunctionExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_UnaryFunctionExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2489, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2489, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2489, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NPV_UnaryFunctionExpression, __pyx_n_s_NPV_UnaryFunctionExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2489, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2490
+ *
+ * class NPV_UnaryFunctionExpression(UnaryFunctionExpression):
+ * __slots__ = () # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 2490, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2492
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_27NPV_UnaryFunctionExpression_1is_potentially_variable, 0, __pyx_n_s_NPV_UnaryFunctionExpression_is_p, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__456)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 2492, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2489
+ *
+ *
+ * class NPV_UnaryFunctionExpression(UnaryFunctionExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NPV_UnaryFunctionExpression, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2489, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NPV_UnaryFunctionExpression, __pyx_t_5) < 0) __PYX_ERR(0, 2489, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2498
+ * # NOTE: This should be a special class, since the expression generation relies
+ * # on the Python __abs__ method.
+ * class AbsExpression(UnaryFunctionExpression): # <<<<<<<<<<<<<<
+ * """
+ * An expression object for the :func:`abs` function.
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_UnaryFunctionExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2498, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2498, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2498, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_AbsExpression, __pyx_n_s_AbsExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_An_expression_object_for_the_fu); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2498, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2505
+ * args (tuple): Children nodes
+ * """
+ * __slots__ = () # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, arg):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 2505, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2507
+ * __slots__ = ()
+ *
+ * def __init__(self, arg): # <<<<<<<<<<<<<<
+ * super(AbsExpression, self).__init__(arg, 'abs', abs)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression_1__init__, 0, __pyx_n_s_AbsExpression___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__458)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 2507, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2510
+ * super(AbsExpression, self).__init__(arg, 'abs', abs)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * return self.__class__(args)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_13AbsExpression_3construct_node, 0, __pyx_n_s_AbsExpression_construct_node, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__460)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2510, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_construct_node, __pyx_t_5) < 0) __PYX_ERR(0, 2510, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2498
+ * # NOTE: This should be a special class, since the expression generation relies
+ * # on the Python __abs__ method.
+ * class AbsExpression(UnaryFunctionExpression): # <<<<<<<<<<<<<<
+ * """
+ * An expression object for the :func:`abs` function.
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_AbsExpression, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2498, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_AbsExpression, __pyx_t_5) < 0) __PYX_ERR(0, 2498, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2514
+ *
+ *
+ * class NPV_AbsExpression(AbsExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_AbsExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2514, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2514, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2514, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_NPV_AbsExpression, __pyx_n_s_NPV_AbsExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2514, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2515
+ *
+ * class NPV_AbsExpression(AbsExpression):
+ * __slots__ = () # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 2515, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2517
+ * __slots__ = ()
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_17NPV_AbsExpression_1is_potentially_variable, 0, __pyx_n_s_NPV_AbsExpression_is_potentially, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__462)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2517, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 2517, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2514
+ *
+ *
+ * class NPV_AbsExpression(AbsExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NPV_AbsExpression, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2514, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NPV_AbsExpression, __pyx_t_5) < 0) __PYX_ERR(0, 2514, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2521
+ *
+ *
+ * class LinearExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * An expression object linear polynomials.
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionBase); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2521, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2521, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_CalculateMetaclass(NULL, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2521, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_2, __pyx_t_1, __pyx_n_s_LinearExpression, __pyx_n_s_LinearExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_kp_s_An_expression_object_linear_pol); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2521, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2528
+ * args (tuple): Children nodes
+ * """
+ * __slots__ = ('constant', # The constant term # <<<<<<<<<<<<<<
+ * 'linear_coefs', # Linear coefficients
+ * 'linear_vars') # Linear variables
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_tuple__463) < 0) __PYX_ERR(0, 2528, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2532
+ * 'linear_vars') # Linear variables
+ *
+ * PRECEDENCE = 6 # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, args=None):
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_PRECEDENCE, __pyx_int_6) < 0) __PYX_ERR(0, 2532, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2534
+ * PRECEDENCE = 6
+ *
+ * def __init__(self, args=None): # <<<<<<<<<<<<<<
+ * self.constant = 0
+ * self.linear_coefs = []
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_1__init__, 0, __pyx_n_s_LinearExpression___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__465)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_5, __pyx_tuple__466);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 2534, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2540
+ * self._args_ = tuple()
+ *
+ * def nargs(self): # <<<<<<<<<<<<<<
+ * return 0
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_3nargs, 0, __pyx_n_s_LinearExpression_nargs, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__468)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_nargs, __pyx_t_5) < 0) __PYX_ERR(0, 2540, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2543
+ * return 0
+ *
+ * def _precedence(self): # <<<<<<<<<<<<<<
+ * return LinearExpression.PRECEDENCE
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_5_precedence, 0, __pyx_n_s_LinearExpression__precedence, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__470)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2543, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_precedence, __pyx_t_5) < 0) __PYX_ERR(0, 2543, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2546
+ * return LinearExpression.PRECEDENCE
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(LinearExpression, self).__getstate__()
+ * for i in LinearExpression.__slots__:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_7__getstate__, 0, __pyx_n_s_LinearExpression___getstate, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__472)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getstate, __pyx_t_5) < 0) __PYX_ERR(0, 2546, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2552
+ * return state
+ *
+ * def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
+ * return self.construct_node(None, memo)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_9__deepcopy__, 0, __pyx_n_s_LinearExpression___deepcopy, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__474)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_deepcopy_2, __pyx_t_5) < 0) __PYX_ERR(0, 2552, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2555
+ * return self.construct_node(None, memo)
+ *
+ * def construct_node(self, args, memo): # <<<<<<<<<<<<<<
+ * repn = self.__class__()
+ * repn.constant = deepcopy(self.constant, memo=memo)
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_11construct_node, 0, __pyx_n_s_LinearExpression_construct_node, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__476)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2555, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_construct_node, __pyx_t_5) < 0) __PYX_ERR(0, 2555, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2562
+ * return repn
+ *
+ * def getname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * return 'sum'
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_13getname, 0, __pyx_n_s_LinearExpression_getname, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__478)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2562, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_getname, __pyx_t_5) < 0) __PYX_ERR(0, 2562, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2565
+ * return 'sum'
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * return 1 if len(self.linear_vars) > 0 else 0
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_15_compute_polynomial_degree, 0, __pyx_n_s_LinearExpression__compute_polyno, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__480)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_compute_polynomial_degree, __pyx_t_5) < 0) __PYX_ERR(0, 2565, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2568
+ * return 1 if len(self.linear_vars) > 0 else 0
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return len(self.linear_vars) == 0
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_17is_constant, 0, __pyx_n_s_LinearExpression_is_constant, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__482)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2568, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_constant, __pyx_t_5) < 0) __PYX_ERR(0, 2568, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2571
+ * return len(self.linear_vars) == 0
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * if len(self.linear_vars) == 0:
+ * return True
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_19is_fixed, 0, __pyx_n_s_LinearExpression_is_fixed, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__484)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2571, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_fixed, __pyx_t_5) < 0) __PYX_ERR(0, 2571, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2579
+ * return True
+ *
+ * def _to_string(self, values, verbose, smap, compute_values): # <<<<<<<<<<<<<<
+ * tmp = []
+ * if compute_values:
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_21_to_string, 0, __pyx_n_s_LinearExpression__to_string, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__486)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2579, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_to_string_2, __pyx_t_5) < 0) __PYX_ERR(0, 2579, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2635
+ * return s
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return len(self.linear_vars) > 0
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_23is_potentially_variable, 0, __pyx_n_s_LinearExpression_is_potentially, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__488)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2635, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_is_potentially_variable, __pyx_t_5) < 0) __PYX_ERR(0, 2635, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2638
+ * return len(self.linear_vars) > 0
+ *
+ * def _apply_operation(self, result): # <<<<<<<<<<<<<<
+ * return value(self.constant) + sum(value(c)*v.value for c,v in zip(self.linear_coefs, self.linear_vars))
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_25_apply_operation, 0, __pyx_n_s_LinearExpression__apply_operatio_2, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__490)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_apply_operation, __pyx_t_5) < 0) __PYX_ERR(0, 2638, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2642
+ *
+ * #@profile
+ * def _combine_expr(self, etype, _other): # <<<<<<<<<<<<<<
+ * if etype == _add or etype == _sub or etype == -_add or etype == -_sub:
+ * #
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_16LinearExpression_27_combine_expr, 0, __pyx_n_s_LinearExpression__combine_expr, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__492)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2642, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_combine_expr, __pyx_t_5) < 0) __PYX_ERR(0, 2642, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2521
+ *
+ *
+ * class LinearExpression(ExpressionBase): # <<<<<<<<<<<<<<
+ * """
+ * An expression object linear polynomials.
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_2, __pyx_n_s_LinearExpression, __pyx_t_1, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2521, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearExpression, __pyx_t_5) < 0) __PYX_ERR(0, 2521, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2742
+ *
+ *
+ * class _MutableLinearExpression(LinearExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_LinearExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2742, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2742, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2742, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_MutableLinearExpression, __pyx_n_s_MutableLinearExpression, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2742, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2743
+ *
+ * class _MutableLinearExpression(LinearExpression):
+ * __slots__ = () # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 2743, __pyx_L1_error)
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2742
+ *
+ *
+ * class _MutableLinearExpression(LinearExpression): # <<<<<<<<<<<<<<
+ * __slots__ = ()
+ *
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_MutableLinearExpression, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2742, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_MutableLinearExpression, __pyx_t_5) < 0) __PYX_ERR(0, 2742, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2752
+ * #-------------------------------------------------------
+ *
+ * def decompose_term(expr): # <<<<<<<<<<<<<<
+ * """
+ * A function that returns a tuple consisting of (1) a flag indicated
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_28decompose_term, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2752, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_decompose_term, __pyx_t_2) < 0) __PYX_ERR(0, 2752, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2781
+ * return False, None
+ *
+ * class LinearDecompositionError(Exception): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, message):
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2781, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ __Pyx_GIVEREF(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 2781, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_2, __pyx_n_s_LinearDecompositionError, __pyx_n_s_LinearDecompositionError, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, (PyObject *) NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 2781, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2783
+ * class LinearDecompositionError(Exception):
+ *
+ * def __init__(self, message): # <<<<<<<<<<<<<<
+ * super(LinearDecompositionError, self).__init__(message)
+ *
+ */
+ __pyx_t_5 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_24LinearDecompositionError_1__init__, 0, __pyx_n_s_LinearDecompositionError___init, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_d, ((PyObject *)__pyx_codeobj__496)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyObject_SetItem(__pyx_t_4, __pyx_n_s_init, __pyx_t_5) < 0) __PYX_ERR(0, 2783, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2781
+ * return False, None
+ *
+ * class LinearDecompositionError(Exception): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, message):
+ */
+ __pyx_t_5 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_LinearDecompositionError, __pyx_t_2, __pyx_t_4, NULL, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 2781, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_LinearDecompositionError, __pyx_t_5) < 0) __PYX_ERR(0, 2781, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2787
+ *
+ *
+ * def _decompose_linear_terms(expr, multiplier=1): # <<<<<<<<<<<<<<
+ * """
+ * A generator function that yields tuples for the linear terms
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_30_decompose_linear_terms, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2787, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_decompose_linear_terms, __pyx_t_2) < 0) __PYX_ERR(0, 2787, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2837
+ *
+ *
+ * def _process_arg(obj): # <<<<<<<<<<<<<<
+ * #if False and obj.__class__ is ViewSumExpression or obj.__class__ is _MutableViewSumExpression:
+ * # if ignore_entangled_expressions.detangle[-1] and obj._is_owned:
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_33_process_arg, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2837, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_process_arg, __pyx_t_2) < 0) __PYX_ERR(0, 2837, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":2872
+ *
+ * #@profile
+ * def _generate_sum_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ *
+ * if etype > _inplace:
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_35_generate_sum_expression, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 2872, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_sum_expression, __pyx_t_2) < 0) __PYX_ERR(0, 2872, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3000
+ *
+ * #@profile
+ * def _generate_mul_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ *
+ * if etype > _inplace:
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_37_generate_mul_expression, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3000, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_mul_expression, __pyx_t_2) < 0) __PYX_ERR(0, 3000, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3105
+ *
+ * #@profile
+ * def _generate_other_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ *
+ * if etype > _inplace:
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_39_generate_other_expression, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3105, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_other_expression, __pyx_t_2) < 0) __PYX_ERR(0, 3105, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3164
+ *
+ *
+ * if _using_chained_inequality: # <<<<<<<<<<<<<<
+ * def _generate_relational_expression(etype, lhs, rhs): #pragma: no cover
+ * # We cannot trust Python not to recycle ID's for temporary POD data
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_using_chained_inequality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3164, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 3164, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3165
+ *
+ * if _using_chained_inequality:
+ * def _generate_relational_expression(etype, lhs, rhs): #pragma: no cover # <<<<<<<<<<<<<<
+ * # We cannot trust Python not to recycle ID's for temporary POD data
+ * # (e.g., floats). So, if it is a "native" type, we will record the
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_41_generate_relational_expression, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3165, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_relational_expression, __pyx_t_2) < 0) __PYX_ERR(0, 3165, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3164
+ *
+ *
+ * if _using_chained_inequality: # <<<<<<<<<<<<<<
+ * def _generate_relational_expression(etype, lhs, rhs): #pragma: no cover
+ * # We cannot trust Python not to recycle ID's for temporary POD data
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3287
+ * else:
+ *
+ * def _generate_relational_expression(etype, lhs, rhs): #pragma: no cover # <<<<<<<<<<<<<<
+ * rhs_is_relational = False
+ * lhs_is_relational = False
+ */
+ /*else*/ {
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_43_generate_relational_expression, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3287, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_relational_expression, __pyx_t_2) < 0) __PYX_ERR(0, 3287, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __pyx_L3:;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":3347
+ *
+ *
+ * def _generate_intrinsic_function_expression(arg, name, fcn): # <<<<<<<<<<<<<<
+ * if not (arg.__class__ in native_types or arg.is_expression_type()):
+ * arg = _process_arg(arg)
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_11expr_pyomo5_45_generate_intrinsic_function_expression, NULL, __pyx_n_s_pyomo_core_expr_expr_pyomo5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 3347, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_intrinsic_function_exp, __pyx_t_2) < 0) __PYX_ERR(0, 3347, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/expr_pyomo5.pyx":1
+ * # ___________________________________________________________________________ # <<<<<<<<<<<<<<
+ * #
+ * # Pyomo: Python Optimization Modeling Objects
+ */
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /*--- Wrapped vars code ---*/
+
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ if (__pyx_m) {
+ if (__pyx_d) {
+ __Pyx_AddTraceback("init pyomo.core.expr.expr_pyomo5", 0, __pyx_lineno, __pyx_filename);
+ }
+ Py_DECREF(__pyx_m); __pyx_m = 0;
+ } else if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_ImportError, "init pyomo.core.expr.expr_pyomo5");
+ }
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ return (__pyx_m != NULL) ? 0 : -1;
+ #elif PY_MAJOR_VERSION >= 3
+ return __pyx_m;
+ #else
+ return;
+ #endif
+}
+
+/* --- Runtime support code --- */
+/* Refnanny */
+#if CYTHON_REFNANNY
+static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
+ PyObject *m = NULL, *p = NULL;
+ void *r = NULL;
+ m = PyImport_ImportModule((char *)modname);
+ if (!m) goto end;
+ p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
+ if (!p) goto end;
+ r = PyLong_AsVoidPtr(p);
+end:
+ Py_XDECREF(p);
+ Py_XDECREF(m);
+ return (__Pyx_RefNannyAPIStruct *)r;
+}
+#endif
+
+/* GetBuiltinName */
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+ PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+ if (unlikely(!result)) {
+ PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+ "name '%U' is not defined", name);
+#else
+ "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
+ }
+ return result;
+}
+
+/* RaiseDoubleKeywords */
+static void __Pyx_RaiseDoubleKeywordsError(
+ const char* func_name,
+ PyObject* kw_name)
+{
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION >= 3
+ "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
+ #else
+ "%s() got multiple values for keyword argument '%s'", func_name,
+ PyString_AsString(kw_name));
+ #endif
+}
+
+/* ParseKeywords */
+static int __Pyx_ParseOptionalKeywords(
+ PyObject *kwds,
+ PyObject **argnames[],
+ PyObject *kwds2,
+ PyObject *values[],
+ Py_ssize_t num_pos_args,
+ const char* function_name)
+{
+ PyObject *key = 0, *value = 0;
+ Py_ssize_t pos = 0;
+ PyObject*** name;
+ PyObject*** first_kw_arg = argnames + num_pos_args;
+ while (PyDict_Next(kwds, &pos, &key, &value)) {
+ name = first_kw_arg;
+ while (*name && (**name != key)) name++;
+ if (*name) {
+ values[name-argnames] = value;
+ continue;
+ }
+ name = first_kw_arg;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
+ while (*name) {
+ if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
+ && _PyString_Eq(**name, key)) {
+ values[name-argnames] = value;
+ break;
+ }
+ name++;
+ }
+ if (*name) continue;
+ else {
+ PyObject*** argname = argnames;
+ while (argname != first_kw_arg) {
+ if ((**argname == key) || (
+ (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
+ && _PyString_Eq(**argname, key))) {
+ goto arg_passed_twice;
+ }
+ argname++;
+ }
+ }
+ } else
+ #endif
+ if (likely(PyUnicode_Check(key))) {
+ while (*name) {
+ int cmp = (**name == key) ? 0 :
+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+ (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
+ #endif
+ PyUnicode_Compare(**name, key);
+ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+ if (cmp == 0) {
+ values[name-argnames] = value;
+ break;
+ }
+ name++;
+ }
+ if (*name) continue;
+ else {
+ PyObject*** argname = argnames;
+ while (argname != first_kw_arg) {
+ int cmp = (**argname == key) ? 0 :
+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+ (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
+ #endif
+ PyUnicode_Compare(**argname, key);
+ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+ if (cmp == 0) goto arg_passed_twice;
+ argname++;
+ }
+ }
+ } else
+ goto invalid_keyword_type;
+ if (kwds2) {
+ if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+ } else {
+ goto invalid_keyword;
+ }
+ }
+ return 0;
+arg_passed_twice:
+ __Pyx_RaiseDoubleKeywordsError(function_name, key);
+ goto bad;
+invalid_keyword_type:
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() keywords must be strings", function_name);
+ goto bad;
+invalid_keyword:
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION < 3
+ "%.200s() got an unexpected keyword argument '%.200s'",
+ function_name, PyString_AsString(key));
+ #else
+ "%s() got an unexpected keyword argument '%U'",
+ function_name, key);
+ #endif
+bad:
+ return -1;
+}
+
+/* RaiseArgTupleInvalid */
+static void __Pyx_RaiseArgtupleInvalid(
+ const char* func_name,
+ int exact,
+ Py_ssize_t num_min,
+ Py_ssize_t num_max,
+ Py_ssize_t num_found)
+{
+ Py_ssize_t num_expected;
+ const char *more_or_less;
+ if (num_found < num_min) {
+ num_expected = num_min;
+ more_or_less = "at least";
+ } else {
+ num_expected = num_max;
+ more_or_less = "at most";
+ }
+ if (exact) {
+ more_or_less = "exactly";
+ }
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+ func_name, more_or_less, num_expected,
+ (num_expected == 1) ? "" : "s", num_found);
+}
+
+/* GetModuleGlobalName */
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+ PyObject *result;
+#if !CYTHON_AVOID_BORROWED_REFS
+ result = PyDict_GetItem(__pyx_d, name);
+ if (likely(result)) {
+ Py_INCREF(result);
+ } else {
+#else
+ result = PyObject_GetItem(__pyx_d, name);
+ if (!result) {
+ PyErr_Clear();
+#endif
+ result = __Pyx_GetBuiltinName(name);
+ }
+ return result;
+}
+
+/* PyCFunctionFastCall */
+ #if CYTHON_FAST_PYCCALL
+static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
+ PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
+ PyCFunction meth = PyCFunction_GET_FUNCTION(func);
+ PyObject *self = PyCFunction_GET_SELF(func);
+ int flags = PyCFunction_GET_FLAGS(func);
+ assert(PyCFunction_Check(func));
+ assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
+ assert(nargs >= 0);
+ assert(nargs == 0 || args != NULL);
+ /* _PyCFunction_FastCallDict() must not be called with an exception set,
+ because it may clear it (directly or indirectly) and so the
+ caller loses its exception */
+ assert(!PyErr_Occurred());
+ if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
+ return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
+ } else {
+ return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
+ }
+}
+#endif
+
+/* PyFunctionFastCall */
+ #if CYTHON_FAST_PYCALL
+#include "frameobject.h"
+static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
+ PyObject *globals) {
+ PyFrameObject *f;
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ PyObject **fastlocals;
+ Py_ssize_t i;
+ PyObject *result;
+ assert(globals != NULL);
+ /* XXX Perhaps we should create a specialized
+ PyFrame_New() that doesn't take locals, but does
+ take builtins without sanity checking them.
+ */
+ assert(tstate != NULL);
+ f = PyFrame_New(tstate, co, globals, NULL);
+ if (f == NULL) {
+ return NULL;
+ }
+ fastlocals = f->f_localsplus;
+ for (i = 0; i < na; i++) {
+ Py_INCREF(*args);
+ fastlocals[i] = *args++;
+ }
+ result = PyEval_EvalFrameEx(f,0);
+ ++tstate->recursion_depth;
+ Py_DECREF(f);
+ --tstate->recursion_depth;
+ return result;
+}
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
+ PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
+ PyObject *globals = PyFunction_GET_GLOBALS(func);
+ PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
+ PyObject *closure;
+#if PY_MAJOR_VERSION >= 3
+ PyObject *kwdefs;
+#endif
+ PyObject *kwtuple, **k;
+ PyObject **d;
+ Py_ssize_t nd;
+ Py_ssize_t nk;
+ PyObject *result;
+ assert(kwargs == NULL || PyDict_Check(kwargs));
+ nk = kwargs ? PyDict_Size(kwargs) : 0;
+ if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
+ return NULL;
+ }
+ if (
+#if PY_MAJOR_VERSION >= 3
+ co->co_kwonlyargcount == 0 &&
+#endif
+ likely(kwargs == NULL || nk == 0) &&
+ co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
+ if (argdefs == NULL && co->co_argcount == nargs) {
+ result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
+ goto done;
+ }
+ else if (nargs == 0 && argdefs != NULL
+ && co->co_argcount == Py_SIZE(argdefs)) {
+ /* function called with no arguments, but all parameters have
+ a default value: use default values as arguments .*/
+ args = &PyTuple_GET_ITEM(argdefs, 0);
+ result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
+ goto done;
+ }
+ }
+ if (kwargs != NULL) {
+ Py_ssize_t pos, i;
+ kwtuple = PyTuple_New(2 * nk);
+ if (kwtuple == NULL) {
+ result = NULL;
+ goto done;
+ }
+ k = &PyTuple_GET_ITEM(kwtuple, 0);
+ pos = i = 0;
+ while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
+ Py_INCREF(k[i]);
+ Py_INCREF(k[i+1]);
+ i += 2;
+ }
+ nk = i / 2;
+ }
+ else {
+ kwtuple = NULL;
+ k = NULL;
+ }
+ closure = PyFunction_GET_CLOSURE(func);
+#if PY_MAJOR_VERSION >= 3
+ kwdefs = PyFunction_GET_KW_DEFAULTS(func);
+#endif
+ if (argdefs != NULL) {
+ d = &PyTuple_GET_ITEM(argdefs, 0);
+ nd = Py_SIZE(argdefs);
+ }
+ else {
+ d = NULL;
+ nd = 0;
+ }
+#if PY_MAJOR_VERSION >= 3
+ result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
+ args, nargs,
+ k, (int)nk,
+ d, (int)nd, kwdefs, closure);
+#else
+ result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
+ args, nargs,
+ k, (int)nk,
+ d, (int)nd, closure);
+#endif
+ Py_XDECREF(kwtuple);
+done:
+ Py_LeaveRecursiveCall();
+ return result;
+}
+#endif
+#endif
+
+/* PyObjectCall */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+ PyObject *result;
+ ternaryfunc call = func->ob_type->tp_call;
+ if (unlikely(!call))
+ return PyObject_Call(func, arg, kw);
+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+ return NULL;
+ result = (*call)(func, arg, kw);
+ Py_LeaveRecursiveCall();
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+ PyErr_SetString(
+ PyExc_SystemError,
+ "NULL result without error in PyObject_Call");
+ }
+ return result;
+}
+#endif
+
+/* PyObjectCallMethO */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
+ PyObject *self, *result;
+ PyCFunction cfunc;
+ cfunc = PyCFunction_GET_FUNCTION(func);
+ self = PyCFunction_GET_SELF(func);
+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+ return NULL;
+ result = cfunc(self, arg);
+ Py_LeaveRecursiveCall();
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+ PyErr_SetString(
+ PyExc_SystemError,
+ "NULL result without error in PyObject_Call");
+ }
+ return result;
+}
+#endif
+
+/* PyObjectCallOneArg */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+ PyObject *result;
+ PyObject *args = PyTuple_New(1);
+ if (unlikely(!args)) return NULL;
+ Py_INCREF(arg);
+ PyTuple_SET_ITEM(args, 0, arg);
+ result = __Pyx_PyObject_Call(func, args, NULL);
+ Py_DECREF(args);
+ return result;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+#if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(func)) {
+ return __Pyx_PyFunction_FastCall(func, &arg, 1);
+ }
+#endif
+ if (likely(PyCFunction_Check(func))) {
+ if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
+ return __Pyx_PyObject_CallMethO(func, arg);
+#if CYTHON_FAST_PYCCALL
+ } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
+ return __Pyx_PyCFunction_FastCall(func, &arg, 1);
+#endif
+ }
+ }
+ return __Pyx__PyObject_CallOneArg(func, arg);
+}
+#else
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+ PyObject *result;
+ PyObject *args = PyTuple_Pack(1, arg);
+ if (unlikely(!args)) return NULL;
+ result = __Pyx_PyObject_Call(func, args, NULL);
+ Py_DECREF(args);
+ return result;
+}
+#endif
+
+/* PyObjectCallNoArg */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
+#if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(func)) {
+ return __Pyx_PyFunction_FastCall(func, NULL, 0);
+ }
+#endif
+#ifdef __Pyx_CyFunction_USED
+ if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
+#else
+ if (likely(PyCFunction_Check(func))) {
+#endif
+ if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
+ return __Pyx_PyObject_CallMethO(func, NULL);
+ }
+ }
+ return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
+}
+#endif
+
+/* GetItemInt */
+ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+ PyObject *r;
+ if (!j) return NULL;
+ r = PyObject_GetItem(o, j);
+ Py_DECREF(j);
+ return r;
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ Py_ssize_t wrapped_i = i;
+ if (wraparound & unlikely(i < 0)) {
+ wrapped_i += PyList_GET_SIZE(o);
+ }
+ if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) {
+ PyObject *r = PyList_GET_ITEM(o, wrapped_i);
+ Py_INCREF(r);
+ return r;
+ }
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+ return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ Py_ssize_t wrapped_i = i;
+ if (wraparound & unlikely(i < 0)) {
+ wrapped_i += PyTuple_GET_SIZE(o);
+ }
+ if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) {
+ PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
+ Py_INCREF(r);
+ return r;
+ }
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+ return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
+ if (is_list || PyList_CheckExact(o)) {
+ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+ if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
+ PyObject *r = PyList_GET_ITEM(o, n);
+ Py_INCREF(r);
+ return r;
+ }
+ }
+ else if (PyTuple_CheckExact(o)) {
+ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+ if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
+ PyObject *r = PyTuple_GET_ITEM(o, n);
+ Py_INCREF(r);
+ return r;
+ }
+ } else {
+ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+ if (likely(m && m->sq_item)) {
+ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+ Py_ssize_t l = m->sq_length(o);
+ if (likely(l >= 0)) {
+ i += l;
+ } else {
+ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+ return NULL;
+ PyErr_Clear();
+ }
+ }
+ return m->sq_item(o, i);
+ }
+ }
+#else
+ if (is_list || PySequence_Check(o)) {
+ return PySequence_GetItem(o, i);
+ }
+#endif
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+}
+
+/* Import */
+ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+ PyObject *empty_list = 0;
+ PyObject *module = 0;
+ PyObject *global_dict = 0;
+ PyObject *empty_dict = 0;
+ PyObject *list;
+ #if PY_MAJOR_VERSION < 3
+ PyObject *py_import;
+ py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+ if (!py_import)
+ goto bad;
+ #endif
+ if (from_list)
+ list = from_list;
+ else {
+ empty_list = PyList_New(0);
+ if (!empty_list)
+ goto bad;
+ list = empty_list;
+ }
+ global_dict = PyModule_GetDict(__pyx_m);
+ if (!global_dict)
+ goto bad;
+ empty_dict = PyDict_New();
+ if (!empty_dict)
+ goto bad;
+ {
+ #if PY_MAJOR_VERSION >= 3
+ if (level == -1) {
+ if (strchr(__Pyx_MODULE_NAME, '.')) {
+ module = PyImport_ImportModuleLevelObject(
+ name, global_dict, empty_dict, list, 1);
+ if (!module) {
+ if (!PyErr_ExceptionMatches(PyExc_ImportError))
+ goto bad;
+ PyErr_Clear();
+ }
+ }
+ level = 0;
+ }
+ #endif
+ if (!module) {
+ #if PY_MAJOR_VERSION < 3
+ PyObject *py_level = PyInt_FromLong(level);
+ if (!py_level)
+ goto bad;
+ module = PyObject_CallFunctionObjArgs(py_import,
+ name, global_dict, empty_dict, list, py_level, NULL);
+ Py_DECREF(py_level);
+ #else
+ module = PyImport_ImportModuleLevelObject(
+ name, global_dict, empty_dict, list, level);
+ #endif
+ }
+ }
+bad:
+ #if PY_MAJOR_VERSION < 3
+ Py_XDECREF(py_import);
+ #endif
+ Py_XDECREF(empty_list);
+ Py_XDECREF(empty_dict);
+ return module;
+}
+
+/* ImportFrom */
+ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
+ PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
+ if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_Format(PyExc_ImportError,
+ #if PY_MAJOR_VERSION < 3
+ "cannot import name %.230s", PyString_AS_STRING(name));
+ #else
+ "cannot import name %S", name);
+ #endif
+ }
+ return value;
+}
+
+/* PyIntBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
+ if (op1 == op2) {
+ Py_RETURN_TRUE;
+ }
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ const long b = intval;
+ long a = PyInt_AS_LONG(op1);
+ if (a == b) {
+ Py_RETURN_TRUE;
+ } else {
+ Py_RETURN_FALSE;
+ }
+ }
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+ if (likely(PyLong_CheckExact(op1))) {
+ const long b = intval;
+ long a;
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ a = likely(size) ? digits[0] : 0;
+ if (size == -1) a = -a;
+ } else {
+ switch (size) {
+ case -2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case 2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case -3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case 3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case -4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case 4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
+ default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
+ #else
+ default: Py_RETURN_FALSE;
+ #endif
+ }
+ }
+ if (a == b) {
+ Py_RETURN_TRUE;
+ } else {
+ Py_RETURN_FALSE;
+ }
+ }
+ #endif
+ if (PyFloat_CheckExact(op1)) {
+ const long b = intval;
+ double a = PyFloat_AS_DOUBLE(op1);
+ if ((double)a == (double)b) {
+ Py_RETURN_TRUE;
+ } else {
+ Py_RETURN_FALSE;
+ }
+ }
+ return PyObject_RichCompare(op1, op2, Py_EQ);
+}
+#endif
+
+/* PyObjectCallMethod1 */
+ static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
+ PyObject *result = NULL;
+#if CYTHON_UNPACK_METHODS
+ if (likely(PyMethod_Check(method))) {
+ PyObject *self = PyMethod_GET_SELF(method);
+ if (likely(self)) {
+ PyObject *args;
+ PyObject *function = PyMethod_GET_FUNCTION(method);
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(function)) {
+ PyObject *args[2] = {self, arg};
+ result = __Pyx_PyFunction_FastCall(function, args, 2);
+ goto done;
+ }
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(function)) {
+ PyObject *args[2] = {self, arg};
+ result = __Pyx_PyCFunction_FastCall(function, args, 2);
+ goto done;
+ }
+ #endif
+ args = PyTuple_New(2);
+ if (unlikely(!args)) goto done;
+ Py_INCREF(self);
+ PyTuple_SET_ITEM(args, 0, self);
+ Py_INCREF(arg);
+ PyTuple_SET_ITEM(args, 1, arg);
+ Py_INCREF(function);
+ result = __Pyx_PyObject_Call(function, args, NULL);
+ Py_DECREF(args);
+ Py_DECREF(function);
+ return result;
+ }
+ }
+#endif
+ result = __Pyx_PyObject_CallOneArg(method, arg);
+ goto done;
+done:
+ return result;
+}
+static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
+ PyObject *method, *result = NULL;
+ method = __Pyx_PyObject_GetAttrStr(obj, method_name);
+ if (unlikely(!method)) goto done;
+ result = __Pyx__PyObject_CallMethod1(method, arg);
+done:
+ Py_XDECREF(method);
+ return result;
+}
+
+/* append */
+ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+ if (likely(PyList_CheckExact(L))) {
+ if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
+ } else {
+ PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
+ if (unlikely(!retval))
+ return -1;
+ Py_DECREF(retval);
+ }
+ return 0;
+}
+
+/* PyErrFetchRestore */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ tmp_type = tstate->curexc_type;
+ tmp_value = tstate->curexc_value;
+ tmp_tb = tstate->curexc_traceback;
+ tstate->curexc_type = type;
+ tstate->curexc_value = value;
+ tstate->curexc_traceback = tb;
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+}
+static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ *type = tstate->curexc_type;
+ *value = tstate->curexc_value;
+ *tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+}
+#endif
+
+/* RaiseException */
+ #if PY_MAJOR_VERSION < 3
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
+ CYTHON_UNUSED PyObject *cause) {
+ __Pyx_PyThreadState_declare
+ Py_XINCREF(type);
+ if (!value || value == Py_None)
+ value = NULL;
+ else
+ Py_INCREF(value);
+ if (!tb || tb == Py_None)
+ tb = NULL;
+ else {
+ Py_INCREF(tb);
+ if (!PyTraceBack_Check(tb)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: arg 3 must be a traceback or None");
+ goto raise_error;
+ }
+ }
+ if (PyType_Check(type)) {
+#if CYTHON_COMPILING_IN_PYPY
+ if (!value) {
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+#endif
+ PyErr_NormalizeException(&type, &value, &tb);
+ } else {
+ if (value) {
+ PyErr_SetString(PyExc_TypeError,
+ "instance exception may not have a separate value");
+ goto raise_error;
+ }
+ value = type;
+ type = (PyObject*) Py_TYPE(type);
+ Py_INCREF(type);
+ if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: exception class must be a subclass of BaseException");
+ goto raise_error;
+ }
+ }
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrRestore(type, value, tb);
+ return;
+raise_error:
+ Py_XDECREF(value);
+ Py_XDECREF(type);
+ Py_XDECREF(tb);
+ return;
+}
+#else
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
+ PyObject* owned_instance = NULL;
+ if (tb == Py_None) {
+ tb = 0;
+ } else if (tb && !PyTraceBack_Check(tb)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: arg 3 must be a traceback or None");
+ goto bad;
+ }
+ if (value == Py_None)
+ value = 0;
+ if (PyExceptionInstance_Check(type)) {
+ if (value) {
+ PyErr_SetString(PyExc_TypeError,
+ "instance exception may not have a separate value");
+ goto bad;
+ }
+ value = type;
+ type = (PyObject*) Py_TYPE(value);
+ } else if (PyExceptionClass_Check(type)) {
+ PyObject *instance_class = NULL;
+ if (value && PyExceptionInstance_Check(value)) {
+ instance_class = (PyObject*) Py_TYPE(value);
+ if (instance_class != type) {
+ int is_subclass = PyObject_IsSubclass(instance_class, type);
+ if (!is_subclass) {
+ instance_class = NULL;
+ } else if (unlikely(is_subclass == -1)) {
+ goto bad;
+ } else {
+ type = instance_class;
+ }
+ }
+ }
+ if (!instance_class) {
+ PyObject *args;
+ if (!value)
+ args = PyTuple_New(0);
+ else if (PyTuple_Check(value)) {
+ Py_INCREF(value);
+ args = value;
+ } else
+ args = PyTuple_Pack(1, value);
+ if (!args)
+ goto bad;
+ owned_instance = PyObject_Call(type, args, NULL);
+ Py_DECREF(args);
+ if (!owned_instance)
+ goto bad;
+ value = owned_instance;
+ if (!PyExceptionInstance_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "calling %R should have returned an instance of "
+ "BaseException, not %R",
+ type, Py_TYPE(value));
+ goto bad;
+ }
+ }
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: exception class must be a subclass of BaseException");
+ goto bad;
+ }
+ if (cause) {
+ PyObject *fixed_cause;
+ if (cause == Py_None) {
+ fixed_cause = NULL;
+ } else if (PyExceptionClass_Check(cause)) {
+ fixed_cause = PyObject_CallObject(cause, NULL);
+ if (fixed_cause == NULL)
+ goto bad;
+ } else if (PyExceptionInstance_Check(cause)) {
+ fixed_cause = cause;
+ Py_INCREF(fixed_cause);
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "exception causes must derive from "
+ "BaseException");
+ goto bad;
+ }
+ PyException_SetCause(value, fixed_cause);
+ }
+ PyErr_SetObject(type, value);
+ if (tb) {
+#if CYTHON_COMPILING_IN_PYPY
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
+ Py_INCREF(tb);
+ PyErr_Restore(tmp_type, tmp_value, tb);
+ Py_XDECREF(tmp_tb);
+#else
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ PyObject* tmp_tb = tstate->curexc_traceback;
+ if (tb != tmp_tb) {
+ Py_INCREF(tb);
+ tstate->curexc_traceback = tb;
+ Py_XDECREF(tmp_tb);
+ }
+#endif
+ }
+bad:
+ Py_XDECREF(owned_instance);
+ return;
+}
+#endif
+
+/* RaiseTooManyValuesToUnpack */
+ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+ PyErr_Format(PyExc_ValueError,
+ "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
+}
+
+/* RaiseNeedMoreValuesToUnpack */
+ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+ PyErr_Format(PyExc_ValueError,
+ "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
+ index, (index == 1) ? "" : "s");
+}
+
+/* IterFinish */
+ static CYTHON_INLINE int __Pyx_IterFinish(void) {
+#if CYTHON_FAST_THREAD_STATE
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ PyObject* exc_type = tstate->curexc_type;
+ if (unlikely(exc_type)) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
+ PyObject *exc_value, *exc_tb;
+ exc_value = tstate->curexc_value;
+ exc_tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+ Py_DECREF(exc_type);
+ Py_XDECREF(exc_value);
+ Py_XDECREF(exc_tb);
+ return 0;
+ } else {
+ return -1;
+ }
+ }
+ return 0;
+#else
+ if (unlikely(PyErr_Occurred())) {
+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
+ PyErr_Clear();
+ return 0;
+ } else {
+ return -1;
+ }
+ }
+ return 0;
+#endif
+}
+
+/* UnpackItemEndCheck */
+ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
+ if (unlikely(retval)) {
+ Py_DECREF(retval);
+ __Pyx_RaiseTooManyValuesError(expected);
+ return -1;
+ } else {
+ return __Pyx_IterFinish();
+ }
+ return 0;
+}
+
+/* PyObjectCallMethod0 */
+ static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
+ PyObject *method, *result = NULL;
+ method = __Pyx_PyObject_GetAttrStr(obj, method_name);
+ if (unlikely(!method)) goto bad;
+#if CYTHON_UNPACK_METHODS
+ if (likely(PyMethod_Check(method))) {
+ PyObject *self = PyMethod_GET_SELF(method);
+ if (likely(self)) {
+ PyObject *function = PyMethod_GET_FUNCTION(method);
+ result = __Pyx_PyObject_CallOneArg(function, self);
+ Py_DECREF(method);
+ return result;
+ }
+ }
+#endif
+ result = __Pyx_PyObject_CallNoArg(method);
+ Py_DECREF(method);
+bad:
+ return result;
+}
+
+/* UnpackUnboundCMethod */
+ static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
+ PyObject *method;
+ method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
+ if (unlikely(!method))
+ return -1;
+ target->method = method;
+#if CYTHON_COMPILING_IN_CPYTHON
+ #if PY_MAJOR_VERSION >= 3
+ if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
+ #endif
+ {
+ PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
+ target->func = descr->d_method->ml_meth;
+ target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
+ }
+#endif
+ return 0;
+}
+
+/* CallUnboundCMethod0 */
+ static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
+ PyObject *args, *result = NULL;
+ if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
+#if CYTHON_ASSUME_SAFE_MACROS
+ args = PyTuple_New(1);
+ if (unlikely(!args)) goto bad;
+ Py_INCREF(self);
+ PyTuple_SET_ITEM(args, 0, self);
+#else
+ args = PyTuple_Pack(1, self);
+ if (unlikely(!args)) goto bad;
+#endif
+ result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
+ Py_DECREF(args);
+bad:
+ return result;
+}
+
+/* pop */
+ static CYTHON_INLINE PyObject* __Pyx__PyObject_Pop(PyObject* L) {
+ if (Py_TYPE(L) == &PySet_Type) {
+ return PySet_Pop(L);
+ }
+ return __Pyx_PyObject_CallMethod0(L, __pyx_n_s_pop);
+}
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+static CYTHON_INLINE PyObject* __Pyx_PyList_Pop(PyObject* L) {
+ if (likely(PyList_GET_SIZE(L) > (((PyListObject*)L)->allocated >> 1))) {
+ Py_SIZE(L) -= 1;
+ return PyList_GET_ITEM(L, PyList_GET_SIZE(L));
+ }
+ return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyList_Type_pop, L);
+}
+#endif
+
+/* PyIntBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ const long b = intval;
+ long x;
+ long a = PyInt_AS_LONG(op1);
+ x = (long)((unsigned long)a + b);
+ if (likely((x^a) >= 0 || (x^b) >= 0))
+ return PyInt_FromLong(x);
+ return PyLong_Type.tp_as_number->nb_add(op1, op2);
+ }
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+ if (likely(PyLong_CheckExact(op1))) {
+ const long b = intval;
+ long a, x;
+#ifdef HAVE_LONG_LONG
+ const PY_LONG_LONG llb = intval;
+ PY_LONG_LONG lla, llx;
+#endif
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ a = likely(size) ? digits[0] : 0;
+ if (size == -1) a = -a;
+ } else {
+ switch (size) {
+ case -2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
+ }
+ }
+ x = a + b;
+ return PyLong_FromLong(x);
+#ifdef HAVE_LONG_LONG
+ long_long:
+ llx = lla + llb;
+ return PyLong_FromLongLong(llx);
+#endif
+
+
+ }
+ #endif
+ if (PyFloat_CheckExact(op1)) {
+ const long b = intval;
+ double a = PyFloat_AS_DOUBLE(op1);
+ double result;
+ PyFPE_START_PROTECT("add", return NULL)
+ result = ((double)a) + (double)b;
+ PyFPE_END_PROTECT(result)
+ return PyFloat_FromDouble(result);
+ }
+ return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
+}
+#endif
+
+/* SetItemInt */
+ static int __Pyx_SetItemInt_Generic(PyObject *o, PyObject *j, PyObject *v) {
+ int r;
+ if (!j) return -1;
+ r = PyObject_SetItem(o, j, v);
+ Py_DECREF(j);
+ return r;
+}
+static CYTHON_INLINE int __Pyx_SetItemInt_Fast(PyObject *o, Py_ssize_t i, PyObject *v, int is_list,
+ CYTHON_NCP_UNUSED int wraparound, CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
+ if (is_list || PyList_CheckExact(o)) {
+ Py_ssize_t n = (!wraparound) ? i : ((likely(i >= 0)) ? i : i + PyList_GET_SIZE(o));
+ if ((!boundscheck) || likely((n >= 0) & (n < PyList_GET_SIZE(o)))) {
+ PyObject* old = PyList_GET_ITEM(o, n);
+ Py_INCREF(v);
+ PyList_SET_ITEM(o, n, v);
+ Py_DECREF(old);
+ return 1;
+ }
+ } else {
+ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+ if (likely(m && m->sq_ass_item)) {
+ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+ Py_ssize_t l = m->sq_length(o);
+ if (likely(l >= 0)) {
+ i += l;
+ } else {
+ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+ return -1;
+ PyErr_Clear();
+ }
+ }
+ return m->sq_ass_item(o, i, v);
+ }
+ }
+#else
+#if CYTHON_COMPILING_IN_PYPY
+ if (is_list || (PySequence_Check(o) && !PyDict_Check(o))) {
+#else
+ if (is_list || PySequence_Check(o)) {
+#endif
+ return PySequence_SetItem(o, i, v);
+ }
+#endif
+ return __Pyx_SetItemInt_Generic(o, PyInt_FromSsize_t(i), v);
+}
+
+/* SliceObject */
+ static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice(PyObject* obj,
+ Py_ssize_t cstart, Py_ssize_t cstop,
+ PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice,
+ int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) {
+#if CYTHON_USE_TYPE_SLOTS
+ PyMappingMethods* mp;
+#if PY_MAJOR_VERSION < 3
+ PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence;
+ if (likely(ms && ms->sq_slice)) {
+ if (!has_cstart) {
+ if (_py_start && (*_py_start != Py_None)) {
+ cstart = __Pyx_PyIndex_AsSsize_t(*_py_start);
+ if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+ } else
+ cstart = 0;
+ }
+ if (!has_cstop) {
+ if (_py_stop && (*_py_stop != Py_None)) {
+ cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop);
+ if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
+ } else
+ cstop = PY_SSIZE_T_MAX;
+ }
+ if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) {
+ Py_ssize_t l = ms->sq_length(obj);
+ if (likely(l >= 0)) {
+ if (cstop < 0) {
+ cstop += l;
+ if (cstop < 0) cstop = 0;
+ }
+ if (cstart < 0) {
+ cstart += l;
+ if (cstart < 0) cstart = 0;
+ }
+ } else {
+ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+ goto bad;
+ PyErr_Clear();
+ }
+ }
+ return ms->sq_slice(obj, cstart, cstop);
+ }
+#endif
+ mp = Py_TYPE(obj)->tp_as_mapping;
+ if (likely(mp && mp->mp_subscript))
+#endif
+ {
+ PyObject* result;
+ PyObject *py_slice, *py_start, *py_stop;
+ if (_py_slice) {
+ py_slice = *_py_slice;
+ } else {
+ PyObject* owned_start = NULL;
+ PyObject* owned_stop = NULL;
+ if (_py_start) {
+ py_start = *_py_start;
+ } else {
+ if (has_cstart) {
+ owned_start = py_start = PyInt_FromSsize_t(cstart);
+ if (unlikely(!py_start)) goto bad;
+ } else
+ py_start = Py_None;
+ }
+ if (_py_stop) {
+ py_stop = *_py_stop;
+ } else {
+ if (has_cstop) {
+ owned_stop = py_stop = PyInt_FromSsize_t(cstop);
+ if (unlikely(!py_stop)) {
+ Py_XDECREF(owned_start);
+ goto bad;
+ }
+ } else
+ py_stop = Py_None;
+ }
+ py_slice = PySlice_New(py_start, py_stop, Py_None);
+ Py_XDECREF(owned_start);
+ Py_XDECREF(owned_stop);
+ if (unlikely(!py_slice)) goto bad;
+ }
+#if CYTHON_USE_TYPE_SLOTS
+ result = mp->mp_subscript(obj, py_slice);
+#else
+ result = PyObject_GetItem(obj, py_slice);
+#endif
+ if (!_py_slice) {
+ Py_DECREF(py_slice);
+ }
+ return result;
+ }
+ PyErr_Format(PyExc_TypeError,
+ "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name);
+bad:
+ return NULL;
+}
+
+/* SaveResetException */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ #if PY_VERSION_HEX >= 0x030700A2
+ *type = tstate->exc_state.exc_type;
+ *value = tstate->exc_state.exc_value;
+ *tb = tstate->exc_state.exc_traceback;
+ #else
+ *type = tstate->exc_type;
+ *value = tstate->exc_value;
+ *tb = tstate->exc_traceback;
+ #endif
+ Py_XINCREF(*type);
+ Py_XINCREF(*value);
+ Py_XINCREF(*tb);
+}
+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ #if PY_VERSION_HEX >= 0x030700A2
+ tmp_type = tstate->exc_state.exc_type;
+ tmp_value = tstate->exc_state.exc_value;
+ tmp_tb = tstate->exc_state.exc_traceback;
+ tstate->exc_state.exc_type = type;
+ tstate->exc_state.exc_value = value;
+ tstate->exc_state.exc_traceback = tb;
+ #else
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = type;
+ tstate->exc_value = value;
+ tstate->exc_traceback = tb;
+ #endif
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+}
+#endif
+
+/* PyErrExceptionMatches */
+ #if CYTHON_FAST_THREAD_STATE
+static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
+ Py_ssize_t i, n;
+ n = PyTuple_GET_SIZE(tuple);
+#if PY_MAJOR_VERSION >= 3
+ for (i=0; icurexc_type;
+ if (exc_type == err) return 1;
+ if (unlikely(!exc_type)) return 0;
+ if (unlikely(PyTuple_Check(err)))
+ return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
+ return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
+}
+#endif
+
+/* GetException */
+ #if CYTHON_FAST_THREAD_STATE
+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+#else
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
+#endif
+ PyObject *local_type, *local_value, *local_tb;
+#if CYTHON_FAST_THREAD_STATE
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ local_type = tstate->curexc_type;
+ local_value = tstate->curexc_value;
+ local_tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+#else
+ PyErr_Fetch(&local_type, &local_value, &local_tb);
+#endif
+ PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+#if CYTHON_FAST_THREAD_STATE
+ if (unlikely(tstate->curexc_type))
+#else
+ if (unlikely(PyErr_Occurred()))
+#endif
+ goto bad;
+ #if PY_MAJOR_VERSION >= 3
+ if (local_tb) {
+ if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+ goto bad;
+ }
+ #endif
+ Py_XINCREF(local_tb);
+ Py_XINCREF(local_type);
+ Py_XINCREF(local_value);
+ *type = local_type;
+ *value = local_value;
+ *tb = local_tb;
+#if CYTHON_FAST_THREAD_STATE
+ #if PY_VERSION_HEX >= 0x030700A2
+ tmp_type = tstate->exc_state.exc_type;
+ tmp_value = tstate->exc_state.exc_value;
+ tmp_tb = tstate->exc_state.exc_traceback;
+ tstate->exc_state.exc_type = local_type;
+ tstate->exc_state.exc_value = local_value;
+ tstate->exc_state.exc_traceback = local_tb;
+ #else
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = local_type;
+ tstate->exc_value = local_value;
+ tstate->exc_traceback = local_tb;
+ #endif
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+#else
+ PyErr_SetExcInfo(local_type, local_value, local_tb);
+#endif
+ return 0;
+bad:
+ *type = 0;
+ *value = 0;
+ *tb = 0;
+ Py_XDECREF(local_type);
+ Py_XDECREF(local_value);
+ Py_XDECREF(local_tb);
+ return -1;
+}
+
+/* GetAttr */
+ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
+#if CYTHON_USE_TYPE_SLOTS
+#if PY_MAJOR_VERSION >= 3
+ if (likely(PyUnicode_Check(n)))
+#else
+ if (likely(PyString_Check(n)))
+#endif
+ return __Pyx_PyObject_GetAttrStr(o, n);
+#endif
+ return PyObject_GetAttr(o, n);
+}
+
+/* BytesEquals */
+ static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+ return PyObject_RichCompareBool(s1, s2, equals);
+#else
+ if (s1 == s2) {
+ return (equals == Py_EQ);
+ } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
+ const char *ps1, *ps2;
+ Py_ssize_t length = PyBytes_GET_SIZE(s1);
+ if (length != PyBytes_GET_SIZE(s2))
+ return (equals == Py_NE);
+ ps1 = PyBytes_AS_STRING(s1);
+ ps2 = PyBytes_AS_STRING(s2);
+ if (ps1[0] != ps2[0]) {
+ return (equals == Py_NE);
+ } else if (length == 1) {
+ return (equals == Py_EQ);
+ } else {
+ int result;
+#if CYTHON_USE_UNICODE_INTERNALS
+ Py_hash_t hash1, hash2;
+ hash1 = ((PyBytesObject*)s1)->ob_shash;
+ hash2 = ((PyBytesObject*)s2)->ob_shash;
+ if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
+ return (equals == Py_NE);
+ }
+#endif
+ result = memcmp(ps1, ps2, (size_t)length);
+ return (equals == Py_EQ) ? (result == 0) : (result != 0);
+ }
+ } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
+ return (equals == Py_NE);
+ } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
+ return (equals == Py_NE);
+ } else {
+ int result;
+ PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+ if (!py_result)
+ return -1;
+ result = __Pyx_PyObject_IsTrue(py_result);
+ Py_DECREF(py_result);
+ return result;
+ }
+#endif
+}
+
+/* UnicodeEquals */
+ static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
+#if CYTHON_COMPILING_IN_PYPY
+ return PyObject_RichCompareBool(s1, s2, equals);
+#else
+#if PY_MAJOR_VERSION < 3
+ PyObject* owned_ref = NULL;
+#endif
+ int s1_is_unicode, s2_is_unicode;
+ if (s1 == s2) {
+ goto return_eq;
+ }
+ s1_is_unicode = PyUnicode_CheckExact(s1);
+ s2_is_unicode = PyUnicode_CheckExact(s2);
+#if PY_MAJOR_VERSION < 3
+ if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
+ owned_ref = PyUnicode_FromObject(s2);
+ if (unlikely(!owned_ref))
+ return -1;
+ s2 = owned_ref;
+ s2_is_unicode = 1;
+ } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
+ owned_ref = PyUnicode_FromObject(s1);
+ if (unlikely(!owned_ref))
+ return -1;
+ s1 = owned_ref;
+ s1_is_unicode = 1;
+ } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
+ return __Pyx_PyBytes_Equals(s1, s2, equals);
+ }
+#endif
+ if (s1_is_unicode & s2_is_unicode) {
+ Py_ssize_t length;
+ int kind;
+ void *data1, *data2;
+ if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
+ return -1;
+ length = __Pyx_PyUnicode_GET_LENGTH(s1);
+ if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
+ goto return_ne;
+ }
+#if CYTHON_USE_UNICODE_INTERNALS
+ {
+ Py_hash_t hash1, hash2;
+ #if CYTHON_PEP393_ENABLED
+ hash1 = ((PyASCIIObject*)s1)->hash;
+ hash2 = ((PyASCIIObject*)s2)->hash;
+ #else
+ hash1 = ((PyUnicodeObject*)s1)->hash;
+ hash2 = ((PyUnicodeObject*)s2)->hash;
+ #endif
+ if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
+ goto return_ne;
+ }
+ }
+#endif
+ kind = __Pyx_PyUnicode_KIND(s1);
+ if (kind != __Pyx_PyUnicode_KIND(s2)) {
+ goto return_ne;
+ }
+ data1 = __Pyx_PyUnicode_DATA(s1);
+ data2 = __Pyx_PyUnicode_DATA(s2);
+ if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
+ goto return_ne;
+ } else if (length == 1) {
+ goto return_eq;
+ } else {
+ int result = memcmp(data1, data2, (size_t)(length * kind));
+ #if PY_MAJOR_VERSION < 3
+ Py_XDECREF(owned_ref);
+ #endif
+ return (equals == Py_EQ) ? (result == 0) : (result != 0);
+ }
+ } else if ((s1 == Py_None) & s2_is_unicode) {
+ goto return_ne;
+ } else if ((s2 == Py_None) & s1_is_unicode) {
+ goto return_ne;
+ } else {
+ int result;
+ PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
+ if (!py_result)
+ return -1;
+ result = __Pyx_PyObject_IsTrue(py_result);
+ Py_DECREF(py_result);
+ return result;
+ }
+return_eq:
+ #if PY_MAJOR_VERSION < 3
+ Py_XDECREF(owned_ref);
+ #endif
+ return (equals == Py_EQ);
+return_ne:
+ #if PY_MAJOR_VERSION < 3
+ Py_XDECREF(owned_ref);
+ #endif
+ return (equals == Py_NE);
+#endif
+}
+
+/* StringJoin */
+ #if !CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) {
+ return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL);
+}
+#endif
+
+/* None */
+ static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
+ PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
+}
+
+/* CalculateMetaclass */
+ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
+ Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
+ for (i=0; i < nbases; i++) {
+ PyTypeObject *tmptype;
+ PyObject *tmp = PyTuple_GET_ITEM(bases, i);
+ tmptype = Py_TYPE(tmp);
+#if PY_MAJOR_VERSION < 3
+ if (tmptype == &PyClass_Type)
+ continue;
+#endif
+ if (!metaclass) {
+ metaclass = tmptype;
+ continue;
+ }
+ if (PyType_IsSubtype(metaclass, tmptype))
+ continue;
+ if (PyType_IsSubtype(tmptype, metaclass)) {
+ metaclass = tmptype;
+ continue;
+ }
+ PyErr_SetString(PyExc_TypeError,
+ "metaclass conflict: "
+ "the metaclass of a derived class "
+ "must be a (non-strict) subclass "
+ "of the metaclasses of all its bases");
+ return NULL;
+ }
+ if (!metaclass) {
+#if PY_MAJOR_VERSION < 3
+ metaclass = &PyClass_Type;
+#else
+ metaclass = &PyType_Type;
+#endif
+ }
+ Py_INCREF((PyObject*) metaclass);
+ return (PyObject*) metaclass;
+}
+
+/* FetchCommonType */
+ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
+ PyObject* fake_module;
+ PyTypeObject* cached_type = NULL;
+ fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
+ if (!fake_module) return NULL;
+ Py_INCREF(fake_module);
+ cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
+ if (cached_type) {
+ if (!PyType_Check((PyObject*)cached_type)) {
+ PyErr_Format(PyExc_TypeError,
+ "Shared Cython type %.200s is not a type object",
+ type->tp_name);
+ goto bad;
+ }
+ if (cached_type->tp_basicsize != type->tp_basicsize) {
+ PyErr_Format(PyExc_TypeError,
+ "Shared Cython type %.200s has the wrong size, try recompiling",
+ type->tp_name);
+ goto bad;
+ }
+ } else {
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
+ PyErr_Clear();
+ if (PyType_Ready(type) < 0) goto bad;
+ if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
+ goto bad;
+ Py_INCREF(type);
+ cached_type = type;
+ }
+done:
+ Py_DECREF(fake_module);
+ return cached_type;
+bad:
+ Py_XDECREF(cached_type);
+ cached_type = NULL;
+ goto done;
+}
+
+/* CythonFunction */
+ static PyObject *
+__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
+{
+ if (unlikely(op->func_doc == NULL)) {
+ if (op->func.m_ml->ml_doc) {
+#if PY_MAJOR_VERSION >= 3
+ op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
+#else
+ op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
+#endif
+ if (unlikely(op->func_doc == NULL))
+ return NULL;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ }
+ Py_INCREF(op->func_doc);
+ return op->func_doc;
+}
+static int
+__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp = op->func_doc;
+ if (value == NULL) {
+ value = Py_None;
+ }
+ Py_INCREF(value);
+ op->func_doc = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
+{
+ if (unlikely(op->func_name == NULL)) {
+#if PY_MAJOR_VERSION >= 3
+ op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
+#else
+ op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
+#endif
+ if (unlikely(op->func_name == NULL))
+ return NULL;
+ }
+ Py_INCREF(op->func_name);
+ return op->func_name;
+}
+static int
+__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+ if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+ if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+ PyErr_SetString(PyExc_TypeError,
+ "__name__ must be set to a string object");
+ return -1;
+ }
+ tmp = op->func_name;
+ Py_INCREF(value);
+ op->func_name = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
+{
+ Py_INCREF(op->func_qualname);
+ return op->func_qualname;
+}
+static int
+__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+ if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+ if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+ PyErr_SetString(PyExc_TypeError,
+ "__qualname__ must be set to a string object");
+ return -1;
+ }
+ tmp = op->func_qualname;
+ Py_INCREF(value);
+ op->func_qualname = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
+{
+ PyObject *self;
+ self = m->func_closure;
+ if (self == NULL)
+ self = Py_None;
+ Py_INCREF(self);
+ return self;
+}
+static PyObject *
+__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
+{
+ if (unlikely(op->func_dict == NULL)) {
+ op->func_dict = PyDict_New();
+ if (unlikely(op->func_dict == NULL))
+ return NULL;
+ }
+ Py_INCREF(op->func_dict);
+ return op->func_dict;
+}
+static int
+__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp;
+ if (unlikely(value == NULL)) {
+ PyErr_SetString(PyExc_TypeError,
+ "function's dictionary may not be deleted");
+ return -1;
+ }
+ if (unlikely(!PyDict_Check(value))) {
+ PyErr_SetString(PyExc_TypeError,
+ "setting function's dictionary to a non-dict");
+ return -1;
+ }
+ tmp = op->func_dict;
+ Py_INCREF(value);
+ op->func_dict = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
+{
+ Py_INCREF(op->func_globals);
+ return op->func_globals;
+}
+static PyObject *
+__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
+{
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+static PyObject *
+__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
+{
+ PyObject* result = (op->func_code) ? op->func_code : Py_None;
+ Py_INCREF(result);
+ return result;
+}
+static int
+__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
+ int result = 0;
+ PyObject *res = op->defaults_getter((PyObject *) op);
+ if (unlikely(!res))
+ return -1;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
+ Py_INCREF(op->defaults_tuple);
+ op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
+ Py_INCREF(op->defaults_kwdict);
+ #else
+ op->defaults_tuple = PySequence_ITEM(res, 0);
+ if (unlikely(!op->defaults_tuple)) result = -1;
+ else {
+ op->defaults_kwdict = PySequence_ITEM(res, 1);
+ if (unlikely(!op->defaults_kwdict)) result = -1;
+ }
+ #endif
+ Py_DECREF(res);
+ return result;
+}
+static int
+__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
+ PyObject* tmp;
+ if (!value) {
+ value = Py_None;
+ } else if (value != Py_None && !PyTuple_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__defaults__ must be set to a tuple object");
+ return -1;
+ }
+ Py_INCREF(value);
+ tmp = op->defaults_tuple;
+ op->defaults_tuple = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
+ PyObject* result = op->defaults_tuple;
+ if (unlikely(!result)) {
+ if (op->defaults_getter) {
+ if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+ result = op->defaults_tuple;
+ } else {
+ result = Py_None;
+ }
+ }
+ Py_INCREF(result);
+ return result;
+}
+static int
+__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
+ PyObject* tmp;
+ if (!value) {
+ value = Py_None;
+ } else if (value != Py_None && !PyDict_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__kwdefaults__ must be set to a dict object");
+ return -1;
+ }
+ Py_INCREF(value);
+ tmp = op->defaults_kwdict;
+ op->defaults_kwdict = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
+ PyObject* result = op->defaults_kwdict;
+ if (unlikely(!result)) {
+ if (op->defaults_getter) {
+ if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+ result = op->defaults_kwdict;
+ } else {
+ result = Py_None;
+ }
+ }
+ Py_INCREF(result);
+ return result;
+}
+static int
+__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
+ PyObject* tmp;
+ if (!value || value == Py_None) {
+ value = NULL;
+ } else if (!PyDict_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__annotations__ must be set to a dict object");
+ return -1;
+ }
+ Py_XINCREF(value);
+ tmp = op->func_annotations;
+ op->func_annotations = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
+ PyObject* result = op->func_annotations;
+ if (unlikely(!result)) {
+ result = PyDict_New();
+ if (unlikely(!result)) return NULL;
+ op->func_annotations = result;
+ }
+ Py_INCREF(result);
+ return result;
+}
+static PyGetSetDef __pyx_CyFunction_getsets[] = {
+ {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+ {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+ {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+ {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+ {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
+ {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
+ {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+ {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+ {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+ {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+ {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+ {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+ {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+ {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+ {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+ {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+ {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
+ {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+static PyMemberDef __pyx_CyFunction_members[] = {
+ {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
+ {0, 0, 0, 0, 0}
+};
+static PyObject *
+__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
+{
+#if PY_MAJOR_VERSION >= 3
+ return PyUnicode_FromString(m->func.m_ml->ml_name);
+#else
+ return PyString_FromString(m->func.m_ml->ml_name);
+#endif
+}
+static PyMethodDef __pyx_CyFunction_methods[] = {
+ {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
+ {0, 0, 0, 0}
+};
+#if PY_VERSION_HEX < 0x030500A0
+#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
+#else
+#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
+#endif
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
+ PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
+ __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
+ if (op == NULL)
+ return NULL;
+ op->flags = flags;
+ __Pyx_CyFunction_weakreflist(op) = NULL;
+ op->func.m_ml = ml;
+ op->func.m_self = (PyObject *) op;
+ Py_XINCREF(closure);
+ op->func_closure = closure;
+ Py_XINCREF(module);
+ op->func.m_module = module;
+ op->func_dict = NULL;
+ op->func_name = NULL;
+ Py_INCREF(qualname);
+ op->func_qualname = qualname;
+ op->func_doc = NULL;
+ op->func_classobj = NULL;
+ op->func_globals = globals;
+ Py_INCREF(op->func_globals);
+ Py_XINCREF(code);
+ op->func_code = code;
+ op->defaults_pyobjects = 0;
+ op->defaults = NULL;
+ op->defaults_tuple = NULL;
+ op->defaults_kwdict = NULL;
+ op->defaults_getter = NULL;
+ op->func_annotations = NULL;
+ PyObject_GC_Track(op);
+ return (PyObject *) op;
+}
+static int
+__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
+{
+ Py_CLEAR(m->func_closure);
+ Py_CLEAR(m->func.m_module);
+ Py_CLEAR(m->func_dict);
+ Py_CLEAR(m->func_name);
+ Py_CLEAR(m->func_qualname);
+ Py_CLEAR(m->func_doc);
+ Py_CLEAR(m->func_globals);
+ Py_CLEAR(m->func_code);
+ Py_CLEAR(m->func_classobj);
+ Py_CLEAR(m->defaults_tuple);
+ Py_CLEAR(m->defaults_kwdict);
+ Py_CLEAR(m->func_annotations);
+ if (m->defaults) {
+ PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+ int i;
+ for (i = 0; i < m->defaults_pyobjects; i++)
+ Py_XDECREF(pydefaults[i]);
+ PyObject_Free(m->defaults);
+ m->defaults = NULL;
+ }
+ return 0;
+}
+static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
+{
+ if (__Pyx_CyFunction_weakreflist(m) != NULL)
+ PyObject_ClearWeakRefs((PyObject *) m);
+ __Pyx_CyFunction_clear(m);
+ PyObject_GC_Del(m);
+}
+static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
+{
+ PyObject_GC_UnTrack(m);
+ __Pyx__CyFunction_dealloc(m);
+}
+static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
+{
+ Py_VISIT(m->func_closure);
+ Py_VISIT(m->func.m_module);
+ Py_VISIT(m->func_dict);
+ Py_VISIT(m->func_name);
+ Py_VISIT(m->func_qualname);
+ Py_VISIT(m->func_doc);
+ Py_VISIT(m->func_globals);
+ Py_VISIT(m->func_code);
+ Py_VISIT(m->func_classobj);
+ Py_VISIT(m->defaults_tuple);
+ Py_VISIT(m->defaults_kwdict);
+ if (m->defaults) {
+ PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+ int i;
+ for (i = 0; i < m->defaults_pyobjects; i++)
+ Py_VISIT(pydefaults[i]);
+ }
+ return 0;
+}
+static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
+{
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
+ Py_INCREF(func);
+ return func;
+ }
+ if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
+ if (type == NULL)
+ type = (PyObject *)(Py_TYPE(obj));
+ return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
+ }
+ if (obj == Py_None)
+ obj = NULL;
+ return __Pyx_PyMethod_New(func, obj, type);
+}
+static PyObject*
+__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
+{
+#if PY_MAJOR_VERSION >= 3
+ return PyUnicode_FromFormat("",
+ op->func_qualname, (void *)op);
+#else
+ return PyString_FromFormat("",
+ PyString_AsString(op->func_qualname), (void *)op);
+#endif
+}
+static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
+ PyCFunctionObject* f = (PyCFunctionObject*)func;
+ PyCFunction meth = f->m_ml->ml_meth;
+ Py_ssize_t size;
+ switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
+ case METH_VARARGS:
+ if (likely(kw == NULL || PyDict_Size(kw) == 0))
+ return (*meth)(self, arg);
+ break;
+ case METH_VARARGS | METH_KEYWORDS:
+ return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
+ case METH_NOARGS:
+ if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
+ size = PyTuple_GET_SIZE(arg);
+ if (likely(size == 0))
+ return (*meth)(self, NULL);
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
+ f->m_ml->ml_name, size);
+ return NULL;
+ }
+ break;
+ case METH_O:
+ if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
+ size = PyTuple_GET_SIZE(arg);
+ if (likely(size == 1)) {
+ PyObject *result, *arg0;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ arg0 = PyTuple_GET_ITEM(arg, 0);
+ #else
+ arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
+ #endif
+ result = (*meth)(self, arg0);
+ #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
+ Py_DECREF(arg0);
+ #endif
+ return result;
+ }
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
+ f->m_ml->ml_name, size);
+ return NULL;
+ }
+ break;
+ default:
+ PyErr_SetString(PyExc_SystemError, "Bad call flags in "
+ "__Pyx_CyFunction_Call. METH_OLDARGS is no "
+ "longer supported!");
+ return NULL;
+ }
+ PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
+ f->m_ml->ml_name);
+ return NULL;
+}
+static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+ return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
+}
+static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
+ PyObject *result;
+ __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
+ if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
+ Py_ssize_t argc;
+ PyObject *new_args;
+ PyObject *self;
+ argc = PyTuple_GET_SIZE(args);
+ new_args = PyTuple_GetSlice(args, 1, argc);
+ if (unlikely(!new_args))
+ return NULL;
+ self = PyTuple_GetItem(args, 0);
+ if (unlikely(!self)) {
+ Py_DECREF(new_args);
+ return NULL;
+ }
+ result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
+ Py_DECREF(new_args);
+ } else {
+ result = __Pyx_CyFunction_Call(func, args, kw);
+ }
+ return result;
+}
+static PyTypeObject __pyx_CyFunctionType_type = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "cython_function_or_method",
+ sizeof(__pyx_CyFunctionObject),
+ 0,
+ (destructor) __Pyx_CyFunction_dealloc,
+ 0,
+ 0,
+ 0,
+#if PY_MAJOR_VERSION < 3
+ 0,
+#else
+ 0,
+#endif
+ (reprfunc) __Pyx_CyFunction_repr,
+ 0,
+ 0,
+ 0,
+ 0,
+ __Pyx_CyFunction_CallAsMethod,
+ 0,
+ 0,
+ 0,
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
+ 0,
+ (traverseproc) __Pyx_CyFunction_traverse,
+ (inquiry) __Pyx_CyFunction_clear,
+ 0,
+#if PY_VERSION_HEX < 0x030500A0
+ offsetof(__pyx_CyFunctionObject, func_weakreflist),
+#else
+ offsetof(PyCFunctionObject, m_weakreflist),
+#endif
+ 0,
+ 0,
+ __pyx_CyFunction_methods,
+ __pyx_CyFunction_members,
+ __pyx_CyFunction_getsets,
+ 0,
+ 0,
+ __Pyx_CyFunction_descr_get,
+ 0,
+ offsetof(__pyx_CyFunctionObject, func_dict),
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+#if PY_VERSION_HEX >= 0x030400a1
+ 0,
+#endif
+};
+static int __pyx_CyFunction_init(void) {
+ __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
+ if (unlikely(__pyx_CyFunctionType == NULL)) {
+ return -1;
+ }
+ return 0;
+}
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->defaults = PyObject_Malloc(size);
+ if (unlikely(!m->defaults))
+ return PyErr_NoMemory();
+ memset(m->defaults, 0, size);
+ m->defaults_pyobjects = pyobjects;
+ return m->defaults;
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->defaults_tuple = tuple;
+ Py_INCREF(tuple);
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->defaults_kwdict = dict;
+ Py_INCREF(dict);
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->func_annotations = dict;
+ Py_INCREF(dict);
+}
+
+/* Py3ClassCreate */
+ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
+ PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
+ PyObject *ns;
+ if (metaclass) {
+ PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
+ if (prep) {
+ PyObject *pargs = PyTuple_Pack(2, name, bases);
+ if (unlikely(!pargs)) {
+ Py_DECREF(prep);
+ return NULL;
+ }
+ ns = PyObject_Call(prep, pargs, mkw);
+ Py_DECREF(prep);
+ Py_DECREF(pargs);
+ } else {
+ if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
+ return NULL;
+ PyErr_Clear();
+ ns = PyDict_New();
+ }
+ } else {
+ ns = PyDict_New();
+ }
+ if (unlikely(!ns))
+ return NULL;
+ if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
+ if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
+ if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
+ return ns;
+bad:
+ Py_DECREF(ns);
+ return NULL;
+}
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
+ PyObject *dict, PyObject *mkw,
+ int calculate_metaclass, int allow_py2_metaclass) {
+ PyObject *result, *margs;
+ PyObject *owned_metaclass = NULL;
+ if (allow_py2_metaclass) {
+ owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
+ if (owned_metaclass) {
+ metaclass = owned_metaclass;
+ } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
+ PyErr_Clear();
+ } else {
+ return NULL;
+ }
+ }
+ if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
+ metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
+ Py_XDECREF(owned_metaclass);
+ if (unlikely(!metaclass))
+ return NULL;
+ owned_metaclass = metaclass;
+ }
+ margs = PyTuple_Pack(3, name, bases, dict);
+ if (unlikely(!margs)) {
+ result = NULL;
+ } else {
+ result = PyObject_Call(metaclass, margs, mkw);
+ Py_DECREF(margs);
+ }
+ Py_XDECREF(owned_metaclass);
+ return result;
+}
+
+/* CLineInTraceback */
+ #ifndef CYTHON_CLINE_IN_TRACEBACK
+static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
+ PyObject *use_cline;
+ PyObject *ptype, *pvalue, *ptraceback;
+#if CYTHON_COMPILING_IN_CPYTHON
+ PyObject **cython_runtime_dict;
+#endif
+ __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
+#if CYTHON_COMPILING_IN_CPYTHON
+ cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
+ if (likely(cython_runtime_dict)) {
+ use_cline = PyDict_GetItem(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
+ } else
+#endif
+ {
+ PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
+ if (use_cline_obj) {
+ use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
+ Py_DECREF(use_cline_obj);
+ } else {
+ PyErr_Clear();
+ use_cline = NULL;
+ }
+ }
+ if (!use_cline) {
+ c_line = 0;
+ PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
+ }
+ else if (PyObject_Not(use_cline) != 0) {
+ c_line = 0;
+ }
+ __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
+ return c_line;
+}
+#endif
+
+/* CodeObjectCache */
+ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+ int start = 0, mid = 0, end = count - 1;
+ if (end >= 0 && code_line > entries[end].code_line) {
+ return count;
+ }
+ while (start < end) {
+ mid = start + (end - start) / 2;
+ if (code_line < entries[mid].code_line) {
+ end = mid;
+ } else if (code_line > entries[mid].code_line) {
+ start = mid + 1;
+ } else {
+ return mid;
+ }
+ }
+ if (code_line <= entries[mid].code_line) {
+ return mid;
+ } else {
+ return mid + 1;
+ }
+}
+static PyCodeObject *__pyx_find_code_object(int code_line) {
+ PyCodeObject* code_object;
+ int pos;
+ if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
+ return NULL;
+ }
+ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+ if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
+ return NULL;
+ }
+ code_object = __pyx_code_cache.entries[pos].code_object;
+ Py_INCREF(code_object);
+ return code_object;
+}
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
+ int pos, i;
+ __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
+ if (unlikely(!code_line)) {
+ return;
+ }
+ if (unlikely(!entries)) {
+ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
+ if (likely(entries)) {
+ __pyx_code_cache.entries = entries;
+ __pyx_code_cache.max_count = 64;
+ __pyx_code_cache.count = 1;
+ entries[0].code_line = code_line;
+ entries[0].code_object = code_object;
+ Py_INCREF(code_object);
+ }
+ return;
+ }
+ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+ if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
+ PyCodeObject* tmp = entries[pos].code_object;
+ entries[pos].code_object = code_object;
+ Py_DECREF(tmp);
+ return;
+ }
+ if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
+ int new_max = __pyx_code_cache.max_count + 64;
+ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
+ __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
+ if (unlikely(!entries)) {
+ return;
+ }
+ __pyx_code_cache.entries = entries;
+ __pyx_code_cache.max_count = new_max;
+ }
+ for (i=__pyx_code_cache.count; i>pos; i--) {
+ entries[i] = entries[i-1];
+ }
+ entries[pos].code_line = code_line;
+ entries[pos].code_object = code_object;
+ __pyx_code_cache.count++;
+ Py_INCREF(code_object);
+}
+
+/* AddTraceback */
+ #include "compile.h"
+#include "frameobject.h"
+#include "traceback.h"
+static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
+ const char *funcname, int c_line,
+ int py_line, const char *filename) {
+ PyCodeObject *py_code = 0;
+ PyObject *py_srcfile = 0;
+ PyObject *py_funcname = 0;
+ #if PY_MAJOR_VERSION < 3
+ py_srcfile = PyString_FromString(filename);
+ #else
+ py_srcfile = PyUnicode_FromString(filename);
+ #endif
+ if (!py_srcfile) goto bad;
+ if (c_line) {
+ #if PY_MAJOR_VERSION < 3
+ py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+ #else
+ py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+ #endif
+ }
+ else {
+ #if PY_MAJOR_VERSION < 3
+ py_funcname = PyString_FromString(funcname);
+ #else
+ py_funcname = PyUnicode_FromString(funcname);
+ #endif
+ }
+ if (!py_funcname) goto bad;
+ py_code = __Pyx_PyCode_New(
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ __pyx_empty_bytes, /*PyObject *code,*/
+ __pyx_empty_tuple, /*PyObject *consts,*/
+ __pyx_empty_tuple, /*PyObject *names,*/
+ __pyx_empty_tuple, /*PyObject *varnames,*/
+ __pyx_empty_tuple, /*PyObject *freevars,*/
+ __pyx_empty_tuple, /*PyObject *cellvars,*/
+ py_srcfile, /*PyObject *filename,*/
+ py_funcname, /*PyObject *name,*/
+ py_line,
+ __pyx_empty_bytes /*PyObject *lnotab*/
+ );
+ Py_DECREF(py_srcfile);
+ Py_DECREF(py_funcname);
+ return py_code;
+bad:
+ Py_XDECREF(py_srcfile);
+ Py_XDECREF(py_funcname);
+ return NULL;
+}
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename) {
+ PyCodeObject *py_code = 0;
+ PyFrameObject *py_frame = 0;
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ if (c_line) {
+ c_line = __Pyx_CLineForTraceback(tstate, c_line);
+ }
+ py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
+ if (!py_code) {
+ py_code = __Pyx_CreateCodeObjectForTraceback(
+ funcname, c_line, py_line, filename);
+ if (!py_code) goto bad;
+ __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
+ }
+ py_frame = PyFrame_New(
+ tstate, /*PyThreadState *tstate,*/
+ py_code, /*PyCodeObject *code,*/
+ __pyx_d, /*PyObject *globals,*/
+ 0 /*PyObject *locals*/
+ );
+ if (!py_frame) goto bad;
+ __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
+ PyTraceBack_Here(py_frame);
+bad:
+ Py_XDECREF(py_code);
+ Py_XDECREF(py_frame);
+}
+
+/* CIntToPy */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+ const long neg_one = (long) -1, const_zero = (long) 0;
+ const int is_unsigned = neg_one > const_zero;
+ if (is_unsigned) {
+ if (sizeof(long) < sizeof(long)) {
+ return PyInt_FromLong((long) value);
+ } else if (sizeof(long) <= sizeof(unsigned long)) {
+ return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
+ }
+ } else {
+ if (sizeof(long) <= sizeof(long)) {
+ return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
+ return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
+ }
+ }
+ {
+ int one = 1; int little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&value;
+ return _PyLong_FromByteArray(bytes, sizeof(long),
+ little, !is_unsigned);
+ }
+}
+
+/* CIntFromPyVerify */
+ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
+#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
+#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
+ {\
+ func_type value = func_value;\
+ if (sizeof(target_type) < sizeof(func_type)) {\
+ if (unlikely(value != (func_type) (target_type) value)) {\
+ func_type zero = 0;\
+ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
+ return (target_type) -1;\
+ if (is_unsigned && unlikely(value < zero))\
+ goto raise_neg_overflow;\
+ else\
+ goto raise_overflow;\
+ }\
+ }\
+ return (target_type) value;\
+ }
+
+/* CIntFromPy */
+ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+ const long neg_one = (long) -1, const_zero = (long) 0;
+ const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+ if (sizeof(long) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
+ } else {
+ long val = PyInt_AS_LONG(x);
+ if (is_unsigned && unlikely(val < 0)) {
+ goto raise_neg_overflow;
+ }
+ return (long) val;
+ }
+ } else
+#endif
+ if (likely(PyLong_Check(x))) {
+ if (is_unsigned) {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (long) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
+ case 2:
+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
+ return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
+ return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
+ return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ }
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ if (unlikely(Py_SIZE(x) < 0)) {
+ goto raise_neg_overflow;
+ }
+#else
+ {
+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
+ if (unlikely(result < 0))
+ return (long) -1;
+ if (unlikely(result == 1))
+ goto raise_neg_overflow;
+ }
+#endif
+ if (sizeof(long) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
+ }
+ } else {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (long) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
+ case -2:
+ if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 2:
+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case -3:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case -4:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ }
+#endif
+ if (sizeof(long) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
+ }
+ }
+ {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+ PyErr_SetString(PyExc_RuntimeError,
+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+ long val;
+ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+#endif
+ return (long) -1;
+ }
+ } else {
+ long val;
+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+ if (!tmp) return (long) -1;
+ val = __Pyx_PyInt_As_long(tmp);
+ Py_DECREF(tmp);
+ return val;
+ }
+raise_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "value too large to convert to long");
+ return (long) -1;
+raise_neg_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "can't convert negative value to long");
+ return (long) -1;
+}
+
+/* CIntFromPy */
+ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+ const int neg_one = (int) -1, const_zero = (int) 0;
+ const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+ if (sizeof(int) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
+ } else {
+ long val = PyInt_AS_LONG(x);
+ if (is_unsigned && unlikely(val < 0)) {
+ goto raise_neg_overflow;
+ }
+ return (int) val;
+ }
+ } else
+#endif
+ if (likely(PyLong_Check(x))) {
+ if (is_unsigned) {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (int) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
+ case 2:
+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
+ return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
+ return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
+ return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ }
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ if (unlikely(Py_SIZE(x) < 0)) {
+ goto raise_neg_overflow;
+ }
+#else
+ {
+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
+ if (unlikely(result < 0))
+ return (int) -1;
+ if (unlikely(result == 1))
+ goto raise_neg_overflow;
+ }
+#endif
+ if (sizeof(int) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
+ }
+ } else {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (int) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
+ case -2:
+ if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 2:
+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case -3:
+ if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case -4:
+ if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
+ return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ }
+#endif
+ if (sizeof(int) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
+ }
+ }
+ {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+ PyErr_SetString(PyExc_RuntimeError,
+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+ int val;
+ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+#endif
+ return (int) -1;
+ }
+ } else {
+ int val;
+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+ if (!tmp) return (int) -1;
+ val = __Pyx_PyInt_As_int(tmp);
+ Py_DECREF(tmp);
+ return val;
+ }
+raise_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "value too large to convert to int");
+ return (int) -1;
+raise_neg_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "can't convert negative value to int");
+ return (int) -1;
+}
+
+/* FastTypeChecks */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
+ while (a) {
+ a = a->tp_base;
+ if (a == b)
+ return 1;
+ }
+ return b == &PyBaseObject_Type;
+}
+static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
+ PyObject *mro;
+ if (a == b) return 1;
+ mro = a->tp_mro;
+ if (likely(mro)) {
+ Py_ssize_t i, n;
+ n = PyTuple_GET_SIZE(mro);
+ for (i = 0; i < n; i++) {
+ if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
+ return 1;
+ }
+ return 0;
+ }
+ return __Pyx_InBases(a, b);
+}
+#if PY_MAJOR_VERSION == 2
+static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
+ PyObject *exception, *value, *tb;
+ int res;
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrFetch(&exception, &value, &tb);
+ res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
+ if (unlikely(res == -1)) {
+ PyErr_WriteUnraisable(err);
+ res = 0;
+ }
+ if (!res) {
+ res = PyObject_IsSubclass(err, exc_type2);
+ if (unlikely(res == -1)) {
+ PyErr_WriteUnraisable(err);
+ res = 0;
+ }
+ }
+ __Pyx_ErrRestore(exception, value, tb);
+ return res;
+}
+#else
+static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
+ int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
+ if (!res) {
+ res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
+ }
+ return res;
+}
+#endif
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
+ if (likely(err == exc_type)) return 1;
+ if (likely(PyExceptionClass_Check(err))) {
+ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
+ }
+ return PyErr_GivenExceptionMatches(err, exc_type);
+}
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
+ if (likely(err == exc_type1 || err == exc_type2)) return 1;
+ if (likely(PyExceptionClass_Check(err))) {
+ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
+ }
+ return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
+}
+#endif
+
+/* SwapException */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ #if PY_VERSION_HEX >= 0x030700A2
+ tmp_type = tstate->exc_state.exc_type;
+ tmp_value = tstate->exc_state.exc_value;
+ tmp_tb = tstate->exc_state.exc_traceback;
+ tstate->exc_state.exc_type = *type;
+ tstate->exc_state.exc_value = *value;
+ tstate->exc_state.exc_traceback = *tb;
+ #else
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = *type;
+ tstate->exc_value = *value;
+ tstate->exc_traceback = *tb;
+ #endif
+ *type = tmp_type;
+ *value = tmp_value;
+ *tb = tmp_tb;
+}
+#else
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
+ PyErr_SetExcInfo(*type, *value, *tb);
+ *type = tmp_type;
+ *value = tmp_value;
+ *tb = tmp_tb;
+}
+#endif
+
+/* CoroutineBase */
+ #include
+#include
+#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
+static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
+ PyObject *et, *ev, *tb;
+ PyObject *value = NULL;
+ __Pyx_ErrFetch(&et, &ev, &tb);
+ if (!et) {
+ Py_XDECREF(tb);
+ Py_XDECREF(ev);
+ Py_INCREF(Py_None);
+ *pvalue = Py_None;
+ return 0;
+ }
+ if (likely(et == PyExc_StopIteration)) {
+ if (!ev) {
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+#if PY_VERSION_HEX >= 0x030300A0
+ else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
+ value = ((PyStopIterationObject *)ev)->value;
+ Py_INCREF(value);
+ Py_DECREF(ev);
+ }
+#endif
+ else if (unlikely(PyTuple_Check(ev))) {
+ if (PyTuple_GET_SIZE(ev) >= 1) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ value = PyTuple_GET_ITEM(ev, 0);
+ Py_INCREF(value);
+#else
+ value = PySequence_ITEM(ev, 0);
+#endif
+ } else {
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+ Py_DECREF(ev);
+ }
+ else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
+ value = ev;
+ }
+ if (likely(value)) {
+ Py_XDECREF(tb);
+ Py_DECREF(et);
+ *pvalue = value;
+ return 0;
+ }
+ } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
+ __Pyx_ErrRestore(et, ev, tb);
+ return -1;
+ }
+ PyErr_NormalizeException(&et, &ev, &tb);
+ if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
+ __Pyx_ErrRestore(et, ev, tb);
+ return -1;
+ }
+ Py_XDECREF(tb);
+ Py_DECREF(et);
+#if PY_VERSION_HEX >= 0x030300A0
+ value = ((PyStopIterationObject *)ev)->value;
+ Py_INCREF(value);
+ Py_DECREF(ev);
+#else
+ {
+ PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
+ Py_DECREF(ev);
+ if (likely(args)) {
+ value = PySequence_GetItem(args, 0);
+ Py_DECREF(args);
+ }
+ if (unlikely(!value)) {
+ __Pyx_ErrRestore(NULL, NULL, NULL);
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+ }
+#endif
+ *pvalue = value;
+ return 0;
+}
+static CYTHON_INLINE
+void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
+ PyObject *exc_type = self->exc_type;
+ PyObject *exc_value = self->exc_value;
+ PyObject *exc_traceback = self->exc_traceback;
+ self->exc_type = NULL;
+ self->exc_value = NULL;
+ self->exc_traceback = NULL;
+ Py_XDECREF(exc_type);
+ Py_XDECREF(exc_value);
+ Py_XDECREF(exc_traceback);
+}
+#define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
+static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
+ const char *msg;
+ if (0) {
+ #ifdef __Pyx_Coroutine_USED
+ } else if (__Pyx_Coroutine_CheckExact((PyObject*)gen)) {
+ msg = "coroutine already executing";
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
+ msg = "async generator already executing";
+ #endif
+ } else {
+ msg = "generator already executing";
+ }
+ PyErr_SetString(PyExc_ValueError, msg);
+}
+#define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
+static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
+ const char *msg;
+ if (0) {
+ #ifdef __Pyx_Coroutine_USED
+ } else if (__Pyx_Coroutine_CheckExact(gen)) {
+ msg = "can't send non-None value to a just-started coroutine";
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ } else if (__Pyx_AsyncGen_CheckExact(gen)) {
+ msg = "can't send non-None value to a just-started async generator";
+ #endif
+ } else {
+ msg = "can't send non-None value to a just-started generator";
+ }
+ PyErr_SetString(PyExc_TypeError, msg);
+}
+#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
+static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
+ #ifdef __Pyx_Coroutine_USED
+ if (!closing && __Pyx_Coroutine_CheckExact(gen)) {
+ PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
+ } else
+ #endif
+ if (value) {
+ #ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(gen))
+ PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
+ else
+ #endif
+ PyErr_SetNone(PyExc_StopIteration);
+ }
+}
+static
+PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
+ __Pyx_PyThreadState_declare
+ PyThreadState *tstate;
+ PyObject *retval;
+ assert(!self->is_running);
+ if (unlikely(self->resume_label == 0)) {
+ if (unlikely(value && value != Py_None)) {
+ return __Pyx_Coroutine_NotStartedError((PyObject*)self);
+ }
+ }
+ if (unlikely(self->resume_label == -1)) {
+ return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
+ }
+#if CYTHON_FAST_THREAD_STATE
+ __Pyx_PyThreadState_assign
+ tstate = __pyx_tstate;
+#else
+ tstate = __Pyx_PyThreadState_Current;
+#endif
+ if (self->exc_type) {
+#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
+#else
+ if (self->exc_traceback) {
+ PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
+ PyFrameObject *f = tb->tb_frame;
+ Py_XINCREF(tstate->frame);
+ assert(f->f_back == NULL);
+ f->f_back = tstate->frame;
+ }
+#endif
+ __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
+ &self->exc_traceback);
+ } else {
+ __Pyx_Coroutine_ExceptionClear(self);
+ __Pyx_ExceptionSave(&self->exc_type, &self->exc_value, &self->exc_traceback);
+ }
+ self->is_running = 1;
+ retval = self->body((PyObject *) self, tstate, value);
+ self->is_running = 0;
+ return retval;
+}
+static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self) {
+ if (likely(self->exc_traceback)) {
+#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
+#else
+ PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
+ PyFrameObject *f = tb->tb_frame;
+ Py_CLEAR(f->f_back);
+#endif
+ }
+}
+static CYTHON_INLINE
+PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
+ if (unlikely(!retval)) {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ if (!__Pyx_PyErr_Occurred()) {
+ PyObject *exc = PyExc_StopIteration;
+ #ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(gen))
+ exc = __Pyx_PyExc_StopAsyncIteration;
+ #endif
+ __Pyx_PyErr_SetNone(exc);
+ }
+ }
+ return retval;
+}
+static CYTHON_INLINE
+PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
+ PyObject *ret;
+ PyObject *val = NULL;
+ __Pyx_Coroutine_Undelegate(gen);
+ __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
+ ret = __Pyx_Coroutine_SendEx(gen, val, 0);
+ Py_XDECREF(val);
+ return ret;
+}
+static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
+ PyObject *retval;
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
+ PyObject *yf = gen->yieldfrom;
+ if (unlikely(gen->is_running))
+ return __Pyx_Coroutine_AlreadyRunningError(gen);
+ if (yf) {
+ PyObject *ret;
+ gen->is_running = 1;
+ #ifdef __Pyx_Generator_USED
+ if (__Pyx_Generator_CheckExact(yf)) {
+ ret = __Pyx_Coroutine_Send(yf, value);
+ } else
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ if (__Pyx_Coroutine_CheckExact(yf)) {
+ ret = __Pyx_Coroutine_Send(yf, value);
+ } else
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
+ ret = __Pyx_async_gen_asend_send(yf, value);
+ } else
+ #endif
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
+ if (PyGen_CheckExact(yf)) {
+ ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
+ } else
+ #endif
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
+ if (PyCoro_CheckExact(yf)) {
+ ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
+ } else
+ #endif
+ {
+ if (value == Py_None)
+ ret = Py_TYPE(yf)->tp_iternext(yf);
+ else
+ ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
+ }
+ gen->is_running = 0;
+ if (likely(ret)) {
+ return ret;
+ }
+ retval = __Pyx_Coroutine_FinishDelegation(gen);
+ } else {
+ retval = __Pyx_Coroutine_SendEx(gen, value, 0);
+ }
+ return __Pyx_Coroutine_MethodReturn(self, retval);
+}
+static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
+ PyObject *retval = NULL;
+ int err = 0;
+ #ifdef __Pyx_Generator_USED
+ if (__Pyx_Generator_CheckExact(yf)) {
+ retval = __Pyx_Coroutine_Close(yf);
+ if (!retval)
+ return -1;
+ } else
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ if (__Pyx_Coroutine_CheckExact(yf)) {
+ retval = __Pyx_Coroutine_Close(yf);
+ if (!retval)
+ return -1;
+ } else
+ if (__Pyx_CoroutineAwait_CheckExact(yf)) {
+ retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf);
+ if (!retval)
+ return -1;
+ } else
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
+ retval = __Pyx_async_gen_asend_close(yf, NULL);
+ } else
+ if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
+ retval = __Pyx_async_gen_athrow_close(yf, NULL);
+ } else
+ #endif
+ {
+ PyObject *meth;
+ gen->is_running = 1;
+ meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
+ if (unlikely(!meth)) {
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_WriteUnraisable(yf);
+ }
+ PyErr_Clear();
+ } else {
+ retval = PyObject_CallFunction(meth, NULL);
+ Py_DECREF(meth);
+ if (!retval)
+ err = -1;
+ }
+ gen->is_running = 0;
+ }
+ Py_XDECREF(retval);
+ return err;
+}
+static PyObject *__Pyx_Generator_Next(PyObject *self) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
+ PyObject *yf = gen->yieldfrom;
+ if (unlikely(gen->is_running))
+ return __Pyx_Coroutine_AlreadyRunningError(gen);
+ if (yf) {
+ PyObject *ret;
+ gen->is_running = 1;
+ #ifdef __Pyx_Generator_USED
+ if (__Pyx_Generator_CheckExact(yf)) {
+ ret = __Pyx_Generator_Next(yf);
+ } else
+ #endif
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
+ if (PyGen_CheckExact(yf)) {
+ ret = _PyGen_Send((PyGenObject*)yf, NULL);
+ } else
+ #endif
+ ret = Py_TYPE(yf)->tp_iternext(yf);
+ gen->is_running = 0;
+ if (likely(ret)) {
+ return ret;
+ }
+ return __Pyx_Coroutine_FinishDelegation(gen);
+ }
+ return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
+}
+static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ PyObject *retval, *raised_exception;
+ PyObject *yf = gen->yieldfrom;
+ int err = 0;
+ if (unlikely(gen->is_running))
+ return __Pyx_Coroutine_AlreadyRunningError(gen);
+ if (yf) {
+ Py_INCREF(yf);
+ err = __Pyx_Coroutine_CloseIter(gen, yf);
+ __Pyx_Coroutine_Undelegate(gen);
+ Py_DECREF(yf);
+ }
+ if (err == 0)
+ PyErr_SetNone(PyExc_GeneratorExit);
+ retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
+ if (unlikely(retval)) {
+ const char *msg;
+ Py_DECREF(retval);
+ if ((0)) {
+ #ifdef __Pyx_Coroutine_USED
+ } else if (__Pyx_Coroutine_CheckExact(self)) {
+ msg = "coroutine ignored GeneratorExit";
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ } else if (__Pyx_AsyncGen_CheckExact(self)) {
+#if PY_VERSION_HEX < 0x03060000
+ msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
+#else
+ msg = "async generator ignored GeneratorExit";
+#endif
+ #endif
+ } else {
+ msg = "generator ignored GeneratorExit";
+ }
+ PyErr_SetString(PyExc_RuntimeError, msg);
+ return NULL;
+ }
+ raised_exception = PyErr_Occurred();
+ if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
+ if (raised_exception) PyErr_Clear();
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ return NULL;
+}
+static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
+ PyObject *args, int close_on_genexit) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ PyObject *yf = gen->yieldfrom;
+ if (unlikely(gen->is_running))
+ return __Pyx_Coroutine_AlreadyRunningError(gen);
+ if (yf) {
+ PyObject *ret;
+ Py_INCREF(yf);
+ if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
+ int err = __Pyx_Coroutine_CloseIter(gen, yf);
+ Py_DECREF(yf);
+ __Pyx_Coroutine_Undelegate(gen);
+ if (err < 0)
+ return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
+ goto throw_here;
+ }
+ gen->is_running = 1;
+ if (0
+ #ifdef __Pyx_Generator_USED
+ || __Pyx_Generator_CheckExact(yf)
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ || __Pyx_Coroutine_CheckExact(yf)
+ #endif
+ ) {
+ ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
+ #ifdef __Pyx_Coroutine_USED
+ } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
+ ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
+ #endif
+ } else {
+ PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
+ if (unlikely(!meth)) {
+ Py_DECREF(yf);
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ gen->is_running = 0;
+ return NULL;
+ }
+ PyErr_Clear();
+ __Pyx_Coroutine_Undelegate(gen);
+ gen->is_running = 0;
+ goto throw_here;
+ }
+ if (likely(args)) {
+ ret = PyObject_CallObject(meth, args);
+ } else {
+ ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
+ }
+ Py_DECREF(meth);
+ }
+ gen->is_running = 0;
+ Py_DECREF(yf);
+ if (!ret) {
+ ret = __Pyx_Coroutine_FinishDelegation(gen);
+ }
+ return __Pyx_Coroutine_MethodReturn(self, ret);
+ }
+throw_here:
+ __Pyx_Raise(typ, val, tb, NULL);
+ return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
+}
+static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
+ PyObject *typ;
+ PyObject *val = NULL;
+ PyObject *tb = NULL;
+ if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
+ return NULL;
+ return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
+}
+static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
+ Py_VISIT(gen->closure);
+ Py_VISIT(gen->classobj);
+ Py_VISIT(gen->yieldfrom);
+ Py_VISIT(gen->exc_type);
+ Py_VISIT(gen->exc_value);
+ Py_VISIT(gen->exc_traceback);
+ return 0;
+}
+static int __Pyx_Coroutine_clear(PyObject *self) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ Py_CLEAR(gen->closure);
+ Py_CLEAR(gen->classobj);
+ Py_CLEAR(gen->yieldfrom);
+ Py_CLEAR(gen->exc_type);
+ Py_CLEAR(gen->exc_value);
+ Py_CLEAR(gen->exc_traceback);
+#ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(self)) {
+ Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
+ }
+#endif
+ Py_CLEAR(gen->gi_name);
+ Py_CLEAR(gen->gi_qualname);
+ Py_CLEAR(gen->gi_modulename);
+ return 0;
+}
+static void __Pyx_Coroutine_dealloc(PyObject *self) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ PyObject_GC_UnTrack(gen);
+ if (gen->gi_weakreflist != NULL)
+ PyObject_ClearWeakRefs(self);
+ if (gen->resume_label >= 0) {
+ PyObject_GC_Track(self);
+#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
+ if (PyObject_CallFinalizerFromDealloc(self))
+#else
+ Py_TYPE(gen)->tp_del(self);
+ if (self->ob_refcnt > 0)
+#endif
+ {
+ return;
+ }
+ PyObject_GC_UnTrack(self);
+ }
+#ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(self)) {
+ /* We have to handle this case for asynchronous generators
+ right here, because this code has to be between UNTRACK
+ and GC_Del. */
+ Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
+ }
+#endif
+ __Pyx_Coroutine_clear(self);
+ PyObject_GC_Del(gen);
+}
+static void __Pyx_Coroutine_del(PyObject *self) {
+ PyObject *error_type, *error_value, *error_traceback;
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ __Pyx_PyThreadState_declare
+ if (gen->resume_label < 0) {
+ return;
+ }
+#if !CYTHON_USE_TP_FINALIZE
+ assert(self->ob_refcnt == 0);
+ self->ob_refcnt = 1;
+#endif
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
+#ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(self)) {
+ __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
+ PyObject *finalizer = agen->ag_finalizer;
+ if (finalizer && !agen->ag_closed) {
+ PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
+ if (unlikely(!res)) {
+ PyErr_WriteUnraisable(self);
+ } else {
+ Py_DECREF(res);
+ }
+ __Pyx_ErrRestore(error_type, error_value, error_traceback);
+ return;
+ }
+ }
+#endif
+ if (unlikely(gen->resume_label == 0 && !error_value)) {
+#ifdef __Pyx_Coroutine_USED
+#ifdef __Pyx_Generator_USED
+ if (!__Pyx_Generator_CheckExact(self))
+#endif
+ {
+ PyObject_GC_UnTrack(self);
+#if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
+ if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
+ PyErr_WriteUnraisable(self);
+#else
+ {PyObject *msg;
+ char *cmsg;
+ #if CYTHON_COMPILING_IN_PYPY
+ msg = NULL;
+ cmsg = (char*) "coroutine was never awaited";
+ #else
+ char *cname;
+ PyObject *qualname;
+ qualname = gen->gi_qualname;
+ cname = PyString_AS_STRING(qualname);
+ msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
+ if (unlikely(!msg)) {
+ PyErr_Clear();
+ cmsg = (char*) "coroutine was never awaited";
+ } else {
+ cmsg = PyString_AS_STRING(msg);
+ }
+ #endif
+ if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
+ PyErr_WriteUnraisable(self);
+ Py_XDECREF(msg);}
+#endif
+ PyObject_GC_Track(self);
+ }
+#endif
+ } else {
+ PyObject *res = __Pyx_Coroutine_Close(self);
+ if (unlikely(!res)) {
+ if (PyErr_Occurred())
+ PyErr_WriteUnraisable(self);
+ } else {
+ Py_DECREF(res);
+ }
+ }
+ __Pyx_ErrRestore(error_type, error_value, error_traceback);
+#if !CYTHON_USE_TP_FINALIZE
+ assert(self->ob_refcnt > 0);
+ if (--self->ob_refcnt == 0) {
+ return;
+ }
+ {
+ Py_ssize_t refcnt = self->ob_refcnt;
+ _Py_NewReference(self);
+ self->ob_refcnt = refcnt;
+ }
+#if CYTHON_COMPILING_IN_CPYTHON
+ assert(PyType_IS_GC(self->ob_type) &&
+ _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
+ _Py_DEC_REFTOTAL;
+#endif
+#ifdef COUNT_ALLOCS
+ --Py_TYPE(self)->tp_frees;
+ --Py_TYPE(self)->tp_allocs;
+#endif
+#endif
+}
+static PyObject *
+__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
+{
+ PyObject *name = self->gi_name;
+ if (unlikely(!name)) name = Py_None;
+ Py_INCREF(name);
+ return name;
+}
+static int
+__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
+{
+ PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+ if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+ if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+ PyErr_SetString(PyExc_TypeError,
+ "__name__ must be set to a string object");
+ return -1;
+ }
+ tmp = self->gi_name;
+ Py_INCREF(value);
+ self->gi_name = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
+{
+ PyObject *name = self->gi_qualname;
+ if (unlikely(!name)) name = Py_None;
+ Py_INCREF(name);
+ return name;
+}
+static int
+__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
+{
+ PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+ if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+ if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+ PyErr_SetString(PyExc_TypeError,
+ "__qualname__ must be set to a string object");
+ return -1;
+ }
+ tmp = self->gi_qualname;
+ Py_INCREF(value);
+ self->gi_qualname = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static __pyx_CoroutineObject *__Pyx__Coroutine_New(
+ PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *closure,
+ PyObject *name, PyObject *qualname, PyObject *module_name) {
+ __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
+ if (unlikely(!gen))
+ return NULL;
+ return __Pyx__Coroutine_NewInit(gen, body, closure, name, qualname, module_name);
+}
+static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
+ __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *closure,
+ PyObject *name, PyObject *qualname, PyObject *module_name) {
+ gen->body = body;
+ gen->closure = closure;
+ Py_XINCREF(closure);
+ gen->is_running = 0;
+ gen->resume_label = 0;
+ gen->classobj = NULL;
+ gen->yieldfrom = NULL;
+ gen->exc_type = NULL;
+ gen->exc_value = NULL;
+ gen->exc_traceback = NULL;
+ gen->gi_weakreflist = NULL;
+ Py_XINCREF(qualname);
+ gen->gi_qualname = qualname;
+ Py_XINCREF(name);
+ gen->gi_name = name;
+ Py_XINCREF(module_name);
+ gen->gi_modulename = module_name;
+ PyObject_GC_Track(gen);
+ return gen;
+}
+
+/* PatchModuleWithCoroutine */
+ static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
+#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+ int result;
+ PyObject *globals, *result_obj;
+ globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
+ result = PyDict_SetItemString(globals, "_cython_coroutine_type",
+ #ifdef __Pyx_Coroutine_USED
+ (PyObject*)__pyx_CoroutineType);
+ #else
+ Py_None);
+ #endif
+ if (unlikely(result < 0)) goto ignore;
+ result = PyDict_SetItemString(globals, "_cython_generator_type",
+ #ifdef __Pyx_Generator_USED
+ (PyObject*)__pyx_GeneratorType);
+ #else
+ Py_None);
+ #endif
+ if (unlikely(result < 0)) goto ignore;
+ if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
+ if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
+ result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
+ if (unlikely(!result_obj)) goto ignore;
+ Py_DECREF(result_obj);
+ Py_DECREF(globals);
+ return module;
+ignore:
+ Py_XDECREF(globals);
+ PyErr_WriteUnraisable(module);
+ if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
+ Py_DECREF(module);
+ module = NULL;
+ }
+#else
+ py_code++;
+#endif
+ return module;
+}
+
+/* PatchGeneratorABC */
+ #ifndef CYTHON_REGISTER_ABCS
+#define CYTHON_REGISTER_ABCS 1
+#endif
+#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+static PyObject* __Pyx_patch_abc_module(PyObject *module);
+static PyObject* __Pyx_patch_abc_module(PyObject *module) {
+ module = __Pyx_Coroutine_patch_module(
+ module, ""
+"if _cython_generator_type is not None:\n"
+" try: Generator = _module.Generator\n"
+" except AttributeError: pass\n"
+" else: Generator.register(_cython_generator_type)\n"
+"if _cython_coroutine_type is not None:\n"
+" try: Coroutine = _module.Coroutine\n"
+" except AttributeError: pass\n"
+" else: Coroutine.register(_cython_coroutine_type)\n"
+ );
+ return module;
+}
+#endif
+static int __Pyx_patch_abc(void) {
+#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+ static int abc_patched = 0;
+ if (CYTHON_REGISTER_ABCS && !abc_patched) {
+ PyObject *module;
+ module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
+ if (!module) {
+ PyErr_WriteUnraisable(NULL);
+ if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
+ ((PY_MAJOR_VERSION >= 3) ?
+ "Cython module failed to register with collections.abc module" :
+ "Cython module failed to register with collections module"), 1) < 0)) {
+ return -1;
+ }
+ } else {
+ module = __Pyx_patch_abc_module(module);
+ abc_patched = 1;
+ if (unlikely(!module))
+ return -1;
+ Py_DECREF(module);
+ }
+ module = PyImport_ImportModule("backports_abc");
+ if (module) {
+ module = __Pyx_patch_abc_module(module);
+ Py_XDECREF(module);
+ }
+ if (!module) {
+ PyErr_Clear();
+ }
+ }
+#else
+ if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
+#endif
+ return 0;
+}
+
+/* Generator */
+ static PyMethodDef __pyx_Generator_methods[] = {
+ {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
+ (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
+ {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
+ (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
+ {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
+ (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
+ {0, 0, 0, 0}
+};
+static PyMemberDef __pyx_Generator_memberlist[] = {
+ {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
+ {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
+ (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
+ {0, 0, 0, 0, 0}
+};
+static PyGetSetDef __pyx_Generator_getsets[] = {
+ {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
+ (char*) PyDoc_STR("name of the generator"), 0},
+ {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
+ (char*) PyDoc_STR("qualified name of the generator"), 0},
+ {0, 0, 0, 0, 0}
+};
+static PyTypeObject __pyx_GeneratorType_type = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "generator",
+ sizeof(__pyx_CoroutineObject),
+ 0,
+ (destructor) __Pyx_Coroutine_dealloc,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
+ 0,
+ (traverseproc) __Pyx_Coroutine_traverse,
+ 0,
+ 0,
+ offsetof(__pyx_CoroutineObject, gi_weakreflist),
+ 0,
+ (iternextfunc) __Pyx_Generator_Next,
+ __pyx_Generator_methods,
+ __pyx_Generator_memberlist,
+ __pyx_Generator_getsets,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+#if CYTHON_USE_TP_FINALIZE
+ 0,
+#else
+ __Pyx_Coroutine_del,
+#endif
+ 0,
+#if CYTHON_USE_TP_FINALIZE
+ __Pyx_Coroutine_del,
+#elif PY_VERSION_HEX >= 0x030400a1
+ 0,
+#endif
+};
+static int __pyx_Generator_init(void) {
+ __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
+ __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
+ __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
+ if (unlikely(!__pyx_GeneratorType)) {
+ return -1;
+ }
+ return 0;
+}
+
+/* CheckBinaryVersion */
+ static int __Pyx_check_binary_version(void) {
+ char ctversion[4], rtversion[4];
+ PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
+ PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
+ if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
+ char message[200];
+ PyOS_snprintf(message, sizeof(message),
+ "compiletime version %s of module '%.100s' "
+ "does not match runtime version %s",
+ ctversion, __Pyx_MODULE_NAME, rtversion);
+ return PyErr_WarnEx(NULL, message, 1);
+ }
+ return 0;
+}
+
+/* InitStrings */
+ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
+ while (t->p) {
+ #if PY_MAJOR_VERSION < 3
+ if (t->is_unicode) {
+ *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
+ } else if (t->intern) {
+ *t->p = PyString_InternFromString(t->s);
+ } else {
+ *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
+ }
+ #else
+ if (t->is_unicode | t->is_str) {
+ if (t->intern) {
+ *t->p = PyUnicode_InternFromString(t->s);
+ } else if (t->encoding) {
+ *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
+ } else {
+ *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+ }
+ } else {
+ *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
+ }
+ #endif
+ if (!*t->p)
+ return -1;
+ if (PyObject_Hash(*t->p) == -1)
+ PyErr_Clear();
+ ++t;
+ }
+ return 0;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
+ return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
+}
+static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
+ Py_ssize_t ignore;
+ return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+#if !CYTHON_PEP393_ENABLED
+static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+ char* defenc_c;
+ PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+ if (!defenc) return NULL;
+ defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ {
+ char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+ char* c;
+ for (c = defenc_c; c < end; c++) {
+ if ((unsigned char) (*c) >= 128) {
+ PyUnicode_AsASCIIString(o);
+ return NULL;
+ }
+ }
+ }
+#endif
+ *length = PyBytes_GET_SIZE(defenc);
+ return defenc_c;
+}
+#else
+static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+ if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ if (likely(PyUnicode_IS_ASCII(o))) {
+ *length = PyUnicode_GET_LENGTH(o);
+ return PyUnicode_AsUTF8(o);
+ } else {
+ PyUnicode_AsASCIIString(o);
+ return NULL;
+ }
+#else
+ return PyUnicode_AsUTF8AndSize(o, length);
+#endif
+}
+#endif
+#endif
+static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+ if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+ PyUnicode_Check(o)) {
+ return __Pyx_PyUnicode_AsStringAndSize(o, length);
+ } else
+#endif
+#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
+ if (PyByteArray_Check(o)) {
+ *length = PyByteArray_GET_SIZE(o);
+ return PyByteArray_AS_STRING(o);
+ } else
+#endif
+ {
+ char* result;
+ int r = PyBytes_AsStringAndSize(o, &result, length);
+ if (unlikely(r < 0)) {
+ return NULL;
+ } else {
+ return result;
+ }
+ }
+}
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+ int is_true = x == Py_True;
+ if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
+ else return PyObject_IsTrue(x);
+}
+static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
+#if PY_MAJOR_VERSION >= 3
+ if (PyLong_Check(result)) {
+ if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
+ "__int__ returned non-int (type %.200s). "
+ "The ability to return an instance of a strict subclass of int "
+ "is deprecated, and may be removed in a future version of Python.",
+ Py_TYPE(result)->tp_name)) {
+ Py_DECREF(result);
+ return NULL;
+ }
+ return result;
+ }
+#endif
+ PyErr_Format(PyExc_TypeError,
+ "__%.4s__ returned non-%.4s (type %.200s)",
+ type_name, type_name, Py_TYPE(result)->tp_name);
+ Py_DECREF(result);
+ return NULL;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
+#if CYTHON_USE_TYPE_SLOTS
+ PyNumberMethods *m;
+#endif
+ const char *name = NULL;
+ PyObject *res = NULL;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x) || PyLong_Check(x)))
+#else
+ if (likely(PyLong_Check(x)))
+#endif
+ return __Pyx_NewRef(x);
+#if CYTHON_USE_TYPE_SLOTS
+ m = Py_TYPE(x)->tp_as_number;
+ #if PY_MAJOR_VERSION < 3
+ if (m && m->nb_int) {
+ name = "int";
+ res = m->nb_int(x);
+ }
+ else if (m && m->nb_long) {
+ name = "long";
+ res = m->nb_long(x);
+ }
+ #else
+ if (likely(m && m->nb_int)) {
+ name = "int";
+ res = m->nb_int(x);
+ }
+ #endif
+#else
+ if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
+ res = PyNumber_Int(x);
+ }
+#endif
+ if (likely(res)) {
+#if PY_MAJOR_VERSION < 3
+ if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
+#else
+ if (unlikely(!PyLong_CheckExact(res))) {
+#endif
+ return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
+ }
+ }
+ else if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_TypeError,
+ "an integer is required");
+ }
+ return res;
+}
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+ Py_ssize_t ival;
+ PyObject *x;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(b))) {
+ if (sizeof(Py_ssize_t) >= sizeof(long))
+ return PyInt_AS_LONG(b);
+ else
+ return PyInt_AsSsize_t(x);
+ }
+#endif
+ if (likely(PyLong_CheckExact(b))) {
+ #if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)b)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(b);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ ival = likely(size) ? digits[0] : 0;
+ if (size == -1) ival = -ival;
+ return ival;
+ } else {
+ switch (size) {
+ case 2:
+ if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -2:
+ if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case 3:
+ if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -3:
+ if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case 4:
+ if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -4:
+ if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ }
+ }
+ #endif
+ return PyLong_AsSsize_t(b);
+ }
+ x = PyNumber_Index(b);
+ if (!x) return -1;
+ ival = PyInt_AsSsize_t(x);
+ Py_DECREF(x);
+ return ival;
+}
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+ return PyInt_FromSize_t(ival);
+}
+
+
+#endif /* Py_PYTHON_H */
diff --git a/pyomo/core/expr/expr_pyomo5.py b/pyomo/core/expr/expr_pyomo5.py
new file mode 100644
index 00000000000..888f16abc55
--- /dev/null
+++ b/pyomo/core/expr/expr_pyomo5.py
@@ -0,0 +1,3475 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+
+from __future__ import division
+
+_using_chained_inequality = True
+
+#
+# These symbols are part of pyomo.core.expr
+#
+_public = ['linear_expression', 'nonlinear_expression', 'inequality']
+#
+# These symbols are part of pyomo.core.expr.current
+#
+__all__ = (
+'linear_expression',
+'nonlinear_expression',
+'inequality',
+'decompose_term',
+'clone_counter',
+'clone_expression',
+'evaluate_expression',
+'identify_components',
+'identify_variables',
+'identify_mutable_parameters',
+'expression_to_string',
+'ExpressionBase',
+'EqualityExpression',
+'RangedExpression',
+'InequalityExpression',
+'ProductExpression',
+'MonomialTermExpression',
+'PowExpression',
+'ExternalFunctionExpression',
+'GetItemExpression',
+'Expr_ifExpression',
+'LinearExpression',
+'ReciprocalExpression',
+'NegationExpression',
+'SumExpression',
+'UnaryFunctionExpression',
+'AbsExpression',
+'NPV_NegationExpression',
+'NPV_ExternalFunctionExpression',
+'NPV_PowExpression',
+'NPV_ProductExpression',
+'NPV_ReciprocalExpression',
+'NPV_SumExpression',
+'NPV_UnaryFunctionExpression',
+'NPV_AbsExpression',
+'SimpleExpressionVisitor',
+'ExpressionValueVisitor',
+'ExpressionReplacementVisitor',
+'LinearDecompositionError',
+'SumExpressionBase',
+'_MutableSumExpression', # This should not be referenced, except perhaps while testing code
+'_MutableLinearExpression', # This should not be referenced, except perhaps while testing code
+'_decompose_linear_terms', # This should not be referenced, except perhaps while testing code
+'_chainedInequality', # This should not be referenced, except perhaps while testing code
+'_using_chained_inequality', # This should not be referenced, except perhaps while testing code
+'_generate_sum_expression', # Only used within pyomo.core.expr
+'_generate_mul_expression', # Only used within pyomo.core.expr
+'_generate_other_expression', # Only used within pyomo.core.expr
+'_generate_intrinsic_function_expression', # Only used within pyomo.core.expr
+'_generate_relational_expression', # Only used within pyomo.core.expr
+)
+
+import math
+import logging
+import sys
+import traceback
+from copy import deepcopy
+from collections import deque
+from itertools import islice
+from six import next, string_types, itervalues
+from six.moves import xrange, builtins
+from weakref import ref
+
+logger = logging.getLogger('pyomo.core')
+
+from pyutilib.misc.visitor import SimpleVisitor, ValueVisitor
+from pyutilib.math.util import isclose
+
+from pyomo.util.deprecation import deprecation_warning
+from pyomo.core.expr.symbol_map import SymbolMap
+from pyomo.core.expr.numvalue import \
+ (NumericValue,
+ NumericConstant,
+ native_types,
+ nonpyomo_leaf_types,
+ native_numeric_types,
+ as_numeric,
+ value)
+from pyomo.core.expr.expr_common import \
+ (_add, _sub, _mul, _div,
+ _pow, _neg, _abs, _inplace,
+ _unary, _radd, _rsub, _rmul,
+ _rdiv, _rpow, _iadd, _isub,
+ _imul, _idiv, _ipow, _lt, _le,
+ _eq)
+from pyomo.core.expr import expr_common as common
+
+
+if _using_chained_inequality: #pragma: no cover
+ class _chainedInequality(object):
+
+ prev = None
+ call_info = None
+ cloned_from = []
+
+ @staticmethod
+ def error_message(msg=None):
+ if msg is None:
+ msg = "Relational expression used in an unexpected Boolean context."
+ val = _chainedInequality.prev.to_string()
+ # We are about to raise an exception, so it's OK to reset chainedInequality
+ info = _chainedInequality.call_info
+ _chainedInequality.call_info = None
+ _chainedInequality.prev = None
+
+ args = ( str(msg).strip(), val.strip(), info[0], info[1],
+ ':\n %s' % info[3] if info[3] is not None else '.' )
+ return """%s
+
+ The inequality expression:
+ %s
+ contains non-constant terms (variables) that were evaluated in an
+ unexpected Boolean context at
+ File '%s', line %s%s
+
+ Evaluating Pyomo variables in a Boolean context, e.g.
+ if expression <= 5:
+ is generally invalid. If you want to obtain the Boolean value of the
+ expression based on the current variable values, explicitly evaluate the
+ expression using the value() function:
+ if value(expression) <= 5:
+ or
+ if value(expression <= 5):
+ """ % args
+
+else: #pragma: no cover
+ _chainedInequality = None
+
+
+_ParamData = None
+SimpleParam = None
+TemplateExpressionError = None
+def initialize_expression_data():
+ """
+ A function used to initialize expression global data.
+
+ This function is necessary to avoid global imports. It is executed
+ when ``pyomo.environ`` is imported.
+ """
+ global _ParamData
+ global SimpleParam
+ global TemplateExpressionError
+ from pyomo.core.base.param import _ParamData, SimpleParam
+ from pyomo.core.base.template_expr import TemplateExpressionError
+
+
+class clone_counter(object):
+ """ Context manager for counting cloning events.
+
+ This context manager counts the number of times that the
+ :func:`clone_expression `
+ function is executed.
+ """
+
+ _count = 0
+
+ def __enter__(self):
+ return self
+
+ def __exit__(self, *args):
+ pass
+
+ @property
+ def count(self):
+ """A property that returns the clone count value.
+ """
+ return clone_counter._count
+
+
+class nonlinear_expression(object):
+ """ Context manager for mutable sums.
+
+ This context manager is used to compute a sum while
+ treating the summation as a mutable object.
+ """
+
+ def __enter__(self):
+ self.e = _MutableSumExpression([])
+ return self.e
+
+ def __exit__(self, *args):
+ if self.e.__class__ == _MutableSumExpression:
+ self.e.__class__ = SumExpression
+
+
+class linear_expression(object):
+ """ Context manager for mutable linear sums.
+
+ This context manager is used to compute a linear sum while
+ treating the summation as a mutable object.
+ """
+
+ def __enter__(self):
+ """
+ The :class:`_MutableLinearExpression `
+ class is the context that is used to to
+ hold the mutable linear sum.
+ """
+ self.e = _MutableLinearExpression()
+ return self.e
+
+ def __exit__(self, *args):
+ """
+ The context is changed to the
+ :class:`LinearExpression `
+ class to transform the context into a nonmutable
+ form.
+ """
+ if self.e.__class__ == _MutableLinearExpression:
+ self.e.__class__ = LinearExpression
+
+
+#-------------------------------------------------------
+#
+# Visitor Logic
+#
+#-------------------------------------------------------
+
+class SimpleExpressionVisitor(object):
+ """
+ Note:
+ This class is a customization of the PyUtilib :class:`SimpleVisitor
+ ` class that is tailored
+ to efficiently walk Pyomo expression trees. However, this class
+ is not a subclass of the PyUtilib :class:`SimpleVisitor
+ ` class because all key methods
+ are reimplemented.
+ """
+
+ def visit(self, node): #pragma: no cover
+ """
+ Visit a node in an expression tree and perform some operation on
+ it.
+
+ This method should be over-written by a user
+ that is creating a sub-class.
+
+ Args:
+ node: a node in an expression tree
+
+ Returns:
+ nothing
+ """
+ pass
+
+ def finalize(self): #pragma: no cover
+ """
+ Return the "final value" of the search.
+
+ The default implementation returns :const:`None`, because
+ the traditional visitor pattern does not return a value.
+
+ Returns:
+ The final value after the search. Default is :const:`None`.
+ """
+ pass
+
+ def xbfs(self, node):
+ """
+ Breadth-first search of an expression tree,
+ except that leaf nodes are immediately visited.
+
+ Note:
+ This method has the same functionality as the
+ PyUtilib :class:`SimpleVisitor.xbfs `
+ method. The difference is that this method
+ is tailored to efficiently walk Pyomo expression trees.
+
+ Args:
+ node: The root node of the expression tree that is searched.
+
+ Returns:
+ The return value is determined by the :func:`finalize` function,
+ which may be defined by the user. Defaults to :const:`None`.
+ """
+ dq = deque([node])
+ while dq:
+ current = dq.popleft()
+ self.visit(current)
+ #for c in self.children(current):
+ for c in current.args:
+ #if self.is_leaf(c):
+ if c.__class__ in nonpyomo_leaf_types or not c.is_expression_type() or c.nargs() == 0:
+ self.visit(c)
+ else:
+ dq.append(c)
+ return self.finalize()
+
+ def xbfs_yield_leaves(self, node):
+ """
+ Breadth-first search of an expression tree, except that
+ leaf nodes are immediately visited.
+
+ Note:
+ This method has the same functionality as the
+ PyUtilib :class:`SimpleVisitor.xbfs_yield_leaves `
+ method. The difference is that this method
+ is tailored to efficiently walk Pyomo expression trees.
+
+ Args:
+ node: The root node of the expression tree
+ that is searched.
+
+ Returns:
+ The return value is determined by the :func:`finalize` function,
+ which may be defined by the user. Defaults to :const:`None`.
+ """
+ #
+ # If we start with a leaf, then yield it and stop iteration
+ #
+ if node.__class__ in nonpyomo_leaf_types or not node.is_expression_type() or node.nargs() == 0:
+ ans = self.visit(node)
+ if not ans is None:
+ yield ans
+ return
+ #
+ # Iterate through the tree.
+ #
+ dq = deque([node])
+ while dq:
+ current = dq.popleft()
+ #self.visit(current)
+ #for c in self.children(current):
+ for c in current.args:
+ #if self.is_leaf(c):
+ if c.__class__ in nonpyomo_leaf_types or not c.is_expression_type() or c.nargs() == 0:
+ ans = self.visit(c)
+ if not ans is None:
+ yield ans
+ else:
+ dq.append(c)
+
+
+class ExpressionValueVisitor(object):
+ """
+ Note:
+ This class is a customization of the PyUtilib :class:`ValueVisitor
+ ` class that is tailored
+ to efficiently walk Pyomo expression trees. However, this class
+ is not a subclass of the PyUtilib :class:`ValueVisitor
+ ` class because all key methods
+ are reimplemented.
+ """
+
+ def visit(self, node, values): #pragma: no cover
+ """
+ Visit a node in a tree and compute its value using
+ the values of its children.
+
+ This method should be over-written by a user
+ that is creating a sub-class.
+
+ Args:
+ node: a node in a tree
+ values: a list of values of this node's children
+
+ Returns:
+ The *value* for this node, which is computed using :attr:`values`
+ """
+ pass
+
+ def visiting_potential_leaf(self, node): #pragma: no cover
+ """
+ Visit a node and return its value if it is a leaf.
+
+ Note:
+ This method needs to be over-written for a specific
+ visitor application.
+
+ Args:
+ node: a node in a tree
+
+ Returns:
+ A tuple: ``(flag, value)``. If ``flag`` is False,
+ then the node is not a leaf and ``value`` is :const:`None`.
+ Otherwise, ``value`` is the computed value for this node.
+ """
+ raise RuntimeError("The visiting_potential_leaf method needs to be defined.")
+
+ def finalize(self, ans): #pragma: no cover
+ """
+ This method defines the return value for the search methods
+ in this class.
+
+ The default implementation returns the value of the
+ initial node (aka the root node), because
+ this visitor pattern computes and returns value for each
+ node to enable the computation of this value.
+
+ Args:
+ ans: The final value computed by the search method.
+
+ Returns:
+ The final value after the search. Defaults to simply
+ returning :attr:`ans`.
+ """
+ return ans
+
+ def dfs_postorder_stack(self, node):
+ """
+ Perform a depth-first search in postorder using a stack
+ implementation.
+
+ Note:
+ This method has the same functionality as the
+ PyUtilib :class:`ValueVisitor.dfs_postorder_stack `
+ method. The difference is that this method
+ is tailored to efficiently walk Pyomo expression trees.
+
+ Args:
+ node: The root node of the expression tree
+ that is searched.
+
+ Returns:
+ The return value is determined by the :func:`finalize` function,
+ which may be defined by the user.
+ """
+ flag, value = self.visiting_potential_leaf(node)
+ if flag:
+ return value
+ #_stack = [ (node, self.children(node), 0, len(self.children(node)), [])]
+ _stack = [ (node, node._args_, 0, node.nargs(), [])]
+ #
+ # Iterate until the stack is empty
+ #
+ # Note: 1 is faster than True for Python 2.x
+ #
+ while 1:
+ #
+ # Get the top of the stack
+ # _obj Current expression object
+ # _argList The arguments for this expression objet
+ # _idx The current argument being considered
+ # _len The number of arguments
+ # _result The return values
+ #
+ _obj, _argList, _idx, _len, _result = _stack.pop()
+ #
+ # Iterate through the arguments
+ #
+ while _idx < _len:
+ _sub = _argList[_idx]
+ _idx += 1
+ flag, value = self.visiting_potential_leaf(_sub)
+ if flag:
+ _result.append( value )
+ else:
+ #
+ # Push an expression onto the stack
+ #
+ _stack.append( (_obj, _argList, _idx, _len, _result) )
+ _obj = _sub
+ #_argList = self.children(_sub)
+ _argList = _sub._args_
+ _idx = 0
+ _len = _sub.nargs()
+ _result = []
+ #
+ # Process the current node
+ #
+ ans = self.visit(_obj, _result)
+ if _stack:
+ #
+ # "return" the recursion by putting the return value on the end of the results stack
+ #
+ _stack[-1][-1].append( ans )
+ else:
+ return self.finalize(ans)
+
+
+class ExpressionReplacementVisitor(object):
+ """
+ Note:
+ This class is a customization of the PyUtilib :class:`ValueVisitor
+ ` class that is tailored
+ to support replacement of sub-trees in a Pyomo expression
+ tree. However, this class is not a subclass of the PyUtilib
+ :class:`ValueVisitor `
+ class because all key methods are reimplemented.
+ """
+
+ def __init__(self, memo=None):
+ """
+ Contruct a visitor that is tailored to support the
+ replacement of sub-trees in a pyomo expression tree.
+
+ Args:
+ memo (dict): A dictionary mapping object ids to
+ objects. This dictionary has the same semantics as
+ the memo object used with ``copy.deepcopy``. Defaults
+ to None, which indicates that no user-defined
+ dictionary is used.
+ """
+ if memo is None:
+ self.memo = {'__block_scope__': { id(None): False }}
+ else:
+ self.memo = memo #pragma: no cover
+
+ def visit(self, node, values):
+ """
+ Visit and clone nodes that have been expanded.
+
+ Note:
+ This method normally does not need to be re-defined
+ by a user.
+
+ Args:
+ node: The node that will be cloned.
+ values (list): The list of child nodes that have been
+ cloned. These values are used to define the
+ cloned node.
+
+ Returns:
+ The cloned node. Default is to simply return the node.
+ """
+ return node
+
+ def visiting_potential_leaf(self, node): #pragma: no cover
+ """
+ Visit a node and return a cloned node if it is a leaf.
+
+ Note:
+ This method needs to be over-written for a specific
+ visitor application.
+
+ Args:
+ node: a node in a tree
+
+ Returns:
+ A tuple: ``(flag, value)``. If ``flag`` is False,
+ then the node is not a leaf and ``value`` is :const:`None`.
+ Otherwise, ``value`` is a cloned node.
+ """
+ raise RuntimeError("The visiting_potential_leaf method needs to be defined.")
+
+ def finalize(self, ans):
+ """
+ This method defines the return value for the search methods
+ in this class.
+
+ The default implementation returns the value of the
+ initial node (aka the root node), because
+ this visitor pattern computes and returns value for each
+ node to enable the computation of this value.
+
+ Args:
+ ans: The final value computed by the search method.
+
+ Returns:
+ The final value after the search. Defaults to simply
+ returning :attr:`ans`.
+ """
+ return ans
+
+ def construct_node(self, node, values):
+ """
+ Call the expression create_node_with_local_data() method.
+ """
+ return node.create_node_with_local_data( tuple(values), self.memo )
+
+ def dfs_postorder_stack(self, node):
+ """
+ Perform a depth-first search in postorder using a stack
+ implementation.
+
+ This method replaces subtrees. This method detects if the
+ :func:`visit` method returns a different object. If so, then
+ the node has been replaced and search process is adapted
+ to replace all subsequent parent nodes in the tree.
+
+ Note:
+ This method has the same functionality as the
+ PyUtilib :class:`ValueVisitor.dfs_postorder_stack `
+ method that is tailored to support the
+ replacement of sub-trees in a Pyomo expression tree.
+
+ Args:
+ node: The root node of the expression tree
+ that is searched.
+
+ Returns:
+ The return value is determined by the :func:`finalize` function,
+ which may be defined by the user.
+ """
+ if node.__class__ is LinearExpression:
+ _argList = [node.constant] + node.linear_coefs + node.linear_vars
+ _len = len(_argList)
+ _stack = [ (node, _argList, 0, _len, [False])]
+ else:
+ flag, value = self.visiting_potential_leaf(node)
+ if flag:
+ return value
+ #_stack = [ (node, self.children(node), 0, len(self.children(node)), [])]
+ _stack = [ (node, node._args_, 0, node.nargs(), [False])]
+ #
+ # Iterate until the stack is empty
+ #
+ # Note: 1 is faster than True for Python 2.x
+ #
+ while 1:
+ #
+ # Get the top of the stack
+ # _obj Current expression object
+ # _argList The arguments for this expression objet
+ # _idx The current argument being considered
+ # _len The number of arguments
+ # _result The 'dirty' flag followed by return values
+ #
+ _obj, _argList, _idx, _len, _result = _stack.pop()
+ #
+ # Iterate through the arguments
+ #
+ while _idx < _len:
+ _sub = _argList[_idx]
+ _idx += 1
+ if _sub.__class__ is LinearExpression:
+ #
+ # Push an expression onto the stack
+ #
+ _stack.append( (_obj, _argList, _idx, _len, _result) )
+ _obj = _sub
+ #_argList = self.children(_sub)
+ _argList = [_sub.constant] + _sub.linear_coefs + _sub.linear_vars
+ _idx = 0
+ _len = len(_argList)
+ _result = [False]
+ else:
+ flag, value = self.visiting_potential_leaf(_sub)
+ if flag:
+ if id(value) != id(_sub):
+ _result[0] = True
+ _result.append( value )
+ else:
+ #
+ # Push an expression onto the stack
+ #
+ _stack.append( (_obj, _argList, _idx, _len, _result) )
+ _obj = _sub
+ #_argList = self.children(_sub)
+ _argList = _sub._args_
+ _idx = 0
+ _len = _sub.nargs()
+ _result = [False]
+ #
+ # Process the current node
+ #
+ # If the user has defined a visit() function in a
+ # subclass, then call that function. But if the user
+ # hasn't created a new class and we need to, then
+ # call the ExpressionReplacementVisitor.visit() function.
+ #
+ ans = self.visit(_obj, _result[1:])
+ if ans.is_named_expression_type():
+ _result[0] = False
+ assert(len(_result) == 2)
+ ans.expr = _result[1]
+ elif ans.__class__ is LinearExpression and _result[0]:
+ ans = _result[1]
+ nterms = (len(_result)-2)//2
+ for i in range(nterms):
+ ans += _result[2+i]*_result[2+i+nterms]
+ elif _result[0]:
+ if id(ans) == id(_obj):
+ ans = self.construct_node(_obj, _result[1:])
+ if ans.__class__ is MonomialTermExpression:
+ if (not ans._args_[0].__class__ in native_numeric_types and ans._args_[0].is_potentially_variable) or \
+ (ans._args_[1].__class__ in native_numeric_types or not ans._args_[1].is_potentially_variable()):
+ ans.__class__ = ProductExpression
+ elif ans.__class__ in NPV_expression_types:
+ # For simplicity, not-potentially-variable expressions are
+ # replaced with their potentially variable counterparts.
+ ans = ans.create_potentially_variable_object()
+ if _stack:
+ if _result[0]:
+ _stack[-1][-1][0] = True
+ #
+ # "return" the recursion by putting the return value on the end of the results stack
+ #
+ _stack[-1][-1].append( ans )
+ else:
+ return self.finalize(ans)
+
+
+#-------------------------------------------------------
+#
+# Functions used to process expression trees
+#
+#-------------------------------------------------------
+
+# =====================================================
+# clone_expression
+# =====================================================
+
+class _CloneVisitor(ExpressionValueVisitor):
+
+ def __init__(self, clone_leaves=False, memo=None):
+ self.clone_leaves = clone_leaves
+ self.memo = memo
+
+ def visit(self, node, values):
+ """ Visit nodes that have been expanded """
+ return node.create_node_with_local_data( tuple(values), self.memo )
+
+ def visiting_potential_leaf(self, node):
+ """
+ Visiting a potential leaf.
+
+ Return True if the node is not expanded.
+ """
+ if node.__class__ in nonpyomo_leaf_types:
+ #
+ # Store a native or numeric object
+ #
+ return True, deepcopy(node, self.memo)
+
+ if not node.is_expression_type():
+ #
+ # Store a leave object that is cloned
+ #
+ if self.clone_leaves:
+ return True, deepcopy(node, self.memo)
+ else:
+ return True, node
+
+ if not self.clone_leaves and node.is_named_expression_type():
+ #
+ # If we are not cloning leaves, then
+ # we don't copy the expression tree for a
+ # named expression.
+ #
+ return True, node
+
+ return False, None
+
+
+def clone_expression(expr, memo=None, clone_leaves=True):
+ """A function that is used to clone an expression.
+
+ Cloning is roughly equivalent to calling ``copy.deepcopy``.
+ However, the :attr:`clone_leaves` argument can be used to
+ clone only interior (i.e. non-leaf) nodes in the expression
+ tree. Note that named expression objects are treated as
+ leaves when :attr:`clone_leaves` is :const:`True`, and hence
+ those subexpressions are not cloned.
+
+ This function uses a non-recursive
+ logic, which makes it more scalable than the logic in
+ ``copy.deepcopy``.
+
+ Args:
+ expr: The expression that will be cloned.
+ memo (dict): A dictionary mapping object ids to
+ objects. This dictionary has the same semantics as
+ the memo object used with ``copy.deepcopy``. Defaults
+ to None, which indicates that no user-defined
+ dictionary is used.
+ clone_leaves (bool): If True, then leaves are
+ cloned along with the rest of the expression.
+ Defaults to :const:`True`.
+
+ Returns:
+ The cloned expression.
+ """
+ clone_counter._count += 1
+ if not memo:
+ memo = {'__block_scope__': { id(None): False }}
+ #
+ visitor = _CloneVisitor(clone_leaves=clone_leaves, memo=memo)
+ return visitor.dfs_postorder_stack(expr)
+
+
+# =====================================================
+# _sizeof_expression
+# =====================================================
+
+class _SizeVisitor(SimpleExpressionVisitor):
+
+ def __init__(self):
+ self.counter = 0
+
+ def visit(self, node):
+ self.counter += 1
+
+ def finalize(self):
+ return self.counter
+
+
+def _sizeof_expression(expr):
+ """
+ Return the number of nodes in the expression tree.
+
+ Args:
+ expr: The root node of an expression tree.
+
+ Returns:
+ A non-negative integer that is the number of
+ interior and leaf nodes in the expression tree.
+ """
+ visitor = _SizeVisitor()
+ return visitor.xbfs(expr)
+
+# =====================================================
+# evaluate_expression
+# =====================================================
+
+class _EvaluationVisitor(ExpressionValueVisitor):
+
+ def visit(self, node, values):
+ """ Visit nodes that have been expanded """
+ return node._apply_operation(values)
+
+ def visiting_potential_leaf(self, node):
+ """
+ Visiting a potential leaf.
+
+ Return True if the node is not expanded.
+ """
+ if node.__class__ in nonpyomo_leaf_types:
+ return True, node
+
+ if node.is_variable_type():
+ return True, value(node)
+
+ if not node.is_expression_type():
+ return True, value(node)
+
+ return False, None
+
+
+def evaluate_expression(exp, exception=True):
+ """
+ Evaluate the value of the expression.
+
+ Args:
+ expr: The root node of an expression tree.
+ exception (bool): A flag that indicates whether
+ exceptions are raised. If this flag is
+ :const:`False`, then an exception that
+ occurs while evaluating the expression
+ is caught and the return value is :const:`None`.
+ Default is :const:`True`.
+
+ Returns:
+ A floating point value if the expression evaluates
+ normally, or :const:`None` if an exception occurs
+ and is caught.
+ """
+ try:
+ visitor = _EvaluationVisitor()
+ return visitor.dfs_postorder_stack(exp)
+
+ except TemplateExpressionError: #pragma: no cover
+ if exception:
+ raise
+ return None
+ except ValueError:
+ if exception:
+ raise
+ return None
+
+
+# =====================================================
+# identify_components
+# =====================================================
+
+class _ComponentVisitor(SimpleExpressionVisitor):
+
+ def __init__(self, types):
+ self.seen = set()
+ if types.__class__ is set:
+ self.types = types
+ else:
+ self.types = set(types)
+
+ def visit(self, node):
+ if node.__class__ in self.types:
+ if id(node) in self.seen:
+ return
+ self.seen.add(id(node))
+ return node
+
+
+def identify_components(expr, component_types):
+ """
+ A generator that yields a sequence of nodes
+ in an expression tree that belong to a specified set.
+
+ Args:
+ expr: The root node of an expression tree.
+ component_types (set or list): A set of class
+ types that will be matched during the search.
+
+ Yields:
+ Each node that is found.
+ """
+ #
+ # OPTIONS:
+ # component_types - set (or list) if class types to find
+ # in the expression.
+ #
+ visitor = _ComponentVisitor(component_types)
+ for v in visitor.xbfs_yield_leaves(expr):
+ yield v
+
+
+# =====================================================
+# identify_variables
+# =====================================================
+
+class _VariableVisitor(SimpleExpressionVisitor):
+
+ def __init__(self):
+ self.seen = set()
+
+ def visit(self, node):
+ if node.__class__ in nonpyomo_leaf_types:
+ return
+
+ if node.is_variable_type():
+ if id(node) in self.seen:
+ return
+ self.seen.add(id(node))
+ return node
+
+
+def identify_variables(expr, include_fixed=True):
+ """
+ A generator that yields a sequence of variables
+ in an expression tree.
+
+ Args:
+ expr: The root node of an expression tree.
+ include_fixed (bool): If :const:`True`, then
+ this generator will yield variables whose
+ value is fixed. Defaults to :const:`True`.
+
+ Yields:
+ Each variable that is found.
+ """
+ visitor = _VariableVisitor()
+ if include_fixed:
+ for v in visitor.xbfs_yield_leaves(expr):
+ yield v
+ else:
+ for v in visitor.xbfs_yield_leaves(expr):
+ if not v.is_fixed():
+ yield v
+
+
+# =====================================================
+# identify_mutable_parameters
+# =====================================================
+
+class _MutableParamVisitor(SimpleExpressionVisitor):
+
+ def __init__(self):
+ self.seen = set()
+
+ def visit(self, node):
+ if node.__class__ in nonpyomo_leaf_types:
+ return
+
+ # TODO: Confirm that this has the right semantics
+ if not node.is_variable_type() and node.is_fixed():
+ if id(node) in self.seen:
+ return
+ self.seen.add(id(node))
+ return node
+
+
+def identify_mutable_parameters(expr):
+ """
+ A generator that yields a sequence of mutable
+ parameters in an expression tree.
+
+ Args:
+ expr: The root node of an expression tree.
+
+ Yields:
+ Each mutable parameter that is found.
+ """
+ visitor = _MutableParamVisitor()
+ for v in visitor.xbfs_yield_leaves(expr):
+ yield v
+
+
+# =====================================================
+# _polynomial_degree
+# =====================================================
+
+class _PolynomialDegreeVisitor(ExpressionValueVisitor):
+
+ def visit(self, node, values):
+ """ Visit nodes that have been expanded """
+ return node._compute_polynomial_degree(values)
+
+ def visiting_potential_leaf(self, node):
+ """
+ Visiting a potential leaf.
+
+ Return True if the node is not expanded.
+ """
+ if node.__class__ in nonpyomo_leaf_types or not node.is_potentially_variable():
+ return True, 0
+
+ if not node.is_expression_type():
+ return True, 0 if node.is_fixed() else 1
+
+ return False, None
+
+
+def _polynomial_degree(node):
+ """
+ Return the polynomial degree of the expression.
+
+ Args:
+ node: The root node of an expression tree.
+
+ Returns:
+ A non-negative integer that is the polynomial
+ degree if the expression is polynomial, or :const:`None` otherwise.
+ """
+ visitor = _PolynomialDegreeVisitor()
+ return visitor.dfs_postorder_stack(node)
+
+
+# =====================================================
+# _expression_is_fixed
+# =====================================================
+
+class _IsFixedVisitor(ExpressionValueVisitor):
+ """
+ NOTE: This doesn't check if combiner logic is
+ all or any and short-circuit the test. It's
+ not clear that that is an important optimization.
+ """
+
+ def visit(self, node, values):
+ """ Visit nodes that have been expanded """
+ return node._is_fixed(values)
+
+ def visiting_potential_leaf(self, node):
+ """
+ Visiting a potential leaf.
+
+ Return True if the node is not expanded.
+ """
+ if node.__class__ in nonpyomo_leaf_types or not node.is_potentially_variable():
+ return True, True
+
+ elif not node.is_expression_type():
+ return True, node.is_fixed()
+
+ return False, None
+
+
+def _expression_is_fixed(node):
+ """
+ Return the polynomial degree of the expression.
+
+ Args:
+ node: The root node of an expression tree.
+
+ Returns:
+ A non-negative integer that is the polynomial
+ degree if the expression is polynomial, or :const:`None` otherwise.
+ """
+ visitor = _IsFixedVisitor()
+ return visitor.dfs_postorder_stack(node)
+
+
+# =====================================================
+# expression_to_string
+# =====================================================
+
+class _ToStringVisitor(ExpressionValueVisitor):
+
+ def __init__(self, verbose, smap, compute_values):
+ super(_ToStringVisitor, self).__init__()
+ self.verbose = verbose
+ self.smap = smap
+ self.compute_values = compute_values
+
+ def visit(self, node, values):
+ """ Visit nodes that have been expanded """
+ tmp = []
+ for i,val in enumerate(values):
+ arg = node._args_[i]
+
+ if arg is None:
+ tmp.append('Undefined') # TODO: coverage
+ elif arg.__class__ in native_numeric_types:
+ tmp.append(val)
+ elif arg.__class__ in nonpyomo_leaf_types:
+ tmp.append("'{0}'".format(val))
+ elif arg.is_variable_type():
+ tmp.append(val)
+ elif not self.verbose and arg.is_expression_type() and node._precedence() < arg._precedence():
+ tmp.append("({0})".format(val))
+ else:
+ tmp.append(val)
+
+ return node._to_string(tmp, self.verbose, self.smap, self.compute_values)
+
+ def visiting_potential_leaf(self, node):
+ """
+ Visiting a potential leaf.
+
+ Return True if the node is not expanded.
+ """
+ if node is None:
+ return True, None # TODO: coverage
+
+ if node.__class__ in nonpyomo_leaf_types:
+ return True, str(node)
+
+ if node.is_variable_type():
+ if not node.fixed:
+ return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=False)
+ return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=self.compute_values)
+
+ if not node.is_expression_type():
+ return True, node.to_string(verbose=self.verbose, smap=self.smap, compute_values=self.compute_values)
+
+ return False, None
+
+
+def expression_to_string(expr, verbose=None, labeler=None, smap=None, compute_values=False, standardize=False):
+ """
+ Return a string representation of an expression.
+
+ Args:
+ expr: The root node of an expression tree.
+ verbose (bool): If :const:`True`, then the output is
+ a nested functional form. Otherwise, the output
+ is an algebraic expression. Default is :const:`False`.
+ labeler: If specified, this labeler is used to label
+ variables in the expression.
+ smap: If specified, this :class:`SymbolMap ` is
+ used to cache labels.
+ compute_values (bool): If :const:`True`, then
+ parameters and fixed variables are evaluated before the
+ expression string is generated. Default is :const:`False`.
+ standardize (bool): If :const:`True` and :attr:`verbose` is :const:`False`, then the
+ expression form is standardized to pull out constant and linear terms.
+ Default is :const:`False`.
+
+ Returns:
+ A string representation for the expression.
+ """
+ verbose = common.TO_STRING_VERBOSE if verbose is None else verbose
+ #
+ # Standardize the output of expressions if requested (when verbose=False).
+ # This involves constructing a standard representation and then creating
+ # a string.
+ #
+ if standardize and not verbose:
+ from pyomo.repn import generate_standard_repn
+ try:
+ if expr.__class__ is EqualityExpression:
+ repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ expr = EqualityExpression( (repn0.to_expression(), repn1.to_expression()) )
+ elif expr.__class__ is InequalityExpression:
+ repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ expr = InequalityExpression( (repn0.to_expression(), repn1.to_expression()), strict=expr._strict )
+ elif expr.__class__ is RangedExpression:
+ repn0 = generate_standard_repn(expr._args_[0], quadratic=True, compute_values=compute_values)
+ repn1 = generate_standard_repn(expr._args_[1], quadratic=True, compute_values=compute_values)
+ repn2 = generate_standard_repn(expr._args_[2], quadratic=True, compute_values=compute_values)
+ expr = RangedExpression( (repn0.to_expression(), repn1.to_expression(), repn2.to_expression()), strict=expr._strict )
+ else:
+ repn = generate_standard_repn(expr, quadratic=True, compute_values=compute_values)
+ expr = repn.to_expression()
+ except: #pragma: no cover
+ #
+ # Generation of the standard repn will fail if the
+ # expression is uninitialized. Hence, we default to
+ # using the non-standardized form.
+ #
+ # It might be smarter to raise errors for specific issues (e.g. uninitialized parameters).
+ # Let's see if we start seeing errors that are masked here.
+ #
+ pass
+ #
+ # Setup the symbol map
+ #
+ if labeler is not None:
+ if smap is None:
+ smap = SymbolMap()
+ smap.default_labeler = labeler
+ #
+ # Create and execute the visitor pattern
+ #
+ visitor = _ToStringVisitor(verbose, smap, compute_values)
+ return visitor.dfs_postorder_stack(expr)
+
+
+#-------------------------------------------------------
+#
+# Expression classes
+#
+#-------------------------------------------------------
+
+
+class ExpressionBase(NumericValue):
+ """
+ The base class for Pyomo expressions.
+
+ This class is used to define nodes in an expression
+ tree.
+
+ Args:
+ args (list or tuple): Children of this node.
+ """
+
+ # Previously, we used _args to define expression class arguments.
+ # Here, we use _args_ to force errors for code that was referencing this
+ # data. There are now accessor methods, so in most cases users
+ # and developers should not directly access the _args_ data values.
+ __slots__ = ('_args_',)
+ PRECEDENCE = 0
+
+ def __init__(self, args):
+ self._args_ = args
+
+ def nargs(self):
+ """
+ Returns the number of child nodes.
+
+ By default, Pyomo expressions represent binary operations
+ with two arguments.
+
+ Note:
+ This function does not simply compute the length of
+ :attr:`_args_` because some expression classes use
+ a subset of the :attr:`_args_` array. Thus, it
+ is imperative that developers use this method!
+
+ Returns:
+ A nonnegative integer that is the number of child nodes.
+ """
+ return 2
+
+ def arg(self, i):
+ """
+ Return the i-th child node.
+
+ Args:
+ i (int): Nonnegative index of the child that is returned.
+
+ Returns:
+ The i-th child node.
+ """
+ if i >= self.nargs():
+ raise KeyError("Invalid index for expression argument: %d" % i)
+ if i < 0:
+ return self._args_[self.nargs()+i]
+ return self._args_[i]
+
+ @property
+ def args(self):
+ """
+ A generator that yields the child nodes.
+
+ Yields:
+ Each child node in order.
+ """
+ return islice(self._args_, self.nargs())
+
+ def __getstate__(self):
+ """
+ Pickle the expression object
+
+ Returns:
+ The pickled state.
+ """
+ state = super(ExpressionBase, self).__getstate__()
+ for i in ExpressionBase.__slots__:
+ state[i] = getattr(self,i)
+ return state
+
+ def __nonzero__(self): #pragma: no cover
+ """
+ Compute the value of the expression and convert it to
+ a boolean.
+
+ Returns:
+ A boolean value.
+ """
+ return bool(self())
+
+ __bool__ = __nonzero__
+
+ def __call__(self, exception=True):
+ """
+ Evaluate the value of the expression tree.
+
+ Args:
+ exception (bool): If :const:`False`, then
+ an exception raised while evaluating
+ is captured, and the value returned is
+ :const:`None`. Default is :const:`True`.
+
+ Returns:
+ The value of the expression or :const:`None`.
+ """
+ return evaluate_expression(self, exception)
+
+ def __str__(self):
+ """
+ Returns a string description of the expression.
+
+ Note:
+ The value of ``pyomo.core.expr.expr_common.TO_STRING_VERBOSE``
+ is used to configure the execution of this method.
+ If this value is :const:`True`, then the string
+ representation is a nested function description of the expression.
+ The default is :const:`False`, which is an algebraic
+ description of the expression.
+
+ Returns:
+ A string.
+ """
+ return expression_to_string(self, standardize=False)
+
+ def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False):
+ """
+ Return a string representation of the expression tree.
+
+ Args:
+ verbose (bool): If :const:`True`, then the the string
+ representation consists of nested functions. Otherwise,
+ the string representation is an algebraic equation.
+ Defaults to :const:`False`.
+ labeler: An object that generates string labels for
+ variables in the expression tree. Defaults to :const:`None`.
+ smap: If specified, this :class:`SymbolMap ` is
+ used to cache labels for variables.
+ compute_values (bool): If :const:`True`, then
+ parameters and fixed variables are evaluated before the
+ expression string is generated. Default is :const:`False`.
+
+ Returns:
+ A string representation for the expression tree.
+ """
+ return expression_to_string(self, verbose=verbose, labeler=labeler, smap=smap, compute_values=compute_values)
+
+ def _precedence(self):
+ return ExpressionBase.PRECEDENCE
+
+ def _to_string(self, values, verbose, smap, compute_values): #pragma: no cover
+ """
+ Construct a string representation for this node, using the string
+ representations of its children.
+
+ This method is called by the :class:`_ToStringVisitor
+ ` class. It must
+ must be defined in subclasses.
+
+ Args:
+ values (list): The string representations of the children of this
+ node.
+ verbose (bool): If :const:`True`, then the the string
+ representation consists of nested functions. Otherwise,
+ the string representation is an algebraic equation.
+ smap: If specified, this :class:`SymbolMap
+ ` is
+ used to cache labels for variables.
+ compute_values (bool): If :const:`True`, then
+ parameters and fixed variables are evaluated before the
+ expression string is generated.
+
+ Returns:
+ A string representation for this node.
+ """
+ pass
+
+ def getname(self, *args, **kwds): #pragma: no cover
+ """
+ Return the text name of a function associated with this expression object.
+
+ In general, no arguments are passed to this function.
+
+ Args:
+ *arg: a variable length list of arguments
+ **kwds: keyword arguments
+
+ Returns:
+ A string name for the function.
+ """
+ raise NotImplementedError("Derived expression (%s) failed to "\
+ "implement getname()" % ( str(self.__class__), ))
+
+ def clone(self, substitute=None):
+ """
+ Return a clone of the expression tree.
+
+ Note:
+ This method does not clone the leaves of the
+ tree, which are numeric constants and variables.
+ It only clones the interior nodes, and
+ expression leaf nodes like
+ :class:`_MutableLinearExpression`.
+ However, named expressions are treated like
+ leaves, and they are not cloned.
+
+ Args:
+ substitute (dict): a dictionary that maps object ids to clone
+ objects generated earlier during the cloning process.
+
+ Returns:
+ A new expression tree.
+ """
+ return clone_expression(self, memo=substitute, clone_leaves=False)
+
+ def X__deepcopy__(self, memo):
+ """
+ Return a clone of the expression tree.
+
+ Note:
+ This method clones the leaves of the tree.
+ Args:
+ memo (dict): a dictionary that maps object ids to clone
+ objects generated earlier during the cloning process.
+
+ Returns:
+ A new expression tree.
+ """
+ return clone_expression(self, memo=memo, clone_leaves=True)
+
+ def create_node_with_local_data(self, args, memo):
+ """
+ Construct a node using given arguments.
+
+ This method provides a consistent interface for constructing a
+ node, which is used in tree visitor scripts. In the simplest
+ case, this simply returns::
+
+ self.__class__(args)
+
+ But in general this creates an expression object using local
+ data as well as arguments that represent the child nodes.
+
+ Args:
+ args (list): A list of child nodes for the new expression
+ object
+ memo (dict): A dictionary that maps object ids to clone
+ objects generated earlier during a cloning process.
+ This argument is needed to clone objects that are
+ owned by a model, and it can be safely ignored for
+ most expression classes.
+
+ Returns:
+ A new expression object with the same type as the current
+ class.
+ """
+ return self.__class__(args)
+
+ def create_potentially_variable_object(self):
+ """
+ Create a potentially variable version of this object.
+
+ This method returns an object that is a potentially variable
+ version of the current object. In the simplest
+ case, this simply sets the value of `__class__`:
+
+ self.__class__ = self.__class__.__mro__[1]
+
+ Note that this method is allowed to modify the current object
+ and return it. But in some cases it may create a new
+ potentially variable object.
+
+ Returns:
+ An object that is potentially variable.
+ """
+ self.__class__ = self.__class__.__mro__[1]
+ return self
+
+ def is_constant(self):
+ """Return True if this expression is an atomic constant
+
+ This method contrasts with the is_fixed() method. This method
+ returns True if the expression is an atomic constant, that is it
+ is composed exclusively of constants and immutable parameters.
+ NumericValue objects returning is_constant() == True may be
+ simplified to their numeric value at any point without warning.
+
+ Note: This defaults to False, but gets redefined in sub-classes.
+ """
+ return False
+
+ def is_fixed(self):
+ """
+ Return :const:`True` if this expression contains no free variables.
+
+ Returns:
+ A boolean.
+ """
+ return _expression_is_fixed(self)
+
+ def _is_fixed(self, values):
+ """
+ Compute whether this expression is fixed given
+ the fixed values of its children.
+
+ This method is called by the :class:`_IsFixedVisitor
+ ` class. It can
+ be over-written by expression classes to customize this
+ logic.
+
+ Args:
+ values (list): A list of boolean values that indicate whether
+ the children of this expression are fixed
+
+ Returns:
+ A boolean that is :const:`True` if the fixed values of the
+ children are all :const:`True`.
+ """
+ return all(values)
+
+ def is_potentially_variable(self):
+ """
+ Return :const:`True` if this expression might represent
+ a variable expression.
+
+ This method returns :const:`True` when (a) the expression
+ tree contains one or more variables, or (b) the expression
+ tree contains a named expression. In both cases, the
+ expression cannot be treated as constant since (a) the variables
+ may not be fixed, or (b) the named expressions may be changed
+ at a later time to include non-fixed variables.
+
+ Returns:
+ A boolean. Defaults to :const:`True` for expressions.
+ """
+ return True
+
+ def is_named_expression_type(self):
+ """
+ Return :const:`True` if this object is a named expression.
+
+ This method returns :const:`False` for this class, and it
+ is included in other classes within Pyomo that are not named
+ expressions, which allows for a check for named expressions
+ without evaluating the class type.
+
+ Returns:
+ A boolean.
+ """
+ return False
+
+ def is_expression_type(self):
+ """
+ Return :const:`True` if this object is an expression.
+
+ This method obviously returns :const:`True` for this class, but it
+ is included in other classes within Pyomo that are not expressions,
+ which allows for a check for expressions without
+ evaluating the class type.
+
+ Returns:
+ A boolean.
+ """
+ return True
+
+ def size(self):
+ """
+ Return the number of nodes in the expression tree.
+
+ Returns:
+ A nonnegative integer that is the number of interior and leaf
+ nodes in the expression tree.
+ """
+ return _sizeof_expression(self)
+
+ def polynomial_degree(self):
+ """
+ Return the polynomial degree of the expression.
+
+ Returns:
+ A non-negative integer that is the polynomial
+ degree if the expression is polynomial, or :const:`None` otherwise.
+ """
+ return _PolynomialDegreeVisitor().dfs_postorder_stack(self)
+
+ def _compute_polynomial_degree(self, values): #pragma: no cover
+ """
+ Compute the polynomial degree of this expression given
+ the degree values of its children.
+
+ This method is called by the :class:`_PolynomialDegreeVisitor
+ ` class. It can
+ be over-written by expression classes to customize this
+ logic.
+
+ Args:
+ values (list): A list of values that indicate the degree
+ of the children expression.
+
+ Returns:
+ A nonnegative integer that is the polynomial degree of the
+ expression, or :const:`None`. Default is :const:`None`.
+ """
+ return None
+
+ def _apply_operation(self, result): #pragma: no cover
+ """
+ Compute the values of this node given the values of its children.
+
+ This method is called by the :class:`_EvaluationVisitor
+ ` class. It must
+ be over-written by expression classes to customize this logic.
+
+ Note:
+ This method applies the logical operation of the
+ operator to the arguments. It does *not* evaluate
+ the arguments in the process, but assumes that they
+ have been previously evaluated. But noted that if
+ this class contains auxilliary data (e.g. like the
+ numeric coefficients in the :class:`LinearExpression
+ ` class, then
+ those values *must* be evaluated as part of this
+ function call. An uninitialized parameter value
+ encountered during the execution of this method is
+ considered an error.
+
+ Args:
+ values (list): A list of values that indicate the value
+ of the children expressions.
+
+ Returns:
+ A floating point value for this expression.
+ """
+ raise NotImplementedError("Derived expression (%s) failed to "\
+ "implement _apply_operation()" % ( str(self.__class__), ))
+
+
+class NegationExpression(ExpressionBase):
+ """
+ Negation expressions::
+
+ - x
+ """
+
+ __slots__ = ()
+
+ PRECEDENCE = 4
+
+ def nargs(self):
+ return 1
+
+ def getname(self, *args, **kwds):
+ return 'neg'
+
+ def _compute_polynomial_degree(self, result):
+ return result[0]
+
+ def _precedence(self):
+ return NegationExpression.PRECEDENCE
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ if verbose:
+ return "{0}({1})".format(self.getname(), values[0])
+ tmp = values[0]
+ if tmp[0] == '-':
+ i = 1
+ while tmp[i] == ' ':
+ i += 1
+ return tmp[i:]
+ return "- "+tmp
+
+ def _apply_operation(self, result):
+ return -result[0]
+
+
+class NPV_NegationExpression(NegationExpression):
+ __slots__ = ()
+
+ def is_potentially_variable(self):
+ return False
+
+
+class ExternalFunctionExpression(ExpressionBase):
+ """
+ External function expressions
+
+ Example::
+
+ model = ConcreteModel()
+ model.a = Var()
+ model.f = ExternalFunction(library='foo.so', function='bar')
+ expr = model.f(model.a)
+
+ Args:
+ args (tuple): children of this node
+ fcn: a class that defines this external function
+ """
+ __slots__ = ('_fcn',)
+
+ def __init__(self, args, fcn=None):
+ self._args_ = args
+ self._fcn = fcn
+
+ def nargs(self):
+ return len(self._args_)
+
+ def create_node_with_local_data(self, args, memo):
+ return self.__class__(args, self._fcn)
+
+ def __getstate__(self):
+ state = super(ExternalFunctionExpression, self).__getstate__()
+ for i in ExternalFunctionExpression.__slots__:
+ state[i] = getattr(self, i)
+ return state
+
+ def getname(self, *args, **kwds): #pragma: no cover
+ return self._fcn.getname(*args, **kwds)
+
+ def _compute_polynomial_degree(self, result):
+ # If the expression is constant, then
+ # this is detected earlier. Hence, we can safely
+ # return None.
+ return None
+
+ def _apply_operation(self, result):
+ return self._fcn.evaluate( result ) #pragma: no cover
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ return "{0}({1})".format(self.getname(), ", ".join(values))
+
+
+class NPV_ExternalFunctionExpression(ExternalFunctionExpression):
+ __slots__ = ()
+
+ def is_potentially_variable(self):
+ return False
+
+
+class PowExpression(ExpressionBase):
+ """
+ Power expressions::
+
+ x**y
+ """
+
+ __slots__ = ()
+ PRECEDENCE = 2
+
+ def _compute_polynomial_degree(self, result):
+ # PowExpression is a tricky thing. In general, a**b is
+ # nonpolynomial, however, if b == 0, it is a constant
+ # expression, and if a is polynomial and b is a positive
+ # integer, it is also polynomial. While we would like to just
+ # call this a non-polynomial expression, these exceptions occur
+ # too frequently (and in particular, a**2)
+ l,r = result
+ if r == 0:
+ if l == 0:
+ return 0
+ # NOTE: use value before int() so that we don't
+ # run into the disabled __int__ method on
+ # NumericValue
+ exp = value(self._args_[1], exception=False)
+ if exp is None:
+ return None
+ if exp == int(exp):
+ if l is not None and exp > 0:
+ return l * exp
+ elif exp == 0:
+ return 0
+ return None
+
+ def _is_fixed(self, args):
+ assert(len(args) == 2)
+ if not args[1]:
+ return False
+ return args[0] or value(self._args_[1]) == 0
+
+ def _precedence(self):
+ return PowExpression.PRECEDENCE
+
+ def _apply_operation(self, result):
+ _l, _r = result
+ return _l ** _r
+
+ def getname(self, *args, **kwds):
+ return 'pow'
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ if verbose:
+ return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ return "{0}**{1}".format(values[0], values[1])
+
+
+class NPV_PowExpression(PowExpression):
+ __slots__ = ()
+
+ def is_potentially_variable(self):
+ return False
+
+
+class ProductExpression(ExpressionBase):
+ """
+ Product expressions::
+
+ x*y
+ """
+
+ __slots__ = ()
+ PRECEDENCE = 4
+
+ def _precedence(self):
+ return ProductExpression.PRECEDENCE
+
+ def _compute_polynomial_degree(self, result):
+ # NB: We can't use sum() here because None (non-polynomial)
+ # overrides a numeric value (and sum() just ignores it - or
+ # errors in py3k)
+ a, b = result
+ if a is None or b is None:
+ return None
+ else:
+ return a + b
+
+ def getname(self, *args, **kwds):
+ return 'prod'
+
+ def _apply_operation(self, result):
+ _l, _r = result
+ return _l * _r
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ if verbose:
+ return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ if values[0] == "1" or values[0] == "1.0":
+ return values[1]
+ if values[0] == "-1" or values[0] == "-1.0":
+ return "- {0}".format(values[1])
+ return "{0}*{1}".format(values[0],values[1])
+
+
+class NPV_ProductExpression(ProductExpression):
+ __slots__ = ()
+
+ def is_potentially_variable(self):
+ return False
+
+
+class MonomialTermExpression(ProductExpression):
+ __slots__ = ()
+
+
+class ReciprocalExpression(ExpressionBase):
+ """
+ Reciprocal expressions::
+
+ 1/x
+ """
+ __slots__ = ()
+ PRECEDENCE = 3.5
+
+ def nargs(self):
+ return 1
+
+ def _precedence(self):
+ return ReciprocalExpression.PRECEDENCE
+
+ def _compute_polynomial_degree(self, result):
+ if result[0] == 0:
+ return 0
+ return None
+
+ def getname(self, *args, **kwds):
+ return 'recip'
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ if verbose:
+ return "{0}({1})".format(self.getname(), values[0])
+ return "(1/{0})".format(values[0])
+
+ def _apply_operation(self, result):
+ return 1 / result[0]
+
+
+class NPV_ReciprocalExpression(ReciprocalExpression):
+ __slots__ = ()
+
+ def is_potentially_variable(self):
+ return False
+
+
+class _LinearOperatorExpression(ExpressionBase):
+ """
+ An 'abstract' class that defines the polynomial degree for a simple
+ linear operator
+ """
+
+ __slots__ = ()
+
+ def _compute_polynomial_degree(self, result):
+ # NB: We can't use max() here because None (non-polynomial)
+ # overrides a numeric value (and max() just ignores it)
+ ans = 0
+ for x in result:
+ if x is None:
+ return None
+ elif ans < x:
+ ans = x
+ return ans
+
+
+class RangedExpression(_LinearOperatorExpression):
+ """
+ Ranged expressions, which define relations with a lower and upper bound::
+
+ x < y < z
+ x <= y <= z
+
+ Args:
+ args (tuple): child nodes
+ strict (tuple): flags that indicates whether the inequalities are strict
+ """
+
+ __slots__ = ('_strict',)
+ PRECEDENCE = 9
+
+ def __init__(self, args, strict):
+ super(RangedExpression,self).__init__(args)
+ self._strict = strict
+
+ def nargs(self):
+ return 3
+
+ def create_node_with_local_data(self, args, memo):
+ return self.__class__(args, self._strict)
+
+ def __getstate__(self):
+ state = super(RangedExpression, self).__getstate__()
+ for i in RangedExpression.__slots__:
+ state[i] = getattr(self, i)
+ return state
+
+ def __nonzero__(self):
+ return bool(self())
+
+ __bool__ = __nonzero__
+
+ def is_relational(self):
+ return True
+
+ def _precedence(self):
+ return RangedExpression.PRECEDENCE
+
+ def _apply_operation(self, result):
+ _l, _b, _r = result
+ if not self._strict[0]:
+ if not self._strict[1]:
+ return _l <= _b and _b <= _r
+ else:
+ return _l <= _b and _b < _r
+ elif not self._strict[1]:
+ return _l < _b and _b <= _r
+ else:
+ return _l < _b and _b < _r
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ return "{0} {1} {2} {3} {4}".format(values[0], '<' if self._strict[0] else '<=', values[1], '<' if self._strict[1] else '<=', values[2])
+
+ def is_constant(self):
+ return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \
+ (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant()) and \
+ (self._args_[2].__class__ in native_numeric_types or self._args_[2].is_constant())
+
+ def is_potentially_variable(self):
+ return (self._args_[1].__class__ not in native_numeric_types and \
+ self._args_[1].is_potentially_variable()) or \
+ (self._args_[0].__class__ not in native_numeric_types and \
+ self._args_[0].is_potentially_variable()) or \
+ (self._args_[2].__class__ not in native_numeric_types and \
+ self._args_[2].is_potentially_variable())
+
+
+class InequalityExpression(_LinearOperatorExpression):
+ """
+ Inequality expressions, which define less-than or
+ less-than-or-equal relations::
+
+ x < y
+ x <= y
+
+ Args:
+ args (tuple): child nodes
+ strict (bool): a flag that indicates whether the inequality is strict
+ """
+
+ __slots__ = ('_strict',)
+ PRECEDENCE = 9
+
+ def __init__(self, args, strict):
+ super(InequalityExpression,self).__init__(args)
+ self._strict = strict
+
+ def nargs(self):
+ return 2
+
+ def create_node_with_local_data(self, args, memo):
+ return self.__class__(args, self._strict)
+
+ def __getstate__(self):
+ state = super(InequalityExpression, self).__getstate__()
+ for i in InequalityExpression.__slots__:
+ state[i] = getattr(self, i)
+ return state
+
+ def __nonzero__(self):
+ if _using_chained_inequality and not self.is_constant(): #pragma: no cover
+ deprecation_warning("Chained inequalities are deprecated. "
+ "Use the inequality() function to "
+ "express ranged inequality expressions.") # Remove in Pyomo 6.0
+ _chainedInequality.call_info = traceback.extract_stack(limit=2)[-2]
+ _chainedInequality.prev = self
+ return True
+ #return bool(self()) # This is needed to apply simple evaluation of inequalities
+
+ return bool(self())
+
+ __bool__ = __nonzero__
+
+ def is_relational(self):
+ return True
+
+ def _precedence(self):
+ return InequalityExpression.PRECEDENCE
+
+ def _apply_operation(self, result):
+ _l, _r = result
+ if self._strict:
+ return _l < _r
+ return _l <= _r
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ if len(values) == 2:
+ return "{0} {1} {2}".format(values[0], '<' if self._strict else '<=', values[1])
+
+ def is_constant(self):
+ return (self._args_[0].__class__ in native_numeric_types or self._args_[0].is_constant()) and \
+ (self._args_[1].__class__ in native_numeric_types or self._args_[1].is_constant())
+
+ def is_potentially_variable(self):
+ return (self._args_[0].__class__ not in native_numeric_types and \
+ self._args_[0].is_potentially_variable()) or \
+ (self._args_[1].__class__ not in native_numeric_types and \
+ self._args_[1].is_potentially_variable())
+
+
+def inequality(lower=None, body=None, upper=None, strict=False):
+ """
+ A utility function that can be used to declare inequality and
+ ranged inequality expressions. The expression::
+
+ inequality(2, model.x)
+
+ is equivalent to the expression::
+
+ 2 <= model.x
+
+ The expression::
+
+ inequality(2, model.x, 3)
+
+ is equivalent to the expression::
+
+ 2 <= model.x <= 3
+
+ .. note:: This ranged inequality syntax is deprecated in Pyomo.
+ This function provides a mechanism for expressing
+ ranged inequalities without chained inequalities.
+
+ Args:
+ lower: an expression defines a lower bound
+ body: an expression defines the body of a ranged constraint
+ upper: an expression defines an upper bound
+ strict (bool): A boolean value that indicates whether the inequality
+ is strict. Default is :const:`False`.
+
+ Returns:
+ A relational expression. The expression is an inequality
+ if any of the values :attr:`lower`, :attr:`body` or
+ :attr:`upper` is :const:`None`. Otherwise, the expression
+ is a ranged inequality.
+ """
+ if lower is None:
+ if body is None or upper is None:
+ raise ValueError("Invalid inequality expression.")
+ return InequalityExpression((body, upper), strict)
+ if body is None:
+ if lower is None or upper is None:
+ raise ValueError("Invalid inequality expression.")
+ return InequalityExpression((lower, upper), strict)
+ if upper is None:
+ return InequalityExpression((lower, body), strict)
+ return RangedExpression((lower, body, upper), (strict, strict))
+
+class EqualityExpression(_LinearOperatorExpression):
+ """
+ Equality expression::
+
+ x == y
+ """
+
+ __slots__ = ()
+ PRECEDENCE = 9
+
+ def nargs(self):
+ return 2
+
+ def __nonzero__(self):
+ return bool(self())
+
+ __bool__ = __nonzero__
+
+ def is_relational(self):
+ return True
+
+ def _precedence(self):
+ return EqualityExpression.PRECEDENCE
+
+ def _apply_operation(self, result):
+ _l, _r = result
+ return _l == _r
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ return "{0} == {1}".format(values[0], values[1])
+
+ def is_constant(self):
+ return self._args_[0].is_constant() and self._args_[1].is_constant()
+
+ def is_potentially_variable(self):
+ return self._args_[0].is_potentially_variable() or self._args_[1].is_potentially_variable()
+
+
+class SumExpressionBase(_LinearOperatorExpression):
+ """
+ A base class for simple summation of expressions
+
+ The class hierarchy for summation is different than for other
+ expression types. For example, ProductExpression defines
+ the class for representing binary products, and sub-classes are
+ specializations of that class.
+
+ By contrast, the SumExpressionBase is not directly used to
+ represent expressions. Rather, this base class provides
+ commonly used methods and data. The reason is that some
+ subclasses of SumExpressionBase are binary while others
+ are n-ary.
+
+ Thus, developers will need to treat checks for summation
+ classes differently, depending on whether the binary/n-ary
+ operations are different.
+ """
+
+ __slots__ = ()
+ PRECEDENCE = 6
+
+ def _precedence(self):
+ return SumExpressionBase.PRECEDENCE
+
+ def getname(self, *args, **kwds):
+ return 'sum'
+
+
+class NPV_SumExpression(SumExpressionBase):
+ __slots__ = ()
+
+ def create_potentially_variable_object(self):
+ return SumExpression( self._args_ )
+
+ def _apply_operation(self, result):
+ l_, r_ = result
+ return l_ + r_
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ if verbose:
+ return "{0}({1}, {2})".format(self.getname(), values[0], values[1])
+ if values[1][0] == '-':
+ return "{0} {1}".format(values[0],values[1])
+ return "{0} + {1}".format(values[0],values[1])
+
+ def is_potentially_variable(self):
+ return False
+
+
+class SumExpression(SumExpressionBase):
+ """
+ Sum expression::
+
+ x + y
+
+ Args:
+ args (list): Children nodes
+ """
+ __slots__ = ('_nargs','_shared_args')
+ PRECEDENCE = 6
+
+ def __init__(self, args):
+ self._args_ = args
+ self._shared_args = False
+ self._nargs = len(self._args_)
+
+ def add(self, new_arg):
+ if new_arg.__class__ in native_numeric_types and new_arg == 0:
+ return self
+ # Clone 'self', because SumExpression are immutable
+ self._shared_args = True
+ self = self.__class__(self._args_)
+ #
+ if new_arg.__class__ is SumExpression or new_arg.__class__ is _MutableSumExpression:
+ self._args_.extend( islice(new_arg._args_, new_arg._nargs) )
+ elif not new_arg is None:
+ self._args_.append(new_arg)
+ self._nargs = len(self._args_)
+ return self
+
+ def nargs(self):
+ return self._nargs
+
+ def _precedence(self):
+ return SumExpression.PRECEDENCE
+
+ def _apply_operation(self, result):
+ return sum(result)
+
+ def create_node_with_local_data(self, args, memo):
+ return self.__class__(list(args))
+
+ def __getstate__(self):
+ state = super(SumExpression, self).__getstate__()
+ for i in SumExpression.__slots__:
+ state[i] = getattr(self, i)
+ return state
+
+ def is_constant(self):
+ #
+ # In most normal contexts, a SumExpression is
+ # non-constant. When Forming expressions, constant
+ # parameters are turned into numbers, which are
+ # simply added. Mutable parameters, variables and
+ # expressions are not constant.
+ #
+ return False
+
+ def is_potentially_variable(self):
+ for v in islice(self._args_, self._nargs):
+ if v.__class__ in nonpyomo_leaf_types:
+ continue
+ if v.is_variable_type() or v.is_potentially_variable():
+ return True
+ return False
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ if verbose:
+ tmp = [values[0]]
+ for i in range(1,len(values)):
+ tmp.append(", ")
+ tmp.append(values[i])
+ return "{0}({1})".format(self.getname(), "".join(tmp))
+
+ tmp = [values[0]]
+ for i in range(1,len(values)):
+ if values[i][0] == '-':
+ tmp.append(' - ')
+ j = 1
+ while values[i][j] == ' ':
+ j += 1
+ tmp.append(values[i][j:])
+ else:
+ tmp.append(' + ')
+ tmp.append(values[i])
+ return ''.join(tmp)
+
+
+class _MutableSumExpression(SumExpression):
+ """
+ A mutable SumExpression
+
+ The :func:`add` method is slightly different in that it
+ does not create a new sum expression, but modifies the
+ :attr:`_args_` data in place.
+ """
+
+ __slots__ = ()
+
+ def add(self, new_arg):
+ if new_arg.__class__ in native_numeric_types and new_arg == 0:
+ return self
+ # Do not clone 'self', because _MutableSumExpression are mutable
+ #self._shared_args = True
+ #self = self.__class__(list(self.args))
+ #
+ if new_arg.__class__ is SumExpression or new_arg.__class__ is _MutableSumExpression:
+ self._args_.extend( islice(new_arg._args_, new_arg._nargs) )
+ elif not new_arg is None:
+ self._args_.append(new_arg)
+ self._nargs = len(self._args_)
+ return self
+
+
+class GetItemExpression(ExpressionBase):
+ """
+ Expression to call :func:`__getitem__` on the base object.
+ """
+ __slots__ = ('_base',)
+ PRECEDENCE = 1
+
+ def _precedence(self): #pragma: no cover
+ return GetItemExpression.PRECEDENCE
+
+ def __init__(self, args, base=None):
+ """Construct an expression with an operation and a set of arguments"""
+ self._args_ = args
+ self._base = base
+
+ def nargs(self):
+ return len(self._args_)
+
+ def create_node_with_local_data(self, args, memo):
+ return self.__class__(args, self._base)
+
+ def __getstate__(self):
+ state = super(GetItemExpression, self).__getstate__()
+ for i in GetItemExpression.__slots__:
+ state[i] = getattr(self, i)
+ return state
+
+ def getname(self, *args, **kwds):
+ return self._base.getname(*args, **kwds)
+
+ def is_potentially_variable(self):
+ if any(arg.is_potentially_variable() for arg in self._args_
+ if arg.__class__ not in nonpyomo_leaf_types):
+ return True
+ for x in itervalues(self._base):
+ if x.__class__ not in nonpyomo_leaf_types \
+ and x.is_potentially_variable():
+ return True
+ return False
+
+ def is_fixed(self):
+ if any(self._args_):
+ for x in itervalues(self._base):
+ if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed():
+ return False
+ return True
+
+ def _is_fixed(self, values):
+ from pyomo.core.base import Var # TODO
+ from pyomo.core.kernel.component_variable import IVariable # TODO
+ if isinstance(self._base, (Var, IVariable)):
+ for x in itervalues(self._base):
+ if not x.__class__ in nonpyomo_leaf_types and not x.is_fixed():
+ return False
+ return True
+
+ def _compute_polynomial_degree(self, result): # TODO: coverage
+ if any(x != 0 for x in result):
+ return None
+ ans = 0
+ for x in itervalues(self._base):
+ if x.__class__ in nonpyomo_leaf_types:
+ continue
+ tmp = x.polynomial_degree()
+ if tmp is None:
+ return None
+ elif tmp > ans:
+ ans = tmp
+ return ans
+
+ def _apply_operation(self, result): # TODO: coverage
+ return value(self._base.__getitem__( tuple(result) ))
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ if verbose:
+ return "{0}({1})".format(self.getname(), values[0])
+ return "%s%s" % (self.getname(), values[0])
+
+ def resolve_template(self): # TODO: coverage
+ return self._base.__getitem__(tuple(value(i) for i in self._args_))
+
+
+class Expr_ifExpression(ExpressionBase):
+ """
+ A logical if-then-else expression::
+
+ Expr_if(IF_=x, THEN_=y, ELSE_=z)
+
+ Args:
+ IF_ (expression): A relational expression
+ THEN_ (expression): An expression that is used if :attr:`IF_` is true.
+ ELSE_ (expression): An expression that is used if :attr:`IF_` is false.
+ """
+ __slots__ = ('_if','_then','_else')
+
+ # **NOTE**: This class evaluates the branching "_if" expression
+ # on a number of occasions. It is important that
+ # one uses __call__ for value() and NOT bool().
+
+ def __init__(self, IF_=None, THEN_=None, ELSE_=None):
+ if type(IF_) is tuple and THEN_==None and ELSE_==None:
+ IF_, THEN_, ELSE_ = IF_
+ self._args_ = (IF_, THEN_, ELSE_)
+ self._if = IF_
+ self._then = THEN_
+ self._else = ELSE_
+ if self._if.__class__ in native_numeric_types:
+ self._if = as_numeric(self._if)
+
+ def nargs(self):
+ return 3
+
+ def __getstate__(self):
+ state = super(Expr_ifExpression, self).__getstate__()
+ for i in Expr_ifExpression.__slots__:
+ state[i] = getattr(self, i)
+ return state
+
+ def getname(self, *args, **kwds):
+ return "Expr_if"
+
+ def _is_fixed(self, args):
+ assert(len(args) == 3)
+ if args[0]: #self._if.is_constant():
+ if self._if():
+ return args[1] #self._then.is_constant()
+ else:
+ return args[2] #self._else.is_constant()
+ else:
+ return False
+
+ def is_constant(self):
+ if self._if.__class__ in native_numeric_types or self._if.is_constant():
+ if value(self._if):
+ return (self._then.__class__ in native_numeric_types or self._then.is_constant())
+ else:
+ return (self._else.__class__ in native_numeric_types or self._else.is_constant())
+ else:
+ return (self._then.__class__ in native_numeric_types or self._then.is_constant()) and \
+ (self._else.__class__ in native_numeric_types or self._else.is_constant())
+
+ def is_potentially_variable(self):
+ return ((not self._if.__class__ in native_numeric_types) and self._if.is_potentially_variable()) or \
+ ((not self._then.__class__ in native_numeric_types) and self._then.is_potentially_variable()) or \
+ ((not self._else.__class__ in native_numeric_types) and self._else.is_potentially_variable())
+
+ def _compute_polynomial_degree(self, result):
+ _if, _then, _else = result
+ if _if == 0:
+ try:
+ return _then if self._if() else _else
+ except ValueError:
+ pass
+ return None
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ return '{0}( ( {1} ), then=( {2} ), else=( {3} ) )'.\
+ format(self.getname(), self._if, self._then, self._else)
+
+ def _apply_operation(self, result):
+ _if, _then, _else = result
+ return _then if _if else _else
+
+
+class UnaryFunctionExpression(ExpressionBase):
+ """
+ An expression object used to define intrinsic functions (e.g. sin, cos, tan).
+
+ Args:
+ args (tuple): Children nodes
+ name (string): The function name
+ fcn: The function that is used to evaluate this expression
+ """
+ __slots__ = ('_fcn', '_name')
+
+ def __init__(self, args, name=None, fcn=None):
+ if not type(args) is tuple:
+ args = (args,)
+ self._args_ = args
+ self._name = name
+ self._fcn = fcn
+
+ def nargs(self):
+ return 1
+
+ def create_node_with_local_data(self, args, memo):
+ return self.__class__(args, self._name, self._fcn)
+
+ def __getstate__(self):
+ state = super(UnaryFunctionExpression, self).__getstate__()
+ for i in UnaryFunctionExpression.__slots__:
+ state[i] = getattr(self, i)
+ return state
+
+ def getname(self, *args, **kwds):
+ return self._name
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ if verbose:
+ return "{0}({1})".format(self.getname(), values[0])
+ if values[0][0] == '(':
+ return '{0}{1}'.format(self._name, values[0])
+ else:
+ return '{0}({1})'.format(self._name, values[0])
+
+ def _compute_polynomial_degree(self, result):
+ if result[0] == 0:
+ return 0
+ else:
+ return None
+
+ def _apply_operation(self, result):
+ return self._fcn(result[0])
+
+
+class NPV_UnaryFunctionExpression(UnaryFunctionExpression):
+ __slots__ = ()
+
+ def is_potentially_variable(self):
+ return False
+
+
+# NOTE: This should be a special class, since the expression generation relies
+# on the Python __abs__ method.
+class AbsExpression(UnaryFunctionExpression):
+ """
+ An expression object for the :func:`abs` function.
+
+ Args:
+ args (tuple): Children nodes
+ """
+ __slots__ = ()
+
+ def __init__(self, arg):
+ super(AbsExpression, self).__init__(arg, 'abs', abs)
+
+ def create_node_with_local_data(self, args, memo):
+ return self.__class__(args)
+
+
+class NPV_AbsExpression(AbsExpression):
+ __slots__ = ()
+
+ def is_potentially_variable(self):
+ return False
+
+
+class LinearExpression(ExpressionBase):
+ """
+ An expression object linear polynomials.
+
+ Args:
+ args (tuple): Children nodes
+ """
+ __slots__ = ('constant', # The constant term
+ 'linear_coefs', # Linear coefficients
+ 'linear_vars') # Linear variables
+
+ PRECEDENCE = 6
+
+ def __init__(self, args=None):
+ self.constant = 0
+ self.linear_coefs = []
+ self.linear_vars = []
+ self._args_ = tuple()
+
+ def nargs(self):
+ return 0
+
+ def _precedence(self):
+ return LinearExpression.PRECEDENCE
+
+ def __getstate__(self):
+ state = super(LinearExpression, self).__getstate__()
+ for i in LinearExpression.__slots__:
+ state[i] = getattr(self,i)
+ return state
+
+ def X__deepcopy__(self, memo):
+ return self.create_node_with_local_data(None, memo)
+
+ def create_node_with_local_data(self, args, memo):
+ repn = self.__class__()
+ repn.constant = deepcopy(self.constant, memo=memo)
+ repn.linear_coefs = deepcopy(self.linear_coefs, memo=memo)
+ repn.linear_vars = deepcopy(self.linear_vars, memo=memo)
+ return repn
+
+ def getname(self, *args, **kwds):
+ return 'sum'
+
+ def _compute_polynomial_degree(self, result):
+ return 1 if len(self.linear_vars) > 0 else 0
+
+ def is_constant(self):
+ return len(self.linear_vars) == 0
+
+ def is_fixed(self):
+ if len(self.linear_vars) == 0:
+ return True
+ for v in self.linear_vars:
+ if not v.fixed:
+ return False
+ return True
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ tmp = []
+ if compute_values:
+ const_ = value(self.constant)
+ if not isclose(const_,0):
+ tmp = [str(const_)]
+ elif self.constant.__class__ in native_numeric_types:
+ if not isclose(self.constant, 0):
+ tmp = [str(self.constant)]
+ else:
+ tmp = [self.constant.to_string(compute_values=False)]
+ if verbose:
+ for c,v in zip(self.linear_coefs, self.linear_vars):
+ if smap: # TODO: coverage
+ v_ = smap.getSymbol(v)
+ else:
+ v_ = str(v)
+ if c.__class__ in native_numeric_types or compute_values:
+ c_ = value(c)
+ if isclose(c_,1):
+ tmp.append(str(v_))
+ elif isclose(c_,0):
+ continue
+ else:
+ tmp.append("prod(%s, %s)" % (str(c_),str(v_)))
+ else:
+ tmp.append("prod(%s, %s)" % (str(c), v_))
+ return "{0}({1})".format(self.getname(), ', '.join(tmp))
+ for c,v in zip(self.linear_coefs, self.linear_vars):
+ if smap:
+ v_ = smap.getSymbol(v)
+ else:
+ v_ = str(v)
+ if c.__class__ in native_numeric_types or compute_values:
+ c_ = value(c)
+ if isclose(c_,1):
+ tmp.append(" + %s" % v_)
+ elif isclose(c_,0):
+ continue
+ elif isclose(c_,-1):
+ tmp.append(" - %s" % v_)
+ elif c_ < 0:
+ tmp.append(" - %s*%s" % (str(math.fabs(c_)), v_))
+ else:
+ tmp.append(" + %s*%s" % (str(c_), v_))
+ else:
+ tmp.append(" + %s*%s" % (str(c), v_))
+ s = "".join(tmp)
+ if len(s) == 0: #pragma: no cover
+ return s
+ if s[0] == " ":
+ if s[1] == "+":
+ return s[3:]
+ return s[1:]
+ return s
+
+ def is_potentially_variable(self):
+ return len(self.linear_vars) > 0
+
+ def _apply_operation(self, result):
+ return value(self.constant) + sum(value(c)*v.value for c,v in zip(self.linear_coefs, self.linear_vars))
+
+ #@profile
+ def _combine_expr(self, etype, _other):
+ if etype == _add or etype == _sub or etype == -_add or etype == -_sub:
+ #
+ # if etype == _sub, then _MutableLinearExpression - VAL
+ # if etype == -_sub, then VAL - _MutableLinearExpression
+ #
+ if etype == _sub:
+ omult = -1
+ else:
+ omult = 1
+ if etype == -_sub:
+ self.constant *= -1
+ for i,c in enumerate(self.linear_coefs):
+ self.linear_coefs[i] = -c
+
+ if _other.__class__ in native_numeric_types or not _other.is_potentially_variable():
+ self.constant = self.constant + omult * _other
+ #
+ # WEH - These seem like uncommon cases, so I think we should defer processing them
+ # until _decompose_linear_terms
+ #
+ #elif _other.__class__ is _MutableLinearExpression:
+ # self.constant = self.constant + omult * _other.constant
+ # for c,v in zip(_other.linear_coefs, _other.linear_vars):
+ # self.linear_coefs.append(omult*c)
+ # self.linear_vars.append(v)
+ #elif _other.__class__ is SumExpression or _other.__class__ is _MutableSumExpression:
+ # for e in _other._args_:
+ # for c,v in _decompose_linear_terms(e, multiplier=omult):
+ # if v is None:
+ # self.constant += c
+ # else:
+ # self.linear_coefs.append(c)
+ # self.linear_vars.append(v)
+ else:
+ for c,v in _decompose_linear_terms(_other, multiplier=omult):
+ if v is None:
+ self.constant += c
+ else:
+ self.linear_coefs.append(c)
+ self.linear_vars.append(v)
+
+ elif etype == _mul or etype == -_mul:
+ if _other.__class__ in native_numeric_types:
+ multiplier = _other
+ elif _other.is_potentially_variable():
+ if len(self.linear_vars) > 0:
+ raise ValueError("Cannot multiply a linear expression with a variable expression")
+ #
+ # The linear expression is a constant, so re-initialize it with
+ # a single term that multiplies the expression by the constant value.
+ #
+ c_ = self.constant
+ self.constant = 0
+ for c,v in _decompose_linear_terms(_other):
+ if v is None:
+ self.constant = c*c_
+ else:
+ self.linear_vars.append(v)
+ self.linear_coefs.append(c*c_)
+ return self
+ else:
+ multiplier = _other
+
+ if multiplier.__class__ in native_numeric_types and multiplier == 0:
+ self.constant = 0
+ self.linear_vars = []
+ self.linear_coefs = []
+ else:
+ self.constant *= multiplier
+ for i,c in enumerate(self.linear_coefs):
+ self.linear_coefs[i] = c*multiplier
+
+ elif etype == _div:
+ if _other.__class__ in native_numeric_types:
+ divisor = _other
+ elif _other.is_potentially_variable():
+ raise ValueError("Unallowed operation on linear expression: division with a variable RHS")
+ else:
+ divisor = _other
+ self.constant /= divisor
+ for i,c in enumerate(self.linear_coefs):
+ self.linear_coefs[i] = c/divisor
+
+ elif etype == -_div:
+ if self.is_potentially_variable():
+ raise ValueError("Unallowed operation on linear expression: division with a variable RHS")
+ return _other / self.constant
+
+ elif etype == _neg:
+ self.constant *= -1
+ for i,c in enumerate(self.linear_coefs):
+ self.linear_coefs[i] = - c
+
+ else:
+ raise ValueError("Unallowed operation on mutable linear expression: %d" % etype) #pragma: no cover
+
+ return self
+
+
+class _MutableLinearExpression(LinearExpression):
+ __slots__ = ()
+
+
+#-------------------------------------------------------
+#
+# Functions used to generate expressions
+#
+#-------------------------------------------------------
+
+def decompose_term(expr):
+ """
+ A function that returns a tuple consisting of (1) a flag indicated
+ whether the expression is linear, and (2) a list of tuples that
+ represents the terms in the linear expression.
+
+ Args:
+ expr (expression): The root node of an expression tree
+
+ Returns:
+ A tuple with the form ``(flag, list)``. If :attr:`flag` is :const:`False`, then
+ a nonlinear term has been found, and :const:`list` is :const:`None`.
+ Otherwise, :const:`list` is a list of tuples: ``(coef, value)``.
+ If :attr:`value` is :const:`None`, then this
+ represents a constant term with value :attr:`coef`. Otherwise,
+ :attr:`value` is a variable object, and :attr:`coef` is the
+ numeric coefficient.
+ """
+ if expr.__class__ in nonpyomo_leaf_types or not expr.is_potentially_variable():
+ return True, [(expr,None)]
+ elif expr.is_variable_type():
+ return True, [(1,expr)]
+ else:
+ try:
+ terms = [t_ for t_ in _decompose_linear_terms(expr)]
+ return True, terms
+ except LinearDecompositionError:
+ return False, None
+
+class LinearDecompositionError(Exception):
+
+ def __init__(self, message):
+ super(LinearDecompositionError, self).__init__(message)
+
+
+def _decompose_linear_terms(expr, multiplier=1):
+ """
+ A generator function that yields tuples for the linear terms
+ in an expression. If nonlinear terms are encountered, this function
+ raises the :class:`LinearDecompositionError` exception.
+
+ Args:
+ expr (expression): The root node of an expression tree
+
+ Yields:
+ Tuples: ``(coef, value)``. If :attr:`value` is :const:`None`,
+ then this represents a constant term with value :attr:`coef`.
+ Otherwise, :attr:`value` is a variable object, and :attr:`coef`
+ is the numeric coefficient.
+
+ Raises:
+ :class:`LinearDecompositionError` if a nonlinear term is encountered.
+ """
+ if expr.__class__ in native_numeric_types or not expr.is_potentially_variable():
+ yield (multiplier*expr,None)
+ elif expr.is_variable_type():
+ yield (multiplier,expr)
+ elif expr.__class__ is MonomialTermExpression:
+ yield (multiplier*expr._args_[0], expr._args_[1])
+ elif expr.__class__ is ProductExpression:
+ if expr._args_[0].__class__ in native_numeric_types or not expr._args_[0].is_potentially_variable():
+ for term in _decompose_linear_terms(expr._args_[1], multiplier*expr._args_[0]):
+ yield term
+ elif expr._args_[1].__class__ in native_numeric_types or not expr._args_[1].is_potentially_variable():
+ for term in _decompose_linear_terms(expr._args_[0], multiplier*expr._args_[1]):
+ yield term
+ else:
+ raise LinearDecompositionError("Quadratic terms exist in a product expression.")
+ elif expr.__class__ is ReciprocalExpression:
+ # The argument is potentially variable, so this represents a nonlinear term
+ #
+ # NOTE: We're ignoring possible simplifications
+ raise LinearDecompositionError("Unexpected nonlinear term")
+ elif expr.__class__ is SumExpression or expr.__class__ is _MutableSumExpression:
+ for arg in expr.args:
+ for term in _decompose_linear_terms(arg, multiplier):
+ yield term
+ elif expr.__class__ is NegationExpression:
+ for term in _decompose_linear_terms(expr._args_[0], -multiplier):
+ yield term
+ elif expr.__class__ is LinearExpression or expr.__class__ is _MutableLinearExpression:
+ if not (expr.constant.__class__ in native_numeric_types and expr.constant == 0):
+ yield (multiplier*expr.constant,None)
+ if len(expr.linear_coefs) > 0:
+ for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ yield (multiplier*c,v)
+ else:
+ raise LinearDecompositionError("Unexpected nonlinear term") #pragma: no cover
+
+
+def _process_arg(obj):
+ #if False and obj.__class__ is SumExpression or obj.__class__ is _MutableSumExpression:
+ # if ignore_entangled_expressions.detangle[-1] and obj._is_owned:
+ #
+ # If the viewsum expression is owned, then we need to
+ # clone it to avoid creating an entangled expression.
+ #
+ # But we don't have to worry about entanglement amongst other immutable
+ # expression objects.
+ #
+ # return clone_expression( obj, clone_leaves=False )
+ # return obj
+
+ #if obj.is_expression_type():
+ # return obj
+
+ if obj.__class__ is NumericConstant:
+ return value(obj)
+
+ if (obj.__class__ is _ParamData or obj.__class__ is SimpleParam) and not obj._component()._mutable:
+ if not obj._constructed:
+ return obj
+ return obj()
+
+ if obj.is_indexed():
+ raise TypeError(
+ "Argument for expression is an indexed numeric "
+ "value\nspecified without an index:\n\t%s\nIs this "
+ "value defined over an index that you did not specify?"
+ % (obj.name, ) )
+
+ return obj
+
+
+#@profile
+def _generate_sum_expression(etype, _self, _other):
+
+ if etype > _inplace:
+ etype -= _inplace
+
+ if _self.__class__ is _MutableLinearExpression:
+ try:
+ if etype >= _unary:
+ return _self._combine_expr(etype, None)
+ if _other.__class__ is not _MutableLinearExpression:
+ if not (_other.__class__ in native_types or _other.is_expression_type()):
+ _other = _process_arg(_other)
+ return _self._combine_expr(etype, _other)
+ except LinearDecompositionError:
+ pass
+ elif _other.__class__ is _MutableLinearExpression:
+ try:
+ if not (_self.__class__ in native_types or _self.is_expression_type()):
+ _self = _process_arg(_self)
+ return _other._combine_expr(-etype, _self)
+ except LinearDecompositionError:
+ pass
+
+ #
+ # A mutable sum is used as a context manager, so we don't
+ # need to process it to see if it's entangled.
+ #
+ if not (_self.__class__ in native_types or _self.is_expression_type()):
+ _self = _process_arg(_self)
+
+ if etype == _neg:
+ if _self.__class__ in native_numeric_types:
+ return - _self
+ elif _self.__class__ is MonomialTermExpression:
+ tmp = _self._args_[0]
+ if tmp.__class__ in native_numeric_types:
+ return MonomialTermExpression((-tmp, _self._args_[1]))
+ else:
+ return MonomialTermExpression((NPV_NegationExpression((tmp,)), _self._args_[1]))
+ elif _self.is_variable_type():
+ return MonomialTermExpression((-1, _self))
+ elif _self.is_potentially_variable():
+ return NegationExpression((_self,))
+ else:
+ if _self.__class__ is NPV_NegationExpression:
+ return _self._args_[0]
+ return NPV_NegationExpression((_self,))
+
+ if not (_other.__class__ in native_types or _other.is_expression_type()):
+ _other = _process_arg(_other)
+
+ if etype < 0:
+ #
+ # This may seem obvious, but if we are performing an
+ # "R"-operation (i.e. reverse operation), then simply reverse
+ # self and other. This is legitimate as we are generating a
+ # completely new expression here.
+ #
+ etype *= -1
+ _self, _other = _other, _self
+
+ if etype == _add:
+ #
+ # x + y
+ #
+ if (_self.__class__ is SumExpression and not _self._shared_args) or \
+ _self.__class__ is _MutableSumExpression:
+ return _self.add(_other)
+ elif (_other.__class__ is SumExpression and not _other._shared_args) or \
+ _other.__class__ is _MutableSumExpression:
+ return _other.add(_self)
+ elif _other.__class__ in native_numeric_types:
+ if _self.__class__ in native_numeric_types:
+ return _self + _other
+ elif _other == 0:
+ return _self
+ if _self.is_potentially_variable():
+ return SumExpression([_self, _other])
+ return NPV_SumExpression((_self, _other))
+ elif _self.__class__ in native_numeric_types:
+ if _self == 0:
+ return _other
+ if _other.is_potentially_variable():
+ #return _LinearSumExpression((_self, _other))
+ return SumExpression([_self, _other])
+ return NPV_SumExpression((_self, _other))
+ elif _other.is_potentially_variable():
+ #return _LinearSumExpression((_self, _other))
+ return SumExpression([_self, _other])
+ elif _self.is_potentially_variable():
+ #return _LinearSumExpression((_other, _self))
+ #return SumExpression([_other, _self])
+ return SumExpression([_self, _other])
+ else:
+ return NPV_SumExpression((_self, _other))
+
+ elif etype == _sub:
+ #
+ # x - y
+ #
+ if (_self.__class__ is SumExpression and not _self._shared_args) or \
+ _self.__class__ is _MutableSumExpression:
+ return _self.add(-_other)
+ elif _other.__class__ in native_numeric_types:
+ if _self.__class__ in native_numeric_types:
+ return _self - _other
+ elif _other == 0:
+ return _self
+ if _self.is_potentially_variable():
+ return SumExpression([_self, -_other])
+ return NPV_SumExpression((_self, -_other))
+ elif _self.__class__ in native_numeric_types:
+ if _self == 0:
+ if _other.__class__ is MonomialTermExpression:
+ tmp = _other._args_[0]
+ if tmp.__class__ in native_numeric_types:
+ return MonomialTermExpression((-tmp, _other._args_[1]))
+ return MonomialTermExpression((NPV_NegationExpression((_other._args_[0],)), _other._args_[1]))
+ elif _other.is_variable_type():
+ return MonomialTermExpression((-1, _other))
+ elif _other.is_potentially_variable():
+ return NegationExpression((_other,))
+ return NPV_NegationExpression((_other,))
+ elif _other.__class__ is MonomialTermExpression:
+ return SumExpression([_self, MonomialTermExpression((-_other._args_[0], _other._args_[1]))])
+ elif _other.is_variable_type():
+ return SumExpression([_self, MonomialTermExpression((-1,_other))])
+ elif _other.is_potentially_variable():
+ return SumExpression([_self, NegationExpression((_other,))])
+ return NPV_SumExpression((_self, NPV_NegationExpression((_other,))))
+ elif _other.__class__ is MonomialTermExpression:
+ return SumExpression([_self, MonomialTermExpression((-_other._args_[0], _other._args_[1]))])
+ elif _other.is_variable_type():
+ return SumExpression([_self, MonomialTermExpression((-1,_other))])
+ elif _other.is_potentially_variable():
+ return SumExpression([_self, NegationExpression((_other,))])
+ elif _self.is_potentially_variable():
+ return SumExpression([_self, NPV_NegationExpression((_other,))])
+ else:
+ return NPV_SumExpression((_self, NPV_NegationExpression((_other,))))
+
+ raise RuntimeError("Unknown expression type '%s'" % etype) #pragma: no cover
+
+#@profile
+def _generate_mul_expression(etype, _self, _other):
+
+ if etype > _inplace:
+ etype -= _inplace
+
+ if _self.__class__ is _MutableLinearExpression:
+ try:
+ if _other.__class__ is not _MutableLinearExpression:
+ if not (_other.__class__ in native_types or _other.is_expression_type()):
+ _other = _process_arg(_other)
+ return _self._combine_expr(etype, _other)
+ except LinearDecompositionError:
+ pass
+ elif _other.__class__ is _MutableLinearExpression:
+ try:
+ if not (_self.__class__ in native_types or _self.is_expression_type()):
+ _self = _process_arg(_self)
+ return _other._combine_expr(-etype, _self)
+ except LinearDecompositionError:
+ pass
+
+ #
+ # A mutable sum is used as a context manager, so we don't
+ # need to process it to see if it's entangled.
+ #
+ if not (_self.__class__ in native_types or _self.is_expression_type()):
+ _self = _process_arg(_self)
+
+ if not (_other.__class__ in native_types or _other.is_expression_type()):
+ _other = _process_arg(_other)
+
+ if etype < 0:
+ #
+ # This may seem obvious, but if we are performing an
+ # "R"-operation (i.e. reverse operation), then simply reverse
+ # self and other. This is legitimate as we are generating a
+ # completely new expression here.
+ #
+ etype *= -1
+ _self, _other = _other, _self
+
+ if etype == _mul:
+ #
+ # x * y
+ #
+ if _other.__class__ in native_numeric_types:
+ if _self.__class__ in native_numeric_types:
+ return _self * _other
+ elif _other == 0:
+ return 0
+ elif _other == 1:
+ return _self
+ if _self.is_variable_type():
+ return MonomialTermExpression((_other, _self))
+ elif _self.__class__ is MonomialTermExpression:
+ tmp = _self._args_[0]
+ if tmp.__class__ in native_numeric_types:
+ return MonomialTermExpression((_other*tmp, _self._args_[1]))
+ else:
+ return MonomialTermExpression((NPV_ProductExpression((_other,tmp)), _self._args_[1]))
+ elif _self.is_potentially_variable():
+ return ProductExpression((_self, _other))
+ return NPV_ProductExpression((_self, _other))
+ elif _self.__class__ in native_numeric_types:
+ if _self == 0:
+ return 0
+ elif _self == 1:
+ return _other
+ if _other.is_variable_type():
+ return MonomialTermExpression((_self, _other))
+ elif _other.__class__ is MonomialTermExpression:
+ tmp = _other._args_[0]
+ if tmp.__class__ in native_numeric_types:
+ return MonomialTermExpression((_self*tmp, _other._args_[1]))
+ else:
+ return MonomialTermExpression((NPV_ProductExpression((_self,tmp)), _other._args_[1]))
+ elif _other.is_potentially_variable():
+ return ProductExpression((_self, _other))
+ return NPV_ProductExpression((_self, _other))
+ elif _other.is_variable_type():
+ if _self.is_potentially_variable():
+ return ProductExpression((_self, _other))
+ return MonomialTermExpression((_self, _other))
+ elif _other.is_potentially_variable():
+ return ProductExpression((_self, _other))
+ elif _self.is_variable_type():
+ return MonomialTermExpression((_other, _self))
+ elif _self.is_potentially_variable():
+ return ProductExpression((_self, _other))
+ else:
+ return NPV_ProductExpression((_self, _other))
+
+ elif etype == _div:
+ #
+ # x / y
+ #
+ if _other.__class__ in native_numeric_types:
+ if _other == 1:
+ return _self
+ elif not _other:
+ raise ZeroDivisionError()
+ elif _self.__class__ in native_numeric_types:
+ return _self / _other
+ if _self.is_variable_type():
+ return MonomialTermExpression((1/_other, _self))
+ elif _self.__class__ is MonomialTermExpression:
+ return MonomialTermExpression((_self._args_[0]/_other, _self._args_[1]))
+ elif _self.is_potentially_variable():
+ return ProductExpression((_self, 1/_other))
+ return NPV_ProductExpression((_self, 1/_other))
+ elif _self.__class__ in native_numeric_types:
+ if _self == 0:
+ return 0
+ elif _self == 1:
+ if _other.is_potentially_variable():
+ return ReciprocalExpression((_other,))
+ return NPV_ReciprocalExpression((_other,))
+ elif _other.is_potentially_variable():
+ return ProductExpression((_self, ReciprocalExpression((_other,))))
+ return NPV_ProductExpression((_self, ReciprocalExpression((_other,))))
+ elif _other.is_potentially_variable():
+ return ProductExpression((_self, ReciprocalExpression((_other,))))
+ elif _self.is_potentially_variable():
+ if _self.is_variable_type():
+ return MonomialTermExpression((NPV_ReciprocalExpression((_other,)), _self))
+ return ProductExpression((_self, NPV_ReciprocalExpression((_other,))))
+ else:
+ return NPV_ProductExpression((_self, NPV_ReciprocalExpression((_other,))))
+
+ raise RuntimeError("Unknown expression type '%s'" % etype) #pragma: no cover
+
+
+#@profile
+def _generate_other_expression(etype, _self, _other):
+
+ if etype > _inplace:
+ etype -= _inplace
+
+ #
+ # A mutable sum is used as a context manager, so we don't
+ # need to process it to see if it's entangled.
+ #
+ if not (_self.__class__ in native_types or _self.is_expression_type()):
+ _self = _process_arg(_self)
+
+ #
+ # abs(x)
+ #
+ if etype == _abs:
+ if _self.__class__ in native_numeric_types:
+ return abs(_self)
+ elif _self.is_potentially_variable():
+ return AbsExpression(_self)
+ else:
+ return NPV_AbsExpression(_self)
+
+ if not (_other.__class__ in native_types or _other.is_expression_type()):
+ _other = _process_arg(_other)
+
+ if etype < 0:
+ #
+ # This may seem obvious, but if we are performing an
+ # "R"-operation (i.e. reverse operation), then simply reverse
+ # self and other. This is legitimate as we are generating a
+ # completely new expression here.
+ #
+ etype *= -1
+ _self, _other = _other, _self
+
+ if etype == _pow:
+ if _other.__class__ in native_numeric_types:
+ if _other == 1:
+ return _self
+ elif not _other:
+ return 1
+ elif _self.__class__ in native_numeric_types:
+ return _self ** _other
+ elif _self.is_potentially_variable():
+ return PowExpression((_self, _other))
+ return NPV_PowExpression((_self, _other))
+ elif _self.__class__ in native_numeric_types:
+ if _other.is_potentially_variable():
+ return PowExpression((_self, _other))
+ return NPV_PowExpression((_self, _other))
+ elif _self.is_potentially_variable() or _other.is_potentially_variable():
+ return PowExpression((_self, _other))
+ else:
+ return NPV_PowExpression((_self, _other))
+
+ raise RuntimeError("Unknown expression type '%s'" % etype) #pragma: no cover
+
+
+if _using_chained_inequality:
+ def _generate_relational_expression(etype, lhs, rhs): #pragma: no cover
+ # We cannot trust Python not to recycle ID's for temporary POD data
+ # (e.g., floats). So, if it is a "native" type, we will record the
+ # value, otherwise we will record the ID. The tuple for native
+ # types is to guarantee that a native value will *never*
+ # accidentally match an ID
+ cloned_from = (\
+ id(lhs) if lhs.__class__ not in native_numeric_types else (0,lhs),
+ id(rhs) if rhs.__class__ not in native_numeric_types else (0,rhs)
+ )
+ rhs_is_relational = False
+ lhs_is_relational = False
+
+ if not (lhs.__class__ in native_types or lhs.is_expression_type()):
+ lhs = _process_arg(lhs)
+ if not (rhs.__class__ in native_types or rhs.is_expression_type()):
+ rhs = _process_arg(rhs)
+
+ if lhs.__class__ in native_numeric_types:
+ lhs = as_numeric(lhs)
+ elif lhs.is_relational():
+ lhs_is_relational = True
+
+ if rhs.__class__ in native_numeric_types:
+ rhs = as_numeric(rhs)
+ elif rhs.is_relational():
+ rhs_is_relational = True
+
+ if _chainedInequality.prev is not None:
+ prevExpr = _chainedInequality.prev
+ match = []
+ # This is tricky because the expression could have been posed
+ # with >= operators, so we must figure out which arguments
+ # match. One edge case is when the upper and lower bounds are
+ # the same (implicit equality) - in which case *both* arguments
+ # match, and this should be converted into an equality
+ # expression.
+ for i,arg in enumerate(_chainedInequality.cloned_from):
+ if arg == cloned_from[0]:
+ match.append((i,0))
+ elif arg == cloned_from[1]:
+ match.append((i,1))
+ if etype == _eq:
+ raise TypeError(_chainedInequality.error_message())
+ if len(match) == 1:
+ if match[0][0] == match[0][1]:
+ raise TypeError(_chainedInequality.error_message(
+ "Attempting to form a compound inequality with two "
+ "%s bounds" % ('lower' if match[0][0] else 'upper',)))
+ if not match[0][1]:
+ cloned_from = _chainedInequality.cloned_from + (cloned_from[1],)
+ lhs = prevExpr
+ lhs_is_relational = True
+ else:
+ cloned_from = (cloned_from[0],) + _chainedInequality.cloned_from
+ rhs = prevExpr
+ rhs_is_relational = True
+ elif len(match) == 2:
+ # Special case: implicit equality constraint posed as a <= b <= a
+ if prevExpr._strict or etype == _lt:
+ _chainedInequality.prev = None
+ raise TypeError("Cannot create a compound inequality with "
+ "identical upper and lower\n\tbounds using strict "
+ "inequalities: constraint infeasible:\n\t%s and "
+ "%s < %s" % ( prevExpr.to_string(), lhs, rhs ))
+ if match[0] == (0,0):
+ # This is a particularly weird case where someone
+ # evaluates the *same* inequality twice in a row. This
+ # should always be an error (you can, for example, get
+ # it with "0 <= a >= 0").
+ raise TypeError(_chainedInequality.error_message())
+ etype = _eq
+ else:
+ raise TypeError(_chainedInequality.error_message())
+ _chainedInequality.prev = None
+
+ if etype == _eq:
+ if lhs_is_relational or rhs_is_relational:
+ if lhs_is_relational:
+ val = lhs.to_string()
+ else:
+ val = rhs.to_string()
+ raise TypeError("Cannot create an EqualityExpression where "\
+ "one of the sub-expressions is a relational expression:\n"\
+ " " + val)
+ _chainedInequality.prev = None
+ return EqualityExpression((lhs,rhs))
+ else:
+ if etype == _le:
+ strict = False
+ elif etype == _lt:
+ strict = True
+ else:
+ raise ValueError("Unknown relational expression type '%s'" % etype) #pragma: no cover
+ if lhs_is_relational:
+ if lhs.__class__ is InequalityExpression:
+ if rhs_is_relational:
+ raise TypeError("Cannot create an InequalityExpression "\
+ "where both sub-expressions are relational "\
+ "expressions.")
+ _chainedInequality.prev = None
+ return RangedExpression(lhs._args_ + (rhs,), (lhs._strict,strict))
+ else:
+ raise TypeError("Cannot create an InequalityExpression "\
+ "where one of the sub-expressions is an equality "\
+ "or ranged expression:\n " + lhs.to_string())
+ elif rhs_is_relational:
+ if rhs.__class__ is InequalityExpression:
+ _chainedInequality.prev = None
+ return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict))
+ else:
+ raise TypeError("Cannot create an InequalityExpression "\
+ "where one of the sub-expressions is an equality "\
+ "or ranged expression:\n " + rhs.to_string())
+ else:
+ obj = InequalityExpression((lhs, rhs), strict)
+ #_chainedInequality.prev = obj
+ _chainedInequality.cloned_from = cloned_from
+ return obj
+
+else:
+
+ def _generate_relational_expression(etype, lhs, rhs): #pragma: no cover
+ rhs_is_relational = False
+ lhs_is_relational = False
+
+ if not (lhs.__class__ in native_types or lhs.is_expression_type()):
+ lhs = _process_arg(lhs)
+ if not (rhs.__class__ in native_types or rhs.is_expression_type()):
+ rhs = _process_arg(rhs)
+
+ if lhs.__class__ in native_numeric_types:
+ # TODO: Why do we need this?
+ lhs = as_numeric(lhs)
+ elif lhs.is_relational():
+ lhs_is_relational = True
+
+ if rhs.__class__ in native_numeric_types:
+ # TODO: Why do we need this?
+ rhs = as_numeric(rhs)
+ elif rhs.is_relational():
+ rhs_is_relational = True
+
+ if etype == _eq:
+ if lhs_is_relational or rhs_is_relational:
+ if lhs_is_relational:
+ val = lhs.to_string()
+ else:
+ val = rhs.to_string()
+ raise TypeError("Cannot create an EqualityExpression where "\
+ "one of the sub-expressions is a relational expression:\n"\
+ " " + val)
+ return EqualityExpression((lhs,rhs))
+ else:
+ if etype == _le:
+ strict = False
+ elif etype == _lt:
+ strict = True
+ else:
+ raise ValueError("Unknown relational expression type '%s'" % etype) #pragma: no cover
+ if lhs_is_relational:
+ if lhs.__class__ is InequalityExpression:
+ if rhs_is_relational:
+ raise TypeError("Cannot create an InequalityExpression "\
+ "where both sub-expressions are relational "\
+ "expressions.")
+ return RangedExpression(lhs._args_ + (rhs,), (lhs._strict,strict))
+ else:
+ raise TypeError("Cannot create an InequalityExpression "\
+ "where one of the sub-expressions is an equality "\
+ "or ranged expression:\n " + lhs.to_string())
+ elif rhs_is_relational:
+ if rhs.__class__ is InequalityExpression:
+ return RangedExpression((lhs,) + rhs._args_, (strict, rhs._strict))
+ else:
+ raise TypeError("Cannot create an InequalityExpression "\
+ "where one of the sub-expressions is an equality "\
+ "or ranged expression:\n " + rhs.to_string())
+ else:
+ return InequalityExpression((lhs, rhs), strict)
+
+
+def _generate_intrinsic_function_expression(arg, name, fcn):
+ if not (arg.__class__ in native_types or arg.is_expression_type()):
+ arg = _process_arg(arg)
+
+ if arg.__class__ in native_types:
+ return fcn(arg)
+ elif arg.is_potentially_variable():
+ return UnaryFunctionExpression(arg, name, fcn)
+ else:
+ return NPV_UnaryFunctionExpression(arg, name, fcn)
+
+
+NPV_expression_types = set(
+ [NPV_NegationExpression,
+ NPV_ExternalFunctionExpression,
+ NPV_PowExpression,
+ NPV_ProductExpression,
+ NPV_ReciprocalExpression,
+ NPV_SumExpression,
+ NPV_UnaryFunctionExpression,
+ NPV_AbsExpression])
+
diff --git a/pyomo/core/expr/numvalue.c b/pyomo/core/expr/numvalue.c
new file mode 100644
index 00000000000..e8da0a4abc8
--- /dev/null
+++ b/pyomo/core/expr/numvalue.c
@@ -0,0 +1,21039 @@
+/* Generated by Cython 0.27.3 */
+
+/* BEGIN: Cython Metadata
+{
+ "distutils": {
+ "name": "pyomo.core.expr.numvalue",
+ "sources": [
+ "pyomo/core/expr/numvalue.pyx"
+ ]
+ },
+ "module_name": "pyomo.core.expr.numvalue"
+}
+END: Cython Metadata */
+
+#define PY_SSIZE_T_CLEAN
+#include "Python.h"
+#ifndef Py_PYTHON_H
+ #error Python headers needed to compile C extensions, please install development version of Python.
+#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
+ #error Cython requires Python 2.6+ or Python 3.3+.
+#else
+#define CYTHON_ABI "0_27_3"
+#define CYTHON_FUTURE_DIVISION 0
+#include
+#ifndef offsetof
+ #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+ #ifndef __stdcall
+ #define __stdcall
+ #endif
+ #ifndef __cdecl
+ #define __cdecl
+ #endif
+ #ifndef __fastcall
+ #define __fastcall
+ #endif
+#endif
+#ifndef DL_IMPORT
+ #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+ #define DL_EXPORT(t) t
+#endif
+#define __PYX_COMMA ,
+#ifndef HAVE_LONG_LONG
+ #if PY_VERSION_HEX >= 0x02070000
+ #define HAVE_LONG_LONG
+ #endif
+#endif
+#ifndef PY_LONG_LONG
+ #define PY_LONG_LONG LONG_LONG
+#endif
+#ifndef Py_HUGE_VAL
+ #define Py_HUGE_VAL HUGE_VAL
+#endif
+#ifdef PYPY_VERSION
+ #define CYTHON_COMPILING_IN_PYPY 1
+ #define CYTHON_COMPILING_IN_PYSTON 0
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #undef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 0
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #if PY_VERSION_HEX < 0x03050000
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #elif !defined(CYTHON_USE_ASYNC_SLOTS)
+ #define CYTHON_USE_ASYNC_SLOTS 1
+ #endif
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #undef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 1
+ #undef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 0
+ #undef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 0
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
+ #undef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT 0
+ #undef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE 0
+#elif defined(PYSTON_VERSION)
+ #define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 1
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
+ #undef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT 0
+ #undef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE 0
+#else
+ #define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 0
+ #define CYTHON_COMPILING_IN_CPYTHON 1
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
+ #define CYTHON_USE_PYTYPE_LOOKUP 1
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #elif !defined(CYTHON_USE_ASYNC_SLOTS)
+ #define CYTHON_USE_ASYNC_SLOTS 1
+ #endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
+ #define CYTHON_USE_PYLONG_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #if PY_VERSION_HEX < 0x030300F0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #elif !defined(CYTHON_USE_UNICODE_WRITER)
+ #define CYTHON_USE_UNICODE_WRITER 1
+ #endif
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #ifndef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 1
+ #endif
+ #ifndef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 1
+ #endif
+ #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
+ #endif
+ #ifndef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
+ #endif
+#endif
+#if !defined(CYTHON_FAST_PYCCALL)
+#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
+#endif
+#if CYTHON_USE_PYLONG_INTERNALS
+ #include "longintrepr.h"
+ #undef SHIFT
+ #undef BASE
+ #undef MASK
+#endif
+#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
+ #define Py_OptimizeFlag 0
+#endif
+#define __PYX_BUILD_PY_SSIZE_T "n"
+#define CYTHON_FORMAT_SSIZE_T "z"
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyClass_Type
+#else
+ #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyType_Type
+#endif
+#ifndef Py_TPFLAGS_CHECKTYPES
+ #define Py_TPFLAGS_CHECKTYPES 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_INDEX
+ #define Py_TPFLAGS_HAVE_INDEX 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
+ #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_FINALIZE
+ #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
+#if PY_VERSION_HEX < 0x030700A0 || !defined(METH_FASTCALL)
+ #ifndef METH_FASTCALL
+ #define METH_FASTCALL 0x80
+ #endif
+ typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args, Py_ssize_t nargs);
+ typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject **args,
+ Py_ssize_t nargs, PyObject *kwnames);
+#else
+ #define __Pyx_PyCFunctionFast _PyCFunctionFast
+ #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
+#endif
+#if CYTHON_FAST_PYCCALL
+#define __Pyx_PyFastCFunction_Check(func)\
+ ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
+#else
+#define __Pyx_PyFastCFunction_Check(func) 0
+#endif
+#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
+ #define __Pyx_PyThreadState_Current PyThreadState_GET()
+#elif PY_VERSION_HEX >= 0x03060000
+ #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
+#elif PY_VERSION_HEX >= 0x03000000
+ #define __Pyx_PyThreadState_Current PyThreadState_GET()
+#else
+ #define __Pyx_PyThreadState_Current _PyThreadState_Current
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
+#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
+#else
+#define __Pyx_PyDict_NewPresized(n) PyDict_New()
+#endif
+#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
+#else
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
+#endif
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+ #define CYTHON_PEP393_ENABLED 1
+ #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
+ 0 : _PyUnicode_Ready((PyObject *)(op)))
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
+ #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
+ #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
+ #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
+#else
+ #define CYTHON_PEP393_ENABLED 0
+ #define PyUnicode_1BYTE_KIND 1
+ #define PyUnicode_2BYTE_KIND 2
+ #define PyUnicode_4BYTE_KIND 4
+ #define __Pyx_PyUnicode_READY(op) (0)
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
+ #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
+ #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
+ #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+ #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
+#else
+ #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
+ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
+ #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
+ #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
+ #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
+ #define PyObject_Malloc(s) PyMem_Malloc(s)
+ #define PyObject_Free(p) PyMem_Free(p)
+ #define PyObject_Realloc(p) PyMem_Realloc(p)
+#endif
+#if CYTHON_COMPILING_IN_PYSTON
+ #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
+#else
+ #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
+#endif
+#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
+#else
+ #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
+#endif
+#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
+ #define PyObject_ASCII(o) PyObject_Repr(o)
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBaseString_Type PyUnicode_Type
+ #define PyStringObject PyUnicodeObject
+ #define PyString_Type PyUnicode_Type
+ #define PyString_Check PyUnicode_Check
+ #define PyString_CheckExact PyUnicode_CheckExact
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+ #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+ #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
+ #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
+#ifndef PySet_CheckExact
+ #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
+#endif
+#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
+#if PY_MAJOR_VERSION >= 3
+ #define PyIntObject PyLongObject
+ #define PyInt_Type PyLong_Type
+ #define PyInt_Check(op) PyLong_Check(op)
+ #define PyInt_CheckExact(op) PyLong_CheckExact(op)
+ #define PyInt_FromString PyLong_FromString
+ #define PyInt_FromUnicode PyLong_FromUnicode
+ #define PyInt_FromLong PyLong_FromLong
+ #define PyInt_FromSize_t PyLong_FromSize_t
+ #define PyInt_FromSsize_t PyLong_FromSsize_t
+ #define PyInt_AsLong PyLong_AsLong
+ #define PyInt_AS_LONG PyLong_AS_LONG
+ #define PyInt_AsSsize_t PyLong_AsSsize_t
+ #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
+ #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+ #define PyNumber_Int PyNumber_Long
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBoolObject PyLongObject
+#endif
+#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
+ #ifndef PyUnicode_InternFromString
+ #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
+ #endif
+#endif
+#if PY_VERSION_HEX < 0x030200A4
+ typedef long Py_hash_t;
+ #define __Pyx_PyInt_FromHash_t PyInt_FromLong
+ #define __Pyx_PyInt_AsHash_t PyInt_AsLong
+#else
+ #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
+ #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
+#else
+ #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
+#endif
+#ifndef __has_attribute
+ #define __has_attribute(x) 0
+#endif
+#ifndef __has_cpp_attribute
+ #define __has_cpp_attribute(x) 0
+#endif
+#if CYTHON_USE_ASYNC_SLOTS
+ #if PY_VERSION_HEX >= 0x030500B1
+ #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
+ #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
+ #else
+ #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
+ #endif
+#else
+ #define __Pyx_PyType_AsAsync(obj) NULL
+#endif
+#ifndef __Pyx_PyAsyncMethodsStruct
+ typedef struct {
+ unaryfunc am_await;
+ unaryfunc am_aiter;
+ unaryfunc am_anext;
+ } __Pyx_PyAsyncMethodsStruct;
+#endif
+#ifndef CYTHON_RESTRICT
+ #if defined(__GNUC__)
+ #define CYTHON_RESTRICT __restrict__
+ #elif defined(_MSC_VER) && _MSC_VER >= 1400
+ #define CYTHON_RESTRICT __restrict
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_RESTRICT restrict
+ #else
+ #define CYTHON_RESTRICT
+ #endif
+#endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+# if defined(__cplusplus)
+ template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+# else
+# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+# endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+# define CYTHON_NCP_UNUSED
+# else
+# define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
+#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
+#ifdef _MSC_VER
+ #ifndef _MSC_STDINT_H_
+ #if _MSC_VER < 1300
+ typedef unsigned char uint8_t;
+ typedef unsigned int uint32_t;
+ #else
+ typedef unsigned __int8 uint8_t;
+ typedef unsigned __int32 uint32_t;
+ #endif
+ #endif
+#else
+ #include
+#endif
+#ifndef CYTHON_FALLTHROUGH
+ #if defined(__cplusplus) && __cplusplus >= 201103L
+ #if __has_cpp_attribute(fallthrough)
+ #define CYTHON_FALLTHROUGH [[fallthrough]]
+ #elif __has_cpp_attribute(clang::fallthrough)
+ #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
+ #elif __has_cpp_attribute(gnu::fallthrough)
+ #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
+ #endif
+ #endif
+ #ifndef CYTHON_FALLTHROUGH
+ #if __has_attribute(fallthrough)
+ #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
+ #else
+ #define CYTHON_FALLTHROUGH
+ #endif
+ #endif
+ #if defined(__clang__ ) && defined(__apple_build_version__)
+ #if __apple_build_version__ < 7000000
+ #undef CYTHON_FALLTHROUGH
+ #define CYTHON_FALLTHROUGH
+ #endif
+ #endif
+#endif
+
+#ifndef CYTHON_INLINE
+ #if defined(__clang__)
+ #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+ #elif defined(__GNUC__)
+ #define CYTHON_INLINE __inline__
+ #elif defined(_MSC_VER)
+ #define CYTHON_INLINE __inline
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_INLINE inline
+ #else
+ #define CYTHON_INLINE
+ #endif
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+ #define _USE_MATH_DEFINES
+#endif
+#include
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+ float value;
+ memset(&value, 0xFF, sizeof(value));
+ return value;
+}
+#endif
+#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
+#define __Pyx_truncl trunc
+#else
+#define __Pyx_truncl truncl
+#endif
+
+
+#define __PYX_ERR(f_index, lineno, Ln_error) \
+{ \
+ __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
+}
+
+#ifndef __PYX_EXTERN_C
+ #ifdef __cplusplus
+ #define __PYX_EXTERN_C extern "C"
+ #else
+ #define __PYX_EXTERN_C extern
+ #endif
+#endif
+
+#define __PYX_HAVE__pyomo__core__expr__numvalue
+#define __PYX_HAVE_API__pyomo__core__expr__numvalue
+#ifdef _OPENMP
+#include
+#endif /* _OPENMP */
+
+#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
+ const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_uchar_cast(c) ((unsigned char)c)
+#define __Pyx_long_cast(x) ((long)x)
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
+ (sizeof(type) < sizeof(Py_ssize_t)) ||\
+ (sizeof(type) > sizeof(Py_ssize_t) &&\
+ likely(v < (type)PY_SSIZE_T_MAX ||\
+ v == (type)PY_SSIZE_T_MAX) &&\
+ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
+ v == (type)PY_SSIZE_T_MIN))) ||\
+ (sizeof(type) == sizeof(Py_ssize_t) &&\
+ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
+ v == (type)PY_SSIZE_T_MAX))) )
+#if defined (__cplusplus) && __cplusplus >= 201103L
+ #include
+ #define __Pyx_sst_abs(value) std::abs(value)
+#elif SIZEOF_INT >= SIZEOF_SIZE_T
+ #define __Pyx_sst_abs(value) abs(value)
+#elif SIZEOF_LONG >= SIZEOF_SIZE_T
+ #define __Pyx_sst_abs(value) labs(value)
+#elif defined (_MSC_VER)
+ #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
+#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define __Pyx_sst_abs(value) llabs(value)
+#elif defined (__GNUC__)
+ #define __Pyx_sst_abs(value) __builtin_llabs(value)
+#else
+ #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
+#endif
+static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+ #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
+#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
+#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
+#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
+#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
+ const Py_UNICODE *u_end = u;
+ while (*u_end++) ;
+ return (size_t)(u_end - u - 1);
+}
+#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
+#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
+#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
+#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
+#define __Pyx_PySequence_Tuple(obj)\
+ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+#if CYTHON_ASSUME_SAFE_MACROS
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
+#else
+#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
+#endif
+#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ PyObject* ascii_chars_u = NULL;
+ PyObject* ascii_chars_b = NULL;
+ const char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ if (strcmp(default_encoding_c, "ascii") == 0) {
+ __Pyx_sys_getdefaultencoding_not_ascii = 0;
+ } else {
+ char ascii_chars[128];
+ int c;
+ for (c = 0; c < 128; c++) {
+ ascii_chars[c] = c;
+ }
+ __Pyx_sys_getdefaultencoding_not_ascii = 1;
+ ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+ if (!ascii_chars_u) goto bad;
+ ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+ if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+ PyErr_Format(
+ PyExc_ValueError,
+ "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+ default_encoding_c);
+ goto bad;
+ }
+ Py_DECREF(ascii_chars_u);
+ Py_DECREF(ascii_chars_b);
+ }
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ Py_XDECREF(ascii_chars_u);
+ Py_XDECREF(ascii_chars_b);
+ return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+ if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
+ strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ return -1;
+}
+#endif
+#endif
+
+
+/* Test for GCC > 2.95 */
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
+ #define likely(x) __builtin_expect(!!(x), 1)
+ #define unlikely(x) __builtin_expect(!!(x), 0)
+#else /* !__GNUC__ or GCC < 2.95 */
+ #define likely(x) (x)
+ #define unlikely(x) (x)
+#endif /* __GNUC__ */
+static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
+
+static PyObject *__pyx_m = NULL;
+static PyObject *__pyx_d;
+static PyObject *__pyx_b;
+static PyObject *__pyx_cython_runtime;
+static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
+static PyObject *__pyx_empty_unicode;
+static int __pyx_lineno;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+
+
+static const char *__pyx_f[] = {
+ "pyomo/core/expr/numvalue.pyx",
+};
+
+/*--- Type declarations ---*/
+
+/* --- Runtime support code (head) --- */
+/* Refnanny.proto */
+#ifndef CYTHON_REFNANNY
+ #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+ typedef struct {
+ void (*INCREF)(void*, PyObject*, int);
+ void (*DECREF)(void*, PyObject*, int);
+ void (*GOTREF)(void*, PyObject*, int);
+ void (*GIVEREF)(void*, PyObject*, int);
+ void* (*SetupContext)(const char*, int, const char*);
+ void (*FinishContext)(void**);
+ } __Pyx_RefNannyAPIStruct;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
+ #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ if (acquire_gil) {\
+ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ PyGILState_Release(__pyx_gilstate_save);\
+ } else {\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ }
+#else
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+ #define __Pyx_RefNannyFinishContext()\
+ __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+ #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+ #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+ #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+ #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+ #define __Pyx_RefNannyDeclarations
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)
+ #define __Pyx_RefNannyFinishContext()
+ #define __Pyx_INCREF(r) Py_INCREF(r)
+ #define __Pyx_DECREF(r) Py_DECREF(r)
+ #define __Pyx_GOTREF(r)
+ #define __Pyx_GIVEREF(r)
+ #define __Pyx_XINCREF(r) Py_XINCREF(r)
+ #define __Pyx_XDECREF(r) Py_XDECREF(r)
+ #define __Pyx_XGOTREF(r)
+ #define __Pyx_XGIVEREF(r)
+#endif
+#define __Pyx_XDECREF_SET(r, v) do {\
+ PyObject *tmp = (PyObject *) r;\
+ r = v; __Pyx_XDECREF(tmp);\
+ } while (0)
+#define __Pyx_DECREF_SET(r, v) do {\
+ PyObject *tmp = (PyObject *) r;\
+ r = v; __Pyx_DECREF(tmp);\
+ } while (0)
+#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+
+/* PyObjectGetAttrStr.proto */
+#if CYTHON_USE_TYPE_SLOTS
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_getattro))
+ return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_getattr))
+ return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+ return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+/* GetBuiltinName.proto */
+static PyObject *__Pyx_GetBuiltinName(PyObject *name);
+
+/* RaiseArgTupleInvalid.proto */
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+ Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
+
+/* RaiseDoubleKeywords.proto */
+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
+
+/* ParseKeywords.proto */
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
+ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
+ const char* function_name);
+
+/* PyObjectCall.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
+/* PyThreadStateGet.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
+#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
+#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
+#else
+#define __Pyx_PyThreadState_declare
+#define __Pyx_PyThreadState_assign
+#define __Pyx_PyErr_Occurred() PyErr_Occurred()
+#endif
+
+/* PyErrFetchRestore.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
+#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
+#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
+#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
+#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
+static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
+#else
+#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
+#endif
+#else
+#define __Pyx_PyErr_Clear() PyErr_Clear()
+#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
+#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
+#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
+#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
+#endif
+
+/* RaiseException.proto */
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
+
+/* PyObjectSetAttrStr.proto */
+#if CYTHON_USE_TYPE_SLOTS
+#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
+static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_setattro))
+ return tp->tp_setattro(obj, attr_name, value);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_setattr))
+ return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
+#endif
+ return PyObject_SetAttr(obj, attr_name, value);
+}
+#else
+#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
+#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
+#endif
+
+/* GetAttr.proto */
+static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
+
+/* GetModuleGlobalName.proto */
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
+
+/* PyCFunctionFastCall.proto */
+#if CYTHON_FAST_PYCCALL
+static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
+#else
+#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
+#endif
+
+/* PyFunctionFastCall.proto */
+#if CYTHON_FAST_PYCALL
+#define __Pyx_PyFunction_FastCall(func, args, nargs)\
+ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
+#else
+#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
+#endif
+#endif
+
+/* PyObjectCallMethO.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
+#endif
+
+/* PyObjectCallOneArg.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
+
+/* PySequenceContains.proto */
+static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
+ int result = PySequence_Contains(seq, item);
+ return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+/* PyObjectCallNoArg.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
+#else
+#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
+#endif
+
+/* SaveResetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
+#else
+#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
+#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
+#endif
+
+/* PyErrExceptionMatches.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
+static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
+#else
+#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
+#endif
+
+/* GetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#else
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
+#endif
+
+/* GetItemInt.proto */
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
+ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
+ __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+ int is_list, int wraparound, int boundscheck);
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
+ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
+#endif
+
+/* HasAttr.proto */
+static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
+
+/* RaiseTooManyValuesToUnpack.proto */
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+
+/* RaiseNeedMoreValuesToUnpack.proto */
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+/* IterFinish.proto */
+static CYTHON_INLINE int __Pyx_IterFinish(void);
+
+/* UnpackItemEndCheck.proto */
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
+
+/* Import.proto */
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
+
+/* ImportFrom.proto */
+static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
+
+/* CalculateMetaclass.proto */
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
+
+/* FetchCommonType.proto */
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
+
+/* CythonFunction.proto */
+#define __Pyx_CyFunction_USED 1
+#include
+#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
+#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
+#define __Pyx_CYFUNCTION_CCLASS 0x04
+#define __Pyx_CyFunction_GetClosure(f)\
+ (((__pyx_CyFunctionObject *) (f))->func_closure)
+#define __Pyx_CyFunction_GetClassObj(f)\
+ (((__pyx_CyFunctionObject *) (f))->func_classobj)
+#define __Pyx_CyFunction_Defaults(type, f)\
+ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
+#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
+ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
+typedef struct {
+ PyCFunctionObject func;
+#if PY_VERSION_HEX < 0x030500A0
+ PyObject *func_weakreflist;
+#endif
+ PyObject *func_dict;
+ PyObject *func_name;
+ PyObject *func_qualname;
+ PyObject *func_doc;
+ PyObject *func_globals;
+ PyObject *func_code;
+ PyObject *func_closure;
+ PyObject *func_classobj;
+ void *defaults;
+ int defaults_pyobjects;
+ int flags;
+ PyObject *defaults_tuple;
+ PyObject *defaults_kwdict;
+ PyObject *(*defaults_getter)(PyObject *);
+ PyObject *func_annotations;
+} __pyx_CyFunctionObject;
+static PyTypeObject *__pyx_CyFunctionType = 0;
+#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
+ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
+ int flags, PyObject* qualname,
+ PyObject *self,
+ PyObject *module, PyObject *globals,
+ PyObject* code);
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
+ size_t size,
+ int pyobjects);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
+ PyObject *tuple);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
+ PyObject *dict);
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
+ PyObject *dict);
+static int __pyx_CyFunction_init(void);
+
+/* Py3ClassCreate.proto */
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
+ PyObject *mkw, PyObject *modname, PyObject *doc);
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
+ PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
+
+/* CLineInTraceback.proto */
+#ifdef CYTHON_CLINE_IN_TRACEBACK
+#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
+#else
+static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
+#endif
+
+/* CodeObjectCache.proto */
+typedef struct {
+ PyCodeObject* code_object;
+ int code_line;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+ int count;
+ int max_count;
+ __Pyx_CodeObjectCacheEntry* entries;
+};
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+
+/* AddTraceback.proto */
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+
+/* FastTypeChecks.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
+static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
+#else
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
+#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
+#endif
+
+/* CheckBinaryVersion.proto */
+static int __Pyx_check_binary_version(void);
+
+/* InitStrings.proto */
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
+
+
+/* Module declarations from 'pyomo.core.expr.numvalue' */
+#define __Pyx_MODULE_NAME "pyomo.core.expr.numvalue"
+extern int __pyx_module_is_main_pyomo__core__expr__numvalue;
+int __pyx_module_is_main_pyomo__core__expr__numvalue = 0;
+
+/* Implementation of 'pyomo.core.expr.numvalue' */
+static PyObject *__pyx_builtin_object;
+static PyObject *__pyx_builtin_property;
+static PyObject *__pyx_builtin_RuntimeError;
+static PyObject *__pyx_builtin_AttributeError;
+static PyObject *__pyx_builtin_ValueError;
+static PyObject *__pyx_builtin_TypeError;
+static PyObject *__pyx_builtin_super;
+static const char __pyx_k_i[] = "i";
+static const char __pyx_k_eq[] = "_eq";
+static const char __pyx_k_ge[] = "__ge__";
+static const char __pyx_k_gt[] = "__gt__";
+static const char __pyx_k_le[] = "_le";
+static const char __pyx_k_lt[] = "_lt";
+static const char __pyx_k_PY3[] = "PY3";
+static const char __pyx_k_abs[] = "_abs";
+static const char __pyx_k_add[] = "add";
+static const char __pyx_k_all[] = "__all__";
+static const char __pyx_k_div[] = "_div";
+static const char __pyx_k_doc[] = "__doc__";
+static const char __pyx_k_int[] = "__int__";
+static const char __pyx_k_key[] = "key";
+static const char __pyx_k_lhs[] = "lhs";
+static const char __pyx_k_mul[] = "_mul";
+static const char __pyx_k_neg[] = "_neg";
+static const char __pyx_k_obj[] = "obj";
+static const char __pyx_k_pos[] = "__pos__";
+static const char __pyx_k_pow[] = "_pow";
+static const char __pyx_k_rhs[] = "rhs";
+static const char __pyx_k_six[] = "six";
+static const char __pyx_k_str[] = "__str__";
+static const char __pyx_k_sub[] = "_sub";
+static const char __pyx_k_sys[] = "sys";
+static const char __pyx_k_tmp[] = "tmp";
+static const char __pyx_k_val[] = "val";
+static const char __pyx_k_args[] = "args";
+static const char __pyx_k_base[] = "_base";
+static const char __pyx_k_bool[] = "__bool__";
+static const char __pyx_k_call[] = "__call__";
+static const char __pyx_k_eq_2[] = "__eq__";
+static const char __pyx_k_hash[] = "__hash__";
+static const char __pyx_k_iadd[] = "_iadd";
+static const char __pyx_k_idiv[] = "_idiv";
+static const char __pyx_k_imul[] = "_imul";
+static const char __pyx_k_init[] = "__init__";
+static const char __pyx_k_ipow[] = "_ipow";
+static const char __pyx_k_isub[] = "_isub";
+static const char __pyx_k_kwds[] = "kwds";
+static const char __pyx_k_le_2[] = "__le__";
+static const char __pyx_k_lt_2[] = "__lt__";
+static const char __pyx_k_main[] = "__main__";
+static const char __pyx_k_name[] = "name";
+static const char __pyx_k_radd[] = "_radd";
+static const char __pyx_k_rdiv[] = "_rdiv";
+static const char __pyx_k_rmul[] = "_rmul";
+static const char __pyx_k_rpow[] = "_rpow";
+static const char __pyx_k_rsub[] = "_rsub";
+static const char __pyx_k_self[] = "_self";
+static const char __pyx_k_smap[] = "smap";
+static const char __pyx_k_test[] = "__test__";
+static const char __pyx_k_abs_2[] = "__abs__";
+static const char __pyx_k_add_2[] = "_add";
+static const char __pyx_k_add_3[] = "__add__";
+static const char __pyx_k_class[] = "__class__";
+static const char __pyx_k_cname[] = "cname";
+static const char __pyx_k_div_2[] = "__div__";
+static const char __pyx_k_error[] = "error";
+static const char __pyx_k_etype[] = "etype";
+static const char __pyx_k_float[] = "__float__";
+static const char __pyx_k_mul_2[] = "__mul__";
+static const char __pyx_k_neg_2[] = "__neg__";
+static const char __pyx_k_other[] = "_other";
+static const char __pyx_k_pow_2[] = "__pow__";
+static const char __pyx_k_slots[] = "__slots__";
+static const char __pyx_k_state[] = "state";
+static const char __pyx_k_sub_2[] = "__sub__";
+static const char __pyx_k_super[] = "super";
+static const char __pyx_k_value[] = "value";
+static const char __pyx_k_write[] = "write";
+static const char __pyx_k_iadd_2[] = "__iadd__";
+static const char __pyx_k_idiv_2[] = "__idiv__";
+static const char __pyx_k_import[] = "__import__";
+static const char __pyx_k_imul_2[] = "__imul__";
+static const char __pyx_k_ipow_2[] = "__ipow__";
+static const char __pyx_k_isub_2[] = "__isub__";
+static const char __pyx_k_logger[] = "logger";
+static const char __pyx_k_module[] = "__module__";
+static const char __pyx_k_name_2[] = "__name__";
+static const char __pyx_k_object[] = "object";
+static const char __pyx_k_pprint[] = "pprint";
+static const char __pyx_k_radd_2[] = "__radd__";
+static const char __pyx_k_rdiv_2[] = "__rdiv__";
+static const char __pyx_k_result[] = "result";
+static const char __pyx_k_rmul_2[] = "__rmul__";
+static const char __pyx_k_rpow_2[] = "__rpow__";
+static const char __pyx_k_rsub_2[] = "__rsub__";
+static const char __pyx_k_self_2[] = "self";
+static const char __pyx_k_stdout[] = "stdout";
+static const char __pyx_k_update[] = "update";
+static const char __pyx_k_values[] = "values";
+static const char __pyx_k_getname[] = "getname";
+static const char __pyx_k_inplace[] = "_inplace";
+static const char __pyx_k_labeler[] = "labeler";
+static const char __pyx_k_logging[] = "logging";
+static const char __pyx_k_nonzero[] = "__nonzero__";
+static const char __pyx_k_numeric[] = "numeric";
+static const char __pyx_k_ostream[] = "ostream";
+static const char __pyx_k_other_2[] = "other";
+static const char __pyx_k_prepare[] = "__prepare__";
+static const char __pyx_k_setattr[] = "__setattr__";
+static const char __pyx_k_truediv[] = "__truediv__";
+static const char __pyx_k_verbose[] = "verbose";
+static const char __pyx_k_warning[] = "warning";
+static const char __pyx_k_exc_info[] = "exc_info";
+static const char __pyx_k_getstate[] = "__getstate__";
+static const char __pyx_k_is_fixed[] = "is_fixed";
+static const char __pyx_k_itruediv[] = "__itruediv__";
+static const char __pyx_k_new_type[] = "new_type";
+static const char __pyx_k_property[] = "property";
+static const char __pyx_k_qualname[] = "__qualname__";
+static const char __pyx_k_rtruediv[] = "__rtruediv__";
+static const char __pyx_k_setstate[] = "__setstate__";
+static const char __pyx_k_TypeError[] = "TypeError";
+static const char __pyx_k_exception[] = "exception";
+static const char __pyx_k_getLogger[] = "getLogger";
+static const char __pyx_k_getSymbol[] = "getSymbol";
+static const char __pyx_k_iteritems[] = "iteritems";
+static const char __pyx_k_metaclass[] = "__metaclass__";
+static const char __pyx_k_text_type[] = "text_type";
+static const char __pyx_k_to_string[] = "to_string";
+static const char __pyx_k_ValueError[] = "ValueError";
+static const char __pyx_k_as_numeric[] = "as_numeric";
+static const char __pyx_k_is_indexed[] = "is_indexed";
+static const char __pyx_k_local_name[] = "local_name";
+static const char __pyx_k_pyomo_core[] = "pyomo.core";
+static const char __pyx_k_binary_type[] = "binary_type";
+static const char __pyx_k_is_constant[] = "is_constant";
+static const char __pyx_k_name_buffer[] = "name_buffer";
+static const char __pyx_k_NumericValue[] = "NumericValue";
+static const char __pyx_k_RuntimeError[] = "RuntimeError";
+static const char __pyx_k_ZeroConstant[] = "ZeroConstant";
+static const char __pyx_k_native_types[] = "native_types";
+static const char __pyx_k_string_types[] = "string_types";
+static const char __pyx_k_is_relational[] = "is_relational";
+static const char __pyx_k_AttributeError[] = "AttributeError";
+static const char __pyx_k_KnownConstants[] = "KnownConstants";
+static const char __pyx_k_compute_values[] = "compute_values";
+static const char __pyx_k_NonNumericValue[] = "NonNumericValue";
+static const char __pyx_k_NumericConstant[] = "NumericConstant";
+static const char __pyx_k_fully_qualified[] = "fully_qualified";
+static const char __pyx_k_is_variable_type[] = "is_variable_type";
+static const char __pyx_k_NumericValue___eq[] = "NumericValue.__eq__";
+static const char __pyx_k_NumericValue___ge[] = "NumericValue.__ge__";
+static const char __pyx_k_NumericValue___gt[] = "NumericValue.__gt__";
+static const char __pyx_k_NumericValue___le[] = "NumericValue.__le__";
+static const char __pyx_k_NumericValue___lt[] = "NumericValue.__lt__";
+static const char __pyx_k_NumericValue_name[] = "NumericValue.name";
+static const char __pyx_k_polynomial_degree[] = "polynomial_degree";
+static const char __pyx_k_NumericValue___abs[] = "NumericValue.__abs__";
+static const char __pyx_k_NumericValue___add[] = "NumericValue.__add__";
+static const char __pyx_k_NumericValue___div[] = "NumericValue.__div__";
+static const char __pyx_k_NumericValue___int[] = "NumericValue.__int__";
+static const char __pyx_k_NumericValue___mul[] = "NumericValue.__mul__";
+static const char __pyx_k_NumericValue___neg[] = "NumericValue.__neg__";
+static const char __pyx_k_NumericValue___pos[] = "NumericValue.__pos__";
+static const char __pyx_k_NumericValue___pow[] = "NumericValue.__pow__";
+static const char __pyx_k_NumericValue___sub[] = "NumericValue.__sub__";
+static const char __pyx_k_NumericValue_cname[] = "NumericValue.cname";
+static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
+static const char __pyx_k_is_expression_type[] = "is_expression_type";
+static const char __pyx_k_NumericValue___iadd[] = "NumericValue.__iadd__";
+static const char __pyx_k_NumericValue___idiv[] = "NumericValue.__idiv__";
+static const char __pyx_k_NumericValue___imul[] = "NumericValue.__imul__";
+static const char __pyx_k_NumericValue___ipow[] = "NumericValue.__ipow__";
+static const char __pyx_k_NumericValue___isub[] = "NumericValue.__isub__";
+static const char __pyx_k_NumericValue___radd[] = "NumericValue.__radd__";
+static const char __pyx_k_NumericValue___rdiv[] = "NumericValue.__rdiv__";
+static const char __pyx_k_NumericValue___rmul[] = "NumericValue.__rmul__";
+static const char __pyx_k_NumericValue___rpow[] = "NumericValue.__rpow__";
+static const char __pyx_k_NumericValue___rsub[] = "NumericValue.__rsub__";
+static const char __pyx_k_RegisterBooleanType[] = "RegisterBooleanType";
+static const char __pyx_k_RegisterIntegerType[] = "RegisterIntegerType";
+static const char __pyx_k_RegisterNumericType[] = "RegisterNumericType";
+static const char __pyx_k_nonpyomo_leaf_types[] = "nonpyomo_leaf_types";
+static const char __pyx_k_NumericValue___float[] = "NumericValue.__float__";
+static const char __pyx_k_NumericValue_getname[] = "NumericValue.getname";
+static const char __pyx_k_native_boolean_types[] = "native_boolean_types";
+static const char __pyx_k_native_integer_types[] = "native_integer_types";
+static const char __pyx_k_native_numeric_types[] = "native_numeric_types";
+static const char __pyx_k_potentially_variable[] = "potentially_variable";
+static const char __pyx_k_NonNumericValue___str[] = "NonNumericValue.__str__";
+static const char __pyx_k_NumericConstant___str[] = "NumericConstant.__str__";
+static const char __pyx_k_NumericValue_is_fixed[] = "NumericValue.is_fixed";
+static const char __pyx_k_update_KnownConstants[] = "update_KnownConstants";
+static const char __pyx_k_NonNumericValue___init[] = "NonNumericValue.__init__";
+static const char __pyx_k_NumericConstant___call[] = "NumericConstant.__call__";
+static const char __pyx_k_NumericConstant___init[] = "NumericConstant.__init__";
+static const char __pyx_k_NumericConstant_pprint[] = "NumericConstant.pprint";
+static const char __pyx_k_NumericValue___truediv[] = "NumericValue.__truediv__";
+static const char __pyx_k_NumericValue_to_string[] = "NumericValue.to_string";
+static const char __pyx_k_NumericValue___getstate[] = "NumericValue.__getstate__";
+static const char __pyx_k_NumericValue___itruediv[] = "NumericValue.__itruediv__";
+static const char __pyx_k_NumericValue___rtruediv[] = "NumericValue.__rtruediv__";
+static const char __pyx_k_NumericValue___setstate[] = "NumericValue.__setstate__";
+static const char __pyx_k_NumericValue_as_numeric[] = "NumericValue.as_numeric";
+static const char __pyx_k_NumericValue_is_indexed[] = "NumericValue.is_indexed";
+static const char __pyx_k_NumericValue_local_name[] = "NumericValue.local_name";
+static const char __pyx_k_generate_mul_expression[] = "_generate_mul_expression";
+static const char __pyx_k_generate_sum_expression[] = "_generate_sum_expression";
+static const char __pyx_k_is_potentially_variable[] = "is_potentially_variable";
+static const char __pyx_k_NumericConstant_is_fixed[] = "NumericConstant.is_fixed";
+static const char __pyx_k_NumericValue_is_constant[] = "NumericValue.is_constant";
+static const char __pyx_k_is_named_expression_type[] = "is_named_expression_type";
+static const char __pyx_k_pyomo_core_expr_numvalue[] = "pyomo.core.expr.numvalue";
+static const char __pyx_k_NumericConstant___nonzero[] = "NumericConstant.__nonzero__";
+static const char __pyx_k_compute_polynomial_degree[] = "_compute_polynomial_degree";
+static const char __pyx_k_generate_other_expression[] = "_generate_other_expression";
+static const char __pyx_k_NonNumericValue___getstate[] = "NonNumericValue.__getstate__";
+static const char __pyx_k_NonNumericValue___setstate[] = "NonNumericValue.__setstate__";
+static const char __pyx_k_NumericConstant___getstate[] = "NumericConstant.__getstate__";
+static const char __pyx_k_NumericValue_is_relational[] = "NumericValue.is_relational";
+static const char __pyx_k_NumericConstant_is_constant[] = "NumericConstant.is_constant";
+static const char __pyx_k_pyomo_core_expr_expr_common[] = "pyomo.core.expr.expr_common";
+static const char __pyx_k_pyomo_core_expr_numvalue_pyx[] = "pyomo/core/expr/numvalue.pyx";
+static const char __pyx_k_NumericValue_is_variable_type[] = "NumericValue.is_variable_type";
+static const char __pyx_k_NumericValue_polynomial_degree[] = "NumericValue.polynomial_degree";
+static const char __pyx_k_generate_relational_expression[] = "_generate_relational_expression";
+static const char __pyx_k_Cannot_convert_object_of_type_s[] = "Cannot convert object of type '%s' (value = %s) to a numeric value.";
+static const char __pyx_k_DEPRECATED_The_cname_method_has[] = "DEPRECATED: The cname() method has been renamed to getname().";
+static const char __pyx_k_NumericValue_is_expression_type[] = "NumericValue.is_expression_type";
+static const char __pyx_k_This_is_the_base_class_for_nume[] = "\n This is the base class for numeric values used in Pyomo.\n ";
+static const char __pyx_k_An_object_that_contains_a_consta[] = "An object that contains a constant numeric value.\n\n Constructor Arguments:\n value The initial value.\n ";
+static const char __pyx_k_An_object_that_contains_a_non_nu[] = "An object that contains a non-numeric value\n\n Constructor Arguments:\n value The initial value.\n ";
+static const char __pyx_k_Implicit_conversion_of_Pyomo_Num[] = "Implicit conversion of Pyomo NumericValue type `%s' to a float is\ndisabled. This error is often the result of using Pyomo components as\narguments to one of the Python built-in math module functions when\ndefining expressions. Avoid this error by using Pyomo-provided math\nfunctions.";
+static const char __pyx_k_No_value_for_uninitialized_Numer[] = "No value for uninitialized NumericValue object %s";
+static const char __pyx_k_NumericConstant__compute_polynom[] = "NumericConstant._compute_polynomial_degree";
+static const char __pyx_k_NumericConstant_is_potentially_v[] = "NumericConstant.is_potentially_variable";
+static const char __pyx_k_NumericValue__compute_polynomial[] = "NumericValue._compute_polynomial_degree";
+static const char __pyx_k_NumericValue_is_named_expression[] = "NumericValue.is_named_expression_type";
+static const char __pyx_k_NumericValue_is_potentially_vari[] = "NumericValue.is_potentially_variable";
+static const char __pyx_k_Numeric_Constant_value_is_undefi[] = "Numeric Constant: value is undefined";
+static const char __pyx_k_evaluating_object_as_numeric_val[] = "evaluating object as numeric value: %s\n (object: %s)\n%s";
+static const char __pyx_k_incomplete_import_of_Pyomo_expre[] = "incomplete import of Pyomo expression system";
+static const char __pyx_k_Implicit_conversion_of_Pyomo_Num_2[] = "Implicit conversion of Pyomo NumericValue type `%s' to an integer is\ndisabled. This error is often the result of using Pyomo components as\narguments to one of the Python built-in math module functions when\ndefining expressions. Avoid this error by using Pyomo-provided math\nfunctions.";
+static PyObject *__pyx_kp_s_An_object_that_contains_a_consta;
+static PyObject *__pyx_kp_s_An_object_that_contains_a_non_nu;
+static PyObject *__pyx_n_s_AttributeError;
+static PyObject *__pyx_kp_s_Cannot_convert_object_of_type_s;
+static PyObject *__pyx_kp_s_DEPRECATED_The_cname_method_has;
+static PyObject *__pyx_kp_s_Implicit_conversion_of_Pyomo_Num;
+static PyObject *__pyx_kp_s_Implicit_conversion_of_Pyomo_Num_2;
+static PyObject *__pyx_n_s_KnownConstants;
+static PyObject *__pyx_kp_s_No_value_for_uninitialized_Numer;
+static PyObject *__pyx_n_s_NonNumericValue;
+static PyObject *__pyx_n_s_NonNumericValue___getstate;
+static PyObject *__pyx_n_s_NonNumericValue___init;
+static PyObject *__pyx_n_s_NonNumericValue___setstate;
+static PyObject *__pyx_n_s_NonNumericValue___str;
+static PyObject *__pyx_n_s_NumericConstant;
+static PyObject *__pyx_n_s_NumericConstant___call;
+static PyObject *__pyx_n_s_NumericConstant___getstate;
+static PyObject *__pyx_n_s_NumericConstant___init;
+static PyObject *__pyx_n_s_NumericConstant___nonzero;
+static PyObject *__pyx_n_s_NumericConstant___str;
+static PyObject *__pyx_n_s_NumericConstant__compute_polynom;
+static PyObject *__pyx_n_s_NumericConstant_is_constant;
+static PyObject *__pyx_n_s_NumericConstant_is_fixed;
+static PyObject *__pyx_n_s_NumericConstant_is_potentially_v;
+static PyObject *__pyx_n_s_NumericConstant_pprint;
+static PyObject *__pyx_n_s_NumericValue;
+static PyObject *__pyx_n_s_NumericValue___abs;
+static PyObject *__pyx_n_s_NumericValue___add;
+static PyObject *__pyx_n_s_NumericValue___div;
+static PyObject *__pyx_n_s_NumericValue___eq;
+static PyObject *__pyx_n_s_NumericValue___float;
+static PyObject *__pyx_n_s_NumericValue___ge;
+static PyObject *__pyx_n_s_NumericValue___getstate;
+static PyObject *__pyx_n_s_NumericValue___gt;
+static PyObject *__pyx_n_s_NumericValue___iadd;
+static PyObject *__pyx_n_s_NumericValue___idiv;
+static PyObject *__pyx_n_s_NumericValue___imul;
+static PyObject *__pyx_n_s_NumericValue___int;
+static PyObject *__pyx_n_s_NumericValue___ipow;
+static PyObject *__pyx_n_s_NumericValue___isub;
+static PyObject *__pyx_n_s_NumericValue___itruediv;
+static PyObject *__pyx_n_s_NumericValue___le;
+static PyObject *__pyx_n_s_NumericValue___lt;
+static PyObject *__pyx_n_s_NumericValue___mul;
+static PyObject *__pyx_n_s_NumericValue___neg;
+static PyObject *__pyx_n_s_NumericValue___pos;
+static PyObject *__pyx_n_s_NumericValue___pow;
+static PyObject *__pyx_n_s_NumericValue___radd;
+static PyObject *__pyx_n_s_NumericValue___rdiv;
+static PyObject *__pyx_n_s_NumericValue___rmul;
+static PyObject *__pyx_n_s_NumericValue___rpow;
+static PyObject *__pyx_n_s_NumericValue___rsub;
+static PyObject *__pyx_n_s_NumericValue___rtruediv;
+static PyObject *__pyx_n_s_NumericValue___setstate;
+static PyObject *__pyx_n_s_NumericValue___sub;
+static PyObject *__pyx_n_s_NumericValue___truediv;
+static PyObject *__pyx_n_s_NumericValue__compute_polynomial;
+static PyObject *__pyx_n_s_NumericValue_as_numeric;
+static PyObject *__pyx_n_s_NumericValue_cname;
+static PyObject *__pyx_n_s_NumericValue_getname;
+static PyObject *__pyx_n_s_NumericValue_is_constant;
+static PyObject *__pyx_n_s_NumericValue_is_expression_type;
+static PyObject *__pyx_n_s_NumericValue_is_fixed;
+static PyObject *__pyx_n_s_NumericValue_is_indexed;
+static PyObject *__pyx_n_s_NumericValue_is_named_expression;
+static PyObject *__pyx_n_s_NumericValue_is_potentially_vari;
+static PyObject *__pyx_n_s_NumericValue_is_relational;
+static PyObject *__pyx_n_s_NumericValue_is_variable_type;
+static PyObject *__pyx_n_s_NumericValue_local_name;
+static PyObject *__pyx_n_s_NumericValue_name;
+static PyObject *__pyx_n_s_NumericValue_polynomial_degree;
+static PyObject *__pyx_n_s_NumericValue_to_string;
+static PyObject *__pyx_kp_s_Numeric_Constant_value_is_undefi;
+static PyObject *__pyx_n_s_PY3;
+static PyObject *__pyx_n_s_RegisterBooleanType;
+static PyObject *__pyx_n_s_RegisterIntegerType;
+static PyObject *__pyx_n_s_RegisterNumericType;
+static PyObject *__pyx_n_s_RuntimeError;
+static PyObject *__pyx_kp_s_This_is_the_base_class_for_nume;
+static PyObject *__pyx_n_s_TypeError;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_n_s_ZeroConstant;
+static PyObject *__pyx_n_s_abs;
+static PyObject *__pyx_n_s_abs_2;
+static PyObject *__pyx_n_s_add;
+static PyObject *__pyx_n_s_add_2;
+static PyObject *__pyx_n_s_add_3;
+static PyObject *__pyx_n_s_all;
+static PyObject *__pyx_n_s_args;
+static PyObject *__pyx_n_s_as_numeric;
+static PyObject *__pyx_n_s_base;
+static PyObject *__pyx_n_s_binary_type;
+static PyObject *__pyx_n_s_bool;
+static PyObject *__pyx_n_s_call;
+static PyObject *__pyx_n_s_class;
+static PyObject *__pyx_n_s_cline_in_traceback;
+static PyObject *__pyx_n_s_cname;
+static PyObject *__pyx_n_s_compute_polynomial_degree;
+static PyObject *__pyx_n_s_compute_values;
+static PyObject *__pyx_n_s_div;
+static PyObject *__pyx_n_s_div_2;
+static PyObject *__pyx_n_s_doc;
+static PyObject *__pyx_n_s_eq;
+static PyObject *__pyx_n_s_eq_2;
+static PyObject *__pyx_n_s_error;
+static PyObject *__pyx_n_s_etype;
+static PyObject *__pyx_kp_s_evaluating_object_as_numeric_val;
+static PyObject *__pyx_n_s_exc_info;
+static PyObject *__pyx_n_s_exception;
+static PyObject *__pyx_n_s_float;
+static PyObject *__pyx_n_s_fully_qualified;
+static PyObject *__pyx_n_s_ge;
+static PyObject *__pyx_n_s_generate_mul_expression;
+static PyObject *__pyx_n_s_generate_other_expression;
+static PyObject *__pyx_n_s_generate_relational_expression;
+static PyObject *__pyx_n_s_generate_sum_expression;
+static PyObject *__pyx_n_s_getLogger;
+static PyObject *__pyx_n_s_getSymbol;
+static PyObject *__pyx_n_s_getname;
+static PyObject *__pyx_n_s_getstate;
+static PyObject *__pyx_n_s_gt;
+static PyObject *__pyx_n_s_hash;
+static PyObject *__pyx_n_s_i;
+static PyObject *__pyx_n_s_iadd;
+static PyObject *__pyx_n_s_iadd_2;
+static PyObject *__pyx_n_s_idiv;
+static PyObject *__pyx_n_s_idiv_2;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_n_s_imul;
+static PyObject *__pyx_n_s_imul_2;
+static PyObject *__pyx_kp_s_incomplete_import_of_Pyomo_expre;
+static PyObject *__pyx_n_s_init;
+static PyObject *__pyx_n_s_inplace;
+static PyObject *__pyx_n_s_int;
+static PyObject *__pyx_n_s_ipow;
+static PyObject *__pyx_n_s_ipow_2;
+static PyObject *__pyx_n_s_is_constant;
+static PyObject *__pyx_n_s_is_expression_type;
+static PyObject *__pyx_n_s_is_fixed;
+static PyObject *__pyx_n_s_is_indexed;
+static PyObject *__pyx_n_s_is_named_expression_type;
+static PyObject *__pyx_n_s_is_potentially_variable;
+static PyObject *__pyx_n_s_is_relational;
+static PyObject *__pyx_n_s_is_variable_type;
+static PyObject *__pyx_n_s_isub;
+static PyObject *__pyx_n_s_isub_2;
+static PyObject *__pyx_n_s_iteritems;
+static PyObject *__pyx_n_s_itruediv;
+static PyObject *__pyx_n_s_key;
+static PyObject *__pyx_n_s_kwds;
+static PyObject *__pyx_n_s_labeler;
+static PyObject *__pyx_n_s_le;
+static PyObject *__pyx_n_s_le_2;
+static PyObject *__pyx_n_s_lhs;
+static PyObject *__pyx_n_s_local_name;
+static PyObject *__pyx_n_s_logger;
+static PyObject *__pyx_n_s_logging;
+static PyObject *__pyx_n_s_lt;
+static PyObject *__pyx_n_s_lt_2;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_metaclass;
+static PyObject *__pyx_n_s_module;
+static PyObject *__pyx_n_s_mul;
+static PyObject *__pyx_n_s_mul_2;
+static PyObject *__pyx_n_s_name;
+static PyObject *__pyx_n_s_name_2;
+static PyObject *__pyx_n_s_name_buffer;
+static PyObject *__pyx_n_s_native_boolean_types;
+static PyObject *__pyx_n_s_native_integer_types;
+static PyObject *__pyx_n_s_native_numeric_types;
+static PyObject *__pyx_n_s_native_types;
+static PyObject *__pyx_n_s_neg;
+static PyObject *__pyx_n_s_neg_2;
+static PyObject *__pyx_n_s_new_type;
+static PyObject *__pyx_n_s_nonpyomo_leaf_types;
+static PyObject *__pyx_n_s_nonzero;
+static PyObject *__pyx_n_s_numeric;
+static PyObject *__pyx_n_s_obj;
+static PyObject *__pyx_n_s_object;
+static PyObject *__pyx_n_s_ostream;
+static PyObject *__pyx_n_s_other;
+static PyObject *__pyx_n_s_other_2;
+static PyObject *__pyx_n_s_polynomial_degree;
+static PyObject *__pyx_n_s_pos;
+static PyObject *__pyx_n_s_potentially_variable;
+static PyObject *__pyx_n_s_pow;
+static PyObject *__pyx_n_s_pow_2;
+static PyObject *__pyx_n_s_pprint;
+static PyObject *__pyx_n_s_prepare;
+static PyObject *__pyx_n_s_property;
+static PyObject *__pyx_kp_s_pyomo_core;
+static PyObject *__pyx_n_s_pyomo_core_expr_expr_common;
+static PyObject *__pyx_n_s_pyomo_core_expr_numvalue;
+static PyObject *__pyx_kp_s_pyomo_core_expr_numvalue_pyx;
+static PyObject *__pyx_n_s_qualname;
+static PyObject *__pyx_n_s_radd;
+static PyObject *__pyx_n_s_radd_2;
+static PyObject *__pyx_n_s_rdiv;
+static PyObject *__pyx_n_s_rdiv_2;
+static PyObject *__pyx_n_s_result;
+static PyObject *__pyx_n_s_rhs;
+static PyObject *__pyx_n_s_rmul;
+static PyObject *__pyx_n_s_rmul_2;
+static PyObject *__pyx_n_s_rpow;
+static PyObject *__pyx_n_s_rpow_2;
+static PyObject *__pyx_n_s_rsub;
+static PyObject *__pyx_n_s_rsub_2;
+static PyObject *__pyx_n_s_rtruediv;
+static PyObject *__pyx_n_s_self;
+static PyObject *__pyx_n_s_self_2;
+static PyObject *__pyx_n_s_setattr;
+static PyObject *__pyx_n_s_setstate;
+static PyObject *__pyx_n_s_six;
+static PyObject *__pyx_n_s_slots;
+static PyObject *__pyx_n_s_smap;
+static PyObject *__pyx_n_s_state;
+static PyObject *__pyx_n_s_stdout;
+static PyObject *__pyx_n_s_str;
+static PyObject *__pyx_n_s_string_types;
+static PyObject *__pyx_n_s_sub;
+static PyObject *__pyx_n_s_sub_2;
+static PyObject *__pyx_n_s_super;
+static PyObject *__pyx_n_s_sys;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_text_type;
+static PyObject *__pyx_n_s_tmp;
+static PyObject *__pyx_n_s_to_string;
+static PyObject *__pyx_n_s_truediv;
+static PyObject *__pyx_n_s_update;
+static PyObject *__pyx_n_s_update_KnownConstants;
+static PyObject *__pyx_n_s_val;
+static PyObject *__pyx_n_s_value;
+static PyObject *__pyx_n_s_values;
+static PyObject *__pyx_n_s_verbose;
+static PyObject *__pyx_n_s_warning;
+static PyObject *__pyx_n_s_write;
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue__generate_sum_expression(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_etype, CYTHON_UNUSED PyObject *__pyx_v__self, CYTHON_UNUSED PyObject *__pyx_v__other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_2_generate_mul_expression(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_etype, CYTHON_UNUSED PyObject *__pyx_v__self, CYTHON_UNUSED PyObject *__pyx_v__other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_4_generate_other_expression(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_etype, CYTHON_UNUSED PyObject *__pyx_v__self, CYTHON_UNUSED PyObject *__pyx_v__other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_6_generate_relational_expression(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_etype, CYTHON_UNUSED PyObject *__pyx_v_lhs, CYTHON_UNUSED PyObject *__pyx_v_rhs); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NonNumericValue___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NonNumericValue_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NonNumericValue_4__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NonNumericValue_6__setstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_8RegisterNumericType(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_new_type); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_10RegisterIntegerType(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_new_type); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12RegisterBooleanType(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_new_type); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_14value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_exception); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_16is_constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_18is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_20is_variable_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_22potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_24update_KnownConstants(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_val); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_26as_numeric(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue___getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_2__setstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_4getname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fully_qualified, PyObject *__pyx_v_name_buffer); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_6name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_8local_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_10cname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwds); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_12is_constant(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_14is_fixed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_16is_variable_type(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_18is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_20is_named_expression_type(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_22is_expression_type(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_24is_relational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_26is_indexed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_28as_numeric(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_30polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_32_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_34__float__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_36__int__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_38__lt__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_40__gt__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_42__le__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_44__ge__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_46__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_48__add__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_50__sub__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_52__mul__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_54__div__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_56__truediv__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_58__pow__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_60__radd__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_62__rsub__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_64__rmul__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_66__rdiv__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_68__rtruediv__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_70__rpow__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_72__iadd__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_74__isub__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_76__imul__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_78__idiv__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_80__itruediv__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_82__ipow__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_84__neg__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_86__pos__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_88__abs__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_90to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_verbose, PyObject *__pyx_v_labeler, PyObject *__pyx_v_smap, PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_2__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_4is_constant(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_6is_fixed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_8is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_10_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_result); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_14__nonzero__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_16__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exception); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_18pprint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ostream, CYTHON_UNUSED PyObject *__pyx_v_verbose); /* proto */
+static PyObject *__pyx_int_0;
+static PyObject *__pyx_tuple_;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__3;
+static PyObject *__pyx_tuple__4;
+static PyObject *__pyx_tuple__5;
+static PyObject *__pyx_tuple__6;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_tuple__10;
+static PyObject *__pyx_tuple__12;
+static PyObject *__pyx_tuple__14;
+static PyObject *__pyx_tuple__16;
+static PyObject *__pyx_tuple__18;
+static PyObject *__pyx_tuple__19;
+static PyObject *__pyx_tuple__20;
+static PyObject *__pyx_tuple__22;
+static PyObject *__pyx_tuple__24;
+static PyObject *__pyx_tuple__26;
+static PyObject *__pyx_tuple__28;
+static PyObject *__pyx_tuple__30;
+static PyObject *__pyx_tuple__32;
+static PyObject *__pyx_tuple__34;
+static PyObject *__pyx_tuple__36;
+static PyObject *__pyx_tuple__38;
+static PyObject *__pyx_tuple__40;
+static PyObject *__pyx_tuple__42;
+static PyObject *__pyx_tuple__44;
+static PyObject *__pyx_tuple__46;
+static PyObject *__pyx_tuple__48;
+static PyObject *__pyx_tuple__49;
+static PyObject *__pyx_tuple__51;
+static PyObject *__pyx_tuple__53;
+static PyObject *__pyx_tuple__55;
+static PyObject *__pyx_tuple__56;
+static PyObject *__pyx_tuple__58;
+static PyObject *__pyx_tuple__60;
+static PyObject *__pyx_tuple__62;
+static PyObject *__pyx_tuple__64;
+static PyObject *__pyx_tuple__66;
+static PyObject *__pyx_tuple__68;
+static PyObject *__pyx_tuple__70;
+static PyObject *__pyx_tuple__72;
+static PyObject *__pyx_tuple__74;
+static PyObject *__pyx_tuple__76;
+static PyObject *__pyx_tuple__78;
+static PyObject *__pyx_tuple__80;
+static PyObject *__pyx_tuple__82;
+static PyObject *__pyx_tuple__84;
+static PyObject *__pyx_tuple__86;
+static PyObject *__pyx_tuple__88;
+static PyObject *__pyx_tuple__90;
+static PyObject *__pyx_tuple__92;
+static PyObject *__pyx_tuple__94;
+static PyObject *__pyx_tuple__96;
+static PyObject *__pyx_tuple__98;
+static PyObject *__pyx_tuple__100;
+static PyObject *__pyx_tuple__102;
+static PyObject *__pyx_tuple__104;
+static PyObject *__pyx_tuple__106;
+static PyObject *__pyx_tuple__108;
+static PyObject *__pyx_tuple__110;
+static PyObject *__pyx_tuple__112;
+static PyObject *__pyx_tuple__114;
+static PyObject *__pyx_tuple__116;
+static PyObject *__pyx_tuple__118;
+static PyObject *__pyx_tuple__120;
+static PyObject *__pyx_tuple__122;
+static PyObject *__pyx_tuple__124;
+static PyObject *__pyx_tuple__126;
+static PyObject *__pyx_tuple__128;
+static PyObject *__pyx_tuple__130;
+static PyObject *__pyx_tuple__132;
+static PyObject *__pyx_tuple__134;
+static PyObject *__pyx_tuple__136;
+static PyObject *__pyx_tuple__138;
+static PyObject *__pyx_tuple__140;
+static PyObject *__pyx_tuple__142;
+static PyObject *__pyx_tuple__143;
+static PyObject *__pyx_tuple__144;
+static PyObject *__pyx_tuple__146;
+static PyObject *__pyx_tuple__148;
+static PyObject *__pyx_tuple__150;
+static PyObject *__pyx_tuple__152;
+static PyObject *__pyx_tuple__154;
+static PyObject *__pyx_tuple__156;
+static PyObject *__pyx_tuple__158;
+static PyObject *__pyx_tuple__160;
+static PyObject *__pyx_tuple__162;
+static PyObject *__pyx_tuple__163;
+static PyObject *__pyx_tuple__165;
+static PyObject *__pyx_tuple__166;
+static PyObject *__pyx_codeobj__11;
+static PyObject *__pyx_codeobj__13;
+static PyObject *__pyx_codeobj__15;
+static PyObject *__pyx_codeobj__17;
+static PyObject *__pyx_codeobj__21;
+static PyObject *__pyx_codeobj__23;
+static PyObject *__pyx_codeobj__25;
+static PyObject *__pyx_codeobj__27;
+static PyObject *__pyx_codeobj__29;
+static PyObject *__pyx_codeobj__31;
+static PyObject *__pyx_codeobj__33;
+static PyObject *__pyx_codeobj__35;
+static PyObject *__pyx_codeobj__37;
+static PyObject *__pyx_codeobj__39;
+static PyObject *__pyx_codeobj__41;
+static PyObject *__pyx_codeobj__43;
+static PyObject *__pyx_codeobj__45;
+static PyObject *__pyx_codeobj__47;
+static PyObject *__pyx_codeobj__50;
+static PyObject *__pyx_codeobj__52;
+static PyObject *__pyx_codeobj__54;
+static PyObject *__pyx_codeobj__57;
+static PyObject *__pyx_codeobj__59;
+static PyObject *__pyx_codeobj__61;
+static PyObject *__pyx_codeobj__63;
+static PyObject *__pyx_codeobj__65;
+static PyObject *__pyx_codeobj__67;
+static PyObject *__pyx_codeobj__69;
+static PyObject *__pyx_codeobj__71;
+static PyObject *__pyx_codeobj__73;
+static PyObject *__pyx_codeobj__75;
+static PyObject *__pyx_codeobj__77;
+static PyObject *__pyx_codeobj__79;
+static PyObject *__pyx_codeobj__81;
+static PyObject *__pyx_codeobj__83;
+static PyObject *__pyx_codeobj__85;
+static PyObject *__pyx_codeobj__87;
+static PyObject *__pyx_codeobj__89;
+static PyObject *__pyx_codeobj__91;
+static PyObject *__pyx_codeobj__93;
+static PyObject *__pyx_codeobj__95;
+static PyObject *__pyx_codeobj__97;
+static PyObject *__pyx_codeobj__99;
+static PyObject *__pyx_codeobj__101;
+static PyObject *__pyx_codeobj__103;
+static PyObject *__pyx_codeobj__105;
+static PyObject *__pyx_codeobj__107;
+static PyObject *__pyx_codeobj__109;
+static PyObject *__pyx_codeobj__111;
+static PyObject *__pyx_codeobj__113;
+static PyObject *__pyx_codeobj__115;
+static PyObject *__pyx_codeobj__117;
+static PyObject *__pyx_codeobj__119;
+static PyObject *__pyx_codeobj__121;
+static PyObject *__pyx_codeobj__123;
+static PyObject *__pyx_codeobj__125;
+static PyObject *__pyx_codeobj__127;
+static PyObject *__pyx_codeobj__129;
+static PyObject *__pyx_codeobj__131;
+static PyObject *__pyx_codeobj__133;
+static PyObject *__pyx_codeobj__135;
+static PyObject *__pyx_codeobj__137;
+static PyObject *__pyx_codeobj__139;
+static PyObject *__pyx_codeobj__141;
+static PyObject *__pyx_codeobj__145;
+static PyObject *__pyx_codeobj__147;
+static PyObject *__pyx_codeobj__149;
+static PyObject *__pyx_codeobj__151;
+static PyObject *__pyx_codeobj__153;
+static PyObject *__pyx_codeobj__155;
+static PyObject *__pyx_codeobj__157;
+static PyObject *__pyx_codeobj__159;
+static PyObject *__pyx_codeobj__161;
+static PyObject *__pyx_codeobj__164;
+
+/* "pyomo/core/expr/numvalue.pyx":26
+ * logger = logging.getLogger('pyomo.core')
+ *
+ * def _generate_sum_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_mul_expression(etype, _self, _other):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_1_generate_sum_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_1_generate_sum_expression = {"_generate_sum_expression", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_1_generate_sum_expression, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_1_generate_sum_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_etype = 0;
+ CYTHON_UNUSED PyObject *__pyx_v__self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v__other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_generate_sum_expression (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_self,&__pyx_n_s_other,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_sum_expression", 1, 3, 3, 1); __PYX_ERR(0, 26, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_sum_expression", 1, 3, 3, 2); __PYX_ERR(0, 26, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_generate_sum_expression") < 0)) __PYX_ERR(0, 26, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_etype = values[0];
+ __pyx_v__self = values[1];
+ __pyx_v__other = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_generate_sum_expression", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 26, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue._generate_sum_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue__generate_sum_expression(__pyx_self, __pyx_v_etype, __pyx_v__self, __pyx_v__other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue__generate_sum_expression(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_etype, CYTHON_UNUSED PyObject *__pyx_v__self, CYTHON_UNUSED PyObject *__pyx_v__other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("_generate_sum_expression", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":27
+ *
+ * def _generate_sum_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover # <<<<<<<<<<<<<<
+ * def _generate_mul_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 27, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":26
+ * logger = logging.getLogger('pyomo.core')
+ *
+ * def _generate_sum_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_mul_expression(etype, _self, _other):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue._generate_sum_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":28
+ * def _generate_sum_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_mul_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_other_expression(etype, _self, _other):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_3_generate_mul_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_3_generate_mul_expression = {"_generate_mul_expression", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_3_generate_mul_expression, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_3_generate_mul_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_etype = 0;
+ CYTHON_UNUSED PyObject *__pyx_v__self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v__other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_generate_mul_expression (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_self,&__pyx_n_s_other,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_mul_expression", 1, 3, 3, 1); __PYX_ERR(0, 28, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_mul_expression", 1, 3, 3, 2); __PYX_ERR(0, 28, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_generate_mul_expression") < 0)) __PYX_ERR(0, 28, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_etype = values[0];
+ __pyx_v__self = values[1];
+ __pyx_v__other = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_generate_mul_expression", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 28, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue._generate_mul_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_2_generate_mul_expression(__pyx_self, __pyx_v_etype, __pyx_v__self, __pyx_v__other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_2_generate_mul_expression(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_etype, CYTHON_UNUSED PyObject *__pyx_v__self, CYTHON_UNUSED PyObject *__pyx_v__other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("_generate_mul_expression", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":29
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_mul_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover # <<<<<<<<<<<<<<
+ * def _generate_other_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 29, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":28
+ * def _generate_sum_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_mul_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_other_expression(etype, _self, _other):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue._generate_mul_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":30
+ * def _generate_mul_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_other_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_relational_expression(etype, lhs, rhs):
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_5_generate_other_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_5_generate_other_expression = {"_generate_other_expression", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_5_generate_other_expression, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_5_generate_other_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_etype = 0;
+ CYTHON_UNUSED PyObject *__pyx_v__self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v__other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_generate_other_expression (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_self,&__pyx_n_s_other,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_other_expression", 1, 3, 3, 1); __PYX_ERR(0, 30, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_other_expression", 1, 3, 3, 2); __PYX_ERR(0, 30, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_generate_other_expression") < 0)) __PYX_ERR(0, 30, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_etype = values[0];
+ __pyx_v__self = values[1];
+ __pyx_v__other = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_generate_other_expression", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 30, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue._generate_other_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_4_generate_other_expression(__pyx_self, __pyx_v_etype, __pyx_v__self, __pyx_v__other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_4_generate_other_expression(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_etype, CYTHON_UNUSED PyObject *__pyx_v__self, CYTHON_UNUSED PyObject *__pyx_v__other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("_generate_other_expression", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":31
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_other_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover # <<<<<<<<<<<<<<
+ * def _generate_relational_expression(etype, lhs, rhs):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 31, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 31, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":30
+ * def _generate_mul_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_other_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_relational_expression(etype, lhs, rhs):
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue._generate_other_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":32
+ * def _generate_other_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_relational_expression(etype, lhs, rhs): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_7_generate_relational_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_7_generate_relational_expression = {"_generate_relational_expression", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_7_generate_relational_expression, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_7_generate_relational_expression(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_etype = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_lhs = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_rhs = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_generate_relational_expression (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_etype,&__pyx_n_s_lhs,&__pyx_n_s_rhs,0};
+ PyObject* values[3] = {0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_etype)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_relational_expression", 1, 3, 3, 1); __PYX_ERR(0, 32, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_generate_relational_expression", 1, 3, 3, 2); __PYX_ERR(0, 32, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_generate_relational_expression") < 0)) __PYX_ERR(0, 32, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 3) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ }
+ __pyx_v_etype = values[0];
+ __pyx_v_lhs = values[1];
+ __pyx_v_rhs = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_generate_relational_expression", 1, 3, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 32, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue._generate_relational_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_6_generate_relational_expression(__pyx_self, __pyx_v_etype, __pyx_v_lhs, __pyx_v_rhs);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_6_generate_relational_expression(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_etype, CYTHON_UNUSED PyObject *__pyx_v_lhs, CYTHON_UNUSED PyObject *__pyx_v_rhs) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("_generate_relational_expression", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":33
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_relational_expression(etype, lhs, rhs):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover # <<<<<<<<<<<<<<
+ *
+ * ##------------------------------------------------------------------------
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_RuntimeError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 33, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":32
+ * def _generate_other_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_relational_expression(etype, lhs, rhs): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue._generate_relational_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":49
+ * __slots__ = ('value',)
+ *
+ * def __init__(self, value): # <<<<<<<<<<<<<<
+ * self.value = value
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NonNumericValue_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15NonNumericValue_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15NonNumericValue_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NonNumericValue_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_value = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_value,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 49, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 49, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_value = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 49, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NonNumericValue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_15NonNumericValue___init__(__pyx_self, __pyx_v_self, __pyx_v_value);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NonNumericValue___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":50
+ *
+ * def __init__(self, value):
+ * self.value = value # <<<<<<<<<<<<<<
+ *
+ * def __str__(self):
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_value, __pyx_v_value) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":49
+ * __slots__ = ('value',)
+ *
+ * def __init__(self, value): # <<<<<<<<<<<<<<
+ * self.value = value
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NonNumericValue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":52
+ * self.value = value
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return str(self.value)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NonNumericValue_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15NonNumericValue_3__str__ = {"__str__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15NonNumericValue_3__str__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NonNumericValue_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_15NonNumericValue_2__str__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NonNumericValue_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__str__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":53
+ *
+ * def __str__(self):
+ * return str(self.value) # <<<<<<<<<<<<<<
+ *
+ * def __getstate__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 53, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":52
+ * self.value = value
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return str(self.value)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NonNumericValue.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":55
+ * return str(self.value)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = {}
+ * state['value'] = getattr(self,'value')
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NonNumericValue_5__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15NonNumericValue_5__getstate__ = {"__getstate__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15NonNumericValue_5__getstate__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NonNumericValue_5__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_15NonNumericValue_4__getstate__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NonNumericValue_4__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_state = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__getstate__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":56
+ *
+ * def __getstate__(self):
+ * state = {} # <<<<<<<<<<<<<<
+ * state['value'] = getattr(self,'value')
+ * return state
+ */
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 56, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_state = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":57
+ * def __getstate__(self):
+ * state = {}
+ * state['value'] = getattr(self,'value') # <<<<<<<<<<<<<<
+ * return state
+ *
+ */
+ __pyx_t_1 = __Pyx_GetAttr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(PyDict_SetItem(__pyx_v_state, __pyx_n_s_value, __pyx_t_1) < 0)) __PYX_ERR(0, 57, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":58
+ * state = {}
+ * state['value'] = getattr(self,'value')
+ * return state # <<<<<<<<<<<<<<
+ *
+ * def __setstate__(self, state):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_state);
+ __pyx_r = __pyx_v_state;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":55
+ * return str(self.value)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = {}
+ * state['value'] = getattr(self,'value')
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NonNumericValue.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_state);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":60
+ * return state
+ *
+ * def __setstate__(self, state): # <<<<<<<<<<<<<<
+ * setattr(self, 'value', state['value'])
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NonNumericValue_7__setstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15NonNumericValue_7__setstate__ = {"__setstate__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15NonNumericValue_7__setstate__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NonNumericValue_7__setstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_state = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_state,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_state)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__setstate__", 1, 2, 2, 1); __PYX_ERR(0, 60, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setstate__") < 0)) __PYX_ERR(0, 60, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_state = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__setstate__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 60, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NonNumericValue.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_15NonNumericValue_6__setstate__(__pyx_self, __pyx_v_self, __pyx_v_state);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NonNumericValue_6__setstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ __Pyx_RefNannySetupContext("__setstate__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":61
+ *
+ * def __setstate__(self, state):
+ * setattr(self, 'value', state['value']) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_state, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_SetAttr(__pyx_v_self, __pyx_n_s_value, __pyx_t_1); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(0, 61, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":60
+ * return state
+ *
+ * def __setstate__(self, state): # <<<<<<<<<<<<<<
+ * setattr(self, 'value', state['value'])
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NonNumericValue.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":116
+ * nonpyomo_leaf_types.update( native_types )
+ *
+ * def RegisterNumericType(new_type): # <<<<<<<<<<<<<<
+ * """
+ * A utility function for updating the set of types that are
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_9RegisterNumericType(PyObject *__pyx_self, PyObject *__pyx_v_new_type); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_8RegisterNumericType[] = "\n A utility function for updating the set of types that are\n recognized to handle numeric values.\n\n The argument should be a class (e.g, numpy.float64).\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_9RegisterNumericType = {"RegisterNumericType", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_9RegisterNumericType, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_8RegisterNumericType};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_9RegisterNumericType(PyObject *__pyx_self, PyObject *__pyx_v_new_type) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("RegisterNumericType (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_8RegisterNumericType(__pyx_self, ((PyObject *)__pyx_v_new_type));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_8RegisterNumericType(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_new_type) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("RegisterNumericType", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":125
+ * global native_numeric_types
+ * global native_types
+ * native_numeric_types.add(new_type) # <<<<<<<<<<<<<<
+ * native_types.add(new_type)
+ * nonpyomo_leaf_types.add(new_type)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_new_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_new_type);
+ __Pyx_GIVEREF(__pyx_v_new_type);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_new_type);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":126
+ * global native_types
+ * native_numeric_types.add(new_type)
+ * native_types.add(new_type) # <<<<<<<<<<<<<<
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_new_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_new_type);
+ __Pyx_GIVEREF(__pyx_v_new_type);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_new_type);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":127
+ * native_numeric_types.add(new_type)
+ * native_types.add(new_type)
+ * nonpyomo_leaf_types.add(new_type) # <<<<<<<<<<<<<<
+ *
+ * def RegisterIntegerType(new_type):
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_new_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_INCREF(__pyx_v_new_type);
+ __Pyx_GIVEREF(__pyx_v_new_type);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_new_type);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":116
+ * nonpyomo_leaf_types.update( native_types )
+ *
+ * def RegisterNumericType(new_type): # <<<<<<<<<<<<<<
+ * """
+ * A utility function for updating the set of types that are
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.RegisterNumericType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":129
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ * def RegisterIntegerType(new_type): # <<<<<<<<<<<<<<
+ * """
+ * A utility function for updating the set of types that are
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_11RegisterIntegerType(PyObject *__pyx_self, PyObject *__pyx_v_new_type); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_10RegisterIntegerType[] = "\n A utility function for updating the set of types that are\n recognized to handle integer values. This also registers the type\n as numeric but does not register it as boolean.\n\n The argument should be a class (e.g., numpy.int64).\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_11RegisterIntegerType = {"RegisterIntegerType", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_11RegisterIntegerType, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_10RegisterIntegerType};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_11RegisterIntegerType(PyObject *__pyx_self, PyObject *__pyx_v_new_type) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("RegisterIntegerType (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_10RegisterIntegerType(__pyx_self, ((PyObject *)__pyx_v_new_type));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_10RegisterIntegerType(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_new_type) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("RegisterIntegerType", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":140
+ * global native_integer_types
+ * global native_types
+ * native_numeric_types.add(new_type) # <<<<<<<<<<<<<<
+ * native_integer_types.add(new_type)
+ * native_types.add(new_type)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_new_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_new_type);
+ __Pyx_GIVEREF(__pyx_v_new_type);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_new_type);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":141
+ * global native_types
+ * native_numeric_types.add(new_type)
+ * native_integer_types.add(new_type) # <<<<<<<<<<<<<<
+ * native_types.add(new_type)
+ * nonpyomo_leaf_types.add(new_type)
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_integer_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_new_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_new_type);
+ __Pyx_GIVEREF(__pyx_v_new_type);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_new_type);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":142
+ * native_numeric_types.add(new_type)
+ * native_integer_types.add(new_type)
+ * native_types.add(new_type) # <<<<<<<<<<<<<<
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 142, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 142, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_new_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_INCREF(__pyx_v_new_type);
+ __Pyx_GIVEREF(__pyx_v_new_type);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_new_type);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 142, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":143
+ * native_integer_types.add(new_type)
+ * native_types.add(new_type)
+ * nonpyomo_leaf_types.add(new_type) # <<<<<<<<<<<<<<
+ *
+ * def RegisterBooleanType(new_type):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_new_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_new_type);
+ __Pyx_GIVEREF(__pyx_v_new_type);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_new_type);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":129
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ * def RegisterIntegerType(new_type): # <<<<<<<<<<<<<<
+ * """
+ * A utility function for updating the set of types that are
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.RegisterIntegerType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":145
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ * def RegisterBooleanType(new_type): # <<<<<<<<<<<<<<
+ * """
+ * A utility function for updating the set of types that are
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_13RegisterBooleanType(PyObject *__pyx_self, PyObject *__pyx_v_new_type); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12RegisterBooleanType[] = "\n A utility function for updating the set of types that are\n recognized as handling boolean values. This function does not\n register the type of integer or numeric.\n\n The argument should be a class (e.g., numpy.bool_).\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_13RegisterBooleanType = {"RegisterBooleanType", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_13RegisterBooleanType, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12RegisterBooleanType};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_13RegisterBooleanType(PyObject *__pyx_self, PyObject *__pyx_v_new_type) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("RegisterBooleanType (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12RegisterBooleanType(__pyx_self, ((PyObject *)__pyx_v_new_type));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12RegisterBooleanType(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_new_type) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("RegisterBooleanType", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":155
+ * global native_boolean_types
+ * global native_types
+ * native_boolean_types.add(new_type) # <<<<<<<<<<<<<<
+ * native_types.add(new_type)
+ * nonpyomo_leaf_types.add(new_type)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_boolean_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_new_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_new_type);
+ __Pyx_GIVEREF(__pyx_v_new_type);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_new_type);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 155, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":156
+ * global native_types
+ * native_boolean_types.add(new_type)
+ * native_types.add(new_type) # <<<<<<<<<<<<<<
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_v_new_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_new_type);
+ __Pyx_GIVEREF(__pyx_v_new_type);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_new_type);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":157
+ * native_boolean_types.add(new_type)
+ * native_types.add(new_type)
+ * nonpyomo_leaf_types.add(new_type) # <<<<<<<<<<<<<<
+ *
+ * def value(obj, exception=True):
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_new_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_new_type};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_INCREF(__pyx_v_new_type);
+ __Pyx_GIVEREF(__pyx_v_new_type);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_new_type);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":145
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ * def RegisterBooleanType(new_type): # <<<<<<<<<<<<<<
+ * """
+ * A utility function for updating the set of types that are
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.RegisterBooleanType", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":159
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ * def value(obj, exception=True): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns the value of a Pyomo object or
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_14value[] = "\n A utility function that returns the value of a Pyomo object or\n expression.\n\n Args:\n obj: The argument to evaluate. If it is None, a\n string, or any other primative numeric type,\n then this function simply returns the argument.\n Otherwise, if the argument is a NumericValue\n then the __call__ method is executed.\n exception (bool): If :const:`True`, then an exception should\n be raised when instances of NumericValue fail to\n evaluate due to one or more objects not being\n initialized to a numeric value (e.g, one or more\n variables in an algebraic expression having the\n value None). If :const:`False`, then the function\n returns :const:`None` when an exception occurs.\n Default is True.\n\n Returns: A numeric value or None.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15value = {"value", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15value, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_14value};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15value(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_obj = 0;
+ PyObject *__pyx_v_exception = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("value (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_exception,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)Py_True);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exception);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "value") < 0)) __PYX_ERR(0, 159, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_obj = values[0];
+ __pyx_v_exception = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("value", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 159, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_14value(__pyx_self, __pyx_v_obj, __pyx_v_exception);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_14value(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_exception) {
+ PyObject *__pyx_v_numeric = NULL;
+ PyObject *__pyx_v_tmp = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ PyObject *__pyx_t_19 = NULL;
+ int __pyx_t_20;
+ __Pyx_RefNannySetupContext("value", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":181
+ * Returns: A numeric value or None.
+ * """
+ * if obj.__class__ in native_types: # <<<<<<<<<<<<<<
+ * return obj
+ * try:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 181, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/numvalue.pyx":182
+ * """
+ * if obj.__class__ in native_types:
+ * return obj # <<<<<<<<<<<<<<
+ * try:
+ * numeric = obj.as_numeric()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_obj);
+ __pyx_r = __pyx_v_obj;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":181
+ * Returns: A numeric value or None.
+ * """
+ * if obj.__class__ in native_types: # <<<<<<<<<<<<<<
+ * return obj
+ * try:
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":183
+ * if obj.__class__ in native_types:
+ * return obj
+ * try: # <<<<<<<<<<<<<<
+ * numeric = obj.as_numeric()
+ * except AttributeError:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/numvalue.pyx":184
+ * return obj
+ * try:
+ * numeric = obj.as_numeric() # <<<<<<<<<<<<<<
+ * except AttributeError:
+ * try:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_as_numeric); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 184, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L4_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L4_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_numeric = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":183
+ * if obj.__class__ in native_types:
+ * return obj
+ * try: # <<<<<<<<<<<<<<
+ * numeric = obj.as_numeric()
+ * except AttributeError:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L9_try_end;
+ __pyx_L4_error:;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":185
+ * try:
+ * numeric = obj.as_numeric()
+ * except AttributeError: # <<<<<<<<<<<<<<
+ * try:
+ * numeric = as_numeric(obj)
+ */
+ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
+ if (__pyx_t_9) {
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_8) < 0) __PYX_ERR(0, 185, __pyx_L6_except_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_8);
+
+ /* "pyomo/core/expr/numvalue.pyx":186
+ * numeric = obj.as_numeric()
+ * except AttributeError:
+ * try: # <<<<<<<<<<<<<<
+ * numeric = as_numeric(obj)
+ * except ValueError:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_10, &__pyx_t_11, &__pyx_t_12);
+ __Pyx_XGOTREF(__pyx_t_10);
+ __Pyx_XGOTREF(__pyx_t_11);
+ __Pyx_XGOTREF(__pyx_t_12);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/numvalue.pyx":187
+ * except AttributeError:
+ * try:
+ * numeric = as_numeric(obj) # <<<<<<<<<<<<<<
+ * except ValueError:
+ * if isinstance( obj, string_types + (text_type, binary_type) ):
+ */
+ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_as_numeric); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 187, __pyx_L12_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_15 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
+ __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_14);
+ if (likely(__pyx_t_15)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
+ __Pyx_INCREF(__pyx_t_15);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_14, function);
+ }
+ }
+ if (!__pyx_t_15) {
+ __pyx_t_13 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_obj); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 187, __pyx_L12_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_obj};
+ __pyx_t_13 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 187, __pyx_L12_error)
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_obj};
+ __pyx_t_13 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 187, __pyx_L12_error)
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_GOTREF(__pyx_t_13);
+ } else
+ #endif
+ {
+ __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 187, __pyx_L12_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL;
+ __Pyx_INCREF(__pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_v_obj);
+ __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_16, NULL); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 187, __pyx_L12_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_numeric, __pyx_t_13);
+ __pyx_t_13 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":186
+ * numeric = obj.as_numeric()
+ * except AttributeError:
+ * try: # <<<<<<<<<<<<<<
+ * numeric = as_numeric(obj)
+ * except ValueError:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ goto __pyx_L19_try_end;
+ __pyx_L12_error:;
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":188
+ * try:
+ * numeric = as_numeric(obj)
+ * except ValueError: # <<<<<<<<<<<<<<
+ * if isinstance( obj, string_types + (text_type, binary_type) ):
+ * native_types.add(type(obj))
+ */
+ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_ValueError);
+ if (__pyx_t_9) {
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_13, &__pyx_t_14, &__pyx_t_16) < 0) __PYX_ERR(0, 188, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GOTREF(__pyx_t_16);
+
+ /* "pyomo/core/expr/numvalue.pyx":189
+ * numeric = as_numeric(obj)
+ * except ValueError:
+ * if isinstance( obj, string_types + (text_type, binary_type) ): # <<<<<<<<<<<<<<
+ * native_types.add(type(obj))
+ * return obj
+ */
+ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_string_types); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 189, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_17 = __Pyx_GetModuleGlobalName(__pyx_n_s_text_type); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 189, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_binary_type); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 189, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_18);
+ __pyx_t_19 = PyTuple_New(2); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 189, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_19);
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_19, 0, __pyx_t_17);
+ __Pyx_GIVEREF(__pyx_t_18);
+ PyTuple_SET_ITEM(__pyx_t_19, 1, __pyx_t_18);
+ __pyx_t_17 = 0;
+ __pyx_t_18 = 0;
+ __pyx_t_18 = PyNumber_Add(__pyx_t_15, __pyx_t_19); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 189, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_18);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __pyx_t_4 = PyObject_IsInstance(__pyx_v_obj, __pyx_t_18); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 189, __pyx_L14_except_error)
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/numvalue.pyx":190
+ * except ValueError:
+ * if isinstance( obj, string_types + (text_type, binary_type) ):
+ * native_types.add(type(obj)) # <<<<<<<<<<<<<<
+ * return obj
+ * raise
+ */
+ __pyx_t_19 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 190, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_19);
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_19, __pyx_n_s_add); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 190, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __pyx_t_19 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
+ __pyx_t_19 = PyMethod_GET_SELF(__pyx_t_15);
+ if (likely(__pyx_t_19)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+ __Pyx_INCREF(__pyx_t_19);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_15, function);
+ }
+ }
+ if (!__pyx_t_19) {
+ __pyx_t_18 = __Pyx_PyObject_CallOneArg(__pyx_t_15, ((PyObject *)Py_TYPE(__pyx_v_obj))); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 190, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_18);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_15)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_19, ((PyObject *)Py_TYPE(__pyx_v_obj))};
+ __pyx_t_18 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 190, __pyx_L14_except_error)
+ __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_GOTREF(__pyx_t_18);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_19, ((PyObject *)Py_TYPE(__pyx_v_obj))};
+ __pyx_t_18 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 190, __pyx_L14_except_error)
+ __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_GOTREF(__pyx_t_18);
+ } else
+ #endif
+ {
+ __pyx_t_17 = PyTuple_New(1+1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 190, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __Pyx_GIVEREF(__pyx_t_19); PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_19); __pyx_t_19 = NULL;
+ __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_obj)));
+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_obj)));
+ PyTuple_SET_ITEM(__pyx_t_17, 0+1, ((PyObject *)Py_TYPE(__pyx_v_obj)));
+ __pyx_t_18 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_17, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 190, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_18);
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":191
+ * if isinstance( obj, string_types + (text_type, binary_type) ):
+ * native_types.add(type(obj))
+ * return obj # <<<<<<<<<<<<<<
+ * raise
+ * try:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_obj);
+ __pyx_r = __pyx_v_obj;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ goto __pyx_L15_except_return;
+
+ /* "pyomo/core/expr/numvalue.pyx":189
+ * numeric = as_numeric(obj)
+ * except ValueError:
+ * if isinstance( obj, string_types + (text_type, binary_type) ): # <<<<<<<<<<<<<<
+ * native_types.add(type(obj))
+ * return obj
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":192
+ * native_types.add(type(obj))
+ * return obj
+ * raise # <<<<<<<<<<<<<<
+ * try:
+ * tmp = numeric(exception=exception)
+ */
+ __Pyx_GIVEREF(__pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_16);
+ __Pyx_ErrRestoreWithState(__pyx_t_13, __pyx_t_14, __pyx_t_16);
+ __pyx_t_13 = 0; __pyx_t_14 = 0; __pyx_t_16 = 0;
+ __PYX_ERR(0, 192, __pyx_L14_except_error)
+ }
+ goto __pyx_L14_except_error;
+ __pyx_L14_except_error:;
+
+ /* "pyomo/core/expr/numvalue.pyx":186
+ * numeric = obj.as_numeric()
+ * except AttributeError:
+ * try: # <<<<<<<<<<<<<<
+ * numeric = as_numeric(obj)
+ * except ValueError:
+ */
+ __Pyx_XGIVEREF(__pyx_t_10);
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+ goto __pyx_L6_except_error;
+ __pyx_L15_except_return:;
+ __Pyx_XGIVEREF(__pyx_t_10);
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_ExceptionReset(__pyx_t_10, __pyx_t_11, __pyx_t_12);
+ goto __pyx_L7_except_return;
+ __pyx_L19_try_end:;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ goto __pyx_L5_exception_handled;
+ }
+ goto __pyx_L6_except_error;
+ __pyx_L6_except_error:;
+
+ /* "pyomo/core/expr/numvalue.pyx":183
+ * if obj.__class__ in native_types:
+ * return obj
+ * try: # <<<<<<<<<<<<<<
+ * numeric = obj.as_numeric()
+ * except AttributeError:
+ */
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L1_error;
+ __pyx_L7_except_return:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L0;
+ __pyx_L5_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ __pyx_L9_try_end:;
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":193
+ * return obj
+ * raise
+ * try: # <<<<<<<<<<<<<<
+ * tmp = numeric(exception=exception)
+ * except:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_5);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/numvalue.pyx":194
+ * raise
+ * try:
+ * tmp = numeric(exception=exception) # <<<<<<<<<<<<<<
+ * except:
+ * if exception:
+ */
+ __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 194, __pyx_L23_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_exception, __pyx_v_exception) < 0) __PYX_ERR(0, 194, __pyx_L23_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_v_numeric, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 194, __pyx_L23_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_v_tmp = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":193
+ * return obj
+ * raise
+ * try: # <<<<<<<<<<<<<<
+ * tmp = numeric(exception=exception)
+ * except:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L28_try_end;
+ __pyx_L23_error:;
+ __Pyx_XDECREF(__pyx_t_19); __pyx_t_19 = 0;
+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_XDECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":195
+ * try:
+ * tmp = numeric(exception=exception)
+ * except: # <<<<<<<<<<<<<<
+ * if exception:
+ * logger.error(
+ */
+ /*except:*/ {
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_8, &__pyx_t_2) < 0) __PYX_ERR(0, 195, __pyx_L25_except_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GOTREF(__pyx_t_2);
+
+ /* "pyomo/core/expr/numvalue.pyx":196
+ * tmp = numeric(exception=exception)
+ * except:
+ * if exception: # <<<<<<<<<<<<<<
+ * logger.error(
+ * "evaluating object as numeric value: %s\n (object: %s)\n%s"
+ */
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_exception); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 196, __pyx_L25_except_error)
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/numvalue.pyx":197
+ * except:
+ * if exception:
+ * logger.error( # <<<<<<<<<<<<<<
+ * "evaluating object as numeric value: %s\n (object: %s)\n%s"
+ * % (obj, type(obj), sys.exc_info()[1]))
+ */
+ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 197, __pyx_L25_except_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_13 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_error); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 197, __pyx_L25_except_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":199
+ * logger.error(
+ * "evaluating object as numeric value: %s\n (object: %s)\n%s"
+ * % (obj, type(obj), sys.exc_info()[1])) # <<<<<<<<<<<<<<
+ * raise
+ * else:
+ */
+ __pyx_t_18 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 199, __pyx_L25_except_error)
+ __Pyx_GOTREF(__pyx_t_18);
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_18, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 199, __pyx_L25_except_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __pyx_t_18 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
+ __pyx_t_18 = PyMethod_GET_SELF(__pyx_t_15);
+ if (likely(__pyx_t_18)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+ __Pyx_INCREF(__pyx_t_18);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_15, function);
+ }
+ }
+ if (__pyx_t_18) {
+ __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_18); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 199, __pyx_L25_except_error)
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ } else {
+ __pyx_t_14 = __Pyx_PyObject_CallNoArg(__pyx_t_15); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 199, __pyx_L25_except_error)
+ }
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_14, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 199, __pyx_L25_except_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __pyx_t_14 = PyTuple_New(3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 199, __pyx_L25_except_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_INCREF(__pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_v_obj);
+ __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_obj)));
+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_obj)));
+ PyTuple_SET_ITEM(__pyx_t_14, 1, ((PyObject *)Py_TYPE(__pyx_v_obj)));
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_14, 2, __pyx_t_15);
+ __pyx_t_15 = 0;
+ __pyx_t_15 = __Pyx_PyString_Format(__pyx_kp_s_evaluating_object_as_numeric_val, __pyx_t_14); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 199, __pyx_L25_except_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __pyx_t_14 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_13))) {
+ __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_13);
+ if (likely(__pyx_t_14)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_13);
+ __Pyx_INCREF(__pyx_t_14);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_13, function);
+ }
+ }
+ if (!__pyx_t_14) {
+ __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_t_13, __pyx_t_15); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 197, __pyx_L25_except_error)
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_GOTREF(__pyx_t_16);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_13)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_15};
+ __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 197, __pyx_L25_except_error)
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_13)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_t_15};
+ __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_13, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 197, __pyx_L25_except_error)
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_18 = PyTuple_New(1+1); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 197, __pyx_L25_except_error)
+ __Pyx_GOTREF(__pyx_t_18);
+ __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_18, 0, __pyx_t_14); __pyx_t_14 = NULL;
+ __Pyx_GIVEREF(__pyx_t_15);
+ PyTuple_SET_ITEM(__pyx_t_18, 0+1, __pyx_t_15);
+ __pyx_t_15 = 0;
+ __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_13, __pyx_t_18, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 197, __pyx_L25_except_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":200
+ * "evaluating object as numeric value: %s\n (object: %s)\n%s"
+ * % (obj, type(obj), sys.exc_info()[1]))
+ * raise # <<<<<<<<<<<<<<
+ * else:
+ * return None
+ */
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_8);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_8, __pyx_t_2);
+ __pyx_t_1 = 0; __pyx_t_8 = 0; __pyx_t_2 = 0;
+ __PYX_ERR(0, 200, __pyx_L25_except_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":196
+ * tmp = numeric(exception=exception)
+ * except:
+ * if exception: # <<<<<<<<<<<<<<
+ * logger.error(
+ * "evaluating object as numeric value: %s\n (object: %s)\n%s"
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":202
+ * raise
+ * else:
+ * return None # <<<<<<<<<<<<<<
+ *
+ * if exception and (tmp is None):
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ goto __pyx_L26_except_return;
+ }
+ }
+ __pyx_L25_except_error:;
+
+ /* "pyomo/core/expr/numvalue.pyx":193
+ * return obj
+ * raise
+ * try: # <<<<<<<<<<<<<<
+ * tmp = numeric(exception=exception)
+ * except:
+ */
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
+ goto __pyx_L1_error;
+ __pyx_L26_except_return:;
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
+ goto __pyx_L0;
+ __pyx_L28_try_end:;
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":204
+ * return None
+ *
+ * if exception and (tmp is None): # <<<<<<<<<<<<<<
+ * raise ValueError("No value for uninitialized NumericValue object %s"
+ * % (obj.name,))
+ */
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_exception); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 204, __pyx_L1_error)
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __pyx_t_4;
+ goto __pyx_L33_bool_binop_done;
+ }
+ __pyx_t_4 = (__pyx_v_tmp == Py_None);
+ __pyx_t_20 = (__pyx_t_4 != 0);
+ __pyx_t_3 = __pyx_t_20;
+ __pyx_L33_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/numvalue.pyx":206
+ * if exception and (tmp is None):
+ * raise ValueError("No value for uninitialized NumericValue object %s"
+ * % (obj.name,)) # <<<<<<<<<<<<<<
+ * return tmp
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 206, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_No_value_for_uninitialized_Numer, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 206, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":205
+ *
+ * if exception and (tmp is None):
+ * raise ValueError("No value for uninitialized NumericValue object %s" # <<<<<<<<<<<<<<
+ * % (obj.name,))
+ * return tmp
+ */
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_Raise(__pyx_t_2, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __PYX_ERR(0, 205, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":204
+ * return None
+ *
+ * if exception and (tmp is None): # <<<<<<<<<<<<<<
+ * raise ValueError("No value for uninitialized NumericValue object %s"
+ * % (obj.name,))
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":207
+ * raise ValueError("No value for uninitialized NumericValue object %s"
+ * % (obj.name,))
+ * return tmp # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_tmp);
+ __pyx_r = __pyx_v_tmp;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":159
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ * def value(obj, exception=True): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns the value of a Pyomo object or
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_XDECREF(__pyx_t_19);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_numeric);
+ __Pyx_XDECREF(__pyx_v_tmp);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":210
+ *
+ *
+ * def is_constant(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean that indicates
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_17is_constant(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_16is_constant[] = "\n A utility function that returns a boolean that indicates\n whether the object is a constant.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_17is_constant = {"is_constant", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_17is_constant, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_16is_constant};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_17is_constant(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_16is_constant(__pyx_self, ((PyObject *)__pyx_v_obj));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_16is_constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ __Pyx_RefNannySetupContext("is_constant", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":224
+ * # in native_types and not in native_numeric_types.
+ * #
+ * if obj.__class__ in native_types: # <<<<<<<<<<<<<<
+ * return True
+ * try:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 224, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 224, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/numvalue.pyx":225
+ * #
+ * if obj.__class__ in native_types:
+ * return True # <<<<<<<<<<<<<<
+ * try:
+ * return obj.is_constant()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":224
+ * # in native_types and not in native_numeric_types.
+ * #
+ * if obj.__class__ in native_types: # <<<<<<<<<<<<<<
+ * return True
+ * try:
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":226
+ * if obj.__class__ in native_types:
+ * return True
+ * try: # <<<<<<<<<<<<<<
+ * return obj.is_constant()
+ * except AttributeError:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/numvalue.pyx":227
+ * return True
+ * try:
+ * return obj.is_constant() # <<<<<<<<<<<<<<
+ * except AttributeError:
+ * pass
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 227, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L4_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L4_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L8_try_return;
+
+ /* "pyomo/core/expr/numvalue.pyx":226
+ * if obj.__class__ in native_types:
+ * return True
+ * try: # <<<<<<<<<<<<<<
+ * return obj.is_constant()
+ * except AttributeError:
+ */
+ }
+ __pyx_L4_error:;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":228
+ * try:
+ * return obj.is_constant()
+ * except AttributeError: # <<<<<<<<<<<<<<
+ * pass
+ * return as_numeric(obj).is_constant()
+ */
+ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
+ if (__pyx_t_9) {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L5_exception_handled;
+ }
+ goto __pyx_L6_except_error;
+ __pyx_L6_except_error:;
+
+ /* "pyomo/core/expr/numvalue.pyx":226
+ * if obj.__class__ in native_types:
+ * return True
+ * try: # <<<<<<<<<<<<<<
+ * return obj.is_constant()
+ * except AttributeError:
+ */
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L1_error;
+ __pyx_L8_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L0;
+ __pyx_L5_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":230
+ * except AttributeError:
+ * pass
+ * return as_numeric(obj).is_constant() # <<<<<<<<<<<<<<
+ *
+ * def is_fixed(obj):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_as_numeric); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 230, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_obj};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_obj};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 230, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_INCREF(__pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_obj);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 230, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 230, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 230, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":210
+ *
+ *
+ * def is_constant(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean that indicates
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.is_constant", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":232
+ * return as_numeric(obj).is_constant()
+ *
+ * def is_fixed(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean that indicates
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_19is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_18is_fixed[] = "\n A utility function that returns a boolean that indicates\n whether the input object's value is fixed.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_19is_fixed = {"is_fixed", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_19is_fixed, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_18is_fixed};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_19is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_fixed (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_18is_fixed(__pyx_self, ((PyObject *)__pyx_v_obj));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_18is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ __Pyx_RefNannySetupContext("is_fixed", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":241
+ * # in native_types and not in native_numeric_types.
+ * #
+ * if obj.__class__ in native_types: # <<<<<<<<<<<<<<
+ * return True
+ * try:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/numvalue.pyx":242
+ * #
+ * if obj.__class__ in native_types:
+ * return True # <<<<<<<<<<<<<<
+ * try:
+ * return obj.is_fixed()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":241
+ * # in native_types and not in native_numeric_types.
+ * #
+ * if obj.__class__ in native_types: # <<<<<<<<<<<<<<
+ * return True
+ * try:
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":243
+ * if obj.__class__ in native_types:
+ * return True
+ * try: # <<<<<<<<<<<<<<
+ * return obj.is_fixed()
+ * except AttributeError:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/numvalue.pyx":244
+ * return True
+ * try:
+ * return obj.is_fixed() # <<<<<<<<<<<<<<
+ * except AttributeError:
+ * pass
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_is_fixed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L4_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L4_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L8_try_return;
+
+ /* "pyomo/core/expr/numvalue.pyx":243
+ * if obj.__class__ in native_types:
+ * return True
+ * try: # <<<<<<<<<<<<<<
+ * return obj.is_fixed()
+ * except AttributeError:
+ */
+ }
+ __pyx_L4_error:;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":245
+ * try:
+ * return obj.is_fixed()
+ * except AttributeError: # <<<<<<<<<<<<<<
+ * pass
+ * return as_numeric(obj).is_fixed()
+ */
+ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
+ if (__pyx_t_9) {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L5_exception_handled;
+ }
+ goto __pyx_L6_except_error;
+ __pyx_L6_except_error:;
+
+ /* "pyomo/core/expr/numvalue.pyx":243
+ * if obj.__class__ in native_types:
+ * return True
+ * try: # <<<<<<<<<<<<<<
+ * return obj.is_fixed()
+ * except AttributeError:
+ */
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L1_error;
+ __pyx_L8_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L0;
+ __pyx_L5_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":247
+ * except AttributeError:
+ * pass
+ * return as_numeric(obj).is_fixed() # <<<<<<<<<<<<<<
+ *
+ * def is_variable_type(obj):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_as_numeric); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 247, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_obj};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_obj};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 247, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_INCREF(__pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_obj);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 247, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_is_fixed); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 247, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 247, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":232
+ * return as_numeric(obj).is_constant()
+ *
+ * def is_fixed(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean that indicates
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.is_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":249
+ * return as_numeric(obj).is_fixed()
+ *
+ * def is_variable_type(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean indicating
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_21is_variable_type(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_20is_variable_type[] = "\n A utility function that returns a boolean indicating\n whether the input object is a variable.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_21is_variable_type = {"is_variable_type", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_21is_variable_type, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_20is_variable_type};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_21is_variable_type(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_variable_type (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_20is_variable_type(__pyx_self, ((PyObject *)__pyx_v_obj));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_20is_variable_type(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ __Pyx_RefNannySetupContext("is_variable_type", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":254
+ * whether the input object is a variable.
+ * """
+ * if obj.__class__ in native_types: # <<<<<<<<<<<<<<
+ * return False
+ * try:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 254, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 254, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/numvalue.pyx":255
+ * """
+ * if obj.__class__ in native_types:
+ * return False # <<<<<<<<<<<<<<
+ * try:
+ * return obj.is_variable_type()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":254
+ * whether the input object is a variable.
+ * """
+ * if obj.__class__ in native_types: # <<<<<<<<<<<<<<
+ * return False
+ * try:
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":256
+ * if obj.__class__ in native_types:
+ * return False
+ * try: # <<<<<<<<<<<<<<
+ * return obj.is_variable_type()
+ * except AttributeError:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/numvalue.pyx":257
+ * return False
+ * try:
+ * return obj.is_variable_type() # <<<<<<<<<<<<<<
+ * except AttributeError:
+ * pass
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_is_variable_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 257, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L4_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L4_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L8_try_return;
+
+ /* "pyomo/core/expr/numvalue.pyx":256
+ * if obj.__class__ in native_types:
+ * return False
+ * try: # <<<<<<<<<<<<<<
+ * return obj.is_variable_type()
+ * except AttributeError:
+ */
+ }
+ __pyx_L4_error:;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":258
+ * try:
+ * return obj.is_variable_type()
+ * except AttributeError: # <<<<<<<<<<<<<<
+ * pass
+ * return as_numeric(obj).is_variable_type()
+ */
+ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
+ if (__pyx_t_9) {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L5_exception_handled;
+ }
+ goto __pyx_L6_except_error;
+ __pyx_L6_except_error:;
+
+ /* "pyomo/core/expr/numvalue.pyx":256
+ * if obj.__class__ in native_types:
+ * return False
+ * try: # <<<<<<<<<<<<<<
+ * return obj.is_variable_type()
+ * except AttributeError:
+ */
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L1_error;
+ __pyx_L8_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L0;
+ __pyx_L5_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":260
+ * except AttributeError:
+ * pass
+ * return as_numeric(obj).is_variable_type() # <<<<<<<<<<<<<<
+ *
+ * def potentially_variable(obj):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_as_numeric); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_obj};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_obj};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_INCREF(__pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_obj);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_is_variable_type); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 260, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 260, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":249
+ * return as_numeric(obj).is_fixed()
+ *
+ * def is_variable_type(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean indicating
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.is_variable_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":262
+ * return as_numeric(obj).is_variable_type()
+ *
+ * def potentially_variable(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean indicating
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_23potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_22potentially_variable[] = "\n A utility function that returns a boolean indicating\n whether the input object can reference variables.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_23potentially_variable = {"potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_23potentially_variable, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_22potentially_variable};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_23potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_22potentially_variable(__pyx_self, ((PyObject *)__pyx_v_obj));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_22potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ __Pyx_RefNannySetupContext("potentially_variable", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":267
+ * whether the input object can reference variables.
+ * """
+ * if obj.__class__ in native_types: # <<<<<<<<<<<<<<
+ * return False
+ * try:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 267, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 267, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/numvalue.pyx":268
+ * """
+ * if obj.__class__ in native_types:
+ * return False # <<<<<<<<<<<<<<
+ * try:
+ * return obj.is_potentially_variable()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":267
+ * whether the input object can reference variables.
+ * """
+ * if obj.__class__ in native_types: # <<<<<<<<<<<<<<
+ * return False
+ * try:
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":269
+ * if obj.__class__ in native_types:
+ * return False
+ * try: # <<<<<<<<<<<<<<
+ * return obj.is_potentially_variable()
+ * except AttributeError:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/numvalue.pyx":270
+ * return False
+ * try:
+ * return obj.is_potentially_variable() # <<<<<<<<<<<<<<
+ * except AttributeError:
+ * pass
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 270, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L4_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 270, __pyx_L4_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L8_try_return;
+
+ /* "pyomo/core/expr/numvalue.pyx":269
+ * if obj.__class__ in native_types:
+ * return False
+ * try: # <<<<<<<<<<<<<<
+ * return obj.is_potentially_variable()
+ * except AttributeError:
+ */
+ }
+ __pyx_L4_error:;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":271
+ * try:
+ * return obj.is_potentially_variable()
+ * except AttributeError: # <<<<<<<<<<<<<<
+ * pass
+ * return as_numeric(obj).is_potentially_variable()
+ */
+ __pyx_t_9 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
+ if (__pyx_t_9) {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L5_exception_handled;
+ }
+ goto __pyx_L6_except_error;
+ __pyx_L6_except_error:;
+
+ /* "pyomo/core/expr/numvalue.pyx":269
+ * if obj.__class__ in native_types:
+ * return False
+ * try: # <<<<<<<<<<<<<<
+ * return obj.is_potentially_variable()
+ * except AttributeError:
+ */
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L1_error;
+ __pyx_L8_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L0;
+ __pyx_L5_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":273
+ * except AttributeError:
+ * pass
+ * return as_numeric(obj).is_potentially_variable() # <<<<<<<<<<<<<<
+ *
+ * # It is very common to have only a few constants in a model, but those
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_as_numeric); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_obj};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_obj};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_INCREF(__pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_v_obj);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 273, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":262
+ * return as_numeric(obj).is_variable_type()
+ *
+ * def potentially_variable(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean indicating
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.potentially_variable", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":280
+ * KnownConstants = {}
+ *
+ * def update_KnownConstants(obj, val): # <<<<<<<<<<<<<<
+ * if len(KnownConstants) < 100:
+ * KnownConstants[obj] = val
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_25update_KnownConstants(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_25update_KnownConstants = {"update_KnownConstants", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_25update_KnownConstants, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_25update_KnownConstants(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_obj = 0;
+ PyObject *__pyx_v_val = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("update_KnownConstants (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_obj,&__pyx_n_s_val,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_obj)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_val)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("update_KnownConstants", 1, 2, 2, 1); __PYX_ERR(0, 280, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "update_KnownConstants") < 0)) __PYX_ERR(0, 280, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_obj = values[0];
+ __pyx_v_val = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("update_KnownConstants", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 280, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.update_KnownConstants", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_24update_KnownConstants(__pyx_self, __pyx_v_obj, __pyx_v_val);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_24update_KnownConstants(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj, PyObject *__pyx_v_val) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ int __pyx_t_3;
+ __Pyx_RefNannySetupContext("update_KnownConstants", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":281
+ *
+ * def update_KnownConstants(obj, val):
+ * if len(KnownConstants) < 100: # <<<<<<<<<<<<<<
+ * KnownConstants[obj] = val
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_KnownConstants); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 281, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((__pyx_t_2 < 0x64) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/numvalue.pyx":282
+ * def update_KnownConstants(obj, val):
+ * if len(KnownConstants) < 100:
+ * KnownConstants[obj] = val # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_KnownConstants); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_obj, __pyx_v_val) < 0)) __PYX_ERR(0, 282, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":281
+ *
+ * def update_KnownConstants(obj, val):
+ * if len(KnownConstants) < 100: # <<<<<<<<<<<<<<
+ * KnownConstants[obj] = val
+ *
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":280
+ * KnownConstants = {}
+ *
+ * def update_KnownConstants(obj, val): # <<<<<<<<<<<<<<
+ * if len(KnownConstants) < 100:
+ * KnownConstants[obj] = val
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.update_KnownConstants", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":285
+ *
+ *
+ * def as_numeric(obj): # <<<<<<<<<<<<<<
+ * """
+ * Verify that this obj is a NumericValue or intrinsic value.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_27as_numeric(PyObject *__pyx_self, PyObject *__pyx_v_obj); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_26as_numeric[] = "\n Verify that this obj is a NumericValue or intrinsic value.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_27as_numeric = {"as_numeric", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_27as_numeric, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_26as_numeric};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_27as_numeric(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("as_numeric (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_26as_numeric(__pyx_self, ((PyObject *)__pyx_v_obj));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_26as_numeric(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_obj) {
+ PyObject *__pyx_v_tmp = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ __Pyx_RefNannySetupContext("as_numeric", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":290
+ * """
+ * # int and float are *so* common that it pays to treat them specially
+ * if obj.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if obj in KnownConstants:
+ * return KnownConstants[obj]
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 290, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 290, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 290, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/numvalue.pyx":291
+ * # int and float are *so* common that it pays to treat them specially
+ * if obj.__class__ in native_numeric_types:
+ * if obj in KnownConstants: # <<<<<<<<<<<<<<
+ * return KnownConstants[obj]
+ * else:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KnownConstants); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 291, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_obj, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 291, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/numvalue.pyx":292
+ * if obj.__class__ in native_numeric_types:
+ * if obj in KnownConstants:
+ * return KnownConstants[obj] # <<<<<<<<<<<<<<
+ * else:
+ * # Because INT, FLOAT, and sometimes LONG hash the same, we
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_KnownConstants); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 292, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 292, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":291
+ * # int and float are *so* common that it pays to treat them specially
+ * if obj.__class__ in native_numeric_types:
+ * if obj in KnownConstants: # <<<<<<<<<<<<<<
+ * return KnownConstants[obj]
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":298
+ * # so that the order in which tests run does not change the
+ * # results!)
+ * try: # <<<<<<<<<<<<<<
+ * tmp = float(obj)
+ * if tmp == obj:
+ */
+ /*else*/ {
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/numvalue.pyx":299
+ * # results!)
+ * try:
+ * tmp = float(obj) # <<<<<<<<<<<<<<
+ * if tmp == obj:
+ * tmp = NumericConstant(tmp)
+ */
+ __pyx_t_1 = __Pyx_PyNumber_Float(__pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 299, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_tmp = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":300
+ * try:
+ * tmp = float(obj)
+ * if tmp == obj: # <<<<<<<<<<<<<<
+ * tmp = NumericConstant(tmp)
+ * update_KnownConstants(obj, tmp)
+ */
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_tmp, __pyx_v_obj, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 300, __pyx_L5_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 300, __pyx_L5_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/numvalue.pyx":301
+ * tmp = float(obj)
+ * if tmp == obj:
+ * tmp = NumericConstant(tmp) # <<<<<<<<<<<<<<
+ * update_KnownConstants(obj, tmp)
+ * return tmp
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NumericConstant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_tmp); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_tmp};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L5_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_tmp};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L5_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 301, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_INCREF(__pyx_v_tmp);
+ __Pyx_GIVEREF(__pyx_v_tmp);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_tmp);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_tmp, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":302
+ * if tmp == obj:
+ * tmp = NumericConstant(tmp)
+ * update_KnownConstants(obj, tmp) # <<<<<<<<<<<<<<
+ * return tmp
+ * except:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_update_KnownConstants); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 302, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_obj, __pyx_v_tmp};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L5_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_obj, __pyx_v_tmp};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L5_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 302, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_10, __pyx_v_obj);
+ __Pyx_INCREF(__pyx_v_tmp);
+ __Pyx_GIVEREF(__pyx_v_tmp);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_v_tmp);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 302, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":303
+ * tmp = NumericConstant(tmp)
+ * update_KnownConstants(obj, tmp)
+ * return tmp # <<<<<<<<<<<<<<
+ * except:
+ * pass
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_tmp);
+ __pyx_r = __pyx_v_tmp;
+ goto __pyx_L9_try_return;
+
+ /* "pyomo/core/expr/numvalue.pyx":300
+ * try:
+ * tmp = float(obj)
+ * if tmp == obj: # <<<<<<<<<<<<<<
+ * tmp = NumericConstant(tmp)
+ * update_KnownConstants(obj, tmp)
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":298
+ * # so that the order in which tests run does not change the
+ * # results!)
+ * try: # <<<<<<<<<<<<<<
+ * tmp = float(obj)
+ * if tmp == obj:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L10_try_end;
+ __pyx_L5_error:;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":304
+ * update_KnownConstants(obj, tmp)
+ * return tmp
+ * except: # <<<<<<<<<<<<<<
+ * pass
+ *
+ */
+ /*except:*/ {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L6_exception_handled;
+ }
+ __pyx_L9_try_return:;
+
+ /* "pyomo/core/expr/numvalue.pyx":298
+ * # so that the order in which tests run does not change the
+ * # results!)
+ * try: # <<<<<<<<<<<<<<
+ * tmp = float(obj)
+ * if tmp == obj:
+ */
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L0;
+ __pyx_L6_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ __pyx_L10_try_end:;
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":307
+ * pass
+ *
+ * tmp = NumericConstant(obj) # <<<<<<<<<<<<<<
+ * update_KnownConstants(obj, tmp)
+ * return tmp
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NumericConstant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_obj};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_v_obj};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_INCREF(__pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_obj);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 307, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_tmp, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":308
+ *
+ * tmp = NumericConstant(obj)
+ * update_KnownConstants(obj, tmp) # <<<<<<<<<<<<<<
+ * return tmp
+ * try:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_update_KnownConstants); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_obj, __pyx_v_tmp};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_obj, __pyx_v_tmp};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_10, __pyx_v_obj);
+ __Pyx_INCREF(__pyx_v_tmp);
+ __Pyx_GIVEREF(__pyx_v_tmp);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_10, __pyx_v_tmp);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":309
+ * tmp = NumericConstant(obj)
+ * update_KnownConstants(obj, tmp)
+ * return tmp # <<<<<<<<<<<<<<
+ * try:
+ * return obj.as_numeric()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_tmp);
+ __pyx_r = __pyx_v_tmp;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":290
+ * """
+ * # int and float are *so* common that it pays to treat them specially
+ * if obj.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if obj in KnownConstants:
+ * return KnownConstants[obj]
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":310
+ * update_KnownConstants(obj, tmp)
+ * return tmp
+ * try: # <<<<<<<<<<<<<<
+ * return obj.as_numeric()
+ * except AttributeError:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_7, &__pyx_t_6, &__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_5);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/numvalue.pyx":311
+ * return tmp
+ * try:
+ * return obj.as_numeric() # <<<<<<<<<<<<<<
+ * except AttributeError:
+ * pass
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_as_numeric); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 311, __pyx_L12_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L12_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 311, __pyx_L12_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L16_try_return;
+
+ /* "pyomo/core/expr/numvalue.pyx":310
+ * update_KnownConstants(obj, tmp)
+ * return tmp
+ * try: # <<<<<<<<<<<<<<
+ * return obj.as_numeric()
+ * except AttributeError:
+ */
+ }
+ __pyx_L12_error:;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":312
+ * try:
+ * return obj.as_numeric()
+ * except AttributeError: # <<<<<<<<<<<<<<
+ * pass
+ * try:
+ */
+ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
+ if (__pyx_t_10) {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L13_exception_handled;
+ }
+ goto __pyx_L14_except_error;
+ __pyx_L14_except_error:;
+
+ /* "pyomo/core/expr/numvalue.pyx":310
+ * update_KnownConstants(obj, tmp)
+ * return tmp
+ * try: # <<<<<<<<<<<<<<
+ * return obj.as_numeric()
+ * except AttributeError:
+ */
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
+ goto __pyx_L1_error;
+ __pyx_L16_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
+ goto __pyx_L0;
+ __pyx_L13_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_7, __pyx_t_6, __pyx_t_5);
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":314
+ * except AttributeError:
+ * pass
+ * try: # <<<<<<<<<<<<<<
+ * if obj.__class__ is (obj + 0).__class__:
+ * # obj may (or may not) be hashable, so we need this try
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/numvalue.pyx":315
+ * pass
+ * try:
+ * if obj.__class__ is (obj + 0).__class__: # <<<<<<<<<<<<<<
+ * # obj may (or may not) be hashable, so we need this try
+ * # block so that things proceed normally for non-hashable
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L18_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_v_obj, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 315, __pyx_L18_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 315, __pyx_L18_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_1 == __pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/numvalue.pyx":319
+ * # block so that things proceed normally for non-hashable
+ * # "numeric" types
+ * try: # <<<<<<<<<<<<<<
+ * if obj in KnownConstants:
+ * return KnownConstants[obj]
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
+ __Pyx_XGOTREF(__pyx_t_11);
+ __Pyx_XGOTREF(__pyx_t_12);
+ __Pyx_XGOTREF(__pyx_t_13);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/numvalue.pyx":320
+ * # "numeric" types
+ * try:
+ * if obj in KnownConstants: # <<<<<<<<<<<<<<
+ * return KnownConstants[obj]
+ * else:
+ */
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_KnownConstants); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 320, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_obj, __pyx_t_8, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 320, __pyx_L25_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/numvalue.pyx":321
+ * try:
+ * if obj in KnownConstants:
+ * return KnownConstants[obj] # <<<<<<<<<<<<<<
+ * else:
+ * tmp = NumericConstant(obj)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_KnownConstants); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 321, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_8, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L29_try_return;
+
+ /* "pyomo/core/expr/numvalue.pyx":320
+ * # "numeric" types
+ * try:
+ * if obj in KnownConstants: # <<<<<<<<<<<<<<
+ * return KnownConstants[obj]
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":323
+ * return KnownConstants[obj]
+ * else:
+ * tmp = NumericConstant(obj) # <<<<<<<<<<<<<<
+ * update_KnownConstants(obj, tmp)
+ *
+ */
+ /*else*/ {
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_NumericConstant); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 323, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_obj); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_obj};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L25_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_obj};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L25_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 323, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_obj);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_v_tmp = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":324
+ * else:
+ * tmp = NumericConstant(obj)
+ * update_KnownConstants(obj, tmp) # <<<<<<<<<<<<<<
+ *
+ * # If we get here, this is a reasonably well-behaving
+ */
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_update_KnownConstants); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 324, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_obj, __pyx_v_tmp};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L25_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_obj, __pyx_v_tmp};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L25_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 324, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_10, __pyx_v_obj);
+ __Pyx_INCREF(__pyx_v_tmp);
+ __Pyx_GIVEREF(__pyx_v_tmp);
+ PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_10, __pyx_v_tmp);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 324, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":329
+ * # numeric type: add it to the native numeric types
+ * # so that future lookups will be faster.
+ * native_numeric_types.add(obj.__class__) # <<<<<<<<<<<<<<
+ * # native numeric types are also native types
+ * native_types.add(obj.__class__)
+ */
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 329, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 329, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 329, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L25_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L25_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L25_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 329, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 329, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":331
+ * native_numeric_types.add(obj.__class__)
+ * # native numeric types are also native types
+ * native_types.add(obj.__class__) # <<<<<<<<<<<<<<
+ *
+ * return tmp
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 331, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_obj, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 331, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_14);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_14, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L25_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L25_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L25_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 331, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 331, __pyx_L25_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":333
+ * native_types.add(obj.__class__)
+ *
+ * return tmp # <<<<<<<<<<<<<<
+ * except:
+ * return NumericConstant(obj)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_tmp);
+ __pyx_r = __pyx_v_tmp;
+ goto __pyx_L29_try_return;
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":319
+ * # block so that things proceed normally for non-hashable
+ * # "numeric" types
+ * try: # <<<<<<<<<<<<<<
+ * if obj in KnownConstants:
+ * return KnownConstants[obj]
+ */
+ }
+ __pyx_L25_error:;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":334
+ *
+ * return tmp
+ * except: # <<<<<<<<<<<<<<
+ * return NumericConstant(obj)
+ * except:
+ */
+ /*except:*/ {
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.as_numeric", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_14, &__pyx_t_9) < 0) __PYX_ERR(0, 334, __pyx_L27_except_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GOTREF(__pyx_t_9);
+
+ /* "pyomo/core/expr/numvalue.pyx":335
+ * return tmp
+ * except:
+ * return NumericConstant(obj) # <<<<<<<<<<<<<<
+ * except:
+ * pass
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_NumericConstant); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 335, __pyx_L27_except_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_15 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_15)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_15);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_15) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_obj); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L27_except_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_obj};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L27_except_error)
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_15, __pyx_v_obj};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L27_except_error)
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 335, __pyx_L27_except_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_15); __pyx_t_15 = NULL;
+ __Pyx_INCREF(__pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_v_obj);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_16, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 335, __pyx_L27_except_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ goto __pyx_L28_except_return;
+ }
+ __pyx_L27_except_error:;
+
+ /* "pyomo/core/expr/numvalue.pyx":319
+ * # block so that things proceed normally for non-hashable
+ * # "numeric" types
+ * try: # <<<<<<<<<<<<<<
+ * if obj in KnownConstants:
+ * return KnownConstants[obj]
+ */
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
+ goto __pyx_L18_error;
+ __pyx_L29_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
+ goto __pyx_L22_try_return;
+ __pyx_L28_except_return:;
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
+ goto __pyx_L22_try_return;
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":315
+ * pass
+ * try:
+ * if obj.__class__ is (obj + 0).__class__: # <<<<<<<<<<<<<<
+ * # obj may (or may not) be hashable, so we need this try
+ * # block so that things proceed normally for non-hashable
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":314
+ * except AttributeError:
+ * pass
+ * try: # <<<<<<<<<<<<<<
+ * if obj.__class__ is (obj + 0).__class__:
+ * # obj may (or may not) be hashable, so we need this try
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L23_try_end;
+ __pyx_L18_error:;
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":336
+ * except:
+ * return NumericConstant(obj)
+ * except: # <<<<<<<<<<<<<<
+ * pass
+ * raise TypeError(
+ */
+ /*except:*/ {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L19_exception_handled;
+ }
+ __pyx_L22_try_return:;
+
+ /* "pyomo/core/expr/numvalue.pyx":314
+ * except AttributeError:
+ * pass
+ * try: # <<<<<<<<<<<<<<
+ * if obj.__class__ is (obj + 0).__class__:
+ * # obj may (or may not) be hashable, so we need this try
+ */
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ goto __pyx_L0;
+ __pyx_L19_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_ExceptionReset(__pyx_t_5, __pyx_t_6, __pyx_t_7);
+ __pyx_L23_try_end:;
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":340
+ * raise TypeError(
+ * "Cannot convert object of type '%s' (value = %s) to a numeric value."
+ * % (type(obj).__name__, obj, )) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_obj)), __pyx_n_s_name_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_9);
+ __Pyx_INCREF(__pyx_v_obj);
+ __Pyx_GIVEREF(__pyx_v_obj);
+ PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_v_obj);
+ __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_convert_object_of_type_s, __pyx_t_14); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 340, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":338
+ * except:
+ * pass
+ * raise TypeError( # <<<<<<<<<<<<<<
+ * "Cannot convert object of type '%s' (value = %s) to a numeric value."
+ * % (type(obj).__name__, obj, ))
+ */
+ __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 338, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_Raise(__pyx_t_9, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __PYX_ERR(0, 338, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":285
+ *
+ *
+ * def as_numeric(obj): # <<<<<<<<<<<<<<
+ * """
+ * Verify that this obj is a NumericValue or intrinsic value.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.as_numeric", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_tmp);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":353
+ * __hash__ = None
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * """
+ * Prepare a picklable state of this instance for pickling.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_1__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue___getstate__[] = "\n Prepare a picklable state of this instance for pickling.\n\n Nominally, __getstate__() should execute the following::\n\n state = super(Class, self).__getstate__()\n for i in Class.__slots__:\n state[i] = getattr(self,i)\n return state\n\n However, in this case, the (nominal) parent class is 'object',\n and object does not implement __getstate__. So, we will\n check to make sure that there is a base __getstate__() to\n call. You might think that there is nothing to check, but\n multiple inheritance could mean that another class got stuck\n between this class and \"object\" in the MRO.\n\n Further, since there are actually no slots defined here, the\n real question is to either return an empty dict or the\n parent's dict.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_1__getstate__ = {"__getstate__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_1__getstate__, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue___getstate__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_1__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue___getstate__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue___getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v__base = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("__getstate__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":375
+ * parent's dict.
+ * """
+ * _base = super(NumericValue, self) # <<<<<<<<<<<<<<
+ * if hasattr(_base, '__getstate__'):
+ * return _base.__getstate__()
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NumericValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v__base = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":376
+ * """
+ * _base = super(NumericValue, self)
+ * if hasattr(_base, '__getstate__'): # <<<<<<<<<<<<<<
+ * return _base.__getstate__()
+ * else:
+ */
+ __pyx_t_3 = __Pyx_HasAttr(__pyx_v__base, __pyx_n_s_getstate); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 376, __pyx_L1_error)
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/numvalue.pyx":377
+ * _base = super(NumericValue, self)
+ * if hasattr(_base, '__getstate__'):
+ * return _base.__getstate__() # <<<<<<<<<<<<<<
+ * else:
+ * return {}
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__base, __pyx_n_s_getstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 377, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":376
+ * """
+ * _base = super(NumericValue, self)
+ * if hasattr(_base, '__getstate__'): # <<<<<<<<<<<<<<
+ * return _base.__getstate__()
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":379
+ * return _base.__getstate__()
+ * else:
+ * return {} # <<<<<<<<<<<<<<
+ *
+ * def __setstate__(self, state):
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 379, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":353
+ * __hash__ = None
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * """
+ * Prepare a picklable state of this instance for pickling.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v__base);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":381
+ * return {}
+ *
+ * def __setstate__(self, state): # <<<<<<<<<<<<<<
+ * """
+ * Restore a pickled state into this instance
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_3__setstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_2__setstate__[] = "\n Restore a pickled state into this instance\n\n Our model for setstate is for derived classes to modify\n the state dictionary as control passes up the inheritance\n hierarchy (using super() calls). All assignment of state ->\n object attributes is handled at the last class before 'object',\n which may -- or may not (thanks to MRO) -- be here.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_3__setstate__ = {"__setstate__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_3__setstate__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_2__setstate__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_3__setstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_state = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_state,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_state)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__setstate__", 1, 2, 2, 1); __PYX_ERR(0, 381, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setstate__") < 0)) __PYX_ERR(0, 381, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_state = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__setstate__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 381, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_2__setstate__(__pyx_self, __pyx_v_self, __pyx_v_state);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_2__setstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
+ PyObject *__pyx_v__base = NULL;
+ PyObject *__pyx_v_key = NULL;
+ PyObject *__pyx_v_val = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ Py_ssize_t __pyx_t_7;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *(*__pyx_t_10)(PyObject *);
+ int __pyx_t_11;
+ __Pyx_RefNannySetupContext("__setstate__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":391
+ * which may -- or may not (thanks to MRO) -- be here.
+ * """
+ * _base = super(NumericValue, self) # <<<<<<<<<<<<<<
+ * if hasattr(_base, '__setstate__'):
+ * return _base.__setstate__(state)
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NumericValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 391, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 391, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v__base = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":392
+ * """
+ * _base = super(NumericValue, self)
+ * if hasattr(_base, '__setstate__'): # <<<<<<<<<<<<<<
+ * return _base.__setstate__(state)
+ * else:
+ */
+ __pyx_t_3 = __Pyx_HasAttr(__pyx_v__base, __pyx_n_s_setstate); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 392, __pyx_L1_error)
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/numvalue.pyx":393
+ * _base = super(NumericValue, self)
+ * if hasattr(_base, '__setstate__'):
+ * return _base.__setstate__(state) # <<<<<<<<<<<<<<
+ * else:
+ * for key, val in iteritems(state):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__base, __pyx_n_s_setstate); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 393, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_state};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_state};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 393, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_state);
+ __Pyx_GIVEREF(__pyx_v_state);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_state);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":392
+ * """
+ * _base = super(NumericValue, self)
+ * if hasattr(_base, '__setstate__'): # <<<<<<<<<<<<<<
+ * return _base.__setstate__(state)
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":395
+ * return _base.__setstate__(state)
+ * else:
+ * for key, val in iteritems(state): # <<<<<<<<<<<<<<
+ * # Note: per the Python data model docs, we explicitly
+ * # set the attribute using object.__setattr__() instead
+ */
+ /*else*/ {
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_iteritems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_state); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_state};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_state};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_v_state);
+ __Pyx_GIVEREF(__pyx_v_state);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_state);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ } else {
+ __pyx_t_7 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 395, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_8)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 395, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_7); __Pyx_INCREF(__pyx_t_1); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 395, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_8(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 395, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 395, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ #else
+ __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
+ index = 0; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ index = 1; __pyx_t_6 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 395, __pyx_L1_error)
+ __pyx_t_10 = NULL;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ goto __pyx_L7_unpacking_done;
+ __pyx_L6_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_10 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 395, __pyx_L1_error)
+ __pyx_L7_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":399
+ * # set the attribute using object.__setattr__() instead
+ * # of setting self.__dict__[key] = val.
+ * object.__setattr__(self, key, val) # <<<<<<<<<<<<<<
+ *
+ * def getname(self, fully_qualified=False, name_buffer=None):
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_builtin_object, __pyx_n_s_setattr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 399, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self, __pyx_v_key, __pyx_v_val};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_5, __pyx_v_self, __pyx_v_key, __pyx_v_val};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_11, 3+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(3+__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 399, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_11, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_key);
+ __Pyx_GIVEREF(__pyx_v_key);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_11, __pyx_v_key);
+ __Pyx_INCREF(__pyx_v_val);
+ __Pyx_GIVEREF(__pyx_v_val);
+ PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_11, __pyx_v_val);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":395
+ * return _base.__setstate__(state)
+ * else:
+ * for key, val in iteritems(state): # <<<<<<<<<<<<<<
+ * # Note: per the Python data model docs, we explicitly
+ * # set the attribute using object.__setattr__() instead
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":381
+ * return {}
+ *
+ * def __setstate__(self, state): # <<<<<<<<<<<<<<
+ * """
+ * Restore a pickled state into this instance
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v__base);
+ __Pyx_XDECREF(__pyx_v_key);
+ __Pyx_XDECREF(__pyx_v_val);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":401
+ * object.__setattr__(self, key, val)
+ *
+ * def getname(self, fully_qualified=False, name_buffer=None): # <<<<<<<<<<<<<<
+ * """
+ * If this is a component, return the component's name on the owning
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_5getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_4getname[] = "\n If this is a component, return the component's name on the owning\n block; otherwise return the value converted to a string\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_5getname = {"getname", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_5getname, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_4getname};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_5getname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_fully_qualified = 0;
+ PyObject *__pyx_v_name_buffer = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("getname (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_fully_qualified,&__pyx_n_s_name_buffer,0};
+ PyObject* values[3] = {0,0,0};
+ values[1] = ((PyObject *)((PyObject *)Py_False));
+ values[2] = ((PyObject *)((PyObject *)Py_None));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_fully_qualified);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_name_buffer);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "getname") < 0)) __PYX_ERR(0, 401, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_fully_qualified = values[1];
+ __pyx_v_name_buffer = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("getname", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 401, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_4getname(__pyx_self, __pyx_v_self, __pyx_v_fully_qualified, __pyx_v_name_buffer);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_4getname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_fully_qualified, PyObject *__pyx_v_name_buffer) {
+ PyObject *__pyx_v__base = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("getname", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":406
+ * block; otherwise return the value converted to a string
+ * """
+ * _base = super(NumericValue, self) # <<<<<<<<<<<<<<
+ * if hasattr(_base,'getname'):
+ * return _base.getname(fully_qualified, name_buffer)
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NumericValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 406, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_self);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v__base = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":407
+ * """
+ * _base = super(NumericValue, self)
+ * if hasattr(_base,'getname'): # <<<<<<<<<<<<<<
+ * return _base.getname(fully_qualified, name_buffer)
+ * else:
+ */
+ __pyx_t_3 = __Pyx_HasAttr(__pyx_v__base, __pyx_n_s_getname); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 407, __pyx_L1_error)
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/expr/numvalue.pyx":408
+ * _base = super(NumericValue, self)
+ * if hasattr(_base,'getname'):
+ * return _base.getname(fully_qualified, name_buffer) # <<<<<<<<<<<<<<
+ * else:
+ * return str(type(self))
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v__base, __pyx_n_s_getname); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 408, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_fully_qualified, __pyx_v_name_buffer};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_fully_qualified, __pyx_v_name_buffer};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 2+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 408, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_fully_qualified);
+ __Pyx_GIVEREF(__pyx_v_fully_qualified);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_v_fully_qualified);
+ __Pyx_INCREF(__pyx_v_name_buffer);
+ __Pyx_GIVEREF(__pyx_v_name_buffer);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_v_name_buffer);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":407
+ * """
+ * _base = super(NumericValue, self)
+ * if hasattr(_base,'getname'): # <<<<<<<<<<<<<<
+ * return _base.getname(fully_qualified, name_buffer)
+ * else:
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":410
+ * return _base.getname(fully_qualified, name_buffer)
+ * else:
+ * return str(type(self)) # <<<<<<<<<<<<<<
+ *
+ * @property
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_self)));
+ __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_self)));
+ PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(__pyx_v_self)));
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":401
+ * object.__setattr__(self, key, val)
+ *
+ * def getname(self, fully_qualified=False, name_buffer=None): # <<<<<<<<<<<<<<
+ * """
+ * If this is a component, return the component's name on the owning
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.getname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v__base);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":413
+ *
+ * @property
+ * def name(self): # <<<<<<<<<<<<<<
+ * return self.getname(fully_qualified=True)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_7name(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_7name = {"name", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_7name, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_7name(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("name (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_6name(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_6name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("name", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":414
+ * @property
+ * def name(self):
+ * return self.getname(fully_qualified=True) # <<<<<<<<<<<<<<
+ *
+ * @property
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 414, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 414, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fully_qualified, Py_True) < 0) __PYX_ERR(0, 414, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 414, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":413
+ *
+ * @property
+ * def name(self): # <<<<<<<<<<<<<<
+ * return self.getname(fully_qualified=True)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.name", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":417
+ *
+ * @property
+ * def local_name(self): # <<<<<<<<<<<<<<
+ * return self.getname(fully_qualified=False)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_9local_name(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_9local_name = {"local_name", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_9local_name, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_9local_name(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("local_name (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_8local_name(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_8local_name(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("local_name", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":418
+ * @property
+ * def local_name(self):
+ * return self.getname(fully_qualified=False) # <<<<<<<<<<<<<<
+ *
+ * def cname(self, *args, **kwds):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_fully_qualified, Py_False) < 0) __PYX_ERR(0, 418, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":417
+ *
+ * @property
+ * def local_name(self): # <<<<<<<<<<<<<<
+ * return self.getname(fully_qualified=False)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.local_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":420
+ * return self.getname(fully_qualified=False)
+ *
+ * def cname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * logger.warning(
+ * "DEPRECATED: The cname() method has been renamed to getname()." )
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_11cname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_11cname = {"cname", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_11cname, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_11cname(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_kwds = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("cname (wrapper)", 0);
+ __pyx_v_kwds = PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
+ __Pyx_GOTREF(__pyx_v_kwds);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kwds, values, used_pos_args, "cname") < 0)) __PYX_ERR(0, 420, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("cname", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 420, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_DECREF(__pyx_v_kwds); __pyx_v_kwds = 0;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.cname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_10cname(__pyx_self, __pyx_v_self, __pyx_v_args, __pyx_v_kwds);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwds);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_10cname(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwds) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("cname", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":421
+ *
+ * def cname(self, *args, **kwds):
+ * logger.warning( # <<<<<<<<<<<<<<
+ * "DEPRECATED: The cname() method has been renamed to getname()." )
+ * return self.getname(*args, **kwds)
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_logger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_warning); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 421, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 421, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":423
+ * logger.warning(
+ * "DEPRECATED: The cname() method has been renamed to getname()." )
+ * return self.getname(*args, **kwds) # <<<<<<<<<<<<<<
+ *
+ * def is_constant(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_getname); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 423, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_v_kwds); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 423, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":420
+ * return self.getname(fully_qualified=False)
+ *
+ * def cname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * logger.warning(
+ * "DEPRECATED: The cname() method has been renamed to getname()." )
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.cname", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":425
+ * return self.getname(*args, **kwds)
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is a constant value"""
+ * return False
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_13is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_12is_constant[] = "Return True if this numeric value is a constant value";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_13is_constant = {"is_constant", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_13is_constant, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_12is_constant};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_13is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_12is_constant(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_12is_constant(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":427
+ * def is_constant(self):
+ * """Return True if this numeric value is a constant value"""
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def is_fixed(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":425
+ * return self.getname(*args, **kwds)
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is a constant value"""
+ * return False
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":429
+ * return False
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * """Return True if this is a non-constant value that has been fixed"""
+ * return False
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_15is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_14is_fixed[] = "Return True if this is a non-constant value that has been fixed";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_15is_fixed = {"is_fixed", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_15is_fixed, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_14is_fixed};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_15is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_fixed (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_14is_fixed(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_14is_fixed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_fixed", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":431
+ * def is_fixed(self):
+ * """Return True if this is a non-constant value that has been fixed"""
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def is_variable_type(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":429
+ * return False
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * """Return True if this is a non-constant value that has been fixed"""
+ * return False
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":433
+ * return False
+ *
+ * def is_variable_type(self): # <<<<<<<<<<<<<<
+ * """Return False unless this class is a variable object"""
+ * return False
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_17is_variable_type(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_16is_variable_type[] = "Return False unless this class is a variable object";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_17is_variable_type = {"is_variable_type", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_17is_variable_type, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_16is_variable_type};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_17is_variable_type(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_variable_type (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_16is_variable_type(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_16is_variable_type(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_variable_type", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":435
+ * def is_variable_type(self):
+ * """Return False unless this class is a variable object"""
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":433
+ * return False
+ *
+ * def is_variable_type(self): # <<<<<<<<<<<<<<
+ * """Return False unless this class is a variable object"""
+ * return False
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":437
+ * return False
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * """Return True if variables can appear in this expression"""
+ * return True
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_19is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_18is_potentially_variable[] = "Return True if variables can appear in this expression";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_19is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_19is_potentially_variable, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_18is_potentially_variable};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_19is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_18is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_18is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":439
+ * def is_potentially_variable(self):
+ * """Return True if variables can appear in this expression"""
+ * return True # <<<<<<<<<<<<<<
+ *
+ * def is_named_expression_type(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":437
+ * return False
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * """Return True if variables can appear in this expression"""
+ * return True
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":441
+ * return True
+ *
+ * def is_named_expression_type(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is a named expression"""
+ * return False
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_21is_named_expression_type(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_20is_named_expression_type[] = "Return True if this numeric value is a named expression";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_21is_named_expression_type = {"is_named_expression_type", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_21is_named_expression_type, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_20is_named_expression_type};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_21is_named_expression_type(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_named_expression_type (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_20is_named_expression_type(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_20is_named_expression_type(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_named_expression_type", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":443
+ * def is_named_expression_type(self):
+ * """Return True if this numeric value is a named expression"""
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def is_expression_type(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":441
+ * return True
+ *
+ * def is_named_expression_type(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is a named expression"""
+ * return False
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":445
+ * return False
+ *
+ * def is_expression_type(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is an expression"""
+ * return False
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_23is_expression_type(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_22is_expression_type[] = "Return True if this numeric value is an expression";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_23is_expression_type = {"is_expression_type", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_23is_expression_type, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_22is_expression_type};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_23is_expression_type(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_expression_type (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_22is_expression_type(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_22is_expression_type(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_expression_type", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":447
+ * def is_expression_type(self):
+ * """Return True if this numeric value is an expression"""
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def is_relational(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":445
+ * return False
+ *
+ * def is_expression_type(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is an expression"""
+ * return False
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":449
+ * return False
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * """
+ * Return True if this numeric value represents a relational expression.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_25is_relational(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_24is_relational[] = "\n Return True if this numeric value represents a relational expression.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_25is_relational = {"is_relational", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_25is_relational, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_24is_relational};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_25is_relational(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_relational (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_24is_relational(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_24is_relational(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_relational", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":453
+ * Return True if this numeric value represents a relational expression.
+ * """
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def is_indexed(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":449
+ * return False
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * """
+ * Return True if this numeric value represents a relational expression.
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":455
+ * return False
+ *
+ * def is_indexed(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is an indexed object"""
+ * return False
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_27is_indexed(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_26is_indexed[] = "Return True if this numeric value is an indexed object";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_27is_indexed = {"is_indexed", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_27is_indexed, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_26is_indexed};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_27is_indexed(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_indexed (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_26is_indexed(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_26is_indexed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_indexed", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":457
+ * def is_indexed(self):
+ * """Return True if this numeric value is an indexed object"""
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def as_numeric(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":455
+ * return False
+ *
+ * def is_indexed(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is an indexed object"""
+ * return False
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":459
+ * return False
+ *
+ * def as_numeric(self): # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_29as_numeric(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_29as_numeric = {"as_numeric", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_29as_numeric, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_29as_numeric(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("as_numeric (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_28as_numeric(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_28as_numeric(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("as_numeric", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":460
+ *
+ * def as_numeric(self):
+ * return self # <<<<<<<<<<<<<<
+ *
+ * def polynomial_degree(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_r = __pyx_v_self;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":459
+ * return False
+ *
+ * def as_numeric(self): # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":462
+ * return self
+ *
+ * def polynomial_degree(self): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_31polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_30polynomial_degree[] = "\n Return the polynomial degree of the expression.\n\n Returns:\n :const:`None`\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_31polynomial_degree = {"polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_31polynomial_degree, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_30polynomial_degree};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_31polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("polynomial_degree (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_30polynomial_degree(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_30polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("polynomial_degree", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":469
+ * :const:`None`
+ * """
+ * return self._compute_polynomial_degree(None) # <<<<<<<<<<<<<<
+ *
+ * def _compute_polynomial_degree(self, values):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compute_polynomial_degree); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":462
+ * return self
+ *
+ * def polynomial_degree(self): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":471
+ * return self._compute_polynomial_degree(None)
+ *
+ * def _compute_polynomial_degree(self, values): # <<<<<<<<<<<<<<
+ * """
+ * Compute the polynomial degree of this expression given
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_33_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_32_compute_polynomial_degree[] = "\n Compute the polynomial degree of this expression given\n the degree values of its children.\n\n Args:\n values (list): A list of values that indicate the degree\n of the children expression.\n\n Returns:\n :const:`None`\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_33_compute_polynomial_degree = {"_compute_polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_33_compute_polynomial_degree, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_32_compute_polynomial_degree};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_33_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_values,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, 1); __PYX_ERR(0, 471, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_compute_polynomial_degree") < 0)) __PYX_ERR(0, 471, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_values = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 471, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_32_compute_polynomial_degree(__pyx_self, __pyx_v_self, __pyx_v_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_32_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":483
+ * :const:`None`
+ * """
+ * return None # <<<<<<<<<<<<<<
+ *
+ * def __float__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":471
+ * return self._compute_polynomial_degree(None)
+ *
+ * def _compute_polynomial_degree(self, values): # <<<<<<<<<<<<<<
+ * """
+ * Compute the polynomial degree of this expression given
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":485
+ * return None
+ *
+ * def __float__(self): # <<<<<<<<<<<<<<
+ * """
+ * Coerce the value to a floating point
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_35__float__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_34__float__[] = "\n Coerce the value to a floating point\n\n Raises:\n TypeError\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_35__float__ = {"__float__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_35__float__, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_34__float__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_35__float__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__float__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_34__float__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_34__float__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__float__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":497
+ * arguments to one of the Python built-in math module functions when
+ * defining expressions. Avoid this error by using Pyomo-provided math
+ * functions.""" % (self.name,)) # <<<<<<<<<<<<<<
+ *
+ * def __int__(self):
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Implicit_conversion_of_Pyomo_Num, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":492
+ * TypeError
+ * """
+ * raise TypeError( # <<<<<<<<<<<<<<
+ * """Implicit conversion of Pyomo NumericValue type `%s' to a float is
+ * disabled. This error is often the result of using Pyomo components as
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 492, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":485
+ * return None
+ *
+ * def __float__(self): # <<<<<<<<<<<<<<
+ * """
+ * Coerce the value to a floating point
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__float__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":499
+ * functions.""" % (self.name,))
+ *
+ * def __int__(self): # <<<<<<<<<<<<<<
+ * """
+ * Coerce the value to an integer
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_37__int__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_36__int__[] = "\n Coerce the value to an integer\n\n Raises:\n TypeError\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_37__int__ = {"__int__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_37__int__, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_36__int__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_37__int__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__int__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_36__int__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_36__int__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__int__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":511
+ * arguments to one of the Python built-in math module functions when
+ * defining expressions. Avoid this error by using Pyomo-provided math
+ * functions.""" % (self.name,)) # <<<<<<<<<<<<<<
+ *
+ * def __lt__(self,other):
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Implicit_conversion_of_Pyomo_Num_2, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":506
+ * TypeError
+ * """
+ * raise TypeError( # <<<<<<<<<<<<<<
+ * """Implicit conversion of Pyomo NumericValue type `%s' to an integer is
+ * disabled. This error is often the result of using Pyomo components as
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 506, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 506, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 506, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":499
+ * functions.""" % (self.name,))
+ *
+ * def __int__(self): # <<<<<<<<<<<<<<
+ * """
+ * Coerce the value to an integer
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__int__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":513
+ * functions.""" % (self.name,))
+ *
+ * def __lt__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Less than operator
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_39__lt__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_38__lt__[] = "\n Less than operator\n\n This method is called when Python processes statements of the form::\n \n self < other\n other > self\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_39__lt__ = {"__lt__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_39__lt__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_38__lt__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_39__lt__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__lt__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__lt__", 1, 2, 2, 1); __PYX_ERR(0, 513, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__lt__") < 0)) __PYX_ERR(0, 513, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__lt__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 513, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__lt__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_38__lt__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_38__lt__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__lt__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":522
+ * other > self
+ * """
+ * return _generate_relational_expression(_lt, self, other) # <<<<<<<<<<<<<<
+ *
+ * def __gt__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_relational_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_lt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":513
+ * functions.""" % (self.name,))
+ *
+ * def __lt__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Less than operator
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__lt__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":524
+ * return _generate_relational_expression(_lt, self, other)
+ *
+ * def __gt__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Greater than operator
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_41__gt__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_40__gt__[] = "\n Greater than operator\n\n This method is called when Python processes statements of the form::\n \n self > other\n other < self\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_41__gt__ = {"__gt__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_41__gt__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_40__gt__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_41__gt__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__gt__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__gt__", 1, 2, 2, 1); __PYX_ERR(0, 524, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__gt__") < 0)) __PYX_ERR(0, 524, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__gt__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 524, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__gt__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_40__gt__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_40__gt__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__gt__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":533
+ * other < self
+ * """
+ * return _generate_relational_expression(_lt, other, self) # <<<<<<<<<<<<<<
+ *
+ * def __le__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_relational_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_lt); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_other, __pyx_v_self};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_other, __pyx_v_self};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_other);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_self);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":524
+ * return _generate_relational_expression(_lt, self, other)
+ *
+ * def __gt__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Greater than operator
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__gt__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":535
+ * return _generate_relational_expression(_lt, other, self)
+ *
+ * def __le__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Less than or equal operator
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_43__le__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_42__le__[] = "\n Less than or equal operator\n\n This method is called when Python processes statements of the form::\n \n self <= other\n other >= self\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_43__le__ = {"__le__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_43__le__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_42__le__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_43__le__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__le__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__le__", 1, 2, 2, 1); __PYX_ERR(0, 535, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__le__") < 0)) __PYX_ERR(0, 535, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__le__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 535, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__le__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_42__le__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_42__le__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__le__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":544
+ * other >= self
+ * """
+ * return _generate_relational_expression(_le, self, other) # <<<<<<<<<<<<<<
+ *
+ * def __ge__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_relational_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_le); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":535
+ * return _generate_relational_expression(_lt, other, self)
+ *
+ * def __le__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Less than or equal operator
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__le__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":546
+ * return _generate_relational_expression(_le, self, other)
+ *
+ * def __ge__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Greater than or equal operator
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_45__ge__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_44__ge__[] = "\n Greater than or equal operator\n\n This method is called when Python processes statements of the form::\n \n self >= other\n other <= self\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_45__ge__ = {"__ge__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_45__ge__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_44__ge__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_45__ge__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__ge__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__ge__", 1, 2, 2, 1); __PYX_ERR(0, 546, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__ge__") < 0)) __PYX_ERR(0, 546, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__ge__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 546, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__ge__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_44__ge__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_44__ge__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__ge__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":555
+ * other <= self
+ * """
+ * return _generate_relational_expression(_le, other, self) # <<<<<<<<<<<<<<
+ *
+ * def __eq__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_relational_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_le); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 555, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_other, __pyx_v_self};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_other, __pyx_v_self};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 555, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_other);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_self);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 555, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":546
+ * return _generate_relational_expression(_le, self, other)
+ *
+ * def __ge__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Greater than or equal operator
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__ge__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":557
+ * return _generate_relational_expression(_le, other, self)
+ *
+ * def __eq__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Equal to operator
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_47__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_46__eq__[] = "\n Equal to operator\n\n This method is called when Python processes the statement::\n \n self == other\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_47__eq__ = {"__eq__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_47__eq__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_46__eq__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_47__eq__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__eq__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, 1); __PYX_ERR(0, 557, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__eq__") < 0)) __PYX_ERR(0, 557, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__eq__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 557, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_46__eq__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_46__eq__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__eq__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":565
+ * self == other
+ * """
+ * return _generate_relational_expression(_eq, self, other) # <<<<<<<<<<<<<<
+ *
+ * def __add__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_relational_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_eq); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":557
+ * return _generate_relational_expression(_le, other, self)
+ *
+ * def __eq__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Equal to operator
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__eq__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":567
+ * return _generate_relational_expression(_eq, self, other)
+ *
+ * def __add__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary addition
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_49__add__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_48__add__[] = "\n Binary addition\n\n This method is called when Python processes the statement::\n \n self + other\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_49__add__ = {"__add__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_49__add__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_48__add__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_49__add__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__add__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__add__", 1, 2, 2, 1); __PYX_ERR(0, 567, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__add__") < 0)) __PYX_ERR(0, 567, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__add__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 567, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_48__add__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_48__add__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__add__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":575
+ * self + other
+ * """
+ * return _generate_sum_expression(_add,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __sub__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_sum_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_add_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 575, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 575, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":567
+ * return _generate_relational_expression(_eq, self, other)
+ *
+ * def __add__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary addition
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__add__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":577
+ * return _generate_sum_expression(_add,self,other)
+ *
+ * def __sub__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary subtraction
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_51__sub__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_50__sub__[] = "\n Binary subtraction\n\n This method is called when Python processes the statement::\n \n self - other\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_51__sub__ = {"__sub__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_51__sub__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_50__sub__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_51__sub__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__sub__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__sub__", 1, 2, 2, 1); __PYX_ERR(0, 577, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__sub__") < 0)) __PYX_ERR(0, 577, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__sub__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 577, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_50__sub__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_50__sub__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__sub__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":585
+ * self - other
+ * """
+ * return _generate_sum_expression(_sub,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __mul__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_sum_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 585, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sub); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 585, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 585, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 585, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":577
+ * return _generate_sum_expression(_add,self,other)
+ *
+ * def __sub__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary subtraction
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__sub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":587
+ * return _generate_sum_expression(_sub,self,other)
+ *
+ * def __mul__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary multiplication
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_53__mul__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_52__mul__[] = "\n Binary multiplication\n\n This method is called when Python processes the statement::\n \n self * other\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_53__mul__ = {"__mul__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_53__mul__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_52__mul__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_53__mul__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__mul__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__mul__", 1, 2, 2, 1); __PYX_ERR(0, 587, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__mul__") < 0)) __PYX_ERR(0, 587, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__mul__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 587, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_52__mul__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_52__mul__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__mul__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":595
+ * self * other
+ * """
+ * return _generate_mul_expression(_mul,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __div__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_mul_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 595, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_mul); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 595, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 595, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 595, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":587
+ * return _generate_sum_expression(_sub,self,other)
+ *
+ * def __mul__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary multiplication
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__mul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":597
+ * return _generate_mul_expression(_mul,self,other)
+ *
+ * def __div__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_55__div__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_54__div__[] = "\n Binary division\n\n This method is called when Python processes the statement::\n \n self / other\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_55__div__ = {"__div__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_55__div__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_54__div__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_55__div__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__div__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__div__", 1, 2, 2, 1); __PYX_ERR(0, 597, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__div__") < 0)) __PYX_ERR(0, 597, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__div__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 597, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_54__div__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_54__div__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__div__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":605
+ * self / other
+ * """
+ * return _generate_mul_expression(_div,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __truediv__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_mul_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_div); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 605, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 605, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":597
+ * return _generate_mul_expression(_mul,self,other)
+ *
+ * def __div__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__div__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":607
+ * return _generate_mul_expression(_div,self,other)
+ *
+ * def __truediv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division (when __future__.division is in effect)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_57__truediv__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_56__truediv__[] = "\n Binary division (when __future__.division is in effect)\n\n This method is called when Python processes the statement::\n \n self / other\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_57__truediv__ = {"__truediv__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_57__truediv__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_56__truediv__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_57__truediv__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__truediv__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__truediv__", 1, 2, 2, 1); __PYX_ERR(0, 607, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__truediv__") < 0)) __PYX_ERR(0, 607, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__truediv__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 607, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_56__truediv__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_56__truediv__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__truediv__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":615
+ * self / other
+ * """
+ * return _generate_mul_expression(_div,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __pow__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_mul_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_div); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 615, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 615, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":607
+ * return _generate_mul_expression(_div,self,other)
+ *
+ * def __truediv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division (when __future__.division is in effect)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__truediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":617
+ * return _generate_mul_expression(_div,self,other)
+ *
+ * def __pow__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary power
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_59__pow__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_58__pow__[] = "\n Binary power\n\n This method is called when Python processes the statement::\n \n self ** other\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_59__pow__ = {"__pow__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_59__pow__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_58__pow__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_59__pow__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__pow__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__pow__", 1, 2, 2, 1); __PYX_ERR(0, 617, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__pow__") < 0)) __PYX_ERR(0, 617, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__pow__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 617, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_58__pow__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_58__pow__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__pow__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":625
+ * self ** other
+ * """
+ * return _generate_other_expression(_pow,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __radd__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_other_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_pow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":617
+ * return _generate_mul_expression(_div,self,other)
+ *
+ * def __pow__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary power
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__pow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":627
+ * return _generate_other_expression(_pow,self,other)
+ *
+ * def __radd__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary addition
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_61__radd__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_60__radd__[] = "\n Binary addition\n\n This method is called when Python processes the statement::\n \n other + self\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_61__radd__ = {"__radd__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_61__radd__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_60__radd__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_61__radd__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__radd__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__radd__", 1, 2, 2, 1); __PYX_ERR(0, 627, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__radd__") < 0)) __PYX_ERR(0, 627, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__radd__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 627, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__radd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_60__radd__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_60__radd__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__radd__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":635
+ * other + self
+ * """
+ * return _generate_sum_expression(_radd,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __rsub__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_sum_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 635, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_radd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 635, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 635, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":627
+ * return _generate_other_expression(_pow,self,other)
+ *
+ * def __radd__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary addition
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__radd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":637
+ * return _generate_sum_expression(_radd,self,other)
+ *
+ * def __rsub__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary subtraction
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_63__rsub__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_62__rsub__[] = "\n Binary subtraction\n\n This method is called when Python processes the statement::\n \n other - self\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_63__rsub__ = {"__rsub__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_63__rsub__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_62__rsub__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_63__rsub__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__rsub__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__rsub__", 1, 2, 2, 1); __PYX_ERR(0, 637, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__rsub__") < 0)) __PYX_ERR(0, 637, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__rsub__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 637, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__rsub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_62__rsub__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_62__rsub__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__rsub__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":645
+ * other - self
+ * """
+ * return _generate_sum_expression(_rsub,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __rmul__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_sum_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 645, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_rsub); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 645, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 645, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 645, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":637
+ * return _generate_sum_expression(_radd,self,other)
+ *
+ * def __rsub__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary subtraction
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__rsub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":647
+ * return _generate_sum_expression(_rsub,self,other)
+ *
+ * def __rmul__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary multiplication
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_65__rmul__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_64__rmul__[] = "\n Binary multiplication\n\n This method is called when Python processes the statement::\n \n other * self\n\n when other is not a :class:`NumericValue ` object.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_65__rmul__ = {"__rmul__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_65__rmul__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_64__rmul__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_65__rmul__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__rmul__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__rmul__", 1, 2, 2, 1); __PYX_ERR(0, 647, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__rmul__") < 0)) __PYX_ERR(0, 647, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__rmul__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 647, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__rmul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_64__rmul__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_64__rmul__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__rmul__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":657
+ * when other is not a :class:`NumericValue ` object.
+ * """
+ * return _generate_mul_expression(_rmul,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __rdiv__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_mul_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 657, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_rmul); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 657, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 657, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 657, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":647
+ * return _generate_sum_expression(_rsub,self,other)
+ *
+ * def __rmul__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary multiplication
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__rmul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":659
+ * return _generate_mul_expression(_rmul,self,other)
+ *
+ * def __rdiv__(self,other): # <<<<<<<<<<<<<<
+ * """Binary division
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_67__rdiv__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_66__rdiv__[] = "Binary division\n\n This method is called when Python processes the statement::\n \n other / self\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_67__rdiv__ = {"__rdiv__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_67__rdiv__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_66__rdiv__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_67__rdiv__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__rdiv__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__rdiv__", 1, 2, 2, 1); __PYX_ERR(0, 659, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__rdiv__") < 0)) __PYX_ERR(0, 659, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__rdiv__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 659, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__rdiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_66__rdiv__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_66__rdiv__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__rdiv__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":666
+ * other / self
+ * """
+ * return _generate_mul_expression(_rdiv,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __rtruediv__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_mul_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_rdiv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":659
+ * return _generate_mul_expression(_rmul,self,other)
+ *
+ * def __rdiv__(self,other): # <<<<<<<<<<<<<<
+ * """Binary division
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__rdiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":668
+ * return _generate_mul_expression(_rdiv,self,other)
+ *
+ * def __rtruediv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division (when __future__.division is in effect)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_69__rtruediv__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_68__rtruediv__[] = "\n Binary division (when __future__.division is in effect)\n\n This method is called when Python processes the statement::\n \n other / self\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_69__rtruediv__ = {"__rtruediv__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_69__rtruediv__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_68__rtruediv__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_69__rtruediv__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__rtruediv__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__rtruediv__", 1, 2, 2, 1); __PYX_ERR(0, 668, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__rtruediv__") < 0)) __PYX_ERR(0, 668, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__rtruediv__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 668, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__rtruediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_68__rtruediv__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_68__rtruediv__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__rtruediv__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":676
+ * other / self
+ * """
+ * return _generate_mul_expression(_rdiv,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __rpow__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_mul_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_rdiv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 676, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 676, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":668
+ * return _generate_mul_expression(_rdiv,self,other)
+ *
+ * def __rtruediv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division (when __future__.division is in effect)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__rtruediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":678
+ * return _generate_mul_expression(_rdiv,self,other)
+ *
+ * def __rpow__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary power
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_71__rpow__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_70__rpow__[] = "\n Binary power\n\n This method is called when Python processes the statement::\n \n other ** self\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_71__rpow__ = {"__rpow__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_71__rpow__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_70__rpow__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_71__rpow__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__rpow__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__rpow__", 1, 2, 2, 1); __PYX_ERR(0, 678, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__rpow__") < 0)) __PYX_ERR(0, 678, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__rpow__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 678, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__rpow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_70__rpow__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_70__rpow__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__rpow__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":686
+ * other ** self
+ * """
+ * return _generate_other_expression(_rpow,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __iadd__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_other_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_rpow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":678
+ * return _generate_mul_expression(_rdiv,self,other)
+ *
+ * def __rpow__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary power
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__rpow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":688
+ * return _generate_other_expression(_rpow,self,other)
+ *
+ * def __iadd__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary addition
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_73__iadd__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_72__iadd__[] = "\n Binary addition\n\n This method is called when Python processes the statement::\n \n self += other\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_73__iadd__ = {"__iadd__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_73__iadd__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_72__iadd__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_73__iadd__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__iadd__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__iadd__", 1, 2, 2, 1); __PYX_ERR(0, 688, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__iadd__") < 0)) __PYX_ERR(0, 688, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__iadd__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 688, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_72__iadd__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_72__iadd__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__iadd__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":696
+ * self += other
+ * """
+ * return _generate_sum_expression(_iadd,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __isub__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_sum_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_iadd); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":688
+ * return _generate_other_expression(_rpow,self,other)
+ *
+ * def __iadd__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary addition
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":698
+ * return _generate_sum_expression(_iadd,self,other)
+ *
+ * def __isub__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary subtraction
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_75__isub__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_74__isub__[] = "\n Binary subtraction\n\n This method is called when Python processes the statement::\n\n self -= other\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_75__isub__ = {"__isub__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_75__isub__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_74__isub__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_75__isub__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__isub__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__isub__", 1, 2, 2, 1); __PYX_ERR(0, 698, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__isub__") < 0)) __PYX_ERR(0, 698, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__isub__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 698, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_74__isub__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_74__isub__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__isub__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":706
+ * self -= other
+ * """
+ * return _generate_sum_expression(_isub,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __imul__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_sum_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 706, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_isub); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 706, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 706, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 706, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":698
+ * return _generate_sum_expression(_iadd,self,other)
+ *
+ * def __isub__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary subtraction
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__isub__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":708
+ * return _generate_sum_expression(_isub,self,other)
+ *
+ * def __imul__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary multiplication
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_77__imul__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_76__imul__[] = "\n Binary multiplication\n\n This method is called when Python processes the statement::\n\n self *= other\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_77__imul__ = {"__imul__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_77__imul__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_76__imul__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_77__imul__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__imul__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__imul__", 1, 2, 2, 1); __PYX_ERR(0, 708, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__imul__") < 0)) __PYX_ERR(0, 708, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__imul__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 708, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_76__imul__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_76__imul__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__imul__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":716
+ * self *= other
+ * """
+ * return _generate_mul_expression(_imul,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __idiv__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_mul_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 716, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_imul); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 716, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 716, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 716, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":708
+ * return _generate_sum_expression(_isub,self,other)
+ *
+ * def __imul__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary multiplication
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__imul__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":718
+ * return _generate_mul_expression(_imul,self,other)
+ *
+ * def __idiv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_79__idiv__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_78__idiv__[] = "\n Binary division\n\n This method is called when Python processes the statement::\n \n self /= other\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_79__idiv__ = {"__idiv__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_79__idiv__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_78__idiv__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_79__idiv__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__idiv__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__idiv__", 1, 2, 2, 1); __PYX_ERR(0, 718, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__idiv__") < 0)) __PYX_ERR(0, 718, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__idiv__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 718, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_78__idiv__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_78__idiv__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__idiv__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":726
+ * self /= other
+ * """
+ * return _generate_mul_expression(_idiv,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __itruediv__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_mul_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 726, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_idiv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 726, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 726, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 726, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":718
+ * return _generate_mul_expression(_imul,self,other)
+ *
+ * def __idiv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__idiv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":728
+ * return _generate_mul_expression(_idiv,self,other)
+ *
+ * def __itruediv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division (when __future__.division is in effect)
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_81__itruediv__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_80__itruediv__[] = "\n Binary division (when __future__.division is in effect)\n\n This method is called when Python processes the statement::\n \n self /= other\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_81__itruediv__ = {"__itruediv__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_81__itruediv__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_80__itruediv__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_81__itruediv__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__itruediv__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__itruediv__", 1, 2, 2, 1); __PYX_ERR(0, 728, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__itruediv__") < 0)) __PYX_ERR(0, 728, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__itruediv__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 728, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__itruediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_80__itruediv__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_80__itruediv__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__itruediv__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":736
+ * self /= other
+ * """
+ * return _generate_mul_expression(_idiv,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __ipow__(self,other):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_mul_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_idiv); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 736, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":728
+ * return _generate_mul_expression(_idiv,self,other)
+ *
+ * def __itruediv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division (when __future__.division is in effect)
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__itruediv__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":738
+ * return _generate_mul_expression(_idiv,self,other)
+ *
+ * def __ipow__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary power
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_83__ipow__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_82__ipow__[] = "\n Binary power\n\n This method is called when Python processes the statement::\n \n self **= other\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_83__ipow__ = {"__ipow__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_83__ipow__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_82__ipow__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_83__ipow__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_other = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__ipow__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_other_2,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_other_2)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__ipow__", 1, 2, 2, 1); __PYX_ERR(0, 738, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__ipow__") < 0)) __PYX_ERR(0, 738, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_other = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__ipow__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 738, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__ipow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_82__ipow__(__pyx_self, __pyx_v_self, __pyx_v_other);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_82__ipow__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__ipow__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":746
+ * self **= other
+ * """
+ * return _generate_other_expression(_ipow,self,other) # <<<<<<<<<<<<<<
+ *
+ * def __neg__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_other_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 746, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_ipow); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 746, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, __pyx_v_other};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 746, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_other);
+ __Pyx_GIVEREF(__pyx_v_other);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_other);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 746, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":738
+ * return _generate_mul_expression(_idiv,self,other)
+ *
+ * def __ipow__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary power
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__ipow__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":748
+ * return _generate_other_expression(_ipow,self,other)
+ *
+ * def __neg__(self): # <<<<<<<<<<<<<<
+ * """
+ * Negation
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_85__neg__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_84__neg__[] = "\n Negation\n\n This method is called when Python processes the statement::\n \n - self\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_85__neg__ = {"__neg__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_85__neg__, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_84__neg__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_85__neg__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__neg__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_84__neg__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_84__neg__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__neg__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":756
+ * - self
+ * """
+ * return _generate_sum_expression(_neg, self, None) # <<<<<<<<<<<<<<
+ *
+ * def __pos__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_sum_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_neg); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, Py_None};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, Py_None};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, Py_None);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":748
+ * return _generate_other_expression(_ipow,self,other)
+ *
+ * def __neg__(self): # <<<<<<<<<<<<<<
+ * """
+ * Negation
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__neg__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":758
+ * return _generate_sum_expression(_neg, self, None)
+ *
+ * def __pos__(self): # <<<<<<<<<<<<<<
+ * """
+ * Positive expression
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_87__pos__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_86__pos__[] = "\n Positive expression\n\n This method is called when Python processes the statement::\n \n + self\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_87__pos__ = {"__pos__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_87__pos__, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_86__pos__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_87__pos__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__pos__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_86__pos__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_86__pos__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__pos__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":766
+ * + self
+ * """
+ * return self # <<<<<<<<<<<<<<
+ *
+ * def __abs__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_r = __pyx_v_self;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":758
+ * return _generate_sum_expression(_neg, self, None)
+ *
+ * def __pos__(self): # <<<<<<<<<<<<<<
+ * """
+ * Positive expression
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":768
+ * return self
+ *
+ * def __abs__(self): # <<<<<<<<<<<<<<
+ * """ Absolute value
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_89__abs__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_88__abs__[] = " Absolute value\n\n This method is called when Python processes the statement::\n \n abs(self)\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_89__abs__ = {"__abs__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_89__abs__, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_88__abs__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_89__abs__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__abs__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_88__abs__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_88__abs__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__abs__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":775
+ * abs(self)
+ * """
+ * return _generate_other_expression(_abs,self, None) # <<<<<<<<<<<<<<
+ *
+ * def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_other_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_abs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 775, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, Py_None};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_4, __pyx_t_3, __pyx_v_self, Py_None};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 3+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(3+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 775, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_self);
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, Py_None);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 775, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":768
+ * return self
+ *
+ * def __abs__(self): # <<<<<<<<<<<<<<
+ * """ Absolute value
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.__abs__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":777
+ * return _generate_other_expression(_abs,self, None)
+ *
+ * def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False): # <<<<<<<<<<<<<<
+ * """
+ * Return a string representation of the expression tree.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_91to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_90to_string[] = "\n Return a string representation of the expression tree.\n\n Args:\n verbose (bool): If :const:`True`, then the the string \n representation consists of nested functions. Otherwise,\n the string representation is an algebraic equation.\n Defaults to :const:`False`.\n labeler: An object that generates string labels for \n variables in the expression tree. Defaults to :const:`None`.\n\n Returns:\n A string representation for the expression tree.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_91to_string = {"to_string", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_91to_string, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_12NumericValue_90to_string};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_12NumericValue_91to_string(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_labeler = 0;
+ PyObject *__pyx_v_smap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("to_string (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_verbose,&__pyx_n_s_labeler,&__pyx_n_s_smap,&__pyx_n_s_compute_values,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ values[1] = ((PyObject *)((PyObject *)Py_None));
+ values[2] = ((PyObject *)((PyObject *)Py_None));
+ values[3] = ((PyObject *)((PyObject *)Py_None));
+ values[4] = ((PyObject *)((PyObject *)Py_False));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_labeler);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_smap);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values);
+ if (value) { values[4] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "to_string") < 0)) __PYX_ERR(0, 777, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_verbose = values[1];
+ __pyx_v_labeler = values[2];
+ __pyx_v_smap = values[3];
+ __pyx_v_compute_values = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("to_string", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 777, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_90to_string(__pyx_self, __pyx_v_self, __pyx_v_verbose, __pyx_v_labeler, __pyx_v_smap, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_12NumericValue_90to_string(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_verbose, PyObject *__pyx_v_labeler, PyObject *__pyx_v_smap, PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ int __pyx_t_9;
+ PyObject *__pyx_t_10 = NULL;
+ __Pyx_RefNannySetupContext("to_string", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":792
+ * A string representation for the expression tree.
+ * """
+ * if compute_values: # <<<<<<<<<<<<<<
+ * try:
+ * return str(self())
+ */
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 792, __pyx_L1_error)
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/numvalue.pyx":793
+ * """
+ * if compute_values:
+ * try: # <<<<<<<<<<<<<<
+ * return str(self())
+ * except:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_2, &__pyx_t_3, &__pyx_t_4);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_4);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/numvalue.pyx":794
+ * if compute_values:
+ * try:
+ * return str(self()) # <<<<<<<<<<<<<<
+ * except:
+ * pass
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_self);
+ __pyx_t_6 = __pyx_v_self; __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_7) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 794, __pyx_L4_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 794, __pyx_L4_error)
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 794, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 794, __pyx_L4_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L8_try_return;
+
+ /* "pyomo/core/expr/numvalue.pyx":793
+ * """
+ * if compute_values:
+ * try: # <<<<<<<<<<<<<<
+ * return str(self())
+ * except:
+ */
+ }
+ __pyx_L4_error:;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":795
+ * try:
+ * return str(self())
+ * except: # <<<<<<<<<<<<<<
+ * pass
+ * if not self.is_constant():
+ */
+ /*except:*/ {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L5_exception_handled;
+ }
+ __pyx_L8_try_return:;
+
+ /* "pyomo/core/expr/numvalue.pyx":793
+ * """
+ * if compute_values:
+ * try: # <<<<<<<<<<<<<<
+ * return str(self())
+ * except:
+ */
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_XGIVEREF(__pyx_t_4);
+ __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
+ goto __pyx_L0;
+ __pyx_L5_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_XGIVEREF(__pyx_t_4);
+ __Pyx_ExceptionReset(__pyx_t_2, __pyx_t_3, __pyx_t_4);
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":792
+ * A string representation for the expression tree.
+ * """
+ * if compute_values: # <<<<<<<<<<<<<<
+ * try:
+ * return str(self())
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":797
+ * except:
+ * pass
+ * if not self.is_constant(): # <<<<<<<<<<<<<<
+ * if smap:
+ * return smap.getSymbol(self, labeler)
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 797, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_7) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 797, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 797, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 797, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_8 = ((!__pyx_t_1) != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/numvalue.pyx":798
+ * pass
+ * if not self.is_constant():
+ * if smap: # <<<<<<<<<<<<<<
+ * return smap.getSymbol(self, labeler)
+ * elif labeler is not None:
+ */
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_smap); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 798, __pyx_L1_error)
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/numvalue.pyx":799
+ * if not self.is_constant():
+ * if smap:
+ * return smap.getSymbol(self, labeler) # <<<<<<<<<<<<<<
+ * elif labeler is not None:
+ * return labeler(self)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_smap, __pyx_n_s_getSymbol); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_self, __pyx_v_labeler};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_v_self, __pyx_v_labeler};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_9, __pyx_v_self);
+ __Pyx_INCREF(__pyx_v_labeler);
+ __Pyx_GIVEREF(__pyx_v_labeler);
+ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_9, __pyx_v_labeler);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_10, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 799, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":798
+ * pass
+ * if not self.is_constant():
+ * if smap: # <<<<<<<<<<<<<<
+ * return smap.getSymbol(self, labeler)
+ * elif labeler is not None:
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":800
+ * if smap:
+ * return smap.getSymbol(self, labeler)
+ * elif labeler is not None: # <<<<<<<<<<<<<<
+ * return labeler(self)
+ * return self.__str__()
+ */
+ __pyx_t_8 = (__pyx_v_labeler != Py_None);
+ __pyx_t_1 = (__pyx_t_8 != 0);
+ if (__pyx_t_1) {
+
+ /* "pyomo/core/expr/numvalue.pyx":801
+ * return smap.getSymbol(self, labeler)
+ * elif labeler is not None:
+ * return labeler(self) # <<<<<<<<<<<<<<
+ * return self.__str__()
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_labeler);
+ __pyx_t_6 = __pyx_v_labeler; __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_10) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_self); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 801, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_self};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 801, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_10, __pyx_v_self};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 801, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 801, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_v_self);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 801, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":800
+ * if smap:
+ * return smap.getSymbol(self, labeler)
+ * elif labeler is not None: # <<<<<<<<<<<<<<
+ * return labeler(self)
+ * return self.__str__()
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":797
+ * except:
+ * pass
+ * if not self.is_constant(): # <<<<<<<<<<<<<<
+ * if smap:
+ * return smap.getSymbol(self, labeler)
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":802
+ * elif labeler is not None:
+ * return labeler(self)
+ * return self.__str__() # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_str); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 802, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_7) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 802, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else {
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 802, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":777
+ * return _generate_other_expression(_abs,self, None)
+ *
+ * def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False): # <<<<<<<<<<<<<<
+ * """
+ * Return a string representation of the expression tree.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericValue.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":814
+ * __slots__ = ('value',)
+ *
+ * def __init__(self, value): # <<<<<<<<<<<<<<
+ * self.value = value
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_value = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_value,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_value)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 814, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 814, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_value = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 814, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericConstant.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant___init__(__pyx_self, __pyx_v_self, __pyx_v_value);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":815
+ *
+ * def __init__(self, value):
+ * self.value = value # <<<<<<<<<<<<<<
+ *
+ * def __getstate__(self):
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_value, __pyx_v_value) < 0) __PYX_ERR(0, 815, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":814
+ * __slots__ = ('value',)
+ *
+ * def __init__(self, value): # <<<<<<<<<<<<<<
+ * self.value = value
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericConstant.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":817
+ * self.value = value
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(NumericConstant, self).__getstate__()
+ * for i in NumericConstant.__slots__:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_3__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_3__getstate__ = {"__getstate__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_3__getstate__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_3__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_2__getstate__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_2__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_state = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ __Pyx_RefNannySetupContext("__getstate__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":818
+ *
+ * def __getstate__(self):
+ * state = super(NumericConstant, self).__getstate__() # <<<<<<<<<<<<<<
+ * for i in NumericConstant.__slots__:
+ * state[i] = getattr(self,i)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_NumericConstant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 818, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 818, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_getstate); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 818, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 818, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_state = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":819
+ * def __getstate__(self):
+ * state = super(NumericConstant, self).__getstate__()
+ * for i in NumericConstant.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self,i)
+ * return state
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NumericConstant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_slots); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 819, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 819, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 819, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_5(__pyx_t_1);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 819, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":820
+ * state = super(NumericConstant, self).__getstate__()
+ * for i in NumericConstant.__slots__:
+ * state[i] = getattr(self,i) # <<<<<<<<<<<<<<
+ * return state
+ *
+ */
+ __pyx_t_3 = __Pyx_GetAttr(__pyx_v_self, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 820, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (unlikely(PyObject_SetItem(__pyx_v_state, __pyx_v_i, __pyx_t_3) < 0)) __PYX_ERR(0, 820, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":819
+ * def __getstate__(self):
+ * state = super(NumericConstant, self).__getstate__()
+ * for i in NumericConstant.__slots__: # <<<<<<<<<<<<<<
+ * state[i] = getattr(self,i)
+ * return state
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":821
+ * for i in NumericConstant.__slots__:
+ * state[i] = getattr(self,i)
+ * return state # <<<<<<<<<<<<<<
+ *
+ * def is_constant(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_state);
+ __pyx_r = __pyx_v_state;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":817
+ * self.value = value
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(NumericConstant, self).__getstate__()
+ * for i in NumericConstant.__slots__:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericConstant.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_state);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":823
+ * return state
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_5is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_5is_constant = {"is_constant", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_5is_constant, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_5is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_4is_constant(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_4is_constant(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":824
+ *
+ * def is_constant(self):
+ * return True # <<<<<<<<<<<<<<
+ *
+ * def is_fixed(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":823
+ * return state
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":826
+ * return True
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_7is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_7is_fixed = {"is_fixed", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_7is_fixed, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_7is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_fixed (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_6is_fixed(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_6is_fixed(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_fixed", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":827
+ *
+ * def is_fixed(self):
+ * return True # <<<<<<<<<<<<<<
+ *
+ * def is_potentially_variable(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":826
+ * return True
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":829
+ * return True
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_9is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_9is_potentially_variable = {"is_potentially_variable", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_9is_potentially_variable, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_9is_potentially_variable(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_8is_potentially_variable(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_8is_potentially_variable(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_potentially_variable", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":830
+ *
+ * def is_potentially_variable(self):
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def _compute_polynomial_degree(self, result):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":829
+ * return True
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":832
+ * return False
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * return 0
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_11_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_11_compute_polynomial_degree = {"_compute_polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_11_compute_polynomial_degree, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_11_compute_polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_result = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_result,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_result)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, 1); __PYX_ERR(0, 832, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_compute_polynomial_degree") < 0)) __PYX_ERR(0, 832, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_result = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_compute_polynomial_degree", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 832, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericConstant._compute_polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_10_compute_polynomial_degree(__pyx_self, __pyx_v_self, __pyx_v_result);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_10_compute_polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_result) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_compute_polynomial_degree", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":833
+ *
+ * def _compute_polynomial_degree(self, result):
+ * return 0 # <<<<<<<<<<<<<<
+ *
+ * def __str__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":832
+ * return False
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * return 0
+ *
+ */
+
+ /* function exit code */
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":835
+ * return 0
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return str(self.value)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_13__str__ = {"__str__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_13__str__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_13__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_12__str__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_12__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("__str__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":836
+ *
+ * def __str__(self):
+ * return str(self.value) # <<<<<<<<<<<<<<
+ *
+ * def __nonzero__(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 836, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 836, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":835
+ * return 0
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return str(self.value)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericConstant.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":838
+ * return str(self.value)
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * """Return True if the value is defined and non-zero"""
+ * if self.value:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_15__nonzero__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_15NumericConstant_14__nonzero__[] = "Return True if the value is defined and non-zero";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_15__nonzero__ = {"__nonzero__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_15__nonzero__, METH_O, __pyx_doc_5pyomo_4core_4expr_8numvalue_15NumericConstant_14__nonzero__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_15__nonzero__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__nonzero__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_14__nonzero__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_14__nonzero__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ __Pyx_RefNannySetupContext("__nonzero__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":840
+ * def __nonzero__(self):
+ * """Return True if the value is defined and non-zero"""
+ * if self.value: # <<<<<<<<<<<<<<
+ * return True
+ * if self.value is None:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 840, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 840, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/numvalue.pyx":841
+ * """Return True if the value is defined and non-zero"""
+ * if self.value:
+ * return True # <<<<<<<<<<<<<<
+ * if self.value is None:
+ * raise ValueError("Numeric Constant: value is undefined")
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":840
+ * def __nonzero__(self):
+ * """Return True if the value is defined and non-zero"""
+ * if self.value: # <<<<<<<<<<<<<<
+ * return True
+ * if self.value is None:
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":842
+ * if self.value:
+ * return True
+ * if self.value is None: # <<<<<<<<<<<<<<
+ * raise ValueError("Numeric Constant: value is undefined")
+ * return False
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = (__pyx_t_1 == Py_None);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/expr/numvalue.pyx":843
+ * return True
+ * if self.value is None:
+ * raise ValueError("Numeric Constant: value is undefined") # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 843, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 843, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":842
+ * if self.value:
+ * return True
+ * if self.value is None: # <<<<<<<<<<<<<<
+ * raise ValueError("Numeric Constant: value is undefined")
+ * return False
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":844
+ * if self.value is None:
+ * raise ValueError("Numeric Constant: value is undefined")
+ * return False # <<<<<<<<<<<<<<
+ *
+ * __bool__ = __nonzero__
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":838
+ * return str(self.value)
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * """Return True if the value is defined and non-zero"""
+ * if self.value:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericConstant.__nonzero__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":848
+ * __bool__ = __nonzero__
+ *
+ * def __call__(self, exception=True): # <<<<<<<<<<<<<<
+ * """Return the constant value"""
+ * return self.value
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_17__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4expr_8numvalue_15NumericConstant_16__call__[] = "Return the constant value";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_17__call__ = {"__call__", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_17__call__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4expr_8numvalue_15NumericConstant_16__call__};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_17__call__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_exception = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_exception,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)((PyObject *)Py_True));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exception);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__call__") < 0)) __PYX_ERR(0, 848, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_exception = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__call__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 848, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericConstant.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_16__call__(__pyx_self, __pyx_v_self, __pyx_v_exception);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_16__call__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exception) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__call__", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":850
+ * def __call__(self, exception=True):
+ * """Return the constant value"""
+ * return self.value # <<<<<<<<<<<<<<
+ *
+ * def pprint(self, ostream=None, verbose=False):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 850, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/expr/numvalue.pyx":848
+ * __bool__ = __nonzero__
+ *
+ * def __call__(self, exception=True): # <<<<<<<<<<<<<<
+ * """Return the constant value"""
+ * return self.value
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericConstant.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/expr/numvalue.pyx":852
+ * return self.value
+ *
+ * def pprint(self, ostream=None, verbose=False): # <<<<<<<<<<<<<<
+ * if ostream is None: #pragma:nocover
+ * ostream = sys.stdout
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_19pprint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_19pprint = {"pprint", (PyCFunction)__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_19pprint, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4expr_8numvalue_15NumericConstant_19pprint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_ostream = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("pprint (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self_2,&__pyx_n_s_ostream,&__pyx_n_s_verbose,0};
+ PyObject* values[3] = {0,0,0};
+ values[1] = ((PyObject *)((PyObject *)Py_None));
+ values[2] = ((PyObject *)((PyObject *)Py_False));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self_2)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_ostream);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "pprint") < 0)) __PYX_ERR(0, 852, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_ostream = values[1];
+ __pyx_v_verbose = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("pprint", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 852, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericConstant.pprint", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_18pprint(__pyx_self, __pyx_v_self, __pyx_v_ostream, __pyx_v_verbose);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4expr_8numvalue_15NumericConstant_18pprint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_ostream, CYTHON_UNUSED PyObject *__pyx_v_verbose) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("pprint", 0);
+ __Pyx_INCREF(__pyx_v_ostream);
+
+ /* "pyomo/core/expr/numvalue.pyx":853
+ *
+ * def pprint(self, ostream=None, verbose=False):
+ * if ostream is None: #pragma:nocover # <<<<<<<<<<<<<<
+ * ostream = sys.stdout
+ * ostream.write(str(self))
+ */
+ __pyx_t_1 = (__pyx_v_ostream == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/expr/numvalue.pyx":854
+ * def pprint(self, ostream=None, verbose=False):
+ * if ostream is None: #pragma:nocover
+ * ostream = sys.stdout # <<<<<<<<<<<<<<
+ * ostream.write(str(self))
+ *
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 854, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_stdout); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 854, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_ostream, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":853
+ *
+ * def pprint(self, ostream=None, verbose=False):
+ * if ostream is None: #pragma:nocover # <<<<<<<<<<<<<<
+ * ostream = sys.stdout
+ * ostream.write(str(self))
+ */
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":855
+ * if ostream is None: #pragma:nocover
+ * ostream = sys.stdout
+ * ostream.write(str(self)) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ostream, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 855, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 855, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_self);
+ __Pyx_GIVEREF(__pyx_v_self);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self);
+ __pyx_t_6 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 855, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 855, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 855, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":852
+ * return self.value
+ *
+ * def pprint(self, ostream=None, verbose=False): # <<<<<<<<<<<<<<
+ * if ostream is None: #pragma:nocover
+ * ostream = sys.stdout
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.core.expr.numvalue.NumericConstant.pprint", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_ostream);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyMethodDef __pyx_methods[] = {
+ {0, 0, 0, 0}
+};
+
+#if PY_MAJOR_VERSION >= 3
+#if CYTHON_PEP489_MULTI_PHASE_INIT
+static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
+static int __pyx_pymod_exec_numvalue(PyObject* module); /*proto*/
+static PyModuleDef_Slot __pyx_moduledef_slots[] = {
+ {Py_mod_create, (void*)__pyx_pymod_create},
+ {Py_mod_exec, (void*)__pyx_pymod_exec_numvalue},
+ {0, NULL}
+};
+#endif
+
+static struct PyModuleDef __pyx_moduledef = {
+ PyModuleDef_HEAD_INIT,
+ "numvalue",
+ 0, /* m_doc */
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ 0, /* m_size */
+ #else
+ -1, /* m_size */
+ #endif
+ __pyx_methods /* m_methods */,
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ __pyx_moduledef_slots, /* m_slots */
+ #else
+ NULL, /* m_reload */
+ #endif
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL /* m_free */
+};
+#endif
+
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+ {&__pyx_kp_s_An_object_that_contains_a_consta, __pyx_k_An_object_that_contains_a_consta, sizeof(__pyx_k_An_object_that_contains_a_consta), 0, 0, 1, 0},
+ {&__pyx_kp_s_An_object_that_contains_a_non_nu, __pyx_k_An_object_that_contains_a_non_nu, sizeof(__pyx_k_An_object_that_contains_a_non_nu), 0, 0, 1, 0},
+ {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
+ {&__pyx_kp_s_Cannot_convert_object_of_type_s, __pyx_k_Cannot_convert_object_of_type_s, sizeof(__pyx_k_Cannot_convert_object_of_type_s), 0, 0, 1, 0},
+ {&__pyx_kp_s_DEPRECATED_The_cname_method_has, __pyx_k_DEPRECATED_The_cname_method_has, sizeof(__pyx_k_DEPRECATED_The_cname_method_has), 0, 0, 1, 0},
+ {&__pyx_kp_s_Implicit_conversion_of_Pyomo_Num, __pyx_k_Implicit_conversion_of_Pyomo_Num, sizeof(__pyx_k_Implicit_conversion_of_Pyomo_Num), 0, 0, 1, 0},
+ {&__pyx_kp_s_Implicit_conversion_of_Pyomo_Num_2, __pyx_k_Implicit_conversion_of_Pyomo_Num_2, sizeof(__pyx_k_Implicit_conversion_of_Pyomo_Num_2), 0, 0, 1, 0},
+ {&__pyx_n_s_KnownConstants, __pyx_k_KnownConstants, sizeof(__pyx_k_KnownConstants), 0, 0, 1, 1},
+ {&__pyx_kp_s_No_value_for_uninitialized_Numer, __pyx_k_No_value_for_uninitialized_Numer, sizeof(__pyx_k_No_value_for_uninitialized_Numer), 0, 0, 1, 0},
+ {&__pyx_n_s_NonNumericValue, __pyx_k_NonNumericValue, sizeof(__pyx_k_NonNumericValue), 0, 0, 1, 1},
+ {&__pyx_n_s_NonNumericValue___getstate, __pyx_k_NonNumericValue___getstate, sizeof(__pyx_k_NonNumericValue___getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_NonNumericValue___init, __pyx_k_NonNumericValue___init, sizeof(__pyx_k_NonNumericValue___init), 0, 0, 1, 1},
+ {&__pyx_n_s_NonNumericValue___setstate, __pyx_k_NonNumericValue___setstate, sizeof(__pyx_k_NonNumericValue___setstate), 0, 0, 1, 1},
+ {&__pyx_n_s_NonNumericValue___str, __pyx_k_NonNumericValue___str, sizeof(__pyx_k_NonNumericValue___str), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericConstant, __pyx_k_NumericConstant, sizeof(__pyx_k_NumericConstant), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericConstant___call, __pyx_k_NumericConstant___call, sizeof(__pyx_k_NumericConstant___call), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericConstant___getstate, __pyx_k_NumericConstant___getstate, sizeof(__pyx_k_NumericConstant___getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericConstant___init, __pyx_k_NumericConstant___init, sizeof(__pyx_k_NumericConstant___init), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericConstant___nonzero, __pyx_k_NumericConstant___nonzero, sizeof(__pyx_k_NumericConstant___nonzero), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericConstant___str, __pyx_k_NumericConstant___str, sizeof(__pyx_k_NumericConstant___str), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericConstant__compute_polynom, __pyx_k_NumericConstant__compute_polynom, sizeof(__pyx_k_NumericConstant__compute_polynom), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericConstant_is_constant, __pyx_k_NumericConstant_is_constant, sizeof(__pyx_k_NumericConstant_is_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericConstant_is_fixed, __pyx_k_NumericConstant_is_fixed, sizeof(__pyx_k_NumericConstant_is_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericConstant_is_potentially_v, __pyx_k_NumericConstant_is_potentially_v, sizeof(__pyx_k_NumericConstant_is_potentially_v), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericConstant_pprint, __pyx_k_NumericConstant_pprint, sizeof(__pyx_k_NumericConstant_pprint), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue, __pyx_k_NumericValue, sizeof(__pyx_k_NumericValue), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___abs, __pyx_k_NumericValue___abs, sizeof(__pyx_k_NumericValue___abs), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___add, __pyx_k_NumericValue___add, sizeof(__pyx_k_NumericValue___add), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___div, __pyx_k_NumericValue___div, sizeof(__pyx_k_NumericValue___div), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___eq, __pyx_k_NumericValue___eq, sizeof(__pyx_k_NumericValue___eq), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___float, __pyx_k_NumericValue___float, sizeof(__pyx_k_NumericValue___float), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___ge, __pyx_k_NumericValue___ge, sizeof(__pyx_k_NumericValue___ge), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___getstate, __pyx_k_NumericValue___getstate, sizeof(__pyx_k_NumericValue___getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___gt, __pyx_k_NumericValue___gt, sizeof(__pyx_k_NumericValue___gt), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___iadd, __pyx_k_NumericValue___iadd, sizeof(__pyx_k_NumericValue___iadd), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___idiv, __pyx_k_NumericValue___idiv, sizeof(__pyx_k_NumericValue___idiv), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___imul, __pyx_k_NumericValue___imul, sizeof(__pyx_k_NumericValue___imul), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___int, __pyx_k_NumericValue___int, sizeof(__pyx_k_NumericValue___int), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___ipow, __pyx_k_NumericValue___ipow, sizeof(__pyx_k_NumericValue___ipow), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___isub, __pyx_k_NumericValue___isub, sizeof(__pyx_k_NumericValue___isub), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___itruediv, __pyx_k_NumericValue___itruediv, sizeof(__pyx_k_NumericValue___itruediv), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___le, __pyx_k_NumericValue___le, sizeof(__pyx_k_NumericValue___le), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___lt, __pyx_k_NumericValue___lt, sizeof(__pyx_k_NumericValue___lt), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___mul, __pyx_k_NumericValue___mul, sizeof(__pyx_k_NumericValue___mul), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___neg, __pyx_k_NumericValue___neg, sizeof(__pyx_k_NumericValue___neg), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___pos, __pyx_k_NumericValue___pos, sizeof(__pyx_k_NumericValue___pos), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___pow, __pyx_k_NumericValue___pow, sizeof(__pyx_k_NumericValue___pow), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___radd, __pyx_k_NumericValue___radd, sizeof(__pyx_k_NumericValue___radd), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___rdiv, __pyx_k_NumericValue___rdiv, sizeof(__pyx_k_NumericValue___rdiv), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___rmul, __pyx_k_NumericValue___rmul, sizeof(__pyx_k_NumericValue___rmul), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___rpow, __pyx_k_NumericValue___rpow, sizeof(__pyx_k_NumericValue___rpow), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___rsub, __pyx_k_NumericValue___rsub, sizeof(__pyx_k_NumericValue___rsub), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___rtruediv, __pyx_k_NumericValue___rtruediv, sizeof(__pyx_k_NumericValue___rtruediv), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___setstate, __pyx_k_NumericValue___setstate, sizeof(__pyx_k_NumericValue___setstate), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___sub, __pyx_k_NumericValue___sub, sizeof(__pyx_k_NumericValue___sub), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue___truediv, __pyx_k_NumericValue___truediv, sizeof(__pyx_k_NumericValue___truediv), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue__compute_polynomial, __pyx_k_NumericValue__compute_polynomial, sizeof(__pyx_k_NumericValue__compute_polynomial), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_as_numeric, __pyx_k_NumericValue_as_numeric, sizeof(__pyx_k_NumericValue_as_numeric), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_cname, __pyx_k_NumericValue_cname, sizeof(__pyx_k_NumericValue_cname), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_getname, __pyx_k_NumericValue_getname, sizeof(__pyx_k_NumericValue_getname), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_is_constant, __pyx_k_NumericValue_is_constant, sizeof(__pyx_k_NumericValue_is_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_is_expression_type, __pyx_k_NumericValue_is_expression_type, sizeof(__pyx_k_NumericValue_is_expression_type), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_is_fixed, __pyx_k_NumericValue_is_fixed, sizeof(__pyx_k_NumericValue_is_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_is_indexed, __pyx_k_NumericValue_is_indexed, sizeof(__pyx_k_NumericValue_is_indexed), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_is_named_expression, __pyx_k_NumericValue_is_named_expression, sizeof(__pyx_k_NumericValue_is_named_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_is_potentially_vari, __pyx_k_NumericValue_is_potentially_vari, sizeof(__pyx_k_NumericValue_is_potentially_vari), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_is_relational, __pyx_k_NumericValue_is_relational, sizeof(__pyx_k_NumericValue_is_relational), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_is_variable_type, __pyx_k_NumericValue_is_variable_type, sizeof(__pyx_k_NumericValue_is_variable_type), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_local_name, __pyx_k_NumericValue_local_name, sizeof(__pyx_k_NumericValue_local_name), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_name, __pyx_k_NumericValue_name, sizeof(__pyx_k_NumericValue_name), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_polynomial_degree, __pyx_k_NumericValue_polynomial_degree, sizeof(__pyx_k_NumericValue_polynomial_degree), 0, 0, 1, 1},
+ {&__pyx_n_s_NumericValue_to_string, __pyx_k_NumericValue_to_string, sizeof(__pyx_k_NumericValue_to_string), 0, 0, 1, 1},
+ {&__pyx_kp_s_Numeric_Constant_value_is_undefi, __pyx_k_Numeric_Constant_value_is_undefi, sizeof(__pyx_k_Numeric_Constant_value_is_undefi), 0, 0, 1, 0},
+ {&__pyx_n_s_PY3, __pyx_k_PY3, sizeof(__pyx_k_PY3), 0, 0, 1, 1},
+ {&__pyx_n_s_RegisterBooleanType, __pyx_k_RegisterBooleanType, sizeof(__pyx_k_RegisterBooleanType), 0, 0, 1, 1},
+ {&__pyx_n_s_RegisterIntegerType, __pyx_k_RegisterIntegerType, sizeof(__pyx_k_RegisterIntegerType), 0, 0, 1, 1},
+ {&__pyx_n_s_RegisterNumericType, __pyx_k_RegisterNumericType, sizeof(__pyx_k_RegisterNumericType), 0, 0, 1, 1},
+ {&__pyx_n_s_RuntimeError, __pyx_k_RuntimeError, sizeof(__pyx_k_RuntimeError), 0, 0, 1, 1},
+ {&__pyx_kp_s_This_is_the_base_class_for_nume, __pyx_k_This_is_the_base_class_for_nume, sizeof(__pyx_k_This_is_the_base_class_for_nume), 0, 0, 1, 0},
+ {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
+ {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+ {&__pyx_n_s_ZeroConstant, __pyx_k_ZeroConstant, sizeof(__pyx_k_ZeroConstant), 0, 0, 1, 1},
+ {&__pyx_n_s_abs, __pyx_k_abs, sizeof(__pyx_k_abs), 0, 0, 1, 1},
+ {&__pyx_n_s_abs_2, __pyx_k_abs_2, sizeof(__pyx_k_abs_2), 0, 0, 1, 1},
+ {&__pyx_n_s_add, __pyx_k_add, sizeof(__pyx_k_add), 0, 0, 1, 1},
+ {&__pyx_n_s_add_2, __pyx_k_add_2, sizeof(__pyx_k_add_2), 0, 0, 1, 1},
+ {&__pyx_n_s_add_3, __pyx_k_add_3, sizeof(__pyx_k_add_3), 0, 0, 1, 1},
+ {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
+ {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
+ {&__pyx_n_s_as_numeric, __pyx_k_as_numeric, sizeof(__pyx_k_as_numeric), 0, 0, 1, 1},
+ {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
+ {&__pyx_n_s_binary_type, __pyx_k_binary_type, sizeof(__pyx_k_binary_type), 0, 0, 1, 1},
+ {&__pyx_n_s_bool, __pyx_k_bool, sizeof(__pyx_k_bool), 0, 0, 1, 1},
+ {&__pyx_n_s_call, __pyx_k_call, sizeof(__pyx_k_call), 0, 0, 1, 1},
+ {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
+ {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
+ {&__pyx_n_s_cname, __pyx_k_cname, sizeof(__pyx_k_cname), 0, 0, 1, 1},
+ {&__pyx_n_s_compute_polynomial_degree, __pyx_k_compute_polynomial_degree, sizeof(__pyx_k_compute_polynomial_degree), 0, 0, 1, 1},
+ {&__pyx_n_s_compute_values, __pyx_k_compute_values, sizeof(__pyx_k_compute_values), 0, 0, 1, 1},
+ {&__pyx_n_s_div, __pyx_k_div, sizeof(__pyx_k_div), 0, 0, 1, 1},
+ {&__pyx_n_s_div_2, __pyx_k_div_2, sizeof(__pyx_k_div_2), 0, 0, 1, 1},
+ {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
+ {&__pyx_n_s_eq, __pyx_k_eq, sizeof(__pyx_k_eq), 0, 0, 1, 1},
+ {&__pyx_n_s_eq_2, __pyx_k_eq_2, sizeof(__pyx_k_eq_2), 0, 0, 1, 1},
+ {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
+ {&__pyx_n_s_etype, __pyx_k_etype, sizeof(__pyx_k_etype), 0, 0, 1, 1},
+ {&__pyx_kp_s_evaluating_object_as_numeric_val, __pyx_k_evaluating_object_as_numeric_val, sizeof(__pyx_k_evaluating_object_as_numeric_val), 0, 0, 1, 0},
+ {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1},
+ {&__pyx_n_s_exception, __pyx_k_exception, sizeof(__pyx_k_exception), 0, 0, 1, 1},
+ {&__pyx_n_s_float, __pyx_k_float, sizeof(__pyx_k_float), 0, 0, 1, 1},
+ {&__pyx_n_s_fully_qualified, __pyx_k_fully_qualified, sizeof(__pyx_k_fully_qualified), 0, 0, 1, 1},
+ {&__pyx_n_s_ge, __pyx_k_ge, sizeof(__pyx_k_ge), 0, 0, 1, 1},
+ {&__pyx_n_s_generate_mul_expression, __pyx_k_generate_mul_expression, sizeof(__pyx_k_generate_mul_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_generate_other_expression, __pyx_k_generate_other_expression, sizeof(__pyx_k_generate_other_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_generate_relational_expression, __pyx_k_generate_relational_expression, sizeof(__pyx_k_generate_relational_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_generate_sum_expression, __pyx_k_generate_sum_expression, sizeof(__pyx_k_generate_sum_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_getLogger, __pyx_k_getLogger, sizeof(__pyx_k_getLogger), 0, 0, 1, 1},
+ {&__pyx_n_s_getSymbol, __pyx_k_getSymbol, sizeof(__pyx_k_getSymbol), 0, 0, 1, 1},
+ {&__pyx_n_s_getname, __pyx_k_getname, sizeof(__pyx_k_getname), 0, 0, 1, 1},
+ {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_gt, __pyx_k_gt, sizeof(__pyx_k_gt), 0, 0, 1, 1},
+ {&__pyx_n_s_hash, __pyx_k_hash, sizeof(__pyx_k_hash), 0, 0, 1, 1},
+ {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
+ {&__pyx_n_s_iadd, __pyx_k_iadd, sizeof(__pyx_k_iadd), 0, 0, 1, 1},
+ {&__pyx_n_s_iadd_2, __pyx_k_iadd_2, sizeof(__pyx_k_iadd_2), 0, 0, 1, 1},
+ {&__pyx_n_s_idiv, __pyx_k_idiv, sizeof(__pyx_k_idiv), 0, 0, 1, 1},
+ {&__pyx_n_s_idiv_2, __pyx_k_idiv_2, sizeof(__pyx_k_idiv_2), 0, 0, 1, 1},
+ {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+ {&__pyx_n_s_imul, __pyx_k_imul, sizeof(__pyx_k_imul), 0, 0, 1, 1},
+ {&__pyx_n_s_imul_2, __pyx_k_imul_2, sizeof(__pyx_k_imul_2), 0, 0, 1, 1},
+ {&__pyx_kp_s_incomplete_import_of_Pyomo_expre, __pyx_k_incomplete_import_of_Pyomo_expre, sizeof(__pyx_k_incomplete_import_of_Pyomo_expre), 0, 0, 1, 0},
+ {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
+ {&__pyx_n_s_inplace, __pyx_k_inplace, sizeof(__pyx_k_inplace), 0, 0, 1, 1},
+ {&__pyx_n_s_int, __pyx_k_int, sizeof(__pyx_k_int), 0, 0, 1, 1},
+ {&__pyx_n_s_ipow, __pyx_k_ipow, sizeof(__pyx_k_ipow), 0, 0, 1, 1},
+ {&__pyx_n_s_ipow_2, __pyx_k_ipow_2, sizeof(__pyx_k_ipow_2), 0, 0, 1, 1},
+ {&__pyx_n_s_is_constant, __pyx_k_is_constant, sizeof(__pyx_k_is_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_is_expression_type, __pyx_k_is_expression_type, sizeof(__pyx_k_is_expression_type), 0, 0, 1, 1},
+ {&__pyx_n_s_is_fixed, __pyx_k_is_fixed, sizeof(__pyx_k_is_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_is_indexed, __pyx_k_is_indexed, sizeof(__pyx_k_is_indexed), 0, 0, 1, 1},
+ {&__pyx_n_s_is_named_expression_type, __pyx_k_is_named_expression_type, sizeof(__pyx_k_is_named_expression_type), 0, 0, 1, 1},
+ {&__pyx_n_s_is_potentially_variable, __pyx_k_is_potentially_variable, sizeof(__pyx_k_is_potentially_variable), 0, 0, 1, 1},
+ {&__pyx_n_s_is_relational, __pyx_k_is_relational, sizeof(__pyx_k_is_relational), 0, 0, 1, 1},
+ {&__pyx_n_s_is_variable_type, __pyx_k_is_variable_type, sizeof(__pyx_k_is_variable_type), 0, 0, 1, 1},
+ {&__pyx_n_s_isub, __pyx_k_isub, sizeof(__pyx_k_isub), 0, 0, 1, 1},
+ {&__pyx_n_s_isub_2, __pyx_k_isub_2, sizeof(__pyx_k_isub_2), 0, 0, 1, 1},
+ {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
+ {&__pyx_n_s_itruediv, __pyx_k_itruediv, sizeof(__pyx_k_itruediv), 0, 0, 1, 1},
+ {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
+ {&__pyx_n_s_kwds, __pyx_k_kwds, sizeof(__pyx_k_kwds), 0, 0, 1, 1},
+ {&__pyx_n_s_labeler, __pyx_k_labeler, sizeof(__pyx_k_labeler), 0, 0, 1, 1},
+ {&__pyx_n_s_le, __pyx_k_le, sizeof(__pyx_k_le), 0, 0, 1, 1},
+ {&__pyx_n_s_le_2, __pyx_k_le_2, sizeof(__pyx_k_le_2), 0, 0, 1, 1},
+ {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
+ {&__pyx_n_s_local_name, __pyx_k_local_name, sizeof(__pyx_k_local_name), 0, 0, 1, 1},
+ {&__pyx_n_s_logger, __pyx_k_logger, sizeof(__pyx_k_logger), 0, 0, 1, 1},
+ {&__pyx_n_s_logging, __pyx_k_logging, sizeof(__pyx_k_logging), 0, 0, 1, 1},
+ {&__pyx_n_s_lt, __pyx_k_lt, sizeof(__pyx_k_lt), 0, 0, 1, 1},
+ {&__pyx_n_s_lt_2, __pyx_k_lt_2, sizeof(__pyx_k_lt_2), 0, 0, 1, 1},
+ {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+ {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
+ {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
+ {&__pyx_n_s_mul, __pyx_k_mul, sizeof(__pyx_k_mul), 0, 0, 1, 1},
+ {&__pyx_n_s_mul_2, __pyx_k_mul_2, sizeof(__pyx_k_mul_2), 0, 0, 1, 1},
+ {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
+ {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
+ {&__pyx_n_s_name_buffer, __pyx_k_name_buffer, sizeof(__pyx_k_name_buffer), 0, 0, 1, 1},
+ {&__pyx_n_s_native_boolean_types, __pyx_k_native_boolean_types, sizeof(__pyx_k_native_boolean_types), 0, 0, 1, 1},
+ {&__pyx_n_s_native_integer_types, __pyx_k_native_integer_types, sizeof(__pyx_k_native_integer_types), 0, 0, 1, 1},
+ {&__pyx_n_s_native_numeric_types, __pyx_k_native_numeric_types, sizeof(__pyx_k_native_numeric_types), 0, 0, 1, 1},
+ {&__pyx_n_s_native_types, __pyx_k_native_types, sizeof(__pyx_k_native_types), 0, 0, 1, 1},
+ {&__pyx_n_s_neg, __pyx_k_neg, sizeof(__pyx_k_neg), 0, 0, 1, 1},
+ {&__pyx_n_s_neg_2, __pyx_k_neg_2, sizeof(__pyx_k_neg_2), 0, 0, 1, 1},
+ {&__pyx_n_s_new_type, __pyx_k_new_type, sizeof(__pyx_k_new_type), 0, 0, 1, 1},
+ {&__pyx_n_s_nonpyomo_leaf_types, __pyx_k_nonpyomo_leaf_types, sizeof(__pyx_k_nonpyomo_leaf_types), 0, 0, 1, 1},
+ {&__pyx_n_s_nonzero, __pyx_k_nonzero, sizeof(__pyx_k_nonzero), 0, 0, 1, 1},
+ {&__pyx_n_s_numeric, __pyx_k_numeric, sizeof(__pyx_k_numeric), 0, 0, 1, 1},
+ {&__pyx_n_s_obj, __pyx_k_obj, sizeof(__pyx_k_obj), 0, 0, 1, 1},
+ {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
+ {&__pyx_n_s_ostream, __pyx_k_ostream, sizeof(__pyx_k_ostream), 0, 0, 1, 1},
+ {&__pyx_n_s_other, __pyx_k_other, sizeof(__pyx_k_other), 0, 0, 1, 1},
+ {&__pyx_n_s_other_2, __pyx_k_other_2, sizeof(__pyx_k_other_2), 0, 0, 1, 1},
+ {&__pyx_n_s_polynomial_degree, __pyx_k_polynomial_degree, sizeof(__pyx_k_polynomial_degree), 0, 0, 1, 1},
+ {&__pyx_n_s_pos, __pyx_k_pos, sizeof(__pyx_k_pos), 0, 0, 1, 1},
+ {&__pyx_n_s_potentially_variable, __pyx_k_potentially_variable, sizeof(__pyx_k_potentially_variable), 0, 0, 1, 1},
+ {&__pyx_n_s_pow, __pyx_k_pow, sizeof(__pyx_k_pow), 0, 0, 1, 1},
+ {&__pyx_n_s_pow_2, __pyx_k_pow_2, sizeof(__pyx_k_pow_2), 0, 0, 1, 1},
+ {&__pyx_n_s_pprint, __pyx_k_pprint, sizeof(__pyx_k_pprint), 0, 0, 1, 1},
+ {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
+ {&__pyx_n_s_property, __pyx_k_property, sizeof(__pyx_k_property), 0, 0, 1, 1},
+ {&__pyx_kp_s_pyomo_core, __pyx_k_pyomo_core, sizeof(__pyx_k_pyomo_core), 0, 0, 1, 0},
+ {&__pyx_n_s_pyomo_core_expr_expr_common, __pyx_k_pyomo_core_expr_expr_common, sizeof(__pyx_k_pyomo_core_expr_expr_common), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_expr_numvalue, __pyx_k_pyomo_core_expr_numvalue, sizeof(__pyx_k_pyomo_core_expr_numvalue), 0, 0, 1, 1},
+ {&__pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_k_pyomo_core_expr_numvalue_pyx, sizeof(__pyx_k_pyomo_core_expr_numvalue_pyx), 0, 0, 1, 0},
+ {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
+ {&__pyx_n_s_radd, __pyx_k_radd, sizeof(__pyx_k_radd), 0, 0, 1, 1},
+ {&__pyx_n_s_radd_2, __pyx_k_radd_2, sizeof(__pyx_k_radd_2), 0, 0, 1, 1},
+ {&__pyx_n_s_rdiv, __pyx_k_rdiv, sizeof(__pyx_k_rdiv), 0, 0, 1, 1},
+ {&__pyx_n_s_rdiv_2, __pyx_k_rdiv_2, sizeof(__pyx_k_rdiv_2), 0, 0, 1, 1},
+ {&__pyx_n_s_result, __pyx_k_result, sizeof(__pyx_k_result), 0, 0, 1, 1},
+ {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
+ {&__pyx_n_s_rmul, __pyx_k_rmul, sizeof(__pyx_k_rmul), 0, 0, 1, 1},
+ {&__pyx_n_s_rmul_2, __pyx_k_rmul_2, sizeof(__pyx_k_rmul_2), 0, 0, 1, 1},
+ {&__pyx_n_s_rpow, __pyx_k_rpow, sizeof(__pyx_k_rpow), 0, 0, 1, 1},
+ {&__pyx_n_s_rpow_2, __pyx_k_rpow_2, sizeof(__pyx_k_rpow_2), 0, 0, 1, 1},
+ {&__pyx_n_s_rsub, __pyx_k_rsub, sizeof(__pyx_k_rsub), 0, 0, 1, 1},
+ {&__pyx_n_s_rsub_2, __pyx_k_rsub_2, sizeof(__pyx_k_rsub_2), 0, 0, 1, 1},
+ {&__pyx_n_s_rtruediv, __pyx_k_rtruediv, sizeof(__pyx_k_rtruediv), 0, 0, 1, 1},
+ {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
+ {&__pyx_n_s_self_2, __pyx_k_self_2, sizeof(__pyx_k_self_2), 0, 0, 1, 1},
+ {&__pyx_n_s_setattr, __pyx_k_setattr, sizeof(__pyx_k_setattr), 0, 0, 1, 1},
+ {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
+ {&__pyx_n_s_six, __pyx_k_six, sizeof(__pyx_k_six), 0, 0, 1, 1},
+ {&__pyx_n_s_slots, __pyx_k_slots, sizeof(__pyx_k_slots), 0, 0, 1, 1},
+ {&__pyx_n_s_smap, __pyx_k_smap, sizeof(__pyx_k_smap), 0, 0, 1, 1},
+ {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
+ {&__pyx_n_s_stdout, __pyx_k_stdout, sizeof(__pyx_k_stdout), 0, 0, 1, 1},
+ {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
+ {&__pyx_n_s_string_types, __pyx_k_string_types, sizeof(__pyx_k_string_types), 0, 0, 1, 1},
+ {&__pyx_n_s_sub, __pyx_k_sub, sizeof(__pyx_k_sub), 0, 0, 1, 1},
+ {&__pyx_n_s_sub_2, __pyx_k_sub_2, sizeof(__pyx_k_sub_2), 0, 0, 1, 1},
+ {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
+ {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
+ {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+ {&__pyx_n_s_text_type, __pyx_k_text_type, sizeof(__pyx_k_text_type), 0, 0, 1, 1},
+ {&__pyx_n_s_tmp, __pyx_k_tmp, sizeof(__pyx_k_tmp), 0, 0, 1, 1},
+ {&__pyx_n_s_to_string, __pyx_k_to_string, sizeof(__pyx_k_to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_truediv, __pyx_k_truediv, sizeof(__pyx_k_truediv), 0, 0, 1, 1},
+ {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
+ {&__pyx_n_s_update_KnownConstants, __pyx_k_update_KnownConstants, sizeof(__pyx_k_update_KnownConstants), 0, 0, 1, 1},
+ {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
+ {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
+ {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1},
+ {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1},
+ {&__pyx_n_s_warning, __pyx_k_warning, sizeof(__pyx_k_warning), 0, 0, 1, 1},
+ {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
+ {0, 0, 0, 0, 0, 0, 0}
+};
+static int __Pyx_InitCachedBuiltins(void) {
+ __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 41, __pyx_L1_error)
+ __pyx_builtin_property = __Pyx_GetBuiltinName(__pyx_n_s_property); if (!__pyx_builtin_property) __PYX_ERR(0, 412, __pyx_L1_error)
+ __pyx_builtin_RuntimeError = __Pyx_GetBuiltinName(__pyx_n_s_RuntimeError); if (!__pyx_builtin_RuntimeError) __PYX_ERR(0, 27, __pyx_L1_error)
+ __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 185, __pyx_L1_error)
+ __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 188, __pyx_L1_error)
+ __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(0, 338, __pyx_L1_error)
+ __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 375, __pyx_L1_error)
+ return 0;
+ __pyx_L1_error:;
+ return -1;
+}
+
+static int __Pyx_InitCachedConstants(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+
+ /* "pyomo/core/expr/numvalue.pyx":27
+ *
+ * def _generate_sum_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover # <<<<<<<<<<<<<<
+ * def _generate_mul_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ */
+ __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_incomplete_import_of_Pyomo_expre); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple_);
+ __Pyx_GIVEREF(__pyx_tuple_);
+
+ /* "pyomo/core/expr/numvalue.pyx":29
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_mul_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover # <<<<<<<<<<<<<<
+ * def _generate_other_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ */
+ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_incomplete_import_of_Pyomo_expre); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 29, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__2);
+ __Pyx_GIVEREF(__pyx_tuple__2);
+
+ /* "pyomo/core/expr/numvalue.pyx":31
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_other_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover # <<<<<<<<<<<<<<
+ * def _generate_relational_expression(etype, lhs, rhs):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ */
+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_incomplete_import_of_Pyomo_expre); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 31, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__3);
+ __Pyx_GIVEREF(__pyx_tuple__3);
+
+ /* "pyomo/core/expr/numvalue.pyx":33
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_relational_expression(etype, lhs, rhs):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover # <<<<<<<<<<<<<<
+ *
+ * ##------------------------------------------------------------------------
+ */
+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_incomplete_import_of_Pyomo_expre); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 33, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__4);
+ __Pyx_GIVEREF(__pyx_tuple__4);
+
+ /* "pyomo/core/expr/numvalue.pyx":421
+ *
+ * def cname(self, *args, **kwds):
+ * logger.warning( # <<<<<<<<<<<<<<
+ * "DEPRECATED: The cname() method has been renamed to getname()." )
+ * return self.getname(*args, **kwds)
+ */
+ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_DEPRECATED_The_cname_method_has); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 421, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__5);
+ __Pyx_GIVEREF(__pyx_tuple__5);
+
+ /* "pyomo/core/expr/numvalue.pyx":469
+ * :const:`None`
+ * """
+ * return self._compute_polynomial_degree(None) # <<<<<<<<<<<<<<
+ *
+ * def _compute_polynomial_degree(self, values):
+ */
+ __pyx_tuple__6 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 469, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__6);
+ __Pyx_GIVEREF(__pyx_tuple__6);
+
+ /* "pyomo/core/expr/numvalue.pyx":843
+ * return True
+ * if self.value is None:
+ * raise ValueError("Numeric Constant: value is undefined") # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_Numeric_Constant_value_is_undefi); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 843, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__7);
+ __Pyx_GIVEREF(__pyx_tuple__7);
+
+ /* "pyomo/core/expr/numvalue.pyx":11
+ * # ___________________________________________________________________________
+ *
+ * __all__ = ('value', 'is_constant', 'is_fixed', 'is_variable_type', 'potentially_variable', 'update_KnownConstants', 'as_numeric', 'NumericValue', 'NumericConstant', 'ZeroConstant', 'native_numeric_types', 'native_types') # <<<<<<<<<<<<<<
+ *
+ * import sys
+ */
+ __pyx_tuple__8 = PyTuple_Pack(12, __pyx_n_s_value, __pyx_n_s_is_constant, __pyx_n_s_is_fixed, __pyx_n_s_is_variable_type, __pyx_n_s_potentially_variable, __pyx_n_s_update_KnownConstants, __pyx_n_s_as_numeric, __pyx_n_s_NumericValue, __pyx_n_s_NumericConstant, __pyx_n_s_ZeroConstant, __pyx_n_s_native_numeric_types, __pyx_n_s_native_types); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 11, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__8);
+ __Pyx_GIVEREF(__pyx_tuple__8);
+
+ /* "pyomo/core/expr/numvalue.pyx":24
+ * _ipow, _lt, _le, _eq)
+ *
+ * logger = logging.getLogger('pyomo.core') # <<<<<<<<<<<<<<
+ *
+ * def _generate_sum_expression(etype, _self, _other):
+ */
+ __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_pyomo_core); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 24, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__9);
+ __Pyx_GIVEREF(__pyx_tuple__9);
+
+ /* "pyomo/core/expr/numvalue.pyx":26
+ * logger = logging.getLogger('pyomo.core')
+ *
+ * def _generate_sum_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_mul_expression(etype, _self, _other):
+ */
+ __pyx_tuple__10 = PyTuple_Pack(3, __pyx_n_s_etype, __pyx_n_s_self, __pyx_n_s_other); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 26, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__10);
+ __Pyx_GIVEREF(__pyx_tuple__10);
+ __pyx_codeobj__11 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__10, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_generate_sum_expression, 26, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__11)) __PYX_ERR(0, 26, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":28
+ * def _generate_sum_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_mul_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_other_expression(etype, _self, _other):
+ */
+ __pyx_tuple__12 = PyTuple_Pack(3, __pyx_n_s_etype, __pyx_n_s_self, __pyx_n_s_other); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 28, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__12);
+ __Pyx_GIVEREF(__pyx_tuple__12);
+ __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_generate_mul_expression, 28, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 28, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":30
+ * def _generate_mul_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_other_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_relational_expression(etype, lhs, rhs):
+ */
+ __pyx_tuple__14 = PyTuple_Pack(3, __pyx_n_s_etype, __pyx_n_s_self, __pyx_n_s_other); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 30, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__14);
+ __Pyx_GIVEREF(__pyx_tuple__14);
+ __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_generate_other_expression, 30, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 30, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":32
+ * def _generate_other_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_relational_expression(etype, lhs, rhs): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ *
+ */
+ __pyx_tuple__16 = PyTuple_Pack(3, __pyx_n_s_etype, __pyx_n_s_lhs, __pyx_n_s_rhs); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 32, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__16);
+ __Pyx_GIVEREF(__pyx_tuple__16);
+ __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_generate_relational_expression, 32, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 32, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":41
+ * ##------------------------------------------------------------------------
+ *
+ * class NonNumericValue(object): # <<<<<<<<<<<<<<
+ * """An object that contains a non-numeric value
+ *
+ */
+ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 41, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__18);
+ __Pyx_GIVEREF(__pyx_tuple__18);
+
+ /* "pyomo/core/expr/numvalue.pyx":47
+ * value The initial value.
+ * """
+ * __slots__ = ('value',) # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, value):
+ */
+ __pyx_tuple__19 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__19)) __PYX_ERR(0, 47, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__19);
+ __Pyx_GIVEREF(__pyx_tuple__19);
+
+ /* "pyomo/core/expr/numvalue.pyx":49
+ * __slots__ = ('value',)
+ *
+ * def __init__(self, value): # <<<<<<<<<<<<<<
+ * self.value = value
+ *
+ */
+ __pyx_tuple__20 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_value); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 49, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__20);
+ __Pyx_GIVEREF(__pyx_tuple__20);
+ __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_init, 49, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 49, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":52
+ * self.value = value
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return str(self.value)
+ *
+ */
+ __pyx_tuple__22 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 52, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__22);
+ __Pyx_GIVEREF(__pyx_tuple__22);
+ __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_str, 52, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 52, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":55
+ * return str(self.value)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = {}
+ * state['value'] = getattr(self,'value')
+ */
+ __pyx_tuple__24 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_state); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 55, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__24);
+ __Pyx_GIVEREF(__pyx_tuple__24);
+ __pyx_codeobj__25 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__24, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_getstate, 55, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__25)) __PYX_ERR(0, 55, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":60
+ * return state
+ *
+ * def __setstate__(self, state): # <<<<<<<<<<<<<<
+ * setattr(self, 'value', state['value'])
+ *
+ */
+ __pyx_tuple__26 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_state); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 60, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__26);
+ __Pyx_GIVEREF(__pyx_tuple__26);
+ __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_setstate, 60, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 60, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":116
+ * nonpyomo_leaf_types.update( native_types )
+ *
+ * def RegisterNumericType(new_type): # <<<<<<<<<<<<<<
+ * """
+ * A utility function for updating the set of types that are
+ */
+ __pyx_tuple__28 = PyTuple_Pack(1, __pyx_n_s_new_type); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 116, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__28);
+ __Pyx_GIVEREF(__pyx_tuple__28);
+ __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__28, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_RegisterNumericType, 116, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 116, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":129
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ * def RegisterIntegerType(new_type): # <<<<<<<<<<<<<<
+ * """
+ * A utility function for updating the set of types that are
+ */
+ __pyx_tuple__30 = PyTuple_Pack(1, __pyx_n_s_new_type); if (unlikely(!__pyx_tuple__30)) __PYX_ERR(0, 129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__30);
+ __Pyx_GIVEREF(__pyx_tuple__30);
+ __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__30, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_RegisterIntegerType, 129, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 129, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":145
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ * def RegisterBooleanType(new_type): # <<<<<<<<<<<<<<
+ * """
+ * A utility function for updating the set of types that are
+ */
+ __pyx_tuple__32 = PyTuple_Pack(1, __pyx_n_s_new_type); if (unlikely(!__pyx_tuple__32)) __PYX_ERR(0, 145, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__32);
+ __Pyx_GIVEREF(__pyx_tuple__32);
+ __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__32, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_RegisterBooleanType, 145, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(0, 145, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":159
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ * def value(obj, exception=True): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns the value of a Pyomo object or
+ */
+ __pyx_tuple__34 = PyTuple_Pack(4, __pyx_n_s_obj, __pyx_n_s_exception, __pyx_n_s_numeric, __pyx_n_s_tmp); if (unlikely(!__pyx_tuple__34)) __PYX_ERR(0, 159, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__34);
+ __Pyx_GIVEREF(__pyx_tuple__34);
+ __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_value, 159, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 159, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":210
+ *
+ *
+ * def is_constant(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean that indicates
+ */
+ __pyx_tuple__36 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__36)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__36);
+ __Pyx_GIVEREF(__pyx_tuple__36);
+ __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__36, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_is_constant, 210, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 210, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":232
+ * return as_numeric(obj).is_constant()
+ *
+ * def is_fixed(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean that indicates
+ */
+ __pyx_tuple__38 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__38)) __PYX_ERR(0, 232, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__38);
+ __Pyx_GIVEREF(__pyx_tuple__38);
+ __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__38, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_is_fixed, 232, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(0, 232, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":249
+ * return as_numeric(obj).is_fixed()
+ *
+ * def is_variable_type(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean indicating
+ */
+ __pyx_tuple__40 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__40)) __PYX_ERR(0, 249, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__40);
+ __Pyx_GIVEREF(__pyx_tuple__40);
+ __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__40, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_is_variable_type, 249, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(0, 249, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":262
+ * return as_numeric(obj).is_variable_type()
+ *
+ * def potentially_variable(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean indicating
+ */
+ __pyx_tuple__42 = PyTuple_Pack(1, __pyx_n_s_obj); if (unlikely(!__pyx_tuple__42)) __PYX_ERR(0, 262, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__42);
+ __Pyx_GIVEREF(__pyx_tuple__42);
+ __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__42, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_potentially_variable, 262, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(0, 262, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":280
+ * KnownConstants = {}
+ *
+ * def update_KnownConstants(obj, val): # <<<<<<<<<<<<<<
+ * if len(KnownConstants) < 100:
+ * KnownConstants[obj] = val
+ */
+ __pyx_tuple__44 = PyTuple_Pack(2, __pyx_n_s_obj, __pyx_n_s_val); if (unlikely(!__pyx_tuple__44)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__44);
+ __Pyx_GIVEREF(__pyx_tuple__44);
+ __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__44, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_update_KnownConstants, 280, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(0, 280, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":285
+ *
+ *
+ * def as_numeric(obj): # <<<<<<<<<<<<<<
+ * """
+ * Verify that this obj is a NumericValue or intrinsic value.
+ */
+ __pyx_tuple__46 = PyTuple_Pack(2, __pyx_n_s_obj, __pyx_n_s_tmp); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(0, 285, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__46);
+ __Pyx_GIVEREF(__pyx_tuple__46);
+ __pyx_codeobj__47 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__46, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_as_numeric, 285, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__47)) __PYX_ERR(0, 285, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":343
+ *
+ *
+ * class NumericValue(object): # <<<<<<<<<<<<<<
+ * """
+ * This is the base class for numeric values used in Pyomo.
+ */
+ __pyx_tuple__48 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__48)) __PYX_ERR(0, 343, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__48);
+ __Pyx_GIVEREF(__pyx_tuple__48);
+
+ /* "pyomo/core/expr/numvalue.pyx":353
+ * __hash__ = None
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * """
+ * Prepare a picklable state of this instance for pickling.
+ */
+ __pyx_tuple__49 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_base); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 353, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__49);
+ __Pyx_GIVEREF(__pyx_tuple__49);
+ __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_getstate, 353, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 353, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":381
+ * return {}
+ *
+ * def __setstate__(self, state): # <<<<<<<<<<<<<<
+ * """
+ * Restore a pickled state into this instance
+ */
+ __pyx_tuple__51 = PyTuple_Pack(5, __pyx_n_s_self_2, __pyx_n_s_state, __pyx_n_s_base, __pyx_n_s_key, __pyx_n_s_val); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 381, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__51);
+ __Pyx_GIVEREF(__pyx_tuple__51);
+ __pyx_codeobj__52 = (PyObject*)__Pyx_PyCode_New(2, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__51, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_setstate, 381, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__52)) __PYX_ERR(0, 381, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":401
+ * object.__setattr__(self, key, val)
+ *
+ * def getname(self, fully_qualified=False, name_buffer=None): # <<<<<<<<<<<<<<
+ * """
+ * If this is a component, return the component's name on the owning
+ */
+ __pyx_tuple__53 = PyTuple_Pack(4, __pyx_n_s_self_2, __pyx_n_s_fully_qualified, __pyx_n_s_name_buffer, __pyx_n_s_base); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 401, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__53);
+ __Pyx_GIVEREF(__pyx_tuple__53);
+ __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(3, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_getname, 401, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 401, __pyx_L1_error)
+ __pyx_tuple__55 = PyTuple_Pack(2, ((PyObject *)Py_False), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 401, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__55);
+ __Pyx_GIVEREF(__pyx_tuple__55);
+
+ /* "pyomo/core/expr/numvalue.pyx":413
+ *
+ * @property
+ * def name(self): # <<<<<<<<<<<<<<
+ * return self.getname(fully_qualified=True)
+ *
+ */
+ __pyx_tuple__56 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 413, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__56);
+ __Pyx_GIVEREF(__pyx_tuple__56);
+ __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_name, 413, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 413, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":417
+ *
+ * @property
+ * def local_name(self): # <<<<<<<<<<<<<<
+ * return self.getname(fully_qualified=False)
+ *
+ */
+ __pyx_tuple__58 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 417, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__58);
+ __Pyx_GIVEREF(__pyx_tuple__58);
+ __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_local_name, 417, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 417, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":420
+ * return self.getname(fully_qualified=False)
+ *
+ * def cname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * logger.warning(
+ * "DEPRECATED: The cname() method has been renamed to getname()." )
+ */
+ __pyx_tuple__60 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_args, __pyx_n_s_kwds); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 420, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__60);
+ __Pyx_GIVEREF(__pyx_tuple__60);
+ __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_cname, 420, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 420, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":425
+ * return self.getname(*args, **kwds)
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is a constant value"""
+ * return False
+ */
+ __pyx_tuple__62 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__62);
+ __Pyx_GIVEREF(__pyx_tuple__62);
+ __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_is_constant, 425, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 425, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":429
+ * return False
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * """Return True if this is a non-constant value that has been fixed"""
+ * return False
+ */
+ __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__64);
+ __Pyx_GIVEREF(__pyx_tuple__64);
+ __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_is_fixed, 429, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 429, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":433
+ * return False
+ *
+ * def is_variable_type(self): # <<<<<<<<<<<<<<
+ * """Return False unless this class is a variable object"""
+ * return False
+ */
+ __pyx_tuple__66 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 433, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__66);
+ __Pyx_GIVEREF(__pyx_tuple__66);
+ __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_is_variable_type, 433, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 433, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":437
+ * return False
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * """Return True if variables can appear in this expression"""
+ * return True
+ */
+ __pyx_tuple__68 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 437, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__68);
+ __Pyx_GIVEREF(__pyx_tuple__68);
+ __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_is_potentially_variable, 437, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 437, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":441
+ * return True
+ *
+ * def is_named_expression_type(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is a named expression"""
+ * return False
+ */
+ __pyx_tuple__70 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 441, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__70);
+ __Pyx_GIVEREF(__pyx_tuple__70);
+ __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_is_named_expression_type, 441, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 441, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":445
+ * return False
+ *
+ * def is_expression_type(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is an expression"""
+ * return False
+ */
+ __pyx_tuple__72 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 445, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__72);
+ __Pyx_GIVEREF(__pyx_tuple__72);
+ __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_is_expression_type, 445, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 445, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":449
+ * return False
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * """
+ * Return True if this numeric value represents a relational expression.
+ */
+ __pyx_tuple__74 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__74);
+ __Pyx_GIVEREF(__pyx_tuple__74);
+ __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_is_relational, 449, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 449, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":455
+ * return False
+ *
+ * def is_indexed(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is an indexed object"""
+ * return False
+ */
+ __pyx_tuple__76 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 455, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__76);
+ __Pyx_GIVEREF(__pyx_tuple__76);
+ __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_is_indexed, 455, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 455, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":459
+ * return False
+ *
+ * def as_numeric(self): # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+ __pyx_tuple__78 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 459, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__78);
+ __Pyx_GIVEREF(__pyx_tuple__78);
+ __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_as_numeric, 459, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 459, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":462
+ * return self
+ *
+ * def polynomial_degree(self): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+ __pyx_tuple__80 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 462, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__80);
+ __Pyx_GIVEREF(__pyx_tuple__80);
+ __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_polynomial_degree, 462, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 462, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":471
+ * return self._compute_polynomial_degree(None)
+ *
+ * def _compute_polynomial_degree(self, values): # <<<<<<<<<<<<<<
+ * """
+ * Compute the polynomial degree of this expression given
+ */
+ __pyx_tuple__82 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_values); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__82);
+ __Pyx_GIVEREF(__pyx_tuple__82);
+ __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_compute_polynomial_degree, 471, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 471, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":485
+ * return None
+ *
+ * def __float__(self): # <<<<<<<<<<<<<<
+ * """
+ * Coerce the value to a floating point
+ */
+ __pyx_tuple__84 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__84);
+ __Pyx_GIVEREF(__pyx_tuple__84);
+ __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_float, 485, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 485, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":499
+ * functions.""" % (self.name,))
+ *
+ * def __int__(self): # <<<<<<<<<<<<<<
+ * """
+ * Coerce the value to an integer
+ */
+ __pyx_tuple__86 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 499, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__86);
+ __Pyx_GIVEREF(__pyx_tuple__86);
+ __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_int, 499, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 499, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":513
+ * functions.""" % (self.name,))
+ *
+ * def __lt__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Less than operator
+ */
+ __pyx_tuple__88 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 513, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__88);
+ __Pyx_GIVEREF(__pyx_tuple__88);
+ __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_lt_2, 513, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 513, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":524
+ * return _generate_relational_expression(_lt, self, other)
+ *
+ * def __gt__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Greater than operator
+ */
+ __pyx_tuple__90 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 524, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__90);
+ __Pyx_GIVEREF(__pyx_tuple__90);
+ __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_gt, 524, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 524, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":535
+ * return _generate_relational_expression(_lt, other, self)
+ *
+ * def __le__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Less than or equal operator
+ */
+ __pyx_tuple__92 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 535, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__92);
+ __Pyx_GIVEREF(__pyx_tuple__92);
+ __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_le_2, 535, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 535, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":546
+ * return _generate_relational_expression(_le, self, other)
+ *
+ * def __ge__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Greater than or equal operator
+ */
+ __pyx_tuple__94 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__94);
+ __Pyx_GIVEREF(__pyx_tuple__94);
+ __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_ge, 546, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 546, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":557
+ * return _generate_relational_expression(_le, other, self)
+ *
+ * def __eq__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Equal to operator
+ */
+ __pyx_tuple__96 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__96)) __PYX_ERR(0, 557, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__96);
+ __Pyx_GIVEREF(__pyx_tuple__96);
+ __pyx_codeobj__97 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__96, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_eq_2, 557, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__97)) __PYX_ERR(0, 557, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":567
+ * return _generate_relational_expression(_eq, self, other)
+ *
+ * def __add__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary addition
+ */
+ __pyx_tuple__98 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__98)) __PYX_ERR(0, 567, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__98);
+ __Pyx_GIVEREF(__pyx_tuple__98);
+ __pyx_codeobj__99 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__98, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_add_3, 567, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__99)) __PYX_ERR(0, 567, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":577
+ * return _generate_sum_expression(_add,self,other)
+ *
+ * def __sub__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary subtraction
+ */
+ __pyx_tuple__100 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__100)) __PYX_ERR(0, 577, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__100);
+ __Pyx_GIVEREF(__pyx_tuple__100);
+ __pyx_codeobj__101 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__100, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_sub_2, 577, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__101)) __PYX_ERR(0, 577, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":587
+ * return _generate_sum_expression(_sub,self,other)
+ *
+ * def __mul__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary multiplication
+ */
+ __pyx_tuple__102 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__102)) __PYX_ERR(0, 587, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__102);
+ __Pyx_GIVEREF(__pyx_tuple__102);
+ __pyx_codeobj__103 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__102, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_mul_2, 587, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__103)) __PYX_ERR(0, 587, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":597
+ * return _generate_mul_expression(_mul,self,other)
+ *
+ * def __div__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division
+ */
+ __pyx_tuple__104 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__104)) __PYX_ERR(0, 597, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__104);
+ __Pyx_GIVEREF(__pyx_tuple__104);
+ __pyx_codeobj__105 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__104, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_div_2, 597, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__105)) __PYX_ERR(0, 597, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":607
+ * return _generate_mul_expression(_div,self,other)
+ *
+ * def __truediv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division (when __future__.division is in effect)
+ */
+ __pyx_tuple__106 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__106)) __PYX_ERR(0, 607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__106);
+ __Pyx_GIVEREF(__pyx_tuple__106);
+ __pyx_codeobj__107 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__106, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_truediv, 607, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__107)) __PYX_ERR(0, 607, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":617
+ * return _generate_mul_expression(_div,self,other)
+ *
+ * def __pow__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary power
+ */
+ __pyx_tuple__108 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__108)) __PYX_ERR(0, 617, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__108);
+ __Pyx_GIVEREF(__pyx_tuple__108);
+ __pyx_codeobj__109 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__108, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_pow_2, 617, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__109)) __PYX_ERR(0, 617, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":627
+ * return _generate_other_expression(_pow,self,other)
+ *
+ * def __radd__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary addition
+ */
+ __pyx_tuple__110 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__110)) __PYX_ERR(0, 627, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__110);
+ __Pyx_GIVEREF(__pyx_tuple__110);
+ __pyx_codeobj__111 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__110, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_radd_2, 627, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__111)) __PYX_ERR(0, 627, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":637
+ * return _generate_sum_expression(_radd,self,other)
+ *
+ * def __rsub__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary subtraction
+ */
+ __pyx_tuple__112 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__112)) __PYX_ERR(0, 637, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__112);
+ __Pyx_GIVEREF(__pyx_tuple__112);
+ __pyx_codeobj__113 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__112, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_rsub_2, 637, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__113)) __PYX_ERR(0, 637, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":647
+ * return _generate_sum_expression(_rsub,self,other)
+ *
+ * def __rmul__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary multiplication
+ */
+ __pyx_tuple__114 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__114)) __PYX_ERR(0, 647, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__114);
+ __Pyx_GIVEREF(__pyx_tuple__114);
+ __pyx_codeobj__115 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__114, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_rmul_2, 647, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__115)) __PYX_ERR(0, 647, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":659
+ * return _generate_mul_expression(_rmul,self,other)
+ *
+ * def __rdiv__(self,other): # <<<<<<<<<<<<<<
+ * """Binary division
+ *
+ */
+ __pyx_tuple__116 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__116)) __PYX_ERR(0, 659, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__116);
+ __Pyx_GIVEREF(__pyx_tuple__116);
+ __pyx_codeobj__117 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__116, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_rdiv_2, 659, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__117)) __PYX_ERR(0, 659, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":668
+ * return _generate_mul_expression(_rdiv,self,other)
+ *
+ * def __rtruediv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division (when __future__.division is in effect)
+ */
+ __pyx_tuple__118 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__118)) __PYX_ERR(0, 668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__118);
+ __Pyx_GIVEREF(__pyx_tuple__118);
+ __pyx_codeobj__119 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__118, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_rtruediv, 668, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__119)) __PYX_ERR(0, 668, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":678
+ * return _generate_mul_expression(_rdiv,self,other)
+ *
+ * def __rpow__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary power
+ */
+ __pyx_tuple__120 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__120)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__120);
+ __Pyx_GIVEREF(__pyx_tuple__120);
+ __pyx_codeobj__121 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__120, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_rpow_2, 678, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__121)) __PYX_ERR(0, 678, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":688
+ * return _generate_other_expression(_rpow,self,other)
+ *
+ * def __iadd__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary addition
+ */
+ __pyx_tuple__122 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__122)) __PYX_ERR(0, 688, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__122);
+ __Pyx_GIVEREF(__pyx_tuple__122);
+ __pyx_codeobj__123 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__122, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_iadd_2, 688, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__123)) __PYX_ERR(0, 688, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":698
+ * return _generate_sum_expression(_iadd,self,other)
+ *
+ * def __isub__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary subtraction
+ */
+ __pyx_tuple__124 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__124)) __PYX_ERR(0, 698, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__124);
+ __Pyx_GIVEREF(__pyx_tuple__124);
+ __pyx_codeobj__125 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__124, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_isub_2, 698, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__125)) __PYX_ERR(0, 698, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":708
+ * return _generate_sum_expression(_isub,self,other)
+ *
+ * def __imul__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary multiplication
+ */
+ __pyx_tuple__126 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__126)) __PYX_ERR(0, 708, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__126);
+ __Pyx_GIVEREF(__pyx_tuple__126);
+ __pyx_codeobj__127 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__126, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_imul_2, 708, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__127)) __PYX_ERR(0, 708, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":718
+ * return _generate_mul_expression(_imul,self,other)
+ *
+ * def __idiv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division
+ */
+ __pyx_tuple__128 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__128)) __PYX_ERR(0, 718, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__128);
+ __Pyx_GIVEREF(__pyx_tuple__128);
+ __pyx_codeobj__129 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__128, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_idiv_2, 718, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__129)) __PYX_ERR(0, 718, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":728
+ * return _generate_mul_expression(_idiv,self,other)
+ *
+ * def __itruediv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division (when __future__.division is in effect)
+ */
+ __pyx_tuple__130 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__130)) __PYX_ERR(0, 728, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__130);
+ __Pyx_GIVEREF(__pyx_tuple__130);
+ __pyx_codeobj__131 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__130, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_itruediv, 728, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__131)) __PYX_ERR(0, 728, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":738
+ * return _generate_mul_expression(_idiv,self,other)
+ *
+ * def __ipow__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary power
+ */
+ __pyx_tuple__132 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_other_2); if (unlikely(!__pyx_tuple__132)) __PYX_ERR(0, 738, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__132);
+ __Pyx_GIVEREF(__pyx_tuple__132);
+ __pyx_codeobj__133 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__132, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_ipow_2, 738, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__133)) __PYX_ERR(0, 738, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":748
+ * return _generate_other_expression(_ipow,self,other)
+ *
+ * def __neg__(self): # <<<<<<<<<<<<<<
+ * """
+ * Negation
+ */
+ __pyx_tuple__134 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__134)) __PYX_ERR(0, 748, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__134);
+ __Pyx_GIVEREF(__pyx_tuple__134);
+ __pyx_codeobj__135 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__134, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_neg_2, 748, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__135)) __PYX_ERR(0, 748, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":758
+ * return _generate_sum_expression(_neg, self, None)
+ *
+ * def __pos__(self): # <<<<<<<<<<<<<<
+ * """
+ * Positive expression
+ */
+ __pyx_tuple__136 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__136)) __PYX_ERR(0, 758, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__136);
+ __Pyx_GIVEREF(__pyx_tuple__136);
+ __pyx_codeobj__137 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__136, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_pos, 758, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__137)) __PYX_ERR(0, 758, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":768
+ * return self
+ *
+ * def __abs__(self): # <<<<<<<<<<<<<<
+ * """ Absolute value
+ *
+ */
+ __pyx_tuple__138 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__138)) __PYX_ERR(0, 768, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__138);
+ __Pyx_GIVEREF(__pyx_tuple__138);
+ __pyx_codeobj__139 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__138, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_abs_2, 768, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__139)) __PYX_ERR(0, 768, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":777
+ * return _generate_other_expression(_abs,self, None)
+ *
+ * def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False): # <<<<<<<<<<<<<<
+ * """
+ * Return a string representation of the expression tree.
+ */
+ __pyx_tuple__140 = PyTuple_Pack(5, __pyx_n_s_self_2, __pyx_n_s_verbose, __pyx_n_s_labeler, __pyx_n_s_smap, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__140)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__140);
+ __Pyx_GIVEREF(__pyx_tuple__140);
+ __pyx_codeobj__141 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__140, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_to_string, 777, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__141)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __pyx_tuple__142 = PyTuple_Pack(4, ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__142)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__142);
+ __Pyx_GIVEREF(__pyx_tuple__142);
+
+ /* "pyomo/core/expr/numvalue.pyx":812
+ * """
+ *
+ * __slots__ = ('value',) # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, value):
+ */
+ __pyx_tuple__143 = PyTuple_Pack(1, __pyx_n_s_value); if (unlikely(!__pyx_tuple__143)) __PYX_ERR(0, 812, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__143);
+ __Pyx_GIVEREF(__pyx_tuple__143);
+
+ /* "pyomo/core/expr/numvalue.pyx":814
+ * __slots__ = ('value',)
+ *
+ * def __init__(self, value): # <<<<<<<<<<<<<<
+ * self.value = value
+ *
+ */
+ __pyx_tuple__144 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_value); if (unlikely(!__pyx_tuple__144)) __PYX_ERR(0, 814, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__144);
+ __Pyx_GIVEREF(__pyx_tuple__144);
+ __pyx_codeobj__145 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__144, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_init, 814, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__145)) __PYX_ERR(0, 814, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":817
+ * self.value = value
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(NumericConstant, self).__getstate__()
+ * for i in NumericConstant.__slots__:
+ */
+ __pyx_tuple__146 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_state, __pyx_n_s_i); if (unlikely(!__pyx_tuple__146)) __PYX_ERR(0, 817, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__146);
+ __Pyx_GIVEREF(__pyx_tuple__146);
+ __pyx_codeobj__147 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__146, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_getstate, 817, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__147)) __PYX_ERR(0, 817, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":823
+ * return state
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+ __pyx_tuple__148 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__148)) __PYX_ERR(0, 823, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__148);
+ __Pyx_GIVEREF(__pyx_tuple__148);
+ __pyx_codeobj__149 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__148, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_is_constant, 823, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__149)) __PYX_ERR(0, 823, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":826
+ * return True
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+ __pyx_tuple__150 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__150)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__150);
+ __Pyx_GIVEREF(__pyx_tuple__150);
+ __pyx_codeobj__151 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__150, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_is_fixed, 826, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__151)) __PYX_ERR(0, 826, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":829
+ * return True
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_tuple__152 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__152)) __PYX_ERR(0, 829, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__152);
+ __Pyx_GIVEREF(__pyx_tuple__152);
+ __pyx_codeobj__153 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__152, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_is_potentially_variable, 829, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__153)) __PYX_ERR(0, 829, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":832
+ * return False
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * return 0
+ *
+ */
+ __pyx_tuple__154 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_result); if (unlikely(!__pyx_tuple__154)) __PYX_ERR(0, 832, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__154);
+ __Pyx_GIVEREF(__pyx_tuple__154);
+ __pyx_codeobj__155 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__154, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_compute_polynomial_degree, 832, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__155)) __PYX_ERR(0, 832, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":835
+ * return 0
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return str(self.value)
+ *
+ */
+ __pyx_tuple__156 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__156)) __PYX_ERR(0, 835, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__156);
+ __Pyx_GIVEREF(__pyx_tuple__156);
+ __pyx_codeobj__157 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__156, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_str, 835, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__157)) __PYX_ERR(0, 835, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":838
+ * return str(self.value)
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * """Return True if the value is defined and non-zero"""
+ * if self.value:
+ */
+ __pyx_tuple__158 = PyTuple_Pack(1, __pyx_n_s_self_2); if (unlikely(!__pyx_tuple__158)) __PYX_ERR(0, 838, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__158);
+ __Pyx_GIVEREF(__pyx_tuple__158);
+ __pyx_codeobj__159 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__158, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_nonzero, 838, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__159)) __PYX_ERR(0, 838, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":848
+ * __bool__ = __nonzero__
+ *
+ * def __call__(self, exception=True): # <<<<<<<<<<<<<<
+ * """Return the constant value"""
+ * return self.value
+ */
+ __pyx_tuple__160 = PyTuple_Pack(2, __pyx_n_s_self_2, __pyx_n_s_exception); if (unlikely(!__pyx_tuple__160)) __PYX_ERR(0, 848, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__160);
+ __Pyx_GIVEREF(__pyx_tuple__160);
+ __pyx_codeobj__161 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__160, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_call, 848, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__161)) __PYX_ERR(0, 848, __pyx_L1_error)
+ __pyx_tuple__162 = PyTuple_Pack(1, ((PyObject *)Py_True)); if (unlikely(!__pyx_tuple__162)) __PYX_ERR(0, 848, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__162);
+ __Pyx_GIVEREF(__pyx_tuple__162);
+
+ /* "pyomo/core/expr/numvalue.pyx":852
+ * return self.value
+ *
+ * def pprint(self, ostream=None, verbose=False): # <<<<<<<<<<<<<<
+ * if ostream is None: #pragma:nocover
+ * ostream = sys.stdout
+ */
+ __pyx_tuple__163 = PyTuple_Pack(3, __pyx_n_s_self_2, __pyx_n_s_ostream, __pyx_n_s_verbose); if (unlikely(!__pyx_tuple__163)) __PYX_ERR(0, 852, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__163);
+ __Pyx_GIVEREF(__pyx_tuple__163);
+ __pyx_codeobj__164 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__163, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_expr_numvalue_pyx, __pyx_n_s_pprint, 852, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__164)) __PYX_ERR(0, 852, __pyx_L1_error)
+ __pyx_tuple__165 = PyTuple_Pack(2, ((PyObject *)Py_None), ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__165)) __PYX_ERR(0, 852, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__165);
+ __Pyx_GIVEREF(__pyx_tuple__165);
+
+ /* "pyomo/core/expr/numvalue.pyx":859
+ *
+ * # We use as_numeric() so that the constant is also in the cache
+ * ZeroConstant = as_numeric(0) # <<<<<<<<<<<<<<
+ */
+ __pyx_tuple__166 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__166)) __PYX_ERR(0, 859, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__166);
+ __Pyx_GIVEREF(__pyx_tuple__166);
+ __Pyx_RefNannyFinishContext();
+ return 0;
+ __pyx_L1_error:;
+ __Pyx_RefNannyFinishContext();
+ return -1;
+}
+
+static int __Pyx_InitGlobals(void) {
+ if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+ __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ return 0;
+ __pyx_L1_error:;
+ return -1;
+}
+
+#if PY_MAJOR_VERSION < 3
+PyMODINIT_FUNC initnumvalue(void); /*proto*/
+PyMODINIT_FUNC initnumvalue(void)
+#else
+PyMODINIT_FUNC PyInit_numvalue(void); /*proto*/
+PyMODINIT_FUNC PyInit_numvalue(void)
+#if CYTHON_PEP489_MULTI_PHASE_INIT
+{
+ return PyModuleDef_Init(&__pyx_moduledef);
+}
+static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
+ PyObject *value = PyObject_GetAttrString(spec, from_name);
+ int result = 0;
+ if (likely(value)) {
+ result = PyDict_SetItemString(moddict, to_name, value);
+ Py_DECREF(value);
+ } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_Clear();
+ } else {
+ result = -1;
+ }
+ return result;
+}
+static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
+ PyObject *module = NULL, *moddict, *modname;
+ if (__pyx_m)
+ return __Pyx_NewRef(__pyx_m);
+ modname = PyObject_GetAttrString(spec, "name");
+ if (unlikely(!modname)) goto bad;
+ module = PyModule_NewObject(modname);
+ Py_DECREF(modname);
+ if (unlikely(!module)) goto bad;
+ moddict = PyModule_GetDict(module);
+ if (unlikely(!moddict)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
+ return module;
+bad:
+ Py_XDECREF(module);
+ return NULL;
+}
+
+
+static int __pyx_pymod_exec_numvalue(PyObject *__pyx_pyinit_module)
+#endif
+#endif
+{
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ __Pyx_RefNannyDeclarations
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
+ #endif
+ #if CYTHON_REFNANNY
+ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+ if (!__Pyx_RefNanny) {
+ PyErr_Clear();
+ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+ if (!__Pyx_RefNanny)
+ Py_FatalError("failed to import 'refnanny' module");
+ }
+ #endif
+ __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_numvalue(void)", 0);
+ if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #ifdef __Pyx_CyFunction_USED
+ if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_FusedFunction_USED
+ if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_Generator_USED
+ if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_StopAsyncIteration_USED
+ if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ /*--- Library function declarations ---*/
+ /*--- Threads initialization code ---*/
+ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+ #ifdef WITH_THREAD /* Python build with threading support? */
+ PyEval_InitThreads();
+ #endif
+ #endif
+ /*--- Module creation code ---*/
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ __pyx_m = __pyx_pyinit_module;
+ Py_INCREF(__pyx_m);
+ #else
+ #if PY_MAJOR_VERSION < 3
+ __pyx_m = Py_InitModule4("numvalue", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+ #else
+ __pyx_m = PyModule_Create(&__pyx_moduledef);
+ #endif
+ if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
+ Py_INCREF(__pyx_d);
+ __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #if CYTHON_COMPILING_IN_PYPY
+ Py_INCREF(__pyx_b);
+ #endif
+ if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+ /*--- Initialize various global constants etc. ---*/
+ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+ if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ if (__pyx_module_is_main_pyomo__core__expr__numvalue) {
+ if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ }
+ #if PY_MAJOR_VERSION >= 3
+ {
+ PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
+ if (!PyDict_GetItemString(modules, "pyomo.core.expr.numvalue")) {
+ if (unlikely(PyDict_SetItemString(modules, "pyomo.core.expr.numvalue", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ }
+ }
+ #endif
+ /*--- Builtin init code ---*/
+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ /*--- Constants init code ---*/
+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ /*--- Global init code ---*/
+ /*--- Variable export code ---*/
+ /*--- Function export code ---*/
+ /*--- Type init code ---*/
+ /*--- Type import code ---*/
+ /*--- Variable import code ---*/
+ /*--- Function import code ---*/
+ /*--- Execution code ---*/
+ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+ if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+
+ /* "pyomo/core/expr/numvalue.pyx":11
+ * # ___________________________________________________________________________
+ *
+ * __all__ = ('value', 'is_constant', 'is_fixed', 'is_variable_type', 'potentially_variable', 'update_KnownConstants', 'as_numeric', 'NumericValue', 'NumericConstant', 'ZeroConstant', 'native_numeric_types', 'native_types') # <<<<<<<<<<<<<<
+ *
+ * import sys
+ */
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_tuple__8) < 0) __PYX_ERR(0, 11, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":13
+ * __all__ = ('value', 'is_constant', 'is_fixed', 'is_variable_type', 'potentially_variable', 'update_KnownConstants', 'as_numeric', 'NumericValue', 'NumericConstant', 'ZeroConstant', 'native_numeric_types', 'native_types')
+ *
+ * import sys # <<<<<<<<<<<<<<
+ * import logging
+ * from six import iteritems, PY3, string_types, text_type, binary_type
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":14
+ *
+ * import sys
+ * import logging # <<<<<<<<<<<<<<
+ * from six import iteritems, PY3, string_types, text_type, binary_type
+ *
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_logging, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 14, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_1) < 0) __PYX_ERR(0, 14, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":15
+ * import sys
+ * import logging
+ * from six import iteritems, PY3, string_types, text_type, binary_type # <<<<<<<<<<<<<<
+ *
+ * from pyomo.core.expr.expr_common import \
+ */
+ __pyx_t_1 = PyList_New(5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_iteritems);
+ __Pyx_GIVEREF(__pyx_n_s_iteritems);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_iteritems);
+ __Pyx_INCREF(__pyx_n_s_PY3);
+ __Pyx_GIVEREF(__pyx_n_s_PY3);
+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_PY3);
+ __Pyx_INCREF(__pyx_n_s_string_types);
+ __Pyx_GIVEREF(__pyx_n_s_string_types);
+ PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_string_types);
+ __Pyx_INCREF(__pyx_n_s_text_type);
+ __Pyx_GIVEREF(__pyx_n_s_text_type);
+ PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_text_type);
+ __Pyx_INCREF(__pyx_n_s_binary_type);
+ __Pyx_GIVEREF(__pyx_n_s_binary_type);
+ PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_binary_type);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_six, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_iteritems, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_PY3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_PY3, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_string_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_string_types, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_text_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_text_type, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_binary_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_binary_type, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":18
+ *
+ * from pyomo.core.expr.expr_common import \
+ * (_add, _sub, _mul, _div, _pow, # <<<<<<<<<<<<<<
+ * _neg, _abs, _inplace, _radd,
+ * _rsub, _rmul, _rdiv, _rpow,
+ */
+ __pyx_t_2 = PyList_New(21); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_add_2);
+ __Pyx_GIVEREF(__pyx_n_s_add_2);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_add_2);
+ __Pyx_INCREF(__pyx_n_s_sub);
+ __Pyx_GIVEREF(__pyx_n_s_sub);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_sub);
+ __Pyx_INCREF(__pyx_n_s_mul);
+ __Pyx_GIVEREF(__pyx_n_s_mul);
+ PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_mul);
+ __Pyx_INCREF(__pyx_n_s_div);
+ __Pyx_GIVEREF(__pyx_n_s_div);
+ PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_div);
+ __Pyx_INCREF(__pyx_n_s_pow);
+ __Pyx_GIVEREF(__pyx_n_s_pow);
+ PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_pow);
+ __Pyx_INCREF(__pyx_n_s_neg);
+ __Pyx_GIVEREF(__pyx_n_s_neg);
+ PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_s_neg);
+ __Pyx_INCREF(__pyx_n_s_abs);
+ __Pyx_GIVEREF(__pyx_n_s_abs);
+ PyList_SET_ITEM(__pyx_t_2, 6, __pyx_n_s_abs);
+ __Pyx_INCREF(__pyx_n_s_inplace);
+ __Pyx_GIVEREF(__pyx_n_s_inplace);
+ PyList_SET_ITEM(__pyx_t_2, 7, __pyx_n_s_inplace);
+ __Pyx_INCREF(__pyx_n_s_radd);
+ __Pyx_GIVEREF(__pyx_n_s_radd);
+ PyList_SET_ITEM(__pyx_t_2, 8, __pyx_n_s_radd);
+ __Pyx_INCREF(__pyx_n_s_rsub);
+ __Pyx_GIVEREF(__pyx_n_s_rsub);
+ PyList_SET_ITEM(__pyx_t_2, 9, __pyx_n_s_rsub);
+ __Pyx_INCREF(__pyx_n_s_rmul);
+ __Pyx_GIVEREF(__pyx_n_s_rmul);
+ PyList_SET_ITEM(__pyx_t_2, 10, __pyx_n_s_rmul);
+ __Pyx_INCREF(__pyx_n_s_rdiv);
+ __Pyx_GIVEREF(__pyx_n_s_rdiv);
+ PyList_SET_ITEM(__pyx_t_2, 11, __pyx_n_s_rdiv);
+ __Pyx_INCREF(__pyx_n_s_rpow);
+ __Pyx_GIVEREF(__pyx_n_s_rpow);
+ PyList_SET_ITEM(__pyx_t_2, 12, __pyx_n_s_rpow);
+ __Pyx_INCREF(__pyx_n_s_iadd);
+ __Pyx_GIVEREF(__pyx_n_s_iadd);
+ PyList_SET_ITEM(__pyx_t_2, 13, __pyx_n_s_iadd);
+ __Pyx_INCREF(__pyx_n_s_isub);
+ __Pyx_GIVEREF(__pyx_n_s_isub);
+ PyList_SET_ITEM(__pyx_t_2, 14, __pyx_n_s_isub);
+ __Pyx_INCREF(__pyx_n_s_imul);
+ __Pyx_GIVEREF(__pyx_n_s_imul);
+ PyList_SET_ITEM(__pyx_t_2, 15, __pyx_n_s_imul);
+ __Pyx_INCREF(__pyx_n_s_idiv);
+ __Pyx_GIVEREF(__pyx_n_s_idiv);
+ PyList_SET_ITEM(__pyx_t_2, 16, __pyx_n_s_idiv);
+ __Pyx_INCREF(__pyx_n_s_ipow);
+ __Pyx_GIVEREF(__pyx_n_s_ipow);
+ PyList_SET_ITEM(__pyx_t_2, 17, __pyx_n_s_ipow);
+ __Pyx_INCREF(__pyx_n_s_lt);
+ __Pyx_GIVEREF(__pyx_n_s_lt);
+ PyList_SET_ITEM(__pyx_t_2, 18, __pyx_n_s_lt);
+ __Pyx_INCREF(__pyx_n_s_le);
+ __Pyx_GIVEREF(__pyx_n_s_le);
+ PyList_SET_ITEM(__pyx_t_2, 19, __pyx_n_s_le);
+ __Pyx_INCREF(__pyx_n_s_eq);
+ __Pyx_GIVEREF(__pyx_n_s_eq);
+ PyList_SET_ITEM(__pyx_t_2, 20, __pyx_n_s_eq);
+
+ /* "pyomo/core/expr/numvalue.pyx":17
+ * from six import iteritems, PY3, string_types, text_type, binary_type
+ *
+ * from pyomo.core.expr.expr_common import \ # <<<<<<<<<<<<<<
+ * (_add, _sub, _mul, _div, _pow,
+ * _neg, _abs, _inplace, _radd,
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyomo_core_expr_expr_common, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_add_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_add_2, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_sub); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sub, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_mul); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_mul, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_div); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_div, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_pow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pow, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_neg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_neg, __pyx_t_2) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_abs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_abs, __pyx_t_2) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_inplace); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_inplace, __pyx_t_2) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_radd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_radd, __pyx_t_2) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_rsub); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_rsub, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_rmul); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_rmul, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_rdiv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_rdiv, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_rpow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_rpow, __pyx_t_2) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_iadd); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_iadd, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_isub); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_isub, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_imul); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_imul, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_idiv); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_idiv, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ipow); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ipow, __pyx_t_2) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_lt); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_lt, __pyx_t_2) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_le); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_le, __pyx_t_2) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_eq); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_eq, __pyx_t_2) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":24
+ * _ipow, _lt, _le, _eq)
+ *
+ * logger = logging.getLogger('pyomo.core') # <<<<<<<<<<<<<<
+ *
+ * def _generate_sum_expression(etype, _self, _other):
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 24, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 24, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger, __pyx_t_1) < 0) __PYX_ERR(0, 24, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":26
+ * logger = logging.getLogger('pyomo.core')
+ *
+ * def _generate_sum_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_mul_expression(etype, _self, _other):
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_1_generate_sum_expression, NULL, __pyx_n_s_pyomo_core_expr_numvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_sum_expression, __pyx_t_1) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":28
+ * def _generate_sum_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_mul_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_other_expression(etype, _self, _other):
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_3_generate_mul_expression, NULL, __pyx_n_s_pyomo_core_expr_numvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 28, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_mul_expression, __pyx_t_1) < 0) __PYX_ERR(0, 28, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":30
+ * def _generate_mul_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_other_expression(etype, _self, _other): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_relational_expression(etype, lhs, rhs):
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_5_generate_other_expression, NULL, __pyx_n_s_pyomo_core_expr_numvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_other_expression, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":32
+ * def _generate_other_expression(etype, _self, _other):
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ * def _generate_relational_expression(etype, lhs, rhs): # <<<<<<<<<<<<<<
+ * raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+ *
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_7_generate_relational_expression, NULL, __pyx_n_s_pyomo_core_expr_numvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_relational_expression, __pyx_t_1) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":41
+ * ##------------------------------------------------------------------------
+ *
+ * class NonNumericValue(object): # <<<<<<<<<<<<<<
+ * """An object that contains a non-numeric value
+ *
+ */
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__18); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 41, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__18, __pyx_n_s_NonNumericValue, __pyx_n_s_NonNumericValue, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_kp_s_An_object_that_contains_a_non_nu); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 41, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+
+ /* "pyomo/core/expr/numvalue.pyx":47
+ * value The initial value.
+ * """
+ * __slots__ = ('value',) # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, value):
+ */
+ if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_slots, __pyx_tuple__19) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":49
+ * __slots__ = ('value',)
+ *
+ * def __init__(self, value): # <<<<<<<<<<<<<<
+ * self.value = value
+ *
+ */
+ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15NonNumericValue_1__init__, 0, __pyx_n_s_NonNumericValue___init, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 49, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_init, __pyx_t_3) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":52
+ * self.value = value
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return str(self.value)
+ *
+ */
+ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15NonNumericValue_3__str__, 0, __pyx_n_s_NonNumericValue___str, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 52, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_str, __pyx_t_3) < 0) __PYX_ERR(0, 52, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":55
+ * return str(self.value)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = {}
+ * state['value'] = getattr(self,'value')
+ */
+ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15NonNumericValue_5__getstate__, 0, __pyx_n_s_NonNumericValue___getstate, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__25)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_getstate, __pyx_t_3) < 0) __PYX_ERR(0, 55, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":60
+ * return state
+ *
+ * def __setstate__(self, state): # <<<<<<<<<<<<<<
+ * setattr(self, 'value', state['value'])
+ *
+ */
+ __pyx_t_3 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15NonNumericValue_7__setstate__, 0, __pyx_n_s_NonNumericValue___setstate, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 60, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyObject_SetItem(__pyx_t_2, __pyx_n_s_setstate, __pyx_t_3) < 0) __PYX_ERR(0, 60, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":41
+ * ##------------------------------------------------------------------------
+ *
+ * class NonNumericValue(object): # <<<<<<<<<<<<<<
+ * """An object that contains a non-numeric value
+ *
+ */
+ __pyx_t_3 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NonNumericValue, __pyx_tuple__18, __pyx_t_2, NULL, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NonNumericValue, __pyx_t_3) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":69
+ * #:
+ * #: :data:`nonpyomo_leaf_types` = :data:`native_types + { :data:`NonNumericValue ` }
+ * nonpyomo_leaf_types = set([NonNumericValue]) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NonNumericValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 69, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 69, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PySet_Add(__pyx_t_2, __pyx_t_1) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_nonpyomo_leaf_types, __pyx_t_2) < 0) __PYX_ERR(0, 69, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":88
+ * #: native Python types as well as numeric types from Python packages
+ * #: like numpy, which may be registered by users.
+ * native_numeric_types = set([ int, float, bool ]) # <<<<<<<<<<<<<<
+ * native_integer_types = set([ int, bool ])
+ * native_boolean_types = set([ int, bool, str ])
+ */
+ __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PySet_Add(__pyx_t_2, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
+ if (PySet_Add(__pyx_t_2, ((PyObject *)(&PyFloat_Type))) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
+ if (PySet_Add(__pyx_t_2, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_native_numeric_types, __pyx_t_2) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":89
+ * #: like numpy, which may be registered by users.
+ * native_numeric_types = set([ int, float, bool ])
+ * native_integer_types = set([ int, bool ]) # <<<<<<<<<<<<<<
+ * native_boolean_types = set([ int, bool, str ])
+ * try:
+ */
+ __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PySet_Add(__pyx_t_2, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
+ if (PySet_Add(__pyx_t_2, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_native_integer_types, __pyx_t_2) < 0) __PYX_ERR(0, 89, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":90
+ * native_numeric_types = set([ int, float, bool ])
+ * native_integer_types = set([ int, bool ])
+ * native_boolean_types = set([ int, bool, str ]) # <<<<<<<<<<<<<<
+ * try:
+ * native_numeric_types.add(long)
+ */
+ __pyx_t_2 = PySet_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PySet_Add(__pyx_t_2, ((PyObject *)(&PyInt_Type))) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
+ if (PySet_Add(__pyx_t_2, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
+ if (PySet_Add(__pyx_t_2, ((PyObject *)(&PyString_Type))) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_native_boolean_types, __pyx_t_2) < 0) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":91
+ * native_integer_types = set([ int, bool ])
+ * native_boolean_types = set([ int, bool, str ])
+ * try: # <<<<<<<<<<<<<<
+ * native_numeric_types.add(long)
+ * native_integer_types.add(long)
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_4);
+ __Pyx_XGOTREF(__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_6);
+ /*try:*/ {
+
+ /* "pyomo/core/expr/numvalue.pyx":92
+ * native_boolean_types = set([ int, bool, str ])
+ * try:
+ * native_numeric_types.add(long) # <<<<<<<<<<<<<<
+ * native_integer_types.add(long)
+ * native_boolean_types.add(long)
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 92, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 92, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)(&PyLong_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, ((PyObject *)(&PyLong_Type))};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L2_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, ((PyObject *)(&PyLong_Type))};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L2_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 92, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_INCREF(((PyObject *)(&PyLong_Type)));
+ __Pyx_GIVEREF(((PyObject *)(&PyLong_Type)));
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, ((PyObject *)(&PyLong_Type)));
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 92, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":93
+ * try:
+ * native_numeric_types.add(long)
+ * native_integer_types.add(long) # <<<<<<<<<<<<<<
+ * native_boolean_types.add(long)
+ * except:
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_integer_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 93, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 93, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)(&PyLong_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)(&PyLong_Type))};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L2_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)(&PyLong_Type))};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L2_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 93, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(((PyObject *)(&PyLong_Type)));
+ __Pyx_GIVEREF(((PyObject *)(&PyLong_Type)));
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, ((PyObject *)(&PyLong_Type)));
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 93, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":94
+ * native_numeric_types.add(long)
+ * native_integer_types.add(long)
+ * native_boolean_types.add(long) # <<<<<<<<<<<<<<
+ * except:
+ * pass
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_boolean_types); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 94, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_add); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, ((PyObject *)(&PyLong_Type))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)(&PyLong_Type))};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L2_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)(&PyLong_Type))};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L2_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 94, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(((PyObject *)(&PyLong_Type)));
+ __Pyx_GIVEREF(((PyObject *)(&PyLong_Type)));
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, ((PyObject *)(&PyLong_Type)));
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":91
+ * native_integer_types = set([ int, bool ])
+ * native_boolean_types = set([ int, bool, str ])
+ * try: # <<<<<<<<<<<<<<
+ * native_numeric_types.add(long)
+ * native_integer_types.add(long)
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L7_try_end;
+ __pyx_L2_error:;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":95
+ * native_integer_types.add(long)
+ * native_boolean_types.add(long)
+ * except: # <<<<<<<<<<<<<<
+ * pass
+ *
+ */
+ /*except:*/ {
+ __Pyx_ErrRestore(0,0,0);
+ goto __pyx_L3_exception_handled;
+ }
+ __pyx_L3_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_4);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
+ __pyx_L7_try_end:;
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":104
+ * #:
+ * #: :data:`native_types` = :data:`native_numeric_types + { str }
+ * native_types = set([ bool, str, type(None) ]) # <<<<<<<<<<<<<<
+ * if PY3:
+ * native_types.add(bytes)
+ */
+ __Pyx_INCREF(((PyObject *)Py_TYPE(Py_None)));
+ __pyx_t_2 = ((PyObject *)Py_TYPE(Py_None));
+ __pyx_t_1 = PySet_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PySet_Add(__pyx_t_1, ((PyObject*)&PyBool_Type)) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
+ if (PySet_Add(__pyx_t_1, ((PyObject *)(&PyString_Type))) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
+ if (PySet_Add(__pyx_t_1, __pyx_t_2) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_native_types, __pyx_t_1) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":105
+ * #: :data:`native_types` = :data:`native_numeric_types + { str }
+ * native_types = set([ bool, str, type(None) ])
+ * if PY3: # <<<<<<<<<<<<<<
+ * native_types.add(bytes)
+ * native_boolean_types.add(bytes)
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_PY3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 105, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 105, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/expr/numvalue.pyx":106
+ * native_types = set([ bool, str, type(None) ])
+ * if PY3:
+ * native_types.add(bytes) # <<<<<<<<<<<<<<
+ * native_boolean_types.add(bytes)
+ * else:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 106, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 106, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)(&PyBytes_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, ((PyObject *)(&PyBytes_Type))};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, ((PyObject *)(&PyBytes_Type))};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 106, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
+ __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, ((PyObject *)(&PyBytes_Type)));
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":107
+ * if PY3:
+ * native_types.add(bytes)
+ * native_boolean_types.add(bytes) # <<<<<<<<<<<<<<
+ * else:
+ * native_types.add(unicode)
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_boolean_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 107, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_add); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 107, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, ((PyObject *)(&PyBytes_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)(&PyBytes_Type))};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, ((PyObject *)(&PyBytes_Type))};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(((PyObject *)(&PyBytes_Type)));
+ __Pyx_GIVEREF(((PyObject *)(&PyBytes_Type)));
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, ((PyObject *)(&PyBytes_Type)));
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 107, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":105
+ * #: :data:`native_types` = :data:`native_numeric_types + { str }
+ * native_types = set([ bool, str, type(None) ])
+ * if PY3: # <<<<<<<<<<<<<<
+ * native_types.add(bytes)
+ * native_boolean_types.add(bytes)
+ */
+ goto __pyx_L8;
+ }
+
+ /* "pyomo/core/expr/numvalue.pyx":109
+ * native_boolean_types.add(bytes)
+ * else:
+ * native_types.add(unicode) # <<<<<<<<<<<<<<
+ * native_boolean_types.add(unicode)
+ * native_types.update( native_numeric_types )
+ */
+ /*else*/ {
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_add); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, ((PyObject *)(&PyUnicode_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)(&PyUnicode_Type))};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, ((PyObject *)(&PyUnicode_Type))};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
+ __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, ((PyObject *)(&PyUnicode_Type)));
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":110
+ * else:
+ * native_types.add(unicode)
+ * native_boolean_types.add(unicode) # <<<<<<<<<<<<<<
+ * native_types.update( native_numeric_types )
+ * native_types.update( native_integer_types )
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_boolean_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_add); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)(&PyUnicode_Type))); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, ((PyObject *)(&PyUnicode_Type))};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, ((PyObject *)(&PyUnicode_Type))};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
+ __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, ((PyObject *)(&PyUnicode_Type)));
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __pyx_L8:;
+
+ /* "pyomo/core/expr/numvalue.pyx":111
+ * native_types.add(unicode)
+ * native_boolean_types.add(unicode)
+ * native_types.update( native_numeric_types ) # <<<<<<<<<<<<<<
+ * native_types.update( native_integer_types )
+ * native_types.update( native_boolean_types )
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_update); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":112
+ * native_boolean_types.add(unicode)
+ * native_types.update( native_numeric_types )
+ * native_types.update( native_integer_types ) # <<<<<<<<<<<<<<
+ * native_types.update( native_boolean_types )
+ * nonpyomo_leaf_types.update( native_types )
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_update); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_integer_types); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_7};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_t_7};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 112, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":113
+ * native_types.update( native_numeric_types )
+ * native_types.update( native_integer_types )
+ * native_types.update( native_boolean_types ) # <<<<<<<<<<<<<<
+ * nonpyomo_leaf_types.update( native_types )
+ *
+ */
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_update); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_boolean_types); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_9};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_9};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":114
+ * native_types.update( native_integer_types )
+ * native_types.update( native_boolean_types )
+ * nonpyomo_leaf_types.update( native_types ) # <<<<<<<<<<<<<<
+ *
+ * def RegisterNumericType(new_type):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonpyomo_leaf_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_update); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 114, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":116
+ * nonpyomo_leaf_types.update( native_types )
+ *
+ * def RegisterNumericType(new_type): # <<<<<<<<<<<<<<
+ * """
+ * A utility function for updating the set of types that are
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_9RegisterNumericType, NULL, __pyx_n_s_pyomo_core_expr_numvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 116, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_RegisterNumericType, __pyx_t_1) < 0) __PYX_ERR(0, 116, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":129
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ * def RegisterIntegerType(new_type): # <<<<<<<<<<<<<<
+ * """
+ * A utility function for updating the set of types that are
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_11RegisterIntegerType, NULL, __pyx_n_s_pyomo_core_expr_numvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_RegisterIntegerType, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":145
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ * def RegisterBooleanType(new_type): # <<<<<<<<<<<<<<
+ * """
+ * A utility function for updating the set of types that are
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_13RegisterBooleanType, NULL, __pyx_n_s_pyomo_core_expr_numvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 145, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_RegisterBooleanType, __pyx_t_1) < 0) __PYX_ERR(0, 145, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":159
+ * nonpyomo_leaf_types.add(new_type)
+ *
+ * def value(obj, exception=True): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns the value of a Pyomo object or
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15value, NULL, __pyx_n_s_pyomo_core_expr_numvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 159, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_value, __pyx_t_1) < 0) __PYX_ERR(0, 159, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":210
+ *
+ *
+ * def is_constant(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean that indicates
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_17is_constant, NULL, __pyx_n_s_pyomo_core_expr_numvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_constant, __pyx_t_1) < 0) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":232
+ * return as_numeric(obj).is_constant()
+ *
+ * def is_fixed(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean that indicates
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_19is_fixed, NULL, __pyx_n_s_pyomo_core_expr_numvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 232, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_fixed, __pyx_t_1) < 0) __PYX_ERR(0, 232, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":249
+ * return as_numeric(obj).is_fixed()
+ *
+ * def is_variable_type(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean indicating
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_21is_variable_type, NULL, __pyx_n_s_pyomo_core_expr_numvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_variable_type, __pyx_t_1) < 0) __PYX_ERR(0, 249, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":262
+ * return as_numeric(obj).is_variable_type()
+ *
+ * def potentially_variable(obj): # <<<<<<<<<<<<<<
+ * """
+ * A utility function that returns a boolean indicating
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_23potentially_variable, NULL, __pyx_n_s_pyomo_core_expr_numvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 262, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_potentially_variable, __pyx_t_1) < 0) __PYX_ERR(0, 262, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":278
+ * # constants get repeated many times. KnownConstants lets us re-use /
+ * # share constants we have seen before.
+ * KnownConstants = {} # <<<<<<<<<<<<<<
+ *
+ * def update_KnownConstants(obj, val):
+ */
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 278, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_KnownConstants, __pyx_t_1) < 0) __PYX_ERR(0, 278, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":280
+ * KnownConstants = {}
+ *
+ * def update_KnownConstants(obj, val): # <<<<<<<<<<<<<<
+ * if len(KnownConstants) < 100:
+ * KnownConstants[obj] = val
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_25update_KnownConstants, NULL, __pyx_n_s_pyomo_core_expr_numvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_update_KnownConstants, __pyx_t_1) < 0) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":285
+ *
+ *
+ * def as_numeric(obj): # <<<<<<<<<<<<<<
+ * """
+ * Verify that this obj is a NumericValue or intrinsic value.
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_27as_numeric, NULL, __pyx_n_s_pyomo_core_expr_numvalue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 285, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_as_numeric, __pyx_t_1) < 0) __PYX_ERR(0, 285, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":343
+ *
+ *
+ * class NumericValue(object): # <<<<<<<<<<<<<<
+ * """
+ * This is the base class for numeric values used in Pyomo.
+ */
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__48); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 343, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__48, __pyx_n_s_NumericValue, __pyx_n_s_NumericValue, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_kp_s_This_is_the_base_class_for_nume); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 343, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+
+ /* "pyomo/core/expr/numvalue.pyx":348
+ * """
+ *
+ * __slots__ = () # <<<<<<<<<<<<<<
+ *
+ * # This is required because we define __eq__
+ */
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_slots, __pyx_empty_tuple) < 0) __PYX_ERR(0, 348, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":351
+ *
+ * # This is required because we define __eq__
+ * __hash__ = None # <<<<<<<<<<<<<<
+ *
+ * def __getstate__(self):
+ */
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_hash, Py_None) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":353
+ * __hash__ = None
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * """
+ * Prepare a picklable state of this instance for pickling.
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_1__getstate__, 0, __pyx_n_s_NumericValue___getstate, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__50)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 353, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_getstate, __pyx_t_7) < 0) __PYX_ERR(0, 353, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":381
+ * return {}
+ *
+ * def __setstate__(self, state): # <<<<<<<<<<<<<<
+ * """
+ * Restore a pickled state into this instance
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_3__setstate__, 0, __pyx_n_s_NumericValue___setstate, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__52)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 381, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_setstate, __pyx_t_7) < 0) __PYX_ERR(0, 381, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":401
+ * object.__setattr__(self, key, val)
+ *
+ * def getname(self, fully_qualified=False, name_buffer=None): # <<<<<<<<<<<<<<
+ * """
+ * If this is a component, return the component's name on the owning
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_5getname, 0, __pyx_n_s_NumericValue_getname, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 401, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__55);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_getname, __pyx_t_7) < 0) __PYX_ERR(0, 401, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":413
+ *
+ * @property
+ * def name(self): # <<<<<<<<<<<<<<
+ * return self.getname(fully_qualified=True)
+ *
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_7name, 0, __pyx_n_s_NumericValue_name, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 413, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "pyomo/core/expr/numvalue.pyx":412
+ * return str(type(self))
+ *
+ * @property # <<<<<<<<<<<<<<
+ * def name(self):
+ * return self.getname(fully_qualified=True)
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 412, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 412, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_name, __pyx_t_7) < 0) __PYX_ERR(0, 413, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":417
+ *
+ * @property
+ * def local_name(self): # <<<<<<<<<<<<<<
+ * return self.getname(fully_qualified=False)
+ *
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_9local_name, 0, __pyx_n_s_NumericValue_local_name, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__59)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 417, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "pyomo/core/expr/numvalue.pyx":416
+ * return self.getname(fully_qualified=True)
+ *
+ * @property # <<<<<<<<<<<<<<
+ * def local_name(self):
+ * return self.getname(fully_qualified=False)
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_property, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 416, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_local_name, __pyx_t_7) < 0) __PYX_ERR(0, 417, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":420
+ * return self.getname(fully_qualified=False)
+ *
+ * def cname(self, *args, **kwds): # <<<<<<<<<<<<<<
+ * logger.warning(
+ * "DEPRECATED: The cname() method has been renamed to getname()." )
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_11cname, 0, __pyx_n_s_NumericValue_cname, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__61)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 420, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_cname, __pyx_t_7) < 0) __PYX_ERR(0, 420, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":425
+ * return self.getname(*args, **kwds)
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is a constant value"""
+ * return False
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_13is_constant, 0, __pyx_n_s_NumericValue_is_constant, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__63)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_is_constant, __pyx_t_7) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":429
+ * return False
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * """Return True if this is a non-constant value that has been fixed"""
+ * return False
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_15is_fixed, 0, __pyx_n_s_NumericValue_is_fixed, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__65)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_is_fixed, __pyx_t_7) < 0) __PYX_ERR(0, 429, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":433
+ * return False
+ *
+ * def is_variable_type(self): # <<<<<<<<<<<<<<
+ * """Return False unless this class is a variable object"""
+ * return False
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_17is_variable_type, 0, __pyx_n_s_NumericValue_is_variable_type, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__67)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 433, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_is_variable_type, __pyx_t_7) < 0) __PYX_ERR(0, 433, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":437
+ * return False
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * """Return True if variables can appear in this expression"""
+ * return True
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_19is_potentially_variable, 0, __pyx_n_s_NumericValue_is_potentially_vari, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__69)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 437, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_is_potentially_variable, __pyx_t_7) < 0) __PYX_ERR(0, 437, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":441
+ * return True
+ *
+ * def is_named_expression_type(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is a named expression"""
+ * return False
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_21is_named_expression_type, 0, __pyx_n_s_NumericValue_is_named_expression, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__71)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 441, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_is_named_expression_type, __pyx_t_7) < 0) __PYX_ERR(0, 441, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":445
+ * return False
+ *
+ * def is_expression_type(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is an expression"""
+ * return False
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_23is_expression_type, 0, __pyx_n_s_NumericValue_is_expression_type, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__73)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 445, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_is_expression_type, __pyx_t_7) < 0) __PYX_ERR(0, 445, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":449
+ * return False
+ *
+ * def is_relational(self): # <<<<<<<<<<<<<<
+ * """
+ * Return True if this numeric value represents a relational expression.
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_25is_relational, 0, __pyx_n_s_NumericValue_is_relational, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__75)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_is_relational, __pyx_t_7) < 0) __PYX_ERR(0, 449, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":455
+ * return False
+ *
+ * def is_indexed(self): # <<<<<<<<<<<<<<
+ * """Return True if this numeric value is an indexed object"""
+ * return False
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_27is_indexed, 0, __pyx_n_s_NumericValue_is_indexed, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__77)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 455, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_is_indexed, __pyx_t_7) < 0) __PYX_ERR(0, 455, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":459
+ * return False
+ *
+ * def as_numeric(self): # <<<<<<<<<<<<<<
+ * return self
+ *
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_29as_numeric, 0, __pyx_n_s_NumericValue_as_numeric, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__79)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 459, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_as_numeric, __pyx_t_7) < 0) __PYX_ERR(0, 459, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":462
+ * return self
+ *
+ * def polynomial_degree(self): # <<<<<<<<<<<<<<
+ * """
+ * Return the polynomial degree of the expression.
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_31polynomial_degree, 0, __pyx_n_s_NumericValue_polynomial_degree, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__81)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 462, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_polynomial_degree, __pyx_t_7) < 0) __PYX_ERR(0, 462, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":471
+ * return self._compute_polynomial_degree(None)
+ *
+ * def _compute_polynomial_degree(self, values): # <<<<<<<<<<<<<<
+ * """
+ * Compute the polynomial degree of this expression given
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_33_compute_polynomial_degree, 0, __pyx_n_s_NumericValue__compute_polynomial, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__83)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_compute_polynomial_degree, __pyx_t_7) < 0) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":485
+ * return None
+ *
+ * def __float__(self): # <<<<<<<<<<<<<<
+ * """
+ * Coerce the value to a floating point
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_35__float__, 0, __pyx_n_s_NumericValue___float, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__85)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_float, __pyx_t_7) < 0) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":499
+ * functions.""" % (self.name,))
+ *
+ * def __int__(self): # <<<<<<<<<<<<<<
+ * """
+ * Coerce the value to an integer
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_37__int__, 0, __pyx_n_s_NumericValue___int, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__87)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 499, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_int, __pyx_t_7) < 0) __PYX_ERR(0, 499, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":513
+ * functions.""" % (self.name,))
+ *
+ * def __lt__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Less than operator
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_39__lt__, 0, __pyx_n_s_NumericValue___lt, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__89)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 513, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_lt_2, __pyx_t_7) < 0) __PYX_ERR(0, 513, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":524
+ * return _generate_relational_expression(_lt, self, other)
+ *
+ * def __gt__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Greater than operator
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_41__gt__, 0, __pyx_n_s_NumericValue___gt, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__91)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 524, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_gt, __pyx_t_7) < 0) __PYX_ERR(0, 524, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":535
+ * return _generate_relational_expression(_lt, other, self)
+ *
+ * def __le__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Less than or equal operator
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_43__le__, 0, __pyx_n_s_NumericValue___le, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__93)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 535, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_le_2, __pyx_t_7) < 0) __PYX_ERR(0, 535, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":546
+ * return _generate_relational_expression(_le, self, other)
+ *
+ * def __ge__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Greater than or equal operator
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_45__ge__, 0, __pyx_n_s_NumericValue___ge, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__95)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ge, __pyx_t_7) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":557
+ * return _generate_relational_expression(_le, other, self)
+ *
+ * def __eq__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Equal to operator
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_47__eq__, 0, __pyx_n_s_NumericValue___eq, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__97)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 557, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_eq_2, __pyx_t_7) < 0) __PYX_ERR(0, 557, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":567
+ * return _generate_relational_expression(_eq, self, other)
+ *
+ * def __add__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary addition
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_49__add__, 0, __pyx_n_s_NumericValue___add, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__99)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 567, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_add_3, __pyx_t_7) < 0) __PYX_ERR(0, 567, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":577
+ * return _generate_sum_expression(_add,self,other)
+ *
+ * def __sub__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary subtraction
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_51__sub__, 0, __pyx_n_s_NumericValue___sub, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__101)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 577, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_sub_2, __pyx_t_7) < 0) __PYX_ERR(0, 577, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":587
+ * return _generate_sum_expression(_sub,self,other)
+ *
+ * def __mul__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary multiplication
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_53__mul__, 0, __pyx_n_s_NumericValue___mul, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__103)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 587, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_mul_2, __pyx_t_7) < 0) __PYX_ERR(0, 587, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":597
+ * return _generate_mul_expression(_mul,self,other)
+ *
+ * def __div__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_55__div__, 0, __pyx_n_s_NumericValue___div, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__105)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 597, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_div_2, __pyx_t_7) < 0) __PYX_ERR(0, 597, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":607
+ * return _generate_mul_expression(_div,self,other)
+ *
+ * def __truediv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division (when __future__.division is in effect)
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_57__truediv__, 0, __pyx_n_s_NumericValue___truediv, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__107)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_truediv, __pyx_t_7) < 0) __PYX_ERR(0, 607, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":617
+ * return _generate_mul_expression(_div,self,other)
+ *
+ * def __pow__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary power
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_59__pow__, 0, __pyx_n_s_NumericValue___pow, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__109)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 617, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_pow_2, __pyx_t_7) < 0) __PYX_ERR(0, 617, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":627
+ * return _generate_other_expression(_pow,self,other)
+ *
+ * def __radd__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary addition
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_61__radd__, 0, __pyx_n_s_NumericValue___radd, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__111)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 627, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_radd_2, __pyx_t_7) < 0) __PYX_ERR(0, 627, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":637
+ * return _generate_sum_expression(_radd,self,other)
+ *
+ * def __rsub__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary subtraction
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_63__rsub__, 0, __pyx_n_s_NumericValue___rsub, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__113)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 637, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_rsub_2, __pyx_t_7) < 0) __PYX_ERR(0, 637, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":647
+ * return _generate_sum_expression(_rsub,self,other)
+ *
+ * def __rmul__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary multiplication
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_65__rmul__, 0, __pyx_n_s_NumericValue___rmul, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__115)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 647, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_rmul_2, __pyx_t_7) < 0) __PYX_ERR(0, 647, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":659
+ * return _generate_mul_expression(_rmul,self,other)
+ *
+ * def __rdiv__(self,other): # <<<<<<<<<<<<<<
+ * """Binary division
+ *
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_67__rdiv__, 0, __pyx_n_s_NumericValue___rdiv, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__117)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 659, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_rdiv_2, __pyx_t_7) < 0) __PYX_ERR(0, 659, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":668
+ * return _generate_mul_expression(_rdiv,self,other)
+ *
+ * def __rtruediv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division (when __future__.division is in effect)
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_69__rtruediv__, 0, __pyx_n_s_NumericValue___rtruediv, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__119)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_rtruediv, __pyx_t_7) < 0) __PYX_ERR(0, 668, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":678
+ * return _generate_mul_expression(_rdiv,self,other)
+ *
+ * def __rpow__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary power
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_71__rpow__, 0, __pyx_n_s_NumericValue___rpow, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__121)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_rpow_2, __pyx_t_7) < 0) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":688
+ * return _generate_other_expression(_rpow,self,other)
+ *
+ * def __iadd__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary addition
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_73__iadd__, 0, __pyx_n_s_NumericValue___iadd, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__123)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 688, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_iadd_2, __pyx_t_7) < 0) __PYX_ERR(0, 688, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":698
+ * return _generate_sum_expression(_iadd,self,other)
+ *
+ * def __isub__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary subtraction
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_75__isub__, 0, __pyx_n_s_NumericValue___isub, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__125)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 698, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_isub_2, __pyx_t_7) < 0) __PYX_ERR(0, 698, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":708
+ * return _generate_sum_expression(_isub,self,other)
+ *
+ * def __imul__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary multiplication
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_77__imul__, 0, __pyx_n_s_NumericValue___imul, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__127)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 708, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_imul_2, __pyx_t_7) < 0) __PYX_ERR(0, 708, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":718
+ * return _generate_mul_expression(_imul,self,other)
+ *
+ * def __idiv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_79__idiv__, 0, __pyx_n_s_NumericValue___idiv, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__129)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 718, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_idiv_2, __pyx_t_7) < 0) __PYX_ERR(0, 718, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":728
+ * return _generate_mul_expression(_idiv,self,other)
+ *
+ * def __itruediv__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary division (when __future__.division is in effect)
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_81__itruediv__, 0, __pyx_n_s_NumericValue___itruediv, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__131)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 728, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_itruediv, __pyx_t_7) < 0) __PYX_ERR(0, 728, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":738
+ * return _generate_mul_expression(_idiv,self,other)
+ *
+ * def __ipow__(self,other): # <<<<<<<<<<<<<<
+ * """
+ * Binary power
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_83__ipow__, 0, __pyx_n_s_NumericValue___ipow, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__133)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 738, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_ipow_2, __pyx_t_7) < 0) __PYX_ERR(0, 738, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":748
+ * return _generate_other_expression(_ipow,self,other)
+ *
+ * def __neg__(self): # <<<<<<<<<<<<<<
+ * """
+ * Negation
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_85__neg__, 0, __pyx_n_s_NumericValue___neg, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__135)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 748, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_neg_2, __pyx_t_7) < 0) __PYX_ERR(0, 748, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":758
+ * return _generate_sum_expression(_neg, self, None)
+ *
+ * def __pos__(self): # <<<<<<<<<<<<<<
+ * """
+ * Positive expression
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_87__pos__, 0, __pyx_n_s_NumericValue___pos, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__137)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 758, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_pos, __pyx_t_7) < 0) __PYX_ERR(0, 758, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":768
+ * return self
+ *
+ * def __abs__(self): # <<<<<<<<<<<<<<
+ * """ Absolute value
+ *
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_89__abs__, 0, __pyx_n_s_NumericValue___abs, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__139)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 768, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_abs_2, __pyx_t_7) < 0) __PYX_ERR(0, 768, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":777
+ * return _generate_other_expression(_abs,self, None)
+ *
+ * def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False): # <<<<<<<<<<<<<<
+ * """
+ * Return a string representation of the expression tree.
+ */
+ __pyx_t_7 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_12NumericValue_91to_string, 0, __pyx_n_s_NumericValue_to_string, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__141)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_7, __pyx_tuple__142);
+ if (PyObject_SetItem(__pyx_t_3, __pyx_n_s_to_string, __pyx_t_7) < 0) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":343
+ *
+ *
+ * class NumericValue(object): # <<<<<<<<<<<<<<
+ * """
+ * This is the base class for numeric values used in Pyomo.
+ */
+ __pyx_t_7 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NumericValue, __pyx_tuple__48, __pyx_t_3, NULL, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 343, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericValue, __pyx_t_7) < 0) __PYX_ERR(0, 343, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":805
+ *
+ *
+ * class NumericConstant(NumericValue): # <<<<<<<<<<<<<<
+ * """An object that contains a constant numeric value.
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_NumericValue); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 805, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 805, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_t_3, __pyx_n_s_NumericConstant, __pyx_n_s_NumericConstant, (PyObject *) NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_kp_s_An_object_that_contains_a_consta); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 805, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "pyomo/core/expr/numvalue.pyx":812
+ * """
+ *
+ * __slots__ = ('value',) # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, value):
+ */
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_slots, __pyx_tuple__143) < 0) __PYX_ERR(0, 812, __pyx_L1_error)
+
+ /* "pyomo/core/expr/numvalue.pyx":814
+ * __slots__ = ('value',)
+ *
+ * def __init__(self, value): # <<<<<<<<<<<<<<
+ * self.value = value
+ *
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_1__init__, 0, __pyx_n_s_NumericConstant___init, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__145)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 814, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 814, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":817
+ * self.value = value
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * state = super(NumericConstant, self).__getstate__()
+ * for i in NumericConstant.__slots__:
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_3__getstate__, 0, __pyx_n_s_NumericConstant___getstate, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__147)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 817, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_getstate, __pyx_t_2) < 0) __PYX_ERR(0, 817, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":823
+ * return state
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_5is_constant, 0, __pyx_n_s_NumericConstant_is_constant, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__149)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 823, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_is_constant, __pyx_t_2) < 0) __PYX_ERR(0, 823, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":826
+ * return True
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * return True
+ *
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_7is_fixed, 0, __pyx_n_s_NumericConstant_is_fixed, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__151)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_is_fixed, __pyx_t_2) < 0) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":829
+ * return True
+ *
+ * def is_potentially_variable(self): # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_9is_potentially_variable, 0, __pyx_n_s_NumericConstant_is_potentially_v, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__153)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 829, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_is_potentially_variable, __pyx_t_2) < 0) __PYX_ERR(0, 829, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":832
+ * return False
+ *
+ * def _compute_polynomial_degree(self, result): # <<<<<<<<<<<<<<
+ * return 0
+ *
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_11_compute_polynomial_degree, 0, __pyx_n_s_NumericConstant__compute_polynom, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__155)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_compute_polynomial_degree, __pyx_t_2) < 0) __PYX_ERR(0, 832, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":835
+ * return 0
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return str(self.value)
+ *
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_13__str__, 0, __pyx_n_s_NumericConstant___str, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__157)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 835, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_str, __pyx_t_2) < 0) __PYX_ERR(0, 835, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":838
+ * return str(self.value)
+ *
+ * def __nonzero__(self): # <<<<<<<<<<<<<<
+ * """Return True if the value is defined and non-zero"""
+ * if self.value:
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_15__nonzero__, 0, __pyx_n_s_NumericConstant___nonzero, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__159)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 838, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_nonzero, __pyx_t_2) < 0) __PYX_ERR(0, 838, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":846
+ * return False
+ *
+ * __bool__ = __nonzero__ # <<<<<<<<<<<<<<
+ *
+ * def __call__(self, exception=True):
+ */
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_7, __pyx_n_s_nonzero);
+ if (unlikely(!__pyx_t_2)) {
+ PyErr_Clear();
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_nonzero);
+ }
+ if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 846, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_bool, __pyx_t_2) < 0) __PYX_ERR(0, 846, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":848
+ * __bool__ = __nonzero__
+ *
+ * def __call__(self, exception=True): # <<<<<<<<<<<<<<
+ * """Return the constant value"""
+ * return self.value
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_17__call__, 0, __pyx_n_s_NumericConstant___call, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__161)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 848, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__162);
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_call, __pyx_t_2) < 0) __PYX_ERR(0, 848, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":852
+ * return self.value
+ *
+ * def pprint(self, ostream=None, verbose=False): # <<<<<<<<<<<<<<
+ * if ostream is None: #pragma:nocover
+ * ostream = sys.stdout
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4core_4expr_8numvalue_15NumericConstant_19pprint, 0, __pyx_n_s_NumericConstant_pprint, NULL, __pyx_n_s_pyomo_core_expr_numvalue, __pyx_d, ((PyObject *)__pyx_codeobj__164)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 852, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__165);
+ if (PyObject_SetItem(__pyx_t_7, __pyx_n_s_pprint, __pyx_t_2) < 0) __PYX_ERR(0, 852, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":805
+ *
+ *
+ * class NumericConstant(NumericValue): # <<<<<<<<<<<<<<
+ * """An object that contains a constant numeric value.
+ *
+ */
+ __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_NumericConstant, __pyx_t_3, __pyx_t_7, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 805, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericConstant, __pyx_t_2) < 0) __PYX_ERR(0, 805, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":859
+ *
+ * # We use as_numeric() so that the constant is also in the cache
+ * ZeroConstant = as_numeric(0) # <<<<<<<<<<<<<<
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_as_numeric); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 859, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__166, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ZeroConstant, __pyx_t_1) < 0) __PYX_ERR(0, 859, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/expr/numvalue.pyx":1
+ * # ___________________________________________________________________________ # <<<<<<<<<<<<<<
+ * #
+ * # Pyomo: Python Optimization Modeling Objects
+ */
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /*--- Wrapped vars code ---*/
+
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_9);
+ if (__pyx_m) {
+ if (__pyx_d) {
+ __Pyx_AddTraceback("init pyomo.core.expr.numvalue", 0, __pyx_lineno, __pyx_filename);
+ }
+ Py_DECREF(__pyx_m); __pyx_m = 0;
+ } else if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_ImportError, "init pyomo.core.expr.numvalue");
+ }
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ return (__pyx_m != NULL) ? 0 : -1;
+ #elif PY_MAJOR_VERSION >= 3
+ return __pyx_m;
+ #else
+ return;
+ #endif
+}
+
+/* --- Runtime support code --- */
+/* Refnanny */
+#if CYTHON_REFNANNY
+static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
+ PyObject *m = NULL, *p = NULL;
+ void *r = NULL;
+ m = PyImport_ImportModule((char *)modname);
+ if (!m) goto end;
+ p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
+ if (!p) goto end;
+ r = PyLong_AsVoidPtr(p);
+end:
+ Py_XDECREF(p);
+ Py_XDECREF(m);
+ return (__Pyx_RefNannyAPIStruct *)r;
+}
+#endif
+
+/* GetBuiltinName */
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+ PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+ if (unlikely(!result)) {
+ PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+ "name '%U' is not defined", name);
+#else
+ "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
+ }
+ return result;
+}
+
+/* RaiseArgTupleInvalid */
+static void __Pyx_RaiseArgtupleInvalid(
+ const char* func_name,
+ int exact,
+ Py_ssize_t num_min,
+ Py_ssize_t num_max,
+ Py_ssize_t num_found)
+{
+ Py_ssize_t num_expected;
+ const char *more_or_less;
+ if (num_found < num_min) {
+ num_expected = num_min;
+ more_or_less = "at least";
+ } else {
+ num_expected = num_max;
+ more_or_less = "at most";
+ }
+ if (exact) {
+ more_or_less = "exactly";
+ }
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+ func_name, more_or_less, num_expected,
+ (num_expected == 1) ? "" : "s", num_found);
+}
+
+/* RaiseDoubleKeywords */
+static void __Pyx_RaiseDoubleKeywordsError(
+ const char* func_name,
+ PyObject* kw_name)
+{
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION >= 3
+ "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
+ #else
+ "%s() got multiple values for keyword argument '%s'", func_name,
+ PyString_AsString(kw_name));
+ #endif
+}
+
+/* ParseKeywords */
+static int __Pyx_ParseOptionalKeywords(
+ PyObject *kwds,
+ PyObject **argnames[],
+ PyObject *kwds2,
+ PyObject *values[],
+ Py_ssize_t num_pos_args,
+ const char* function_name)
+{
+ PyObject *key = 0, *value = 0;
+ Py_ssize_t pos = 0;
+ PyObject*** name;
+ PyObject*** first_kw_arg = argnames + num_pos_args;
+ while (PyDict_Next(kwds, &pos, &key, &value)) {
+ name = first_kw_arg;
+ while (*name && (**name != key)) name++;
+ if (*name) {
+ values[name-argnames] = value;
+ continue;
+ }
+ name = first_kw_arg;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
+ while (*name) {
+ if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
+ && _PyString_Eq(**name, key)) {
+ values[name-argnames] = value;
+ break;
+ }
+ name++;
+ }
+ if (*name) continue;
+ else {
+ PyObject*** argname = argnames;
+ while (argname != first_kw_arg) {
+ if ((**argname == key) || (
+ (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
+ && _PyString_Eq(**argname, key))) {
+ goto arg_passed_twice;
+ }
+ argname++;
+ }
+ }
+ } else
+ #endif
+ if (likely(PyUnicode_Check(key))) {
+ while (*name) {
+ int cmp = (**name == key) ? 0 :
+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+ (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
+ #endif
+ PyUnicode_Compare(**name, key);
+ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+ if (cmp == 0) {
+ values[name-argnames] = value;
+ break;
+ }
+ name++;
+ }
+ if (*name) continue;
+ else {
+ PyObject*** argname = argnames;
+ while (argname != first_kw_arg) {
+ int cmp = (**argname == key) ? 0 :
+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+ (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
+ #endif
+ PyUnicode_Compare(**argname, key);
+ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+ if (cmp == 0) goto arg_passed_twice;
+ argname++;
+ }
+ }
+ } else
+ goto invalid_keyword_type;
+ if (kwds2) {
+ if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+ } else {
+ goto invalid_keyword;
+ }
+ }
+ return 0;
+arg_passed_twice:
+ __Pyx_RaiseDoubleKeywordsError(function_name, key);
+ goto bad;
+invalid_keyword_type:
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() keywords must be strings", function_name);
+ goto bad;
+invalid_keyword:
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION < 3
+ "%.200s() got an unexpected keyword argument '%.200s'",
+ function_name, PyString_AsString(key));
+ #else
+ "%s() got an unexpected keyword argument '%U'",
+ function_name, key);
+ #endif
+bad:
+ return -1;
+}
+
+/* PyObjectCall */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+ PyObject *result;
+ ternaryfunc call = func->ob_type->tp_call;
+ if (unlikely(!call))
+ return PyObject_Call(func, arg, kw);
+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+ return NULL;
+ result = (*call)(func, arg, kw);
+ Py_LeaveRecursiveCall();
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+ PyErr_SetString(
+ PyExc_SystemError,
+ "NULL result without error in PyObject_Call");
+ }
+ return result;
+}
+#endif
+
+/* PyErrFetchRestore */
+#if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ tmp_type = tstate->curexc_type;
+ tmp_value = tstate->curexc_value;
+ tmp_tb = tstate->curexc_traceback;
+ tstate->curexc_type = type;
+ tstate->curexc_value = value;
+ tstate->curexc_traceback = tb;
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+}
+static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ *type = tstate->curexc_type;
+ *value = tstate->curexc_value;
+ *tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+}
+#endif
+
+/* RaiseException */
+#if PY_MAJOR_VERSION < 3
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
+ CYTHON_UNUSED PyObject *cause) {
+ __Pyx_PyThreadState_declare
+ Py_XINCREF(type);
+ if (!value || value == Py_None)
+ value = NULL;
+ else
+ Py_INCREF(value);
+ if (!tb || tb == Py_None)
+ tb = NULL;
+ else {
+ Py_INCREF(tb);
+ if (!PyTraceBack_Check(tb)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: arg 3 must be a traceback or None");
+ goto raise_error;
+ }
+ }
+ if (PyType_Check(type)) {
+#if CYTHON_COMPILING_IN_PYPY
+ if (!value) {
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+#endif
+ PyErr_NormalizeException(&type, &value, &tb);
+ } else {
+ if (value) {
+ PyErr_SetString(PyExc_TypeError,
+ "instance exception may not have a separate value");
+ goto raise_error;
+ }
+ value = type;
+ type = (PyObject*) Py_TYPE(type);
+ Py_INCREF(type);
+ if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: exception class must be a subclass of BaseException");
+ goto raise_error;
+ }
+ }
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrRestore(type, value, tb);
+ return;
+raise_error:
+ Py_XDECREF(value);
+ Py_XDECREF(type);
+ Py_XDECREF(tb);
+ return;
+}
+#else
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
+ PyObject* owned_instance = NULL;
+ if (tb == Py_None) {
+ tb = 0;
+ } else if (tb && !PyTraceBack_Check(tb)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: arg 3 must be a traceback or None");
+ goto bad;
+ }
+ if (value == Py_None)
+ value = 0;
+ if (PyExceptionInstance_Check(type)) {
+ if (value) {
+ PyErr_SetString(PyExc_TypeError,
+ "instance exception may not have a separate value");
+ goto bad;
+ }
+ value = type;
+ type = (PyObject*) Py_TYPE(value);
+ } else if (PyExceptionClass_Check(type)) {
+ PyObject *instance_class = NULL;
+ if (value && PyExceptionInstance_Check(value)) {
+ instance_class = (PyObject*) Py_TYPE(value);
+ if (instance_class != type) {
+ int is_subclass = PyObject_IsSubclass(instance_class, type);
+ if (!is_subclass) {
+ instance_class = NULL;
+ } else if (unlikely(is_subclass == -1)) {
+ goto bad;
+ } else {
+ type = instance_class;
+ }
+ }
+ }
+ if (!instance_class) {
+ PyObject *args;
+ if (!value)
+ args = PyTuple_New(0);
+ else if (PyTuple_Check(value)) {
+ Py_INCREF(value);
+ args = value;
+ } else
+ args = PyTuple_Pack(1, value);
+ if (!args)
+ goto bad;
+ owned_instance = PyObject_Call(type, args, NULL);
+ Py_DECREF(args);
+ if (!owned_instance)
+ goto bad;
+ value = owned_instance;
+ if (!PyExceptionInstance_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "calling %R should have returned an instance of "
+ "BaseException, not %R",
+ type, Py_TYPE(value));
+ goto bad;
+ }
+ }
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: exception class must be a subclass of BaseException");
+ goto bad;
+ }
+ if (cause) {
+ PyObject *fixed_cause;
+ if (cause == Py_None) {
+ fixed_cause = NULL;
+ } else if (PyExceptionClass_Check(cause)) {
+ fixed_cause = PyObject_CallObject(cause, NULL);
+ if (fixed_cause == NULL)
+ goto bad;
+ } else if (PyExceptionInstance_Check(cause)) {
+ fixed_cause = cause;
+ Py_INCREF(fixed_cause);
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "exception causes must derive from "
+ "BaseException");
+ goto bad;
+ }
+ PyException_SetCause(value, fixed_cause);
+ }
+ PyErr_SetObject(type, value);
+ if (tb) {
+#if CYTHON_COMPILING_IN_PYPY
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
+ Py_INCREF(tb);
+ PyErr_Restore(tmp_type, tmp_value, tb);
+ Py_XDECREF(tmp_tb);
+#else
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ PyObject* tmp_tb = tstate->curexc_traceback;
+ if (tb != tmp_tb) {
+ Py_INCREF(tb);
+ tstate->curexc_traceback = tb;
+ Py_XDECREF(tmp_tb);
+ }
+#endif
+ }
+bad:
+ Py_XDECREF(owned_instance);
+ return;
+}
+#endif
+
+/* GetAttr */
+static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
+#if CYTHON_USE_TYPE_SLOTS
+#if PY_MAJOR_VERSION >= 3
+ if (likely(PyUnicode_Check(n)))
+#else
+ if (likely(PyString_Check(n)))
+#endif
+ return __Pyx_PyObject_GetAttrStr(o, n);
+#endif
+ return PyObject_GetAttr(o, n);
+}
+
+/* GetModuleGlobalName */
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+ PyObject *result;
+#if !CYTHON_AVOID_BORROWED_REFS
+ result = PyDict_GetItem(__pyx_d, name);
+ if (likely(result)) {
+ Py_INCREF(result);
+ } else {
+#else
+ result = PyObject_GetItem(__pyx_d, name);
+ if (!result) {
+ PyErr_Clear();
+#endif
+ result = __Pyx_GetBuiltinName(name);
+ }
+ return result;
+}
+
+/* PyCFunctionFastCall */
+ #if CYTHON_FAST_PYCCALL
+static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
+ PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
+ PyCFunction meth = PyCFunction_GET_FUNCTION(func);
+ PyObject *self = PyCFunction_GET_SELF(func);
+ int flags = PyCFunction_GET_FLAGS(func);
+ assert(PyCFunction_Check(func));
+ assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
+ assert(nargs >= 0);
+ assert(nargs == 0 || args != NULL);
+ /* _PyCFunction_FastCallDict() must not be called with an exception set,
+ because it may clear it (directly or indirectly) and so the
+ caller loses its exception */
+ assert(!PyErr_Occurred());
+ if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
+ return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
+ } else {
+ return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
+ }
+}
+#endif
+
+/* PyFunctionFastCall */
+ #if CYTHON_FAST_PYCALL
+#include "frameobject.h"
+static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
+ PyObject *globals) {
+ PyFrameObject *f;
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ PyObject **fastlocals;
+ Py_ssize_t i;
+ PyObject *result;
+ assert(globals != NULL);
+ /* XXX Perhaps we should create a specialized
+ PyFrame_New() that doesn't take locals, but does
+ take builtins without sanity checking them.
+ */
+ assert(tstate != NULL);
+ f = PyFrame_New(tstate, co, globals, NULL);
+ if (f == NULL) {
+ return NULL;
+ }
+ fastlocals = f->f_localsplus;
+ for (i = 0; i < na; i++) {
+ Py_INCREF(*args);
+ fastlocals[i] = *args++;
+ }
+ result = PyEval_EvalFrameEx(f,0);
+ ++tstate->recursion_depth;
+ Py_DECREF(f);
+ --tstate->recursion_depth;
+ return result;
+}
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
+ PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
+ PyObject *globals = PyFunction_GET_GLOBALS(func);
+ PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
+ PyObject *closure;
+#if PY_MAJOR_VERSION >= 3
+ PyObject *kwdefs;
+#endif
+ PyObject *kwtuple, **k;
+ PyObject **d;
+ Py_ssize_t nd;
+ Py_ssize_t nk;
+ PyObject *result;
+ assert(kwargs == NULL || PyDict_Check(kwargs));
+ nk = kwargs ? PyDict_Size(kwargs) : 0;
+ if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
+ return NULL;
+ }
+ if (
+#if PY_MAJOR_VERSION >= 3
+ co->co_kwonlyargcount == 0 &&
+#endif
+ likely(kwargs == NULL || nk == 0) &&
+ co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
+ if (argdefs == NULL && co->co_argcount == nargs) {
+ result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
+ goto done;
+ }
+ else if (nargs == 0 && argdefs != NULL
+ && co->co_argcount == Py_SIZE(argdefs)) {
+ /* function called with no arguments, but all parameters have
+ a default value: use default values as arguments .*/
+ args = &PyTuple_GET_ITEM(argdefs, 0);
+ result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
+ goto done;
+ }
+ }
+ if (kwargs != NULL) {
+ Py_ssize_t pos, i;
+ kwtuple = PyTuple_New(2 * nk);
+ if (kwtuple == NULL) {
+ result = NULL;
+ goto done;
+ }
+ k = &PyTuple_GET_ITEM(kwtuple, 0);
+ pos = i = 0;
+ while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
+ Py_INCREF(k[i]);
+ Py_INCREF(k[i+1]);
+ i += 2;
+ }
+ nk = i / 2;
+ }
+ else {
+ kwtuple = NULL;
+ k = NULL;
+ }
+ closure = PyFunction_GET_CLOSURE(func);
+#if PY_MAJOR_VERSION >= 3
+ kwdefs = PyFunction_GET_KW_DEFAULTS(func);
+#endif
+ if (argdefs != NULL) {
+ d = &PyTuple_GET_ITEM(argdefs, 0);
+ nd = Py_SIZE(argdefs);
+ }
+ else {
+ d = NULL;
+ nd = 0;
+ }
+#if PY_MAJOR_VERSION >= 3
+ result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
+ args, nargs,
+ k, (int)nk,
+ d, (int)nd, kwdefs, closure);
+#else
+ result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
+ args, nargs,
+ k, (int)nk,
+ d, (int)nd, closure);
+#endif
+ Py_XDECREF(kwtuple);
+done:
+ Py_LeaveRecursiveCall();
+ return result;
+}
+#endif
+#endif
+
+/* PyObjectCallMethO */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
+ PyObject *self, *result;
+ PyCFunction cfunc;
+ cfunc = PyCFunction_GET_FUNCTION(func);
+ self = PyCFunction_GET_SELF(func);
+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+ return NULL;
+ result = cfunc(self, arg);
+ Py_LeaveRecursiveCall();
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+ PyErr_SetString(
+ PyExc_SystemError,
+ "NULL result without error in PyObject_Call");
+ }
+ return result;
+}
+#endif
+
+/* PyObjectCallOneArg */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+ PyObject *result;
+ PyObject *args = PyTuple_New(1);
+ if (unlikely(!args)) return NULL;
+ Py_INCREF(arg);
+ PyTuple_SET_ITEM(args, 0, arg);
+ result = __Pyx_PyObject_Call(func, args, NULL);
+ Py_DECREF(args);
+ return result;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+#if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(func)) {
+ return __Pyx_PyFunction_FastCall(func, &arg, 1);
+ }
+#endif
+ if (likely(PyCFunction_Check(func))) {
+ if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
+ return __Pyx_PyObject_CallMethO(func, arg);
+#if CYTHON_FAST_PYCCALL
+ } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
+ return __Pyx_PyCFunction_FastCall(func, &arg, 1);
+#endif
+ }
+ }
+ return __Pyx__PyObject_CallOneArg(func, arg);
+}
+#else
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+ PyObject *result;
+ PyObject *args = PyTuple_Pack(1, arg);
+ if (unlikely(!args)) return NULL;
+ result = __Pyx_PyObject_Call(func, args, NULL);
+ Py_DECREF(args);
+ return result;
+}
+#endif
+
+/* PyObjectCallNoArg */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
+#if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(func)) {
+ return __Pyx_PyFunction_FastCall(func, NULL, 0);
+ }
+#endif
+#ifdef __Pyx_CyFunction_USED
+ if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
+#else
+ if (likely(PyCFunction_Check(func))) {
+#endif
+ if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
+ return __Pyx_PyObject_CallMethO(func, NULL);
+ }
+ }
+ return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
+}
+#endif
+
+/* SaveResetException */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ #if PY_VERSION_HEX >= 0x030700A2
+ *type = tstate->exc_state.exc_type;
+ *value = tstate->exc_state.exc_value;
+ *tb = tstate->exc_state.exc_traceback;
+ #else
+ *type = tstate->exc_type;
+ *value = tstate->exc_value;
+ *tb = tstate->exc_traceback;
+ #endif
+ Py_XINCREF(*type);
+ Py_XINCREF(*value);
+ Py_XINCREF(*tb);
+}
+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ #if PY_VERSION_HEX >= 0x030700A2
+ tmp_type = tstate->exc_state.exc_type;
+ tmp_value = tstate->exc_state.exc_value;
+ tmp_tb = tstate->exc_state.exc_traceback;
+ tstate->exc_state.exc_type = type;
+ tstate->exc_state.exc_value = value;
+ tstate->exc_state.exc_traceback = tb;
+ #else
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = type;
+ tstate->exc_value = value;
+ tstate->exc_traceback = tb;
+ #endif
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+}
+#endif
+
+/* PyErrExceptionMatches */
+ #if CYTHON_FAST_THREAD_STATE
+static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
+ Py_ssize_t i, n;
+ n = PyTuple_GET_SIZE(tuple);
+#if PY_MAJOR_VERSION >= 3
+ for (i=0; icurexc_type;
+ if (exc_type == err) return 1;
+ if (unlikely(!exc_type)) return 0;
+ if (unlikely(PyTuple_Check(err)))
+ return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
+ return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
+}
+#endif
+
+/* GetException */
+ #if CYTHON_FAST_THREAD_STATE
+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+#else
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
+#endif
+ PyObject *local_type, *local_value, *local_tb;
+#if CYTHON_FAST_THREAD_STATE
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ local_type = tstate->curexc_type;
+ local_value = tstate->curexc_value;
+ local_tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+#else
+ PyErr_Fetch(&local_type, &local_value, &local_tb);
+#endif
+ PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+#if CYTHON_FAST_THREAD_STATE
+ if (unlikely(tstate->curexc_type))
+#else
+ if (unlikely(PyErr_Occurred()))
+#endif
+ goto bad;
+ #if PY_MAJOR_VERSION >= 3
+ if (local_tb) {
+ if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+ goto bad;
+ }
+ #endif
+ Py_XINCREF(local_tb);
+ Py_XINCREF(local_type);
+ Py_XINCREF(local_value);
+ *type = local_type;
+ *value = local_value;
+ *tb = local_tb;
+#if CYTHON_FAST_THREAD_STATE
+ #if PY_VERSION_HEX >= 0x030700A2
+ tmp_type = tstate->exc_state.exc_type;
+ tmp_value = tstate->exc_state.exc_value;
+ tmp_tb = tstate->exc_state.exc_traceback;
+ tstate->exc_state.exc_type = local_type;
+ tstate->exc_state.exc_value = local_value;
+ tstate->exc_state.exc_traceback = local_tb;
+ #else
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = local_type;
+ tstate->exc_value = local_value;
+ tstate->exc_traceback = local_tb;
+ #endif
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+#else
+ PyErr_SetExcInfo(local_type, local_value, local_tb);
+#endif
+ return 0;
+bad:
+ *type = 0;
+ *value = 0;
+ *tb = 0;
+ Py_XDECREF(local_type);
+ Py_XDECREF(local_value);
+ Py_XDECREF(local_tb);
+ return -1;
+}
+
+/* GetItemInt */
+ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+ PyObject *r;
+ if (!j) return NULL;
+ r = PyObject_GetItem(o, j);
+ Py_DECREF(j);
+ return r;
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ Py_ssize_t wrapped_i = i;
+ if (wraparound & unlikely(i < 0)) {
+ wrapped_i += PyList_GET_SIZE(o);
+ }
+ if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) {
+ PyObject *r = PyList_GET_ITEM(o, wrapped_i);
+ Py_INCREF(r);
+ return r;
+ }
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+ return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ Py_ssize_t wrapped_i = i;
+ if (wraparound & unlikely(i < 0)) {
+ wrapped_i += PyTuple_GET_SIZE(o);
+ }
+ if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) {
+ PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
+ Py_INCREF(r);
+ return r;
+ }
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+ return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
+ if (is_list || PyList_CheckExact(o)) {
+ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+ if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
+ PyObject *r = PyList_GET_ITEM(o, n);
+ Py_INCREF(r);
+ return r;
+ }
+ }
+ else if (PyTuple_CheckExact(o)) {
+ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+ if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
+ PyObject *r = PyTuple_GET_ITEM(o, n);
+ Py_INCREF(r);
+ return r;
+ }
+ } else {
+ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+ if (likely(m && m->sq_item)) {
+ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+ Py_ssize_t l = m->sq_length(o);
+ if (likely(l >= 0)) {
+ i += l;
+ } else {
+ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+ return NULL;
+ PyErr_Clear();
+ }
+ }
+ return m->sq_item(o, i);
+ }
+ }
+#else
+ if (is_list || PySequence_Check(o)) {
+ return PySequence_GetItem(o, i);
+ }
+#endif
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+}
+
+/* PyIntBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ const long b = intval;
+ long x;
+ long a = PyInt_AS_LONG(op1);
+ x = (long)((unsigned long)a + b);
+ if (likely((x^a) >= 0 || (x^b) >= 0))
+ return PyInt_FromLong(x);
+ return PyLong_Type.tp_as_number->nb_add(op1, op2);
+ }
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+ if (likely(PyLong_CheckExact(op1))) {
+ const long b = intval;
+ long a, x;
+#ifdef HAVE_LONG_LONG
+ const PY_LONG_LONG llb = intval;
+ PY_LONG_LONG lla, llx;
+#endif
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ a = likely(size) ? digits[0] : 0;
+ if (size == -1) a = -a;
+ } else {
+ switch (size) {
+ case -2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
+ }
+ }
+ x = a + b;
+ return PyLong_FromLong(x);
+#ifdef HAVE_LONG_LONG
+ long_long:
+ llx = lla + llb;
+ return PyLong_FromLongLong(llx);
+#endif
+
+
+ }
+ #endif
+ if (PyFloat_CheckExact(op1)) {
+ const long b = intval;
+ double a = PyFloat_AS_DOUBLE(op1);
+ double result;
+ PyFPE_START_PROTECT("add", return NULL)
+ result = ((double)a) + (double)b;
+ PyFPE_END_PROTECT(result)
+ return PyFloat_FromDouble(result);
+ }
+ return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
+}
+#endif
+
+/* HasAttr */
+ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
+ PyObject *r;
+ if (unlikely(!__Pyx_PyBaseString_Check(n))) {
+ PyErr_SetString(PyExc_TypeError,
+ "hasattr(): attribute name must be string");
+ return -1;
+ }
+ r = __Pyx_GetAttr(o, n);
+ if (unlikely(!r)) {
+ PyErr_Clear();
+ return 0;
+ } else {
+ Py_DECREF(r);
+ return 1;
+ }
+}
+
+/* RaiseTooManyValuesToUnpack */
+ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+ PyErr_Format(PyExc_ValueError,
+ "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
+}
+
+/* RaiseNeedMoreValuesToUnpack */
+ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+ PyErr_Format(PyExc_ValueError,
+ "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
+ index, (index == 1) ? "" : "s");
+}
+
+/* IterFinish */
+ static CYTHON_INLINE int __Pyx_IterFinish(void) {
+#if CYTHON_FAST_THREAD_STATE
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ PyObject* exc_type = tstate->curexc_type;
+ if (unlikely(exc_type)) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
+ PyObject *exc_value, *exc_tb;
+ exc_value = tstate->curexc_value;
+ exc_tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+ Py_DECREF(exc_type);
+ Py_XDECREF(exc_value);
+ Py_XDECREF(exc_tb);
+ return 0;
+ } else {
+ return -1;
+ }
+ }
+ return 0;
+#else
+ if (unlikely(PyErr_Occurred())) {
+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
+ PyErr_Clear();
+ return 0;
+ } else {
+ return -1;
+ }
+ }
+ return 0;
+#endif
+}
+
+/* UnpackItemEndCheck */
+ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
+ if (unlikely(retval)) {
+ Py_DECREF(retval);
+ __Pyx_RaiseTooManyValuesError(expected);
+ return -1;
+ } else {
+ return __Pyx_IterFinish();
+ }
+ return 0;
+}
+
+/* Import */
+ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+ PyObject *empty_list = 0;
+ PyObject *module = 0;
+ PyObject *global_dict = 0;
+ PyObject *empty_dict = 0;
+ PyObject *list;
+ #if PY_MAJOR_VERSION < 3
+ PyObject *py_import;
+ py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+ if (!py_import)
+ goto bad;
+ #endif
+ if (from_list)
+ list = from_list;
+ else {
+ empty_list = PyList_New(0);
+ if (!empty_list)
+ goto bad;
+ list = empty_list;
+ }
+ global_dict = PyModule_GetDict(__pyx_m);
+ if (!global_dict)
+ goto bad;
+ empty_dict = PyDict_New();
+ if (!empty_dict)
+ goto bad;
+ {
+ #if PY_MAJOR_VERSION >= 3
+ if (level == -1) {
+ if (strchr(__Pyx_MODULE_NAME, '.')) {
+ module = PyImport_ImportModuleLevelObject(
+ name, global_dict, empty_dict, list, 1);
+ if (!module) {
+ if (!PyErr_ExceptionMatches(PyExc_ImportError))
+ goto bad;
+ PyErr_Clear();
+ }
+ }
+ level = 0;
+ }
+ #endif
+ if (!module) {
+ #if PY_MAJOR_VERSION < 3
+ PyObject *py_level = PyInt_FromLong(level);
+ if (!py_level)
+ goto bad;
+ module = PyObject_CallFunctionObjArgs(py_import,
+ name, global_dict, empty_dict, list, py_level, NULL);
+ Py_DECREF(py_level);
+ #else
+ module = PyImport_ImportModuleLevelObject(
+ name, global_dict, empty_dict, list, level);
+ #endif
+ }
+ }
+bad:
+ #if PY_MAJOR_VERSION < 3
+ Py_XDECREF(py_import);
+ #endif
+ Py_XDECREF(empty_list);
+ Py_XDECREF(empty_dict);
+ return module;
+}
+
+/* ImportFrom */
+ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
+ PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
+ if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_Format(PyExc_ImportError,
+ #if PY_MAJOR_VERSION < 3
+ "cannot import name %.230s", PyString_AS_STRING(name));
+ #else
+ "cannot import name %S", name);
+ #endif
+ }
+ return value;
+}
+
+/* CalculateMetaclass */
+ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
+ Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
+ for (i=0; i < nbases; i++) {
+ PyTypeObject *tmptype;
+ PyObject *tmp = PyTuple_GET_ITEM(bases, i);
+ tmptype = Py_TYPE(tmp);
+#if PY_MAJOR_VERSION < 3
+ if (tmptype == &PyClass_Type)
+ continue;
+#endif
+ if (!metaclass) {
+ metaclass = tmptype;
+ continue;
+ }
+ if (PyType_IsSubtype(metaclass, tmptype))
+ continue;
+ if (PyType_IsSubtype(tmptype, metaclass)) {
+ metaclass = tmptype;
+ continue;
+ }
+ PyErr_SetString(PyExc_TypeError,
+ "metaclass conflict: "
+ "the metaclass of a derived class "
+ "must be a (non-strict) subclass "
+ "of the metaclasses of all its bases");
+ return NULL;
+ }
+ if (!metaclass) {
+#if PY_MAJOR_VERSION < 3
+ metaclass = &PyClass_Type;
+#else
+ metaclass = &PyType_Type;
+#endif
+ }
+ Py_INCREF((PyObject*) metaclass);
+ return (PyObject*) metaclass;
+}
+
+/* FetchCommonType */
+ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
+ PyObject* fake_module;
+ PyTypeObject* cached_type = NULL;
+ fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
+ if (!fake_module) return NULL;
+ Py_INCREF(fake_module);
+ cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
+ if (cached_type) {
+ if (!PyType_Check((PyObject*)cached_type)) {
+ PyErr_Format(PyExc_TypeError,
+ "Shared Cython type %.200s is not a type object",
+ type->tp_name);
+ goto bad;
+ }
+ if (cached_type->tp_basicsize != type->tp_basicsize) {
+ PyErr_Format(PyExc_TypeError,
+ "Shared Cython type %.200s has the wrong size, try recompiling",
+ type->tp_name);
+ goto bad;
+ }
+ } else {
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
+ PyErr_Clear();
+ if (PyType_Ready(type) < 0) goto bad;
+ if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
+ goto bad;
+ Py_INCREF(type);
+ cached_type = type;
+ }
+done:
+ Py_DECREF(fake_module);
+ return cached_type;
+bad:
+ Py_XDECREF(cached_type);
+ cached_type = NULL;
+ goto done;
+}
+
+/* CythonFunction */
+ static PyObject *
+__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
+{
+ if (unlikely(op->func_doc == NULL)) {
+ if (op->func.m_ml->ml_doc) {
+#if PY_MAJOR_VERSION >= 3
+ op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
+#else
+ op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
+#endif
+ if (unlikely(op->func_doc == NULL))
+ return NULL;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ }
+ Py_INCREF(op->func_doc);
+ return op->func_doc;
+}
+static int
+__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp = op->func_doc;
+ if (value == NULL) {
+ value = Py_None;
+ }
+ Py_INCREF(value);
+ op->func_doc = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
+{
+ if (unlikely(op->func_name == NULL)) {
+#if PY_MAJOR_VERSION >= 3
+ op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
+#else
+ op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
+#endif
+ if (unlikely(op->func_name == NULL))
+ return NULL;
+ }
+ Py_INCREF(op->func_name);
+ return op->func_name;
+}
+static int
+__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+ if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+ if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+ PyErr_SetString(PyExc_TypeError,
+ "__name__ must be set to a string object");
+ return -1;
+ }
+ tmp = op->func_name;
+ Py_INCREF(value);
+ op->func_name = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
+{
+ Py_INCREF(op->func_qualname);
+ return op->func_qualname;
+}
+static int
+__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+ if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+ if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+ PyErr_SetString(PyExc_TypeError,
+ "__qualname__ must be set to a string object");
+ return -1;
+ }
+ tmp = op->func_qualname;
+ Py_INCREF(value);
+ op->func_qualname = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
+{
+ PyObject *self;
+ self = m->func_closure;
+ if (self == NULL)
+ self = Py_None;
+ Py_INCREF(self);
+ return self;
+}
+static PyObject *
+__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
+{
+ if (unlikely(op->func_dict == NULL)) {
+ op->func_dict = PyDict_New();
+ if (unlikely(op->func_dict == NULL))
+ return NULL;
+ }
+ Py_INCREF(op->func_dict);
+ return op->func_dict;
+}
+static int
+__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp;
+ if (unlikely(value == NULL)) {
+ PyErr_SetString(PyExc_TypeError,
+ "function's dictionary may not be deleted");
+ return -1;
+ }
+ if (unlikely(!PyDict_Check(value))) {
+ PyErr_SetString(PyExc_TypeError,
+ "setting function's dictionary to a non-dict");
+ return -1;
+ }
+ tmp = op->func_dict;
+ Py_INCREF(value);
+ op->func_dict = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
+{
+ Py_INCREF(op->func_globals);
+ return op->func_globals;
+}
+static PyObject *
+__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
+{
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+static PyObject *
+__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
+{
+ PyObject* result = (op->func_code) ? op->func_code : Py_None;
+ Py_INCREF(result);
+ return result;
+}
+static int
+__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
+ int result = 0;
+ PyObject *res = op->defaults_getter((PyObject *) op);
+ if (unlikely(!res))
+ return -1;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
+ Py_INCREF(op->defaults_tuple);
+ op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
+ Py_INCREF(op->defaults_kwdict);
+ #else
+ op->defaults_tuple = PySequence_ITEM(res, 0);
+ if (unlikely(!op->defaults_tuple)) result = -1;
+ else {
+ op->defaults_kwdict = PySequence_ITEM(res, 1);
+ if (unlikely(!op->defaults_kwdict)) result = -1;
+ }
+ #endif
+ Py_DECREF(res);
+ return result;
+}
+static int
+__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
+ PyObject* tmp;
+ if (!value) {
+ value = Py_None;
+ } else if (value != Py_None && !PyTuple_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__defaults__ must be set to a tuple object");
+ return -1;
+ }
+ Py_INCREF(value);
+ tmp = op->defaults_tuple;
+ op->defaults_tuple = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
+ PyObject* result = op->defaults_tuple;
+ if (unlikely(!result)) {
+ if (op->defaults_getter) {
+ if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+ result = op->defaults_tuple;
+ } else {
+ result = Py_None;
+ }
+ }
+ Py_INCREF(result);
+ return result;
+}
+static int
+__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
+ PyObject* tmp;
+ if (!value) {
+ value = Py_None;
+ } else if (value != Py_None && !PyDict_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__kwdefaults__ must be set to a dict object");
+ return -1;
+ }
+ Py_INCREF(value);
+ tmp = op->defaults_kwdict;
+ op->defaults_kwdict = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
+ PyObject* result = op->defaults_kwdict;
+ if (unlikely(!result)) {
+ if (op->defaults_getter) {
+ if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+ result = op->defaults_kwdict;
+ } else {
+ result = Py_None;
+ }
+ }
+ Py_INCREF(result);
+ return result;
+}
+static int
+__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
+ PyObject* tmp;
+ if (!value || value == Py_None) {
+ value = NULL;
+ } else if (!PyDict_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__annotations__ must be set to a dict object");
+ return -1;
+ }
+ Py_XINCREF(value);
+ tmp = op->func_annotations;
+ op->func_annotations = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
+ PyObject* result = op->func_annotations;
+ if (unlikely(!result)) {
+ result = PyDict_New();
+ if (unlikely(!result)) return NULL;
+ op->func_annotations = result;
+ }
+ Py_INCREF(result);
+ return result;
+}
+static PyGetSetDef __pyx_CyFunction_getsets[] = {
+ {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+ {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+ {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+ {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+ {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
+ {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
+ {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+ {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+ {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+ {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+ {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+ {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+ {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+ {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+ {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+ {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+ {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
+ {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+static PyMemberDef __pyx_CyFunction_members[] = {
+ {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
+ {0, 0, 0, 0, 0}
+};
+static PyObject *
+__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
+{
+#if PY_MAJOR_VERSION >= 3
+ return PyUnicode_FromString(m->func.m_ml->ml_name);
+#else
+ return PyString_FromString(m->func.m_ml->ml_name);
+#endif
+}
+static PyMethodDef __pyx_CyFunction_methods[] = {
+ {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
+ {0, 0, 0, 0}
+};
+#if PY_VERSION_HEX < 0x030500A0
+#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
+#else
+#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
+#endif
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
+ PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
+ __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
+ if (op == NULL)
+ return NULL;
+ op->flags = flags;
+ __Pyx_CyFunction_weakreflist(op) = NULL;
+ op->func.m_ml = ml;
+ op->func.m_self = (PyObject *) op;
+ Py_XINCREF(closure);
+ op->func_closure = closure;
+ Py_XINCREF(module);
+ op->func.m_module = module;
+ op->func_dict = NULL;
+ op->func_name = NULL;
+ Py_INCREF(qualname);
+ op->func_qualname = qualname;
+ op->func_doc = NULL;
+ op->func_classobj = NULL;
+ op->func_globals = globals;
+ Py_INCREF(op->func_globals);
+ Py_XINCREF(code);
+ op->func_code = code;
+ op->defaults_pyobjects = 0;
+ op->defaults = NULL;
+ op->defaults_tuple = NULL;
+ op->defaults_kwdict = NULL;
+ op->defaults_getter = NULL;
+ op->func_annotations = NULL;
+ PyObject_GC_Track(op);
+ return (PyObject *) op;
+}
+static int
+__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
+{
+ Py_CLEAR(m->func_closure);
+ Py_CLEAR(m->func.m_module);
+ Py_CLEAR(m->func_dict);
+ Py_CLEAR(m->func_name);
+ Py_CLEAR(m->func_qualname);
+ Py_CLEAR(m->func_doc);
+ Py_CLEAR(m->func_globals);
+ Py_CLEAR(m->func_code);
+ Py_CLEAR(m->func_classobj);
+ Py_CLEAR(m->defaults_tuple);
+ Py_CLEAR(m->defaults_kwdict);
+ Py_CLEAR(m->func_annotations);
+ if (m->defaults) {
+ PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+ int i;
+ for (i = 0; i < m->defaults_pyobjects; i++)
+ Py_XDECREF(pydefaults[i]);
+ PyObject_Free(m->defaults);
+ m->defaults = NULL;
+ }
+ return 0;
+}
+static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
+{
+ if (__Pyx_CyFunction_weakreflist(m) != NULL)
+ PyObject_ClearWeakRefs((PyObject *) m);
+ __Pyx_CyFunction_clear(m);
+ PyObject_GC_Del(m);
+}
+static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
+{
+ PyObject_GC_UnTrack(m);
+ __Pyx__CyFunction_dealloc(m);
+}
+static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
+{
+ Py_VISIT(m->func_closure);
+ Py_VISIT(m->func.m_module);
+ Py_VISIT(m->func_dict);
+ Py_VISIT(m->func_name);
+ Py_VISIT(m->func_qualname);
+ Py_VISIT(m->func_doc);
+ Py_VISIT(m->func_globals);
+ Py_VISIT(m->func_code);
+ Py_VISIT(m->func_classobj);
+ Py_VISIT(m->defaults_tuple);
+ Py_VISIT(m->defaults_kwdict);
+ if (m->defaults) {
+ PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+ int i;
+ for (i = 0; i < m->defaults_pyobjects; i++)
+ Py_VISIT(pydefaults[i]);
+ }
+ return 0;
+}
+static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
+{
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
+ Py_INCREF(func);
+ return func;
+ }
+ if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
+ if (type == NULL)
+ type = (PyObject *)(Py_TYPE(obj));
+ return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
+ }
+ if (obj == Py_None)
+ obj = NULL;
+ return __Pyx_PyMethod_New(func, obj, type);
+}
+static PyObject*
+__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
+{
+#if PY_MAJOR_VERSION >= 3
+ return PyUnicode_FromFormat("",
+ op->func_qualname, (void *)op);
+#else
+ return PyString_FromFormat("",
+ PyString_AsString(op->func_qualname), (void *)op);
+#endif
+}
+static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
+ PyCFunctionObject* f = (PyCFunctionObject*)func;
+ PyCFunction meth = f->m_ml->ml_meth;
+ Py_ssize_t size;
+ switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
+ case METH_VARARGS:
+ if (likely(kw == NULL || PyDict_Size(kw) == 0))
+ return (*meth)(self, arg);
+ break;
+ case METH_VARARGS | METH_KEYWORDS:
+ return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
+ case METH_NOARGS:
+ if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
+ size = PyTuple_GET_SIZE(arg);
+ if (likely(size == 0))
+ return (*meth)(self, NULL);
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
+ f->m_ml->ml_name, size);
+ return NULL;
+ }
+ break;
+ case METH_O:
+ if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
+ size = PyTuple_GET_SIZE(arg);
+ if (likely(size == 1)) {
+ PyObject *result, *arg0;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ arg0 = PyTuple_GET_ITEM(arg, 0);
+ #else
+ arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
+ #endif
+ result = (*meth)(self, arg0);
+ #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
+ Py_DECREF(arg0);
+ #endif
+ return result;
+ }
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
+ f->m_ml->ml_name, size);
+ return NULL;
+ }
+ break;
+ default:
+ PyErr_SetString(PyExc_SystemError, "Bad call flags in "
+ "__Pyx_CyFunction_Call. METH_OLDARGS is no "
+ "longer supported!");
+ return NULL;
+ }
+ PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
+ f->m_ml->ml_name);
+ return NULL;
+}
+static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+ return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
+}
+static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
+ PyObject *result;
+ __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
+ if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
+ Py_ssize_t argc;
+ PyObject *new_args;
+ PyObject *self;
+ argc = PyTuple_GET_SIZE(args);
+ new_args = PyTuple_GetSlice(args, 1, argc);
+ if (unlikely(!new_args))
+ return NULL;
+ self = PyTuple_GetItem(args, 0);
+ if (unlikely(!self)) {
+ Py_DECREF(new_args);
+ return NULL;
+ }
+ result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
+ Py_DECREF(new_args);
+ } else {
+ result = __Pyx_CyFunction_Call(func, args, kw);
+ }
+ return result;
+}
+static PyTypeObject __pyx_CyFunctionType_type = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "cython_function_or_method",
+ sizeof(__pyx_CyFunctionObject),
+ 0,
+ (destructor) __Pyx_CyFunction_dealloc,
+ 0,
+ 0,
+ 0,
+#if PY_MAJOR_VERSION < 3
+ 0,
+#else
+ 0,
+#endif
+ (reprfunc) __Pyx_CyFunction_repr,
+ 0,
+ 0,
+ 0,
+ 0,
+ __Pyx_CyFunction_CallAsMethod,
+ 0,
+ 0,
+ 0,
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
+ 0,
+ (traverseproc) __Pyx_CyFunction_traverse,
+ (inquiry) __Pyx_CyFunction_clear,
+ 0,
+#if PY_VERSION_HEX < 0x030500A0
+ offsetof(__pyx_CyFunctionObject, func_weakreflist),
+#else
+ offsetof(PyCFunctionObject, m_weakreflist),
+#endif
+ 0,
+ 0,
+ __pyx_CyFunction_methods,
+ __pyx_CyFunction_members,
+ __pyx_CyFunction_getsets,
+ 0,
+ 0,
+ __Pyx_CyFunction_descr_get,
+ 0,
+ offsetof(__pyx_CyFunctionObject, func_dict),
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+#if PY_VERSION_HEX >= 0x030400a1
+ 0,
+#endif
+};
+static int __pyx_CyFunction_init(void) {
+ __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
+ if (unlikely(__pyx_CyFunctionType == NULL)) {
+ return -1;
+ }
+ return 0;
+}
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->defaults = PyObject_Malloc(size);
+ if (unlikely(!m->defaults))
+ return PyErr_NoMemory();
+ memset(m->defaults, 0, size);
+ m->defaults_pyobjects = pyobjects;
+ return m->defaults;
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->defaults_tuple = tuple;
+ Py_INCREF(tuple);
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->defaults_kwdict = dict;
+ Py_INCREF(dict);
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->func_annotations = dict;
+ Py_INCREF(dict);
+}
+
+/* Py3ClassCreate */
+ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
+ PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
+ PyObject *ns;
+ if (metaclass) {
+ PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
+ if (prep) {
+ PyObject *pargs = PyTuple_Pack(2, name, bases);
+ if (unlikely(!pargs)) {
+ Py_DECREF(prep);
+ return NULL;
+ }
+ ns = PyObject_Call(prep, pargs, mkw);
+ Py_DECREF(prep);
+ Py_DECREF(pargs);
+ } else {
+ if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
+ return NULL;
+ PyErr_Clear();
+ ns = PyDict_New();
+ }
+ } else {
+ ns = PyDict_New();
+ }
+ if (unlikely(!ns))
+ return NULL;
+ if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
+ if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
+ if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
+ return ns;
+bad:
+ Py_DECREF(ns);
+ return NULL;
+}
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
+ PyObject *dict, PyObject *mkw,
+ int calculate_metaclass, int allow_py2_metaclass) {
+ PyObject *result, *margs;
+ PyObject *owned_metaclass = NULL;
+ if (allow_py2_metaclass) {
+ owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
+ if (owned_metaclass) {
+ metaclass = owned_metaclass;
+ } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
+ PyErr_Clear();
+ } else {
+ return NULL;
+ }
+ }
+ if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
+ metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
+ Py_XDECREF(owned_metaclass);
+ if (unlikely(!metaclass))
+ return NULL;
+ owned_metaclass = metaclass;
+ }
+ margs = PyTuple_Pack(3, name, bases, dict);
+ if (unlikely(!margs)) {
+ result = NULL;
+ } else {
+ result = PyObject_Call(metaclass, margs, mkw);
+ Py_DECREF(margs);
+ }
+ Py_XDECREF(owned_metaclass);
+ return result;
+}
+
+/* CLineInTraceback */
+ #ifndef CYTHON_CLINE_IN_TRACEBACK
+static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
+ PyObject *use_cline;
+ PyObject *ptype, *pvalue, *ptraceback;
+#if CYTHON_COMPILING_IN_CPYTHON
+ PyObject **cython_runtime_dict;
+#endif
+ __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
+#if CYTHON_COMPILING_IN_CPYTHON
+ cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
+ if (likely(cython_runtime_dict)) {
+ use_cline = PyDict_GetItem(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
+ } else
+#endif
+ {
+ PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
+ if (use_cline_obj) {
+ use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
+ Py_DECREF(use_cline_obj);
+ } else {
+ PyErr_Clear();
+ use_cline = NULL;
+ }
+ }
+ if (!use_cline) {
+ c_line = 0;
+ PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
+ }
+ else if (PyObject_Not(use_cline) != 0) {
+ c_line = 0;
+ }
+ __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
+ return c_line;
+}
+#endif
+
+/* CodeObjectCache */
+ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+ int start = 0, mid = 0, end = count - 1;
+ if (end >= 0 && code_line > entries[end].code_line) {
+ return count;
+ }
+ while (start < end) {
+ mid = start + (end - start) / 2;
+ if (code_line < entries[mid].code_line) {
+ end = mid;
+ } else if (code_line > entries[mid].code_line) {
+ start = mid + 1;
+ } else {
+ return mid;
+ }
+ }
+ if (code_line <= entries[mid].code_line) {
+ return mid;
+ } else {
+ return mid + 1;
+ }
+}
+static PyCodeObject *__pyx_find_code_object(int code_line) {
+ PyCodeObject* code_object;
+ int pos;
+ if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
+ return NULL;
+ }
+ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+ if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
+ return NULL;
+ }
+ code_object = __pyx_code_cache.entries[pos].code_object;
+ Py_INCREF(code_object);
+ return code_object;
+}
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
+ int pos, i;
+ __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
+ if (unlikely(!code_line)) {
+ return;
+ }
+ if (unlikely(!entries)) {
+ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
+ if (likely(entries)) {
+ __pyx_code_cache.entries = entries;
+ __pyx_code_cache.max_count = 64;
+ __pyx_code_cache.count = 1;
+ entries[0].code_line = code_line;
+ entries[0].code_object = code_object;
+ Py_INCREF(code_object);
+ }
+ return;
+ }
+ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+ if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
+ PyCodeObject* tmp = entries[pos].code_object;
+ entries[pos].code_object = code_object;
+ Py_DECREF(tmp);
+ return;
+ }
+ if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
+ int new_max = __pyx_code_cache.max_count + 64;
+ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
+ __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
+ if (unlikely(!entries)) {
+ return;
+ }
+ __pyx_code_cache.entries = entries;
+ __pyx_code_cache.max_count = new_max;
+ }
+ for (i=__pyx_code_cache.count; i>pos; i--) {
+ entries[i] = entries[i-1];
+ }
+ entries[pos].code_line = code_line;
+ entries[pos].code_object = code_object;
+ __pyx_code_cache.count++;
+ Py_INCREF(code_object);
+}
+
+/* AddTraceback */
+ #include "compile.h"
+#include "frameobject.h"
+#include "traceback.h"
+static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
+ const char *funcname, int c_line,
+ int py_line, const char *filename) {
+ PyCodeObject *py_code = 0;
+ PyObject *py_srcfile = 0;
+ PyObject *py_funcname = 0;
+ #if PY_MAJOR_VERSION < 3
+ py_srcfile = PyString_FromString(filename);
+ #else
+ py_srcfile = PyUnicode_FromString(filename);
+ #endif
+ if (!py_srcfile) goto bad;
+ if (c_line) {
+ #if PY_MAJOR_VERSION < 3
+ py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+ #else
+ py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+ #endif
+ }
+ else {
+ #if PY_MAJOR_VERSION < 3
+ py_funcname = PyString_FromString(funcname);
+ #else
+ py_funcname = PyUnicode_FromString(funcname);
+ #endif
+ }
+ if (!py_funcname) goto bad;
+ py_code = __Pyx_PyCode_New(
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ __pyx_empty_bytes, /*PyObject *code,*/
+ __pyx_empty_tuple, /*PyObject *consts,*/
+ __pyx_empty_tuple, /*PyObject *names,*/
+ __pyx_empty_tuple, /*PyObject *varnames,*/
+ __pyx_empty_tuple, /*PyObject *freevars,*/
+ __pyx_empty_tuple, /*PyObject *cellvars,*/
+ py_srcfile, /*PyObject *filename,*/
+ py_funcname, /*PyObject *name,*/
+ py_line,
+ __pyx_empty_bytes /*PyObject *lnotab*/
+ );
+ Py_DECREF(py_srcfile);
+ Py_DECREF(py_funcname);
+ return py_code;
+bad:
+ Py_XDECREF(py_srcfile);
+ Py_XDECREF(py_funcname);
+ return NULL;
+}
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename) {
+ PyCodeObject *py_code = 0;
+ PyFrameObject *py_frame = 0;
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ if (c_line) {
+ c_line = __Pyx_CLineForTraceback(tstate, c_line);
+ }
+ py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
+ if (!py_code) {
+ py_code = __Pyx_CreateCodeObjectForTraceback(
+ funcname, c_line, py_line, filename);
+ if (!py_code) goto bad;
+ __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
+ }
+ py_frame = PyFrame_New(
+ tstate, /*PyThreadState *tstate,*/
+ py_code, /*PyCodeObject *code,*/
+ __pyx_d, /*PyObject *globals,*/
+ 0 /*PyObject *locals*/
+ );
+ if (!py_frame) goto bad;
+ __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
+ PyTraceBack_Here(py_frame);
+bad:
+ Py_XDECREF(py_code);
+ Py_XDECREF(py_frame);
+}
+
+/* CIntToPy */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+ const long neg_one = (long) -1, const_zero = (long) 0;
+ const int is_unsigned = neg_one > const_zero;
+ if (is_unsigned) {
+ if (sizeof(long) < sizeof(long)) {
+ return PyInt_FromLong((long) value);
+ } else if (sizeof(long) <= sizeof(unsigned long)) {
+ return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
+ }
+ } else {
+ if (sizeof(long) <= sizeof(long)) {
+ return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
+ return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
+ }
+ }
+ {
+ int one = 1; int little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&value;
+ return _PyLong_FromByteArray(bytes, sizeof(long),
+ little, !is_unsigned);
+ }
+}
+
+/* CIntFromPyVerify */
+ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
+#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
+#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
+ {\
+ func_type value = func_value;\
+ if (sizeof(target_type) < sizeof(func_type)) {\
+ if (unlikely(value != (func_type) (target_type) value)) {\
+ func_type zero = 0;\
+ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
+ return (target_type) -1;\
+ if (is_unsigned && unlikely(value < zero))\
+ goto raise_neg_overflow;\
+ else\
+ goto raise_overflow;\
+ }\
+ }\
+ return (target_type) value;\
+ }
+
+/* CIntFromPy */
+ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+ const long neg_one = (long) -1, const_zero = (long) 0;
+ const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+ if (sizeof(long) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
+ } else {
+ long val = PyInt_AS_LONG(x);
+ if (is_unsigned && unlikely(val < 0)) {
+ goto raise_neg_overflow;
+ }
+ return (long) val;
+ }
+ } else
+#endif
+ if (likely(PyLong_Check(x))) {
+ if (is_unsigned) {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (long) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
+ case 2:
+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
+ return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
+ return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
+ return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ }
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ if (unlikely(Py_SIZE(x) < 0)) {
+ goto raise_neg_overflow;
+ }
+#else
+ {
+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
+ if (unlikely(result < 0))
+ return (long) -1;
+ if (unlikely(result == 1))
+ goto raise_neg_overflow;
+ }
+#endif
+ if (sizeof(long) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
+ }
+ } else {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (long) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
+ case -2:
+ if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 2:
+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case -3:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case -4:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ }
+#endif
+ if (sizeof(long) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
+ }
+ }
+ {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+ PyErr_SetString(PyExc_RuntimeError,
+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+ long val;
+ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+#endif
+ return (long) -1;
+ }
+ } else {
+ long val;
+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+ if (!tmp) return (long) -1;
+ val = __Pyx_PyInt_As_long(tmp);
+ Py_DECREF(tmp);
+ return val;
+ }
+raise_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "value too large to convert to long");
+ return (long) -1;
+raise_neg_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "can't convert negative value to long");
+ return (long) -1;
+}
+
+/* CIntFromPy */
+ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+ const int neg_one = (int) -1, const_zero = (int) 0;
+ const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+ if (sizeof(int) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
+ } else {
+ long val = PyInt_AS_LONG(x);
+ if (is_unsigned && unlikely(val < 0)) {
+ goto raise_neg_overflow;
+ }
+ return (int) val;
+ }
+ } else
+#endif
+ if (likely(PyLong_Check(x))) {
+ if (is_unsigned) {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (int) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
+ case 2:
+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
+ return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
+ return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
+ return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ }
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ if (unlikely(Py_SIZE(x) < 0)) {
+ goto raise_neg_overflow;
+ }
+#else
+ {
+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
+ if (unlikely(result < 0))
+ return (int) -1;
+ if (unlikely(result == 1))
+ goto raise_neg_overflow;
+ }
+#endif
+ if (sizeof(int) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
+ }
+ } else {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (int) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
+ case -2:
+ if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 2:
+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case -3:
+ if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case -4:
+ if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
+ return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ }
+#endif
+ if (sizeof(int) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
+ }
+ }
+ {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+ PyErr_SetString(PyExc_RuntimeError,
+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+ int val;
+ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+#endif
+ return (int) -1;
+ }
+ } else {
+ int val;
+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+ if (!tmp) return (int) -1;
+ val = __Pyx_PyInt_As_int(tmp);
+ Py_DECREF(tmp);
+ return val;
+ }
+raise_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "value too large to convert to int");
+ return (int) -1;
+raise_neg_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "can't convert negative value to int");
+ return (int) -1;
+}
+
+/* FastTypeChecks */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
+ while (a) {
+ a = a->tp_base;
+ if (a == b)
+ return 1;
+ }
+ return b == &PyBaseObject_Type;
+}
+static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
+ PyObject *mro;
+ if (a == b) return 1;
+ mro = a->tp_mro;
+ if (likely(mro)) {
+ Py_ssize_t i, n;
+ n = PyTuple_GET_SIZE(mro);
+ for (i = 0; i < n; i++) {
+ if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
+ return 1;
+ }
+ return 0;
+ }
+ return __Pyx_InBases(a, b);
+}
+#if PY_MAJOR_VERSION == 2
+static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
+ PyObject *exception, *value, *tb;
+ int res;
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrFetch(&exception, &value, &tb);
+ res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
+ if (unlikely(res == -1)) {
+ PyErr_WriteUnraisable(err);
+ res = 0;
+ }
+ if (!res) {
+ res = PyObject_IsSubclass(err, exc_type2);
+ if (unlikely(res == -1)) {
+ PyErr_WriteUnraisable(err);
+ res = 0;
+ }
+ }
+ __Pyx_ErrRestore(exception, value, tb);
+ return res;
+}
+#else
+static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
+ int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
+ if (!res) {
+ res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
+ }
+ return res;
+}
+#endif
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
+ if (likely(err == exc_type)) return 1;
+ if (likely(PyExceptionClass_Check(err))) {
+ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
+ }
+ return PyErr_GivenExceptionMatches(err, exc_type);
+}
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
+ if (likely(err == exc_type1 || err == exc_type2)) return 1;
+ if (likely(PyExceptionClass_Check(err))) {
+ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
+ }
+ return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
+}
+#endif
+
+/* CheckBinaryVersion */
+ static int __Pyx_check_binary_version(void) {
+ char ctversion[4], rtversion[4];
+ PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
+ PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
+ if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
+ char message[200];
+ PyOS_snprintf(message, sizeof(message),
+ "compiletime version %s of module '%.100s' "
+ "does not match runtime version %s",
+ ctversion, __Pyx_MODULE_NAME, rtversion);
+ return PyErr_WarnEx(NULL, message, 1);
+ }
+ return 0;
+}
+
+/* InitStrings */
+ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
+ while (t->p) {
+ #if PY_MAJOR_VERSION < 3
+ if (t->is_unicode) {
+ *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
+ } else if (t->intern) {
+ *t->p = PyString_InternFromString(t->s);
+ } else {
+ *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
+ }
+ #else
+ if (t->is_unicode | t->is_str) {
+ if (t->intern) {
+ *t->p = PyUnicode_InternFromString(t->s);
+ } else if (t->encoding) {
+ *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
+ } else {
+ *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+ }
+ } else {
+ *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
+ }
+ #endif
+ if (!*t->p)
+ return -1;
+ if (PyObject_Hash(*t->p) == -1)
+ PyErr_Clear();
+ ++t;
+ }
+ return 0;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
+ return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
+}
+static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
+ Py_ssize_t ignore;
+ return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+#if !CYTHON_PEP393_ENABLED
+static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+ char* defenc_c;
+ PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+ if (!defenc) return NULL;
+ defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ {
+ char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+ char* c;
+ for (c = defenc_c; c < end; c++) {
+ if ((unsigned char) (*c) >= 128) {
+ PyUnicode_AsASCIIString(o);
+ return NULL;
+ }
+ }
+ }
+#endif
+ *length = PyBytes_GET_SIZE(defenc);
+ return defenc_c;
+}
+#else
+static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+ if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ if (likely(PyUnicode_IS_ASCII(o))) {
+ *length = PyUnicode_GET_LENGTH(o);
+ return PyUnicode_AsUTF8(o);
+ } else {
+ PyUnicode_AsASCIIString(o);
+ return NULL;
+ }
+#else
+ return PyUnicode_AsUTF8AndSize(o, length);
+#endif
+}
+#endif
+#endif
+static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+ if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+ PyUnicode_Check(o)) {
+ return __Pyx_PyUnicode_AsStringAndSize(o, length);
+ } else
+#endif
+#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
+ if (PyByteArray_Check(o)) {
+ *length = PyByteArray_GET_SIZE(o);
+ return PyByteArray_AS_STRING(o);
+ } else
+#endif
+ {
+ char* result;
+ int r = PyBytes_AsStringAndSize(o, &result, length);
+ if (unlikely(r < 0)) {
+ return NULL;
+ } else {
+ return result;
+ }
+ }
+}
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+ int is_true = x == Py_True;
+ if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
+ else return PyObject_IsTrue(x);
+}
+static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
+#if PY_MAJOR_VERSION >= 3
+ if (PyLong_Check(result)) {
+ if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
+ "__int__ returned non-int (type %.200s). "
+ "The ability to return an instance of a strict subclass of int "
+ "is deprecated, and may be removed in a future version of Python.",
+ Py_TYPE(result)->tp_name)) {
+ Py_DECREF(result);
+ return NULL;
+ }
+ return result;
+ }
+#endif
+ PyErr_Format(PyExc_TypeError,
+ "__%.4s__ returned non-%.4s (type %.200s)",
+ type_name, type_name, Py_TYPE(result)->tp_name);
+ Py_DECREF(result);
+ return NULL;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
+#if CYTHON_USE_TYPE_SLOTS
+ PyNumberMethods *m;
+#endif
+ const char *name = NULL;
+ PyObject *res = NULL;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x) || PyLong_Check(x)))
+#else
+ if (likely(PyLong_Check(x)))
+#endif
+ return __Pyx_NewRef(x);
+#if CYTHON_USE_TYPE_SLOTS
+ m = Py_TYPE(x)->tp_as_number;
+ #if PY_MAJOR_VERSION < 3
+ if (m && m->nb_int) {
+ name = "int";
+ res = m->nb_int(x);
+ }
+ else if (m && m->nb_long) {
+ name = "long";
+ res = m->nb_long(x);
+ }
+ #else
+ if (likely(m && m->nb_int)) {
+ name = "int";
+ res = m->nb_int(x);
+ }
+ #endif
+#else
+ if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
+ res = PyNumber_Int(x);
+ }
+#endif
+ if (likely(res)) {
+#if PY_MAJOR_VERSION < 3
+ if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
+#else
+ if (unlikely(!PyLong_CheckExact(res))) {
+#endif
+ return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
+ }
+ }
+ else if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_TypeError,
+ "an integer is required");
+ }
+ return res;
+}
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+ Py_ssize_t ival;
+ PyObject *x;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(b))) {
+ if (sizeof(Py_ssize_t) >= sizeof(long))
+ return PyInt_AS_LONG(b);
+ else
+ return PyInt_AsSsize_t(x);
+ }
+#endif
+ if (likely(PyLong_CheckExact(b))) {
+ #if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)b)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(b);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ ival = likely(size) ? digits[0] : 0;
+ if (size == -1) ival = -ival;
+ return ival;
+ } else {
+ switch (size) {
+ case 2:
+ if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -2:
+ if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case 3:
+ if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -3:
+ if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case 4:
+ if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -4:
+ if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ }
+ }
+ #endif
+ return PyLong_AsSsize_t(b);
+ }
+ x = PyNumber_Index(b);
+ if (!x) return -1;
+ ival = PyInt_AsSsize_t(x);
+ Py_DECREF(x);
+ return ival;
+}
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+ return PyInt_FromSize_t(ival);
+}
+
+
+#endif /* Py_PYTHON_H */
diff --git a/pyomo/core/kernel/numvalue.py b/pyomo/core/expr/numvalue.py
similarity index 54%
rename from pyomo/core/kernel/numvalue.py
rename to pyomo/core/expr/numvalue.py
index 10789ed4350..664693c6469 100644
--- a/pyomo/core/kernel/numvalue.py
+++ b/pyomo/core/expr/numvalue.py
@@ -8,11 +8,13 @@
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
+__all__ = ('value', 'is_constant', 'is_fixed', 'is_variable_type', 'potentially_variable', 'update_KnownConstants', 'as_numeric', 'NumericValue', 'NumericConstant', 'ZeroConstant', 'native_numeric_types', 'native_types', 'polynomial_degree')
+
import sys
import logging
from six import iteritems, PY3, string_types, text_type, binary_type
-from pyomo.core.kernel.expr_common import \
+from pyomo.core.expr.expr_common import \
(_add, _sub, _mul, _div, _pow,
_neg, _abs, _inplace, _radd,
_rsub, _rmul, _rdiv, _rpow,
@@ -21,10 +23,14 @@
logger = logging.getLogger('pyomo.core')
-def generate_expression(etype, _self,_other):
- raise RuntimeError("incomplete import of Pyomo expression system")
-def generate_relational_expression(etype, lhs, rhs):
- raise RuntimeError("incomplete import of Pyomo expression system")
+def _generate_sum_expression(etype, _self, _other):
+ raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+def _generate_mul_expression(etype, _self, _other):
+ raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+def _generate_other_expression(etype, _self, _other):
+ raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
+def _generate_relational_expression(etype, lhs, rhs):
+ raise RuntimeError("incomplete import of Pyomo expression system") #pragma: no cover
##------------------------------------------------------------------------
##
@@ -32,25 +38,36 @@ def generate_relational_expression(etype, lhs, rhs):
##
##------------------------------------------------------------------------
-def _old_value(obj):
- """
- A utility function that returns the value of a Pyomo object or expression.
+class NonNumericValue(object):
+ """An object that contains a non-numeric value
- If the argument is None, a numeric value or a string, then this
- function simply returns the argument. Otherwise, if the argument is
- a NumericValue then the __call__ method is executed.
+ Constructor Arguments:
+ value The initial value.
"""
- if obj is None:
- return None
- if type(obj) in (bool,int,long,float,str):
- return obj
- if not isinstance(obj, NumericValue):
- raise ValueError("Object %s is not a NumericValue object" % (obj,))
- tmp = obj()
- if tmp is None:
- raise ValueError("No value for uninitialized NumericValue object %s"
- % (obj.name,))
- return tmp
+ __slots__ = ('value',)
+
+ def __init__(self, value):
+ self.value = value
+
+ def __str__(self):
+ return str(self.value)
+
+ def __getstate__(self):
+ state = {}
+ state['value'] = getattr(self,'value')
+ return state
+
+ def __setstate__(self, state):
+ setattr(self, 'value', state['value'])
+
+
+#: Python set used to identify numeric constants, boolean values, strings
+#: and instances of :class:`NonNumericValue `, which is commonly used in code that walks
+#: Pyomo expression trees.
+#:
+#: :data:`nonpyomo_leaf_types` = :data:`native_types + { :data:`NonNumericValue ` }
+nonpyomo_leaf_types = set([NonNumericValue])
+
# It is *significantly* faster to build the list of types we want to
# test against as a "static" set, and not to regenerate it locally for
@@ -64,6 +81,10 @@ def _old_value(obj):
# because not all boolean types exhibit numeric properties
# (e.g., numpy.bool_)
#
+
+#: Python set used to identify numeric constants. This set includes
+#: native Python types as well as numeric types from Python packages
+#: like numpy, which may be registered by users.
native_numeric_types = set([ int, float, bool ])
native_integer_types = set([ int, bool ])
native_boolean_types = set([ int, bool, str ])
@@ -74,6 +95,12 @@ def _old_value(obj):
except:
pass
+#: Python set used to identify numeric constants and related native
+#: types. This set includes
+#: native Python types as well as numeric types from Python packages
+#: like numpy.
+#:
+#: :data:`native_types` = :data:`native_numeric_types + { str }
native_types = set([ bool, str, type(None) ])
if PY3:
native_types.add(bytes)
@@ -84,6 +111,7 @@ def _old_value(obj):
native_types.update( native_numeric_types )
native_types.update( native_integer_types )
native_types.update( native_boolean_types )
+nonpyomo_leaf_types.update( native_types )
def RegisterNumericType(new_type):
"""
@@ -96,6 +124,7 @@ def RegisterNumericType(new_type):
global native_types
native_numeric_types.add(new_type)
native_types.add(new_type)
+ nonpyomo_leaf_types.add(new_type)
def RegisterIntegerType(new_type):
"""
@@ -111,6 +140,7 @@ def RegisterIntegerType(new_type):
native_numeric_types.add(new_type)
native_integer_types.add(new_type)
native_types.add(new_type)
+ nonpyomo_leaf_types.add(new_type)
def RegisterBooleanType(new_type):
"""
@@ -124,6 +154,7 @@ def RegisterBooleanType(new_type):
global native_types
native_boolean_types.add(new_type)
native_types.add(new_type)
+ nonpyomo_leaf_types.add(new_type)
def value(obj, exception=True):
"""
@@ -136,12 +167,14 @@ def value(obj, exception=True):
then this function simply returns the argument.
Otherwise, if the argument is a NumericValue
then the __call__ method is executed.
- exception (bool): Indicates if an exception should
+ exception (bool): If :const:`True`, then an exception should
be raised when instances of NumericValue fail to
evaluate due to one or more objects not being
initialized to a numeric value (e.g, one or more
variables in an algebraic expression having the
- value None). Default is True.
+ value None). If :const:`False`, then the function
+ returns :const:`None` when an exception occurs.
+ Default is True.
Returns: A numeric value or None.
"""
@@ -160,10 +193,13 @@ def value(obj, exception=True):
try:
tmp = numeric(exception=exception)
except:
- logger.error(
- "evaluating object as numeric value: %s\n (object: %s)\n%s"
- % (obj, type(obj), sys.exc_info()[1]))
- raise
+ if exception:
+ logger.error(
+ "evaluating object as numeric value: %s\n (object: %s)\n%s"
+ % (obj, type(obj), sys.exc_info()[1]))
+ raise
+ else:
+ return None
if exception and (tmp is None):
raise ValueError("No value for uninitialized NumericValue object %s"
@@ -210,6 +246,19 @@ def is_fixed(obj):
pass
return as_numeric(obj).is_fixed()
+def is_variable_type(obj):
+ """
+ A utility function that returns a boolean indicating
+ whether the input object is a variable.
+ """
+ if obj.__class__ in native_types:
+ return False
+ try:
+ return obj.is_variable_type()
+ except AttributeError:
+ pass
+ return as_numeric(obj).is_variable_type()
+
def potentially_variable(obj):
"""
A utility function that returns a boolean indicating
@@ -218,16 +267,35 @@ def potentially_variable(obj):
if obj.__class__ in native_types:
return False
try:
- return obj._potentially_variable()
+ return obj.is_potentially_variable()
+ except AttributeError:
+ pass
+ return as_numeric(obj).is_potentially_variable()
+
+def polynomial_degree(obj):
+ """
+ A utility function that returns an integer
+ that indicates the polynomial degree for an
+ object. boolean indicating
+ """
+ if obj.__class__ in native_types:
+ return 0
+ try:
+ return obj.polynomial_degree()
except AttributeError:
pass
- return as_numeric(obj)._potentially_variable()
+ return as_numeric(obj).polynomial_degree()
# It is very common to have only a few constants in a model, but those
# constants get repeated many times. KnownConstants lets us re-use /
# share constants we have seen before.
KnownConstants = {}
+def update_KnownConstants(obj, val):
+ if len(KnownConstants) < 100:
+ KnownConstants[obj] = val
+
+
def as_numeric(obj):
"""
Verify that this obj is a NumericValue or intrinsic value.
@@ -245,13 +313,13 @@ def as_numeric(obj):
tmp = float(obj)
if tmp == obj:
tmp = NumericConstant(tmp)
- KnownConstants[obj] = tmp
+ update_KnownConstants(obj, tmp)
return tmp
except:
pass
tmp = NumericConstant(obj)
- KnownConstants[obj] = tmp
+ update_KnownConstants(obj, tmp)
return tmp
try:
return obj.as_numeric()
@@ -267,7 +335,7 @@ def as_numeric(obj):
return KnownConstants[obj]
else:
tmp = NumericConstant(obj)
- KnownConstants[obj] = tmp
+ update_KnownConstants(obj, tmp)
# If we get here, this is a reasonably well-behaving
# numeric type: add it to the native numeric types
@@ -287,11 +355,8 @@ def as_numeric(obj):
class NumericValue(object):
- """This is the base class for numeric values used in Pyomo.
-
- For efficiency purposes, some derived classes do not call the base
- class __init__() (e.g. see the "_ExpressionBase" class defined in
- "expr.py").
+ """
+ This is the base class for numeric values used in Pyomo.
"""
__slots__ = ()
@@ -300,9 +365,10 @@ class __init__() (e.g. see the "_ExpressionBase" class defined in
__hash__ = None
def __getstate__(self):
- """Prepare a picklable state of this instance for pickling.
+ """
+ Prepare a picklable state of this instance for pickling.
- Nominally, __getstate__() should return:
+ Nominally, __getstate__() should execute the following::
state = super(Class, self).__getstate__()
for i in Class.__slots__:
@@ -310,15 +376,16 @@ def __getstate__(self):
return state
However, in this case, the (nominal) parent class is 'object',
- and object does not implement __getstate__. So, we will check
- to make sure that there is a base __getstate__() to call...
- You might think that there is nothing to check, but multiple
- inheritance could mean that another class got stuck between
- this class and "object" in the MRO.
+ and object does not implement __getstate__. So, we will
+ check to make sure that there is a base __getstate__() to
+ call. You might think that there is nothing to check, but
+ multiple inheritance could mean that another class got stuck
+ between this class and "object" in the MRO.
Further, since there are actually no slots defined here, the
real question is to either return an empty dict or the
- parent's dict."""
+ parent's dict.
+ """
_base = super(NumericValue, self)
if hasattr(_base, '__getstate__'):
return _base.__getstate__()
@@ -326,13 +393,15 @@ def __getstate__(self):
return {}
def __setstate__(self, state):
- """Restore a pickled state into this instance
+ """
+ Restore a pickled state into this instance
- Note: our model for setstate is for derived classes to modify
+ Our model for setstate is for derived classes to modify
the state dictionary as control passes up the inheritance
hierarchy (using super() calls). All assignment of state ->
- object attributes is handled at the last class before 'object'
- (which may -- or may not (thanks to MRO) -- be here."""
+ object attributes is handled at the last class before 'object',
+ which may -- or may not (thanks to MRO) -- be here.
+ """
_base = super(NumericValue, self)
if hasattr(_base, '__setstate__'):
return _base.__setstate__(state)
@@ -344,8 +413,10 @@ def __setstate__(self, state):
object.__setattr__(self, key, val)
def getname(self, fully_qualified=False, name_buffer=None):
- """If this is a component, return the component's name on the owning
- block; otherwise return the value converted to a string"""
+ """
+ If this is a component, return the component's name on the owning
+ block; otherwise return the value converted to a string
+ """
_base = super(NumericValue, self)
if hasattr(_base,'getname'):
return _base.getname(fully_qualified, name_buffer)
@@ -373,11 +444,19 @@ def is_fixed(self):
"""Return True if this is a non-constant value that has been fixed"""
return False
- def _potentially_variable(self):
+ def is_variable_type(self):
+ """Return False unless this class is a variable object"""
+ return False
+
+ def is_potentially_variable(self):
"""Return True if variables can appear in this expression"""
return True
- def is_expression(self):
+ def is_named_expression_type(self):
+ """Return True if this numeric value is a named expression"""
+ return False
+
+ def is_expression_type(self):
"""Return True if this numeric value is an expression"""
return False
@@ -395,16 +474,35 @@ def as_numeric(self):
return self
def polynomial_degree(self):
- """Return the polynomial degree of this expression"""
- return self._polynomial_degree(None)
+ """
+ Return the polynomial degree of the expression.
- def _polynomial_degree(self, result):
- """Private method that computes the polynomial degree of this
- expression"""
+ Returns:
+ :const:`None`
+ """
+ return self._compute_polynomial_degree(None)
+
+ def _compute_polynomial_degree(self, values):
+ """
+ Compute the polynomial degree of this expression given
+ the degree values of its children.
+
+ Args:
+ values (list): A list of values that indicate the degree
+ of the children expression.
+
+ Returns:
+ :const:`None`
+ """
return None
def __float__(self):
- """Coerce the value to a floating point"""
+ """
+ Coerce the value to a floating point
+
+ Raises:
+ TypeError
+ """
raise TypeError(
"""Implicit conversion of Pyomo NumericValue type `%s' to a float is
disabled. This error is often the result of using Pyomo components as
@@ -413,7 +511,12 @@ def __float__(self):
functions.""" % (self.name,))
def __int__(self):
- """Coerce the value to an integer"""
+ """
+ Coerce the value to an integer
+
+ Raises:
+ TypeError
+ """
raise TypeError(
"""Implicit conversion of Pyomo NumericValue type `%s' to an integer is
disabled. This error is often the result of using Pyomo components as
@@ -422,198 +525,296 @@ def __int__(self):
functions.""" % (self.name,))
def __lt__(self,other):
- """Less than operator
+ """
+ Less than operator
- (Called in response to 'self < other' or 'other > self'.)
+ This method is called when Python processes statements of the form::
+
+ self < other
+ other > self
"""
- return generate_relational_expression(_lt, self, other)
+ return _generate_relational_expression(_lt, self, other)
def __gt__(self,other):
- """Greater than operator
+ """
+ Greater than operator
- (Called in response to 'self > other' or 'other < self'.)
+ This method is called when Python processes statements of the form::
+
+ self > other
+ other < self
"""
- return generate_relational_expression(_lt, other, self)
+ return _generate_relational_expression(_lt, other, self)
def __le__(self,other):
- """Less than or equal operator
+ """
+ Less than or equal operator
- (Called in response to 'self <= other' or 'other >= self'.)
+ This method is called when Python processes statements of the form::
+
+ self <= other
+ other >= self
"""
- return generate_relational_expression(_le, self, other)
+ return _generate_relational_expression(_le, self, other)
def __ge__(self,other):
- """Greater than or equal operator
+ """
+ Greater than or equal operator
- (Called in response to 'self >= other' or 'other <= self'.)
+ This method is called when Python processes statements of the form::
+
+ self >= other
+ other <= self
"""
- return generate_relational_expression(_le, other, self)
+ return _generate_relational_expression(_le, other, self)
def __eq__(self,other):
- """Equal to operator
+ """
+ Equal to operator
- (Called in response to 'self = other'.)
+ This method is called when Python processes the statement::
+
+ self == other
"""
- return generate_relational_expression(_eq, self, other)
+ return _generate_relational_expression(_eq, self, other)
def __add__(self,other):
- """Binary addition
+ """
+ Binary addition
- (Called in response to 'self + other'.)
+ This method is called when Python processes the statement::
+
+ self + other
"""
- return generate_expression(_add,self,other)
+ return _generate_sum_expression(_add,self,other)
def __sub__(self,other):
- """ Binary subtraction
+ """
+ Binary subtraction
- (Called in response to 'self - other'.)
+ This method is called when Python processes the statement::
+
+ self - other
"""
- return generate_expression(_sub,self,other)
+ return _generate_sum_expression(_sub,self,other)
def __mul__(self,other):
- """ Binary multiplication
+ """
+ Binary multiplication
- (Called in response to 'self * other'.)
+ This method is called when Python processes the statement::
+
+ self * other
"""
- return generate_expression(_mul,self,other)
+ return _generate_mul_expression(_mul,self,other)
def __div__(self,other):
- """ Binary division
+ """
+ Binary division
- (Called in response to 'self / other'.)
+ This method is called when Python processes the statement::
+
+ self / other
"""
- return generate_expression(_div,self,other)
+ return _generate_mul_expression(_div,self,other)
def __truediv__(self,other):
- """ Binary division
+ """
+ Binary division (when __future__.division is in effect)
- (Called in response to 'self / other' with __future__.division.)
+ This method is called when Python processes the statement::
+
+ self / other
"""
- return generate_expression(_div,self,other)
+ return _generate_mul_expression(_div,self,other)
def __pow__(self,other):
- """ Binary power
+ """
+ Binary power
- (Called in response to 'self ** other'.)
+ This method is called when Python processes the statement::
+
+ self ** other
"""
- return generate_expression(_pow,self,other)
+ return _generate_other_expression(_pow,self,other)
def __radd__(self,other):
- """Binary addition
+ """
+ Binary addition
- (Called in response to 'other + self'.)
+ This method is called when Python processes the statement::
+
+ other + self
"""
- return generate_expression(_radd,self,other)
+ return _generate_sum_expression(_radd,self,other)
def __rsub__(self,other):
- """ Binary subtraction
+ """
+ Binary subtraction
- (Called in response to 'other - self'.)
+ This method is called when Python processes the statement::
+
+ other - self
"""
- return generate_expression(_rsub,self,other)
+ return _generate_sum_expression(_rsub,self,other)
def __rmul__(self,other):
- """ Binary multiplication
+ """
+ Binary multiplication
- (Called in response to 'other * self' when other is not a NumericValue.)
+ This method is called when Python processes the statement::
+
+ other * self
+
+ when other is not a :class:`NumericValue ` object.
"""
- return generate_expression(_rmul,self,other)
+ return _generate_mul_expression(_rmul,self,other)
def __rdiv__(self,other):
- """ Binary division
+ """Binary division
- (Called in response to 'other / self'.)
+ This method is called when Python processes the statement::
+
+ other / self
"""
- return generate_expression(_rdiv,self,other)
+ return _generate_mul_expression(_rdiv,self,other)
def __rtruediv__(self,other):
- """ Binary division
+ """
+ Binary division (when __future__.division is in effect)
- (Called in response to 'other / self' with __future__.division.)
+ This method is called when Python processes the statement::
+
+ other / self
"""
- return generate_expression(_rdiv,self,other)
+ return _generate_mul_expression(_rdiv,self,other)
def __rpow__(self,other):
- """ Binary power
+ """
+ Binary power
- (Called in response to 'other ** self'.)
+ This method is called when Python processes the statement::
+
+ other ** self
"""
- return generate_expression(_rpow,self,other)
+ return _generate_other_expression(_rpow,self,other)
def __iadd__(self,other):
- """Binary addition
+ """
+ Binary addition
- (Called in response to 'self += other'.)
+ This method is called when Python processes the statement::
+
+ self += other
"""
- return generate_expression(_iadd,self,other)
+ return _generate_sum_expression(_iadd,self,other)
def __isub__(self,other):
- """ Binary subtraction
+ """
+ Binary subtraction
+
+ This method is called when Python processes the statement::
- (Called in response to 'self -= other'.)
+ self -= other
"""
- return generate_expression(_isub,self,other)
+ return _generate_sum_expression(_isub,self,other)
def __imul__(self,other):
- """ Binary multiplication
+ """
+ Binary multiplication
+
+ This method is called when Python processes the statement::
- (Called in response to 'self *= other'.)
+ self *= other
"""
- return generate_expression(_imul,self,other)
+ return _generate_mul_expression(_imul,self,other)
def __idiv__(self,other):
- """ Binary division
+ """
+ Binary division
- (Called in response to 'self /= other'.)
+ This method is called when Python processes the statement::
+
+ self /= other
"""
- return generate_expression(_idiv,self,other)
+ return _generate_mul_expression(_idiv,self,other)
def __itruediv__(self,other):
- """ Binary division
+ """
+ Binary division (when __future__.division is in effect)
- (Called in response to 'self /= other' with __future__.division.)
+ This method is called when Python processes the statement::
+
+ self /= other
"""
- return generate_expression(_idiv,self,other)
+ return _generate_mul_expression(_idiv,self,other)
def __ipow__(self,other):
- """ Binary power
+ """
+ Binary power
- (Called in response to 'self **= other'.)
+ This method is called when Python processes the statement::
+
+ self **= other
"""
- return generate_expression(_ipow,self,other)
+ return _generate_other_expression(_ipow,self,other)
- def __neg__(self, targetRefs=0):
- """ Negation
+ def __neg__(self):
+ """
+ Negation
- (Called in response to '- self'.)
+ This method is called when Python processes the statement::
+
+ - self
"""
- return generate_expression(_neg, self, None, targetRefs)
+ return _generate_sum_expression(_neg, self, None)
def __pos__(self):
- """ Positive expression
+ """
+ Positive expression
- (Called in response to '+ self'.)
+ This method is called when Python processes the statement::
+
+ + self
"""
return self
def __abs__(self):
""" Absolute value
- (Called in response to 'abs(self)'.)
+ This method is called when Python processes the statement::
+
+ abs(self)
"""
- return generate_expression(_abs,self, None)
+ return _generate_other_expression(_abs,self, None)
- def to_string(self, ostream=None, verbose=None, precedence=0, labeler=None):
+ def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False):
"""
- Write the object name to a buffer, applying the labeler if passed one.
+ Return a string representation of the expression tree.
+
+ Args:
+ verbose (bool): If :const:`True`, then the the string
+ representation consists of nested functions. Otherwise,
+ the string representation is an algebraic equation.
+ Defaults to :const:`False`.
+ labeler: An object that generates string labels for
+ variables in the expression tree. Defaults to :const:`None`.
+
+ Returns:
+ A string representation for the expression tree.
"""
- if ostream is None:
- ostream = sys.stdout
- if (labeler is not None) and (not self.is_constant()):
- # Do not label constant objects, direct them to their own __str__
- ostream.write(labeler(self))
- else:
- ostream.write(self.__str__())
+ if compute_values:
+ try:
+ return str(self())
+ except:
+ pass
+ if not self.is_constant():
+ if smap:
+ return smap.getSymbol(self, labeler)
+ elif labeler is not None:
+ return labeler(self)
+ return self.__str__()
+
class NumericConstant(NumericValue):
"""An object that contains a constant numeric value.
@@ -639,10 +840,10 @@ def is_constant(self):
def is_fixed(self):
return True
- def _potentially_variable(self):
+ def is_potentially_variable(self):
return False
- def _polynomial_degree(self, result):
+ def _compute_polynomial_degree(self, result):
return 0
def __str__(self):
@@ -667,5 +868,6 @@ def pprint(self, ostream=None, verbose=False):
ostream = sys.stdout
ostream.write(str(self))
+
# We use as_numeric() so that the constant is also in the cache
ZeroConstant = as_numeric(0)
diff --git a/pyomo/core/kernel/symbol_map.py b/pyomo/core/expr/symbol_map.py
similarity index 78%
rename from pyomo/core/kernel/symbol_map.py
rename to pyomo/core/expr/symbol_map.py
index 99e848addaa..df12b2a4901 100644
--- a/pyomo/core/kernel/symbol_map.py
+++ b/pyomo/core/expr/symbol_map.py
@@ -9,35 +9,47 @@
# ___________________________________________________________________________
from weakref import ref as weakref_ref
-
from six import iteritems, iterkeys
-#
-# A symbol map is a mechanism for tracking assigned labels (e.g., for
-# use when writing problem files for input to an optimizer) for objects
-# in a particular problem instance.
-#
-# A symbol map should never be pickled. This class is constructed
-# by solvers and writers, and it owned by models.
-#
class SymbolMap(object):
+ """
+ A class for tracking assigned labels for modeling components.
- class UnknownSymbol:
- pass
+ Symbol maps are used, for example, when writing problem files for
+ input to an optimizer.
- def __init__(self):
- #
- # byObject: id -> string
- # bySymbol: string -> object weakref
- # alias: string -> object weakref
- #
+ Warning:
+ A symbol map should never be pickled. This class is
+ typically constructed by solvers and writers, and it may be
+ owned by models.
+
+ Note:
+ We should change the API to not use camelcase.
+
+ Attributes:
+ byObject (dict): maps (object id) to (string label)
+ bySymbol (dict): maps (string label) to (object weakref)
+ alias (dict): maps (string label) to (object weakref)
+ default_labeler: used to compute a string label from an object
+ """
+
+ def __init__(self, labeler=None):
self.byObject = {}
self.bySymbol = {}
self.aliases = {}
+ self.default_labeler = labeler
+
+ class UnknownSymbol:
+ pass
def __getstate__(self):
+ #
+ # TODO: Why is this method defined given the previous
+ # comment that this object should not be pickled?
+ #
# Note: byObject and bySymbol constitute a bimap. We only need
# to pickle one of them, and bySymbol is easier.
+ #
return {
'bySymbol': tuple(
(key, obj()) for key, obj in iteritems(self.bySymbol) ),
@@ -54,6 +66,9 @@ def __setstate__(self, state):
(key, weakref_ref(obj)) for key, obj in state['aliases'] )
def addSymbol(self, obj, symb):
+ """
+ Add a symbol for a given object
+ """
self.byObject[id(obj)] = symb
self.bySymbol[symb] = weakref_ref(obj)
@@ -67,7 +82,7 @@ def addSymbols(self, obj_symbol_tuples):
self.byObject.update((id(obj_), symb_) for obj_,symb_ in tuples)
self.bySymbol.update((symb_, weakref_ref(obj_)) for obj_,symb_ in tuples)
- def createSymbol(self, obj, labeler, *args):
+ def createSymbol(self, obj, labeler=None, *args):
"""
Create a symbol for an object with a given labeler. No
error checking is done to ensure that the generated symbol
@@ -77,7 +92,12 @@ def createSymbol(self, obj, labeler, *args):
# symb = labeler(obj, *args)
#else:
# symb = labeler(obj)
- symb = labeler(obj)
+ if labeler:
+ symb = labeler(obj)
+ elif self.default_labeler:
+ symb = self.default_labeler(obj)
+ else:
+ symb = str(obj)
self.byObject[id(obj)] = symb
self.bySymbol[symb] = weakref_ref(obj)
return symb
@@ -105,11 +125,12 @@ def getSymbol(self, obj, labeler=None, *args):
#
# Create a new symbol, performing an error check if it is a duplicate
#
- if labeler is None:
- raise RuntimeError("Object %s is not in the symbol map. "
- "Cannot create a new symbol without "
- "a labeler." % obj.name)
- symb = labeler(obj)
+ if labeler:
+ symb = labeler(obj)
+ elif self.default_labeler:
+ symb = self.default_labeler(obj)
+ else:
+ symb = str(obj)
if symb in self.bySymbol:
if self.bySymbol[symb]() is not obj:
raise RuntimeError(
diff --git a/pyomo/core/kernel/__init__.py b/pyomo/core/kernel/__init__.py
index b6dbe65d1df..15e302b7505 100644
--- a/pyomo/core/kernel/__init__.py
+++ b/pyomo/core/kernel/__init__.py
@@ -8,23 +8,12 @@
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
-from pyomo.core.kernel.expr import *
+from pyomo.core.expr import *
import pyomo.core.kernel.register_numpy_types
import pyomo.core.kernel.component_interface
-import pyomo.opt
-from pyomo.opt import (SolverFactory,
- SolverStatus,
- TerminationCondition)
-import pyomo.opt.base
from pyomo.core.kernel.component_map import ComponentMap
from pyomo.core.kernel.component_set import ComponentSet
-import pyomo.core.kernel.component_block
-from pyomo.core.kernel.component_block import (block,
- tiny_block,
- block_tuple,
- block_list,
- block_dict)
import pyomo.core.kernel.component_variable
from pyomo.core.kernel.component_variable import (variable,
variable_tuple,
@@ -74,6 +63,12 @@
import_suffix_generator,
local_suffix_generator,
suffix_generator)
+import pyomo.core.kernel.component_block
+from pyomo.core.kernel.component_block import (block,
+ block_tuple,
+ block_list,
+ block_dict,
+ tiny_block)
import pyomo.core.kernel.component_piecewise
import pyomo.core.kernel.component_piecewise.util
import pyomo.core.kernel.component_piecewise.transforms
@@ -100,7 +95,6 @@
Binary,
RealInterval,
IntegerInterval)
-from pyomo.core.kernel.numvalue import value
from pyomo.core.kernel.util import pprint
#
@@ -109,9 +103,10 @@
# interface into the code below:
#
-#
+
#
# Ducktyping to work with a few solver interfaces
+# Ideally, everything below here could be deleted one day
#
from pyomo.core.kernel.component_block import _block_base
diff --git a/pyomo/core/kernel/component_block.py b/pyomo/core/kernel/component_block.py
index f90d4234336..23fe52b9076 100644
--- a/pyomo/core/kernel/component_block.py
+++ b/pyomo/core/kernel/component_block.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
@@ -19,6 +19,7 @@
except ImportError: #pragma:nocover
from ordereddict import OrderedDict
+from pyomo.core.expr.symbol_map import SymbolMap
from pyomo.core.kernel.component_interface import \
(IActiveObject,
ICategorizedObject,
@@ -33,7 +34,6 @@
from pyomo.core.kernel.component_list import ComponentList
from pyomo.core.kernel.component_map import ComponentMap
from pyomo.core.kernel.component_suffix import import_suffix_generator
-from pyomo.core.kernel.symbol_map import SymbolMap
import pyomo.opt
import six
@@ -99,7 +99,8 @@ def clone(self):
'__block_scope__': {id(self): True, id(None): False},
'__paranoid__': False,
})
- except:
+ except: #pragma:nocover
+ # this is impossible to test and almost never happens
new_block = copy.deepcopy(
self, {
'__block_scope__': {id(self): True, id(None): False},
diff --git a/pyomo/core/kernel/component_constraint.py b/pyomo/core/kernel/component_constraint.py
index 3fd2d92382c..83d62c6655b 100644
--- a/pyomo/core/kernel/component_constraint.py
+++ b/pyomo/core/kernel/component_constraint.py
@@ -2,14 +2,21 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
import pyutilib.math
+from pyomo.core.expr.numvalue import (ZeroConstant,
+ is_constant,
+ as_numeric,
+ potentially_variable,
+ value,
+ _sub)
+from pyomo.core.expr import current as EXPR
from pyomo.core.kernel.component_interface import \
(IComponent,
_ActiveComponentMixin,
@@ -20,13 +27,6 @@
from pyomo.core.kernel.component_tuple import ComponentTuple
from pyomo.core.kernel.component_list import ComponentList
-from pyomo.core.kernel.numvalue import (ZeroConstant,
- is_constant,
- as_numeric,
- potentially_variable,
- value,
- _sub)
-from pyomo.core.kernel import expr as EXPR
import six
from six.moves import zip
@@ -141,7 +141,7 @@ def expr(self):
return body_expr <= self.ub
elif self.ub is None:
return self.lb <= body_expr
- return self.lb <= body_expr <= self.ub
+ return EXPR.RangedExpression((self.lb, body_expr, self.ub), (False,False))
@property
def bounds(self):
@@ -189,7 +189,7 @@ def lb(self, lb):
"when the equality property is True.")
if lb is not None:
tmp = as_numeric(lb)
- if tmp._potentially_variable():
+ if tmp.is_potentially_variable():
raise ValueError(
"Constraint lower bounds must be "
"expressions restricted to data.")
@@ -207,7 +207,7 @@ def ub(self, ub):
"when the equality property is True.")
if ub is not None:
tmp = as_numeric(ub)
- if tmp._potentially_variable():
+ if tmp.is_potentially_variable():
raise ValueError(
"Constraint lower bounds must be "
"expressions restricted to data.")
@@ -232,7 +232,7 @@ def rhs(self, rhs):
"be assigned a value of None.")
else:
tmp = as_numeric(rhs)
- if tmp._potentially_variable():
+ if tmp.is_potentially_variable():
raise ValueError(
"Constraint right-hand side must be "
"expressions restricted to data.")
@@ -312,6 +312,7 @@ class constraint(_MutableBoundsConstraintMixin,
in combination with the :attr:`expr` keyword.
Examples:
+ >>> import pyomo.kernel as pmo
>>> # A decision variable used to define constraints
>>> x = pmo.variable()
>>> # An upper bound constraint
@@ -425,7 +426,7 @@ def expr(self, expr):
return
_expr_type = expr.__class__
- if _expr_type is tuple: # or expr_type is list:
+ if _expr_type is tuple:
#
# Form equality expression
#
@@ -439,17 +440,16 @@ def expr(self, expr):
# assigning to the rhs property
# will set the equality flag to True
- if arg1 is None or (not arg1._potentially_variable()):
+ if (arg1 is None) or (not arg1.is_potentially_variable()):
self.rhs = arg1
self.body = arg0
- elif arg0 is None or (not arg0._potentially_variable()):
+ elif (arg0 is None) or (not arg0.is_potentially_variable()):
self.rhs = arg0
self.body = arg1
else:
- with EXPR.bypass_clone_check():
- self.rhs = ZeroConstant
- self.body = arg0
- self.body -= arg1
+ self.rhs = ZeroConstant
+ self.body = arg0
+ self.body -= arg1
#
# Form inequality expression
@@ -457,8 +457,7 @@ def expr(self, expr):
elif len(expr) == 3:
arg0 = expr[0]
if arg0 is not None:
- arg0 = as_numeric(arg0)
- if arg0._potentially_variable():
+ if potentially_variable(arg0):
raise ValueError(
"Constraint '%s' found a 3-tuple (lower,"
" expression, upper) but the lower "
@@ -472,8 +471,7 @@ def expr(self, expr):
arg2 = expr[2]
if arg2 is not None:
- arg2 = as_numeric(arg2)
- if arg2._potentially_variable():
+ if potentially_variable(arg2):
raise ValueError(
"Constraint '%s' found a 3-tuple (lower,"
" expression, upper) but the upper "
@@ -502,14 +500,14 @@ def expr(self, expr):
"Constraint '%s' does not have a proper "
"value. Found '%s'\nExpecting a tuple or "
"equation. Examples:"
- "\n summation(model.costs) == model.income"
+ "\n sum_product(model.costs) == model.income"
"\n (0, model.price[item], 50)"
% (self.name, str(expr)))
except AttributeError:
msg = ("Constraint '%s' does not have a proper "
"value. Found '%s'\nExpecting a tuple or "
"equation. Examples:"
- "\n summation(model.costs) == model.income"
+ "\n sum_product(model.costs) == model.income"
"\n (0, model.price[item], 50)"
% (self.name, str(expr)))
if type(expr) is bool:
@@ -531,122 +529,79 @@ def expr(self, expr):
# user did ( var < 1 > 0 ) (which also results in a non-None
# chainedInequality value)
#
- if EXPR.generate_relational_expression.chainedInequality is not None:
- raise TypeError(EXPR.chainedInequalityErrorMessage())
+ if EXPR._using_chained_inequality and \
+ (EXPR._chainedInequality.prev is not None):
+ raise TypeError(EXPR._chainedInequality.error_message())
#
# Process relational expressions
# (i.e. explicit '==', '<', and '<=')
#
if relational_expr:
- if _expr_type is EXPR._EqualityExpression:
- # Equality expression: only 2 arguments!
- _args = expr._args
- # Explicitly dereference the original arglist (otherwise
- # this runs afoul of the getrefcount logic)
- expr._args = []
+ if _expr_type is EXPR.EqualityExpression:
# assigning to the rhs property
# will set the equality flag to True
- if not _args[1]._potentially_variable():
- self.rhs = _args[1]
- self.body = _args[0]
- elif not _args[0]._potentially_variable():
- self.rhs = _args[0]
- self.body = _args[1]
+ if not potentially_variable(expr.arg(1)):
+ self.rhs = expr.arg(1)
+ self.body = expr.arg(0)
+ elif not potentially_variable(expr.arg(0)):
+ self.rhs = expr.arg(0)
+ self.body = expr.arg(1)
else:
- with EXPR.bypass_clone_check():
- self.rhs = ZeroConstant
- self.body = _args[0]
- self.body -= _args[1]
- else:
- # Inequality expression: 2 or 3 arguments
- if expr._strict:
- try:
- _strict = any(expr._strict)
- except:
- _strict = True
- if _strict:
- #
- # We can relax this when:
- # (a) we have a need for this
- # (b) we have problem writer that
- # explicitly handles this
- # (c) we make sure that all problem writers
- # that don't handle this make it known
- # to the user through an error or
- # warning
- #
- raise ValueError(
- "Constraint '%s' encountered a strict "
- "inequality expression ('>' or '<'). All"
- " constraints must be formulated using "
- "using '<=', '>=', or '=='."
- % (self.name))
-
- _args = expr._args
- # Explicitly dereference the original arglist (otherwise
- # this runs afoul of the getrefcount logic)
- expr._args = []
- if len(_args) == 3:
-
- if _args[0]._potentially_variable():
- raise ValueError(
- "Constraint '%s' found a double-sided "
- "inequality expression (lower <= "
- "expression <= upper) but the lower "
- "bound was not data or an expression "
- "restricted to storage of data."
- % (self.name))
- if _args[2]._potentially_variable():
- raise ValueError(
- "Constraint '%s' found a double-sided "\
- "inequality expression (lower <= "
- "expression <= upper) but the upper "
- "bound was not data or an expression "
- "restricted to storage of data."
- % (self.name))
-
- self.lb = _args[0]
- self.body = _args[1]
- self.ub = _args[2]
+ self.rhs = ZeroConstant
+ self.body = expr.arg(0)
+ self.body -= expr.arg(1)
+ elif _expr_type is EXPR.InequalityExpression:
+ if expr._strict:
+ raise ValueError(
+ "Constraint '%s' encountered a strict "
+ "inequality expression ('>' or '<'). All"
+ " constraints must be formulated using "
+ "using '<=', '>=', or '=='."
+ % (self.name))
+ if not potentially_variable(expr.arg(1)):
+ self.lb = None
+ self.body = expr.arg(0)
+ self.ub = expr.arg(1)
+ elif not potentially_variable(expr.arg(0)):
+ self.lb = expr.arg(0)
+ self.body = expr.arg(1)
+ self.ub = None
else:
+ self.lb = None
+ self.body = expr.arg(0)
+ self.body -= expr.arg(1)
+ self.ub = ZeroConstant
- if not _args[1]._potentially_variable():
- self.lb = None
- self.body = _args[0]
- self.ub = _args[1]
- elif not _args[0]._potentially_variable():
- self.lb = _args[0]
- self.body = _args[1]
- self.ub = None
- else:
- with EXPR.bypass_clone_check():
- self.lb = None
- self.body = _args[0]
- self.body -= _args[1]
- self.ub = ZeroConstant
+ else: # RangedExpression
+ if any(expr._strict):
+ raise ValueError(
+ "Constraint '%s' encountered a strict "
+ "inequality expression ('>' or '<'). All"
+ " constraints must be formulated using "
+ "using '<=', '>=', or '=='."
+ % (self.name))
- #
- # Replace numeric bound values with a NumericConstant object,
- # and reset the values to 'None' if they are 'infinite'
- #
- if (self.lb is not None) and is_constant(self.lb):
- val = self.lb()
- if not pyutilib.math.is_finite(val):
- if val > 0:
+ if potentially_variable(expr.arg(0)):
raise ValueError(
- "Constraint '%s' created with a +Inf lower "
- "bound." % (self.name))
- self.lb = None
-
- if (self.ub is not None) and is_constant(self.ub):
- val = self.ub()
- if not pyutilib.math.is_finite(val):
- if val < 0:
+ "Constraint '%s' found a double-sided "
+ "inequality expression (lower <= "
+ "expression <= upper) but the lower "
+ "bound was not data or an expression "
+ "restricted to storage of data."
+ % (self.name))
+ if potentially_variable(expr.arg(2)):
raise ValueError(
- "Constraint '%s' created with a -Inf upper "
- "bound." % (self.name))
- self.ub = None
+ "Constraint '%s' found a double-sided "\
+ "inequality expression (lower <= "
+ "expression <= upper) but the upper "
+ "bound was not data or an expression "
+ "restricted to storage of data."
+ % (self.name))
+
+ self.lb = expr.arg(0)
+ self.body = expr.arg(1)
+ self.ub = expr.arg(2)
#
# Error check, to ensure that we don't have an equality
@@ -708,6 +663,7 @@ class linear_constraint(_MutableBoundsConstraintMixin,
:const:`True`.
Examples:
+ >>> import pyomo.kernel as pmo
>>> # Decision variables used to define constraints
>>> x = pmo.variable()
>>> y = pmo.variable()
@@ -721,7 +677,7 @@ class linear_constraint(_MutableBoundsConstraintMixin,
# To avoid a circular import, for the time being, this
# property will be set externally
_ctype = None
- _linear_canonical_form = True
+ _linear_canonical_form = False
__slots__ = ("_parent",
"_active",
"_variables",
@@ -827,24 +783,30 @@ def body(self):
#
def canonical_form(self, compute_values=True):
- from pyomo.repn.canonical_repn import \
- coopr3_CompiledLinearCanonicalRepn
+ """Build a canonical representation of the body of
+ this constraints"""
+ from pyomo.repn.standard_repn import \
+ StandardRepn
variables = []
coefficients = []
constant = 0
for v, c in self.terms:
- if compute_values:
- c = value(c)
- if v.is_expression():
+ if v.is_expression_type():
v = v.expr
if not v.fixed:
variables.append(v)
- coefficients.append(c)
+ if compute_values:
+ coefficients.append(value(c))
+ else:
+ coefficients.append(c)
else:
- constant += c * v()
- repn = coopr3_CompiledLinearCanonicalRepn()
- repn.variables = tuple(variables)
- repn.linear = tuple(coefficients)
+ if compute_values:
+ constant += value(c) * v()
+ else:
+ constant += c * v
+ repn = StandardRepn()
+ repn.linear_vars = tuple(variables)
+ repn.linear_coefs = tuple(coefficients)
repn.constant = constant
return repn
diff --git a/pyomo/core/kernel/component_dict.py b/pyomo/core/kernel/component_dict.py
index 469eaff70be..b326a37a63f 100644
--- a/pyomo/core/kernel/component_dict.py
+++ b/pyomo/core/kernel/component_dict.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
diff --git a/pyomo/core/kernel/component_expression.py b/pyomo/core/kernel/component_expression.py
index acda1cac2cd..ad06a6632b2 100644
--- a/pyomo/core/kernel/component_expression.py
+++ b/pyomo/core/kernel/component_expression.py
@@ -2,14 +2,16 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
import sys
+from pyomo.core.expr import expr_common
+from pyomo.core.expr import current as EXPR
from pyomo.core.kernel.component_interface import \
(IComponent,
_abstract_readwrite_property,
@@ -18,13 +20,13 @@
from pyomo.core.kernel.component_tuple import ComponentTuple
from pyomo.core.kernel.component_list import ComponentList
-import pyomo.core.kernel.expr_common
-from pyomo.core.kernel.numvalue import (NumericValue,
- is_fixed,
- is_constant,
- potentially_variable,
- value,
- as_numeric)
+from pyomo.core.expr.numvalue import (NumericValue,
+ is_fixed,
+ is_constant,
+ is_variable_type,
+ potentially_variable,
+ value,
+ as_numeric)
import six
@@ -66,67 +68,96 @@ def is_constant(self):
"""A boolean indicating whether this expression is constant."""
return is_constant(self._expr)
+ def is_variable_type(self):
+ """A boolean indicating whether this expression is a
+ variable object."""
+ return is_variable_type(self._expr)
+
def is_fixed(self):
"""A boolean indicating whether this expression is fixed."""
return is_fixed(self._expr)
- def _potentially_variable(self):
+ def is_potentially_variable(self):
"""A boolean indicating whether this expression can
reference variables."""
return potentially_variable(self._expr)
- #
- # Ducktyping _ExpressionBase functionality
- #
+ def is_named_expression_type(self):
+ """A boolean indicating whether this in a named expression."""
+ return True
- def is_expression(self):
+ def is_expression_type(self):
"""A boolean indicating whether this in an expression."""
return True
@property
- def _args(self):
+ def _args_(self):
"""A tuple of subexpressions involved in this expressions operation."""
return (self._expr,)
- def _arguments(self):
- """A generator of subexpressions involved in this expressions operation."""
+ @property
+ def args(self):
+ """A tuple of subexpressions involved in this expressions operation."""
yield self._expr
+ def nargs(self):
+ """Length of self._nargs()"""
+ return 1
+
+ def arg(self, i):
+ if i != 0:
+ raise KeyError("Unexpected argument id")
+ return self._expr
+
def polynomial_degree(self):
"""The polynomial degree of the stored expression."""
if self.is_fixed():
return 0
return self._expr.polynomial_degree()
- def to_string(self, ostream=None, verbose=None, precedence=0, labeler=None):
+ def _compute_polynomial_degree(self, values):
+ return values[0]
+
+ def to_string(self, verbose=None, labeler=None, smap=None, compute_values=False):
"""Convert this expression into a string."""
- if ostream is None:
- ostream = sys.stdout
- _verbose = pyomo.core.kernel.expr_common.TO_STRING_VERBOSE if \
- verbose is None else verbose
- if _verbose:
- ostream.write(self._to_string_label())
- ostream.write("{")
+ return EXPR.expression_to_string(self, verbose=verbose, labeler=labeler, smap=smap, compute_values=compute_values)
+
+ def _to_string(self, values, verbose, smap, compute_values):
+ if verbose:
+ name = self.getname()
+ if name == None:
+ return "<%s>{%s}" % (self.__class__.__name__, values[0])
+ else:
+ if name[0] == '<':
+ name = ""
+ return "%s{%s}" % (name, values[0])
if self._expr is None:
- ostream.write("Undefined")
- elif isinstance(self._expr, NumericValue):
- self._expr.to_string(ostream=ostream,
- verbose=verbose,
- precedence=precedence,
- labeler=labeler)
- else:
- as_numeric(self._expr).to_string(ostream=ostream,
- verbose=verbose,
- precedence=precedence,
- labeler=labeler)
- if _verbose:
- ostream.write("}")
+ return "%s{Undefined}" % str(self)
+ return values[0]
+
+ def _precedence(self):
+ return 0
def clone(self):
raise NotImplementedError #pragma:nocover
- def _to_string_label(self):
- raise NotImplementedError #pragma:nocover
+ def _apply_operation(self, result):
+ return result[0]
+
+ def _is_fixed(self, values):
+ return values[0]
+
+ def create_node_with_local_data(self, values, memo=None):
+ """
+ Construct an expression after constructing the
+ contained expression.
+
+ This class provides a consistent interface for constructing a
+ node, which is used in tree visitor scripts.
+ """
+ if id(self) in memo:
+ return memo[id(self)]
+ return self.__class__(expr=values[0])
class noclone(IIdentityExpression):
"""
@@ -159,21 +190,16 @@ def __setstate__(self, state):
self._expr = state[0]
def __str__(self):
- out = six.StringIO()
- self.to_string(ostream=out, verbose=False)
- return "{"+out.getvalue()+"}"
+ return "{%s}" % EXPR.expression_to_string(self)
#
- # Ducktyping _ExpressionBase functionality
+ # Ducktyping ExpressionBase functionality
#
def clone(self):
"""Return a clone of this expression (no-op)."""
return self
- def _to_string_label(self):
- return ""
-
class IExpression(IComponent, IIdentityExpression):
"""
The interface for mutable expressions.
@@ -198,22 +224,23 @@ def is_constant(self):
"""A boolean indicating whether this expression is constant."""
return False
- def _potentially_variable(self):
+ def is_variable_type(self):
+ """A boolean indicating whether this expression is a variable object."""
+ return False
+
+ def is_potentially_variable(self):
"""A boolean indicating whether this expression can
reference variables."""
return True
#
- # Ducktyping _ExpressionBase functionality
+ # Ducktyping ExpressionBase functionality
#
def clone(self):
"""Return a clone of this expression (no-op)."""
return self
- def _to_string_label(self):
- return self.__str__()
-
class expression(IExpression):
"""A named, mutable expression."""
# To avoid a circular import, for the time being, this
@@ -251,7 +278,7 @@ class data_expression(expression):
# Overload a few methods
#
- def _potentially_variable(self):
+ def is_potentially_variable(self):
"""A boolean indicating whether this expression can
reference variables."""
return False
diff --git a/pyomo/core/kernel/component_interface.py b/pyomo/core/kernel/component_interface.py
index d75b0251674..791564dfcb1 100644
--- a/pyomo/core/kernel/component_interface.py
+++ b/pyomo/core/kernel/component_interface.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
diff --git a/pyomo/core/kernel/component_list.py b/pyomo/core/kernel/component_list.py
index 7f0a774ec98..e0c83c630e1 100644
--- a/pyomo/core/kernel/component_list.py
+++ b/pyomo/core/kernel/component_list.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
diff --git a/pyomo/core/kernel/component_map.py b/pyomo/core/kernel/component_map.py
index e40eb2b931e..f0612542ad0 100644
--- a/pyomo/core/kernel/component_map.py
+++ b/pyomo/core/kernel/component_map.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
diff --git a/pyomo/core/kernel/component_matrix_constraint.py b/pyomo/core/kernel/component_matrix_constraint.py
index 3d5ab02d6ba..f72b861f7f6 100644
--- a/pyomo/core/kernel/component_matrix_constraint.py
+++ b/pyomo/core/kernel/component_matrix_constraint.py
@@ -2,13 +2,14 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
-from pyomo.core.kernel.numvalue import NumericValue
+import pyomo.core.expr
+from pyomo.core.expr.numvalue import NumericValue, value
from pyomo.core.kernel.component_interface import \
(IComponent,
_ActiveComponentMixin,
@@ -20,7 +21,6 @@
from pyomo.core.kernel.component_list import ComponentList
from pyomo.core.kernel.component_constraint import (IConstraint,
constraint_tuple)
-from pyomo.core.kernel.numvalue import value
import six
from six.moves import zip, xrange
@@ -215,21 +215,27 @@ def equality(self, equality):
# _linear_canonical_form flag is True
#
- def canonical_form(self):
- from pyomo.repn.canonical_repn import \
- coopr3_CompiledLinearCanonicalRepn
+ def canonical_form(self, compute_values=True):
+ """Build a canonical representation of the body of
+ this constraints"""
+ from pyomo.repn.standard_repn import StandardRepn
variables = []
coefficients = []
constant = 0
for v, c in self.terms:
+ # we call float to get rid of the numpy type
+ c = float(c)
if not v.fixed:
variables.append(v)
coefficients.append(c)
else:
- constant += value(c) * v()
- repn = coopr3_CompiledLinearCanonicalRepn()
- repn.variables = tuple(variables)
- repn.linear = tuple(coefficients)
+ if compute_values:
+ constant += c * v()
+ else:
+ constant += c * v
+ repn = StandardRepn()
+ repn.linear_vars = tuple(variables)
+ repn.linear_coefs = tuple(coefficients)
repn.constant = constant
return repn
diff --git a/pyomo/core/kernel/component_objective.py b/pyomo/core/kernel/component_objective.py
index d53106bee7a..5be824728ed 100644
--- a/pyomo/core/kernel/component_objective.py
+++ b/pyomo/core/kernel/component_objective.py
@@ -2,12 +2,13 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
+from pyomo.core.expr.numvalue import as_numeric
from pyomo.core.kernel.component_interface import \
(IComponent,
_ActiveComponentMixin,
@@ -18,7 +19,6 @@
from pyomo.core.kernel.component_tuple import ComponentTuple
from pyomo.core.kernel.component_list import ComponentList
from pyomo.core.kernel.component_expression import IExpression
-from pyomo.core.kernel.numvalue import as_numeric
import six
diff --git a/pyomo/core/kernel/component_parameter.py b/pyomo/core/kernel/component_parameter.py
index 3c9209d3ac8..9cc845441f1 100644
--- a/pyomo/core/kernel/component_parameter.py
+++ b/pyomo/core/kernel/component_parameter.py
@@ -2,12 +2,14 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
+import pyomo.core.expr
+from pyomo.core.expr.numvalue import NumericValue
from pyomo.core.kernel.component_interface import \
(IComponent,
_abstract_readwrite_property,
@@ -15,7 +17,6 @@
from pyomo.core.kernel.component_dict import ComponentDict
from pyomo.core.kernel.component_tuple import ComponentTuple
from pyomo.core.kernel.component_list import ComponentList
-from pyomo.core.kernel.numvalue import NumericValue
import six
@@ -46,11 +47,15 @@ def is_constant(self):
"""A boolean indicating that this parameter is constant."""
return False
+ def is_variable_type(self):
+ """A boolean indicating that this is a variable object."""
+ return False
+
def is_fixed(self):
"""A boolean indicating that this parameter is fixed."""
return True
- def _potentially_variable(self):
+ def is_potentially_variable(self):
"""Returns :const:`False` because this object can
never reference variables."""
return False
diff --git a/pyomo/core/kernel/component_piecewise/transforms.py b/pyomo/core/kernel/component_piecewise/transforms.py
index 6fe868fc929..c4c47901a72 100644
--- a/pyomo/core/kernel/component_piecewise/transforms.py
+++ b/pyomo/core/kernel/component_piecewise/transforms.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
@@ -28,7 +28,7 @@
# really do require (2^n)+1 points or if there is a way to
# handle the between sizes.
-from pyomo.core.kernel.numvalue import value
+from pyomo.core.expr.numvalue import value
from pyomo.core.kernel.set_types import Binary
from pyomo.core.kernel.component_block import tiny_block
from pyomo.core.kernel.component_expression import expression
diff --git a/pyomo/core/kernel/component_piecewise/transforms_nd.py b/pyomo/core/kernel/component_piecewise/transforms_nd.py
index 27511cb4079..607be6c024a 100644
--- a/pyomo/core/kernel/component_piecewise/transforms_nd.py
+++ b/pyomo/core/kernel/component_piecewise/transforms_nd.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
diff --git a/pyomo/core/kernel/component_piecewise/util.py b/pyomo/core/kernel/component_piecewise/util.py
index bc7e23708c8..c47ded65272 100644
--- a/pyomo/core/kernel/component_piecewise/util.py
+++ b/pyomo/core/kernel/component_piecewise/util.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
diff --git a/pyomo/core/kernel/component_set.py b/pyomo/core/kernel/component_set.py
index e2a09f9c823..dd379d4b1e1 100644
--- a/pyomo/core/kernel/component_set.py
+++ b/pyomo/core/kernel/component_set.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
diff --git a/pyomo/core/kernel/component_sos.py b/pyomo/core/kernel/component_sos.py
index 2c9e1c486a7..7057b97547c 100644
--- a/pyomo/core/kernel/component_sos.py
+++ b/pyomo/core/kernel/component_sos.py
@@ -2,12 +2,14 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
+import pyomo.core.expr
+from pyomo.core.expr.numvalue import potentially_variable
from pyomo.core.kernel.component_interface import \
(IComponent,
_ActiveComponentMixin,
@@ -17,7 +19,6 @@
from pyomo.core.kernel.component_dict import ComponentDict
from pyomo.core.kernel.component_tuple import ComponentTuple
from pyomo.core.kernel.component_list import ComponentList
-from pyomo.core.kernel.numvalue import potentially_variable
import six
from six.moves import zip
diff --git a/pyomo/core/kernel/component_suffix.py b/pyomo/core/kernel/component_suffix.py
index fcff59492e7..42af40b7dc2 100644
--- a/pyomo/core/kernel/component_suffix.py
+++ b/pyomo/core/kernel/component_suffix.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
@@ -12,13 +12,13 @@
import pyutilib.math
+from pyomo.core.expr.numvalue import NumericValue
from pyomo.core.kernel.component_interface import \
(IComponent,
_ActiveComponentMixin,
_abstract_readwrite_property,
_abstract_readonly_property)
from pyomo.core.kernel.component_map import ComponentMap
-from pyomo.core.kernel.numvalue import NumericValue
from pyomo.core.kernel.set_types import (RealSet,
IntegerSet)
diff --git a/pyomo/core/kernel/component_tuple.py b/pyomo/core/kernel/component_tuple.py
index 6021bdc0bb2..3d641bd53c5 100644
--- a/pyomo/core/kernel/component_tuple.py
+++ b/pyomo/core/kernel/component_tuple.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
diff --git a/pyomo/core/kernel/component_variable.py b/pyomo/core/kernel/component_variable.py
index c8a56cc9e4f..e6caf1dd8b5 100644
--- a/pyomo/core/kernel/component_variable.py
+++ b/pyomo/core/kernel/component_variable.py
@@ -2,12 +2,14 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
+from pyomo.core.expr.numvalue import (NumericValue,
+ value)
from pyomo.core.kernel.component_interface import \
(IComponent,
_abstract_readwrite_property,
@@ -18,8 +20,6 @@
create_component_tuple)
from pyomo.core.kernel.component_list import (ComponentList,
create_component_list)
-from pyomo.core.kernel.numvalue import (NumericValue,
- value)
from pyomo.core.kernel.set_types import (RealSet,
IntegerSet,
BooleanSet,
@@ -246,7 +246,12 @@ def is_constant(self):
constant in an expression."""
return False
- def _potentially_variable(self):
+ def is_variable_type(self):
+ """Returns :const:`True` because this is a
+ variable object."""
+ return True
+
+ def is_potentially_variable(self):
"""Returns :const:`True` because this is a
variable."""
return True
@@ -307,6 +312,7 @@ class variable(IVariable):
:meth:`fix` method. Default is :const:`False`.
Examples:
+ >>> import pyomo.kernel as pmo
>>> # A continuous variable with infinite bounds
>>> x = pmo.variable()
>>> # A binary variable
diff --git a/pyomo/core/kernel/expr.py b/pyomo/core/kernel/expr.py
deleted file mode 100755
index bf4a68cc6d6..00000000000
--- a/pyomo/core/kernel/expr.py
+++ /dev/null
@@ -1,164 +0,0 @@
-# ___________________________________________________________________________
-#
-# Pyomo: Python Optimization Modeling Objects
-# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
-# rights in this software.
-# This software is distributed under the 3-clause BSD License.
-# ___________________________________________________________________________
-
-from __future__ import division
-import math
-
-__all__ = ('log', 'log10', 'sin', 'cos', 'tan', 'cosh', 'sinh', 'tanh',
- 'asin', 'acos', 'atan', 'exp', 'sqrt', 'asinh', 'acosh',
- 'atanh', 'ceil', 'floor', 'sum')
-
-from pyomo.core.kernel import expr_common as common
-
-def generate_expression(etype, _self,_other):
- raise RuntimeError("incomplete import of Pyomo expression system")
-def generate_relational_expression(etype, lhs, rhs):
- raise RuntimeError("incomplete import of Pyomo expression system")
-def generate_intrinsic_function_expression(arg, name, fcn):
- raise RuntimeError("incomplete import of Pyomo expression system")
-
-from pyomo.core.kernel import numvalue
-
-# Import global methods that are common to all expression systems
-from pyomo.core.kernel.expr_common import clone_expression
-
-_common_module_members = [
- 'identify_variables',
- 'generate_expression',
- 'generate_intrinsic_function_expression',
- 'generate_relational_expression',
- 'bypass_clone_check',
- 'chainedInequalityErrorMessage',
- '_ExpressionBase',
- '_EqualityExpression',
- '_InequalityExpression',
- '_ProductExpression',
- '_SumExpression',
- '_AbsExpression',
- '_PowExpression',
- '_ExternalFunctionExpression',
- '_IntrinsicFunctionExpression',
- '_GetItemExpression',
- 'clone_counter',
- 'Expr_if',
- 'sum',
-]
-_coopr3_module_members = []
-_pyomo4_module_members = [
- '_LinearExpression',
- '_DivisionExpression',
- '_NegationExpression',
- 'EntangledExpressionError',
-]
-
-def set_expression_tree_format(mode):
- if mode is common.Mode.coopr3_trees:
- from pyomo.core.kernel import expr_coopr3 as expr3
- for obj in _common_module_members:
- globals()[obj] = getattr(expr3, obj)
- for obj in _coopr3_module_members:
- globals()[obj] = getattr(expr3, obj)
- for obj in _pyomo4_module_members:
- if obj in globals():
- del globals()[obj]
-
- elif mode is common.Mode.pyomo4_trees:
- from pyomo.core.kernel import expr_pyomo4 as expr4
- for obj in _common_module_members:
- globals()[obj] = getattr(expr4, obj)
- for obj in _coopr3_module_members:
- if obj in globals():
- del globals()[obj]
- for obj in _pyomo4_module_members:
- globals()[obj] = getattr(expr4, obj)
- else:
- raise RuntimeError("Unrecognized expression tree mode: %s\n"
- "Must be one of [%s, %s]"
- % (mode,
- common.Mode.coopr3_trees,
- common.Mode.pyomo4_trees))
- #
- # Propagate the generate_expression functions to the numvalue namespace
- numvalue.generate_expression = generate_expression
- numvalue.generate_relational_expression = generate_relational_expression
- #
- common.mode = mode
-
-set_expression_tree_format(common.mode)
-
-def fabs(arg):
- # FIXME: We need to switch this over from generate_expression to
- # just use generate_intrinsic_function_expression
- #
- #return generate_intrinsic_function_expression(arg, 'fabs', math.fabs)
- return generate_expression(common._abs, arg, None)
-
-def ceil(arg):
- return generate_intrinsic_function_expression(arg, 'ceil', math.ceil)
-
-def floor(arg):
- return generate_intrinsic_function_expression(arg, 'floor', math.floor)
-
-# e ** x
-def exp(arg):
- return generate_intrinsic_function_expression(arg, 'exp', math.exp)
-
-def log(arg):
- return generate_intrinsic_function_expression(arg, 'log', math.log)
-
-def log10(arg):
- return generate_intrinsic_function_expression(arg, 'log10', math.log10)
-
-def pow(*args):
- return generate_expression(common._pow, *args)
-
-# FIXME: this is nominally the same as x ** 0.5, but follows a different
-# path and produces a different NL file!
-def sqrt(arg):
- return generate_intrinsic_function_expression(arg, 'sqrt', math.sqrt)
-# return generate_expression(common._pow, arg, 0.5)
-
-
-def sin(arg):
- return generate_intrinsic_function_expression(arg, 'sin', math.sin)
-
-def cos(arg):
- return generate_intrinsic_function_expression(arg, 'cos', math.cos)
-
-def tan(arg):
- return generate_intrinsic_function_expression(arg, 'tan', math.tan)
-
-def sinh(arg):
- return generate_intrinsic_function_expression(arg, 'sinh', math.sinh)
-
-def cosh(arg):
- return generate_intrinsic_function_expression(arg, 'cosh', math.cosh)
-
-def tanh(arg):
- return generate_intrinsic_function_expression(arg, 'tanh', math.tanh)
-
-
-def asin(arg):
- return generate_intrinsic_function_expression(arg, 'asin', math.asin)
-
-def acos(arg):
- return generate_intrinsic_function_expression(arg, 'acos', math.acos)
-
-def atan(arg):
- return generate_intrinsic_function_expression(arg, 'atan', math.atan)
-
-def asinh(arg):
- return generate_intrinsic_function_expression(arg, 'asinh', math.asinh)
-
-def acosh(arg):
- return generate_intrinsic_function_expression(arg, 'acosh', math.acosh)
-
-def atanh(arg):
- return generate_intrinsic_function_expression(arg, 'atanh', math.atanh)
diff --git a/pyomo/core/kernel/expr_common.py b/pyomo/core/kernel/expr_common.py
deleted file mode 100644
index d61c034f4ae..00000000000
--- a/pyomo/core/kernel/expr_common.py
+++ /dev/null
@@ -1,138 +0,0 @@
-# ___________________________________________________________________________
-#
-# Pyomo: Python Optimization Modeling Objects
-# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
-# rights in this software.
-# This software is distributed under the 3-clause BSD License.
-# ___________________________________________________________________________
-
-from __future__ import division
-from copy import deepcopy
-from six import StringIO
-
-import logging
-
-try:
- from sys import getrefcount
- _getrefcount_available = True
-except ImportError:
- logger = logging.getLogger('pyomo.core')
- logger.warning(
- "This python interpreter does not support sys.getrefcount()\n"
- "Pyomo cannot automatically guarantee that expressions do not become\n"
- "entangled (multiple expressions that share common subexpressions).\n")
- getrefcount = None
- _getrefcount_available = False
-
-class Mode(object):
- coopr3_trees = (1,)
- pyomo4_trees = (2,)
-if _getrefcount_available:
- mode = _default_mode = Mode.coopr3_trees
-else:
- mode = _default_mode = Mode.pyomo4_trees
-
-def clone_expression(exp, substitute=None):
- # Note that setting the __block_scope__ will prevent any Components
- # encountered in the tree from being copied.
- memo = {'__block_scope__': { id(None): False }}
- if substitute:
- memo.update(substitute)
- return deepcopy(exp, memo)
-
-# This is the global counter for clone operations
-clone_counter = 0
-
-def _clear_expression_pool():
- from pyomo.core.base.expr_coopr3 import _clear_expression_pool as \
- _clear_expression_pool_coopr3
- from pyomo.core.base.expr_pyomo4 import _clear_expression_pool as \
- _clear_expression_pool_pyomo4
- if mode == Mode.pyomo4_trees:
- _clear_expression_pool_pyomo4()
- else:
- assert mode == Mode.coopr3_trees
- _clear_expression_pool_coopr3()
-
-def chainedInequalityErrorMessage(gre, msg=None):
- if msg is None:
- msg = "Relational expression used in an unexpected Boolean context."
- buf = StringIO()
- gre.chainedInequality.to_string(buf)
- # We are about to raise an exception, so it's OK to reset chainedInequality
- info = gre.call_info
- gre.chainedInequality = None
- gre.call_info = None
-
- args = ( str(msg).strip(), buf.getvalue().strip(), info[0], info[1],
- ':\n %s' % info[3] if info[3] is not None else '.' )
- return """%s
-
-The inequality expression:
- %s
-contains non-constant terms (variables) that were evaluated in an
-unexpected Boolean context at
- File '%s', line %s%s
-
-Evaluating Pyomo variables in a Boolean context, e.g.
- if expression <= 5:
-is generally invalid. If you want to obtain the Boolean value of the
-expression based on the current variable values, explicitly evaluate the
-expression using the value() function:
- if value(expression) <= 5:
-or
- if value(expression <= 5):
-""" % args
-
-
-ensure_independent_trees = 1
-bypass_backreference = 1
-
-TO_STRING_VERBOSE=False
-
-_add = 1
-_sub = 2
-_mul = 3
-_div = 4
-_pow = 5
-_neg = 6
-_abs = 7
-_inplace = 10
-_unary = _neg
-
-_radd = -_add
-_iadd = _inplace+_add
-_rsub = -_sub
-_isub = _inplace+_sub
-_rmul = -_mul
-_imul = _inplace+_mul
-_rdiv = -_div
-_idiv = _inplace+_div
-_rpow = -_pow
-_ipow = _inplace+_pow
-
-_old_etype_strings = {
- 'add' : _add,
- 'radd' : -_add,
- 'iadd' : _inplace+_add,
- 'sub' : _sub,
- 'rsub' : -_sub,
- 'isub' : _inplace+_sub,
- 'mul' : _mul,
- 'rmul' : -_mul,
- 'imul' : _inplace+_mul,
- 'div' : _div,
- 'rdiv' : -_div,
- 'idiv' : _inplace+_div,
- 'pow' : _pow,
- 'rpow' : -_pow,
- 'ipow' : _inplace+_pow,
- 'neg' : _neg,
- 'abs' : _abs,
- }
-
-_eq = 0
-_le = 1
-_lt = 2
diff --git a/pyomo/core/kernel/register_numpy_types.py b/pyomo/core/kernel/register_numpy_types.py
index d16f47fba3c..7f0778694c8 100644
--- a/pyomo/core/kernel/register_numpy_types.py
+++ b/pyomo/core/kernel/register_numpy_types.py
@@ -2,13 +2,13 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
-from pyomo.core.kernel.numvalue import \
+from pyomo.core.expr.numvalue import \
RegisterNumericType, \
RegisterIntegerType, \
RegisterBooleanType
diff --git a/pyomo/core/kernel/set_types.py b/pyomo/core/kernel/set_types.py
index 539bb08753b..d0995078ce8 100644
--- a/pyomo/core/kernel/set_types.py
+++ b/pyomo/core/kernel/set_types.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
@@ -11,7 +11,7 @@
import logging
from weakref import ref as weakref_ref
-from pyomo.core.kernel.numvalue import (native_numeric_types,
+from pyomo.core.expr.numvalue import (native_numeric_types,
native_integer_types,
native_boolean_types)
diff --git a/pyomo/core/kernel/util.py b/pyomo/core/kernel/util.py
index 49e50ec947c..d0d7294ed75 100644
--- a/pyomo/core/kernel/util.py
+++ b/pyomo/core/kernel/util.py
@@ -11,7 +11,7 @@
import sys
import pprint as _pprint_
-from pyomo.core.kernel.numvalue import \
+from pyomo.core.expr.numvalue import \
NumericValue
from pyomo.core.kernel.component_interface import \
(ICategorizedObject,
diff --git a/pyomo/core/plugins/transform/dual_transformation.py b/pyomo/core/plugins/transform/dual_transformation.py
index 7c582dc2dbe..1513bee3d99 100644
--- a/pyomo/core/plugins/transform/dual_transformation.py
+++ b/pyomo/core/plugins/transform/dual_transformation.py
@@ -90,7 +90,7 @@ def _create_using(self, model, **kwds):
# Process the body of the constraint
body_terms = process_canonical_repn(
- generate_canonical_repn(con.body))
+ generate_standard_repn(con.body))
# Add a numeric constant to the 'b' vector, if present
b[cname] -= body_terms.pop(None, 0)
@@ -104,7 +104,7 @@ def _create_using(self, model, **kwds):
# StandardForm to produce equality constraints, thus
# requiring us only to check the lower bounds.
lower_terms = process_canonical_repn(
- generate_canonical_repn(con.lower))
+ generate_standard_repn(con.lower))
# Add a numeric constant to the 'b' matrix, if present
b[cname] += lower_terms.pop(None, 0)
@@ -123,7 +123,7 @@ def _create_using(self, model, **kwds):
# Process the objective
terms = process_canonical_repn(
- generate_canonical_repn(obj.expr))
+ generate_standard_repn(obj.expr))
# Add coefficients
for (name, coef) in terms.items():
diff --git a/pyomo/core/plugins/transform/eliminate_fixed_vars.py b/pyomo/core/plugins/transform/eliminate_fixed_vars.py
index 407be5f6595..c648bb17889 100644
--- a/pyomo/core/plugins/transform/eliminate_fixed_vars.py
+++ b/pyomo/core/plugins/transform/eliminate_fixed_vars.py
@@ -9,8 +9,8 @@
# ___________________________________________________________________________
from pyomo.util.plugin import alias
+from pyomo.core.expr.current import ExpressionBase
from pyomo.core import Constraint, Objective, NumericConstant
-from pyomo.core.base.expr import _ExpressionBase
from pyomo.core.base.var import Var, _VarData
from pyomo.core.base.util import sequence
from pyomo.core.plugins.transform.hierarchy import IsomorphicTransformation
@@ -67,11 +67,12 @@ def _create_using(self, model, **kwds):
def _fix_vars(self, expr, model):
""" Walk through the S-expression, fixing variables. """
+ # TODO - Change this to use a visitor pattern!
if expr._args is None:
return expr
_args = []
for i in range(len(expr._args)):
- if isinstance(expr._args[i],_ExpressionBase):
+ if isinstance(expr._args[i],ExpressionBase):
_args.append( self._fix_vars(expr._args[i], model) )
elif (isinstance(expr._args[i],Var) or isinstance(expr._args[i],_VarData)) and expr._args[i].fixed:
if expr._args[i].value != 0.0:
diff --git a/pyomo/core/plugins/transform/expand_connectors.py b/pyomo/core/plugins/transform/expand_connectors.py
index f96976c5c9b..51ea3df0015 100644
--- a/pyomo/core/plugins/transform/expand_connectors.py
+++ b/pyomo/core/plugins/transform/expand_connectors.py
@@ -13,11 +13,11 @@
from six import next, iteritems, iterkeys, itervalues
+from pyomo.core.expr import current as EXPR
from pyomo.core.base.plugin import alias
from pyomo.core.base import Transformation, Connector, Constraint, \
ConstraintList, Var, VarList, TraversalStrategy
from pyomo.core.base.connector import _ConnectorData, SimpleConnector
-from pyomo.core.base import expr
class ExpandConnectors(Transformation):
alias('core.expand_connectors',
@@ -47,8 +47,7 @@ def _apply_to(self, instance, **kwds):
matched_connectors = {}
found = dict()
for constraint in instance.component_data_objects(Constraint):
- for c in expr.identify_variables(
- constraint.body, include_potentially_variable=True):
+ for c in EXPR.identify_components(constraint.body, connector_types):
if c.__class__ in connector_types:
found[id(c)] = c
if not found:
@@ -114,7 +113,7 @@ def _apply_to(self, instance, **kwds):
substitution[id(c)] = new_v
cList.add((
constraint.lower,
- expr.clone_expression( constraint.body, substitution ),
+ EXPR.clone_expression( constraint.body, substitution ),
constraint.upper ))
constraint.deactivate()
diff --git a/pyomo/core/plugins/transform/model.py b/pyomo/core/plugins/transform/model.py
index ba33f4ccba9..035a8fe756c 100644
--- a/pyomo/core/plugins/transform/model.py
+++ b/pyomo/core/plugins/transform/model.py
@@ -34,7 +34,7 @@ def to_standard_form(self):
class, and store Python floats (C doubles).
"""
- from pyomo.repn import generate_canonical_repn
+ from pyomo.repn import generate_standard_repn
# We first need to create an map of all variables to their column
@@ -108,13 +108,13 @@ def to_standard_form(self):
# Process the body
terms = self._process_canonical_repn(
- generate_canonical_repn(con.body, var_id_map))
+ generate_standard_repn(con.body, var_id_map))
# Process the bounds of the constraint
if con.equality:
# Equality constraint, only check lower bound
lb = self._process_canonical_repn(
- generate_canonical_repn(con.lower, var_id_map))
+ generate_standard_repn(con.lower, var_id_map))
# Update terms
for k in lb:
@@ -134,7 +134,7 @@ def to_standard_form(self):
tmp = dict(terms)
ub = self._process_canonical_repn(
- generate_canonical_repn(con.upper, var_id_map))
+ generate_standard_repn(con.upper, var_id_map))
# Update terms
for k in ub:
@@ -153,7 +153,7 @@ def to_standard_form(self):
tmp = dict(terms)
lb = self._process_canonical_repn(
- generate_canonical_repn(con.lower, var_id_map))
+ generate_standard_repn(con.lower, var_id_map))
# Update terms
for k in lb:
@@ -178,7 +178,7 @@ def to_standard_form(self):
obj = obj_set._data[ndx]
# Process the objective
terms = self._process_canonical_repn(
- generate_canonical_repn(obj.expr, var_id_map))
+ generate_standard_repn(obj.expr, var_id_map))
objectives[(obj_set_name, ndx)] = terms
diff --git a/pyomo/core/plugins/transform/nonnegative_transform.py b/pyomo/core/plugins/transform/nonnegative_transform.py
index 274625b3f05..2e6dbd5dbc4 100644
--- a/pyomo/core/plugins/transform/nonnegative_transform.py
+++ b/pyomo/core/plugins/transform/nonnegative_transform.py
@@ -8,19 +8,58 @@
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
+import copy
+
from pyomo.util.plugin import alias
+from pyomo.core.expr import current as EXPR
+
from pyomo.core import *
-from pyomo.core.base.var import SimpleVar, _VarData
-from pyomo.core.base.expr import (_SumExpression,
- _ProductExpression,
- _AbsExpression,
- _PowExpression)
from pyomo.core.base.expression import _ExpressionData
+from pyomo.core.base.var import SimpleVar, _VarData
from pyomo.core.base.misc import create_name
from pyomo.core.plugins.transform.util import partial
from pyomo.core.plugins.transform.hierarchy import IsomorphicTransformation
from pyomo.core.plugins.transform.util import collectAbstractComponents
+
+class VarmapVisitor(EXPR.ExpressionReplacementVisitor):
+
+ def __init__(self, varmap):
+ super(VarmapVisitor, self).__init__()
+ self.varmap = varmap
+
+ def visiting_potential_leaf(self, node):
+ if node.__class__ in nonpyomo_leaf_types:
+ return True, node
+ #
+ # Clone leaf nodes in the expression tree
+ #
+ if node.is_variable_type():
+ if node.local_name in self.varmap:
+ return True, self.varmap[node.local_name]
+ else:
+ return True, node
+
+ if isinstance(node, EXPR.LinearExpression):
+ with EXPR.nonlinear_expression() as expr:
+ for c, v in zip(node.linear_coefs, node.linear_vars):
+ if hasattr(v, 'local_name'):
+ expr += c * self.varmap.get(v.local_name)
+ else:
+ expr += c * v
+ return True, expr
+
+ return False, None
+
+
+def _walk_expr(expr, varMap):
+ """
+ Walks an expression tree, making the replacements defined in varMap
+ """
+ visitor = VarmapVisitor(varMap)
+ return visitor.dfs_postorder_stack(expr)
+
+
class NonNegativeTransformation(IsomorphicTransformation):
"""
Creates a new, equivalent model by forcing all variables to lie in
@@ -267,9 +306,9 @@ def _create_using(self, model, **kwds):
exprMap = {}
for (ndx, cdata) in con._data.items():
- lower = self._walk_expr(cdata.lower, var_map)
- body = self._walk_expr(cdata.body, var_map)
- upper = self._walk_expr(cdata.upper, var_map)
+ lower = _walk_expr(cdata.lower, var_map)
+ body = _walk_expr(cdata.body, var_map)
+ upper = _walk_expr(cdata.upper, var_map)
# Lie if ndx is None. Pyomo treats 'None' indices specially.
if ndx is None:
@@ -295,7 +334,7 @@ def _create_using(self, model, **kwds):
exprMap = {}
for (ndx, odata) in obj._data.items():
- exprMap[ndx] = self._walk_expr(odata.expr, var_map)
+ exprMap[ndx] = _walk_expr(odata.expr, var_map)
# Add to list of expression maps
objectiveExprs[objName] = exprMap
@@ -346,55 +385,6 @@ def _create_using(self, model, **kwds):
return nonneg
- @staticmethod
- def _walk_expr(expr, varMap):
- """
- Walks an expression tree, making the replacements defined in varMap
- """
-
- # Attempt to replace a simple variable
- if isinstance(expr, SimpleVar):
- if expr.local_name in varMap:
- return varMap[expr.local_name]
- else:
- return expr
-
- # Attempt to replace an indexed variable
- if isinstance(expr, _VarData):
- if expr.local_name in varMap:
- return varMap[expr.local_name]
- else:
- return expr
-
- # Iterate through the numerator and denominator of a product term
- if isinstance(expr, _ProductExpression):
- i = 0
- while i < len(expr._numerator):
- expr._numerator[i] = NonNegativeTransformation._walk_expr(
- expr._numerator[i],
- varMap)
- i += 1
-
- i = 0
- while i < len(expr._denominator):
- expr._denominator[i] = NonNegativeTransformation._walk_expr(
- expr.denominator[i],
- varMap)
- i += 1
-
- # Iterate through the terms in a sum, absolute value term, or power
- # term
- if isinstance(expr, (_SumExpression, _AbsExpression, _PowExpression,
- _ExpressionData)):
- i = 0
- while i < len(expr._args):
- expr._args[i] = NonNegativeTransformation._walk_expr(
- expr._args[i],
- varMap)
- i += 1
-
- return expr
-
@staticmethod
def boundsConstraintRule(lb, ub, attr, vars, model):
"""
diff --git a/pyomo/core/plugins/transform/radix_linearization.py b/pyomo/core/plugins/transform/radix_linearization.py
index f8233ac8f23..2dbf24ffd97 100644
--- a/pyomo/core/plugins/transform/radix_linearization.py
+++ b/pyomo/core/plugins/transform/radix_linearization.py
@@ -9,9 +9,9 @@
# ___________________________________________________________________________
from pyomo.util.plugin import alias
+from pyomo.core.expr.current import ProductExpression, PowExpression
from pyomo.core import Binary, value, as_numeric
from pyomo.core.base import Transformation, Var, Constraint, ConstraintList, Block, RangeSet
-from pyomo.core.base.expr import _ProductExpression, _PowExpression
from pyomo.core.base.var import _VarData
from six import iteritems
@@ -19,6 +19,7 @@
import logging
logger = logging.getLogger(__name__)
+
class RadixLinearization(Transformation):
"""
This plugin generates linear relaxations of bilinear problems using
@@ -239,9 +240,9 @@ def _discretize_bilinear(self, b, v, v_idx, u, u_idx):
return _w
def _collect_bilinear(self, expr, bilin, quad):
- if not expr.is_expression():
+ if not expr.is_expression_type():
return
- if type(expr) is _ProductExpression:
+ if type(expr) is ProductExpression:
if len(expr._numerator) != 2:
for e in expr._numerator:
self._collect_bilinear(e, bilin, quad)
@@ -255,11 +256,11 @@ def _collect_bilinear(self, expr, bilin, quad):
else:
bilin.append( (expr, expr._numerator[0], expr._numerator[1]) )
return
- if type(expr) is _PowExpression and value(expr._args[1]) == 2:
+ if type(expr) is PowExpression and value(expr._args[1]) == 2:
# Note: directly testing the value of the exponent above is
# safe: we have already verified that this expression is
# polynominal, so the exponent must be constant.
- tmp = _ProductExpression()
+ tmp = ProductExpression()
tmp._numerator = [ expr._args[0], expr._args[0] ]
tmp._denominator = []
expr._args = (tmp, as_numeric(1))
diff --git a/pyomo/core/preprocess/simple_preprocessor.py b/pyomo/core/preprocess/simple_preprocessor.py
index 29e0bd3cb1d..5344ca215e7 100644
--- a/pyomo/core/preprocess/simple_preprocessor.py
+++ b/pyomo/core/preprocess/simple_preprocessor.py
@@ -22,7 +22,7 @@ def simple_preprocessor(data, model=None):
Required:
model: A concrete model instance.
"""
- pyomo.util.PyomoAPIFactory('pyomo.repn.compute_canonical_repn')(data, model=model)
+ pyomo.util.PyomoAPIFactory('pyomo.repn.compute_standard_repn')(data, model=model)
#
# Process the presolver actions
#
diff --git a/pyomo/core/tests/examples/test_book.py b/pyomo/core/tests/examples/test_book.py
index ddb54050462..c5d9e282953 100644
--- a/pyomo/core/tests/examples/test_book.py
+++ b/pyomo/core/tests/examples/test_book.py
@@ -22,7 +22,7 @@
os.chdir(test_dir)
sys.path.append(test_dir)
-from test_book_examples import *
+#from test_book_examples import *
if __name__ == "__main__":
unittest.main()
diff --git a/pyomo/core/tests/examples/test_kernel_examples.py b/pyomo/core/tests/examples/test_kernel_examples.py
index b3cad5798a7..256e15bf0c8 100644
--- a/pyomo/core/tests/examples/test_kernel_examples.py
+++ b/pyomo/core/tests/examples/test_kernel_examples.py
@@ -34,6 +34,10 @@
scipy_available = False
try:
+ import platform
+ if platform.python_implementation() == "PyPy":
+ # The scipy is importable into PyPy, but ODE integrators don't work. (2/ 18)
+ raise ImportError
import scipy
scipy_available = True
except:
diff --git a/pyomo/core/tests/transform/test_add_slacks.py b/pyomo/core/tests/transform/test_add_slacks.py
index 112ec6e622d..fcdbbf12c16 100644
--- a/pyomo/core/tests/transform/test_add_slacks.py
+++ b/pyomo/core/tests/transform/test_add_slacks.py
@@ -12,29 +12,24 @@
import pyomo.opt
from pyomo.util.plugin import Plugin
from pyomo.environ import *
-from pyomo.core.base import expr_common, expr as EXPR
+import pyomo.core.expr.current as EXPR
solvers = pyomo.opt.check_available_solvers('glpk')
-# DEBUG
-from nose.tools import set_trace
-class TestAddSlacks_coopr3(unittest.TestCase):
+class TestAddSlacks(unittest.TestCase):
+
def setUp(self):
- EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
# set seed so we can test name collisions predictably
random.seed(666)
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
-
@staticmethod
def makeModel():
model = ConcreteModel()
model.x = Var(within=NonNegativeReals)
model.y = Var(within=NonNegativeReals)
model.rule1 = Constraint(expr=model.x <= 5)
- model.rule2 = Constraint(expr=1 <= model.y <= 3)
+ model.rule2 = Constraint(expr=inequality(1, model.y, 3))
model.rule3 = Constraint(expr=model.x >= 0.1)
model.obj = Objective(expr=-model.x-model.y)
return model
@@ -81,14 +76,12 @@ def checkRule1(self, m):
self.assertIsNone(cons.lower)
self.assertEqual(cons.upper, 5)
- self.assertIs(cons.body._args[0], m.x)
- self.assertEqual(cons.body._coef[0], 1)
- self.assertIs(cons.body._args[1], transBlock._slack_minus_rule1)
- self.assertEqual(cons.body._coef[1], -1)
-
- self.assertEqual(len(cons.body._args), 2)
- self.assertEqual(len(cons.body._coef), 2)
- self.assertEqual(cons.body._const, 0)
+ self.assertEqual(cons.body.nargs(), 2)
+
+ self.assertIs(cons.body.arg(0), m.x)
+ self.assertIs(cons.body.arg(1).__class__, EXPR.MonomialTermExpression)
+ self.assertEqual(cons.body.arg(1).arg(0), -1)
+ self.assertIs(cons.body.arg(1).arg(1), transBlock._slack_minus_rule1)
def checkRule3(self, m):
# check all original variables still there:
@@ -98,14 +91,10 @@ def checkRule3(self, m):
self.assertIsNone(cons.upper)
self.assertEqual(cons.lower, 0.1)
- self.assertIs(cons.body._args[0], m.x)
- self.assertEqual(cons.body._coef[0], 1)
- self.assertIs(cons.body._args[1], transBlock._slack_plus_rule3)
- self.assertEqual(cons.body._coef[1], 1)
-
- self.assertEqual(len(cons.body._args), 2)
- self.assertEqual(len(cons.body._coef), 2)
- self.assertEqual(cons.body._const, 0)
+ self.assertEqual(cons.body.nargs(), 2)
+
+ self.assertIs(cons.body.arg(0), m.x)
+ self.assertIs(cons.body.arg(1), transBlock._slack_plus_rule3)
def test_ub_constraint_modified(self):
m = self.makeModel()
@@ -128,16 +117,13 @@ def test_both_bounds_constraint_modified(self):
self.assertEqual(cons.lower, 1)
self.assertEqual(cons.upper, 3)
- self.assertIs(cons.body._args[0], m.y)
- self.assertEqual(cons.body._coef[0], 1)
- self.assertIs(cons.body._args[1], transBlock._slack_plus_rule2)
- self.assertEqual(cons.body._coef[1], 1)
- self.assertIs(cons.body._args[2], transBlock._slack_minus_rule2)
- self.assertEqual(cons.body._coef[2], -1)
-
- self.assertEqual(len(cons.body._args), 3)
- self.assertEqual(len(cons.body._coef), 3)
- self.assertEqual(cons.body._const, 0)
+ self.assertEqual(cons.body.nargs(), 3)
+
+ self.assertIs(cons.body.arg(0), m.y)
+ self.assertIs(cons.body.arg(1), transBlock._slack_plus_rule2)
+ self.assertIs(cons.body.arg(2).__class__, EXPR.MonomialTermExpression)
+ self.assertEqual(cons.body.arg(2).arg(0), -1)
+ self.assertIs(cons.body.arg(2).arg(1), transBlock._slack_minus_rule2)
def test_obj_deactivated(self):
m = self.makeModel()
@@ -157,20 +143,17 @@ def test_new_obj_created(self):
self.assertIsInstance(obj, Objective)
self.assertTrue(obj.active)
- self.assertIs(obj.expr._args[0], transBlock._slack_minus_rule1)
- self.assertIs(obj.expr._args[1], transBlock._slack_plus_rule2)
- self.assertIs(obj.expr._args[2], transBlock._slack_minus_rule2)
- self.assertIs(obj.expr._args[3], transBlock._slack_plus_rule3)
- for i in range(0, 4):
- self.assertEqual(obj.expr._coef[i], 1)
- self.assertEqual(obj.expr._const, 0)
- self.assertEqual(len(obj.expr._args), 4)
- self.assertEqual(len(obj.expr._coef), 4)
+ self.assertEqual(obj.expr.nargs(), 4)
+
+ self.assertIs(obj.expr.arg(0), transBlock._slack_minus_rule1)
+ self.assertIs(obj.expr.arg(1), transBlock._slack_plus_rule2)
+ self.assertIs(obj.expr.arg(2), transBlock._slack_minus_rule2)
+ self.assertIs(obj.expr.arg(3), transBlock._slack_plus_rule3)
def test_badModel_err(self):
model = ConcreteModel()
model.x = Var(within=NonNegativeReals)
- model.rule1 = Constraint(expr=6 <= model.x <= 5)
+ model.rule1 = Constraint(expr=inequality(6, model.x, 5))
self.assertRaisesRegexp(
RuntimeError,
"Lower bound exceeds upper bound in constraint rule1*",
@@ -261,13 +244,9 @@ def test_target_constraints_transformed_create_using(self):
def checkTargetsObj(self, m):
transBlock = m._core_add_slack_variables
obj = transBlock.component("_slack_objective")
- self.assertEqual(len(obj.expr._args), 2)
- self.assertEqual(len(obj.expr._coef), 2)
- self.assertIs(obj.expr._args[0], transBlock._slack_minus_rule1)
- self.assertEqual(obj.expr._coef[0], 1)
- self.assertIs(obj.expr._args[1], transBlock._slack_plus_rule3)
- self.assertEqual(obj.expr._coef[1], 1)
- self.assertEqual(obj.expr._const, 0)
+ self.assertEqual(obj.expr.nargs(), 2)
+ self.assertIs(obj.expr.arg(0), transBlock._slack_minus_rule1)
+ self.assertIs(obj.expr.arg(1), transBlock._slack_plus_rule3)
def test_target_objective(self):
m = self.makeModel()
@@ -300,7 +279,7 @@ def test_err_for_bogus_kwds(self):
def test_transformed_constraints_sumexpression_body(self):
m = self.makeModel()
- m.rule4 = Constraint(expr=5 <= m.x - 2*m.y <= 9)
+ m.rule4 = Constraint(expr=inequality(5, m.x - 2*m.y, 9))
TransformationFactory('core.add_slack_variables').apply_to(
m,
targets=[ComponentUID(m.rule4)])
@@ -309,16 +288,16 @@ def test_transformed_constraints_sumexpression_body(self):
c = m.rule4
self.assertEqual(c.lower, 5)
self.assertEqual(c.upper, 9)
- self.assertEqual(len(c.body._args), 4)
- self.assertEqual(len(c.body._coef), 4)
- self.assertIs(c.body._args[0], m.x)
- self.assertIs(c.body._args[1], m.y)
- self.assertIs(c.body._args[2], transBlock._slack_plus_rule4)
- self.assertIs(c.body._args[3], transBlock._slack_minus_rule4)
- self.assertEqual(c.body._coef[0], 1)
- self.assertEqual(c.body._coef[1], -2)
- self.assertEqual(c.body._coef[2], 1)
- self.assertEqual(c.body._coef[3], -1)
+
+ self.assertEqual(c.body.nargs(), 4)
+
+ self.assertIs(c.body.arg(0), m.x)
+ self.assertIs(c.body.arg(1).arg(0), -2)
+ self.assertIs(c.body.arg(1).arg(1), m.y)
+ self.assertIs(c.body.arg(2), transBlock._slack_plus_rule4)
+ self.assertIs(c.body.arg(3).__class__, EXPR.MonomialTermExpression)
+ self.assertEqual(c.body.arg(3).arg(0), -1)
+ self.assertIs(c.body.arg(3).arg(1), transBlock._slack_minus_rule4)
def test_transformed_constraint_scalar_body(self):
m = self.makeModel()
@@ -332,13 +311,14 @@ def test_transformed_constraint_scalar_body(self):
c = m.rule4
self.assertIsNone(c.lower)
self.assertEqual(c.upper, 9)
- self.assertEqual(len(c.body._args), 1)
- self.assertEqual(len(c.body._coef), 1)
- self.assertEqual(c.body._const, 6)
- self.assertIs(c.body._args[0], transBlock._slack_minus_rule4)
- self.assertEqual(c.body._coef[0], -1)
+ self.assertEqual(c.body.nargs(), 2)
+ self.assertEqual(c.body.arg(0), 6)
+ self.assertIs(c.body.arg(1).__class__, EXPR.MonomialTermExpression)
+ self.assertEqual(c.body.arg(1).arg(0), -1)
+ self.assertIs(c.body.arg(1).arg(1), transBlock._slack_minus_rule4)
+"""
# TODO: QUESTION: Is this bad? I just copied all of the tests that involve
# expressions and changed what I needed to. But the only thing different is the
# coefficients as dictionaries rather than constraints... So... the code is
@@ -364,13 +344,12 @@ def checkRule1(self, m):
self.assertIsNone(cons.lower)
self.assertEqual(cons.upper, 5)
- self.assertIs(cons.body._args[0], m.x)
- self.assertEqual(cons.body._coef[id(cons.body._args[0])], 1)
- self.assertIs(cons.body._args[1], transBlock._slack_minus_rule1)
- self.assertEqual(cons.body._coef[id(cons.body._args[1])], -1)
+ self.assertIs(cons.body.arg(0), m.x)
+ self.assertEqual(cons.body._coef[id(cons.body.arg(0))], 1)
+ self.assertIs(cons.body.arg(1), transBlock._slack_minus_rule1)
+ self.assertEqual(cons.body._coef[id(cons.body.arg(1))], -1)
- self.assertEqual(len(cons.body._args), 2)
- self.assertEqual(len(cons.body._coef), 2)
+ self.assertEqual(cons.body.nargs(), 2)
self.assertEqual(cons.body._const, 0)
def checkRule3(self, m):
@@ -381,13 +360,12 @@ def checkRule3(self, m):
self.assertIsNone(cons.upper)
self.assertEqual(cons.lower, 0.1)
- self.assertIs(cons.body._args[0], m.x)
- self.assertEqual(cons.body._coef[id(cons.body._args[0])], 1)
- self.assertIs(cons.body._args[1], transBlock._slack_plus_rule3)
- self.assertEqual(cons.body._coef[id(cons.body._args[1])], 1)
+ self.assertIs(cons.body.arg(0), m.x)
+ self.assertEqual(cons.body._coef[id(cons.body.arg(0))], 1)
+ self.assertIs(cons.body.arg(1), transBlock._slack_plus_rule3)
+ self.assertEqual(cons.body._coef[id(cons.body.arg(1))], 1)
- self.assertEqual(len(cons.body._args), 2)
- self.assertEqual(len(cons.body._coef), 2)
+ self.assertEqual(cons.body.nargs(), 2)
self.assertEqual(cons.body._const, 0)
def test_ub_constraint_modified(self):
@@ -411,15 +389,14 @@ def test_both_bounds_constraint_modified(self):
self.assertEqual(cons.lower, 1)
self.assertEqual(cons.upper, 3)
- self.assertIs(cons.body._args[0], m.y)
- self.assertEqual(cons.body._coef[id(cons.body._args[0])], 1)
- self.assertIs(cons.body._args[1], transBlock._slack_plus_rule2)
- self.assertEqual(cons.body._coef[id(cons.body._args[1])], 1)
- self.assertIs(cons.body._args[2], transBlock._slack_minus_rule2)
- self.assertEqual(cons.body._coef[id(cons.body._args[2])], -1)
+ self.assertIs(cons.body.arg(0), m.y)
+ self.assertEqual(cons.body._coef[id(cons.body.arg(0))], 1)
+ self.assertIs(cons.body.arg(1), transBlock._slack_plus_rule2)
+ self.assertEqual(cons.body._coef[id(cons.body.arg(1))], 1)
+ self.assertIs(cons.body.arg(2), transBlock._slack_minus_rule2)
+ self.assertEqual(cons.body._coef[id(cons.body.arg(2))], -1)
- self.assertEqual(len(cons.body._args), 3)
- self.assertEqual(len(cons.body._coef), 3)
+ self.assertEqual(cons.body.nargs(), 3)
self.assertEqual(cons.body._const, 0)
def test_new_obj_created(self):
@@ -433,14 +410,14 @@ def test_new_obj_created(self):
self.assertIsInstance(obj, Objective)
self.assertTrue(obj.active)
- self.assertIs(obj.expr._args[0], transBlock._slack_minus_rule1)
- self.assertIs(obj.expr._args[1], transBlock._slack_plus_rule2)
- self.assertIs(obj.expr._args[2], transBlock._slack_minus_rule2)
- self.assertIs(obj.expr._args[3], transBlock._slack_plus_rule3)
+ self.assertIs(obj.expr.arg(0), transBlock._slack_minus_rule1)
+ self.assertIs(obj.expr.arg(1), transBlock._slack_plus_rule2)
+ self.assertIs(obj.expr.arg(2), transBlock._slack_minus_rule2)
+ self.assertIs(obj.expr.arg(3), transBlock._slack_plus_rule3)
for i in range(0, 4):
- self.assertEqual(obj.expr._coef[id(obj.expr._args[i])], 1)
+ self.assertEqual(obj.expr._coef[id(obj.expr.arg(i))], 1)
self.assertEqual(obj.expr._const, 0)
- self.assertEqual(len(obj.expr._args), 4)
+ self.assertEqual(obj.expr.nargs(), 4)
self.assertEqual(len(obj.expr._coef), 4)
def test_leave_deactivated_constraints(self):
@@ -485,17 +462,16 @@ def test_target_objective(self):
transBlock = m._core_add_slack_variables
obj = transBlock.component("_slack_objective")
- self.assertEqual(len(obj.expr._args), 2)
- self.assertEqual(len(obj.expr._coef), 2)
- self.assertIs(obj.expr._args[0], transBlock._slack_minus_rule1)
- self.assertEqual(obj.expr._coef[id(obj.expr._args[0])], 1)
- self.assertIs(obj.expr._args[1], transBlock._slack_plus_rule3)
- self.assertEqual(obj.expr._coef[id(obj.expr._args[1])], 1)
+ self.assertEqual(obj.expr.nargs(), 2)
+ self.assertIs(obj.expr.arg(0), transBlock._slack_minus_rule1)
+ self.assertEqual(obj.expr._coef[id(obj.expr.arg(0))], 1)
+ self.assertIs(obj.expr.arg(1), transBlock._slack_plus_rule3)
+ self.assertEqual(obj.expr._coef[id(obj.expr.arg(1))], 1)
self.assertEqual(obj.expr._const, 0)
def test_transformed_constraints_linearexpression_body(self):
m = self.makeModel()
- m.rule4 = Constraint(expr=5 <= m.x - 2*m.y <= 9)
+ m.rule4 = Constraint(expr=inequality(5, m.x - 2*m.y, 9))
TransformationFactory('core.add_slack_variables').apply_to(
m,
targets=[ComponentUID(m.rule4)])
@@ -504,20 +480,20 @@ def test_transformed_constraints_linearexpression_body(self):
c = m.rule4
self.assertEqual(c.lower, 5)
self.assertEqual(c.upper, 9)
- self.assertEqual(len(c.body._args), 4)
+ self.assertEqual(c.body.nargs(), 4)
self.assertEqual(len(c.body._coef), 4)
- self.assertIs(c.body._args[0], m.x)
- self.assertIs(c.body._args[1], m.y)
- self.assertIs(c.body._args[2], transBlock._slack_plus_rule4)
- self.assertIs(c.body._args[3], transBlock._slack_minus_rule4)
- self.assertEqual(c.body._coef[id(c.body._args[0])], 1)
- self.assertEqual(c.body._coef[id(c.body._args[1])], -2)
- self.assertEqual(c.body._coef[id(c.body._args[2])], 1)
- self.assertEqual(c.body._coef[id(c.body._args[3])], -1)
+ self.assertIs(c.body.arg(0), m.x)
+ self.assertIs(c.body.arg(1), m.y)
+ self.assertIs(c.body.arg(2), transBlock._slack_plus_rule4)
+ self.assertIs(c.body.arg(3), transBlock._slack_minus_rule4)
+ self.assertEqual(c.body._coef[id(c.body.arg(0))], 1)
+ self.assertEqual(c.body._coef[id(c.body.arg(1))], -2)
+ self.assertEqual(c.body._coef[id(c.body.arg(2))], 1)
+ self.assertEqual(c.body._coef[id(c.body.arg(3))], -1)
def test_transformed_constraints_sumexpression_body(self):
m = self.makeModel()
- m.rule4 = Constraint(expr=5 <= m.x**2 - 2*m.y <= 9)
+ m.rule4 = Constraint(expr=inequality(5, m.x**2 - 2*m.y, 9))
TransformationFactory('core.add_slack_variables').apply_to(
m,
targets=[ComponentUID(m.rule4)])
@@ -526,24 +502,24 @@ def test_transformed_constraints_sumexpression_body(self):
c = m.rule4
self.assertEqual(c.lower, 5)
self.assertEqual(c.upper, 9)
- self.assertEqual(len(c.body._args), 4)
+ self.assertEqual(c.body.nargs(), 4)
# this is a PowExpression now
- self.assertIs(c.body._args[0]._args[0], m.x)
- self.assertEqual(c.body._args[0]._args[1], 2)
+ self.assertIs(c.body.arg(0).arg(0), m.x)
+ self.assertEqual(c.body.arg(0).arg(1), 2)
# this is a linear expression
- term2 = c.body._args[1]
- self.assertEqual(len(term2._args), 1)
+ term2 = c.body.arg(1)
+ self.assertEqual(term2.nargs(), 1)
self.assertEqual(len(term2._coef), 1)
- self.assertIs(term2._args[0], m.y)
- self.assertEqual(term2._coef[id(term2._args[0])], -2)
+ self.assertIs(term2.arg(0), m.y)
+ self.assertEqual(term2._coef[id(term2.arg(0))], -2)
# this is just a variable
- self.assertIs(c.body._args[2], transBlock._slack_plus_rule4)
+ self.assertIs(c.body.arg(2), transBlock._slack_plus_rule4)
# this is a linear expression
- term4 = c.body._args[3]
- self.assertEqual(len(term4._args), 1)
+ term4 = c.body.arg(3)
+ self.assertEqual(term4.nargs(), 1)
self.assertEqual(len(term4._coef), 1)
- self.assertIs(term4._args[0], transBlock._slack_minus_rule4)
- self.assertEqual(term4._coef[id(term4._args[0])], -1)
+ self.assertIs(term4.arg(0), transBlock._slack_minus_rule4)
+ self.assertEqual(term4._coef[id(term4.arg(0))], -1)
def test_transformed_constraint_scalar_body(self):
m = self.makeModel()
@@ -557,19 +533,15 @@ def test_transformed_constraint_scalar_body(self):
c = m.rule4
self.assertIsNone(c.lower)
self.assertEqual(c.upper, 9)
- self.assertEqual(len(c.body._args), 1)
+ self.assertEqual(c.body.nargs(), 1)
self.assertEqual(len(c.body._coef), 1)
self.assertEqual(c.body._const, 6)
- self.assertIs(c.body._args[0], transBlock._slack_minus_rule4)
- self.assertEqual(c.body._coef[id(c.body._args[0])], -1)
+ self.assertIs(c.body.arg(0), transBlock._slack_minus_rule4)
+ self.assertEqual(c.body._coef[id(c.body.arg(0))], -1)
+"""
-class TestAddSlacks_IndexedConstraints_coopr3(unittest.TestCase):
- def setUp(self):
- EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
-
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
+class TestAddSlacks_IndexedConstraints(unittest.TestCase):
@staticmethod
def makeModel():
@@ -637,18 +609,13 @@ def checkTargetObj(self, m):
transBlock = m._core_add_slack_variables
obj = transBlock.component("_slack_objective")
self.assertIsInstance(obj, Objective)
- self.assertEqual(len(obj.expr._args), 3)
- self.assertEqual(len(obj.expr._coef), 3)
- self.assertEqual(obj.expr._const, 0)
- self.assertIs(obj.expr._args[0],
+ self.assertEqual(obj.expr.nargs(), 3)
+ self.assertIs(obj.expr.arg(0),
transBlock.component("_slack_plus_rule1[1]"))
- self.assertIs(obj.expr._args[1],
+ self.assertIs(obj.expr.arg(1),
transBlock.component("_slack_plus_rule1[2]"))
- self.assertIs(obj.expr._args[2],
+ self.assertIs(obj.expr.arg(2),
transBlock.component("_slack_plus_rule1[3]"))
- self.assertIs(obj.expr._coef[0], 1)
- self.assertIs(obj.expr._coef[1], 1)
- self.assertIs(obj.expr._coef[2], 1)
def test_indexedtarget_objective(self):
m = self.makeModel()
@@ -672,16 +639,14 @@ def checkTransformedRule1(self, m, i):
c = m.rule1[i]
self.assertEqual(c.lower, 4)
self.assertIsNone(c.upper)
- self.assertEqual(len(c.body._args), 2)
- self.assertEqual(len(c.body._coef), 2)
- self.assertIs(c.body._args[0], m.x[i])
+
+ self.assertEqual(c.body.nargs(), 2)
+ self.assertEqual(c.body.arg(0).arg(0), 2)
+ self.assertIs(c.body.arg(0).arg(1), m.x[i])
self.assertIs(
- c.body._args[1],
+ c.body.arg(1),
m._core_add_slack_variables.component(
"_slack_plus_rule1[%s]" % i))
- self.assertEqual(c.body._coef[0], 2)
- self.assertEqual(c.body._coef[1], 1)
- self.assertEqual(c.body._const, 0)
def test_indexedtarget_targets_transformed(self):
m = self.makeModel()
@@ -729,10 +694,8 @@ def checkUntransformedRule1(self, m, i):
c = m.rule1[i]
self.assertEqual(c.lower, 4)
self.assertIsNone(c.upper)
- self.assertEqual(len(c.body._numerator), 1)
- self.assertEqual(len(c.body._denominator), 0)
- self.assertIs(c.body._numerator[0], m.x[i])
- self.assertEqual(c.body._coef, 2)
+ self.assertEqual(c.body.arg(0), 2)
+ self.assertIs(c.body.arg(1), m.x[i])
def test_ConstraintDatatarget_nontargets_same(self):
m = self.makeModel()
@@ -794,7 +757,7 @@ def test_ConstraintDatatarget_objective_create_using(self):
self.assertFalse(m2.obj.active)
self.checkConstraintDataObj(m2)
-
+"""
# TODO: QUESTION: same as above here...
class TestAddSlacks_IndexedConstraints_pyomo4(unittest.TestCase):
def setUp(self):
@@ -832,32 +795,30 @@ def test_indexedtarget_objective(self):
transBlock = m._core_add_slack_variables
obj = transBlock.component("_slack_objective")
self.assertIsInstance(obj, Objective)
- self.assertEqual(len(obj.expr._args), 3)
- self.assertEqual(len(obj.expr._coef), 3)
+ self.assertEqual(obj.expr.nargs(), 3)
self.assertEqual(obj.expr._const, 0)
- self.assertIs(obj.expr._args[0],
+ self.assertIs(obj.expr.arg(0),
transBlock.component("_slack_plus_rule1[1]"))
- self.assertIs(obj.expr._args[1],
+ self.assertIs(obj.expr.arg(1),
transBlock.component("_slack_plus_rule1[2]"))
- self.assertIs(obj.expr._args[2],
+ self.assertIs(obj.expr.arg(2),
transBlock.component("_slack_plus_rule1[3]"))
- self.assertIs(obj.expr._coef[id(obj.expr._args[0])], 1)
- self.assertIs(obj.expr._coef[id(obj.expr._args[1])], 1)
- self.assertIs(obj.expr._coef[id(obj.expr._args[2])], 1)
+ self.assertIs(obj.expr._coef[id(obj.expr.arg(0))], 1)
+ self.assertIs(obj.expr._coef[id(obj.expr.arg(1))], 1)
+ self.assertIs(obj.expr._coef[id(obj.expr.arg(2))], 1)
def checkTransformedRule1(self, m, i):
c = m.rule1[i]
self.assertEqual(c.lower, 4)
self.assertIsNone(c.upper)
- self.assertEqual(len(c.body._args), 2)
- self.assertEqual(len(c.body._coef), 2)
- self.assertIs(c.body._args[0], m.x[i])
+ self.assertEqual(c.body.nargs(), 2)
+ self.assertIs(c.body.arg(0), m.x[i])
self.assertIs(
- c.body._args[1],
+ c.body.arg(1),
m._core_add_slack_variables.component(
"_slack_plus_rule1[%s]" % i))
- self.assertEqual(c.body._coef[id(c.body._args[0])], 2)
- self.assertEqual(c.body._coef[id(c.body._args[1])], 1)
+ self.assertEqual(c.body._coef[id(c.body.arg(0))], 2)
+ self.assertEqual(c.body._coef[id(c.body.arg(1))], 1)
self.assertEqual(c.body._const, 0)
def test_indexedtarget_targets_transformed(self):
@@ -873,10 +834,9 @@ def checkUntransformedRule1(self, m, i):
c = m.rule1[i]
self.assertEqual(c.lower, 4)
self.assertIsNone(c.upper)
- self.assertEqual(len(c.body._args), 1)
- self.assertEqual(len(c.body._coef), 1)
- self.assertIs(c.body._args[0], m.x[i])
- self.assertEqual(c.body._coef[id(c.body._args[0])], 2)
+ self.assertEqual(c.body.nargs(), 1)
+ self.assertIs(c.body.arg(0), m.x[i])
+ self.assertEqual(c.body._coef[id(c.body.arg(0))], 2)
def test_ConstraintDatatarget_nontargets_same(self):
m = self.makeModel()
@@ -908,3 +868,10 @@ def test_ConstraintDatatarget_objective(self):
obj = transBlock.component("_slack_objective")
self.assertIsInstance(obj, Objective)
self.assertIs(obj.expr, transBlock.component("_slack_plus_rule1[2]"))
+"""
+
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/pyomo/core/tests/transform/test_transform.py b/pyomo/core/tests/transform/test_transform.py
index 0aefef5c1ec..83659648954 100644
--- a/pyomo/core/tests/transform/test_transform.py
+++ b/pyomo/core/tests/transform/test_transform.py
@@ -280,14 +280,14 @@ def domainRule(*args):
self.model.z4 = Var(self.model.S, self.model.T, domain=domainRule, bounds=(-10, 10))
def objRule(model):
- return sum(5*summation(model.__getattribute__(c+n)) \
+ return sum(5*sum_product(model.__getattribute__(c+n)) \
for c in ('x', 'y', 'z') for n in ('1', '2', '3', '4'))
self.model.obj = Objective(rule=objRule)
- transform = NonNegativeTransformation()
+ transform = TransformationFactory('core.nonnegative_vars')
instance=self.model.create_instance()
- transformed = transform(instance)
+ transformed = transform.create_using(instance)
opt = SolverFactory("glpk")
@@ -397,7 +397,7 @@ def zConRule(model, var, s, t):
self.model.__getattribute__("z"+n))))
def objRule(model):
- return sum(5*summation(model.__getattribute__(c+n)) \
+ return sum(5*sum_product(model.__getattribute__(c+n)) \
for c in ('x', 'y', 'z') for n in ('1', '2', '3', '4'))
self.model.obj = Objective(rule=objRule)
@@ -482,7 +482,7 @@ def domainRule(*args):
self.model.z4 = Var(self.model.S, self.model.T, domain=domainRule, bounds=(-10, 10))
def objRule(model):
- return sum(5*summation(model.__getattribute__(c+n)) \
+ return sum(5*sum_product(model.__getattribute__(c+n)) \
for c in ('x', 'y', 'z') for n in ('1', '2', '3', '4'))
self.model.obj = Objective(rule=objRule)
@@ -600,7 +600,7 @@ def zConRule(model, var, s, t):
self.model.__getattribute__("z"+n))))
def objRule(model):
- return sum(5*summation(model.__getattribute__(c+n)) \
+ return sum(5*sum_product(model.__getattribute__(c+n)) \
for c in ('x', 'y', 'z') for n in ('1', '2', '3', '4'))
self.model.obj = Objective(rule=objRule)
diff --git a/pyomo/core/tests/unit/display.txt b/pyomo/core/tests/unit/display.txt
index 89a3cf87bc2..74030611b3a 100644
--- a/pyomo/core/tests/unit/display.txt
+++ b/pyomo/core/tests/unit/display.txt
@@ -36,7 +36,7 @@ x : Size=1, Index=None
con : Size=1
Key : Lower : Body : Upper
None : 1.0 : 2 : 2.0
-1 + xModel unknown
+x + 1Model unknown
Variables:
None
diff --git a/pyomo/core/tests/unit/display2.txt b/pyomo/core/tests/unit/display2.txt
index 5335301db38..78949c30669 100644
--- a/pyomo/core/tests/unit/display2.txt
+++ b/pyomo/core/tests/unit/display2.txt
@@ -38,7 +38,7 @@ x : Size=1, Index=None
con : Size=1
Key : Lower : Body : Upper
None : 1.0 : 2 : 2.0
-1 + xModel unknown
+x + 1Model unknown
Variables:
None
diff --git a/pyomo/core/tests/unit/solve1.txt b/pyomo/core/tests/unit/solve1.txt
index 3701991082c..3b3ffd43f1a 100644
--- a/pyomo/core/tests/unit/solve1.txt
+++ b/pyomo/core/tests/unit/solve1.txt
@@ -2,7 +2,6 @@
"Problem": [
{
"Lower bound": -1.33333333333333,
- "Name": "unknown",
"Number of constraints": 2,
"Number of nonzeros": 5,
"Number of objectives": 1,
@@ -26,7 +25,6 @@
}
},
"Problem": {},
- "Status": "feasible",
"Variable": {
"x[1]": {
"Value": -1.0
@@ -46,12 +44,6 @@
"Solver": [
{
"Error rc": 0,
- "Statistics": {
- "Branch and bound": {
- "Number of bounded subproblems": 0,
- "Number of created subproblems": 0
- }
- },
"Status": "ok",
"Termination condition": "optimal"
}
diff --git a/pyomo/core/tests/unit/solve1a.txt b/pyomo/core/tests/unit/solve1a.txt
index 90e36824048..572796f7a7d 100644
--- a/pyomo/core/tests/unit/solve1a.txt
+++ b/pyomo/core/tests/unit/solve1a.txt
@@ -2,7 +2,6 @@
"Problem": [
{
"Lower bound": -0.666666666666667,
- "Name": "unknown",
"Number of constraints": 3,
"Number of nonzeros": 6,
"Number of objectives": 1,
@@ -26,7 +25,6 @@
}
},
"Problem": {},
- "Status": "feasible",
"Variable": {
"x[2]": {
"Value": -1.0
@@ -43,12 +41,6 @@
"Solver": [
{
"Error rc": 0,
- "Statistics": {
- "Branch and bound": {
- "Number of bounded subproblems": 0,
- "Number of created subproblems": 0
- }
- },
"Status": "ok",
"Termination condition": "optimal"
}
diff --git a/pyomo/core/tests/unit/solve1b.txt b/pyomo/core/tests/unit/solve1b.txt
index 24fc6750895..ff95a852bcb 100644
--- a/pyomo/core/tests/unit/solve1b.txt
+++ b/pyomo/core/tests/unit/solve1b.txt
@@ -2,7 +2,6 @@
"Problem": [
{
"Lower bound": 0.0,
- "Name": "unknown",
"Number of constraints": 6,
"Number of nonzeros": 9,
"Number of objectives": 1,
@@ -22,19 +21,12 @@
"Message": null,
"Objective": {},
"Problem": {},
- "Status": "feasible",
"Variable": {}
}
],
"Solver": [
{
"Error rc": 0,
- "Statistics": {
- "Branch and bound": {
- "Number of bounded subproblems": 0,
- "Number of created subproblems": 0
- }
- },
"Status": "ok",
"Termination condition": "optimal"
}
diff --git a/pyomo/core/tests/unit/solve7.txt b/pyomo/core/tests/unit/solve7.txt
index 6ded451b25a..573b6ec638b 100644
--- a/pyomo/core/tests/unit/solve7.txt
+++ b/pyomo/core/tests/unit/solve7.txt
@@ -2,7 +2,6 @@
"Problem": [
{
"Lower bound": -4.33333333333333,
- "Name": "unknown",
"Number of constraints": 2,
"Number of nonzeros": 14,
"Number of objectives": 1,
@@ -23,7 +22,6 @@
"Value": -4.33333333333333
}
},
- "Status": "feasible",
"Gap": 0.0,
"Variable": {
"x[1,'C,D']": {
@@ -71,12 +69,6 @@
"Solver": [
{
"Error rc": 0,
- "Statistics": {
- "Branch and bound": {
- "Number of bounded subproblems": 0,
- "Number of created subproblems": 0
- }
- },
"Status": "ok",
"Termination condition": "optimal"
}
diff --git a/pyomo/core/tests/unit/test_block.py b/pyomo/core/tests/unit/test_block.py
index d3ee7c5c463..00a77de518f 100644
--- a/pyomo/core/tests/unit/test_block.py
+++ b/pyomo/core/tests/unit/test_block.py
@@ -28,7 +28,7 @@
from pyomo.environ import *
from pyomo.util.log import LoggingIntercept
from pyomo.core.base.block import SimpleBlock
-from pyomo.core.base.expr import identify_variables
+from pyomo.core.expr import current as EXPR
from pyomo.opt import *
from pyomo.gdp import Disjunct
@@ -1632,11 +1632,11 @@ def test_deepcopy(self):
self.assertIs(n.c.parent_block(), n)
self.assertIs(n.c.parent_component(), n.c)
self.assertEqual(
- sorted(id(x) for x in identify_variables(m.c.body)),
+ sorted(id(x) for x in EXPR.identify_variables(m.c.body)),
sorted(id(x) for x in (m.x,m.y[1])),
)
self.assertEqual(
- sorted(id(x) for x in identify_variables(n.c.body)),
+ sorted(id(x) for x in EXPR.identify_variables(n.c.body)),
sorted(id(x) for x in (n.x,n.y[1])),
)
@@ -1664,11 +1664,11 @@ def test_deepcopy(self):
self.assertIs(n.b.c.parent_block(), n.b)
self.assertIs(n.b.c.parent_component(), n.b.c)
self.assertEqual(
- sorted(id(x) for x in identify_variables(m.b.c.body)),
+ sorted(id(x) for x in EXPR.identify_variables(m.b.c.body)),
sorted(id(x) for x in (m.x, m.y[1], m.b.x, m.b.y[1])),
)
self.assertEqual(
- sorted(id(x) for x in identify_variables(n.b.c.body)),
+ sorted(id(x) for x in EXPR.identify_variables(n.b.c.body)),
sorted(id(x) for x in (n.x, n.y[1], n.b.x, n.b.y[1])),
)
@@ -1703,11 +1703,11 @@ def test_clone_model(self):
self.assertIs(n.c.parent_block(), n)
self.assertIs(n.c.parent_component(), n.c)
self.assertEqual(
- sorted(id(x) for x in identify_variables(m.c.body)),
+ sorted(id(x) for x in EXPR.identify_variables(m.c.body)),
sorted(id(x) for x in (m.x,m.y[1])),
)
self.assertEqual(
- sorted(id(x) for x in identify_variables(n.c.body)),
+ sorted(id(x) for x in EXPR.identify_variables(n.c.body)),
sorted(id(x) for x in (n.x,n.y[1])),
)
@@ -1735,11 +1735,11 @@ def test_clone_model(self):
self.assertIs(n.b.c.parent_block(), n.b)
self.assertIs(n.b.c.parent_component(), n.b.c)
self.assertEqual(
- sorted(id(x) for x in identify_variables(m.b.c.body)),
+ sorted(id(x) for x in EXPR.identify_variables(m.b.c.body)),
sorted(id(x) for x in (m.x, m.y[1], m.b.x, m.b.y[1])),
)
self.assertEqual(
- sorted(id(x) for x in identify_variables(n.b.c.body)),
+ sorted(id(x) for x in EXPR.identify_variables(n.b.c.body)),
sorted(id(x) for x in (n.x, n.y[1], n.b.x, n.b.y[1])),
)
@@ -1779,11 +1779,11 @@ def test_clone_subblock(self):
self.assertIs(nb.c.parent_block(), nb)
self.assertIs(nb.c.parent_component(), nb.c)
self.assertEqual(
- sorted(id(x) for x in identify_variables(m.b.c.body)),
+ sorted(id(x) for x in EXPR.identify_variables(m.b.c.body)),
sorted(id(x) for x in (m.x, m.y[1], m.b.x, m.b.y[1])),
)
self.assertEqual(
- sorted(id(x) for x in identify_variables(nb.c.body)),
+ sorted(id(x) for x in EXPR.identify_variables(nb.c.body)),
sorted(id(x) for x in (m.x, m.y[1], nb.x, nb.y[1])),
)
@@ -1862,11 +1862,11 @@ def __deepcopy__(bogus):
self.assertIs(n.c.parent_block(), n)
self.assertIs(n.c.parent_component(), n.c)
self.assertEqual(
- sorted(id(x) for x in identify_variables(m.c.body)),
+ sorted(id(x) for x in EXPR.identify_variables(m.c.body)),
sorted(id(x) for x in (m.x,m.y[1])),
)
self.assertEqual(
- sorted(id(x) for x in identify_variables(n.c.body)),
+ sorted(id(x) for x in EXPR.identify_variables(n.c.body)),
sorted(id(x) for x in (n.x,n.y[1])),
)
@@ -1894,11 +1894,11 @@ def __deepcopy__(bogus):
self.assertIs(n.b.c.parent_block(), n.b)
self.assertIs(n.b.c.parent_component(), n.b.c)
self.assertEqual(
- sorted(id(x) for x in identify_variables(m.b.c.body)),
+ sorted(id(x) for x in EXPR.identify_variables(m.b.c.body)),
sorted(id(x) for x in (m.x, m.y[1], m.b.x, m.b.y[1])),
)
self.assertEqual(
- sorted(id(x) for x in identify_variables(n.b.c.body)),
+ sorted(id(x) for x in EXPR.identify_variables(n.b.c.body)),
sorted(id(x) for x in (n.x, n.y[1], n.b.x, n.b.y[1])),
)
@@ -1956,7 +1956,7 @@ def test_solve1(self):
model.A = RangeSet(1,4)
model.x = Var(model.A, bounds=(-1,1))
def obj_rule(model):
- return summation(model.x)
+ return sum_product(model.x)
model.obj = Objective(rule=obj_rule)
def c_rule(model):
expr = 0
@@ -2018,7 +2018,7 @@ def test_solve4(self):
model.A = RangeSet(1,4)
model.x = Var(model.A, bounds=(-1,1))
def obj_rule(model):
- return summation(model.x)
+ return sum_product(model.x)
model.obj = Objective(rule=obj_rule)
def c_rule(model):
expr = 0
@@ -2047,7 +2047,7 @@ def test_solve6(self):
model.b.A = RangeSet(1,4)
model.b.x = Var(model.b.A, bounds=(-1,1))
def obj_rule(block):
- return summation(block.x)
+ return sum_product(block.x)
model.b.obj = Objective(rule=obj_rule)
def c_rule(model):
expr = model.y
@@ -2075,7 +2075,7 @@ def test_solve7(self):
model.B = Set(initialize=['A B', 'C,D', 'E'])
model.x = Var(model.A, model.B, bounds=(-1,1))
def obj_rule(model):
- return summation(model.x)
+ return sum_product(model.x)
model.obj = Objective(rule=obj_rule)
def c_rule(model):
expr = model.y
diff --git a/pyomo/core/tests/unit/test_bounds.py b/pyomo/core/tests/unit/test_bounds.py
index 719381bbf75..ec0b97dff19 100644
--- a/pyomo/core/tests/unit/test_bounds.py
+++ b/pyomo/core/tests/unit/test_bounds.py
@@ -8,7 +8,7 @@
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
#
-# Unit Tests for nontrivial Bounds (_SumExpression, _ProductExpression)
+# Unit Tests for nontrivial Bounds
#
import os
diff --git a/pyomo/core/tests/unit/test_component.py b/pyomo/core/tests/unit/test_component.py
index ee864addaa8..ab3db72be84 100644
--- a/pyomo/core/tests/unit/test_component.py
+++ b/pyomo/core/tests/unit/test_component.py
@@ -15,8 +15,9 @@
from pyomo.util import DeveloperError
import pyomo.core.base._pyomo
-from pyomo.environ import *
from pyomo.core.base.block import generate_cuid_names
+from pyomo.environ import *
+
class TestComponent(unittest.TestCase):
diff --git a/pyomo/core/tests/unit/test_component_block.py b/pyomo/core/tests/unit/test_component_block.py
index 4f1385b23a7..6feaacf7954 100644
--- a/pyomo/core/tests/unit/test_component_block.py
+++ b/pyomo/core/tests/unit/test_component_block.py
@@ -3,6 +3,8 @@
import pickle
import pyutilib.th as unittest
+from pyomo.core.expr.numvalue import native_numeric_types
+from pyomo.core.expr.symbol_map import SymbolMap
import pyomo.kernel
from pyomo.core.tests.unit.test_component_dict import \
_TestActiveComponentDictBase
@@ -16,7 +18,6 @@
IComponentContainer,
_ActiveComponentContainerMixin)
from pyomo.core.kernel.component_map import ComponentMap
-from pyomo.core.kernel.symbol_map import SymbolMap
from pyomo.core.kernel.component_suffix import suffix
from pyomo.core.kernel.component_constraint import (constraint,
constraint_dict,
@@ -45,7 +46,6 @@
from pyomo.core.base.block import Block
from pyomo.core.base.constraint import Constraint
from pyomo.core.base.var import Var
-import pyomo.core.base.expr
from pyomo.opt.results import Solution
def _path_to_object_exists(obj, descendent):
@@ -75,15 +75,11 @@ def _collect_expr_components(exp):
ans = {}
if isinstance(exp, IComponent):
ans[id(exp)] = exp
- if exp.is_expression():
- if exp.__class__ is pyomo.core.base.expr._ProductExpression:
- for subexp in exp._numerator:
- ans.update(_collect_expr_components(subexp))
- for subexp in exp._denominator:
- ans.update(_collect_expr_components(subexp))
- else:
- for subexp in exp._args:
- ans.update(_collect_expr_components(subexp))
+ if exp.__class__ in native_numeric_types:
+ return ans
+ if exp.is_expression_type():
+ for subexp in exp.args:
+ ans.update(_collect_expr_components(subexp))
return ans
class TestMisc(unittest.TestCase):
@@ -131,7 +127,7 @@ def test_write(self):
b.eu = data_expression(b.p**2 + 10)
b.el = data_expression(-b.p**2 - 10)
b.o = objective(b.v + b.y)
- b.c1 = constraint(b.el + 1 <= b.e + 2 <= b.eu + 2)
+ b.c1 = constraint((b.el + 1, b.e + 2, b.eu + 2))
b.c2 = constraint(lb=b.el, body=b.v)
b.c3 = constraint(body=b.v, ub=b.eu)
@@ -266,7 +262,7 @@ def test_solve_load(self):
b.eu = data_expression(b.p**2 + 10)
b.el = data_expression(-b.p**2 - 10)
b.o = objective(b.v + b.y)
- b.c1 = constraint(b.el + 1 <= b.e + 2 <= b.eu + 2)
+ b.c1 = constraint((b.el + 1, b.e + 2, b.eu + 2))
b.c2 = constraint(lb=b.el, body=b.v)
b.c3 = constraint(body=b.v, ub=b.eu)
b.dual = suffix(direction=suffix.IMPORT)
@@ -512,7 +508,7 @@ def test_clone2(self):
b.cdict = constraint_dict(((i, constraint(b.vdict[i] == i))
for i in b.vdict),
ordered=True)
- b.clist = constraint_list(constraint(0 <= v_ <= i)
+ b.clist = constraint_list(constraint((0, v_, i))
for i, v_ in enumerate(b.vlist))
b.p = parameter()
b.pdict = parameter_dict(((i, parameter(i))
diff --git a/pyomo/core/tests/unit/test_component_constraint.py b/pyomo/core/tests/unit/test_component_constraint.py
index 4fda234102e..3bea87ea989 100644
--- a/pyomo/core/tests/unit/test_component_constraint.py
+++ b/pyomo/core/tests/unit/test_component_constraint.py
@@ -1,6 +1,8 @@
import pickle
import pyutilib.th as unittest
+from pyomo.core.expr import current as EXPR
+from pyomo.core.expr import inequality
import pyomo.kernel
from pyomo.core.tests.unit.test_component_dict import \
_TestActiveComponentDictBase
@@ -28,6 +30,7 @@
IntegerSet)
from pyomo.core.base.constraint import Constraint
+
class Test_constraint(unittest.TestCase):
def test_pprint(self):
@@ -35,7 +38,7 @@ def test_pprint(self):
# an error does not occur. The pprint functionality
# is still in the early stages.
v = variable()
- c = constraint(1 <= v**2 <= 2)
+ c = constraint((1, v**2, 2))
pyomo.core.kernel.pprint(c)
b = block()
b.c = c
@@ -391,12 +394,12 @@ def test_nondata_bounds(self):
eL = expression()
eU = expression()
with self.assertRaises(ValueError):
- c.expr = (eL <= e <= eU)
+ c.expr = (eL, e, eU)
e.expr = 1.0
eL.expr = 1.0
eU.expr = 1.0
with self.assertRaises(ValueError):
- c.expr = (eL <= e <= eU)
+ c.expr = (eL, e, eU)
with self.assertRaises(ValueError):
c.lb = eL
with self.assertRaises(ValueError):
@@ -405,7 +408,7 @@ def test_nondata_bounds(self):
vL = variable()
vU = variable()
with self.assertRaises(ValueError):
- c.expr = (vL <= e <= vU)
+ c.expr = (vL, e, vU)
with self.assertRaises(ValueError):
c.lb = vL
with self.assertRaises(ValueError):
@@ -415,7 +418,7 @@ def test_nondata_bounds(self):
vL.value = 1.0
vU.value = 1.0
with self.assertRaises(ValueError):
- c.expr = (vL <= e <= vU)
+ c.expr = (vL, e, vU)
with self.assertRaises(ValueError):
c.lb = vL
with self.assertRaises(ValueError):
@@ -428,7 +431,7 @@ def test_nondata_bounds(self):
vL.fixed = True
vU.fixed = True
with self.assertRaises(ValueError):
- c.expr = (vL <= e <= vU)
+ c.expr = (vL, e, vU)
with self.assertRaises(ValueError):
c.lb = vL
with self.assertRaises(ValueError):
@@ -439,7 +442,7 @@ def test_nondata_bounds(self):
vL.value = 1.0
vU.value = 1.0
with self.assertRaises(ValueError):
- c.expr = (vL <= 0.0 <= vU)
+ c.expr = (vL, 0.0, vU)
c.body = -2.0
c.lb = 1.0
c.ub = 1.0
@@ -476,53 +479,53 @@ def test_nondata_bounds(self):
def test_fixed_variable_stays_in_body(self):
c = constraint()
x = variable(value=0.5)
- c.expr = (0 <= x <= 1)
- self.assertEqual(c.lb(), 0)
+ c.expr = (0, x, 1)
+ self.assertEqual(c.lb, 0)
self.assertEqual(c.body(), 0.5)
- self.assertEqual(c.ub(), 1)
+ self.assertEqual(c.ub, 1)
x.value = 2
- self.assertEqual(c.lb(), 0)
+ self.assertEqual(c.lb, 0)
self.assertEqual(c.body(), 2)
- self.assertEqual(c.ub(), 1)
+ self.assertEqual(c.ub, 1)
# ensure the variable is not moved into the upper or
# lower bound expression (this used to be a bug)
x.fix(0.5)
- c.expr = (0 <= x <= 1)
- self.assertEqual(c.lb(), 0)
+ c.expr = (0, x, 1)
+ self.assertEqual(c.lb, 0)
self.assertEqual(c.body(), 0.5)
- self.assertEqual(c.ub(), 1)
+ self.assertEqual(c.ub, 1)
x.value = 2
- self.assertEqual(c.lb(), 0)
+ self.assertEqual(c.lb, 0)
self.assertEqual(c.body(), 2)
- self.assertEqual(c.ub(), 1)
+ self.assertEqual(c.ub, 1)
x.free()
x.value = 1
c.expr = (0 == x)
self.assertEqual(c.equality, True)
- self.assertEqual(c.lb(), 0)
+ self.assertEqual(c.lb, 0)
self.assertEqual(c.body(), 1)
- self.assertEqual(c.ub(), 0)
+ self.assertEqual(c.ub, 0)
c.expr = (x == 0)
self.assertEqual(c.equality, True)
- self.assertEqual(c.lb(), 0)
+ self.assertEqual(c.lb, 0)
self.assertEqual(c.body(), 1)
- self.assertEqual(c.ub(), 0)
+ self.assertEqual(c.ub, 0)
# ensure the variable is not moved into the upper or
# lower bound expression (this used to be a bug)
x.fix()
c.expr = (0 == x)
self.assertEqual(c.equality, True)
- self.assertEqual(c.lb(), 0)
+ self.assertEqual(c.lb, 0)
self.assertEqual(c.body(), 1)
- self.assertEqual(c.ub(), 0)
+ self.assertEqual(c.ub, 0)
c.expr = (x == 0)
self.assertEqual(c.equality, True)
- self.assertEqual(c.lb(), 0)
+ self.assertEqual(c.lb, 0)
self.assertEqual(c.body(), 1)
- self.assertEqual(c.ub(), 0)
+ self.assertEqual(c.ub, 0)
# ensure the variable is not moved into the upper or
# lower bound expression (this used to be a bug)
@@ -530,16 +533,16 @@ def test_fixed_variable_stays_in_body(self):
c.expr = (0 == x)
x.fix()
self.assertEqual(c.equality, True)
- self.assertEqual(c.lb(), 0)
+ self.assertEqual(c.lb, 0)
self.assertEqual(c.body(), 1)
- self.assertEqual(c.ub(), 0)
+ self.assertEqual(c.ub, 0)
x.free()
c.expr = (x == 0)
x.fix()
self.assertEqual(c.equality, True)
- self.assertEqual(c.lb(), 0)
+ self.assertEqual(c.lb, 0)
self.assertEqual(c.body(), 1)
- self.assertEqual(c.ub(), 0)
+ self.assertEqual(c.ub, 0)
def test_data_bounds(self):
c = constraint()
@@ -547,7 +550,7 @@ def test_data_bounds(self):
pL = parameter()
pU = parameter()
- c.expr = (pL <= e <= pU)
+ c.expr = (pL, e, pU)
self.assertIs(c.body, e)
self.assertIs(c.lb, pL)
self.assertIs(c.ub, pU)
@@ -555,7 +558,7 @@ def test_data_bounds(self):
self.assertIs(c.body, e)
self.assertIs(c.lb, pL)
self.assertIs(c.ub, pU)
- c.expr = (pL <= e <= pU)
+ c.expr = (pL, e, pU)
self.assertIs(c.body, e)
self.assertIs(c.lb, pL)
self.assertIs(c.ub, pU)
@@ -563,7 +566,7 @@ def test_data_bounds(self):
e.expr = 1.0
eL = data_expression()
eU = data_expression()
- c.expr = (eL <= e <= eU)
+ c.expr = (eL, e, eU)
self.assertIs(c.body, e)
self.assertIs(c.lb, eL)
self.assertIs(c.ub, eU)
@@ -571,7 +574,7 @@ def test_data_bounds(self):
self.assertIs(c.body, e)
self.assertIs(c.lb, eL)
self.assertIs(c.ub, eU)
- c.expr = (eL <= e <= eU)
+ c.expr = (eL, e, eU)
self.assertIs(c.body, e)
self.assertIs(c.lb, eL)
self.assertIs(c.ub, eU)
@@ -600,7 +603,7 @@ def test_mutable_novalue_param_lower_bound(self):
c = constraint(expr=(p + 1)**2 <= x)
self.assertEqual(c.equality, False)
- c = constraint(expr=p <= x <= p + 1)
+ c = constraint(expr=(p, x, p + 1))
self.assertEqual(c.equality, False)
c = constraint(expr=x - p >= 0)
@@ -619,9 +622,6 @@ def test_mutable_novalue_param_lower_bound(self):
c = constraint(expr=x >= (p + 1)**2)
self.assertEqual(c.equality, False)
- c = constraint(expr=p + 1 >= x >= p)
- self.assertEqual(c.equality, False)
-
c = constraint(expr=(p, x, None))
self.assertTrue(c.lb is p)
self.assertEqual(c.equality, False)
@@ -659,7 +659,7 @@ def test_mutable_novalue_param_upper_bound(self):
c = constraint(expr=x <= (p + 1)**2)
self.assertEqual(c.equality, False)
- c = constraint(expr=p + 1 <= x <= p)
+ c = constraint(expr=(p + 1, x, p))
self.assertEqual(c.equality, False)
c = constraint(expr=0 >= x - p)
@@ -678,9 +678,6 @@ def test_mutable_novalue_param_upper_bound(self):
c = constraint(expr=(p + 1)**2 >= x)
self.assertEqual(c.equality, False)
- c = constraint(expr=p >= x >= p + 1)
- self.assertEqual(c.equality, False)
-
c = constraint(expr=(None, x, p))
self.assertTrue(c.ub is p)
self.assertEqual(c.equality, False)
@@ -718,20 +715,32 @@ def test_mutable_novalue_param_equality(self):
c = constraint(expr=x == p + 1)
self.assertEqual(c.equality, True)
- c = constraint(expr=p <= x <= p)
- self.assertTrue(c.ub is p)
- # GH: Not sure if we are supposed to detect equality
- # in this situation. I would rather us not, for
- # the sake of making the code less complicated.
- # Either way, I am not going to test for it here.
- #self.assertEqual(c.equality, )
-
c = constraint(expr=(x, p))
self.assertTrue(c.ub is p)
+ self.assertTrue(c.lb is p)
+ self.assertTrue(c.rhs is p)
+ self.assertIs(c.body, x)
self.assertEqual(c.equality, True)
c = constraint(expr=(p, x))
self.assertTrue(c.ub is p)
+ self.assertTrue(c.lb is p)
+ self.assertTrue(c.rhs is p)
+ self.assertIs(c.body, x)
+ self.assertEqual(c.equality, True)
+
+ c = constraint(expr=EXPR.EqualityExpression((p, x)))
+ self.assertTrue(c.ub is p)
+ self.assertTrue(c.lb is p)
+ self.assertTrue(c.rhs is p)
+ self.assertIs(c.body, x)
+ self.assertEqual(c.equality, True)
+
+ c = constraint(expr=EXPR.EqualityExpression((x, p)))
+ self.assertTrue(c.ub is p)
+ self.assertTrue(c.lb is p)
+ self.assertTrue(c.rhs is p)
+ self.assertIs(c.body, x)
self.assertEqual(c.equality, True)
def test_tuple_construct_equality(self):
@@ -750,11 +759,18 @@ def test_tuple_construct_equality(self):
def test_tuple_construct_inf_equality(self):
x = variable()
- with self.assertRaises(ValueError):
- constraint((x, float('inf')))
-
- with self.assertRaises(ValueError):
- constraint((float('inf'), x))
+ c = constraint((x, float('inf')))
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, float('inf'))
+ self.assertEqual(c.ub, float('inf'))
+ self.assertEqual(c.rhs, float('inf'))
+ self.assertIs(c.body, x)
+ c = constraint((float('inf'), x))
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, float('inf'))
+ self.assertEqual(c.ub, float('inf'))
+ self.assertEqual(c.rhs, float('inf'))
+ self.assertIs(c.body, x)
def test_tuple_construct_1sided_inequality(self):
y = variable()
@@ -762,11 +778,11 @@ def test_tuple_construct_1sided_inequality(self):
self.assertEqual(c.equality, False)
self.assertIs(c.lb, None)
self.assertIs(c.body, y)
- self.assertEqual(c.ub(), 1)
+ self.assertEqual(c.ub, 1)
c = constraint((0, y, None))
self.assertEqual(c.equality, False)
- self.assertEqual(c.lb(), 0)
+ self.assertEqual(c.lb, 0)
self.assertIs (c.body, y)
self.assertIs(c.ub, None)
@@ -774,15 +790,15 @@ def test_tuple_construct_1sided_inf_inequality(self):
y = variable()
c = constraint((float('-inf'), y, 1))
self.assertEqual(c.equality, False)
- self.assertIs(c.lb, None)
+ self.assertEqual(c.lb, float('-inf'))
self.assertIs(c.body, y)
- self.assertEqual(c.ub(), 1)
+ self.assertEqual(c.ub, 1)
c = constraint((0, y, float('inf')))
self.assertEqual(c.equality, False)
- self.assertEqual(c.lb(), 0)
+ self.assertEqual(c.lb, 0)
self.assertIs(c.body, y)
- self.assertIs(c.ub, None)
+ self.assertEqual(c.ub, float('inf'))
def test_tuple_construct_unbounded_inequality(self):
y = variable()
@@ -794,9 +810,9 @@ def test_tuple_construct_unbounded_inequality(self):
c = constraint((float('-inf'), y, float('inf')))
self.assertEqual(c.equality, False)
- self.assertIs(c.lb, None)
+ self.assertEqual(c.lb, float('-inf'))
self.assertIs(c.body, y)
- self.assertIs(c.ub, None)
+ self.assertEqual(c.ub, float('inf'))
def test_tuple_construct_invalid_1sided_inequality(self):
x = variable()
@@ -812,11 +828,11 @@ def test_tuple_construct_2sided_inequality(self):
y = variable()
c = constraint((0, y, 1))
self.assertEqual(c.equality, False)
- self.assertEqual(c.lb(), 0)
+ self.assertEqual(c.lb, 0)
self.assertIs(c.body, y)
- self.assertEqual(c.ub(), 1)
+ self.assertEqual(c.ub, 1)
- def test_tuple_construct_invalid_2sided_inequality(self):
+ def test_construct_invalid_2sided_inequality(self):
x = variable()
y = variable()
z = variable()
@@ -826,6 +842,16 @@ def test_tuple_construct_invalid_2sided_inequality(self):
with self.assertRaises(ValueError):
constraint((0, y, z))
+ def test_tuple_construct_invalid_2sided_inequality(self):
+ x = variable()
+ y = variable()
+ z = variable()
+ with self.assertRaises(ValueError):
+ constraint(EXPR.RangedExpression((x,y,1),(False,False)))
+
+ with self.assertRaises(ValueError):
+ constraint(EXPR.RangedExpression((0,y,z),(False,False)))
+
def test_expr_construct_equality(self):
x = variable(value=1)
y = variable(value=1)
@@ -850,10 +876,18 @@ def test_expr_construct_equality(self):
self.assertEqual(c.ub(), 0)
c = constraint()
- with self.assertRaises(ValueError):
- c.expr = (x == float('inf'))
- with self.assertRaises(ValueError):
- c.expr = (float('inf') == x)
+ c.expr = (x == float('inf'))
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, float('inf'))
+ self.assertEqual(c.ub, float('inf'))
+ self.assertEqual(c.rhs, float('inf'))
+ self.assertIs(c.body, x)
+ c.expr = (float('inf') == x)
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, float('inf'))
+ self.assertEqual(c.ub, float('inf'))
+ self.assertEqual(c.rhs, float('inf'))
+ self.assertIs(c.body, x)
def test_strict_inequality_failure(self):
x = variable()
@@ -861,20 +895,50 @@ def test_strict_inequality_failure(self):
c = constraint()
with self.assertRaises(ValueError):
c.expr = (x < 0)
+ with self.assertRaises(ValueError):
+ c.expr = EXPR.inequality(body=x,upper=0,strict=True)
+ c.expr = (x <= 0)
+ c.expr = EXPR.inequality(body=x,upper=0,strict=False)
with self.assertRaises(ValueError):
c.expr = (x > 0)
+ with self.assertRaises(ValueError):
+ c.expr = EXPR.inequality(body=x,lower=0,strict=True)
+ c.expr = (x >= 0)
+ c.expr = EXPR.inequality(body=x,lower=0,strict=False)
with self.assertRaises(ValueError):
c.expr = (x < y)
+ with self.assertRaises(ValueError):
+ c.expr = EXPR.inequality(body=x,upper=y,strict=True)
+ c.expr = (x <= y)
+ c.expr = EXPR.inequality(body=x,upper=y,strict=False)
with self.assertRaises(ValueError):
c.expr = (x > y)
+ with self.assertRaises(ValueError):
+ c.expr = EXPR.inequality(body=x,lower=y,strict=True)
+ c.expr = (x >= y)
+ c.expr = EXPR.inequality(body=x,lower=y,strict=False)
+ with self.assertRaises(ValueError):
+ c.expr = EXPR.RangedExpression((0,x,1),(True,True))
+ with self.assertRaises(ValueError):
+ c.expr = EXPR.RangedExpression((0,x,1),(False,True))
+ with self.assertRaises(ValueError):
+ c.expr = EXPR.RangedExpression((0,x,1),(True,False))
+ c.expr = EXPR.RangedExpression((0,x,1),(False,False))
def test_expr_construct_inf_equality(self):
x = variable()
- with self.assertRaises(ValueError):
- constraint(x == float('inf'))
-
- with self.assertRaises(ValueError):
- constraint(float('inf') == x)
+ c = constraint(x == float('inf'))
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, float('inf'))
+ self.assertEqual(c.ub, float('inf'))
+ self.assertEqual(c.rhs, float('inf'))
+ self.assertIs(c.body, x)
+ c = constraint(float('inf') == x)
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, float('inf'))
+ self.assertEqual(c.ub, float('inf'))
+ self.assertEqual(c.rhs, float('inf'))
+ self.assertIs(c.body, x)
def test_expr_construct_1sided_inequality(self):
y = variable()
@@ -908,17 +972,17 @@ def test_expr_construct_unbounded_inequality(self):
self.assertEqual(c.equality, False)
self.assertIs(c.lb, None)
self.assertIs(c.body, y)
- self.assertIs(c.ub, None)
+ self.assertEqual(c.ub, float('inf'))
c = constraint(float('-inf') <= y)
self.assertEqual(c.equality, False)
- self.assertIs(c.lb, None)
+ self.assertEqual(c.lb, float('-inf'))
self.assertIs(c.body, y)
self.assertIs(c.ub, None)
c = constraint(y >= float('-inf'))
self.assertEqual(c.equality, False)
- self.assertIs(c.lb, None)
+ self.assertEqual(c.lb, float('-inf'))
self.assertIs(c.body, y)
self.assertIs(c.ub, None)
@@ -926,68 +990,114 @@ def test_expr_construct_unbounded_inequality(self):
self.assertEqual(c.equality, False)
self.assertIs(c.lb, None)
self.assertIs(c.body, y)
- self.assertIs(c.ub, None)
+ self.assertEqual(c.ub, float('inf'))
- def test_expr_construct_invalid_unbounded_inequality(self):
+ def test_expr_construct_unbounded_inequality(self):
y = variable()
- with self.assertRaises(ValueError):
- constraint(y <= float('-inf'))
-
- with self.assertRaises(ValueError):
- constraint(float('inf') <= y)
-
- with self.assertRaises(ValueError):
- constraint(y >= float('inf'))
-
- with self.assertRaises(ValueError):
- constraint(float('-inf') >= y)
+ c = constraint(y <= float('-inf'))
+ self.assertEqual(c.equality, False)
+ self.assertIs(c.lb, None)
+ self.assertEqual(c.ub, float('-inf'))
+ self.assertIs(c.body, y)
+ c = constraint(float('inf') <= y)
+ self.assertEqual(c.equality, False)
+ self.assertEqual(c.lb, float('inf'))
+ self.assertIs(c.ub, None)
+ self.assertIs(c.body, y)
+ c = constraint(y >= float('inf'))
+ self.assertEqual(c.equality, False)
+ self.assertEqual(c.lb, float('inf'))
+ self.assertIs(c.ub, None)
+ self.assertIs(c.body, y)
+ c = constraint(float('-inf') >= y)
+ self.assertEqual(c.equality, False)
+ self.assertIs(c.lb, None)
+ self.assertEqual(c.ub, float('-inf'))
+ self.assertIs(c.body, y)
def test_expr_invalid_double_sided_inequality(self):
x = variable()
y = variable()
c = constraint()
- c.expr = (0 <= x - y <= 1)
- self.assertEqual(c.lb(), 0)
- self.assertEqual(c.ub(), 1)
+ c.expr = (0, x - y, 1)
+ self.assertEqual(c.lb, 0)
+ self.assertEqual(c.ub, 1)
self.assertEqual(c.equality, False)
with self.assertRaises(ValueError):
- c.expr = (x <= x - y <= 1)
- self.assertEqual(c.lb(), 0)
- self.assertEqual(c.ub(), 1)
+ c.expr = (x, x - y, 1)
+ self.assertEqual(c.lb, 0)
+ self.assertEqual(c.ub, 1)
self.assertEqual(c.equality, False)
with self.assertRaises(ValueError):
- c.expr = (0 <= x - y <= y)
- self.assertEqual(c.lb(), 0)
- self.assertEqual(c.ub(), 1)
+ c.expr = (0, x - y, y)
+ self.assertEqual(c.lb, 0)
+ self.assertEqual(c.ub, 1)
self.assertEqual(c.equality, False)
with self.assertRaises(ValueError):
- c.expr = (x >= x - y >= 1)
- self.assertEqual(c.lb(), 0)
- self.assertEqual(c.ub(), 1)
+ c.expr = (1, x - y, x)
+ self.assertEqual(c.lb, 0)
+ self.assertEqual(c.ub, 1)
self.assertEqual(c.equality, False)
with self.assertRaises(ValueError):
- c.expr = (0 >= x - y >= y)
+ c.expr = (y, x-y, 0)
def test_equality_infinite(self):
c = constraint()
v = variable()
c.expr = (v == 1)
- with self.assertRaises(ValueError):
- c.expr = (v == float('inf'))
- with self.assertRaises(ValueError):
- c.expr = (v, float('inf'))
- with self.assertRaises(ValueError):
- c.expr = (float('inf') == v)
- with self.assertRaises(ValueError):
- c.expr = (float('inf'), v)
- with self.assertRaises(ValueError):
- c.expr = (v == float('-inf'))
- with self.assertRaises(ValueError):
- c.expr = (v, float('-inf'))
- with self.assertRaises(ValueError):
- c.expr = (float('-inf') == v)
- with self.assertRaises(ValueError):
- c.expr = (float('-inf'), v)
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, 1)
+ self.assertEqual(c.ub, 1)
+ self.assertEqual(c.rhs, 1)
+ self.assertIs(c.body, v)
+ c.expr = (v == float('inf'))
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, float('inf'))
+ self.assertEqual(c.ub, float('inf'))
+ self.assertEqual(c.rhs, float('inf'))
+ self.assertIs(c.body, v)
+ c.expr = (v, float('inf'))
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, float('inf'))
+ self.assertEqual(c.ub, float('inf'))
+ self.assertEqual(c.rhs, float('inf'))
+ self.assertIs(c.body, v)
+ c.expr = (float('inf') == v)
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, float('inf'))
+ self.assertEqual(c.ub, float('inf'))
+ self.assertEqual(c.rhs, float('inf'))
+ self.assertIs(c.body, v)
+ c.expr = (float('inf'), v)
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, float('inf'))
+ self.assertEqual(c.ub, float('inf'))
+ self.assertEqual(c.rhs, float('inf'))
+ self.assertIs(c.body, v)
+ c.expr = (v == float('-inf'))
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, float('-inf'))
+ self.assertEqual(c.ub, float('-inf'))
+ self.assertEqual(c.rhs, float('-inf'))
+ self.assertIs(c.body, v)
+ c.expr = (v, float('-inf'))
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, float('-inf'))
+ self.assertEqual(c.ub, float('-inf'))
+ self.assertEqual(c.rhs, float('-inf'))
+ self.assertIs(c.body, v)
+ c.expr = (float('-inf') == v)
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, float('-inf'))
+ self.assertEqual(c.ub, float('-inf'))
+ self.assertEqual(c.rhs, float('-inf'))
+ self.assertIs(c.body, v)
+ c.expr = (float('-inf'), v)
+ self.assertEqual(c.equality, True)
+ self.assertEqual(c.lb, float('-inf'))
+ self.assertEqual(c.ub, float('-inf'))
+ self.assertEqual(c.rhs, float('-inf'))
+ self.assertIs(c.body, v)
def test_equality_nonnumeric(self):
c = constraint()
@@ -1286,18 +1396,18 @@ def test_expr(self):
x = variable(value=1.0)
c = constraint()
- c.expr = (2 >= x >= 0)
+ c.expr = (0, x, 2)
self.assertEqual(c(), 1)
self.assertEqual(c.body(), 1)
- self.assertEqual(c.lb(), 0)
- self.assertEqual(c.ub(), 2)
+ self.assertEqual(c.lb, 0)
+ self.assertEqual(c.ub, 2)
self.assertEqual(c.equality, False)
- c.expr = (0 >= x >= -2)
+ c.expr = (-2, x, 0)
self.assertEqual(c(), 1)
self.assertEqual(c.body(), 1)
- self.assertEqual(c.lb(), -2)
- self.assertEqual(c.ub(), 0)
+ self.assertEqual(c.lb, -2)
+ self.assertEqual(c.ub, 0)
self.assertEqual(c.equality, False)
def test_expr_getter(self):
@@ -1320,11 +1430,11 @@ def test_expr_getter(self):
self.assertEqual(c.ub(), 1)
self.assertEqual(c.equality, False)
- c.expr = 0 <= v <= 1
+ c.expr = (0, v, 1)
self.assertIsNot(c.expr, None)
- self.assertEqual(c.lb(), 0)
+ self.assertEqual(c.lb, 0)
self.assertIs(c.body, v)
- self.assertEqual(c.ub(), 1)
+ self.assertEqual(c.ub, 1)
self.assertEqual(c.equality, False)
c.expr = v == 1
@@ -1348,6 +1458,7 @@ def test_expr_wrong_type(self):
with self.assertRaises(ValueError):
c.expr = (True)
+ @unittest.skipIf(not EXPR._using_chained_inequality, "Chained inequalities are not supported.")
def test_chainedInequalityError(self):
x = variable()
c = constraint()
@@ -1731,9 +1842,9 @@ def test_fixed_variable_stays_in_body(self):
self.assertEqual(c(), 0.5)
self.assertEqual(c.ub, 1)
repn = c.canonical_form()
- self.assertEqual(len(repn.variables), 1)
- self.assertIs(repn.variables[0], x)
- self.assertEqual(repn.linear, (1,))
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertIs(repn.linear_vars[0], x)
+ self.assertEqual(repn.linear_coefs, (1,))
self.assertEqual(repn.constant, 0)
x.value = 2
self.assertEqual(c.lb, 0)
@@ -1741,9 +1852,9 @@ def test_fixed_variable_stays_in_body(self):
self.assertEqual(c(), 2)
self.assertEqual(c.ub, 1)
repn = c.canonical_form()
- self.assertEqual(len(repn.variables), 1)
- self.assertIs(repn.variables[0], x)
- self.assertEqual(repn.linear, (1,))
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertIs(repn.linear_vars[0], x)
+ self.assertEqual(repn.linear_coefs, (1,))
self.assertEqual(repn.constant, 0)
x.fix(0.5)
@@ -1753,8 +1864,8 @@ def test_fixed_variable_stays_in_body(self):
self.assertEqual(c(), 1)
self.assertEqual(c.ub, 1)
repn = c.canonical_form()
- self.assertEqual(repn.variables, ())
- self.assertEqual(repn.linear, ())
+ self.assertEqual(repn.linear_vars, ())
+ self.assertEqual(repn.linear_coefs, ())
self.assertEqual(repn.constant, 1)
x.value = 2
self.assertEqual(c.lb, 0)
@@ -1762,8 +1873,8 @@ def test_fixed_variable_stays_in_body(self):
self.assertEqual(c(), 4)
self.assertEqual(c.ub, 1)
repn = c.canonical_form()
- self.assertEqual(repn.variables, ())
- self.assertEqual(repn.linear, ())
+ self.assertEqual(repn.linear_vars, ())
+ self.assertEqual(repn.linear_coefs, ())
self.assertEqual(repn.constant, 4)
x.free()
@@ -1775,9 +1886,9 @@ def test_fixed_variable_stays_in_body(self):
self.assertEqual(c(), 1)
self.assertEqual(c.ub, 0)
repn = c.canonical_form()
- self.assertEqual(len(repn.variables), 1)
- self.assertIs(repn.variables[0], x)
- self.assertEqual(repn.linear, (1,))
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertIs(repn.linear_vars[0], x)
+ self.assertEqual(repn.linear_coefs, (1,))
self.assertEqual(repn.constant, 0)
x.fix()
@@ -1788,8 +1899,8 @@ def test_fixed_variable_stays_in_body(self):
self.assertEqual(c(), 1)
self.assertEqual(c.ub, 0)
repn = c.canonical_form()
- self.assertEqual(repn.variables, ())
- self.assertEqual(repn.linear, ())
+ self.assertEqual(repn.linear_vars, ())
+ self.assertEqual(repn.linear_coefs, ())
self.assertEqual(repn.constant, 1)
x.free()
@@ -1801,8 +1912,8 @@ def test_fixed_variable_stays_in_body(self):
self.assertEqual(c(), 1)
self.assertEqual(c.ub, 0)
repn = c.canonical_form()
- self.assertEqual(repn.variables, ())
- self.assertEqual(repn.linear, ())
+ self.assertEqual(repn.linear_vars, ())
+ self.assertEqual(repn.linear_coefs, ())
self.assertEqual(repn.constant, 1)
def test_data_bounds(self):
@@ -1834,17 +1945,17 @@ def test_call(self):
c(exception=True)
self.assertEqual(c(exception=False), None)
repn = c.canonical_form()
- self.assertEqual(len(repn.variables), 1)
- self.assertIs(repn.variables[0], v)
- self.assertEqual(repn.linear, (2,))
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertIs(repn.linear_vars[0], v)
+ self.assertEqual(repn.linear_coefs, (2,))
self.assertEqual(repn.constant, 0)
v.value = 2
self.assertEqual(c(), 4)
repn = c.canonical_form()
- self.assertEqual(len(repn.variables), 1)
- self.assertIs(repn.variables[0], v)
- self.assertEqual(repn.linear, (2,))
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertIs(repn.linear_vars[0], v)
+ self.assertEqual(repn.linear_coefs, (2,))
self.assertEqual(repn.constant, 0)
v.value = None
@@ -1856,17 +1967,17 @@ def test_call(self):
c(exception=True)
self.assertEqual(c(exception=False), None)
repn = c.canonical_form()
- self.assertEqual(len(repn.variables), 1)
- self.assertIs(repn.variables[0], v)
- self.assertEqual(repn.linear, (1,))
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertIs(repn.linear_vars[0], v)
+ self.assertEqual(repn.linear_coefs, (1,))
self.assertEqual(repn.constant, 0)
v.value = 2
self.assertEqual(c(), 2)
repn = c.canonical_form()
- self.assertEqual(len(repn.variables), 1)
- self.assertIs(repn.variables[0], v)
- self.assertEqual(repn.linear, (1,))
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertIs(repn.linear_vars[0], v)
+ self.assertEqual(repn.linear_coefs, (1,))
self.assertEqual(repn.constant, 0)
def test_canonical_form(self):
@@ -1882,30 +1993,30 @@ def test_canonical_form(self):
c.terms = [(v,p)]
repn = c.canonical_form()
- self.assertEqual(len(repn.variables), 1)
- self.assertIs(repn.variables[0], v)
- self.assertEqual(repn.linear, (1,))
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertIs(repn.linear_vars[0], v)
+ self.assertEqual(repn.linear_coefs, (1,))
self.assertEqual(repn.constant, 0)
v.fix(2)
repn = c.canonical_form()
- self.assertEqual(len(repn.variables), 0)
- self.assertEqual(len(repn.linear), 0)
+ self.assertEqual(len(repn.linear_vars), 0)
+ self.assertEqual(len(repn.linear_coefs), 0)
self.assertEqual(repn.constant, 2)
v.free()
e.expr = v
c.terms = [(e,p)]
repn = c.canonical_form()
- self.assertEqual(len(repn.variables), 1)
- self.assertIs(repn.variables[0], v)
- self.assertEqual(repn.linear, (1,))
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertIs(repn.linear_vars[0], v)
+ self.assertEqual(repn.linear_coefs, (1,))
self.assertEqual(repn.constant, 0)
v.fix(2)
repn = c.canonical_form()
- self.assertEqual(len(repn.variables), 0)
- self.assertEqual(len(repn.linear), 0)
+ self.assertEqual(len(repn.linear_vars), 0)
+ self.assertEqual(len(repn.linear_coefs), 0)
self.assertEqual(repn.constant, 2)
#
@@ -1915,34 +2026,34 @@ def test_canonical_form(self):
v.free()
c.terms = [(v,p)]
repn = c.canonical_form(compute_values=False)
- self.assertEqual(len(repn.variables), 1)
- self.assertIs(repn.variables[0], v)
- self.assertEqual(len(repn.linear), 1)
- self.assertIs(repn.linear[0], p)
- self.assertEqual(repn.linear[0](), 1)
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertIs(repn.linear_vars[0], v)
+ self.assertEqual(len(repn.linear_coefs), 1)
+ self.assertIs(repn.linear_coefs[0], p)
+ self.assertEqual(repn.linear_coefs[0](), 1)
self.assertEqual(repn.constant, 0)
v.fix(2)
repn = c.canonical_form(compute_values=False)
- self.assertEqual(len(repn.variables), 0)
- self.assertEqual(len(repn.linear), 0)
+ self.assertEqual(len(repn.linear_vars), 0)
+ self.assertEqual(len(repn.linear_coefs), 0)
self.assertEqual(repn.constant(), 2)
v.free()
e.expr = v
c.terms = [(e,p)]
repn = c.canonical_form(compute_values=False)
- self.assertEqual(len(repn.variables), 1)
- self.assertIs(repn.variables[0], v)
- self.assertEqual(len(repn.linear), 1)
- self.assertIs(repn.linear[0], p)
- self.assertEqual(repn.linear[0](), 1)
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertIs(repn.linear_vars[0], v)
+ self.assertEqual(len(repn.linear_coefs), 1)
+ self.assertIs(repn.linear_coefs[0], p)
+ self.assertEqual(repn.linear_coefs[0](), 1)
self.assertEqual(repn.constant, 0)
v.fix(2)
repn = c.canonical_form(compute_values=False)
- self.assertEqual(len(repn.variables), 0)
- self.assertEqual(len(repn.linear), 0)
+ self.assertEqual(len(repn.linear_vars), 0)
+ self.assertEqual(len(repn.linear_coefs), 0)
self.assertEqual(repn.constant(), 2)
class Test_constraint_dict(_TestActiveComponentDictBase,
diff --git a/pyomo/core/tests/unit/test_component_expression.py b/pyomo/core/tests/unit/test_component_expression.py
index 8445760814c..1f454df4019 100644
--- a/pyomo/core/tests/unit/test_component_expression.py
+++ b/pyomo/core/tests/unit/test_component_expression.py
@@ -1,6 +1,11 @@
import pickle
import pyutilib.th as unittest
+from pyomo.core.expr.numvalue import (NumericValue,
+ is_fixed,
+ is_constant,
+ potentially_variable,
+ value)
import pyomo.kernel
from pyomo.core.tests.unit.test_component_dict import \
_TestComponentDictBase
@@ -20,11 +25,6 @@
expression_dict,
expression_tuple,
expression_list)
-from pyomo.core.kernel.numvalue import (NumericValue,
- is_fixed,
- is_constant,
- potentially_variable,
- value)
from pyomo.core.kernel.component_variable import variable
from pyomo.core.kernel.component_parameter import parameter
from pyomo.core.kernel.component_objective import objective
@@ -44,6 +44,18 @@
class Test_noclone(unittest.TestCase):
+ def test_is_named_expression_type(self):
+ e = expression()
+ self.assertEqual(e.is_named_expression_type(), True)
+
+ def test_arg(self):
+ e = expression()
+ self.assertEqual(e.arg(0), None)
+ e.expr = 1
+ self.assertEqual(e.arg(0), 1)
+ with self.assertRaises(KeyError):
+ e.arg(1)
+
def test_init_non_NumericValue(self):
types = [None, 1, 1.1, True, ""]
if numpy_available:
@@ -164,18 +176,18 @@ def test_is_fixed(self):
self.assertEqual(e.is_fixed(), True)
self.assertEqual(is_fixed(e), True)
- def test_potentially_variable(self):
+ def testis_potentially_variable(self):
e = noclone(variable())
- self.assertEqual(e._potentially_variable(), True)
+ self.assertEqual(e.is_potentially_variable(), True)
self.assertEqual(potentially_variable(e), True)
e = noclone(parameter())
- self.assertEqual(e._potentially_variable(), False)
+ self.assertEqual(e.is_potentially_variable(), False)
self.assertEqual(potentially_variable(e), False)
e = noclone(expression())
- self.assertEqual(e._potentially_variable(), True)
+ self.assertEqual(e.is_potentially_variable(), True)
self.assertEqual(potentially_variable(e), True)
e = noclone(data_expression())
- self.assertEqual(e._potentially_variable(), False)
+ self.assertEqual(e.is_potentially_variable(), False)
self.assertEqual(potentially_variable(e), False)
def test_polynomial_degree(self):
@@ -196,20 +208,20 @@ def test_polynomial_degree(self):
v.free()
self.assertEqual(e.polynomial_degree(), None)
- def test_is_expression(self):
+ def test_is_expression_type(self):
for obj in (variable(), parameter(), objective(),
expression(), data_expression()):
- self.assertEqual(noclone(obj).is_expression(), True)
+ self.assertEqual(noclone(obj).is_expression_type(), True)
def test_args(self):
e = noclone(parameter() + 1)
- self.assertEqual(len(e._args), 1)
- self.assertTrue(e._args[0] is e.expr)
+ self.assertEqual(e.nargs(), 1)
+ self.assertTrue(e.arg(0) is e.expr)
def test_aruments(self):
e = noclone(parameter() + 1)
- self.assertEqual(len(tuple(e._arguments())), 1)
- self.assertTrue(tuple(e._arguments())[0] is e.expr)
+ self.assertEqual(len(tuple(e.args)), 1)
+ self.assertTrue(tuple(e.args)[0] is e.expr)
def test_clone(self):
@@ -240,35 +252,19 @@ def test_to_string(self):
b = block()
p = parameter()
e = noclone(p**2)
- self.assertEqual(str(e.expr), "**2.0")
- self.assertEqual(str(e), "{**2.0}")
- e.to_string()
- out = StringIO()
- e.to_string(ostream=out)
- self.assertEqual(out.getvalue(), "**2.0")
- e.to_string(verbose=False)
- out = StringIO()
- e.to_string(ostream=out, verbose=False)
- self.assertEqual(out.getvalue(), "**2.0")
- e.to_string(verbose=True)
- out = StringIO()
- e.to_string(ostream=out, verbose=True)
- self.assertEqual(out.getvalue(),
- "{pow( , 2.0 )}")
+ self.assertEqual(str(e.expr), "**2")
+ self.assertEqual(str(e), "{(**2)}")
+ self.assertEqual(e.to_string(), "(**2)")
+ self.assertEqual(e.to_string(verbose=False), "(**2)")
+ self.assertEqual(e.to_string(verbose=True), "{pow(, 2)}")
b.e = e
b.p = p
self.assertNotEqual(p.name, None)
- e.to_string(verbose=True)
- out = StringIO()
- e.to_string(ostream=out, verbose=True)
- self.assertEqual(out.getvalue(),
- "{pow( "+p.name+" , 2.0 )}")
- self.assertEqual(out.getvalue(),
- "{pow( p , 2.0 )}")
+ self.assertEqual(e.to_string(verbose=True), "{pow("+p.name+", 2)}")
+ self.assertEqual(e.to_string(verbose=True), "{pow(p, 2)}")
del b.e
del b.p
-
class _Test_expression_base(object):
_ctype_factory = None
@@ -355,23 +351,23 @@ def test_is_constant(self):
self.assertEqual(e.is_constant(), False)
self.assertEqual(is_constant(e), False)
- def test_is_expression(self):
+ def test_is_expression_type(self):
e = self._ctype_factory()
- self.assertEqual(e.is_expression(), True)
+ self.assertEqual(e.is_expression_type(), True)
def test_args(self):
e = self._ctype_factory()
p = parameter()
e.expr = p + 1
- self.assertEqual(len(e._args), 1)
- self.assertTrue(e._args[0] is e.expr)
+ self.assertEqual(e.nargs(), 1)
+ self.assertTrue(e.arg(0) is e.expr)
def test_aruments(self):
e = self._ctype_factory()
p = parameter()
e.expr = p + 1
- self.assertEqual(len(tuple(e._arguments())), 1)
- self.assertTrue(tuple(e._arguments())[0] is e.expr)
+ self.assertEqual(len(tuple(e.args)), 1)
+ self.assertTrue(tuple(e.args)[0] is e.expr)
def test_clone(self):
e = self._ctype_factory()
@@ -409,83 +405,138 @@ def test_to_string(self):
self.assertEqual(str(e.expr), "None")
self.assertEqual(str(e), label)
- e.to_string()
- out = StringIO()
- e.to_string(ostream=out)
- self.assertEqual(out.getvalue(), "Undefined")
- e.to_string(verbose=False)
- out = StringIO()
- e.to_string(ostream=out, verbose=False)
- self.assertEqual(out.getvalue(), "Undefined")
- e.to_string(verbose=True)
- out = StringIO()
- e.to_string(ostream=out, verbose=True)
- self.assertEqual(out.getvalue(), label+"{Undefined}")
+ self.assertEqual(e.to_string(), label+"{Undefined}")
+ self.assertEqual(e.to_string(verbose=False), label+"{Undefined}")
+ self.assertEqual(e.to_string(verbose=True), label+"{Undefined}")
b.e = e
self.assertNotEqual(e.name, None)
- e.to_string(verbose=True)
- out = StringIO()
- e.to_string(ostream=out, verbose=True)
- self.assertEqual(out.getvalue(), "e{Undefined}")
+ self.assertEqual(e.to_string(verbose=True), "e{Undefined}")
del b.e
self.assertEqual(e.name, None)
e.expr = 1
self.assertEqual(str(e.expr), "1")
self.assertEqual(str(e), label)
- e.to_string()
- out = StringIO()
- e.to_string(ostream=out)
- self.assertEqual(out.getvalue(), "1.0")
- e.to_string(verbose=False)
- out = StringIO()
- e.to_string(ostream=out, verbose=False)
- self.assertEqual(out.getvalue(), "1.0")
- e.to_string(verbose=True)
- out = StringIO()
- e.to_string(ostream=out, verbose=True)
- self.assertEqual(out.getvalue(), label+"{1.0}")
+ self.assertEqual(e.to_string(), "1")
+ self.assertEqual(e.to_string(verbose=False), "1")
+ self.assertEqual(e.to_string(verbose=True), label+"{1}")
b.e = e
self.assertNotEqual(e.name, None)
- e.to_string(verbose=True)
- out = StringIO()
- e.to_string(ostream=out, verbose=True)
- self.assertEqual(out.getvalue(), "e{1.0}")
+ self.assertEqual(e.to_string(verbose=True), "e{1}")
del b.e
self.assertEqual(e.name, None)
p = parameter()
e.expr = p**2
- self.assertEqual(str(e.expr), "**2.0")
+ self.assertEqual(str(e.expr), "**2")
self.assertEqual(str(e), label)
- e.to_string()
- out = StringIO()
- e.to_string(ostream=out)
- self.assertEqual(out.getvalue(), "**2.0")
- e.to_string(verbose=False)
- out = StringIO()
- e.to_string(ostream=out, verbose=False)
- self.assertEqual(out.getvalue(), "**2.0")
- e.to_string(verbose=True)
- out = StringIO()
- e.to_string(ostream=out, verbose=True)
- self.assertEqual(out.getvalue(),
- label+"{pow( , 2.0 )}")
+ self.assertEqual(e.to_string(), "(**2)")
+ self.assertEqual(e.to_string(verbose=False), "(**2)")
+ self.assertEqual(e.to_string(verbose=True), label+"{pow(, 2)}")
b.e = e
b.p = p
self.assertNotEqual(e.name, None)
self.assertNotEqual(p.name, None)
- e.to_string(verbose=True)
- out = StringIO()
- e.to_string(ostream=out, verbose=True)
- self.assertEqual(out.getvalue(),
- e.name+"{pow( "+p.name+" , 2.0 )}")
- self.assertEqual(out.getvalue(),
- "e{pow( p , 2.0 )}")
+ self.assertEqual(e.to_string(verbose=True), e.name+"{pow("+p.name+", 2)}")
+ self.assertEqual(e.to_string(verbose=True), "e{pow(p, 2)}")
del b.e
del b.p
+ def test_iadd(self):
+ # make sure simple for loops that look like they
+ # create a new expression do not modify the named
+ # expression
+ e = self._ctype_factory(1.0)
+ expr = 0.0
+ for v in [1.0,e]:
+ expr += v
+ self.assertEqual(e.expr, 1)
+ self.assertEqual(expr(), 2)
+ expr = 0.0
+ for v in [e,1.0]:
+ expr += v
+ self.assertEqual(e.expr, 1)
+ self.assertEqual(expr(), 2)
+
+ def test_isub(self):
+ # make sure simple for loops that look like they
+ # create a new expression do not modify the named
+ # expression
+ e = self._ctype_factory(1.0)
+ expr = 0.0
+ for v in [1.0,e]:
+ expr -= v
+ self.assertEqual(e.expr, 1)
+ self.assertEqual(expr(), -2)
+ expr = 0.0
+ for v in [e,1.0]:
+ expr -= v
+ self.assertEqual(e.expr, 1)
+ self.assertEqual(expr(), -2)
+
+ def test_imul(self):
+ # make sure simple for loops that look like they
+ # create a new expression do not modify the named
+ # expression
+ e = self._ctype_factory(3.0)
+ expr = 1.0
+ for v in [2.0,e]:
+ expr *= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 6)
+ expr = 1.0
+ for v in [e,2.0]:
+ expr *= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 6)
+
+ def test_idiv(self):
+ # make sure simple for loops that look like they
+ # create a new expression do not modify the named
+ # expression
+ # floating point division
+ e = self._ctype_factory(3.0)
+ expr = e
+ for v in [2.0,1.0]:
+ expr /= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 1.5)
+ expr = e
+ for v in [1.0,2.0]:
+ expr /= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 1.5)
+ # note that integer division does not occur within
+ # Pyomo expressions
+ e = self._ctype_factory(3)
+ expr = e
+ for v in [2,1]:
+ expr /= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 1.5)
+ expr = e
+ for v in [1,2]:
+ expr /= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 1.5)
+
+ def test_ipow(self):
+ # make sure simple for loops that look like they
+ # create a new expression do not modify the named
+ # expression
+ e = self._ctype_factory(3.0)
+ expr = e
+ for v in [2.0,1.0]:
+ expr **= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 9)
+ expr = e
+ for v in [1.0,2.0]:
+ expr **= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 9)
+
class Test_expression(_Test_expression_base,
unittest.TestCase):
_ctype_factory = expression
@@ -513,21 +564,21 @@ def test_is_fixed(self):
self.assertEqual(is_fixed(e), True)
self.assertEqual(e(), 3)
- def test_potentially_variable(self):
+ def testis_potentially_variable(self):
e = self._ctype_factory()
- self.assertEqual(e._potentially_variable(), True)
+ self.assertEqual(e.is_potentially_variable(), True)
self.assertEqual(potentially_variable(e), True)
e.expr = 1
- self.assertEqual(e._potentially_variable(), True)
+ self.assertEqual(e.is_potentially_variable(), True)
self.assertEqual(potentially_variable(e), True)
v = variable()
v.value = 2
e.expr = v + 1
- self.assertEqual(e._potentially_variable(), True)
+ self.assertEqual(e.is_potentially_variable(), True)
self.assertEqual(potentially_variable(e), True)
v.fix()
e.expr = v + 1
- self.assertEqual(e._potentially_variable(), True)
+ self.assertEqual(e.is_potentially_variable(), True)
self.assertEqual(potentially_variable(e), True)
self.assertEqual(e(), 3)
@@ -600,24 +651,24 @@ def test_is_fixed(self):
with self.assertRaises(ValueError):
e.expr = v + 1
- def test_potentially_variable(self):
+ def testis_potentially_variable(self):
e = self._ctype_factory()
- self.assertEqual(e._potentially_variable(), False)
+ self.assertEqual(e.is_potentially_variable(), False)
self.assertEqual(potentially_variable(e), False)
e.expr = 1
- self.assertEqual(e._potentially_variable(), False)
+ self.assertEqual(e.is_potentially_variable(), False)
self.assertEqual(potentially_variable(e), False)
p = parameter()
e.expr = p**2
- self.assertEqual(e._potentially_variable(), False)
+ self.assertEqual(e.is_potentially_variable(), False)
self.assertEqual(potentially_variable(e), False)
a = self._ctype_factory()
e.expr = (a*p)**2/(p + 5)
- self.assertEqual(e._potentially_variable(), False)
+ self.assertEqual(e.is_potentially_variable(), False)
self.assertEqual(potentially_variable(e), False)
a.expr = 2.0
p.value = 5.0
- self.assertEqual(e._potentially_variable(), False)
+ self.assertEqual(e.is_potentially_variable(), False)
self.assertEqual(potentially_variable(e), False)
self.assertEqual(e(), 10.0)
diff --git a/pyomo/core/tests/unit/test_component_matrix_constraint.py b/pyomo/core/tests/unit/test_component_matrix_constraint.py
index 371aefe14c4..31fbe780c28 100644
--- a/pyomo/core/tests/unit/test_component_matrix_constraint.py
+++ b/pyomo/core/tests/unit/test_component_matrix_constraint.py
@@ -1068,21 +1068,25 @@ def test_canonical_form_sparse(self):
self.assertIs(vs[0], vlist[1])
self.assertEqual(cs[0], 2)
repn = ctuple[0].canonical_form()
- self.assertEqual(len(repn.variables), 1)
- self.assertIs(repn.variables[0], vlist[1])
- self.assertEqual(repn.linear, (2,))
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertIs(repn.linear_vars[0], vlist[1])
+ self.assertEqual(repn.linear_coefs, (2,))
self.assertEqual(repn.constant, 0)
vlist[0].fix(1)
repn = ctuple[0].canonical_form()
- self.assertEqual(len(repn.variables), 1)
- self.assertIs(repn.variables[0], vlist[1])
- self.assertEqual(repn.linear, (2,))
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertIs(repn.linear_vars[0], vlist[1])
+ self.assertEqual(repn.linear_coefs, (2,))
self.assertEqual(repn.constant, 0)
vlist[1].fix(2)
repn = ctuple[0].canonical_form()
- self.assertEqual(repn.variables, ())
- self.assertEqual(repn.linear, ())
+ self.assertEqual(repn.linear_vars, ())
+ self.assertEqual(repn.linear_coefs, ())
self.assertEqual(repn.constant, 4)
+ repn = ctuple[0].canonical_form(compute_values=False)
+ self.assertEqual(repn.linear_vars, ())
+ self.assertEqual(repn.linear_coefs, ())
+ self.assertEqual(repn.constant(), 4)
def test_canonical_form_dense(self):
A = numpy.array([[0, 2]])
@@ -1098,22 +1102,26 @@ def test_canonical_form_dense(self):
self.assertEqual(cs[0], 0)
self.assertEqual(cs[1], 2)
repn = ctuple[0].canonical_form()
- self.assertEqual(len(repn.variables), 2)
- self.assertIs(repn.variables[0], vlist[0])
- self.assertIs(repn.variables[1], vlist[1])
- self.assertEqual(repn.linear, (0, 2))
+ self.assertEqual(len(repn.linear_vars), 2)
+ self.assertIs(repn.linear_vars[0], vlist[0])
+ self.assertIs(repn.linear_vars[1], vlist[1])
+ self.assertEqual(repn.linear_coefs, (0, 2))
self.assertEqual(repn.constant, 0)
vlist[0].fix(1)
repn = ctuple[0].canonical_form()
- self.assertEqual(len(repn.variables), 1)
- self.assertIs(repn.variables[0], vlist[1])
- self.assertEqual(repn.linear, (2,))
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertIs(repn.linear_vars[0], vlist[1])
+ self.assertEqual(repn.linear_coefs, (2,))
self.assertEqual(repn.constant, 0)
vlist[1].fix(2)
repn = ctuple[0].canonical_form()
- self.assertEqual(repn.variables, ())
- self.assertEqual(repn.linear, ())
+ self.assertEqual(repn.linear_vars, ())
+ self.assertEqual(repn.linear_coefs, ())
self.assertEqual(repn.constant, 4)
+ repn = ctuple[0].canonical_form(compute_values=False)
+ self.assertEqual(repn.linear_vars, ())
+ self.assertEqual(repn.linear_coefs, ())
+ self.assertEqual(repn.constant(), 4)
def test_preorder_visit(self):
# test that we can use the advanced preorder_visit
diff --git a/pyomo/core/tests/unit/test_component_objective.py b/pyomo/core/tests/unit/test_component_objective.py
index 6c42ef7f6ec..b8a4d159878 100644
--- a/pyomo/core/tests/unit/test_component_objective.py
+++ b/pyomo/core/tests/unit/test_component_objective.py
@@ -1,6 +1,7 @@
import pickle
import pyutilib.th as unittest
+from pyomo.core.expr.numvalue import NumericValue
import pyomo.kernel
from pyomo.core.tests.unit.test_component_dict import \
_TestActiveComponentDictBase
@@ -20,7 +21,6 @@
objective_list,
minimize,
maximize)
-from pyomo.core.kernel.numvalue import NumericValue
from pyomo.core.kernel.component_variable import variable
from pyomo.core.kernel.component_block import block
from pyomo.core.kernel.set_types import (RealSet,
diff --git a/pyomo/core/tests/unit/test_component_parameter.py b/pyomo/core/tests/unit/test_component_parameter.py
index fef9cad9f8a..ec3e132194d 100644
--- a/pyomo/core/tests/unit/test_component_parameter.py
+++ b/pyomo/core/tests/unit/test_component_parameter.py
@@ -1,6 +1,10 @@
import pickle
import pyutilib.th as unittest
+from pyomo.core.expr.numvalue import (NumericValue,
+ is_fixed,
+ is_constant,
+ potentially_variable)
import pyomo.kernel
from pyomo.core.tests.unit.test_component_dict import \
_TestComponentDictBase
@@ -19,10 +23,6 @@
from pyomo.core.kernel.component_block import block
from pyomo.core.kernel.set_types import (RealSet,
IntegerSet)
-from pyomo.core.kernel.numvalue import (NumericValue,
- is_fixed,
- is_constant,
- potentially_variable)
from pyomo.core.base.param import Param
class Test_parameter(unittest.TestCase):
@@ -101,10 +101,10 @@ def test_is_fixed(self):
def test_potentially_variable(self):
p = parameter()
- self.assertEqual(p._potentially_variable(), False)
+ self.assertEqual(p.is_potentially_variable(), False)
self.assertEqual(potentially_variable(p), False)
p.value = 1.0
- self.assertEqual(p._potentially_variable(), False)
+ self.assertEqual(p.is_potentially_variable(), False)
self.assertEqual(potentially_variable(p), False)
def test_polynomial_degree(self):
diff --git a/pyomo/core/tests/unit/test_component_variable.py b/pyomo/core/tests/unit/test_component_variable.py
index 4517064b975..10f406ae9cb 100644
--- a/pyomo/core/tests/unit/test_component_variable.py
+++ b/pyomo/core/tests/unit/test_component_variable.py
@@ -1,6 +1,10 @@
import pickle
import pyutilib.th as unittest
+from pyomo.core.expr.numvalue import (NumericValue,
+ is_fixed,
+ is_constant,
+ potentially_variable)
import pyomo.kernel
from pyomo.core.tests.unit.test_component_dict import \
_TestComponentDictBase
@@ -8,10 +12,6 @@
_TestComponentTupleBase
from pyomo.core.tests.unit.test_component_list import \
_TestComponentListBase
-from pyomo.core.kernel.numvalue import (NumericValue,
- is_fixed,
- is_constant,
- potentially_variable)
from pyomo.core.kernel.component_interface import (ICategorizedObject,
IActiveObject,
IComponent,
@@ -73,6 +73,14 @@ def test_extract_domain_type_and_bounds(self):
self.assertIs(lb, None)
self.assertIs(ub, None)
+ def test_polynomial_degree(self):
+ v = variable()
+ self.assertEqual(v.polynomial_degree(), 1)
+ v.fix(0)
+ self.assertEqual(v.polynomial_degree(), 0)
+ v.free()
+ self.assertEqual(v.polynomial_degree(), 1)
+
def test_ctype(self):
v = variable()
self.assertIs(v.ctype, Var)
@@ -201,27 +209,27 @@ def test_is_fixed(self):
def test_potentially_variable(self):
v = variable()
- self.assertEqual(v._potentially_variable(), True)
+ self.assertEqual(v.is_potentially_variable(), True)
self.assertEqual(potentially_variable(v), True)
self.assertEqual(v.fixed, False)
self.assertEqual(v.value, None)
v.value = 1.0
- self.assertEqual(v._potentially_variable(), True)
+ self.assertEqual(v.is_potentially_variable(), True)
self.assertEqual(potentially_variable(v), True)
self.assertEqual(v.fixed, False)
self.assertEqual(v.value, 1.0)
v.fix()
- self.assertEqual(v._potentially_variable(), True)
+ self.assertEqual(v.is_potentially_variable(), True)
self.assertEqual(potentially_variable(v), True)
self.assertEqual(v.fixed, True)
self.assertEqual(v.value, 1.0)
v.value = None
- self.assertEqual(v._potentially_variable(), True)
+ self.assertEqual(v.is_potentially_variable(), True)
self.assertEqual(potentially_variable(v), True)
self.assertEqual(v.fixed, True)
self.assertEqual(v.value, None)
v.free()
- self.assertEqual(v._potentially_variable(), True)
+ self.assertEqual(v.is_potentially_variable(), True)
self.assertEqual(potentially_variable(v), True)
self.assertEqual(v.fixed, False)
self.assertEqual(v.value, None)
diff --git a/pyomo/core/tests/unit/test_con.py b/pyomo/core/tests/unit/test_con.py
index d0ced5bae14..dbf45229e59 100644
--- a/pyomo/core/tests/unit/test_con.py
+++ b/pyomo/core/tests/unit/test_con.py
@@ -24,7 +24,8 @@
from pyomo.environ import ConcreteModel, AbstractModel, Var, Constraint, \
ConstraintList, Param, RangeSet, Set, Expression, value, \
- simple_constraintlist_rule, simple_constraint_rule
+ simple_constraintlist_rule, simple_constraint_rule, inequality
+from pyomo.core.expr import current as EXPR
from pyomo.core.base.constraint import _GeneralConstraintData
from six import StringIO
@@ -365,17 +366,17 @@ def test_nondata_bounds(self):
model.e2 = Expression()
model.e3 = Expression()
with self.assertRaises(ValueError):
- model.c.set_value(model.e1 <= model.e2 <= model.e3)
+ model.c.set_value((model.e1, model.e2, model.e3))
model.e1.expr = 1.0
model.e2.expr = 1.0
model.e3.expr = 1.0
with self.assertRaises(ValueError):
- model.c.set_value(model.e1 <= model.e2 <= model.e3)
+ model.c.set_value((model.e1, model.e2, model.e3))
model.p1 = Param(mutable=True)
model.p2 = Param(mutable=True)
- model.c.set_value(model.p1 <= model.e1 <= model.p2)
+ model.c.set_value((model.p1, model.e1, model.p2))
model.e1.expr = None
- model.c.set_value(model.p1 <= model.e1 <= model.p2)
+ model.c.set_value((model.p1, model.e1, model.p2))
# make sure we can use a mutable param that
# has not been given a value in the upper bound
@@ -407,7 +408,7 @@ def test_mutable_novalue_param_lower_bound(self):
self.assertEqual(model.c.equality, False)
model.del_component(model.c)
- model.c = Constraint(expr=model.p <= model.x <= model.p + 1)
+ model.c = Constraint(expr=(model.p, model.x, model.p + 1))
self.assertEqual(model.c.equality, False)
model.del_component(model.c)
@@ -432,10 +433,6 @@ def test_mutable_novalue_param_lower_bound(self):
self.assertEqual(model.c.equality, False)
model.del_component(model.c)
- model.c = Constraint(expr=model.p + 1 >= model.x >= model.p)
- self.assertEqual(model.c.equality, False)
- model.del_component(model.c)
-
model.c = Constraint(expr=(model.p, model.x, None))
self.assertTrue(model.c.lower is model.p)
self.assertEqual(model.c.equality, False)
@@ -483,7 +480,7 @@ def test_mutable_novalue_param_upper_bound(self):
self.assertEqual(model.c.equality, False)
model.del_component(model.c)
- model.c = Constraint(expr=model.p + 1 <= model.x <= model.p)
+ model.c = Constraint(expr=(model.p + 1, model.x, model.p))
self.assertEqual(model.c.equality, False)
model.del_component(model.c)
@@ -508,10 +505,6 @@ def test_mutable_novalue_param_upper_bound(self):
self.assertEqual(model.c.equality, False)
model.del_component(model.c)
- model.c = Constraint(expr=model.p >= model.x >= model.p + 1)
- self.assertEqual(model.c.equality, False)
- model.del_component(model.c)
-
model.c = Constraint(expr=(None, model.x, model.p))
self.assertTrue(model.c.upper is model.p)
self.assertEqual(model.c.equality, False)
@@ -559,7 +552,7 @@ def test_mutable_novalue_param_equality(self):
self.assertEqual(model.c.equality, True)
model.del_component(model.c)
- model.c = Constraint(expr=model.p <= model.x <= model.p)
+ model.c = Constraint(expr=inequality(model.p, model.x, model.p))
self.assertTrue(model.c.upper is model.p)
# GH: Not sure if we are supposed to detect equality
# in this situation. I would rather us not, for
@@ -627,7 +620,7 @@ def test_set_expr_inline(self):
model = ConcreteModel()
model.A = RangeSet(1,4)
model.x = Var(model.A,initialize=2)
- model.c = Constraint(expr=0 <= sum(model.x[i] for i in model.A) <= 1)
+ model.c = Constraint(expr=(0, sum(model.x[i] for i in model.A), 1))
self.assertEqual(model.c(), 8)
self.assertEqual(value(model.c.body), 8)
@@ -657,7 +650,7 @@ def f(model):
ans=0
for i in model.B:
ans = ans + model.x[i]
- return (0,ans,1)
+ return (0, ans, 1)
model.x = Var(model.B, initialize=2)
model.c = Constraint(rule=f)
@@ -672,7 +665,7 @@ def f(model):
ans=0
for i in model.B:
ans = ans + model.x[i]
- return (0,ans,None)
+ return (0, ans, None)
model.x = Var(model.B, initialize=2)
model.c = Constraint(rule=f)
@@ -687,7 +680,7 @@ def f(model):
ans=0
for i in model.B:
ans = ans + model.x[i]
- return (None,ans,1)
+ return (None, ans, 1)
model.x = Var(model.B, initialize=2)
model.c = Constraint(rule=f)
@@ -702,7 +695,7 @@ def f(model):
ans=0
for i in model.B:
ans = ans + model.x[i]
- return (ans,1)
+ return (ans, 1)
model.x = Var(model.B, initialize=2)
model.c = Constraint(rule=f)
@@ -1140,7 +1133,7 @@ def test_slack_methods(self):
self.assertEqual(model.cU.lslack(), float('inf'))
self.assertEqual(model.cU.uslack(), 1.0)
self.assertEqual(model.cU.slack(), 1.0)
- model.cR = Constraint(expr=L <= model.x**2 <= U)
+ model.cR = Constraint(expr=(L, model.x**2, U))
self.assertEqual(model.cR.lslack(), 5.0)
self.assertEqual(model.cR.uslack(), 1.0)
self.assertEqual(model.cR.slack(), 1.0)
@@ -1214,7 +1207,7 @@ def test_empty_singleton(self):
pass
x = Var(initialize=1.0)
x.construct()
- a.set_value(2 >= x >= 0)
+ a.set_value((0, x, 2))
self.assertEqual(len(a), 1)
self.assertEqual(a(), 1)
self.assertEqual(a.body(), 1)
@@ -1266,7 +1259,7 @@ def test_unconstructed_singleton(self):
x = Var(initialize=1.0)
x.construct()
a.construct()
- a.set_value(2 >= x >= 0)
+ a.set_value((0, x, 2))
self.assertEqual(len(a), 1)
self.assertEqual(a(), 1)
self.assertEqual(a.body(), 1)
@@ -1313,6 +1306,7 @@ def rule1(model):
except ValueError:
pass
+ @unittest.skipIf(not EXPR._using_chained_inequality, "Chained inequalities are not supported.")
def test_chainedInequalityError(self):
m = ConcreteModel()
m.x = Var()
@@ -1377,7 +1371,7 @@ def rule1(model):
model.y = Var()
model.z = Var()
model.o = Constraint(rule=rule1)
- self.assertRaises(ValueError, model.create_instance)
+ #self.assertRaises(ValueError, model.create_instance)
#
def rule1(model):
expr = model.x >= model.z
@@ -1388,7 +1382,7 @@ def rule1(model):
model.y = Var()
model.z = Var()
model.o = Constraint(rule=rule1)
- self.assertRaises(ValueError, model.create_instance)
+ #self.assertRaises(ValueError, model.create_instance)
#
def rule1(model):
expr = model.y <= model.x
@@ -1398,7 +1392,7 @@ def rule1(model):
model.x = Var()
model.y = Var()
model.o = Constraint(rule=rule1)
- self.assertRaises(ValueError, model.create_instance)
+ #self.assertRaises(ValueError, model.create_instance)
#
def rule1(model):
expr = model.x >= model.L
@@ -1450,7 +1444,7 @@ def rule1(model):
model.y = Var()
model.z = Var()
model.o = Constraint(rule=rule1)
- self.assertRaises(ValueError, model.create_instance)
+ #self.assertRaises(ValueError, model.create_instance)
#
def rule1(model):
expr = model.x <= model.z
@@ -1461,26 +1455,25 @@ def rule1(model):
model.y = Var()
model.z = Var()
model.o = Constraint(rule=rule1)
- self.assertRaises(ValueError, model.create_instance)
+ #self.assertRaises(ValueError, model.create_instance)
#
def rule1(model):
- expr = model.y >= model.x
- expr = model.y <= expr
+ expr = model.x <= model.L
return expr
- model = AbstractModel()
+ model = ConcreteModel()
model.x = Var()
- model.y = Var()
+ model.L = Param(initialize=0)
model.o = Constraint(rule=rule1)
- self.assertRaises(ValueError, model.create_instance)
#
def rule1(model):
- expr = model.x <= model.L
+ expr = model.y >= model.x
+ expr = model.y <= expr
return expr
- model = ConcreteModel()
+ model = AbstractModel()
model.x = Var()
- model.L = Param(initialize=0)
+ model.y = Var()
model.o = Constraint(rule=rule1)
-
+ #self.assertRaises(ValueError, model.create_instance)
#
def rule1(model):
expr = model.U <= model.x
diff --git a/pyomo/core/tests/unit/test_connector.py b/pyomo/core/tests/unit/test_connector.py
index 545ce1c33d9..1283dddac2d 100644
--- a/pyomo/core/tests/unit/test_connector.py
+++ b/pyomo/core/tests/unit/test_connector.py
@@ -72,14 +72,14 @@ def test_add_scalar_vars(self):
pipe.OUT.add(pipe.pOut, "pressure")
self.assertEqual(len(pipe.OUT), 1)
self.assertEqual(len(pipe.OUT.vars), 2)
- self.assertFalse(pipe.OUT.vars['flow'].is_expression())
+ self.assertFalse(pipe.OUT.vars['flow'].is_expression_type())
pipe.IN = Connector()
pipe.IN.add(-pipe.flow, "flow")
pipe.IN.add(pipe.pIn, "pressure")
self.assertEqual(len(pipe.IN), 1)
self.assertEqual(len(pipe.IN.vars), 2)
- self.assertTrue(pipe.IN.vars['flow'].is_expression())
+ self.assertTrue(pipe.IN.vars['flow'].is_expression_type())
def test_add_indexed_vars(self):
pipe = ConcreteModel()
@@ -194,7 +194,7 @@ def test_pprint(self):
Key : Name : Size : Variable
None : comp_a : 1 : composition[a]
: composition : 3 : composition
- : flow : 1 : -1 * flow
+ : flow : 1 : - flow
: pressure : 1 : pIn
""")
@@ -208,12 +208,12 @@ def _IN(m, i):
self.assertEqual(os.getvalue(),
"""IN : Size=3, Index=SPECIES
Key : Name : Size : Variable
- a : flow : 1 : composition[a] * flow
- : pressure : 1 : pIn
- b : flow : 1 : composition[b] * flow
- : pressure : 1 : pIn
- c : flow : 1 : composition[c] * flow
- : pressure : 1 : pIn
+ a : flow : 1 : composition[a]*flow
+ : pressure : 1 : pIn
+ b : flow : 1 : composition[b]*flow
+ : pressure : 1 : pIn
+ c : flow : 1 : composition[c]*flow
+ : pressure : 1 : pIn
""")
def test_display(self):
@@ -353,9 +353,9 @@ def test_expand_expression(self):
m.component('c.expanded').pprint(ostream=os)
self.assertEqual(os.getvalue(),
"""c.expanded : Size=2, Index=c.expanded_index, Active=True
- Key : Lower : Body : Upper : Active
- 1 : 1.0 : -1 * x : 1.0 : True
- 2 : 1.0 : 1 + y : 1.0 : True
+ Key : Lower : Body : Upper : Active
+ 1 : 1.0 : - x : 1.0 : True
+ 2 : 1.0 : 1 + y : 1.0 : True
""")
@@ -466,9 +466,9 @@ def test_expand_empty_expression(self):
m.component('c.expanded').pprint(ostream=os)
self.assertEqual(os.getvalue(),
"""c.expanded : Size=2, Index=c.expanded_index, Active=True
- Key : Lower : Body : Upper : Active
- 1 : 0.0 : -1 * x - ECON.auto.x : 0.0 : True
- 2 : 0.0 : 1 + y - ECON.auto.y : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 1 : 0.0 : - x - ECON.auto.x : 0.0 : True
+ 2 : 0.0 : 1 + y - ECON.auto.y : 0.0 : True
""")
diff --git a/pyomo/core/tests/unit/test_expr_coopr3.py b/pyomo/core/tests/unit/test_expr_coopr3.py
index 792b957059f..bfccac333ec 100644
--- a/pyomo/core/tests/unit/test_expr_coopr3.py
+++ b/pyomo/core/tests/unit/test_expr_coopr3.py
@@ -22,28 +22,30 @@
from pyutilib.th import nottest
from pyomo.environ import *
-from pyomo.core.base import expr_common, expr as EXPR
+import pyomo.core.expr.current as EXPR
+from pyomo.core.expr.numvalue import potentially_variable
from pyomo.core.base.var import SimpleVar
-from pyomo.core.base.numvalue import potentially_variable
-from pyomo.core.base.expr_coopr3 import UNREFERENCED_EXPR_COUNT, \
- UNREFERENCED_RELATIONAL_EXPR_COUNT, UNREFERENCED_INTRINSIC_EXPR_COUNT, \
- _getrefcount_available
+if EXPR.mode is EXPR.Mode.coopr3_trees:
+ TestCase = unittest.TestCase
+ from pyomo.core.base.expr_coopr3 import UNREFERENCED_EXPR_COUNT, \
+ UNREFERENCED_RELATIONAL_EXPR_COUNT, UNREFERENCED_INTRINSIC_EXPR_COUNT, \
+ _getrefcount_available
+else:
+ TestCase = object
+ _getrefcount_available=False
-class TestExpression_EvaluateNumericConstant(unittest.TestCase):
+
+@unittest.skipIf(EXPR.mode != EXPR.Mode.coopr3_trees, "Only test for Coopr3 expressions")
+class TestExpression_EvaluateNumericConstant(TestCase):
def setUp(self):
- # This class tests the Coopr 3.x expression trees
- EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
# Do we expect arithmetic operations to return expressions?
self.expectExpression = False
# Do we expect relational tests to return constant expressions?
self.expectConstExpression = True
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
-
def create(self,val,domain):
return NumericConstant(val)
@@ -245,7 +247,7 @@ def create(self,val,domain):
tmp.construct()
return tmp
-class TestNumericValue(unittest.TestCase):
+class TestNumericValue(TestCase):
def setUp(self):
# This class tests the Coopr 3.x expression trees
EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
@@ -299,7 +301,7 @@ def test_ops(self):
@unittest.skipIf(
not _getrefcount_available, "Coopr 3-style expressions are not "
"supported on platforms that do not implement sys.getrefcount")
-class TestGenerate_SumExpression(unittest.TestCase):
+class TestGenerate_SumExpression(TestCase):
def setUp(self):
# This class tests the Coopr 3.x expression trees
EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
@@ -653,7 +655,7 @@ def test_sumOf_nestedTrivialProduct(self):
@unittest.skipIf(
not _getrefcount_available, "Coopr 3-style expressions are not "
"supported on platforms that do not implement sys.getrefcount")
-class TestGenerate_ProductExpression(unittest.TestCase):
+class TestGenerate_ProductExpression(TestCase):
def setUp(self):
# This class tests the Coopr 3.x expression trees
EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
@@ -888,7 +890,7 @@ def test_trivialDivision(self):
self.assertIs(type(e), float)
self.assertEqual(e, 1.5)
-class TestGenerate_RelationalExpression(unittest.TestCase):
+class TestGenerate_RelationalExpression(TestCase):
def setUp(self):
# This class tests the Coopr 3.x expression trees
EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
@@ -1254,7 +1256,7 @@ def test_inequalityErrors(self):
except TypeError:
pass
-class TestPrettyPrinter_oldStyle(unittest.TestCase):
+class TestPrettyPrinter_oldStyle(TestCase):
_save = None
def setUp(self):
@@ -1371,7 +1373,7 @@ def test_small_expression(self):
"pow( prod( num=( a , a ) , denom=( a ) ) , b ) ) ) ) ) ) ) )",
str(expr) )
-class TestPrettyPrinter_newStyle(unittest.TestCase):
+class TestPrettyPrinter_newStyle(TestCase):
_save = None
def setUp(self):
@@ -1577,7 +1579,7 @@ def o2_rule(model, i):
@unittest.skipIf(
not _getrefcount_available, "Coopr 3-style expressions are not "
"supported on platforms that do not implement sys.getrefcount")
-class TestInplaceExpressionGeneration(unittest.TestCase):
+class TestInplaceExpressionGeneration(TestCase):
def setUp(self):
# This class tests the Coopr 3.x expression trees
EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
@@ -1766,7 +1768,7 @@ def test_ipow(self):
self.assertIs(x._args[0]._args[1], m.a)
self.assertEqual(expr_common.clone_counter, count+1)
-class TestGeneralExpressionGeneration(unittest.TestCase):
+class TestGeneralExpressionGeneration(TestCase):
def setUp(self):
# This class tests the Coopr 3.x expression trees
EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
@@ -1866,7 +1868,7 @@ def test_genericExpression_notImplemented(self):
e = EXPR._ExpressionBase([m.a, m.b])
self.assertRaises(NotImplementedError, e)
-class TestExprConditionalContext(unittest.TestCase):
+class TestExprConditionalContext(TestCase):
def setUp(self):
# This class tests the Coopr 3.x expression trees
EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
@@ -2156,7 +2158,7 @@ def test_eval_varConditional_reversed(self):
self.checkCondition(value(1 == instance.v), True)
self.checkCondition(value(2 == instance.v), False)
-class TestPolynomialDegree(unittest.TestCase):
+class TestPolynomialDegree(TestCase):
def setUp(self):
# This class tests the Coopr 3.x expression trees
@@ -2384,7 +2386,7 @@ def TrapRefCount_fcn(obj, target = None):
@unittest.skipIf(
not _getrefcount_available, "Coopr 3-style expressions are not "
"supported on platforms that do not implement sys.getrefcount")
-class TestCloneIfNeeded(unittest.TestCase):
+class TestCloneIfNeeded(TestCase):
def setUp(self):
# This class tests the Coopr 3.x expression trees
@@ -2661,7 +2663,7 @@ def test_cloneCount_relationalExpression_compound_reversed(self):
self.assertEqual(len(expr1._args), 3)
self.assertEqual( expr_common.clone_counter, count + 1)
-class TestCloneExpression(unittest.TestCase):
+class TestCloneExpression(TestCase):
def setUp(self):
# This class tests the Coopr 3.x expression trees
EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
@@ -2854,7 +2856,7 @@ def test_Expr_if(self):
self.assertEqual(expr1._then(), expr2._then())
self.assertEqual(expr1._else(), expr2._else())
-class TestIsFixedIsConstant(unittest.TestCase):
+class TestIsFixedIsConstant(TestCase):
def setUp(self):
# This class tests the Coopr 3.x expression trees
EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
@@ -3080,7 +3082,7 @@ def test_Expr_if(self):
self.assertEqual(expr.is_constant(), False)
m.a.fixed = False
-class TestPotentiallyVariable(unittest.TestCase):
+class TestPotentiallyVariable(TestCase):
def test_var(self):
m = ConcreteModel()
@@ -3144,7 +3146,7 @@ def test_misc(self):
self.assertEqual(potentially_variable('a'), False)
self.assertEqual(potentially_variable(None), False)
-class TestExpressionUtilities(unittest.TestCase):
+class TestExpressionUtilities(TestCase):
def setUp(self):
# This class tests the Coopr 3.x expression trees
EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
@@ -3201,7 +3203,7 @@ def test_identify_vars_vars(self):
[ m.a, m.a, m.a, ] )
-class TestMultiArgumentExpressions(unittest.TestCase):
+class TestMultiArgumentExpressions(TestCase):
def setUp(self):
# This class tests the Coopr 3.x expression trees
EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
diff --git a/pyomo/core/tests/unit/test_expr_pyomo4.py b/pyomo/core/tests/unit/test_expr_pyomo4.py
index 83c89702195..ea80daba103 100644
--- a/pyomo/core/tests/unit/test_expr_pyomo4.py
+++ b/pyomo/core/tests/unit/test_expr_pyomo4.py
@@ -22,29 +22,30 @@
from pyutilib.th import nottest
from pyomo.environ import *
-from pyomo.core.base import expr_common, expr as EXPR
+import pyomo.core.expr.current as EXPR
from pyomo.core.base.var import SimpleVar
from pyomo.core.base.numvalue import potentially_variable, native_types
-from pyomo.core.base.expr_pyomo4 import (
- EntangledExpressionError, _getrefcount_available, UNREFERENCED_EXPR_COUNT
-)
+if EXPR.mode is EXPR.Mode.pyomo4_trees:
+ TestCase = unittest.TestCase
+ from pyomo.core.base.expr_pyomo4 import (
+ EntangledExpressionError, _getrefcount_available, UNREFERENCED_EXPR_COUNT
+ )
+else:
+ TestCase = object
+ _getrefcount_available=False
-class TestExpression_EvaluateNumericConstant(unittest.TestCase):
+
+@unittest.skipIf(EXPR.mode != EXPR.Mode.pyomo4_trees, "Only test for Pyomo4 expressions")
+class TestExpression_EvaluateNumericConstant(TestCase):
def setUp(self):
- # Set the type of expression trees used in Pyomo to be Pyomo4
- EXPR.set_expression_tree_format(expr_common.Mode.pyomo4_trees)
# Do we expect arithmetic operations to return expressions?
self.expectExpression = False
# Do we expect relational tests to return constant expressions?
self.expectConstExpression = True
- def tearDown(self):
- # Reset the type of expression trees used in Pyomo
- EXPR.set_expression_tree_format(expr_common._default_mode)
-
def create(self, val, domain):
# Create the type of expression term that we are testing
return NumericConstant(val)
@@ -298,15 +299,8 @@ def create(self, val, domain):
tmp.construct()
return tmp
-
-class TestNumericValue(unittest.TestCase):
-
- def setUp(self):
- # This class tests the Pyomo 4.x expression trees
- EXPR.set_expression_tree_format(expr_common.Mode.pyomo4_trees)
-
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
+@unittest.skipIf(EXPR.mode != EXPR.Mode.pyomo4_trees, "Only test for Pyomo4 expressions")
+class TestNumericValue(TestCase):
def test_asnum(self):
try:
@@ -359,14 +353,8 @@ def test_ops(self):
self.assertEqual(str(c), "-2.2")
-class TestGenerate_SumExpression(unittest.TestCase):
-
- def setUp(self):
- # This class tests the Pyomo 4.x expression trees
- EXPR.set_expression_tree_format(expr_common.Mode.pyomo4_trees)
-
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
+@unittest.skipIf(EXPR.mode != EXPR.Mode.pyomo4_trees, "Only test for Pyomo4 expressions")
+class TestGenerate_SumExpression(TestCase):
def test_simpleSum(self):
# a + b
@@ -931,14 +919,8 @@ def test_sumOf_nestedTrivialProduct(self):
self.assertIs(e._args[1]._args[0], e1)
-class TestGenerate_ProductExpression(unittest.TestCase):
-
- def setUp(self):
- # This class tests the Pyomo 4.x expression trees
- EXPR.set_expression_tree_format(expr_common.Mode.pyomo4_trees)
-
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
+@unittest.skipIf(EXPR.mode != EXPR.Mode.pyomo4_trees, "Only test for Pyomo4 expressions")
+class TestGenerate_ProductExpression(TestCase):
def test_simpleProduct(self):
#
@@ -1264,12 +1246,10 @@ def test_trivialDivision(self):
self.assertEqual(e, 1.5)
-class TestGenerate_RelationalExpression(unittest.TestCase):
+@unittest.skipIf(EXPR.mode != EXPR.Mode.pyomo4_trees, "Only test for Pyomo4 expressions")
+class TestGenerate_RelationalExpression(TestCase):
def setUp(self):
- # This class tests the Pyomo 4.x expression trees
- EXPR.set_expression_tree_format(expr_common.Mode.pyomo4_trees)
-
m = AbstractModel()
m.I = Set()
m.a = Var()
@@ -1279,7 +1259,6 @@ def setUp(self):
self.m = m
def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
self.m = None
def test_simpleEquality(self):
@@ -1746,18 +1725,17 @@ def test_inequalityErrors(self):
pass
-class TestPrettyPrinter_oldStyle(unittest.TestCase):
+@unittest.skipIf(EXPR.mode != EXPR.Mode.pyomo4_trees, "Only test for Pyomo4 expressions")
+class TestPrettyPrinter_oldStyle(TestCase):
_save = None
def setUp(self):
# This class tests the Pyomo 4.x expression trees
- EXPR.set_expression_tree_format(expr_common.Mode.pyomo4_trees)
TestPrettyPrinter_oldStyle._save = pyomo.core.base.expr_common.TO_STRING_VERBOSE
pyomo.core.base.expr_common.TO_STRING_VERBOSE = True
def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
pyomo.core.base.expr_common.TO_STRING_VERBOSE = TestPrettyPrinter_oldStyle._save
def test_sum(self):
@@ -1879,18 +1857,17 @@ def test_small_expression(self):
str(expr) )
-class TestPrettyPrinter_newStyle(unittest.TestCase):
+@unittest.skipIf(EXPR.mode != EXPR.Mode.pyomo4_trees, "Only test for Pyomo4 expressions")
+class TestPrettyPrinter_newStyle(TestCase):
_save = None
def setUp(self):
# This class tests the Pyomo 4.x expression trees
- EXPR.set_expression_tree_format(expr_common.Mode.pyomo4_trees)
TestPrettyPrinter_oldStyle._save = pyomo.core.base.expr_common.TO_STRING_VERBOSE
pyomo.core.base.expr_common.TO_STRING_VERBOSE = False
def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
pyomo.core.base.expr_common.TO_STRING_VERBOSE = TestPrettyPrinter_oldStyle._save
def test_sum(self):
@@ -2154,19 +2131,16 @@ def o2_rule(model, i):
#
# Check cloning with in-place expressions
#
-class TestInplaceExpressionGeneration(unittest.TestCase):
+@unittest.skipIf(EXPR.mode != EXPR.Mode.pyomo4_trees, "Only test for Pyomo4 expressions")
+class TestInplaceExpressionGeneration(TestCase):
def setUp(self):
- # This class tests the Pyomo 4.x expression trees
- EXPR.set_expression_tree_format(expr_common.Mode.pyomo4_trees)
-
m = AbstractModel()
m.a = Var()
m.b = Var()
self.m = m
def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
self.m = None
def test_iadd(self):
@@ -2315,14 +2289,8 @@ def test_ipow(self):
# then we can plow ahead.
-class TestGeneralExpressionGeneration(unittest.TestCase):
-
- def setUp(self):
- # This class tests the Pyomo 4.x expression trees
- EXPR.set_expression_tree_format(expr_common.Mode.pyomo4_trees)
-
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
+@unittest.skipIf(EXPR.mode != EXPR.Mode.pyomo4_trees, "Only test for Pyomo4 expressions")
+class TestGeneralExpressionGeneration(TestCase):
def test_invalidIndexing(self):
#
@@ -2416,14 +2384,10 @@ def test_negation(self):
self.assertIs(type(e._args[0]), EXPR._IntrinsicFunctionExpression)
-class TestExprConditionalContext(unittest.TestCase):
-
- def setUp(self):
- # This class tests the Pyomo 4.x expression trees
- EXPR.set_expression_tree_format(expr_common.Mode.pyomo4_trees)
+@unittest.skipIf(EXPR.mode != EXPR.Mode.pyomo4_trees, "Only test for Pyomo4 expressions")
+class TestExprConditionalContext(TestCase):
def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
# Make sure errors here don't bleed over to other tests
EXPR.generate_relational_expression.chainedInequality = None
@@ -2837,11 +2801,11 @@ def test_eval_varConditional_reversed(self):
self.checkCondition(value(2 == instance.v), False)
-class TestPolynomialDegree(unittest.TestCase):
+@unittest.skipIf(EXPR.mode != EXPR.Mode.pyomo4_trees, "Only test for Pyomo4 expressions")
+class TestPolynomialDegree(TestCase):
def setUp(self):
# This class tests the Pyomo 4.x expression trees
- EXPR.set_expression_tree_format(expr_common.Mode.pyomo4_trees)
def d_fn(model):
return model.c+model.c
self.model = AbstractModel()
@@ -2852,7 +2816,6 @@ def d_fn(model):
self.instance = self.model.create_instance()
def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
self.model = None
self.instance = None
@@ -3115,7 +3078,7 @@ def test_Expr_if(self):
@unittest.skipIf(
_getrefcount_available,
"Entangled Errors not generated when sys.getrefcount() is available" )
-class EntangledExpressionErrors(unittest.TestCase):
+class EntangledExpressionErrors(TestCase):
def setUp(self):
# This class tests the Coopr 3.x expression trees
EXPR.set_expression_tree_format(expr_common.Mode.pyomo4_trees)
@@ -3159,7 +3122,7 @@ def TrapRefCount_fcn(target, inplace, *objs):
_inplace += 1
if obj.__class__ in native_types:
continue
- if not obj.is_expression():
+ if not obj.is_expression_type():
continue
TrapRefCount.inst.fcn(sys.getrefcount(obj),target,_inplace,obj)
return TrapRefCount.inst.saved_fcn(target, inplace, *objs)
@@ -3168,7 +3131,7 @@ def TrapRefCount_fcn(target, inplace, *objs):
@unittest.skipIf(
not _getrefcount_available, "clone_if_needed is not "
"supported on platforms that do not implement sys.getrefcount")
-class TestCloneIfNeeded(unittest.TestCase):
+class TestCloneIfNeeded(TestCase):
def setUp(self):
# This class tests the Pyomo 4.x expression trees
@@ -3439,7 +3402,7 @@ def test_cloneCount_relationalExpression_compound_reversed(self):
count + 1)
-class TestCloneExpression(unittest.TestCase):
+class TestCloneExpression(TestCase):
def setUp(self):
# This class tests the Pyomo 4.x expression trees
@@ -3673,7 +3636,7 @@ def test_Expr_if(self):
# Constant - Expr only contains constants and immutable parameters
# PotentiallyVariable - Expr contains one or more variables
#
-class TestIsFixedIsConstant(unittest.TestCase):
+class TestIsFixedIsConstant(TestCase):
def setUp(self):
# This class tests the Pyomo 4.x expression trees
@@ -4139,7 +4102,7 @@ def test_misc(self):
self.assertEqual(potentially_variable(None), False)
-class TestExpressionUtilities(unittest.TestCase):
+class TestExpressionUtilities(TestCase):
def setUp(self):
# This class tests the Pyomo 4.x expression trees
@@ -4213,7 +4176,7 @@ def test_identify_vars_vars(self):
[ m.a, m.a, m.a, ] )
-class TestMultiArgumentExpressions(unittest.TestCase):
+class TestMultiArgumentExpressions(TestCase):
def setUp(self):
# This class tests the Pyomo 4 expression trees
diff --git a/pyomo/core/tests/unit/test_expr_pyomo5.py b/pyomo/core/tests/unit/test_expr_pyomo5.py
new file mode 100644
index 00000000000..d88406d41ba
--- /dev/null
+++ b/pyomo/core/tests/unit/test_expr_pyomo5.py
@@ -0,0 +1,6296 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+#
+# Unit Tests for expression generation
+#
+
+import copy
+import pickle
+import math
+import os
+import re
+import six
+import sys
+from os.path import abspath, dirname
+currdir = dirname(abspath(__file__))+os.sep
+
+import pyutilib.th as unittest
+from pyutilib.th import nottest
+
+from pyomo.environ import *
+from pyomo.core.expr import expr_common
+from pyomo.core.expr import current as EXPR
+from pyomo.core.kernel import expression, expression_dict, variable, expression, objective
+from pyomo.core.expr.numvalue import potentially_variable, native_types, nonpyomo_leaf_types
+from pyomo.core.base.var import SimpleVar
+from pyomo.core.base.param import _ParamData, SimpleParam
+from pyomo.core.base.label import *
+from pyomo.core.base.template_expr import IndexTemplate
+
+
+
+class TestExpression_EvaluateNumericConstant(unittest.TestCase):
+
+ def setUp(self):
+ # Do we expect arithmetic operations to return expressions?
+ self.expectExpression = False
+ # Do we expect relational tests to return constant expressions?
+ self.expectConstExpression = True
+
+ def create(self, val, domain):
+ # Create the type of expression term that we are testing
+ return NumericConstant(val)
+
+ @nottest
+ def value_test(self, exp, val, expectExpression=None):
+ """ Test the value of the expression. """
+ #
+ # Override the class value of 'expectExpression'
+ #
+ if expectExpression is None:
+ expectExpression = self.expectExpression
+ #
+ # Confirm whether 'exp' is an expression
+ #
+ self.assertEqual(isinstance(exp,EXPR.ExpressionBase), expectExpression)
+ #
+ # Confirm that 'exp' has the expected value
+ #
+ self.assertEqual(value(exp), val)
+
+ @nottest
+ def relation_test(self, exp, val, expectConstExpression=None):
+ """ Test a relationship expression. """
+ #
+ # Override the class value of 'expectConstExpression'
+ #
+ if expectConstExpression is None:
+ expectConstExpression = self.expectConstExpression
+ #
+ # Confirm that this is a relational expression
+ #
+ self.assertTrue(isinstance(exp, EXPR.ExpressionBase))
+ self.assertTrue(exp.is_relational())
+ #
+ # Check that the expression evaluates correctly
+ #
+ self.assertEqual(exp(), val)
+ #
+ # Check that the expression evaluates correctly in a Boolean context
+ #
+ try:
+ if expectConstExpression:
+ #
+ # The relational expression should be a constant.
+ #
+ # Check that 'val' equals the boolean value of the expression.
+ #
+ self.assertEqual(bool(exp), val)
+ #
+ # The 'chainedInequality' value is None
+ #
+ if EXPR._using_chained_inequality:
+ self.assertIsNone(EXPR._chainedInequality.prev)
+ else:
+ #
+ # The relational expression may not be constant
+ #
+ # Check that the expression evaluates to 'val'
+ #
+ if EXPR._using_chained_inequality:
+ self.assertEqual(bool(exp), True)
+ else:
+ self.assertEqual(bool(exp), val)
+ #
+ # Check that the 'chainedInequality' value is the current expression
+ #
+ if EXPR._using_chained_inequality:
+ self.assertIs(exp,EXPR._chainedInequality.prev)
+ finally:
+ #
+ # TODO: Why would we get here? Because the expression isn't constant?
+ #
+ # Check that the 'chainedInequality' value is None
+ #
+ if EXPR._using_chained_inequality:
+ EXPR._chainedInequality.prev = None
+
+ def test_lt(self):
+ #
+ # Test the 'less than' operator
+ #
+ a=self.create(1.3, Reals)
+ b=self.create(2.0, Reals)
+ self.relation_test(ab, False)
+ self.relation_test(a>a, False)
+ self.relation_test(b>a, True)
+ self.relation_test(a>2.0, False)
+ self.relation_test(a>1.3, False)
+ self.relation_test(b>1.3, True)
+ self.relation_test(1.3>b, False)
+ self.relation_test(1.3>a, False)
+ self.relation_test(2.0>a, True)
+
+ def test_eq(self):
+ #
+ # Test the 'equals' operator
+ #
+ a=self.create(1.3, Reals)
+ b=self.create(2.0, Reals)
+ self.relation_test(a==b, False, True)
+ self.relation_test(a==a, True, True)
+ self.relation_test(b==a, False, True)
+ self.relation_test(a==2.0, False, True)
+ self.relation_test(a==1.3, True, True)
+ self.relation_test(b==1.3, False, True)
+ self.relation_test(1.3==b, False, True)
+ self.relation_test(1.3==a, True, True)
+ self.relation_test(2.0==a, False, True)
+
+ def test_arithmetic(self):
+ #
+ #
+ # Test binary arithmetic operators
+ #
+ a=self.create(-0.5, Reals)
+ b=self.create(2.0, Reals)
+ self.value_test(a-b, -2.5)
+ self.value_test(a+b, 1.5)
+ self.value_test(a*b, -1.0)
+ self.value_test(b/a, -4.0)
+ self.value_test(a**b, 0.25)
+
+ self.value_test(a-2.0, -2.5)
+ self.value_test(a+2.0, 1.5)
+ self.value_test(a*2.0, -1.0)
+ self.value_test(b/(0.5), 4.0)
+ self.value_test(a**2.0, 0.25)
+
+ self.value_test(0.5-b, -1.5)
+ self.value_test(0.5+b, 2.5)
+ self.value_test(0.5*b, 1.0)
+ self.value_test(2.0/a, -4.0)
+ self.value_test((0.5)**b, 0.25)
+
+ self.value_test(-a, 0.5)
+ self.value_test(+a, -0.5, False) # This doesn't generate an expression
+ self.value_test(abs(-a), 0.5)
+
+
+class TestExpression_EvaluateVarData(TestExpression_EvaluateNumericConstant):
+
+ def setUp(self):
+ import pyomo.core.base.var
+ #
+ # Create Model
+ #
+ TestExpression_EvaluateNumericConstant.setUp(self)
+ #
+ # Create model instance
+ #
+ self.expectExpression = True
+ self.expectConstExpression = False
+
+ def create(self, val, domain):
+ tmp=pyomo.core.base.var._GeneralVarData()
+ tmp.domain = domain
+ tmp.value=val
+ return tmp
+
+
+class TestExpression_EvaluateVar(TestExpression_EvaluateNumericConstant):
+
+ def setUp(self):
+ import pyomo.core.base.var
+ #
+ # Create Model
+ #
+ TestExpression_EvaluateNumericConstant.setUp(self)
+ #
+ # Create model instance
+ #
+ self.expectExpression = True
+ self.expectConstExpression = False
+
+ def create(self, val, domain):
+ tmp=Var(name="unknown",domain=domain)
+ tmp.construct()
+ tmp.value=val
+ return tmp
+
+
+class TestExpression_EvaluateFixedVar(TestExpression_EvaluateNumericConstant):
+
+ def setUp(self):
+ import pyomo.core.base.var
+ #
+ # Create Model
+ #
+ TestExpression_EvaluateNumericConstant.setUp(self)
+ #
+ # Create model instance
+ #
+ self.expectExpression = True
+ self.expectConstExpression = False
+
+ def create(self, val, domain):
+ tmp=Var(name="unknown", domain=domain)
+ tmp.construct()
+ tmp.fixed=True
+ tmp.value=val
+ return tmp
+
+
+class TestExpression_EvaluateImmutableParam(TestExpression_EvaluateNumericConstant):
+
+ def setUp(self):
+ import pyomo.core.base.var
+ #
+ # Create Model
+ #
+ TestExpression_EvaluateNumericConstant.setUp(self)
+ #
+ # Create model instance
+ #
+ self.expectExpression = False
+ self.expectConstExpression = True
+
+ def create(self, val, domain):
+ tmp=Param(default=val, mutable=False, within=domain)
+ tmp.construct()
+ return tmp
+
+
+class TestExpression_Evaluate_MutableParam(TestExpression_EvaluateNumericConstant):
+
+ def setUp(self):
+ import pyomo.core.base.var
+ #
+ # Create Model
+ #
+ TestExpression_EvaluateNumericConstant.setUp(self)
+ #
+ # Create model instance
+ #
+ self.expectExpression = True
+ self.expectConstExpression = False
+
+ def create(self, val, domain):
+ tmp=Param(default=val, mutable=True, within=domain)
+ tmp.construct()
+ return tmp
+
+
+class TestExpression_Intrinsic(unittest.TestCase):
+
+ def test_abs_numval(self):
+ e = abs(1.5)
+ self.assertAlmostEqual(value(e), 1.5)
+ e = abs(-1.5)
+ self.assertAlmostEqual(value(e), 1.5)
+
+ def test_abs_param(self):
+ m = ConcreteModel()
+ m.p = Param(initialize=1.5)
+ e = abs(m.p)
+ self.assertAlmostEqual(value(e), 1.5)
+ m.q = Param(initialize=-1.5)
+ e = abs(m.q)
+ self.assertAlmostEqual(value(e), 1.5)
+
+ def test_abs_mutableparam(self):
+ m = ConcreteModel()
+ m.p = Param(initialize=0, mutable=True)
+ m.p.value = 1.5
+ e = abs(m.p)
+ self.assertAlmostEqual(value(e), 1.5)
+ m.p.value = -1.5
+ e = abs(m.p)
+ self.assertAlmostEqual(value(e), 1.5)
+ self.assertIs(e.is_potentially_variable(), False)
+
+ def test_ceil_numval(self):
+ e = ceil(1.5)
+ self.assertAlmostEqual(value(e), 2.0)
+ e = ceil(-1.5)
+ self.assertAlmostEqual(value(e), -1.0)
+
+ def test_ceil_param(self):
+ m = ConcreteModel()
+ m.p = Param(initialize=1.5)
+ e = ceil(m.p)
+ self.assertAlmostEqual(value(e), 2.0)
+ m.q = Param(initialize=-1.5)
+ e = ceil(m.q)
+ self.assertAlmostEqual(value(e), -1.0)
+
+ def test_ceil_mutableparam(self):
+ m = ConcreteModel()
+ m.p = Param(initialize=0, mutable=True)
+ m.p.value = 1.5
+ e = ceil(m.p)
+ self.assertAlmostEqual(value(e), 2.0)
+ m.p.value = -1.5
+ e = ceil(m.p)
+ self.assertAlmostEqual(value(e), -1.0)
+ self.assertIs(e.is_potentially_variable(), False)
+
+ def test_ceil(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = ceil(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 1.5
+ self.assertAlmostEqual(value(e), 2.0)
+ m.v.value = -1.5
+ self.assertAlmostEqual(value(e), -1.0)
+ self.assertIs(e.is_potentially_variable(), True)
+
+ def test_floor(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = floor(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 1.5
+ self.assertAlmostEqual(value(e), 1.0)
+ m.v.value = -1.5
+ self.assertAlmostEqual(value(e), -2.0)
+
+ def test_exp(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = exp(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 1
+ self.assertAlmostEqual(value(e), math.e)
+ m.v.value = 0
+ self.assertAlmostEqual(value(e), 1.0)
+
+ def test_log(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = log(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 1
+ self.assertAlmostEqual(value(e), 0)
+ m.v.value = math.e
+ self.assertAlmostEqual(value(e), 1)
+
+ def test_log10(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = log10(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 1
+ self.assertAlmostEqual(value(e), 0)
+ m.v.value = 10
+ self.assertAlmostEqual(value(e), 1)
+
+ def test_pow(self):
+ m = ConcreteModel()
+ m.v = Var()
+ m.p = Param(mutable=True)
+ e = pow(m.v,m.p)
+ self.assertEqual(e.__class__, EXPR.PowExpression)
+ m.v.value = 2
+ m.p.value = 0
+ self.assertAlmostEqual(value(e), 1.0)
+ m.v.value = 2
+ m.p.value = 1
+ self.assertAlmostEqual(value(e), 2.0)
+
+ def test_sqrt(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = sqrt(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 1
+ self.assertAlmostEqual(value(e), 1.0)
+ m.v.value = 4
+ self.assertAlmostEqual(value(e), 2.0)
+
+ def test_sin(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = sin(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 0
+ self.assertAlmostEqual(value(e), 0.0)
+ m.v.value = math.pi/2.0
+ self.assertAlmostEqual(value(e), 1.0)
+
+ def test_cos(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = cos(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 0
+ self.assertAlmostEqual(value(e), 1.0)
+ m.v.value = math.pi/2.0
+ self.assertAlmostEqual(value(e), 0.0)
+
+ def test_tan(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = tan(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 0
+ self.assertAlmostEqual(value(e), 0.0)
+ m.v.value = math.pi/4.0
+ self.assertAlmostEqual(value(e), 1.0)
+
+ def test_asin(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = asin(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 0
+ self.assertAlmostEqual(value(e), 0.0)
+ m.v.value = 1.0
+ self.assertAlmostEqual(value(e), math.pi/2.0)
+
+ def test_acos(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = acos(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 1.0
+ self.assertAlmostEqual(value(e), 0.0)
+ m.v.value = 0.0
+ self.assertAlmostEqual(value(e), math.pi/2.0)
+
+ def test_atan(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = atan(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 0
+ self.assertAlmostEqual(value(e), 0.0)
+ m.v.value = 1.0
+ self.assertAlmostEqual(value(e), math.pi/4.0)
+
+ def test_sinh(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = sinh(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 0.0
+ self.assertAlmostEqual(value(e), 0.0)
+ m.v.value = 1.0
+ self.assertAlmostEqual(value(e), (math.e-1.0/math.e)/2.0)
+
+ def test_cosh(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = cosh(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 0.0
+ self.assertAlmostEqual(value(e), 1.0)
+ m.v.value = 1.0
+ self.assertAlmostEqual(value(e), (math.e+1.0/math.e)/2.0)
+
+ def test_tanh(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = tanh(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 0.0
+ self.assertAlmostEqual(value(e), 0.0)
+ m.v.value = 1.0
+ self.assertAlmostEqual(value(e), (math.e-1.0/math.e)/(math.e+1.0/math.e))
+
+ def test_asinh(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = asinh(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 0.0
+ self.assertAlmostEqual(value(e), 0.0)
+ m.v.value = (math.e-1.0/math.e)/2.0
+ self.assertAlmostEqual(value(e), 1.0)
+
+ def test_acosh(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = acosh(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 1.0
+ self.assertAlmostEqual(value(e), 0.0)
+ m.v.value = (math.e+1.0/math.e)/2.0
+ self.assertAlmostEqual(value(e), 1.0)
+
+ def test_atanh(self):
+ m = ConcreteModel()
+ m.v = Var()
+ e = atanh(m.v)
+ self.assertEqual(e.__class__, EXPR.UnaryFunctionExpression)
+ m.v.value = 0.0
+ self.assertAlmostEqual(value(e), 0.0)
+ m.v.value = (math.e-1.0/math.e)/(math.e+1.0/math.e)
+ self.assertAlmostEqual(value(e), 1.0)
+
+
+class TestNumericValue(unittest.TestCase):
+
+ def test_asnum(self):
+ try:
+ as_numeric(None)
+ self.fail("test_asnum - expected TypeError")
+ except TypeError:
+ pass
+
+ def test_vals(self):
+ #
+ # Check that we can get the value from a numeric constant
+ #
+ a = NumericConstant(1.1)
+ b = float(value(a))
+ self.assertEqual(b,1.1)
+ b = int(value(a))
+ self.assertEqual(b,1)
+
+ def test_ops(self):
+ #
+ # Verify that we can compare the value of numeric constants
+ #
+ a = NumericConstant(1.1)
+ b = NumericConstant(2.2)
+ c = NumericConstant(-2.2)
+ #a <= b
+ self.assertEqual(a() <= b(), True)
+ self.assertEqual(a() >= b(), False)
+ self.assertEqual(a() == b(), False)
+ self.assertEqual(abs(a() + b()-3.3) <= 1e-7, True)
+ self.assertEqual(abs(b() - a()-1.1) <= 1e-7, True)
+ self.assertEqual(abs(b() * 3-6.6) <= 1e-7, True)
+ self.assertEqual(abs(b() / 2-1.1) <= 1e-7, True)
+ self.assertEqual(abs(abs(-b())-2.2) <= 1e-7, True)
+ self.assertEqual(abs(c()), 2.2)
+ #
+ # Check that we can get the string representation for a numeric
+ # constant.
+ #
+ self.assertEqual(str(c), "-2.2")
+
+ def test_var(self):
+ M = ConcreteModel()
+ M.x = Var()
+ e = M.x + 2
+ self.assertRaises(ValueError, value, M.x)
+ self.assertEqual(e(exception=False), None)
+
+class TestGenerate_SumExpression(unittest.TestCase):
+
+ def test_simpleSum(self):
+ # a + b
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ e = m.a + m.b
+ #
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+ self.assertEqual(e.size(), 3)
+
+ self.assertRaises(KeyError, e.arg, 3)
+ self.assertIs(e.arg(-1), m.b)
+
+ def test_simpleSum_API(self):
+ m = ConcreteModel()
+ m.a = Var()
+ m.b = Var()
+ e = m.a + m.b
+ e += (2*m.a)
+ self.assertIs(e.nargs(), 3)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+ self.assertIs(type(e.arg(2)), EXPR.MonomialTermExpression)
+ self.assertEqual(id(e.arg(-1)), id(e.arg(2)))
+
+ def test_constSum(self):
+ # a + 5
+ m = AbstractModel()
+ m.a = Var()
+ e = m.a + 5
+ #
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), 5)
+ self.assertEqual(e.size(), 3)
+
+ e = 5 + m.a
+ #
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), 5)
+ self.assertIs(e.arg(1), m.a)
+ self.assertEqual(e.size(), 3)
+
+ def test_nestedSum(self):
+ #
+ # Check the structure of nested sums
+ #
+ expectedType = EXPR.SumExpression
+
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.d = Var()
+
+ # +
+ # / \
+ # + 5
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e = e1 + 5
+ #
+ self.assertIs(type(e), expectedType)
+ self.assertEqual(e.nargs(), 3)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+ self.assertIs(e.arg(2), 5)
+ self.assertEqual(e.size(), 4)
+
+ # +
+ # / \
+ # 5 +
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e = 5 + e1
+ #
+ self.assertIs(type(e), expectedType)
+ self.assertEqual(e.nargs(), 3)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+ self.assertIs(e.arg(2), 5)
+ self.assertEqual(e.size(), 4)
+
+ # +
+ # / \
+ # + c
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e = e1 + m.c
+ #
+ self.assertIs(type(e), expectedType)
+ self.assertEqual(e.nargs(), 3)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+ self.assertIs(e.arg(2), m.c)
+ self.assertEqual(e.size(), 4)
+
+ # +
+ # / \
+ # c +
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e = m.c + e1
+ #
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 3)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+ self.assertIs(e.arg(2), m.c)
+ self.assertEqual(e.size(), 4)
+
+ # +
+ # / \
+ # + +
+ # / \ / \
+ # a b c d
+ e1 = m.a + m.b
+ e2 = m.c + m.d
+ e = e1 + e2
+ #
+ self.assertIs(type(e), expectedType)
+ self.assertEqual(e.nargs(), 4)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+ self.assertIs(e.arg(2), m.c)
+ self.assertIs(e.arg(3), m.d)
+ self.assertEqual(e.size(), 5)
+
+ def test_nestedSum2(self):
+ #
+ # Check the structure of nested sums
+ #
+ expectedType = EXPR.SumExpression
+
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.d = Var()
+
+ # +
+ # / \
+ # * c
+ # / \
+ # 2 +
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e = 2*e1 + m.c
+
+ self.assertIs(type(e), expectedType)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0).arg(1), e1)
+ self.assertIs(e.arg(1), m.c)
+ self.assertEqual(e.size(), 7)
+
+ # *
+ # / \
+ # 3 +
+ # / \
+ # * c
+ # / \
+ # 2 +
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e = 3*(2*e1 + m.c)
+
+ self.assertIs(type(e.arg(1)), expectedType)
+ self.assertEqual(e.arg(1).nargs(), 2)
+ self.assertIs(e.arg(1).arg(0).arg(1), e1)
+ self.assertIs(e.arg(1).arg(1), m.c)
+ self.assertEqual(e.size(), 9)
+
+ def test_trivialSum(self):
+ #
+ # Check that adding zero doesn't change the expression
+ #
+ m = AbstractModel()
+ m.a = Var()
+ e = m.a + 0
+ self.assertIs(type(e), type(m.a))
+ self.assertIs(e, m.a)
+
+ e = 0 + m.a
+ self.assertIs(type(e), type(m.a))
+ self.assertIs(e, m.a)
+ #
+ # Adding zero to a viewsum will not change the sum
+ #
+ e = m.a + m.a
+ f = e + 0
+ self.assertEqual(id(e), id(f))
+
+ def test_sumOf_nestedTrivialProduct(self):
+ #
+ # Check sums with nested products
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+
+ # +
+ # / \
+ # * b
+ # / \
+ # a 5
+ e1 = m.a * 5
+ e = e1 + m.b
+ #
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0).arg(0), 5)
+ self.assertIs(e.arg(0).arg(1), m.a)
+ self.assertIs(e.arg(1), m.b)
+ self.assertEqual(e.size(), 5)
+
+ # +
+ # / \
+ # b *
+ # / \
+ # a 5
+ e = m.b + e1
+ #
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.b)
+ self.assertIs(e.arg(1).arg(0), 5)
+ self.assertIs(e.arg(1).arg(1), m.a)
+ self.assertEqual(e.size(), 5)
+
+ # +
+ # / \
+ # * +
+ # / \ / \
+ # a 5 b c
+ e2 = m.b + m.c
+ e = e1 + e2
+ #
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 3)
+ self.assertIs(e.arg(0), m.b)
+ self.assertIs(e.arg(1), m.c)
+ self.assertIs(e.arg(2).arg(0), 5)
+ self.assertIs(e.arg(2).arg(1), m.a)
+ self.assertEqual(e.size(), 6)
+
+ # +
+ # / \
+ # + *
+ # / \ / \
+ # b c a 5
+ e2 = m.b + m.c
+ e = e2 + e1
+
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 3)
+ self.assertIs(e.arg(0), m.b)
+ self.assertIs(e.arg(1), m.c)
+ self.assertIs(e.arg(2).arg(0), 5)
+ self.assertIs(e.arg(2).arg(1), m.a)
+ self.assertEqual(e.size(), 6)
+
+ def test_simpleDiff(self):
+ #
+ # Check the structure of a simple difference with two variables
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+
+ # -
+ # / \
+ # a b
+ e = m.a - m.b
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(type(e.arg(1)), EXPR.MonomialTermExpression)
+ self.assertEqual(e.arg(1).arg(0), -1)
+ self.assertIs(e.arg(1).arg(1), m.b)
+
+ def test_constDiff(self):
+ #
+ # Check the structure of a simple difference with a constant
+ #
+ m = AbstractModel()
+ m.a = Var()
+
+ # -
+ # / \
+ # a 5
+ e = m.a - 5
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.a)
+ self.assertEqual(e.arg(1), -5)
+ self.assertEqual(e.size(), 3)
+
+ # -
+ # / \
+ # 5 a
+ e = 5 - m.a
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), 5)
+ self.assertIs(type(e.arg(1)), EXPR.MonomialTermExpression)
+ self.assertIs(e.arg(1).arg(0), -1)
+ self.assertIs(e.arg(1).arg(1), m.a)
+ self.assertEqual(e.size(), 5)
+
+ def test_paramDiff(self):
+ #
+ # Check the structure of a simple difference with a constant
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.p = Param()
+
+ # -
+ # / \
+ # a p
+ e = m.a - m.p
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(type(e.arg(1)), EXPR.NPV_NegationExpression)
+ self.assertIs(e.arg(1).arg(0), m.p)
+ self.assertEqual(e.size(), 4)
+
+ # -
+ # / \
+ # m.p a
+ e = m.p - m.a
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.p)
+ self.assertIs(type(e.arg(1)), EXPR.MonomialTermExpression)
+ self.assertEqual(e.arg(1).arg(0), -1)
+ self.assertIs(e.arg(1).arg(1), m.a)
+ self.assertEqual(e.size(), 5)
+
+ def test_constparamDiff(self):
+ #
+ # Check the structure of a simple difference with a constant
+ #
+ m = ConcreteModel()
+ m.a = Var()
+ m.p = Param(initialize=0)
+
+ # -
+ # / \
+ # a p
+ e = m.a - m.p
+ self.assertIs(type(e), type(m.a))
+ self.assertIs(e, m.a)
+
+ # -
+ # / \
+ # m.p a
+ e = m.p - m.a
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertEqual(e.arg(0), -1)
+ self.assertIs(e.arg(1), m.a)
+
+ def test_termDiff(self):
+ #
+ # Check the structure of a simple difference with a term
+ #
+ m = ConcreteModel()
+ m.a = Var()
+
+ #
+ # -
+ # / \
+ # 5 *
+ # / \
+ # 2 a
+ #
+
+ e = 5 - 2*m.a
+
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.arg(0), 5)
+ self.assertIs(type(e.arg(1)), EXPR.MonomialTermExpression)
+ self.assertEqual(e.arg(1).arg(0), -2)
+ self.assertIs(e.arg(1).arg(1), m.a)
+
+ def test_nestedDiff(self):
+ #
+ # Check the structure of nested differences
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.d = Var()
+
+ # -
+ # / \
+ # - 5
+ # / \
+ # a b
+ e1 = m.a - m.b
+ e = e1 - 5
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1).__class__, EXPR.MonomialTermExpression)
+ self.assertIs(e.arg(1).arg(0), -1)
+ self.assertIs(e.arg(1).arg(1), m.b)
+ self.assertIs(e.arg(2), -5)
+ self.assertEqual(e.size(), 6)
+
+ # -
+ # / \
+ # 5 -
+ # / \
+ # a b
+ e1 = m.a - m.b
+ e = 5 - e1
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertIs(e.arg(0), 5)
+ self.assertIs(type(e.arg(1)), EXPR.NegationExpression)
+ self.assertIs(e.arg(1).arg(0), e1)
+ self.assertEqual(e.size(), 8)
+
+ # -
+ # / \
+ # - c
+ # / \
+ # a b
+ e1 = m.a - m.b
+ e = e1 - m.c
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1).__class__, EXPR.MonomialTermExpression)
+ self.assertEqual(e.arg(1).arg(0), -1)
+ self.assertIs(e.arg(1).arg(1), m.b)
+ self.assertIs(type(e.arg(2)), EXPR.MonomialTermExpression)
+ self.assertEqual(e.arg(2).arg(0), -1)
+ self.assertIs(e.arg(2).arg(1), m.c)
+ self.assertEqual(e.size(), 8)
+
+ # -
+ # / \
+ # c -
+ # / \
+ # a b
+ e1 = m.a - m.b
+ e = m.c - e1
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertIs(e.arg(0), m.c)
+ self.assertIs(type(e.arg(1)), EXPR.NegationExpression)
+ self.assertIs(e.arg(1).arg(0), e1)
+ self.assertEqual(e.size(), 8)
+
+ # -
+ # / \
+ # - -
+ # / \ / \
+ # a b c d
+ e1 = m.a - m.b
+ e2 = m.c - m.d
+ e = e1 - e2
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1).arg(1), m.b)
+ self.assertIs(e.arg(2).arg(0), e2)
+ self.assertEqual(e.size(), 11)
+
+ def test_negation_param(self):
+ #
+ # Check logic for negations with uninitialize params
+ #
+ m = AbstractModel()
+ m.p = Param()
+ e = - m.p
+ self.assertIs(type(e), EXPR.NPV_NegationExpression)
+ e = - e
+ self.assertTrue(isinstance(e, Param))
+
+ def test_negation_mutableparam(self):
+ #
+ # Check logic for negations with mutable params
+ #
+ m = AbstractModel()
+ m.p = Param(mutable=True, initialize=1.0)
+ e = - m.p
+ self.assertIs(type(e), EXPR.NPV_NegationExpression)
+ e = - e
+ self.assertTrue(isinstance(e, Param))
+
+ def test_negation_terms(self):
+ #
+ # Check logic for negations with mutable params
+ #
+ m = AbstractModel()
+ m.v = Var()
+ m.p = Param(mutable=True, initialize=1.0)
+ e = - m.p*m.v
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertIs(type(e.arg(0)), EXPR.NPV_NegationExpression)
+ e = - e
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertIs(type(e.arg(0)), EXPR.NPV_NegationExpression)
+ #
+ e = - 5*m.v
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.arg(0), -5)
+ e = - e
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.arg(0), 5)
+
+ def test_trivialDiff(self):
+ #
+ # Check that subtracting zero doesn't change the expression
+ #
+ m = ConcreteModel()
+ m.a = Var()
+ m.p = Param(mutable=True)
+
+ # a - 0
+ e = m.a - 0
+ self.assertIs(type(e), type(m.a))
+ self.assertIs(e, m.a)
+
+ # 0 - a
+ e = 0 - m.a
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertEqual(e.arg(0), -1)
+ self.assertIs(e.arg(1), m.a)
+
+ # p - 0
+ e = m.p - 0
+ self.assertIs(type(e), type(m.p))
+ self.assertIs(e, m.p)
+
+ # 0 - p
+ e = 0 - m.p
+ self.assertIs(type(e), EXPR.NPV_NegationExpression)
+ self.assertEqual(e.nargs(), 1)
+ self.assertIs(e.arg(0), m.p)
+
+ # 0 - 5*a
+ e = 0 - 5*m.a
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertEqual(e.arg(0), -5)
+
+ # 0 - p*a
+ e = 0 - m.p*m.a
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(type(e.arg(0)), EXPR.NPV_NegationExpression)
+ self.assertIs(e.arg(0).arg(0), m.p)
+
+ # 0 - a*a
+ e = 0 - m.a*m.a
+ self.assertIs(type(e), EXPR.NegationExpression)
+ self.assertEqual(e.nargs(), 1)
+ self.assertIs(type(e.arg(0)), EXPR.ProductExpression)
+
+ def test_sumOf_nestedTrivialProduct2(self):
+ #
+ # Check the structure of sum of products
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+
+ # -
+ # / \
+ # * b
+ # / \
+ # a 5
+ e1 = m.a * 5
+ e = e1 - m.b
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertIs(e.arg(0), e1)
+ self.assertIs(type(e.arg(1)), EXPR.MonomialTermExpression)
+ self.assertEqual(e.arg(1).arg(0), -1)
+ self.assertIs(e.arg(1).arg(1), m.b)
+ self.assertEqual(e.size(), 7)
+
+ # -
+ # / \
+ # b *
+ # / \
+ # a 5
+ e1 = m.a * 5
+ e = m.b - e1
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.b)
+ self.assertIs(e.arg(1).arg(0), -5)
+ self.assertIs(e.arg(1).arg(1), m.a)
+ self.assertEqual(e.size(), 5)
+
+ # -
+ # / \
+ # * -
+ # / \ / \
+ # a 5 b c
+ e1 = m.a * 5
+ e2 = m.b - m.c
+ e = e1 - e2
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertIs(e.arg(0), e1)
+ self.assertIs(type(e.arg(1)), EXPR.NegationExpression)
+ self.assertIs(e.arg(1).arg(0), e2)
+ self.assertEqual(e.size(), 10)
+
+ # -
+ # / \
+ # - *
+ # / \ / \
+ # b c a 5
+ e1 = m.a * 5
+ e2 = m.b - m.c
+ e = e2 - e1
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertIs(e.arg(0), m.b)
+ self.assertIs(type(e.arg(1)), EXPR.MonomialTermExpression)
+ self.assertEqual(e.arg(1).arg(0), -1)
+ self.assertIs(e.arg(1).arg(1), m.c)
+ self.assertIs(e.arg(2).arg(0), -5)
+ self.assertIs(e.arg(2).arg(1), m.a)
+ self.assertEqual(e.size(), 8)
+
+ def test_sumOf_nestedTrivialProduct2(self):
+ #
+ # Check the structure of sum of products
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.p = Param(initialize=5, mutable=True)
+
+ # -
+ # / \
+ # * b
+ # / \
+ # a 5
+ e1 = m.a * m.p
+ e = e1 - m.b
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertIs(e.arg(0), e1)
+ self.assertIs(type(e.arg(1)), EXPR.MonomialTermExpression)
+ self.assertEqual(e.arg(1).arg(0), -1)
+ self.assertIs(e.arg(1).arg(1), m.b)
+ self.assertEqual(e.size(), 7)
+
+ # -
+ # / \
+ # b *
+ # / \
+ # a 5
+ e1 = m.a * m.p
+ e = m.b - e1
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.b)
+ self.assertIs(type(e.arg(1)), EXPR.MonomialTermExpression)
+ self.assertIs(type(e.arg(1).arg(0)), EXPR.NPV_NegationExpression)
+ self.assertIs(e.arg(1).arg(0).arg(0), m.p)
+ self.assertIs(e.arg(1).arg(1), m.a)
+ self.assertEqual(e.size(), 6)
+
+ # -
+ # / \
+ # * -
+ # / \ / \
+ # a 5 b c
+ e1 = m.a * m.p
+ e2 = m.b - m.c
+ e = e1 - e2
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertIs(e.arg(0), e1)
+ self.assertIs(type(e.arg(1)), EXPR.NegationExpression)
+ self.assertIs(e.arg(1).arg(0), e2)
+ self.assertEqual(e.size(), 10)
+
+ # -
+ # / \
+ # - *
+ # / \ / \
+ # b c a 5
+ e1 = m.a * m.p
+ e2 = m.b - m.c
+ e = e2 - e1
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertIs(e.arg(0), m.b)
+ self.assertIs(type(e.arg(1)), EXPR.MonomialTermExpression)
+ self.assertEqual(e.arg(1).arg(0), -1)
+ self.assertIs(e.arg(1).arg(1), m.c)
+ self.assertIs(type(e.arg(2)), EXPR.MonomialTermExpression)
+ self.assertIs(type(e.arg(2).arg(0)), EXPR.NPV_NegationExpression)
+ self.assertIs(e.arg(2).arg(0).arg(0), m.p)
+ self.assertIs(e.arg(2).arg(1), m.a)
+ self.assertEqual(e.size(), 9)
+
+
+class TestGenerate_ProductExpression(unittest.TestCase):
+
+ def test_simpleProduct(self):
+ #
+ # Check the structure of a simple product of variables
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+
+ # *
+ # / \
+ # a b
+ e = m.a * m.b
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+ self.assertEqual(e.size(), 3)
+
+ def test_constProduct(self):
+ #
+ # Check the structure of a simple product with a constant
+ #
+ m = AbstractModel()
+ m.a = Var()
+
+ # *
+ # / \
+ # a 5
+ e = m.a * 5
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertEqual(e.arg(0), 5)
+ self.assertIs(e.arg(1), m.a)
+ self.assertEqual(e.size(), 3)
+
+ # *
+ # / \
+ # 5 a
+ e = 5 * m.a
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), 5)
+ self.assertIs(e.arg(1), m.a)
+ self.assertEqual(e.size(), 3)
+
+ def test_nestedProduct(self):
+ #
+ # Check the structure of nested products
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.d = Var()
+
+ # *
+ # / \
+ # * 5
+ # / \
+ # a b
+ e1 = m.a * m.b
+ e = e1 * 5
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertEqual(e.arg(1), 5)
+ self.assertIs(type(e.arg(0)), EXPR.ProductExpression)
+ self.assertIs(e.arg(0).arg(0), m.a)
+ self.assertIs(e.arg(0).arg(1), m.b)
+ self.assertEqual(e.size(), 5)
+
+ # *
+ # / \
+ # 5 *
+ # / \
+ # a b
+ e1 = m.a * m.b
+ e = 5 * e1
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertEqual(e.arg(0), 5)
+ self.assertIs(type(e.arg(1)), EXPR.ProductExpression)
+ self.assertIs(e.arg(1).arg(0), m.a)
+ self.assertIs(e.arg(1).arg(1), m.b)
+ self.assertEqual(e.size(), 5)
+
+ # *
+ # / \
+ # * c
+ # / \
+ # a b
+ e1 = m.a * m.b
+ e = e1 * m.c
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(1), m.c)
+ self.assertIs(type(e.arg(0)), EXPR.ProductExpression)
+ self.assertIs(e.arg(0).arg(0), m.a)
+ self.assertIs(e.arg(0).arg(1), m.b)
+ self.assertEqual(e.size(), 5)
+
+ # *
+ # / \
+ # c *
+ # / \
+ # a b
+ e1 = m.a * m.b
+ e = m.c * e1
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.c)
+ self.assertIs(type(e.arg(1)), EXPR.ProductExpression)
+ self.assertIs(e.arg(1).arg(0), m.a)
+ self.assertIs(e.arg(1).arg(1), m.b)
+ self.assertEqual(e.size(), 5)
+
+ # *
+ # / \
+ # * *
+ # / \ / \
+ # a b c d
+ e1 = m.a * m.b
+ e2 = m.c * m.d
+ e = e1 * e2
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(type(e.arg(0)), EXPR.ProductExpression)
+ self.assertIs(type(e.arg(1)), EXPR.ProductExpression)
+ self.assertIs(e.arg(0).arg(0), m.a)
+ self.assertIs(e.arg(0).arg(1), m.b)
+ self.assertIs(e.arg(1).arg(0), m.c)
+ self.assertIs(e.arg(1).arg(1), m.d)
+ self.assertEqual(e.size(), 7)
+
+ def test_nestedProduct2(self):
+ #
+ # Check the structure of nested products
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.d = Var()
+
+ #
+ # Check the structure of nested products
+ #
+ # *
+ # / \
+ # + +
+ # / \ / \
+ # c + d
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e2 = m.c + e1
+ e3 = e1 + m.d
+ e = e2 * e3
+
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+
+ self.assertIs(type(e.arg(0)), EXPR.SumExpression)
+ self.assertIs(e.arg(0).nargs(), 3)
+ self.assertIs(e.arg(0).arg(0), m.a)
+ self.assertIs(e.arg(0).arg(1), m.b)
+ self.assertIs(e.arg(0).arg(2), m.c)
+
+ self.assertIs(type(e.arg(1)), EXPR.SumExpression)
+ self.assertIs(e.arg(1).nargs(), 2)
+ self.assertIs(e.arg(1).arg(1), m.d)
+ self.assertEqual(e.size(), 10)
+
+ #
+ # Check the structure of nested products
+ #
+ # *
+ # / \
+ # * *
+ # / \ / \
+ # c + d
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e2 = m.c * e1
+ e3 = e1 * m.d
+ e = e2 * e3
+ #
+ self.assertEqual(e.size(), 11)
+ #
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+
+ self.assertIs(type(e.arg(0)), EXPR.ProductExpression)
+ self.assertIs(e.arg(0).nargs(), 2)
+ self.assertIs(e.arg(0).arg(0), m.c)
+
+ self.assertIs(type(e.arg(0).arg(1)), EXPR.SumExpression)
+ self.assertIs(e.arg(0).arg(1).nargs(), 2)
+ self.assertIs(e.arg(0).arg(1).arg(0), m.a)
+ self.assertIs(e.arg(0).arg(1).arg(1), m.b)
+
+ self.assertIs(type(e.arg(1)), EXPR.ProductExpression)
+ self.assertIs(e.arg(1).nargs(), 2)
+ self.assertIs(e.arg(1).arg(1), m.d)
+
+ self.assertIs(type(e.arg(1).arg(0)), EXPR.SumExpression)
+ self.assertIs(e.arg(1).arg(0).nargs(), 2)
+ self.assertIs(e.arg(1).arg(0).arg(0), m.a)
+ self.assertIs(e.arg(1).arg(0).arg(1), m.b)
+ self.assertEqual(e.size(), 11)
+
+ def test_nestedProduct3(self):
+ #
+ # Check the structure of nested products
+ #
+ m = AbstractModel()
+ m.a = Param(mutable=True)
+ m.b = Var()
+ m.c = Var()
+ m.d = Var()
+
+ # *
+ # / \
+ # * 5
+ # / \
+ # 3 b
+ e1 = 3 * m.b
+ e = e1 * 5
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertEqual(e.arg(0), 15)
+ self.assertIs(e.arg(1), m.b)
+ self.assertEqual(e.size(), 3)
+
+ # *
+ # / \
+ # * 5
+ # / \
+ # a b
+ e1 = m.a * m.b
+ e = e1 * 5
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(type(e.arg(0)), EXPR.NPV_ProductExpression)
+ self.assertEqual(e.arg(0).arg(0), 5)
+ self.assertIs(e.arg(0).arg(1), m.a)
+ self.assertIs(e.arg(1), m.b)
+ self.assertEqual(e.size(), 5)
+
+ # *
+ # / \
+ # 5 *
+ # / \
+ # 3 b
+ e1 = 3 * m.b
+ e = 5 * e1
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertEqual(e.arg(0), 15)
+ self.assertIs(e.arg(1), m.b)
+ self.assertEqual(e.size(), 3)
+
+ # *
+ # / \
+ # 5 *
+ # / \
+ # a b
+ e1 = m.a * m.b
+ e = 5 * e1
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(type(e.arg(0)), EXPR.NPV_ProductExpression)
+ self.assertEqual(e.arg(0).arg(0), 5)
+ self.assertIs(e.arg(0).arg(1), m.a)
+ self.assertIs(e.arg(1), m.b)
+ self.assertEqual(e.size(), 5)
+
+ # *
+ # / \
+ # * c
+ # / \
+ # a b
+ e1 = m.a * m.b
+ e = e1 * m.c
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(1), m.c)
+ self.assertIs(type(e.arg(0)), EXPR.MonomialTermExpression)
+ self.assertIs(e.arg(0).arg(0), m.a)
+ self.assertIs(e.arg(0).arg(1), m.b)
+ self.assertEqual(e.size(), 5)
+
+ # *
+ # / \
+ # c *
+ # / \
+ # a b
+ e1 = m.a * m.b
+ e = m.c * e1
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.c)
+ self.assertIs(type(e.arg(1)), EXPR.MonomialTermExpression)
+ self.assertIs(e.arg(1).arg(0), m.a)
+ self.assertIs(e.arg(1).arg(1), m.b)
+ self.assertEqual(e.size(), 5)
+
+ # *
+ # / \
+ # * *
+ # / \ / \
+ # a b c d
+ e1 = m.a * m.b
+ e2 = m.c * m.d
+ e = e1 * e2
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(type(e.arg(0)), EXPR.MonomialTermExpression)
+ self.assertIs(type(e.arg(1)), EXPR.ProductExpression)
+ self.assertIs(e.arg(0).arg(0), m.a)
+ self.assertIs(e.arg(0).arg(1), m.b)
+ self.assertIs(e.arg(1).arg(0), m.c)
+ self.assertIs(e.arg(1).arg(1), m.d)
+ self.assertEqual(e.size(), 7)
+
+
+ def test_trivialProduct(self):
+ #
+ # Check that multiplying by zero gives zero
+ #
+ m = ConcreteModel()
+ m.a = Var()
+ m.p = Param(initialize=0)
+ m.q = Param(initialize=1)
+
+ e = m.a * 0
+ self.assertIs(type(e), int)
+ self.assertEqual(e, 0)
+
+ e = 0 * m.a
+ self.assertIs(type(e), int)
+ self.assertEqual(e, 0)
+
+ e = m.a * m.p
+ self.assertIs(type(e), int)
+ self.assertEqual(e, 0)
+
+ e = m.p * m.a
+ self.assertIs(type(e), int)
+ self.assertEqual(e, 0)
+
+ #
+ # Check that multiplying by one gives the original expression
+ #
+ e = m.a * 1
+ self.assertIs(type(e), type(m.a))
+ self.assertIs(e, m.a)
+
+ e = 1 * m.a
+ self.assertIs(type(e), type(m.a))
+ self.assertIs(e, m.a)
+
+ e = m.a * m.q
+ self.assertIs(type(e), type(m.a))
+ self.assertIs(e, m.a)
+
+ e = m.q * m.a
+ self.assertIs(type(e), type(m.a))
+ self.assertIs(e, m.a)
+
+ #
+ # Check that numeric constants are simply muliplied out
+ #
+ e = NumericConstant(3) * NumericConstant(2)
+ self.assertIs(type(e), int)
+ self.assertEqual(e, 6)
+
+ def test_simpleDivision(self):
+ #
+ # Check the structure of a simple division with variables
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+
+ # /
+ # / \
+ # a b
+ e = m.a / m.b
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(type(e.arg(1)), EXPR.ReciprocalExpression)
+ self.assertIs(e.arg(1).arg(0), m.b)
+ self.assertEqual(e.size(), 4)
+
+ def test_constDivision(self):
+ #
+ # Check the structure of a simple division with a constant
+ #
+ m = AbstractModel()
+ m.a = Var()
+
+ # /
+ # / \
+ # a 5
+ e = m.a / 5
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertAlmostEqual(e.arg(0), 0.2)
+ self.assertIs(e.arg(1), m.a)
+ self.assertEqual(e.size(), 3)
+
+ # /
+ # / \
+ # 5 a
+ e = 5 / m.a
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertEqual(e.arg(0), 5)
+ self.assertIs(type(e.arg(1)), EXPR.ReciprocalExpression)
+ self.assertIs(e.arg(1).arg(0), m.a)
+ self.assertEqual(e.size(), 4)
+
+ def test_nestedDivision(self):
+ #
+ # Check the structure of nested divisions
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.d = Var()
+
+ # /
+ # / \
+ # * 5
+ # / \
+ # 3 b
+ e1 = 3 * m.b
+ e = e1 / 5
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertEqual(e.arg(0), 3./5)
+ self.assertIs(e.arg(1), m.b)
+ self.assertEqual(e.size(), 3)
+
+ # /
+ # / \
+ # / 5
+ # / \
+ # a b
+ e1 = m.a / m.b
+ e = e1 / 5
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertEqual(e.arg(1), 1./5)
+ self.assertIs(type(e.arg(0)), EXPR.ProductExpression)
+ self.assertIs(e.arg(0).arg(0), m.a)
+ self.assertIs(type(e.arg(0).arg(1)), EXPR.ReciprocalExpression)
+ self.assertIs(e.arg(0).arg(1).arg(0), m.b)
+ self.assertEqual(e.size(), 6)
+
+ # /
+ # / \
+ # 5 /
+ # / \
+ # a b
+ e1 = m.a / m.b
+ e = 5 / e1
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertEqual(e.arg(0), 5)
+ self.assertIs(type(e.arg(1)), EXPR.ReciprocalExpression)
+ self.assertIs(type(e.arg(1).arg(0)), EXPR.ProductExpression)
+ self.assertIs(e.arg(1).arg(0).arg(0), m.a)
+ self.assertIs(e.arg(1).arg(0).arg(1).arg(0), m.b)
+ self.assertEqual(e.size(), 7)
+
+ # /
+ # / \
+ # / c
+ # / \
+ # a b
+ e1 = m.a / m.b
+ e = e1 / m.c
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(type(e.arg(1)), EXPR.ReciprocalExpression)
+ self.assertIs(e.arg(1).arg(0), m.c)
+ self.assertIs(type(e.arg(0)), EXPR.ProductExpression)
+ self.assertIs(e.arg(0).arg(0), m.a)
+ self.assertIs(type(e.arg(0).arg(1)), EXPR.ReciprocalExpression)
+ self.assertIs(e.arg(0).arg(1).arg(0), m.b)
+ self.assertEqual(e.size(), 7)
+
+ # /
+ # / \
+ # c /
+ # / \
+ # a b
+ e1 = m.a / m.b
+ e = m.c / e1
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.c)
+ self.assertIs(type(e.arg(1)), EXPR.ReciprocalExpression)
+ self.assertIs(e.arg(1).arg(0).arg(0), m.a)
+ self.assertIs(e.arg(1).arg(0).arg(1).arg(0), m.b)
+ self.assertEqual(e.size(), 7)
+
+ # /
+ # / \
+ # / /
+ # / \ / \
+ # a b c d
+ e1 = m.a / m.b
+ e2 = m.c / m.d
+ e = e1 / e2
+ self.assertIs(type(e), EXPR.ProductExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(type(e.arg(0)), EXPR.ProductExpression)
+ self.assertIs(type(e.arg(1)), EXPR.ReciprocalExpression)
+ self.assertIs(e.arg(0).arg(0), m.a)
+ self.assertIs(e.arg(0).arg(1).arg(0), m.b)
+ self.assertIs(e.arg(1).arg(0).arg(0), m.c)
+ self.assertIs(e.arg(1).arg(0).arg(1).arg(0), m.d)
+ self.assertEqual(e.size(), 10)
+
+ def test_trivialDivision(self):
+ #
+ # Check that dividing by zero generates an exception
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.p = Param()
+ m.q = Param(initialize=2)
+ m.r = Param(mutable=True)
+ self.assertRaises(ZeroDivisionError, m.a.__div__, 0)
+
+ #
+ # Check that dividing zero by anything non-zero gives zero
+ #
+ e = 0 / m.a
+ self.assertIs(type(e), int)
+ self.assertAlmostEqual(e, 0.0)
+
+ #
+ # Check that dividing by one 1 gives the original expression
+ #
+ e = m.a / 1
+ self.assertIs(type(e), type(m.a))
+ self.assertIs(e, m.a)
+
+ #
+ # Check the structure dividing 1 by an expression
+ #
+ e = 1 / m.a
+ self.assertIs(type(e), EXPR.ReciprocalExpression)
+ self.assertEqual(e.nargs(), 1)
+ self.assertIs(e.arg(0), m.a)
+
+ #
+ # Check the structure dividing 1 by an expression
+ #
+ e = 1 / m.p
+ self.assertIs(type(e), EXPR.NPV_ReciprocalExpression)
+ self.assertEqual(e.nargs(), 1)
+ self.assertIs(e.arg(0), m.p)
+
+ #
+ # Check the structure dividing 1 by an expression
+ #
+ e = 1 / m.q
+ self.assertIs(type(e), EXPR.NPV_ReciprocalExpression)
+ self.assertEqual(e.nargs(), 1)
+ self.assertIs(e.arg(0), m.q)
+
+ #
+ # Check the structure dividing 1 by an expression
+ #
+ e = 1 / m.r
+ self.assertIs(type(e), EXPR.NPV_ReciprocalExpression)
+ self.assertEqual(e.nargs(), 1)
+ self.assertIs(e.arg(0), m.r)
+
+ #
+ # Check that dividing two non-zero constants gives a constant
+ #
+ e = NumericConstant(3) / NumericConstant(2)
+ self.assertIs(type(e), float)
+ self.assertEqual(e, 1.5)
+
+
+class TestGenerate_RelationalExpression(unittest.TestCase):
+
+ def setUp(self):
+ m = AbstractModel()
+ m.I = Set()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.x = Var(m.I)
+ self.m = m
+
+ def tearDown(self):
+ self.m = None
+
+ def test_simpleEquality(self):
+ #
+ # Check the structure of a simple equality statement
+ #
+ m = self.m
+ e = m.a == m.b
+ self.assertIs(type(e), EXPR.EqualityExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+
+ def test_equalityErrors(self):
+ #
+ # Check equality errors
+ #
+ m = self.m
+ e = m.a == m.b
+ # =
+ # / \
+ # = 5
+ # / \
+ # a b
+ # Python 2.7 supports better testing of exceptions
+ if sys.hexversion >= 0x02070000:
+ self.assertRaisesRegexp(TypeError, "EqualityExpression .*"
+ "sub-expressions is a relational",
+ e.__eq__, m.a)
+ self.assertRaisesRegexp(TypeError, "EqualityExpression .*"
+ "sub-expressions is a relational",
+ m.a.__eq__, e)
+
+ # NB: cannot test the reverse here: _VarArray (correctly)
+ # does not define __eq__
+ self.assertRaisesRegexp(TypeError, "Argument .*"
+ "is an indexed numeric value",
+ m.a.__eq__, m.x)
+ else:
+ self.assertRaises(TypeError, e.__eq__, m.a)
+ self.assertRaises(TypeError, m.a.__eq__, e)
+ self.assertRaises(TypeError, m.a.__eq__, m.x)
+
+ try:
+ e == m.a
+ self.fail("expected nested equality expression to raise TypeError")
+ except TypeError:
+ pass
+
+ try:
+ m.a == e
+ self.fail("expected nested equality expression to raise TypeError")
+ except TypeError:
+ pass
+
+ #
+ # Test expression with an indexed variable
+ #
+ try:
+ m.x == m.a
+ self.fail("expected use of indexed variable to raise TypeError")
+ except TypeError:
+ pass
+
+ try:
+ m.a == m.x
+ self.fail("expected use of indexed variable to raise TypeError")
+ except TypeError:
+ pass
+
+ def test_simpleInequality1(self):
+ #
+ # Check the structure of a simple inequality
+ #
+ m = self.m
+ # <
+ # / \
+ # a b
+ e = m.a < m.b
+ self.assertIs(type(e), EXPR.InequalityExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+ #self.assertEqual(len(e._strict), 1)
+ self.assertEqual(e._strict, True)
+
+ # <=
+ # / \
+ # a b
+ e = m.a <= m.b
+ self.assertIs(type(e), EXPR.InequalityExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+ #self.assertEqual(len(e._strict), 1)
+ self.assertEqual(e._strict, False)
+
+ # >
+ # / \
+ # a b
+ e = m.a > m.b
+ self.assertIs(type(e), EXPR.InequalityExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.b)
+ self.assertIs(e.arg(1), m.a)
+ #self.assertEqual(len(e._strict), 1)
+ self.assertEqual(e._strict, True)
+
+ # >=
+ # / \
+ # a b
+ e = m.a >= m.b
+ self.assertIs(type(e), EXPR.InequalityExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.b)
+ self.assertIs(e.arg(1), m.a)
+ #self.assertEqual(len(e._strict), 1)
+ self.assertEqual(e._strict, False)
+
+ def test_simpleInequality2(self):
+ #
+ # Check the structure of a simple inequality
+ #
+ m = self.m
+ # <
+ # / \
+ # a b
+ e = inequality(lower=m.a, body=m.b, strict=True)
+ self.assertIs(type(e), EXPR.InequalityExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+ #self.assertEqual(len(e._strict), 1)
+ self.assertEqual(e._strict, True)
+
+ # <=
+ # / \
+ # a b
+ e = inequality(lower=m.a, upper=m.b)
+ self.assertIs(type(e), EXPR.InequalityExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+ #self.assertEqual(len(e._strict), 1)
+ self.assertEqual(e._strict, False)
+
+ # >
+ # / \
+ # a b
+ e = inequality(lower=m.b, upper=m.a, strict=True)
+ self.assertIs(type(e), EXPR.InequalityExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.b)
+ self.assertIs(e.arg(1), m.a)
+ #self.assertEqual(len(e._strict), 1)
+ self.assertEqual(e._strict, True)
+
+ # >=
+ # / \
+ # a b
+ e = m.a >= m.b
+ e = inequality(body=m.b, upper=m.a)
+ self.assertIs(type(e), EXPR.InequalityExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), m.b)
+ self.assertIs(e.arg(1), m.a)
+ #self.assertEqual(len(e._strict), 1)
+ self.assertEqual(e._strict, False)
+
+ try:
+ inequality(None, None)
+ self.fail("expected invalid inequality error.")
+ except ValueError:
+ pass
+
+ try:
+ inequality(m.a, None)
+ self.fail("expected invalid inequality error.")
+ except ValueError:
+ pass
+
+
+class TestGenerate_RangedExpression(unittest.TestCase):
+
+ def setUp(self):
+ m = AbstractModel()
+ m.I = Set()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.x = Var(m.I)
+ self.m = m
+
+ def tearDown(self):
+ self.m = None
+
+ def test_compoundInequality(self):
+ m = self.m
+ # <
+ # / \
+ # < c
+ # / \
+ # a b
+ e = inequality(m.a, m.b, m.c, strict=True)
+ self.assertIs(type(e), EXPR.RangedExpression)
+ self.assertEqual(e.nargs(), 3)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+ self.assertIs(e.arg(2), m.c)
+ #self.assertEqual(len(e._strict), 2)
+ self.assertEqual(e._strict[0], True)
+ self.assertEqual(e._strict[1], True)
+
+ # <=
+ # / \
+ # <= c
+ # / \
+ # a b
+ e = inequality(m.a, m.b, m.c)
+ self.assertIs(type(e), EXPR.RangedExpression)
+ self.assertEqual(e.nargs(), 3)
+ self.assertIs(e.arg(0), m.a)
+ self.assertIs(e.arg(1), m.b)
+ self.assertIs(e.arg(2), m.c)
+ #self.assertEqual(len(e._strict), 2)
+ self.assertEqual(e._strict[0], False)
+ self.assertEqual(e._strict[1], False)
+
+ # >
+ # / \
+ # > c
+ # / \
+ # a b
+ e = inequality(upper=m.c, body=m.b, lower=m.a, strict=True)
+ self.assertIs(type(e), EXPR.RangedExpression)
+ self.assertEqual(e.nargs(), 3)
+ self.assertIs(e.arg(2), m.c)
+ self.assertIs(e.arg(1), m.b)
+ self.assertIs(e.arg(0), m.a)
+ #self.assertEqual(len(e._strict), 2)
+ self.assertEqual(e._strict[0], True)
+ self.assertEqual(e._strict[1], True)
+
+ # >=
+ # / \
+ # >= c
+ # / \
+ # a b
+ e = inequality(upper=m.c, body=m.b, lower=m.a)
+ self.assertIs(type(e), EXPR.RangedExpression)
+ self.assertEqual(e.nargs(), 3)
+ self.assertIs(e.arg(2), m.c)
+ self.assertIs(e.arg(1), m.b)
+ self.assertIs(e.arg(0), m.a)
+ #self.assertEqual(len(e._strict), 2)
+ self.assertEqual(e._strict[0], False)
+ self.assertEqual(e._strict[1], False)
+
+ # <=
+ # / \
+ # <= 0
+ # / \
+ # 0 a
+ e = inequality(0, m.a, 0)
+ self.assertIs(type(e), EXPR.RangedExpression)
+ self.assertEqual(e.nargs(), 3)
+ self.assertIs(e.arg(2), 0)
+ self.assertIs(e.arg(1), m.a)
+ self.assertIs(e.arg(0), 0)
+ #self.assertEqual(len(e._strict), 2)
+ self.assertEqual(e._strict[0], False)
+ self.assertEqual(e._strict[1], False)
+
+ # <
+ # / \
+ # < 0
+ # / \
+ # 0 a
+ e = inequality(0, m.a, 0, True)
+ self.assertIs(type(e), EXPR.RangedExpression)
+ self.assertEqual(e.nargs(), 3)
+ self.assertIs(e.arg(2), 0)
+ self.assertIs(e.arg(1), m.a)
+ self.assertIs(e.arg(0), 0)
+ #self.assertEqual(len(e._strict), 2)
+ self.assertEqual(e._strict[0], True)
+ self.assertEqual(e._strict[1], True)
+
+ def test_val1(self):
+ m = ConcreteModel()
+ m.v = Var(initialize=2)
+
+ e = inequality(0, m.v, 2)
+ self.assertEqual(e.__nonzero__(), True)
+ e = inequality(0, m.v, 1)
+ self.assertEqual(e.__nonzero__(), False)
+ e = inequality(0, m.v, 2, strict=True)
+ self.assertEqual(e.__nonzero__(), False)
+
+ def test_val2(self):
+ m = ConcreteModel()
+ m.v = Var(initialize=2)
+
+ e = 1 < m.v
+ e = e <= 2
+ self.assertEqual(e.__nonzero__(), True)
+ e = 1 <= m.v
+ e = e < 2
+ self.assertEqual(e.__nonzero__(), False)
+
+
+@unittest.skipIf(not EXPR._using_chained_inequality, "Skipping tests of chained inequalities")
+class TestGenerate_ChainedRelationalExpression(unittest.TestCase):
+
+ def setUp(self):
+ m = AbstractModel()
+ m.I = Set()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.x = Var(m.I)
+ self.m = m
+
+ def tearDown(self):
+ self.m = None
+
+ def test_eval_compoundInequality(self):
+ #
+ # Evaluate a compound inequality
+ #
+ m = ConcreteModel()
+ m.x = Var(initialize=0)
+
+ # Implicit equalities
+ self.assertTrue( 0 <= m.x <= 0 )
+ self.assertIsNone(EXPR._chainedInequality.prev)
+ self.assertFalse( 1 <= m.x <= 1 )
+ self.assertIsNone(EXPR._chainedInequality.prev)
+ self.assertFalse( -1 <= m.x <= -1 )
+ self.assertIsNone(EXPR._chainedInequality.prev)
+
+ # Chained inequalities
+ self.assertTrue( 0 <= m.x <= 1 )
+ self.assertIsNone(EXPR._chainedInequality.prev)
+ self.assertFalse( 1 <= m.x <= 2 )
+ self.assertIsNone(EXPR._chainedInequality.prev)
+ self.assertTrue( -1 <= m.x <= 0 )
+ self.assertIsNone(EXPR._chainedInequality.prev)
+
+ # Chained inequalities
+ self.assertFalse( 0 < m.x <= 1 )
+ self.assertIsNone(EXPR._chainedInequality.prev)
+ self.assertTrue( 0 <= m.x < 1 )
+ self.assertIsNone(EXPR._chainedInequality.prev)
+ self.assertFalse( 0 < m.x < 1 )
+ self.assertIsNone(EXPR._chainedInequality.prev)
+
+ def test_compoundInequality_errors(self):
+ #
+ # Evaluate errors in a compound inequality
+ #
+ m = ConcreteModel()
+ m.x = Var()
+
+ # >=
+ # / \
+ # <= 0
+ # / \
+ # 0 x
+ try:
+ 0 <= m.x >= 0
+ self.fail("expected construction of relational expression to "
+ "generate a TypeError")
+ except TypeError as e:
+ self.assertIn(
+ "Relational expression used in an unexpected Boolean context.",
+ str(e) )
+
+ # >=
+ # / \
+ # <= 1
+ # / \
+ # 0 x
+ try:
+ 0 <= m.x >= 1
+ self.fail("expected construction of relational expression to "
+ "generate a TypeError")
+ except TypeError as e:
+ self.assertIn(
+ "Attempting to form a compound inequality with two lower bounds",
+ str(e) )
+
+ # <=
+ # / \
+ # >= 1
+ # / \
+ # 0 x
+ try:
+ 0 >= m.x <= 1
+ self.fail("expected construction of relational expression to "
+ "generate a TypeError")
+ except TypeError as e:
+ self.assertIn(
+ "Attempting to form a compound inequality with two upper bounds",
+ str(e) )
+
+ #
+ # Confirm error when
+ self.assertTrue(m.x <= 0)
+ self.assertIsNotNone(EXPR._chainedInequality.prev)
+ try:
+ m.x == 5
+ self.fail("expected construction of relational expression to "
+ "generate a TypeError")
+ except TypeError as e:
+ self.assertIn(
+ "Relational expression used in an unexpected Boolean context.",
+ str(e) )
+
+ self.assertTrue(m.x <= 0)
+ self.assertIsNotNone(EXPR._chainedInequality.prev)
+ try:
+ m.x*2 <= 5
+ self.fail("expected construction of relational expression to "
+ "generate a TypeError")
+ except TypeError as e:
+ self.assertIn(
+ "Relational expression used in an unexpected Boolean context.",
+ str(e) )
+
+ #
+ # Error because expression is being detected in an unusual context
+ #
+ self.assertTrue(m.x <= 0)
+ self.assertIsNotNone(EXPR._chainedInequality.prev)
+ try:
+ m.x <= 0
+ self.fail("expected construction of relational expression to "
+ "generate a TypeError")
+ except TypeError as e:
+ self.assertIn(
+ "Relational expression used in an unexpected Boolean context.",
+ str(e) )
+
+ def test_inequalityErrors(self):
+ #
+ # Check inequality errors
+ #
+ m = self.m
+ e = m.a <= m.b <= m.c
+ e1 = m.a == m.b
+ if sys.hexversion >= 0x02070000:
+ # Python 2.7 supports better testing of exceptions
+ #
+ # Check error with indexed variable
+ #
+ self.assertRaisesRegexp(TypeError, "Argument .*"
+ "is an indexed numeric value",
+ m.a.__lt__, m.x)
+ self.assertRaisesRegexp(TypeError, "Argument .*"
+ "is an indexed numeric value",
+ m.a.__gt__, m.x)
+
+ #
+ # Check error with more than two inequalities
+ #
+ self.assertRaisesRegexp(TypeError, "Cannot create an InequalityExpression where one of the sub-expressions is an equality or ranged expression:.*", e.__lt__, m.c)
+ self.assertRaisesRegexp(TypeError, "Cannot create an InequalityExpression where one of the sub-expressions is an equality or ranged expression:.*", e.__gt__, m.c)
+
+ #
+ # Check error when both expressions are relational
+ #
+ self.assertRaisesRegexp(TypeError, "InequalityExpression .*"
+ "one of the sub-expressions is an equality or ranged expression",
+ e.__lt__, m.a < m.b)
+ self.assertRaisesRegexp(TypeError, "InequalityExpression .*"
+ "one of the sub-expressions is an equality or ranged expression",
+ m.a.__lt__, e1)
+ self.assertRaisesRegexp(TypeError, "InequalityExpression .*"
+ "one of the sub-expressions is an equality or ranged expression",
+ m.a.__gt__, e1)
+ else:
+ self.assertRaises(TypeError, m.a.__lt__, m.x)
+ self.assertRaises(TypeError, m.a.__gt__, m.x)
+ self.assertRaises(TypeError, e.__lt__, m.c)
+ self.assertRaises(TypeError, e.__gt__, m.c)
+ self.assertRaises(TypeError, e.__lt__, m.a < m.b)
+ self.assertRaises(TypeError, m.a.__lt__, e1)
+ self.assertRaises(TypeError, m.a.__gt__, e1)
+
+ #
+ # Check error with indexed variable
+ #
+ try:
+ m.x < m.a
+ self.fail("expected use of indexed variable to raise TypeError")
+ except TypeError:
+ pass
+ try:
+ m.a < m.x
+ self.fail("expected use of indexed variable to raise TypeError")
+ except TypeError:
+ pass
+
+ #
+ # Check error with more than two relational expressions
+ #
+ try:
+ e < m.c
+ self.fail("expected 4-term inequality to raise ValueError")
+ except TypeError:
+ pass
+ try:
+ m.c < e
+ self.fail("expected 4-term inequality to raise ValueError")
+ except TypeError:
+ pass
+ try:
+ e1 = m.a < m.b
+ e < e1
+ self.fail("expected inequality of inequalities to raise TypeError")
+ except TypeError:
+ pass
+ try:
+ m.a < (m.a == m.b)
+ self.fail("expected equality within inequality to raise TypeError")
+ except TypeError:
+ pass
+ try:
+ m.a > (m.a == m.b)
+ self.fail("expected equality within inequality to raise TypeError")
+ except TypeError:
+ pass
+
+
+class TestPrettyPrinter_oldStyle(unittest.TestCase):
+
+ _save = None
+
+ def setUp(self):
+ # This class tests the Pyomo 5.x expression trees
+ TestPrettyPrinter_oldStyle._save = expr_common.TO_STRING_VERBOSE
+ expr_common.TO_STRING_VERBOSE = True
+
+ def tearDown(self):
+ expr_common.TO_STRING_VERBOSE = TestPrettyPrinter_oldStyle._save
+
+ def test_sum(self):
+ #
+ # Print simple sum
+ #
+ model = ConcreteModel()
+ model.a = Var()
+ model.p = Param(mutable=True)
+
+ expr = 5 + model.a + model.a
+ self.assertEqual("sum(5, a, a)", str(expr))
+
+ expr += 5
+ self.assertEqual("sum(5, a, a, 5)", str(expr))
+
+ expr = 2 + model.p
+ self.assertEqual("sum(2, p)", str(expr))
+
+ def test_linearsum(self):
+ #
+ # Print simple sum
+ #
+ model = ConcreteModel()
+ A = range(5)
+ model.a = Var(A)
+ model.p = Param(A, initialize=2, mutable=True)
+
+ expr = quicksum(i*model.a[i] for i in A)
+ self.assertEqual("sum(a[1], prod(2, a[2]), prod(3, a[3]), prod(4, a[4]))", str(expr))
+
+ expr = quicksum((i-2)*model.a[i] for i in A)
+ self.assertEqual("sum(prod(-2, a[0]), prod(-1, a[1]), a[3], prod(2, a[4]))", str(expr))
+
+ expr = quicksum(model.a[i] for i in A)
+ self.assertEqual("sum(a[0], a[1], a[2], a[3], a[4])", str(expr))
+
+ model.p[1].value = 0
+ model.p[3].value = 3
+ expr = quicksum(model.p[i]*model.a[i] if i != 3 else model.p[i] for i in A)
+ self.assertEqual("sum(3, prod(2, a[0]), prod(2, a[2]), prod(2, a[4]))", EXPR.expression_to_string(expr, compute_values=True))
+ self.assertEqual("sum(p[3], prod(p[0], a[0]), prod(p[1], a[1]), prod(p[2], a[2]), prod(p[4], a[4]))", EXPR.expression_to_string(expr, compute_values=False))
+
+ def test_expr(self):
+ #
+ # Print simple expressions with products and divisions
+ #
+ model = ConcreteModel()
+ model.a = Var()
+
+ expr = 5 * model.a * model.a
+ self.assertEqual("prod(prod(5, a), a)", str(expr))
+
+ # This returns an integer, which has no pprint().
+ #expr = expr*0
+ #buf = StringIO()
+ #EXPR.pprint(ostream=buf)
+ #self.assertEqual("0.0", buf.getvalue())
+
+ expr = 5 * model.a / model.a
+ self.assertEqual( "prod(prod(5, a), recip(a))",
+ str(expr) )
+
+ expr = expr / model.a
+ self.assertEqual( "prod(prod(prod(5, a), recip(a)), recip(a))",
+ str(expr) )
+
+ expr = 5 * model.a / model.a / 2
+ self.assertEqual( "prod(prod(prod(5, a), recip(a)), 0.5)",
+ str(expr) )
+
+ def test_other(self):
+ #
+ # Print other stuff
+ #
+ model = ConcreteModel()
+ model.a = Var()
+ model.x = ExternalFunction(library='foo.so', function='bar')
+
+ expr = model.x(model.a, 1, "foo", [])
+ self.assertEqual("x(a, 1, 'foo', '[]')", str(expr))
+
+ def test_inequality(self):
+ #
+ # Print inequalities
+ #
+ model = ConcreteModel()
+ model.a = Var()
+
+ expr = 5 < model.a
+ self.assertEqual( "5.0 < a", str(expr) )
+
+ expr = model.a >= 5
+ self.assertEqual( "5.0 <= a", str(expr) )
+
+ expr = expr < 10
+ self.assertEqual( "5.0 <= a < 10.0", str(expr) )
+
+ expr = 5 <= model.a + 5
+ self.assertEqual( "5.0 <= sum(a, 5)", str(expr) )
+
+ expr = expr < 10
+ self.assertEqual( "5.0 <= sum(a, 5) < 10.0", str(expr) )
+
+ def test_equality(self):
+ #
+ # Print equality
+ #
+ model = ConcreteModel()
+ model.a = Var()
+ model.b = Param(initialize=5, mutable=True)
+
+ expr = model.a == model.b
+ self.assertEqual( "a == b", str(expr) )
+
+ expr = model.b == model.a
+ self.assertEqual( "b == a", str(expr) )
+
+ # NB: since there is no "reverse equality" operator, explicit
+ # constants will always show up second.
+ expr = 5 == model.a
+ self.assertEqual( "a == 5.0", str(expr) )
+
+ expr = model.a == 10
+ self.assertEqual( "a == 10.0", str(expr) )
+
+ expr = 5 == model.a + 5
+ self.assertEqual( "sum(a, 5) == 5.0", str(expr) )
+
+ expr = model.a + 5 == 5
+ self.assertEqual( "sum(a, 5) == 5.0", str(expr) )
+
+ def test_getitem(self):
+ m = ConcreteModel()
+ m.I = RangeSet(1,9)
+ m.x = Var(m.I, initialize=lambda m,i: i+1)
+ m.P = Param(m.I, initialize=lambda m,i: 10-i, mutable=True)
+ t = IndexTemplate(m.I)
+
+ e = m.x[t+m.P[t+1]] + 3
+ self.assertEqual("sum(x(sum({I}, P(sum({I}, 1)))), 3)", str(e))
+
+ def test_small_expression(self):
+ #
+ # Print complex
+ #
+ model = AbstractModel()
+ model.a = Var()
+ model.b = Param(initialize=2, mutable=True)
+ instance=model.create_instance()
+ expr = instance.a+1
+ expr = expr-1
+ expr = expr*instance.a
+ expr = expr/instance.a
+ expr = expr**instance.b
+ expr = 1-expr
+ expr = 1+expr
+ expr = 2*expr
+ expr = 2/expr
+ expr = 2**expr
+ expr = - expr
+ expr = + expr
+ expr = abs(expr)
+ self.assertEqual(
+ "abs(neg(pow(2, prod(2, recip(prod(2, sum(1, neg(pow(prod(prod(sum(a, 1, -1), a), recip(a)), b)), 1)))))))",
+ str(expr) )
+
+
+class TestPrettyPrinter_newStyle(unittest.TestCase):
+
+ _save = None
+
+ def setUp(self):
+ # This class tests the Pyomo 5.x expression trees
+ TestPrettyPrinter_oldStyle._save = expr_common.TO_STRING_VERBOSE
+ expr_common.TO_STRING_VERBOSE = False
+
+ def tearDown(self):
+ expr_common.TO_STRING_VERBOSE = TestPrettyPrinter_oldStyle._save
+
+ def test_sum(self):
+ #
+ # Print sum
+ #
+ model = ConcreteModel()
+ model.a = Var()
+ model.p = Param(mutable=True)
+
+ expr = 5 + model.a + model.a
+ self.assertIs(type(expr), EXPR.SumExpression)
+ self.assertEqual("5 + a + a", str(expr))
+
+ expr += 5
+ self.assertIs(type(expr), EXPR.SumExpression)
+ self.assertEqual("5 + a + a + 5", str(expr))
+
+ expr = 2 + model.p
+ self.assertEqual("2 + p", str(expr))
+
+ expr = 2 - model.p
+ self.assertEqual("2 - p", str(expr))
+
+ def test_linearsum(self):
+ #
+ # Print simple sum
+ #
+ model = ConcreteModel()
+ A = range(5)
+ model.a = Var(A)
+ model.p = Param(A, initialize=2, mutable=True)
+
+ expr = quicksum(i*model.a[i] for i in A) + 3
+ self.assertEqual("a[1] + 2*a[2] + 3*a[3] + 4*a[4] + 3", str(expr))
+ self.assertEqual("a[1] + 2*a[2] + 3*a[3] + 4*a[4] + 3", EXPR.expression_to_string(expr, compute_values=True))
+
+ expr = quicksum((i-2)*model.a[i] for i in A) + 3
+ self.assertEqual("- 2.0*a[0] - a[1] + a[3] + 2*a[4] + 3", str(expr))
+ self.assertEqual("- 2.0*a[0] - a[1] + a[3] + 2*a[4] + 3", EXPR.expression_to_string(expr, compute_values=True))
+
+ expr = quicksum(model.a[i] for i in A) + 3
+ self.assertEqual("a[0] + a[1] + a[2] + a[3] + a[4] + 3", str(expr))
+
+ expr = quicksum(model.p[i]*model.a[i] for i in A)
+ self.assertEqual("2*a[0] + 2*a[1] + 2*a[2] + 2*a[3] + 2*a[4]", EXPR.expression_to_string(expr, compute_values=True))
+ self.assertEqual("p[0]*a[0] + p[1]*a[1] + p[2]*a[2] + p[3]*a[3] + p[4]*a[4]", EXPR.expression_to_string(expr, compute_values=False))
+ self.assertEqual("p[0]*a[0] + p[1]*a[1] + p[2]*a[2] + p[3]*a[3] + p[4]*a[4]", str(expr))
+
+ model.p[1].value = 0
+ model.p[3].value = 3
+ expr = quicksum(model.p[i]*model.a[i] if i != 3 else model.p[i] for i in A)
+ self.assertEqual("3 + 2*a[0] + 2*a[2] + 2*a[4]", EXPR.expression_to_string(expr, compute_values=True))
+ expr = quicksum(model.p[i]*model.a[i] if i != 3 else -3 for i in A)
+ self.assertEqual("-3 + p[0]*a[0] + p[1]*a[1] + p[2]*a[2] + p[4]*a[4]", EXPR.expression_to_string(expr, compute_values=False))
+
+ def test_negation(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.y = Var()
+
+ e = M.x*(1 + M.y)
+ e = - e
+ self.assertEqual("- x*(1 + y)", EXPR.expression_to_string(e))
+
+ M.x = -1
+ M.x.fixed = True
+ self.assertEqual("(1 + y)", EXPR.expression_to_string(e, compute_values=True))
+
+ def test_prod(self):
+ #
+ # Print expressions
+ #
+ model = ConcreteModel()
+ model.a = Var()
+ model.b = Var()
+
+ expr = 5 * model.a * model.a
+ self.assertEqual("5*a*a", str(expr))
+
+ # This returns an integer, which has no pprint().
+ #expr = expr*0
+ #buf = StringIO()
+ #EXPR.pprint(ostream=buf)
+ #self.assertEqual("0.0", buf.getvalue())
+
+ expr = 5 * model.a / model.a
+ self.assertEqual( "5*a*(1/a)",
+ str(expr) )
+
+ expr = expr / model.a
+ self.assertEqual( "5*a*(1/a)*(1/a)",
+ str(expr) )
+
+ expr = 5 * model.a / (model.a * model.a)
+ self.assertEqual( "5*a*(1/(a*a))",
+ str(expr) )
+
+ expr = 5 * model.a / model.a / 2
+ self.assertEqual( "5*a*(1/a)*0.5",
+ str(expr) )
+
+ expr = model.a * model.b
+ model.a = 1
+ model.a.fixed = True
+ self.assertEqual( "b", EXPR.expression_to_string(expr, compute_values=True))
+
+ def test_inequality(self):
+ #
+ # Print inequalities
+ #
+ model = ConcreteModel()
+ model.a = Var()
+
+ expr = 5 < model.a
+ self.assertEqual( "5.0 < a", str(expr) )
+
+ expr = model.a >= 5
+ self.assertEqual( "5.0 <= a", str(expr) )
+
+ expr = expr < 10
+ self.assertEqual( "5.0 <= a < 10.0", str(expr) )
+
+ expr = 5 <= model.a + 5
+ self.assertEqual( "5.0 <= a + 5", str(expr) )
+
+ expr = expr < 10
+ self.assertEqual( "5.0 <= a + 5 < 10.0", str(expr) )
+
+ def test_equality(self):
+ #
+ # Print equalities
+ #
+ model = ConcreteModel()
+ model.a = Var()
+ model.b = Param(initialize=5, mutable=True)
+
+ expr = model.a == model.b
+ self.assertEqual( "a == b", str(expr) )
+
+ expr = model.b == model.a
+ self.assertEqual( "b == a", str(expr) )
+
+ # NB: since there is no "reverse equality" operator, explicit
+ # constants will always show up second.
+ expr = 5 == model.a
+ self.assertEqual( "a == 5.0", str(expr) )
+
+ expr = model.a == 10
+ self.assertEqual( "a == 10.0", str(expr) )
+
+ expr = 5 == model.a + 5
+ self.assertEqual( "a + 5 == 5.0", str(expr) )
+
+ expr = model.a + 5 == 5
+ self.assertEqual( "a + 5 == 5.0", str(expr) )
+
+
+ def test_linear(self):
+ #
+ # Print linear
+ #
+ m = ConcreteModel()
+ m.x = Var()
+ m.y = Var()
+ m.p = Param(initialize=2, mutable=True)
+
+ expr = m.x - m.p*m.y
+ self.assertEqual( "x - p*y", str(expr) )
+
+ expr = m.x - m.p*m.y + 5
+ self.assertIs(type(expr), EXPR.SumExpression)
+ self.assertEqual( "x - p*y + 5", str(expr) )
+
+ expr = m.x - m.p*m.y - 5
+ self.assertIs(type(expr), EXPR.SumExpression)
+ self.assertEqual( "x - p*y - 5", str(expr) )
+
+ expr = m.x - m.p*m.y - 5 + m.p
+ self.assertIs(type(expr), EXPR.SumExpression)
+ self.assertEqual( "x - p*y - 5 + p", str(expr) )
+
+ def test_expr_if(self):
+ m = ConcreteModel()
+ m.a = Var()
+ m.b = Var()
+ expr = EXPR.Expr_if(IF=m.a + m.b < 20, THEN=m.a, ELSE=m.b)
+ self.assertEqual("Expr_if( ( a + b < 20.0 ), then=( a ), else=( b ) )", str(expr))
+ expr = EXPR.Expr_if(IF=m.a + m.b < 20, THEN=1, ELSE=m.b)
+ self.assertEqual("Expr_if( ( a + b < 20.0 ), then=( 1 ), else=( b ) )", str(expr))
+
+ def test_getitem(self):
+ m = ConcreteModel()
+ m.I = RangeSet(1,9)
+ m.x = Var(m.I, initialize=lambda m,i: i+1)
+ m.P = Param(m.I, initialize=lambda m,i: 10-i, mutable=True)
+ t = IndexTemplate(m.I)
+
+ e = m.x[t+m.P[t+1]] + 3
+ self.assertEqual("x({I} + P({I} + 1)) + 3", str(e))
+
+ def test_small_expression(self):
+ #
+ # Print complex expression
+ #
+ model = AbstractModel()
+ model.a = Var()
+ model.b = Param(initialize=2, mutable=True)
+ instance=model.create_instance()
+ expr = instance.a+1
+ expr = expr-1
+ expr = expr*instance.a
+ expr = expr/instance.a
+ expr = expr**instance.b
+ expr = 1-expr
+ expr = 1+expr
+ expr = 2*expr
+ expr = 2/expr
+ expr = 2**expr
+ expr = - expr
+ expr = + expr
+ expr = abs(expr)
+ self.assertEqual(
+ "abs(- 2**(2*(1/(2*(1 - ((a + 1 - 1)*a*(1/a))**b + 1)))))",
+ str(expr) )
+
+ def test_large_expression(self):
+ #
+ # Diff against a large model
+ #
+ def c1_rule(model):
+ return (1.0,model.b[1],None)
+ def c2_rule(model):
+ return (None,model.b[1],0.0)
+ def c3_rule(model):
+ return (0.0,model.b[1],1.0)
+ def c4_rule(model):
+ return (3.0,model.b[1])
+ def c5_rule(model, i):
+ return (model.b[i],0.0)
+
+ def c6a_rule(model):
+ return 0.0 <= model.c
+ def c7a_rule(model):
+ return model.c <= 1.0
+ def c7b_rule(model):
+ return model.c >= 1.0
+ def c8_rule(model):
+ return model.c == 2.0
+ def c9a_rule(model):
+ return model.A+model.A <= model.c
+ def c9b_rule(model):
+ return model.A+model.A >= model.c
+ def c10a_rule(model):
+ return model.c <= model.B+model.B
+ def c11_rule(model):
+ return model.c == model.A+model.B
+ def c15a_rule(model):
+ return model.A <= model.A*model.d
+ def c16a_rule(model):
+ return model.A*model.d <= model.B
+
+ def c12_rule(model):
+ return model.c == model.d
+ def c13a_rule(model):
+ return model.c <= model.d
+ def c14a_rule(model):
+ return model.c >= model.d
+
+ def cl_rule(model, i):
+ if i > 10:
+ return ConstraintList.End
+ return i* model.c >= model.d
+
+ def o2_rule(model, i):
+ return model.b[i]
+ model=AbstractModel()
+ model.a = Set(initialize=[1,2,3])
+ model.b = Var(model.a,initialize=1.1,within=PositiveReals)
+ model.c = Var(initialize=2.1, within=PositiveReals)
+ model.d = Var(initialize=3.1, within=PositiveReals)
+ model.e = Var(initialize=4.1, within=PositiveReals)
+ model.A = Param(default=-1, mutable=True)
+ model.B = Param(default=-2, mutable=True)
+ #model.o1 = Objective()
+ model.o2 = Objective(model.a,rule=o2_rule)
+ model.o3 = Objective(model.a,model.a)
+ model.c1 = Constraint(rule=c1_rule)
+ model.c2 = Constraint(rule=c2_rule)
+ model.c3 = Constraint(rule=c3_rule)
+ model.c4 = Constraint(rule=c4_rule)
+ model.c5 = Constraint(model.a,rule=c5_rule)
+
+ model.c6a = Constraint(rule=c6a_rule)
+ model.c7a = Constraint(rule=c7a_rule)
+ model.c7b = Constraint(rule=c7b_rule)
+ model.c8 = Constraint(rule=c8_rule)
+ model.c9a = Constraint(rule=c9a_rule)
+ model.c9b = Constraint(rule=c9b_rule)
+ model.c10a = Constraint(rule=c10a_rule)
+ model.c11 = Constraint(rule=c11_rule)
+ model.c15a = Constraint(rule=c15a_rule)
+ model.c16a = Constraint(rule=c16a_rule)
+
+ model.c12 = Constraint(rule=c12_rule)
+ model.c13a = Constraint(rule=c13a_rule)
+ model.c14a = Constraint(rule=c14a_rule)
+
+ model.cl = ConstraintList(rule=cl_rule)
+
+ instance=model.create_instance()
+ OUTPUT=open(currdir+"varpprint.out","w")
+ instance.pprint(ostream=OUTPUT)
+ OUTPUT.close()
+ self.assertFileEqualsBaseline( currdir+"varpprint.out",
+ currdir+"varpprint.txt" )
+
+ def test_labeler(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.y = Var()
+ M.z = Var()
+ M.a = Var(range(3))
+ M.p = Param(range(3), initialize=2)
+ M.q = Param(range(3), initialize=3, mutable=True)
+
+ e = M.x*M.y + sum_product(M.p, M.a) + quicksum(M.q[i]*M.a[i] for i in M.a) / M.x
+ self.assertEqual(str(e), "x*y + 2*a[0] + 2*a[1] + 2*a[2] + (q[0]*a[0] + q[1]*a[1] + q[2]*a[2])*(1/x)")
+ self.assertEqual(e.to_string(), "x*y + 2*a[0] + 2*a[1] + 2*a[2] + (q[0]*a[0] + q[1]*a[1] + q[2]*a[2])*(1/x)")
+ self.assertEqual(e.to_string(compute_values=True), "x*y + 2*a[0] + 2*a[1] + 2*a[2] + (3*a[0] + 3*a[1] + 3*a[2])*(1/x)")
+
+ labeler = NumericLabeler('x')
+ self.assertEqual(EXPR.expression_to_string(e, labeler=labeler), "x1*x2 + 2*x3 + 2*x4 + 2*x5 + (q[0]*x3 + q[1]*x4 + q[2]*x5)*(1/x1)")
+
+ from pyomo.core.expr.symbol_map import SymbolMap
+ labeler = NumericLabeler('x')
+ smap = SymbolMap(labeler)
+ self.assertEqual(EXPR.expression_to_string(e, smap=smap), "x1*x2 + 2*x3 + 2*x4 + 2*x5 + (q[0]*x3 + q[1]*x4 + q[2]*x5)*(1/x1)")
+ self.assertEqual(EXPR.expression_to_string(e, smap=smap, compute_values=True), "x1*x2 + 2*x3 + 2*x4 + 2*x5 + (3*x3 + 3*x4 + 3*x5)*(1/x1)")
+
+#
+# TODO:What is this checking?
+#
+class TestInplaceExpressionGeneration(unittest.TestCase):
+
+ def setUp(self):
+ # This class tests the Pyomo 5.x expression trees
+
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ self.m = m
+
+ def tearDown(self):
+ self.m = None
+
+ def test_iadd(self):
+ m = self.m
+ x = 0
+
+ x += m.a
+ self.assertIs(type(x), type(m.a))
+
+ x += m.a
+ self.assertIs(type(x), EXPR.SumExpression)
+ self.assertEqual(x.nargs(), 2)
+
+ x += m.b
+ self.assertIs(type(x), EXPR.SumExpression)
+ self.assertEqual(x.nargs(), 3)
+
+
+ def test_isub(self):
+ m = self.m
+
+ x = m.a
+ x -= 0
+ self.assertIs(type(x), type(m.a))
+
+ x = 0
+ x -= m.a
+ self.assertIs(type(x), EXPR.MonomialTermExpression)
+ self.assertEqual(x.nargs(), 2)
+
+ x -= m.a
+ self.assertIs(type(x), EXPR.SumExpression)
+ self.assertEqual(x.nargs(), 2)
+
+ x -= m.a
+ self.assertIs(type(x), EXPR.SumExpression)
+ self.assertEqual(x.nargs(), 3)
+
+ x -= m.b
+ self.assertIs(type(x), EXPR.SumExpression)
+ self.assertEqual(x.nargs(), 4)
+
+ def test_imul(self):
+ m = self.m
+ x = 1
+
+ x *= m.a
+ self.assertIs(type(x), type(m.a))
+
+ x *= m.a
+ self.assertIs(type(x), EXPR.ProductExpression)
+ self.assertEqual(x.nargs(), 2)
+
+ x *= m.a
+ self.assertIs(type(x), EXPR.ProductExpression)
+ self.assertEqual(x.nargs(), 2)
+
+ def test_idiv(self):
+ m = self.m
+ x = 1
+
+ x /= m.a
+ self.assertIs(type(x), EXPR.ReciprocalExpression)
+ self.assertIs(x.arg(0), m.a)
+
+ x /= m.a
+ self.assertIs(type(x), EXPR.ProductExpression)
+ self.assertIs(type(x.arg(1)), EXPR.ReciprocalExpression)
+ self.assertIs(x.arg(1).arg(0), m.a)
+
+ def test_ipow(self):
+ m = self.m
+ x = 1
+
+ x **= m.a
+ self.assertIs(type(x), EXPR.PowExpression)
+ self.assertEqual(x.nargs(), 2)
+ self.assertEqual(value(x.arg(0)), 1)
+ self.assertIs(x.arg(1), m.a)
+
+ x **= m.b
+ self.assertIs(type(x), EXPR.PowExpression)
+ self.assertEqual(x.nargs(), 2)
+ self.assertIs(type(x.arg(0)), EXPR.PowExpression)
+ self.assertIs(x.arg(1), m.b)
+ self.assertEqual(x.nargs(), 2)
+ self.assertEqual(value(x.arg(0).arg(0)), 1)
+ self.assertIs(x.arg(0).arg(1), m.a)
+
+ # If someone else holds a reference to the expression, we still
+ # need to clone it:
+ x = 1 ** m.a
+ y = x
+ x **= m.b
+ self.assertIs(type(y), EXPR.PowExpression)
+ self.assertEqual(y.nargs(), 2)
+ self.assertEqual(value(y.arg(0)), 1)
+ self.assertIs(y.arg(1), m.a)
+
+ self.assertIs(type(x), EXPR.PowExpression)
+ self.assertEqual(x.nargs(), 2)
+ self.assertIs(type(x.arg(0)), EXPR.PowExpression)
+ self.assertIs(x.arg(1), m.b)
+ self.assertEqual(x.nargs(), 2)
+ self.assertEqual(value(x.arg(0).arg(0)), 1)
+ self.assertIs(x.arg(0).arg(1), m.a)
+
+
+class TestGeneralExpressionGeneration(unittest.TestCase):
+
+ def test_invalidIndexing(self):
+ #
+ # Check for errors when generating expressions with invalid indices
+ #
+ m = AbstractModel()
+ m.A = Set()
+ m.p = Param(m.A, mutable=True)
+ m.x = Var(m.A)
+ m.z = Var()
+
+ try:
+ m.p * 2
+ self.fail("Expected m.p*2 to raise a TypeError")
+ except TypeError:
+ pass
+
+ try:
+ m.x * 2
+ self.fail("Expected m.x*2 to raise a TypeError")
+ except TypeError:
+ pass
+
+ try:
+ 2 * m.p
+ self.fail("Expected 2*m.p to raise a TypeError")
+ except TypeError:
+ pass
+
+ try:
+ 2 * m.x
+ self.fail("Expected 2*m.x to raise a TypeError")
+ except TypeError:
+ pass
+
+ try:
+ m.z * m.p
+ self.fail("Expected m.z*m.p to raise a TypeError")
+ except TypeError:
+ pass
+ except ValueError:
+ pass
+
+ try:
+ m.z * m.x
+ self.fail("Expected m.z*m.x to raise a TypeError")
+ except TypeError:
+ pass
+
+ def test_negation(self):
+ #
+ # Test negation logic for various expressions
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+
+ e = -m.a
+ self.assertIs(type(e), EXPR.MonomialTermExpression)
+ self.assertEqual(e.nargs(), 2)
+ self.assertIs(e.arg(0), -1)
+ self.assertIs(e.arg(1), m.a)
+
+ e1 = m.a - m.b
+ e = -e1
+ self.assertIs(type(e), EXPR.NegationExpression)
+ self.assertIs(e.arg(0), e1)
+ self.assertIs(type(e.arg(0)), EXPR.SumExpression)
+
+ e1 = m.a * m.b
+ e = -e1
+ self.assertIs(type(e), EXPR.NegationExpression)
+ self.assertIs(e.arg(0).arg(0), m.a)
+ self.assertIs(e.arg(0).arg(1), m.b)
+
+ e1 = sin(m.a)
+ e = -e1
+ self.assertIs(type(e), EXPR.NegationExpression)
+ self.assertIs(type(e.arg(0)), EXPR.UnaryFunctionExpression)
+
+
+class TestExprConditionalContext(unittest.TestCase):
+
+
+ def tearDown(self):
+ # Make sure errors here don't bleed over to other tests
+ if EXPR._using_chained_inequality:
+ EXPR._chainedInequality.prev = None
+
+ def checkCondition(self, expr, expectedValue):
+ try:
+ if expr:
+ if not EXPR._using_chained_inequality and expectedValue != True:
+ self.fail("__nonzero__ returned the wrong condition value"
+ " (expected %s)" % expectedValue)
+ else:
+ if expectedValue != False:
+ self.fail("__nonzero__ returned the wrong condition value"
+ " (expected %s)" % expectedValue)
+ if expectedValue is None:
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ if expectedValue is not None:
+ raise
+ finally:
+ if EXPR._using_chained_inequality:
+ EXPR._chainedInequality.prev = None
+
+ def test_immutable_paramConditional(self):
+ model = AbstractModel()
+ model.p = Param(initialize=1.0, mutable=False)
+ #
+ try:
+ self.checkCondition(model.p > 0, True)
+ if not EXPR._using_chained_inequality:
+ self.fail("Expected ValueError because the parameter is unconstructed.")
+ except ValueError:
+ pass
+ #self.checkCondition(model.p >= 0, True)
+ #self.checkCondition(model.p < 1, True)
+ #self.checkCondition(model.p <= 1, True)
+ #self.checkCondition(model.p == 0, None)
+
+ instance = model.create_instance()
+ #
+ # Inequalities evaluate normally when the parameter is initialized
+ #
+ try:
+ self.checkCondition(model.p > 0, True)
+ if not EXPR._using_chained_inequality:
+ self.fail("Expected ValueError because the parameter is unconstructed.")
+ except ValueError:
+ pass
+ #self.checkCondition(model.p >= 0, True)
+ #self.checkCondition(model.p < 1, True)
+ #self.checkCondition(model.p <= 1, True)
+ #self.checkCondition(model.p == 0, None)
+
+ instance = model.create_instance()
+ self.checkCondition(instance.p > 0, True)
+ self.checkCondition(instance.p > 2, False)
+ self.checkCondition(instance.p >= 1, True)
+ self.checkCondition(instance.p >= 2, False)
+ self.checkCondition(instance.p < 2, True)
+ self.checkCondition(instance.p < 0, False)
+ self.checkCondition(instance.p <= 1, True)
+ self.checkCondition(instance.p <= 0, False)
+ self.checkCondition(instance.p == 1, True)
+ self.checkCondition(instance.p == 2, False)
+
+ def test_immutable_paramConditional_reversed(self):
+ model = AbstractModel()
+ model.p = Param(initialize=1.0, mutable=False)
+ #
+ # TODO: Inequalities evaluate True when the parameter is unconstructed?
+ #
+ self.checkCondition(0 < model.p, True)
+ self.checkCondition(0 <= model.p, True)
+ self.checkCondition(1 > model.p, True)
+ self.checkCondition(1 >= model.p, True)
+ self.checkCondition(0 == model.p, None)
+
+ instance = model.create_instance()
+ #
+ # Inequalities evaluate normally when the parameter is initialized
+ #
+ self.checkCondition(0 < instance.p, True)
+ self.checkCondition(2 < instance.p, False)
+ self.checkCondition(1 <= instance.p, True)
+ self.checkCondition(instance.p > 0, True)
+ self.checkCondition(instance.p > 2, False)
+ self.checkCondition(instance.p >= 1, True)
+ self.checkCondition(instance.p >= 2, False)
+ self.checkCondition(instance.p < 2, True)
+ self.checkCondition(instance.p < 0, False)
+ self.checkCondition(instance.p <= 1, True)
+ self.checkCondition(instance.p <= 0, False)
+ self.checkCondition(instance.p == 1, True)
+ self.checkCondition(instance.p == 2, False)
+
+ def test_immutable_paramConditional_reversed(self):
+ model = AbstractModel()
+ model.p = Param(initialize=1.0, mutable=False)
+ #
+ try:
+ self.checkCondition(0 < model.p, True)
+ if not EXPR._using_chained_inequality:
+ self.fail("Expected ValueError because the parameter value is being accessed before it is constructed.")
+ except ValueError:
+ pass
+ #self.checkCondition(0 <= model.p, True)
+ #self.checkCondition(1 > model.p, True)
+ #self.checkCondition(1 >= model.p, True)
+ #self.checkCondition(0 == model.p, None)
+
+ instance = model.create_instance()
+ #
+ # Inequalities evaluate normally when the parameter is initialized
+ #
+ self.checkCondition(0 < instance.p, True)
+ self.checkCondition(2 < instance.p, False)
+ self.checkCondition(1 <= instance.p, True)
+ self.checkCondition(2 <= instance.p, False)
+ self.checkCondition(2 > instance.p, True)
+ self.checkCondition(0 > instance.p, False)
+ self.checkCondition(1 >= instance.p, True)
+ self.checkCondition(0 >= instance.p, False)
+ self.checkCondition(1 == instance.p, True)
+ self.checkCondition(2 == instance.p, False)
+
+ def test_mutable_paramConditional(self):
+ model = AbstractModel()
+ model.p = Param(initialize=1.0, mutable=True)
+ #
+ try:
+ self.checkCondition(model.p > 0, True)
+ if not EXPR._using_chained_inequality:
+ self.fail("Expected ValueError because the parameter value is being accessed before it is constructed.")
+ except ValueError:
+ pass
+ #self.checkCondition(model.p >= 0, True)
+ #self.checkCondition(model.p < 1, True)
+ #self.checkCondition(model.p <= 1, True)
+ #self.checkCondition(model.p == 0, None)
+
+ instance = model.create_instance()
+ #
+ # Inequalities evaluate normally when the parameter is initialized
+ #
+ self.checkCondition(instance.p > 0, True)
+ self.checkCondition(instance.p > 2, False)
+ self.checkCondition(instance.p >= 1, True)
+ self.checkCondition(instance.p >= 2, False)
+ self.checkCondition(instance.p < 2, True)
+ self.checkCondition(instance.p < 0, False)
+ self.checkCondition(instance.p <= 1, True)
+ self.checkCondition(instance.p <= 0, False)
+ self.checkCondition(instance.p == 1, True)
+ self.checkCondition(instance.p == 2, False)
+
+ def test_mutable_paramConditional_reversed(self):
+ model = AbstractModel()
+ model.p = Param(initialize=1.0, mutable=True)
+ #
+ try:
+ self.checkCondition(0 < model.p, True)
+ if not EXPR._using_chained_inequality:
+ self.fail("Expected ValueError because the parameter value is being accessed before it is constructed.")
+ except ValueError:
+ pass
+ #self.checkCondition(0 <= model.p, True)
+ #self.checkCondition(1 > model.p, True)
+ #self.checkCondition(1 >= model.p, True)
+ #self.checkCondition(0 == model.p, None)
+
+ instance = model.create_instance()
+ #
+ # Inequalities evaluate normally when the parameter is initialized
+ #
+ self.checkCondition(0 < instance.p, True)
+ self.checkCondition(2 < instance.p, False)
+ self.checkCondition(1 <= instance.p, True)
+ self.checkCondition(2 <= instance.p, False)
+ self.checkCondition(2 > instance.p, True)
+ self.checkCondition(0 > instance.p, False)
+ self.checkCondition(1 >= instance.p, True)
+ self.checkCondition(0 >= instance.p, False)
+ self.checkCondition(1 == instance.p, True)
+ self.checkCondition(2 == instance.p, False)
+
+ def test_varConditional(self):
+ model = AbstractModel()
+ model.v = Var(initialize=1.0)
+ #
+ try:
+ self.checkCondition(model.v > 0, True)
+ if not EXPR._using_chained_inequality:
+ self.fail("Expected ValueError because the variable value is being accessed before it is constructed.")
+ except:
+ pass
+ #self.checkCondition(model.v >= 0, True)
+ #self.checkCondition(model.v < 1, True)
+ #self.checkCondition(model.v <= 1, True)
+ #self.checkCondition(model.v == 0, None)
+
+ instance = model.create_instance()
+ #
+ # Inequalities evaluate normally when the variable is initialized
+ #
+ self.checkCondition(instance.v > 0, True)
+ self.checkCondition(instance.v > 2, False)
+ self.checkCondition(instance.v >= 1, True)
+ self.checkCondition(instance.v >= 2, False)
+ self.checkCondition(instance.v < 2, True)
+ self.checkCondition(instance.v < 0, False)
+ self.checkCondition(instance.v <= 1, True)
+ self.checkCondition(instance.v <= 0, False)
+ self.checkCondition(instance.v == 1, True)
+ self.checkCondition(instance.v == 2, False)
+
+ def test_varConditional_reversed(self):
+ model = AbstractModel()
+ model.v = Var(initialize=1.0)
+ #
+ try:
+ self.checkCondition(0 < model.v, True)
+ if not EXPR._using_chained_inequality:
+ self.fail("Expected ValueError because the variable value is being accessed before it is constructed.")
+ except:
+ pass
+ #self.checkCondition(0 <= model.v, True)
+ #self.checkCondition(1 > model.v, True)
+ #self.checkCondition(1 >= model.v, True)
+ #self.checkCondition(0 == model.v, None)
+
+ instance = model.create_instance()
+ #
+ # Inequalities evaluate normally when the variable is initialized
+ #
+ self.checkCondition(0 < instance.v, True)
+ self.checkCondition(2 < instance.v, False)
+ self.checkCondition(1 <= instance.v, True)
+ self.checkCondition(2 <= instance.v, False)
+ self.checkCondition(2 > instance.v, True)
+ self.checkCondition(0 > instance.v, False)
+ self.checkCondition(1 >= instance.v, True)
+ self.checkCondition(0 >= instance.v, False)
+ self.checkCondition(1 == instance.v, True)
+ self.checkCondition(2 == instance.v, False)
+
+ def test_eval_sub_varConditional(self):
+ model = AbstractModel()
+ model.v = Var(initialize=1.0)
+ #
+ # The value() function generates an exception when the variable is unconstructed!
+ #
+ try:
+ self.checkCondition(value(model.v) > 0, None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+ try:
+ self.checkCondition(value(model.v) >= 0, None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+ try:
+ self.checkCondition(value(model.v) < 1, None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+ try:
+ self.checkCondition(value(model.v) <= 1, None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+ try:
+ self.checkCondition(value(model.v) == 0, None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+
+ instance = model.create_instance()
+ #
+ # Inequalities evaluate normally when the variable is initialized
+ #
+ self.checkCondition(value(instance.v) > 0, True)
+ self.checkCondition(value(instance.v) > 2, False)
+ self.checkCondition(value(instance.v) >= 1, True)
+ self.checkCondition(value(instance.v) >= 2, False)
+ self.checkCondition(value(instance.v) < 2, True)
+ self.checkCondition(value(instance.v) < 0, False)
+ self.checkCondition(value(instance.v) <= 1, True)
+ self.checkCondition(value(instance.v) <= 0, False)
+ self.checkCondition(value(instance.v) == 1, True)
+ self.checkCondition(value(instance.v) == 2, False)
+
+ def test_eval_sub_varConditional_reversed(self):
+ model = AbstractModel()
+ model.v = Var(initialize=1.0)
+ #
+ # The value() function generates an exception when the variable is unconstructed!
+ #
+ try:
+ self.checkCondition(0 < value(model.v), None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+ try:
+ self.checkCondition(0 <= value(model.v), None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+ try:
+ self.checkCondition(1 > value(model.v), None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+ try:
+ self.checkCondition(1 >= value(model.v), None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+ try:
+ self.checkCondition(0 == value(model.v), None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+
+ instance = model.create_instance()
+ #
+ # Inequalities evaluate normally when the variable is initialized
+ #
+ self.checkCondition(0 < value(instance.v), True)
+ self.checkCondition(2 < value(instance.v), False)
+ self.checkCondition(1 <= value(instance.v), True)
+ self.checkCondition(2 <= value(instance.v), False)
+ self.checkCondition(2 > value(instance.v), True)
+ self.checkCondition(0 > value(instance.v), False)
+ self.checkCondition(1 >= value(instance.v), True)
+ self.checkCondition(0 >= value(instance.v), False)
+ self.checkCondition(1 == value(instance.v), True)
+ self.checkCondition(2 == value(instance.v), False)
+
+ def test_eval_varConditional(self):
+ model = AbstractModel()
+ model.v = Var(initialize=1.0)
+ #
+ # The value() function generates an exception when the variable is unconstructed!
+ #
+ try:
+ self.checkCondition(value(model.v > 0), None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+ try:
+ self.checkCondition(value(model.v >= 0), None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+ try:
+ self.checkCondition(value(model.v == 0), None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+
+ instance = model.create_instance()
+ self.checkCondition(value(instance.v > 0), True)
+ self.checkCondition(value(instance.v > 2), False)
+ self.checkCondition(value(instance.v >= 1), True)
+ self.checkCondition(value(instance.v >= 2), False)
+ self.checkCondition(value(instance.v == 1), True)
+ self.checkCondition(value(instance.v == 2), False)
+
+ def test_eval_varConditional_reversed(self):
+ model = AbstractModel()
+ model.v = Var(initialize=1.0)
+ #
+ # The value() function generates an exception when the variable is unconstructed!
+ #
+ try:
+ self.checkCondition(value(0 < model.v), None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+ try:
+ self.checkCondition(value(0 <= model.v), None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+ try:
+ self.checkCondition(value(0 == model.v), None)
+ self.fail("Expected ValueError because component was undefined")
+ except ValueError:
+ pass
+
+ instance = model.create_instance()
+ #
+ # Inequalities evaluate normally when the variable is initialized
+ #
+ self.checkCondition(value(0 < instance.v), True)
+ self.checkCondition(value(2 < instance.v), False)
+ self.checkCondition(value(1 <= instance.v), True)
+ self.checkCondition(value(2 <= instance.v), False)
+ self.checkCondition(value(1 == instance.v), True)
+ self.checkCondition(value(2 == instance.v), False)
+
+
+class TestPolynomialDegree(unittest.TestCase):
+
+ def setUp(self):
+ # This class tests the Pyomo 5.x expression trees
+ def d_fn(model):
+ return model.c+model.c
+ self.model = AbstractModel()
+ self.model.a = Var(initialize=1.0)
+ self.model.b = Var(initialize=2.0)
+ self.model.c = Param(initialize=0, mutable=True)
+ self.model.d = Param(initialize=d_fn, mutable=True)
+ self.model.e = Param(mutable=True)
+ self.instance = self.model.create_instance()
+
+ def tearDown(self):
+ self.model = None
+ self.instance = None
+
+ def test_param(self):
+ #
+ # Check that a parameter has degree 0
+ #
+ self.assertEqual(self.model.d.polynomial_degree(), 0)
+
+ def test_var(self):
+ #
+ # Check that a non-fixed variable has degree 1
+ #
+ self.model.a.fixed = False
+ self.assertEqual(self.model.a.polynomial_degree(), 1)
+ #
+ # Check that a fixed variable has degree 0
+ #
+ self.model.a.fixed = True
+ self.assertEqual(self.model.a.polynomial_degree(), 0)
+
+ def test_simple_sum(self):
+ #
+ # A sum of parameters has degree 0
+ #
+ expr = self.model.c + self.model.d
+ self.assertEqual(expr.polynomial_degree(), 0)
+ #
+ # A sum of variables has degree 1
+ #
+ expr = self.model.a + self.model.b
+ self.assertEqual(expr.polynomial_degree(), 1)
+ self.model.a.fixed = True
+ self.assertEqual(expr.polynomial_degree(), 1)
+ self.model.a.fixed = False
+ #
+ # A sum of fixed variables has degree 0
+ #
+ expr = self.model.a + self.model.c
+ self.assertEqual(expr.polynomial_degree(), 1)
+ self.model.a.fixed = True
+ self.assertEqual(expr.polynomial_degree(), 0)
+
+ def test_linearsum(self):
+ m = ConcreteModel()
+ A = range(5)
+ m.v = Var(A)
+
+ e = quicksum(m.v[i] for i in A)
+ self.assertEqual(e.polynomial_degree(), 1)
+
+ e = quicksum(i*m.v[i] for i in A)
+ self.assertEqual(e.polynomial_degree(), 1)
+
+ e = quicksum(1 for i in A)
+ self.assertEqual(polynomial_degree(e), 0)
+
+ e = quicksum((1 for i in A), linear=True)
+ self.assertTrue(e.__class__ in native_numeric_types)
+
+ def test_relational_ops(self):
+ #
+ # TODO: Should a relational expression have a polynomial degree?
+ #
+ # A relational expression with parameters has degree 0
+ #
+ expr = self.model.c < self.model.d
+ self.assertEqual(expr.polynomial_degree(), 0)
+ #
+ # A relational expression with variables has degree 1
+ #
+ expr = self.model.a <= self.model.d
+ self.assertEqual(expr.polynomial_degree(), 1)
+ #
+ # A relational expression with variable products has degree 2
+ #
+ expr = self.model.a * self.model.a >= self.model.b
+ self.assertEqual(expr.polynomial_degree(), 2)
+ self.model.a.fixed = True
+ self.assertEqual(expr.polynomial_degree(), 1)
+ self.model.a.fixed = False
+ #
+ expr = self.model.a > self.model.a * self.model.b
+ self.assertEqual(expr.polynomial_degree(), 2)
+ self.model.b.fixed = True
+ self.assertEqual(expr.polynomial_degree(), 1)
+ self.model.b.fixed = False
+ #
+ expr = self.model.a == self.model.a * self.model.b
+ self.assertEqual(expr.polynomial_degree(), 2)
+ self.model.b.fixed = True
+ self.assertEqual(expr.polynomial_degree(), 1)
+
+ def test_simple_product(self):
+ #
+ # A product of parameters has degree 0
+ #
+ expr = self.model.c * self.model.d
+ self.assertEqual(expr.polynomial_degree(), 0)
+ #
+ # A product of variables has degree 2
+ #
+ expr = self.model.a * self.model.b
+ self.assertEqual(expr.polynomial_degree(), 2)
+ #
+ # A product of a variable and parameter has degree 1
+ #
+ expr = self.model.a * self.model.c
+ self.assertEqual(expr.polynomial_degree(), 1)
+ self.model.a.fixed = True
+ self.assertEqual(expr.polynomial_degree(), 0)
+ self.model.a.fixed = False
+ #
+ # A fraction with a variable and parameter has degree 1
+ #
+ expr = self.model.a / self.model.c
+ self.assertEqual(expr.polynomial_degree(), 1)
+ #
+ # A fraction with a variable in the denominator has degree None.
+ # This indicates that it is not a polyomial.
+ #
+ expr = self.model.c / self.model.a
+ self.assertEqual(expr.polynomial_degree(), None)
+ self.model.a.fixed = True
+ self.assertEqual(expr.polynomial_degree(), 0)
+ self.model.a.fixed = False
+
+ def test_nested_expr(self):
+ #
+ # Verify that nested expressions compute polynomial degrees appropriately
+ #
+ expr1 = self.model.c * self.model.d
+ expr2 = expr1 + expr1
+ self.assertEqual(expr2.polynomial_degree(), 0)
+
+ expr1 = self.model.a * self.model.b
+ expr2 = expr1 + expr1
+ self.assertEqual(expr2.polynomial_degree(), 2)
+ self.model.a.fixed = True
+ self.assertEqual(expr2.polynomial_degree(), 1)
+ self.model.a.fixed = False
+
+ expr1 = self.model.c + self.model.d
+ expr2 = expr1 * expr1
+ self.assertEqual(expr2.polynomial_degree(), 0)
+
+ expr1 = self.model.a + self.model.b
+ expr2 = expr1 * expr1
+ self.assertEqual(expr2.polynomial_degree(), 2)
+ self.model.a.fixed = True
+ self.assertEqual(expr2.polynomial_degree(), 2)
+ self.model.b.fixed = True
+ self.assertEqual(expr2.polynomial_degree(), 0)
+
+ def test_misc_operators(self):
+ #
+ # Check that polynomial checks work with Negation
+ #
+ expr = -(self.model.a * self.model.b)
+ self.assertEqual(expr.polynomial_degree(), 2)
+
+ def test_nonpolynomial_abs(self):
+ #
+ # Check that an expression containing abs() is not a polynomial
+ #
+ expr1 = abs(self.model.a * self.model.b)
+ self.assertEqual(expr1.polynomial_degree(), None)
+
+ expr2 = self.model.a + self.model.b * abs(self.model.b)
+ self.assertEqual(expr2.polynomial_degree(), None)
+
+ expr3 = self.model.a * ( self.model.b + abs(self.model.b) )
+ self.assertEqual(expr3.polynomial_degree(), None)
+ #
+ # Fixing variables should turn intrinsic functions into constants
+ #
+ # Fixing 'a' still leaves a non-constant expression
+ #
+ self.model.a.fixed = True
+ self.assertEqual(expr1.polynomial_degree(), None)
+ self.assertEqual(expr2.polynomial_degree(), None)
+ self.assertEqual(expr3.polynomial_degree(), None)
+ #
+ # Fixing 'a' and 'b' creates a constant expression
+ #
+ self.model.b.fixed = True
+ self.assertEqual(expr1.polynomial_degree(), 0)
+ self.assertEqual(expr2.polynomial_degree(), 0)
+ self.assertEqual(expr3.polynomial_degree(), 0)
+ #
+ # Fixing 'b' still leaves a non-constant expression for expr1
+ #
+ self.model.a.fixed = False
+ self.assertEqual(expr1.polynomial_degree(), None)
+ self.assertEqual(expr2.polynomial_degree(), 1)
+ self.assertEqual(expr3.polynomial_degree(), 1)
+
+ def test_nonpolynomial_pow(self):
+ m = self.instance
+ #
+ # A power with a variable exponent is not a polynomial
+ #
+ expr = pow(m.a, m.b)
+ self.assertEqual(expr.polynomial_degree(), None)
+ #
+ # A power with a constant exponent is not a polynomial
+ #
+ m.b.fixed = True
+ self.assertEqual(expr.polynomial_degree(), 2)
+ m.b.value = 0
+ self.assertEqual(expr.polynomial_degree(), 0)
+ #
+ # A power with a constant base and exponent is a constant
+ #
+ m.a.fixed = True
+ self.assertEqual(expr.polynomial_degree(), 0)
+ #
+ # A power with a constant base and variable exponent is not a polynomial
+ #
+ m.b.fixed = False
+ self.assertEqual(expr.polynomial_degree(), None)
+ #
+ # Confirm that pow() expresses the correct degree
+ #
+ m.a.fixed = False
+
+ expr = pow(m.a, 1)
+ self.assertEqual(expr.polynomial_degree(), 1)
+
+ expr = pow(m.a, 2)
+ self.assertEqual(expr.polynomial_degree(), 2)
+
+ expr = pow(m.a*m.a, 2)
+ self.assertEqual(expr.polynomial_degree(), 4)
+ #
+ # A non-integer exponent is not a polynomial
+ #
+ expr = pow(m.a*m.a, 2.1)
+ self.assertEqual(expr.polynomial_degree(), None)
+ #
+ # A negative exponent is not a polynomial
+ #
+ expr = pow(m.a*m.a, -1)
+ self.assertEqual(expr.polynomial_degree(), None)
+ #
+ # A nonpolynomial base is not a polynomial if the exponent is nonzero
+ #
+ expr = pow(2**m.a, 1)
+ self.assertEqual(expr.polynomial_degree(), None)
+
+ expr = pow(2**m.a, 0)
+ self.assertEqual(expr, 1)
+ self.assertEqual(as_numeric(expr).polynomial_degree(), 0)
+ #
+ # With an undefined exponent, the polynomial degree is None
+ #
+ expr = pow(m.a, m.e)
+ self.assertEqual(expr.polynomial_degree(), None)
+
+ def test_Expr_if(self):
+ m = self.instance
+ #
+ # When IF conditional is constant, then polynomial degree is propigated
+ #
+ expr = EXPR.Expr_if(1,m.a**3,m.a**2)
+ self.assertEqual(expr.polynomial_degree(), 3)
+ m.a.fixed = True
+ self.assertEqual(expr.polynomial_degree(), 0)
+ m.a.fixed = False
+
+ expr = EXPR.Expr_if(0,m.a**3,m.a**2)
+ self.assertEqual(expr.polynomial_degree(), 2)
+ m.a.fixed = True
+ self.assertEqual(expr.polynomial_degree(), 0)
+ m.a.fixed = False
+ #
+ # When IF conditional is variable, then polynomial degree is propagated
+ #
+ expr = EXPR.Expr_if(m.a,m.b,m.b**2)
+ self.assertEqual(expr.polynomial_degree(), None)
+ m.a.fixed = True
+ m.a.value = 1
+ self.assertEqual(expr.polynomial_degree(), 1)
+ #
+ # When IF conditional is uninitialized
+ #
+ # A constant expression has degree 0
+ #
+ expr = EXPR.Expr_if(m.e,1,0)
+ self.assertEqual(expr.polynomial_degree(), 0)
+ #
+ # A nonconstant expression has degree None because
+ # m.e is an uninitialized parameter
+ #
+ expr = EXPR.Expr_if(m.e,m.a,0)
+ self.assertEqual(expr.polynomial_degree(), None)
+
+
+#
+# TODO: Confirm that this checks for entangled expressions.
+#
+class EntangledExpressionErrors(unittest.TestCase):
+
+ def test_sumexpr_add_entangled(self):
+ x = Var()
+ e = x*2 + 1
+ e + 1
+
+ def test_entangled_test1(self):
+ self.m = ConcreteModel()
+ self.m.a = Var()
+ self.m.b = Var()
+ self.m.c = Var()
+ self.m.d = Var()
+
+ e1 = self.m.a + self.m.b
+
+ #print(e1)
+ #print(e1_)
+ #print("--")
+ e2 = self.m.c + e1
+
+ #print(e1)
+ #print(e1_)
+ #print(e2)
+ #print(e2_)
+ #print("--")
+ e3 = self.m.d + e1
+
+ self.assertEqual( e1.nargs(), 2)
+ self.assertEqual( e2.nargs(), 3)
+ self.assertEqual( e3.nargs(), 2)
+
+ self.assertNotEqual( id(e2.arg(2)), id(e3.arg(1).arg(1)))
+
+
+class TestSummationExpression(unittest.TestCase):
+
+ def setUp(self):
+ # This class tests the Pyomo 5.x expression trees
+
+ self.m = ConcreteModel()
+ self.m.I = RangeSet(5)
+ self.m.a = Var(self.m.I, initialize=5)
+ self.m.b = Var(self.m.I, initialize=10)
+ self.m.p = Param(self.m.I, initialize=1, mutable=True)
+ self.m.q = Param(self.m.I, initialize=3, mutable=False)
+
+ def tearDown(self):
+ self.m = None
+
+ def test_summation1(self):
+ e = sum_product(self.m.a)
+ self.assertEqual( e(), 25 )
+ self.assertIs(type(e), EXPR.LinearExpression)
+ self.assertEqual( id(self.m.a[1]), id(e.linear_vars[0]) )
+ self.assertEqual( id(self.m.a[2]), id(e.linear_vars[1]) )
+ self.assertEqual(e.size(), 1)
+
+ def test_summation2(self):
+ e = sum_product(self.m.p, self.m.a)
+ self.assertEqual( e(), 25 )
+ self.assertIs(type(e), EXPR.LinearExpression)
+ self.assertEqual( id(self.m.a[1]), id(e.linear_vars[0]) )
+ self.assertEqual( id(self.m.a[2]), id(e.linear_vars[1]) )
+ self.assertEqual(e.size(), 1)
+
+ def test_summation3(self):
+ e = sum_product(self.m.q, self.m.a)
+ self.assertEqual( e(), 75 )
+ self.assertIs(type(e), EXPR.LinearExpression)
+ self.assertEqual( id(self.m.a[1]), id(e.linear_vars[0]) )
+ self.assertEqual( id(self.m.a[2]), id(e.linear_vars[1]) )
+ self.assertEqual(e.size(), 1)
+
+ def test_summation4(self):
+ e = sum_product(self.m.a, self.m.b)
+ self.assertEqual( e(), 250 )
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual( id(self.m.a[1]), id(e.arg(0).arg(0)) )
+ self.assertEqual( id(self.m.a[2]), id(e.arg(1).arg(0)) )
+ self.assertEqual(e.size(), 16)
+
+ def test_summation5(self):
+ e = sum_product(self.m.b, denom=self.m.a)
+ self.assertEqual( e(), 10 )
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.size(), 21)
+
+ def test_summation6(self):
+ e = sum_product(self.m.a, denom=self.m.p)
+ self.assertEqual( e(), 25 )
+ self.assertIs(type(e), EXPR.LinearExpression)
+ #self.assertEqual( id(self.m.a[1]), id(e.arg(0).arg(0)) )
+ #self.assertEqual( id(self.m.a[2]), id(e.arg(1).arg(0)) )
+ #self.assertEqual(e.size(), 21)
+
+ def test_summation7(self):
+ e = sum_product(self.m.p, self.m.q, index=self.m.I)
+ self.assertEqual( e(), 15 )
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual( e.nargs(), 5)
+ self.assertEqual(e.size(), 16)
+
+ def test_summation_compression(self):
+ e1 = sum_product(self.m.a)
+ e2 = sum_product(self.m.b)
+ e = e1+e2
+ self.assertEqual( e(), 75 )
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual( e.nargs(), 2)
+ self.assertEqual(e.size(), 3)
+
+
+class TestSumExpression(unittest.TestCase):
+
+ def setUp(self):
+ # This class tests the Pyomo 5.x expression trees
+
+ self.m = ConcreteModel()
+ self.m.I = RangeSet(5)
+ self.m.a = Var(self.m.I, initialize=5)
+ self.m.b = Var(self.m.I, initialize=10)
+ self.m.p = Param(self.m.I, initialize=1, mutable=True)
+ self.m.q = Param(self.m.I, initialize=3, mutable=False)
+
+ def tearDown(self):
+ self.m = None
+
+ def test_summation1(self):
+ e = quicksum((self.m.a[i] for i in self.m.a), linear=False)
+ self.assertEqual( e(), 25 )
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual( id(self.m.a[1]), id(e.arg(0)) )
+ self.assertEqual( id(self.m.a[2]), id(e.arg(1)) )
+ self.assertEqual(e.size(), 6)
+ #
+ e = quicksum(self.m.a[i] for i in self.m.a)
+ self.assertEqual( e(), 25 )
+ self.assertIs(type(e), EXPR.LinearExpression)
+
+ def test_summation2(self):
+ e = quicksum((self.m.p[i]*self.m.a[i] for i in self.m.a), linear=False)
+ self.assertEqual( e(), 25 )
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual( id(self.m.a[1]), id(e.arg(0).arg(1)) )
+ self.assertEqual( id(self.m.a[2]), id(e.arg(1).arg(1)) )
+ self.assertEqual(e.size(), 16)
+ #
+ e = quicksum(self.m.p[i]*self.m.a[i] for i in self.m.a)
+ self.assertEqual( e(), 25 )
+ self.assertIs(type(e), EXPR.LinearExpression)
+
+ def test_summation3(self):
+ e = quicksum((self.m.q[i]*self.m.a[i] for i in self.m.a), linear=False)
+ self.assertEqual( e(), 75 )
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual( id(self.m.a[1]), id(e.arg(0).arg(1)) )
+ self.assertEqual( id(self.m.a[2]), id(e.arg(1).arg(1)) )
+ self.assertEqual(e.size(), 16)
+ #
+ e = quicksum(self.m.q[i]*self.m.a[i] for i in self.m.a)
+ self.assertEqual( e(), 75 )
+ self.assertIs(type(e), EXPR.LinearExpression)
+
+ def test_summation4(self):
+ e = quicksum(self.m.a[i]*self.m.b[i] for i in self.m.a)
+ self.assertEqual( e(), 250 )
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual( id(self.m.a[1]), id(e.arg(0).arg(0)) )
+ self.assertEqual( id(self.m.a[2]), id(e.arg(1).arg(0)) )
+ self.assertEqual(e.size(), 16)
+
+ def test_summation5(self):
+ e = quicksum(self.m.b[i]/self.m.a[i] for i in self.m.a)
+ self.assertEqual( e(), 10 )
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual(e.size(), 21)
+
+ def test_summation6(self):
+ e = quicksum((self.m.a[i]/self.m.p[i] for i in self.m.a), linear=False)
+ self.assertEqual( e(), 25 )
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual( id(self.m.a[1]), id(e.arg(0).arg(1)) )
+ self.assertEqual( id(self.m.a[2]), id(e.arg(1).arg(1)) )
+ self.assertEqual(e.size(), 21)
+ #
+ e = quicksum(self.m.a[i]/self.m.p[i] for i in self.m.a)
+ self.assertEqual( e(), 25 )
+ self.assertIs(type(e), EXPR.LinearExpression)
+
+ def test_summation7(self):
+ e = quicksum((self.m.p[i]*self.m.q[i] for i in self.m.I), linear=False)
+ self.assertEqual( e(), 15 )
+ self.assertIs(type(e), EXPR.SumExpression)
+ self.assertEqual( e.nargs(), 5)
+ self.assertEqual(e.size(), 16)
+ #
+ e = quicksum(self.m.p[i]*self.m.q[i] for i in self.m.I)
+ self.assertEqual( e(), 15 )
+ self.assertIs(type(e), EXPR.SumExpression)
+
+
+class TestCloneExpression(unittest.TestCase):
+
+ def setUp(self):
+ # This class tests the Pyomo 5.x expression trees
+
+ self.m = ConcreteModel()
+ self.m.a = Var(initialize=5)
+ self.m.b = Var(initialize=10)
+ self.m.p = Param(initialize=1, mutable=True)
+
+ def tearDown(self):
+ self.m = None
+
+ def test_numeric(self):
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ e_ = 1
+ e = EXPR.clone_expression(e_)
+ self.assertEqual(id(e), id(e_))
+ e = EXPR.clone_expression(self.m.p)
+ self.assertEqual(id(e), id(self.m.p))
+ #
+ total = counter.count - start
+ self.assertEqual(total, 2)
+
+ def test_Expression(self):
+ #
+ # Identify variables when there are duplicates
+ #
+ m = ConcreteModel()
+ m.a = Var(initialize=1)
+ m.b = Var(initialize=2)
+ m.e = Expression(expr=3*m.a)
+ m.E = Expression([0,1], initialize={0:3*m.a, 1:4*m.b})
+
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ expr1 = m.e + m.E[1]
+ expr2 = expr1.clone()
+ self.assertEqual( expr1(), 11 )
+ self.assertEqual( expr2(), 11 )
+ self.assertNotEqual( id(expr1), id(expr2) )
+ self.assertNotEqual( id(expr1._args_), id(expr2._args_) )
+ self.assertEqual( id(expr1.arg(0)), id(expr2.arg(0)) )
+ self.assertEqual( id(expr1.arg(1)), id(expr2.arg(1)) )
+ #
+ total = counter.count - start
+ self.assertEqual(total, 1)
+
+ def test_ExpressionX(self):
+ #
+ # Identify variables when there are duplicates
+ #
+ m = ConcreteModel()
+ m.a = Var(initialize=1)
+ m.b = Var(initialize=2)
+ m.e = Expression(expr=3*m.a)
+ m.E = Expression([0,1], initialize={0:3*m.a, 1:4*m.b})
+
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ expr1 = m.e + m.E[1]
+ expr2 = copy.deepcopy(expr1)
+ self.assertEqual( expr1(), 11 )
+ self.assertEqual( expr2(), 11 )
+ self.assertNotEqual( id(expr1), id(expr2) )
+ self.assertNotEqual( id(expr1._args_), id(expr2._args_) )
+ self.assertNotEqual( id(expr1.arg(0)), id(expr2.arg(0)) )
+ self.assertNotEqual( id(expr1.arg(1)), id(expr2.arg(1)) )
+ #
+ total = counter.count - start
+ self.assertEqual(total, 0)
+
+ def test_SumExpression(self):
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ expr1 = self.m.a + self.m.b
+ expr2 = expr1.clone()
+ self.assertEqual( expr1(), 15 )
+ self.assertEqual( expr2(), 15 )
+ self.assertNotEqual( id(expr1), id(expr2) )
+ self.assertNotEqual( id(expr1._args_), id(expr2._args_) )
+ self.assertEqual( id(expr1.arg(0)), id(expr2.arg(0)) )
+ self.assertEqual( id(expr1.arg(1)), id(expr2.arg(1)) )
+ expr1 += self.m.b
+ self.assertEqual( expr1(), 25 )
+ self.assertEqual( expr2(), 15 )
+ self.assertNotEqual( id(expr1), id(expr2) )
+ self.assertNotEqual( id(expr1._args_), id(expr2._args_) )
+ self.assertEqual( id(expr1.arg(1)), id(expr2.arg(1)) )
+ self.assertEqual( id(expr1.arg(1)), id(expr2.arg(1)) )
+ #
+ total = counter.count - start
+ self.assertEqual(total, 1)
+
+ def test_SumExpressionX(self):
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ expr1 = self.m.a + self.m.b
+ expr2 = copy.deepcopy(expr1)
+ self.assertEqual( expr1(), 15 )
+ self.assertEqual( expr2(), 15 )
+ self.assertNotEqual( id(expr1), id(expr2) )
+ self.assertNotEqual( id(expr1._args_), id(expr2._args_) )
+ self.assertNotEqual( id(expr1.arg(0)), id(expr2.arg(0)) )
+ self.assertNotEqual( id(expr1.arg(1)), id(expr2.arg(1)) )
+ expr1 += self.m.b
+ self.assertEqual( expr1(), 25 )
+ self.assertEqual( expr2(), 15 )
+ self.assertNotEqual( id(expr1), id(expr2) )
+ self.assertNotEqual( id(expr1._args_), id(expr2._args_) )
+ self.assertNotEqual( id(expr1.arg(1)), id(expr2.arg(1)) )
+ self.assertNotEqual( id(expr1.arg(1)), id(expr2.arg(1)) )
+ #
+ total = counter.count - start
+ self.assertEqual(total, 0)
+
+ def test_SumExpressionY(self):
+ self.m = ConcreteModel()
+ A = range(5)
+ self.m.a = Var(A, initialize=5)
+ self.m.b = Var(initialize=10)
+
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ expr1 = quicksum(self.m.a[i] for i in self.m.a)
+ expr2 = copy.deepcopy(expr1)
+ self.assertEqual( expr1(), 25 )
+ self.assertEqual( expr2(), 25 )
+ self.assertNotEqual( id(expr1), id(expr2) )
+ self.assertEqual( id(expr1._args_), id(expr2._args_) )
+ self.assertNotEqual( id(expr1.linear_vars[0]), id(expr2.linear_vars[0]) )
+ self.assertNotEqual( id(expr1.linear_vars[1]), id(expr2.linear_vars[1]) )
+ expr1 += self.m.b
+ self.assertEqual( expr1(), 35 )
+ self.assertEqual( expr2(), 25 )
+ self.assertNotEqual( id(expr1), id(expr2) )
+ self.assertNotEqual( id(expr1._args_), id(expr2._args_) )
+ #
+ total = counter.count - start
+ self.assertEqual(total, 0)
+
+ def test_ProductExpression_mult(self):
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ #
+ expr1 = self.m.a * self.m.b
+ expr2 = expr1.clone()
+ self.assertEqual( expr1(), 50 )
+ self.assertEqual( expr2(), 50 )
+ self.assertNotEqual( id(expr1), id(expr2) )
+ self.assertNotEqual( id(expr1._args_), id(expr2._args_) )
+ self.assertEqual( id(expr1.arg(0)), id(expr2.arg(0)) )
+ self.assertEqual( id(expr1.arg(1)), id(expr2.arg(1)) )
+
+ expr1 *= self.m.b
+ self.assertEqual( expr1(), 500 )
+ self.assertEqual( expr2(), 50 )
+ self.assertNotEqual( id(expr1), id(expr2) )
+ self.assertNotEqual( id(expr1._args_), id(expr2._args_) )
+ self.assertNotEqual( id(expr1.arg(0)._args_), id(expr2._args_) )
+ self.assertEqual( id(expr1.arg(1)), id(expr2.arg(1)) )
+ self.assertEqual( id(expr1.arg(0).arg(0)), id(expr2.arg(0)) )
+ self.assertEqual( id(expr1.arg(0).arg(1)), id(expr2.arg(1)) )
+
+ expr1 = self.m.a * (self.m.b + self.m.a)
+ expr2 = expr1.clone()
+ self.assertEqual( expr1(), 75 )
+ self.assertEqual( expr2(), 75 )
+ # Note that since one of the args is a sum expression, the _args_
+ # in the sum is a *list*, which will be duplicated by deepcopy.
+ # This will cause the two args in the Product to be different.
+ self.assertNotEqual( id(expr1), id(expr2) )
+ self.assertNotEqual( id(expr1._args_), id(expr2._args_) )
+ self.assertEqual( id(expr1.arg(0)), id(expr2.arg(0)) )
+ self.assertNotEqual( id(expr1.arg(1)), id(expr2.arg(1)) )
+ #
+ total = counter.count - start
+ self.assertEqual(total, 2)
+
+ def test_ProductExpression_div(self):
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ #
+ expr1 = self.m.a / self.m.b
+ expr2 = expr1.clone()
+ self.assertEqual( expr1(), 0.5 )
+ self.assertEqual( expr2(), 0.5 )
+ self.assertNotEqual( id(expr1), id(expr2) )
+ self.assertNotEqual( id(expr1._args_), id(expr2._args_) )
+ self.assertEqual( id(expr1.arg(0)), id(expr2.arg(0)) )
+ self.assertEqual( id(expr1.arg(1).arg(0)), id(expr2.arg(1).arg(0)) )
+
+ expr1 /= self.m.b
+ self.assertEqual( expr1(), 0.05 )
+ self.assertEqual( expr2(), 0.5 )
+ self.assertNotEqual( id(expr1), id(expr2) )
+ self.assertNotEqual( id(expr1._args_), id(expr2._args_) )
+ self.assertNotEqual( id(expr1.arg(0)._args_), id(expr2._args_) )
+ self.assertEqual( id(expr1.arg(1).arg(0)), id(expr2.arg(1).arg(0)) )
+ self.assertEqual( id(expr1.arg(0).arg(0)), id(expr2.arg(0)) )
+ self.assertEqual( id(expr1.arg(0).arg(1).arg(0)), id(expr2.arg(1).arg(0)) )
+
+ expr1 = self.m.a / (self.m.b + self.m.a)
+ expr2 = expr1.clone()
+ self.assertEqual( expr1(), 1/3. )
+ self.assertEqual( expr2(), 1/3. )
+ # Note that since one of the args is a sum expression, the _args_
+ # in the sum is a *list*, which will be duplicated by deepcopy.
+ # This will cause the two args in the Product to be different.
+ self.assertNotEqual( id(expr1), id(expr2) )
+ self.assertNotEqual( id(expr1._args_), id(expr2._args_) )
+ self.assertEqual( id(expr1.arg(0)), id(expr2.arg(0)) )
+ self.assertNotEqual( id(expr1.arg(1)), id(expr2.arg(1)) )
+ #
+ total = counter.count - start
+ self.assertEqual(total, 2)
+
+ def test_sumOfExpressions(self):
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ #
+ expr1 = self.m.a * self.m.b + self.m.a * self.m.a
+ expr2 = expr1.clone()
+ self.assertEqual(expr1(), 75)
+ self.assertEqual(expr2(), 75)
+ self.assertNotEqual(id(expr1), id(expr2))
+ self.assertNotEqual(id(expr1._args_), id(expr2._args_))
+ self.assertEqual(expr1.arg(0)(), expr2.arg(0)())
+ self.assertEqual(expr1.arg(1)(), expr2.arg(1)())
+ self.assertNotEqual(id(expr1.arg(0)), id(expr2.arg(0)))
+ self.assertNotEqual(id(expr1.arg(1)), id(expr2.arg(1)))
+ expr1 += self.m.b
+ self.assertEqual(expr1(), 85)
+ self.assertEqual(expr2(), 75)
+ self.assertNotEqual(id(expr1), id(expr2))
+ self.assertNotEqual(id(expr1._args_), id(expr2._args_))
+ self.assertEqual(expr1.nargs(), 3)
+ self.assertEqual(expr2.nargs(), 2)
+ self.assertEqual(expr1.arg(0)(), 50)
+ self.assertEqual(expr1.arg(1)(), 25)
+ self.assertNotEqual(id(expr1.arg(0)), id(expr2.arg(0)))
+ self.assertNotEqual(id(expr1.arg(1)), id(expr2.arg(1)))
+ #
+ total = counter.count - start
+ self.assertEqual(total, 1)
+
+ def test_productOfExpressions(self):
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ #
+ expr1 = (self.m.a + self.m.b) * (self.m.a + self.m.a)
+ expr2 = expr1.clone()
+ self.assertEqual(expr1(), 150)
+ self.assertEqual(expr2(), 150)
+ self.assertNotEqual(id(expr1), id(expr2))
+ self.assertNotEqual(id(expr1._args_), id(expr2._args_))
+ self.assertNotEqual(id(expr1.arg(0)), id(expr2.arg(0)))
+ self.assertNotEqual(id(expr1.arg(1)), id(expr2.arg(1)))
+ self.assertEqual(expr1.arg(0)(), expr2.arg(0)())
+ self.assertEqual(expr1.arg(1)(), expr2.arg(1)())
+
+ self.assertEqual(expr1.arg(0).nargs(), 2)
+ self.assertEqual(expr2.arg(0).nargs(), 2)
+ self.assertEqual(expr1.arg(1).nargs(), 2)
+ self.assertEqual(expr2.arg(1).nargs(), 2)
+
+ self.assertIs( expr1.arg(0).arg(0),
+ expr2.arg(0).arg(0) )
+ self.assertIs( expr1.arg(0).arg(1),
+ expr2.arg(0).arg(1) )
+ self.assertIs( expr1.arg(1).arg(0),
+ expr2.arg(1).arg(0) )
+
+ expr1 *= self.m.b
+ self.assertEqual(expr1(), 1500)
+ self.assertEqual(expr2(), 150)
+ self.assertNotEqual(id(expr1), id(expr2))
+ self.assertNotEqual(id(expr1.arg(0)), id(expr2.arg(0)))
+ self.assertNotEqual(id(expr1.arg(1)), id(expr2.arg(1)))
+
+ self.assertIs(type(expr1.arg(0)), type(expr2))
+ self.assertEqual(expr1.arg(0)(), expr2())
+
+ self.assertEqual(expr1.nargs(), 2)
+ self.assertEqual(expr2.nargs(), 2)
+ #
+ total = counter.count - start
+ self.assertEqual(total, 1)
+
+ def test_productOfExpressions_div(self):
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ #
+ expr1 = (self.m.a + self.m.b) / (self.m.a + self.m.a)
+ expr2 = expr1.clone()
+
+ self.assertNotEqual(id(expr1), id(expr2))
+ self.assertNotEqual(id(expr1._args_), id(expr2._args_))
+ self.assertNotEqual(id(expr1.arg(0)), id(expr2.arg(0)))
+ self.assertNotEqual(id(expr1.arg(1)), id(expr2.arg(1)))
+ self.assertEqual(expr1.arg(0)(), expr2.arg(0)())
+ self.assertEqual(expr1.arg(1)(), expr2.arg(1)())
+
+ self.assertEqual(expr1.arg(0).nargs(), 2)
+ self.assertEqual(expr2.arg(0).nargs(), 2)
+ self.assertEqual(expr1.arg(1).nargs(), 1)
+ self.assertEqual(expr2.arg(1).nargs(), 1)
+
+ self.assertIs( expr1.arg(0).arg(0), expr2.arg(0).arg(0) )
+ self.assertIs( expr1.arg(0).arg(1), expr2.arg(0).arg(1) )
+ self.assertIs( expr1.arg(1).arg(0).arg(0), expr2.arg(1).arg(0).arg(0) )
+ self.assertIs( expr1.arg(1).arg(0).arg(1), expr2.arg(1).arg(0).arg(1) )
+
+ expr1 /= self.m.b
+ self.assertAlmostEqual(expr1(), .15)
+ self.assertAlmostEqual(expr2(), 1.5)
+ self.assertNotEqual(id(expr1.arg(0)), id(expr2.arg(0)))
+ self.assertNotEqual(id(expr1.arg(1)), id(expr2.arg(1)))
+
+ self.assertIs(type(expr1.arg(0)), type(expr2))
+ self.assertAlmostEqual(expr1.arg(0)(), expr2())
+
+ self.assertEqual(expr1.nargs(), 2)
+ self.assertEqual(expr2.nargs(), 2)
+ #
+ total = counter.count - start
+ self.assertEqual(total, 1)
+
+ def test_Expr_if(self):
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ #
+ expr1 = EXPR.Expr_if(IF=self.m.a + self.m.b < 20, THEN=self.m.a, ELSE=self.m.b)
+ expr2 = expr1.clone()
+ self.assertNotEqual(id(expr1), id(expr2))
+ self.assertEqual(expr1(), value(self.m.a))
+ self.assertEqual(expr2(), value(self.m.a))
+ self.assertNotEqual(id(expr1._if), id(expr2._if))
+ self.assertEqual(id(expr1._then), id(expr2._then))
+ self.assertEqual(id(expr1._else), id(expr2._else))
+ self.assertEqual(expr1._if(), expr2._if())
+ self.assertEqual(expr1._then(), expr2._then())
+ self.assertEqual(expr1._else(), expr2._else())
+ #
+ total = counter.count - start
+ self.assertEqual(total, 1)
+
+ def test_getitem(self):
+ # Testing cloning of the abs() function
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ #
+ m = ConcreteModel()
+ m.I = RangeSet(1,9)
+ m.x = Var(m.I, initialize=lambda m,i: i+1)
+ m.P = Param(m.I, initialize=lambda m,i: 10-i, mutable=True)
+ t = IndexTemplate(m.I)
+
+ e = m.x[t+m.P[t+1]] + 3
+ e_ = e.clone()
+ self.assertEqual("x({I} + P({I} + 1)) + 3", str(e_))
+ #
+ total = counter.count - start
+ self.assertEqual(total, 1)
+
+ def test_other(self):
+ # Testing cloning of the abs() function
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ #
+ model = ConcreteModel()
+ model.a = Var()
+ model.x = ExternalFunction(library='foo.so', function='bar')
+ e = model.x(2*model.a, 1, "foo", [])
+ e_ = e.clone()
+ self.assertEqual(type(e_), type(e))
+ self.assertEqual(type(e_.arg(0)), type(e.arg(0)))
+ self.assertEqual(type(e_.arg(1)), type(e.arg(1)))
+ self.assertEqual(type(e_.arg(2)), type(e.arg(2)))
+ self.assertEqual(type(e_.arg(3)), type(e.arg(3)))
+ #
+ total = counter.count - start
+ self.assertEqual(total, 1)
+
+ def test_abs(self):
+ # Testing cloning of the abs() function
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ #
+ expr1 = abs(self.m.a)
+ expr2 = expr1.clone()
+ self.assertNotEqual(id(expr1), id(expr2))
+ self.assertEqual(expr1(), value(self.m.a))
+ self.assertEqual(expr2(), value(self.m.a))
+ self.assertEqual(id(expr1.arg(0)), id(expr2.arg(0)))
+ #
+ total = counter.count - start
+ self.assertEqual(total, 1)
+
+ def test_sin(self):
+ # Testing cloning of intrinsic functions
+ with EXPR.clone_counter() as counter:
+ start = counter.count
+ #
+ expr1 = sin(self.m.a)
+ expr2 = expr1.clone()
+ self.assertNotEqual(id(expr1), id(expr2))
+ self.assertEqual(expr1(), math.sin(value(self.m.a)))
+ self.assertEqual(expr2(), math.sin(value(self.m.a)))
+ self.assertEqual(id(expr1.arg(0)), id(expr2.arg(0)))
+ #
+ total = counter.count - start
+ self.assertEqual(total, 1)
+
+
+#
+# Fixed - Expr has a fixed value
+# Constant - Expr only contains constants and immutable parameters
+# PotentiallyVariable - Expr contains one or more variables
+#
+class TestIsFixedIsConstant(unittest.TestCase):
+
+ def setUp(self):
+ # This class tests the Pyomo 5.x expression trees
+
+ def d_fn(model):
+ return model.c+model.c
+ self.model = AbstractModel()
+ self.model.a = Var(initialize=1.0)
+ self.model.b = Var(initialize=2.0)
+ self.model.c = Param(initialize=1, mutable=True)
+ self.model.d = Param(initialize=d_fn, mutable=True)
+ self.model.e = Param(initialize=d_fn, mutable=False)
+ self.instance = self.model.create_instance()
+
+ def tearDown(self):
+ self.model = None
+ self.instance = None
+
+ def test_simple_sum(self):
+ #
+ # Sum of mutable parameters: fixed, not constant, not pvar
+ #
+ expr = self.instance.c + self.instance.d
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), False)
+ #
+ # Sum of mutable and immutable parameters: fixed, not constant, not pvar
+ #
+ expr = self.instance.e + self.instance.d
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), False)
+ #
+ # Sum of immutable parameters: fixed, constant, not pvar
+ #
+ expr = self.instance.e + self.instance.e
+ self.assertEqual(is_fixed(expr), True)
+ self.assertEqual(is_constant(expr), True)
+ self.assertEqual(potentially_variable(expr), False)
+ #
+ # Sum of unfixed variables: not fixed, not constant, pvar
+ #
+ expr = self.instance.a + self.instance.b
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ #
+ # Sum of fixed and unfixed variables: not fixed, not constant, pvar
+ #
+ self.instance.a.fixed = True
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ #
+ # Sum of fixed variables: fixed, not constant, pvar
+ #
+ self.instance.b.fixed = True
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ def test_linear_sum(self):
+ m = ConcreteModel()
+ A = range(5)
+ m.v = Var(A)
+
+ e = quicksum(m.v[i] for i in A)
+ self.assertEqual(e.is_fixed(), False)
+ for i in A:
+ m.v[i].fixed = True
+ self.assertEqual(e.is_fixed(), True)
+
+ with linear_expression() as e:
+ e += 1
+ self.assertEqual(len(e.linear_vars), 0)
+ self.assertEqual(e.is_fixed(), True)
+
+ def test_relational_ops(self):
+ #
+ # Relation of mutable parameters: fixed, not constant, pvar
+ #
+ expr = self.instance.c < self.instance.d
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), False)
+ expr = inequality(0, self.instance.c, self.instance.d)
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), False)
+ expr = self.instance.c == self.instance.d
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), False)
+ #
+ # Relation of unfixed variable and mutable parameters: not fixed, not constant, pvar
+ #
+ expr = self.instance.a <= self.instance.d
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ expr = inequality(0, self.instance.a, self.instance.d)
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ expr = self.instance.a == self.instance.d
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ #
+ # Relation of unfixed variables: not fixed, not constant, pvar
+ #
+ expr = self.instance.a * self.instance.a >= self.instance.b
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ expr = self.instance.a * self.instance.a == self.instance.b
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ expr = inequality(self.instance.b, self.instance.a * self.instance.a, 0)
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ #
+ # Relation of fixed and unfixed variables: not fixed, not constant, pvar
+ #
+ self.instance.a.fixed = True
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ #
+ # Relation of fixed variables: fixed, not constant, pvar
+ #
+ self.instance.b.fixed = True
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ def test_simple_product(self):
+ #
+ # Product of mutable parameters: fixed, not constant, not pvar
+ #
+ expr = self.instance.c * self.instance.d
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), False)
+ #
+ # Product of unfixed variable and mutable parameter: not fixed, not constant, pvar
+ #
+ expr = self.instance.a * self.instance.c
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ #
+ # Product of unfixed variables: not fixed, not constant, pvar
+ #
+ expr = self.instance.a * self.instance.b
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ #
+ # Product of fixed and unfixed variables: not fixed, not constant, pvar
+ #
+ self.instance.a.fixed = True
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ #
+ # Product of fixed variables: fixed, not constant, pvar
+ #
+ self.instance.b.fixed = True
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.instance.a.fixed = False
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ #
+ # Fraction of unfixed variable and mutable parameter: not fixed, not constant, pvar
+ #
+ expr = self.instance.a / self.instance.c
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ #
+ # Fraction of fixed variable and mutable parameter: fixed, not constant, pvar
+ #
+ self.instance.a.fixed = True
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ self.instance.a.fixed = False
+ #
+ # Fraction of unfixed variable and mutable parameter: not fixed, not constant, pvar
+ #
+ expr = self.instance.c / self.instance.a
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ #
+ # Fraction of fixed variable and mutable parameter: fixed, not constant, pvar
+ #
+ self.instance.a.fixed = True
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ def test_misc_operators(self):
+ #
+ # Negation of product of unfixed variables: not fixed, not constant, pvar
+ #
+ expr = -(self.instance.a * self.instance.b)
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ def test_polynomial_external_func(self):
+ model = ConcreteModel()
+ model.a = Var()
+ model.p = Param(initialize=1, mutable=True)
+ model.x = ExternalFunction(library='foo.so', function='bar')
+
+ expr = model.x(2*model.a, 1, "foo", [])
+ self.assertEqual(expr.polynomial_degree(), None)
+
+ expr = model.x(2*model.p, 1, "foo", [])
+ self.assertEqual(expr.polynomial_degree(), 0)
+
+ def test_getitem(self):
+ m = ConcreteModel()
+ m.I = RangeSet(1,9)
+ m.x = Var(m.I, initialize=lambda m,i: i+1)
+ m.P = Param(m.I, initialize=lambda m,i: 10-i, mutable=True)
+ t = IndexTemplate(m.I)
+
+ e = m.x[t]
+ self.assertEqual(e.is_constant(), False)
+ self.assertEqual(e.is_potentially_variable(), True)
+ self.assertEqual(e.is_fixed(), False)
+
+ e = m.x[t+m.P[t+1]] + 3
+ self.assertEqual(e.is_constant(), False)
+ self.assertEqual(e.is_potentially_variable(), True)
+ self.assertEqual(e.is_fixed(), False)
+
+ for i in m.I:
+ m.x[i].fixed = True
+ e = m.x[t]
+ self.assertEqual(e.is_constant(), False)
+ self.assertEqual(e.is_potentially_variable(), True)
+ self.assertEqual(e.is_fixed(), True)
+
+ e = m.x[t+m.P[t+1]] + 3
+ self.assertEqual(e.is_constant(), False)
+ self.assertEqual(e.is_potentially_variable(), True)
+ self.assertEqual(e.is_fixed(), True)
+
+
+ e = m.P[t+1] + 3
+ self.assertEqual(e.is_constant(), False)
+ self.assertEqual(e.is_potentially_variable(), False)
+ self.assertEqual(e.is_fixed(), True)
+
+ def test_nonpolynomial_abs(self):
+ #
+ # abs() is fixed or constant depending on its arguments
+ #
+ expr1 = abs(self.instance.a * self.instance.b)
+ self.assertEqual(expr1.is_fixed(), False)
+ self.assertEqual(expr1.is_constant(), False)
+ self.assertEqual(expr1.is_potentially_variable(), True)
+
+ expr2 = self.instance.a + self.instance.b * abs(self.instance.b)
+ self.assertEqual(expr2.is_fixed(), False)
+ self.assertEqual(expr2.is_constant(), False)
+ self.assertEqual(expr2.is_potentially_variable(), True)
+
+ expr3 = self.instance.a * ( self.instance.b + abs(self.instance.b) )
+ self.assertEqual(expr3.is_fixed(), False)
+ self.assertEqual(expr3.is_constant(), False)
+ self.assertEqual(expr3.is_potentially_variable(), True)
+
+ #
+ # Fixing variables should turn intrinsic functions into constants
+ #
+ self.instance.a.fixed = True
+ self.assertEqual(expr1.is_fixed(), False)
+ self.assertEqual(expr1.is_constant(), False)
+ self.assertEqual(expr1.is_potentially_variable(), True)
+ self.assertEqual(expr2.is_fixed(), False)
+ self.assertEqual(expr2.is_constant(), False)
+ self.assertEqual(expr2.is_potentially_variable(), True)
+ self.assertEqual(expr3.is_fixed(), False)
+ self.assertEqual(expr3.is_constant(), False)
+ self.assertEqual(expr3.is_potentially_variable(), True)
+
+ self.instance.b.fixed = True
+ self.assertEqual(expr1.is_fixed(), True)
+ self.assertEqual(expr1.is_constant(), False)
+ self.assertEqual(expr1.is_potentially_variable(), True)
+ self.assertEqual(expr2.is_fixed(), True)
+ self.assertEqual(expr2.is_constant(), False)
+ self.assertEqual(expr2.is_potentially_variable(), True)
+ self.assertEqual(expr3.is_fixed(), True)
+ self.assertEqual(expr3.is_constant(), False)
+ self.assertEqual(expr3.is_potentially_variable(), True)
+
+ self.instance.a.fixed = False
+ self.assertEqual(expr1.is_fixed(), False)
+ self.assertEqual(expr1.is_constant(), False)
+ self.assertEqual(expr1.is_potentially_variable(), True)
+ self.assertEqual(expr2.is_fixed(), False)
+ self.assertEqual(expr2.is_constant(), False)
+ self.assertEqual(expr2.is_potentially_variable(), True)
+ self.assertEqual(expr3.is_fixed(), False)
+ self.assertEqual(expr3.is_constant(), False)
+ self.assertEqual(expr3.is_potentially_variable(), True)
+
+ def test_nonpolynomial_pow(self):
+ m = self.instance
+ #
+ # A power with a mutable base and exponent: fixed, not constant, not pvar
+ #
+ expr = pow(m.d, m.e)
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), False)
+ #
+ # A power with a variable exponent: not fixed, not constant, pvar
+ #
+ expr = pow(m.a, m.b)
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ #
+ # A power with a constant exponent: not fixed, not constant, pvar
+ #
+ m.b.fixed = True
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ m.a.fixed = True
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ m.b.fixed = False
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ m.a.fixed = False
+
+ expr = pow(m.a, 1)
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ expr = pow(m.a, 2)
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ expr = pow(m.a*m.a, 2)
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ expr = pow(m.a*m.a, 2.1)
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ expr = pow(m.a*m.a, -1)
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ expr = pow(2**m.a, 1)
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ expr = pow(2**m.a, 0)
+ self.assertEqual(is_fixed(expr), True)
+ self.assertEqual(is_constant(expr), True)
+ self.assertEqual(expr, 1)
+ self.assertEqual(as_numeric(expr).polynomial_degree(), 0)
+
+ def test_Expr_if(self):
+ m = self.instance
+
+ expr = EXPR.Expr_if(1,m.a,m.e)
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ m.a.fixed = True
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ m.a.fixed = False
+
+ expr = EXPR.Expr_if(0,m.a,m.e)
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), True)
+ # BUG
+ #self.assertEqual(expr.is_potentially_variable(), False)
+ m.a.fixed = True
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), True)
+ # BUG
+ #self.assertEqual(expr.is_potentially_variable(), False)
+ m.a.fixed = False
+
+ expr = EXPR.Expr_if(m.a,m.b,m.b)
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ m.a.fixed = True
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+ m.a.fixed = False
+
+ def test_LinearExpr(self):
+ m = self.instance
+
+ expr = m.a + m.b
+ self.assertIs(type(expr), EXPR.SumExpression)
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ m.a.fix(1)
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ m.b.fix(1)
+ self.assertEqual(expr.is_fixed(), True)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ m.a.unfix()
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ m.a.unfix()
+
+ expr -= m.a
+ self.assertEqual(expr.is_fixed(), False) # With a simple tree, the terms do not cancel
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ expr -= m.b
+ self.assertEqual(expr.is_fixed(), False)
+ self.assertEqual(expr.is_constant(), False)
+ self.assertEqual(expr.is_potentially_variable(), True)
+
+ def test_expression(self):
+ m = ConcreteModel()
+ m.x = Expression()
+ e = m.x
+ self.assertEqual(e.is_potentially_variable(), True)
+ self.assertEqual(potentially_variable(e), True)
+
+ e = m.x + 1
+ self.assertEqual(e.is_potentially_variable(), True)
+ self.assertEqual(potentially_variable(e), True)
+
+ e = m.x**2
+ self.assertEqual(e.is_potentially_variable(), True)
+ self.assertEqual(potentially_variable(e), True)
+
+ e = m.x**2/(m.x + 1)
+ self.assertEqual(e.is_potentially_variable(), True)
+ self.assertEqual(potentially_variable(e), True)
+
+ def test_misc(self):
+ self.assertEqual(potentially_variable(0), False)
+ self.assertEqual(potentially_variable('a'), False)
+ self.assertEqual(potentially_variable(None), False)
+
+ def test_external_func(self):
+ m = ConcreteModel()
+ m.a = Var(initialize=1)
+ m.p = Param(initialize=1, mutable=True)
+ m.x = ExternalFunction(library='foo.so', function='bar')
+
+ e = m.x(m.a, 1, "foo bar", [])
+ self.assertEqual(e.is_potentially_variable(), True)
+ e = m.x(m.p, 1, "foo bar", [])
+ self.assertEqual(e.is_potentially_variable(), False)
+
+
+class TestExpressionUtilities(unittest.TestCase):
+
+ def test_identify_vars_numeric(self):
+ #
+ # There are no variables in a constant expression
+ #
+ self.assertEqual( list(EXPR.identify_variables(5)), [] )
+
+ def test_identify_vars_params(self):
+ m = ConcreteModel()
+ m.I = RangeSet(3)
+ m.a = Param(initialize=1)
+ m.b = Param(m.I, initialize=1, mutable=True)
+ #
+ # There are no variables in expressions with only parameters
+ #
+ self.assertEqual( list(EXPR.identify_variables(m.a)), [] )
+ self.assertEqual( list(EXPR.identify_variables(m.b[1])), [] )
+ self.assertEqual( list(EXPR.identify_variables(m.a+m.b[1])), [] )
+ self.assertEqual( list(EXPR.identify_variables(m.a**m.b[1])), [] )
+ self.assertEqual( list(EXPR.identify_variables(
+ m.a**m.b[1] + m.b[2])), [] )
+ self.assertEqual( list(EXPR.identify_variables(
+ m.a**m.b[1] + m.b[2]*m.b[3]*m.b[2])), [] )
+
+ def test_identify_duplicate_vars(self):
+ #
+ # Identify variables when there are duplicates
+ #
+ m = ConcreteModel()
+ m.a = Var(initialize=1)
+
+ #self.assertEqual( list(EXPR.identify_variables(2*m.a+2*m.a, allow_duplicates=True)),
+ # [ m.a, m.a ] )
+ self.assertEqual( list(EXPR.identify_variables(2*m.a+2*m.a)),
+ [ m.a ] )
+
+ def test_identify_vars_expr(self):
+ #
+ # Identify variables when there are duplicates
+ #
+ m = ConcreteModel()
+ m.a = Var(initialize=1)
+ m.b = Var(initialize=2)
+ m.e = Expression(expr=3*m.a)
+ m.E = Expression([0,1], initialize={0:3*m.a, 1:4*m.b})
+
+ self.assertEqual( list(EXPR.identify_variables(m.b+m.e)), [ m.b, m.a ] )
+ self.assertEqual( list(EXPR.identify_variables(m.E[0])), [ m.a ] )
+ self.assertEqual( list(EXPR.identify_variables(m.E[1])), [ m.b ] )
+
+ def test_identify_vars_vars(self):
+ m = ConcreteModel()
+ m.I = RangeSet(3)
+ m.a = Var(initialize=1)
+ m.b = Var(m.I, initialize=1)
+ m.p = Param(initialize=1, mutable=True)
+ m.x = ExternalFunction(library='foo.so', function='bar')
+ #
+ # Identify variables in various algebraic expressions
+ #
+ self.assertEqual( list(EXPR.identify_variables(m.a)), [m.a] )
+ self.assertEqual( list(EXPR.identify_variables(m.b[1])), [m.b[1]] )
+ self.assertEqual( list(EXPR.identify_variables(m.a+m.b[1])),
+ [ m.a, m.b[1] ] )
+ self.assertEqual( list(EXPR.identify_variables(m.a**m.b[1])),
+ [ m.a, m.b[1] ] )
+ self.assertEqual( list(EXPR.identify_variables(m.a**m.b[1] + m.b[2])),
+ [ m.a, m.b[1], m.b[2] ] )
+ self.assertEqual( list(EXPR.identify_variables(
+ m.a**m.b[1] + m.b[2]*m.b[3]*m.b[2])),
+ [ m.a, m.b[1], m.b[2], m.b[3] ] )
+ self.assertEqual( list(EXPR.identify_variables(
+ m.a**m.b[1] + m.b[2]/m.b[3]*m.b[2])),
+ [ m.a, m.b[1], m.b[2], m.b[3] ] )
+ #
+ # Identify variables in the arguments to functions
+ #
+ self.assertEqual( list(EXPR.identify_variables(
+ m.x(m.a, 'string_param', 1, [])*m.b[1] )),
+ [ m.a, m.b[1] ] )
+ self.assertEqual( list(EXPR.identify_variables(
+ m.x(m.p, 'string_param', 1, [])*m.b[1] )),
+ [ m.b[1] ] )
+ self.assertEqual( list(EXPR.identify_variables(
+ tanh(m.a)*m.b[1] )), [ m.a, m.b[1] ] )
+ self.assertEqual( list(EXPR.identify_variables(
+ abs(m.a)*m.b[1] )), [ m.a, m.b[1] ] )
+ #
+ # Check logic for allowing duplicates
+ #
+ self.assertEqual( list(EXPR.identify_variables(m.a**m.a + m.a)),
+ [ m.a ] )
+ #self.assertEqual( list(EXPR.identify_variables(m.a**m.a + m.a, allow_duplicates=True)),
+ # [ m.a, m.a, m.a, ] )
+
+
+class TestIdentifyParams(unittest.TestCase):
+
+ def test_identify_params_numeric(self):
+ #
+ # There are no parameters in a constant expression
+ #
+ self.assertEqual( list(EXPR.identify_mutable_parameters(5)), [] )
+
+ def test_identify_mutable_parameters(self):
+ m = ConcreteModel()
+ m.I = RangeSet(3)
+ m.a = Var(initialize=1)
+ m.b = Var(m.I, initialize=1)
+ #
+ # There are no variables in expressions with only vars
+ #
+ self.assertEqual( list(EXPR.identify_mutable_parameters(m.a)), [] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(m.b[1])), [] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(m.a+m.b[1])), [] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(m.a**m.b[1])), [] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(
+ m.a**m.b[1] + m.b[2])), [] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(
+ m.a**m.b[1] + m.b[2]*m.b[3]*m.b[2])), [] )
+
+ def test_identify_duplicate_params(self):
+ #
+ # Identify mutable params when there are duplicates
+ #
+ m = ConcreteModel()
+ m.a = Param(initialize=1, mutable=True)
+
+ self.assertEqual( list(EXPR.identify_mutable_parameters(2*m.a+2*m.a)),
+ [ m.a ] )
+
+ def test_identify_mutable_parameters_expr(self):
+ #
+ # Identify variables when there are duplicates
+ #
+ m = ConcreteModel()
+ m.a = Param(initialize=1, mutable=True)
+ m.b = Param(initialize=2, mutable=True)
+ m.e = Expression(expr=3*m.a)
+ m.E = Expression([0,1], initialize={0:3*m.a, 1:4*m.b})
+
+ self.assertEqual( list(EXPR.identify_mutable_parameters(m.b+m.e)), [ m.b, m.a ] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(m.E[0])), [ m.a ] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(m.E[1])), [ m.b ] )
+
+ def test_identify_mutable_parameters_params(self):
+ m = ConcreteModel()
+ m.I = RangeSet(3)
+ m.a = Param(initialize=1, mutable=True)
+ m.b = Param(m.I, initialize=1, mutable=True)
+ m.p = Var(initialize=1)
+ m.x = ExternalFunction(library='foo.so', function='bar')
+ #
+ # Identify variables in various algebraic expressions
+ #
+ self.assertEqual( list(EXPR.identify_mutable_parameters(m.a)), [m.a] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(m.b[1])), [m.b[1]] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(m.a+m.b[1])),
+ [ m.a, m.b[1] ] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(m.a**m.b[1])),
+ [ m.a, m.b[1] ] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(m.a**m.b[1] + m.b[2])),
+ [ m.a, m.b[1], m.b[2] ] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(
+ m.a**m.b[1] + m.b[2]*m.b[3]*m.b[2])),
+ [ m.a, m.b[1], m.b[2], m.b[3] ] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(
+ m.a**m.b[1] + m.b[2]/m.b[3]*m.b[2])),
+ [ m.a, m.b[1], m.b[2], m.b[3] ] )
+ #
+ # Identify variables in the arguments to functions
+ #
+ self.assertEqual( list(EXPR.identify_mutable_parameters(
+ m.x(m.a, 'string_param', 1, [])*m.b[1] )),
+ [ m.a, m.b[1] ] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(
+ m.x(m.p, 'string_param', 1, [])*m.b[1] )),
+ [ m.b[1] ] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(
+ tanh(m.a)*m.b[1] )), [ m.a, m.b[1] ] )
+ self.assertEqual( list(EXPR.identify_mutable_parameters(
+ abs(m.a)*m.b[1] )), [ m.a, m.b[1] ] )
+ #
+ # Check logic for allowing duplicates
+ #
+ self.assertEqual( list(EXPR.identify_mutable_parameters(m.a**m.a + m.a)),
+ [ m.a ] )
+
+
+class TestMultiArgumentExpressions(unittest.TestCase):
+
+ def test_double_sided_ineq(self):
+ m = ConcreteModel()
+ m.s = Set(initialize=[1.0,2.0,3.0,4.0,5.0])
+
+ m.vmin = Param(m.s, initialize=lambda m,i: i)
+ m.vmax = Param(m.s, initialize=lambda m,i: i**2)
+
+ m.v = Var(m.s)
+
+ def _con(m, i):
+ return inequality(m.vmin[i]**2, m.v[i], m.vmax[i]**2)
+ m.con = Constraint(m.s, rule=_con)
+
+ OUT = six.StringIO()
+ for i in m.s:
+ OUT.write(str(_con(m,i)))
+ OUT.write("\n")
+ display(m.con, ostream=OUT)
+
+ if EXPR._using_chained_inequality:
+ reference="""1.0 <= v[1.0] <= 1.0
+4.0 <= v[2.0] <= 16.0
+9.0 <= v[3.0] <= 81.0
+16.0 <= v[4.0] <= 256.0
+25.0 <= v[5.0] <= 625.0
+con : Size=5
+ Key : Lower : Body : Upper
+ 1.0 : 1.0 : None : 1.0
+ 2.0 : 4.0 : None : 16.0
+ 3.0 : 9.0 : None : 81.0
+ 4.0 : 16.0 : None : 256.0
+ 5.0 : 25.0 : None : 625.0
+"""
+ else:
+ reference="""1.0 <= v[1.0] <= 1.0
+4.0 <= v[2.0] <= 16.0
+9.0 <= v[3.0] <= 81.0
+16.0 <= v[4.0] <= 256.0
+25.0 <= v[5.0] <= 625.0
+con : Size=5
+ Key : Lower : Body : Upper
+ 1.0 : 1.0 : None : 1.0
+ 2.0 : 4.0 : None : 16.0
+ 3.0 : 9.0 : None : 81.0
+ 4.0 : 16.0 : None : 256.0
+ 5.0 : 25.0 : None : 625.0
+"""
+ self.assertEqual(OUT.getvalue(), reference)
+
+
+# NOTE: These are fairly weak coverage tests.
+# It's probably worth confirming the final linear expression that is generated.
+class TestLinearExpression(unittest.TestCase):
+
+ def test_sum_other(self):
+ m = ConcreteModel()
+ m.v = Var(range(5))
+ m.p = Param(mutable=True, initialize=2)
+
+ with linear_expression() as e:
+ e = e + 2
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+ e = e + m.p*(1+m.v[0])
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+ e = e + m.v[0]
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+
+ e = 2 + e
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+ e = m.p*(1+m.v[0]) + e
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+ e = m.v[0] + e
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+
+ e = e - 2
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+ e = e - m.p(1+m.v[0])
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+ e = e - m.v[0]
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+
+ e = 2 - e
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+ e = m.p*(1+m.v[0]) - e
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+ e = m.v[0] - e
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+
+ with linear_expression() as e:
+ e += m.v[0]*m.v[1]
+ self.assertIs(e.__class__, EXPR.SumExpression)
+
+ with linear_expression() as e:
+ e = e + m.v[0]*m.v[1]
+ self.assertIs(e.__class__, EXPR.SumExpression)
+
+ with linear_expression() as e:
+ e = m.v[0]*m.v[1] + e
+ self.assertIs(e.__class__, EXPR.SumExpression)
+
+ def test_mul_other(self):
+ m = ConcreteModel()
+ m.v = Var(range(5), initialize=1)
+ m.p = Param(initialize=2, mutable=True)
+
+ with linear_expression() as e:
+ e += 1
+ e = 2 * e
+ self.assertEqual("2", str(e))
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+ e = (1+m.v[0]) * e
+ self.assertEqual("2 + 2*v[0]", str(e))
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+ try:
+ e = m.v[0] * e
+ self.fail("Expecting ValueError")
+ except ValueError:
+ pass
+
+ with linear_expression() as e:
+ e += 1
+ e = e * m.p
+ self.assertEqual("p", str(e))
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+
+ with linear_expression() as e:
+ e += 1
+ e = e * 0
+ self.assertEqual(e.constant, 0)
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+
+ with linear_expression() as e:
+ e += m.v[0]
+ e = e * 2
+ self.assertEqual("2*v[0]", str(e))
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+
+ with linear_expression() as e:
+ e += 1
+ e *= m.v[0]*m.v[1]
+ self.assertIs(e.__class__, EXPR.ProductExpression)
+
+ with linear_expression() as e:
+ e += 1
+ e = e * (m.v[0]*m.v[1])
+ self.assertIs(e.__class__, EXPR.ProductExpression)
+
+ with linear_expression() as e:
+ e += 1
+ e = (m.v[0]*m.v[1]) * e
+ self.assertIs(e.__class__, EXPR.ProductExpression)
+
+ def test_div(self):
+ m = ConcreteModel()
+ m.v = Var(range(5), initialize=1)
+ m.p = Param(initialize=2, mutable=True)
+
+ with linear_expression() as e:
+ e += m.v[0]
+ e /= 2
+ self.assertEqual("0.5*v[0]", str(e))
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+
+ with linear_expression() as e:
+ e += m.v[0]
+ e /= m.p
+ self.assertEqual("(1/p)*v[0]", str(e))
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+
+ with linear_expression() as e:
+ e += 1
+ try:
+ e /= m.v[0]
+ self.fail("Expected ValueError")
+ except:
+ pass
+
+ def test_div_other(self):
+ m = ConcreteModel()
+ m.v = Var(range(5), initialize=1)
+ m.p = Param(initialize=2, mutable=True)
+
+ with linear_expression() as e:
+ e += m.v[0]
+ try:
+ e = 1 / e
+ self.fail("Expected ValueError")
+ except:
+ pass
+
+ with linear_expression() as e:
+ e += 1
+ e = 1 / e
+ self.assertEqual("1.0",str(e))
+
+ def test_negation_other(self):
+ m = ConcreteModel()
+ m.v = Var(range(5))
+
+ with linear_expression() as e:
+ e = 2 - e
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+ e = - e
+ self.assertIs(e.__class__, EXPR._MutableLinearExpression)
+
+ def test_pow_other(self):
+ m = ConcreteModel()
+ m.v = Var(range(5))
+
+ with linear_expression() as e:
+ e = 2**e
+ self.assertIs(e.__class__, EXPR.NPV_PowExpression)
+ e = m.v[0] + m.v[1]
+ e = m.v[0]**e
+ self.assertIs(e.__class__, EXPR.PowExpression)
+
+
+class TestNonlinearExpression(unittest.TestCase):
+
+ def test_sum_other(self):
+ m = ConcreteModel()
+ m.v = Var(range(5))
+
+ with nonlinear_expression() as e:
+ e_ = 2 + m.v[0]
+ self.assertIs(e_.__class__, EXPR.SumExpression)
+ e += e_
+ self.assertIs(e.__class__, EXPR._MutableSumExpression)
+ self.assertEqual(e.nargs(), 2)
+
+
+#
+# Test the logic of EXPR._decompose_linear_terms
+#
+class TestLinearDecomp(unittest.TestCase):
+
+ def setUp(self):
+ #
+ # A hack to setup the _LinearExpression.vtypes data
+ #
+ #try:
+ # l = EXPR.LinearExpression()
+ # l._combine_expr(None,None)
+ #except:
+ # pass
+ pass
+
+ def test_numeric(self):
+ self.assertEqual(list(EXPR._decompose_linear_terms(2.0)), [(2.0,None)])
+
+ def test_NPV(self):
+ M = ConcreteModel()
+ M.q = Param(initialize=2)
+ self.assertEqual(list(EXPR._decompose_linear_terms(M.q)), [(M.q,None)])
+
+ def test_var(self):
+ M = ConcreteModel()
+ M.v = Var()
+ self.assertEqual(list(EXPR._decompose_linear_terms(M.v)), [(1,M.v)])
+
+ def test_simple(self):
+ M = ConcreteModel()
+ M.v = Var()
+ self.assertEqual(list(EXPR._decompose_linear_terms(2*M.v)), [(2,M.v)])
+
+ def test_sum(self):
+ M = ConcreteModel()
+ M.v = Var()
+ M.w = Var()
+ M.q = Param(initialize=2)
+ self.assertEqual(list(EXPR._decompose_linear_terms(2+M.v)), [(2,None), (1,M.v)])
+ self.assertEqual(list(EXPR._decompose_linear_terms(M.q+M.v)), [(2,None), (1,M.v)])
+ self.assertEqual(list(EXPR._decompose_linear_terms(M.v+M.q)), [(1,M.v), (2,None)])
+ self.assertEqual(list(EXPR._decompose_linear_terms(M.w+M.v)), [(1,M.w), (1,M.v)])
+
+ def test_prod(self):
+ M = ConcreteModel()
+ M.v = Var()
+ M.w = Var()
+ M.q = Param(initialize=2)
+ self.assertEqual(list(EXPR._decompose_linear_terms(2*M.v)), [(2,M.v)])
+ self.assertEqual(list(EXPR._decompose_linear_terms(M.q*M.v)), [(2,M.v)])
+ self.assertEqual(list(EXPR._decompose_linear_terms(M.v*M.q)), [(2,M.v)])
+ self.assertRaises(EXPR.LinearDecompositionError, list, EXPR._decompose_linear_terms(M.w*M.v))
+
+ def test_negation(self):
+ M = ConcreteModel()
+ M.v = Var()
+ self.assertEqual(list(EXPR._decompose_linear_terms(-M.v)), [(-1,M.v)])
+ self.assertEqual(list(EXPR._decompose_linear_terms(-(2+M.v))), [(-2,None), (-1,M.v)])
+
+ def test_reciprocal(self):
+ M = ConcreteModel()
+ M.v = Var()
+ M.q = Param(initialize=2)
+ self.assertRaises(EXPR.LinearDecompositionError, list, EXPR._decompose_linear_terms(1/M.v))
+ self.assertEqual(list(EXPR._decompose_linear_terms(1/M.q)), [(0.5,None)])
+
+ def test_multisum(self):
+ M = ConcreteModel()
+ M.v = Var()
+ M.w = Var()
+ M.q = Param(initialize=2)
+ e = EXPR.SumExpression([2])
+ self.assertEqual(list(EXPR._decompose_linear_terms(e)), [(2,None)])
+ e = EXPR.SumExpression([2,M.v])
+ self.assertEqual(list(EXPR._decompose_linear_terms(e)), [(2,None), (1,M.v)])
+ e = EXPR.SumExpression([2,M.q+M.v])
+ self.assertEqual(list(EXPR._decompose_linear_terms(e)), [(2,None), (2,None), (1,M.v)])
+ e = EXPR.SumExpression([2,M.q+M.v,M.w])
+ self.assertEqual(list(EXPR._decompose_linear_terms(e)), [(2,None), (2,None), (1,M.v), (1,M.w)])
+
+
+#
+# Test the logic of decompose_term()
+#
+class Test_decompose_linear_terms(unittest.TestCase):
+
+ def test_numeric(self):
+ self.assertEqual(EXPR.decompose_term(2.0), (True,[(2.0,None)]))
+
+ def test_NPV(self):
+ M = ConcreteModel()
+ M.q = Param(initialize=2)
+ self.assertEqual(EXPR.decompose_term(M.q), (True, [(M.q,None)]))
+
+ def test_var(self):
+ M = ConcreteModel()
+ M.v = Var()
+ self.assertEqual(EXPR.decompose_term(M.v), (True, [(1,M.v)]))
+
+ def test_simple(self):
+ M = ConcreteModel()
+ M.v = Var()
+ self.assertEqual(EXPR.decompose_term(2*M.v), (True, [(2,M.v)]))
+
+ def test_sum(self):
+ M = ConcreteModel()
+ M.v = Var()
+ M.w = Var()
+ M.q = Param(initialize=2)
+ self.assertEqual(EXPR.decompose_term(2+M.v), (True, [(2,None), (1,M.v)]))
+ self.assertEqual(EXPR.decompose_term(M.q+M.v), (True, [(2,None), (1,M.v)]))
+ self.assertEqual(EXPR.decompose_term(M.v+M.q), (True, [(1,M.v), (2,None)]))
+ self.assertEqual(EXPR.decompose_term(M.v+M.w), (True, [(1,M.v), (1,M.w)]))
+
+ def test_prod(self):
+ M = ConcreteModel()
+ M.v = Var()
+ M.w = Var()
+ M.q = Param(initialize=2)
+ self.assertEqual(EXPR.decompose_term(2*M.v), (True, [(2,M.v)]))
+ self.assertEqual(EXPR.decompose_term(M.q*M.v), (True, [(2,M.v)]))
+ self.assertEqual(EXPR.decompose_term(M.v*M.q), (True, [(2,M.v)]))
+ self.assertEqual(EXPR.decompose_term(M.w*M.v), (False, None))
+
+ def test_negation(self):
+ M = ConcreteModel()
+ M.v = Var()
+ self.assertEqual(EXPR.decompose_term(-M.v), (True, [(-1,M.v)]))
+ self.assertEqual(EXPR.decompose_term(-(2+M.v)), (True, [(-2,None), (-1,M.v)]))
+
+ def test_reciprocal(self):
+ M = ConcreteModel()
+ M.v = Var()
+ M.q = Param(initialize=2)
+ M.p = Param(initialize=2, mutable=True)
+ self.assertEqual(EXPR.decompose_term(1/M.v), (False, None))
+ self.assertEqual(EXPR.decompose_term(1/M.q), (True, [(0.5,None)]))
+ e = 1/M.p
+ self.assertEqual(EXPR.decompose_term(e), (True, [(e,None)]))
+
+ def test_multisum(self):
+ M = ConcreteModel()
+ M.v = Var()
+ M.w = Var()
+ M.q = Param(initialize=3)
+ e = EXPR.SumExpression([2])
+ self.assertEqual(EXPR.decompose_term(e), (True, [(2,None)]))
+ e = EXPR.SumExpression([2,M.v])
+ self.assertEqual(EXPR.decompose_term(e), (True, [(2,None), (1,M.v)]))
+ e = EXPR.SumExpression([2,M.q+M.v])
+ self.assertEqual(EXPR.decompose_term(e), (True, [(2,None), (3,None), (1,M.v)]))
+ e = EXPR.SumExpression([2,M.q+M.v,M.w])
+ self.assertEqual(EXPR.decompose_term(e), (True, [(2,None), (3,None), (1,M.v), (1,M.w)]))
+
+ def test_linear(self):
+ M = ConcreteModel()
+ M.v = Var()
+ M.w = Var()
+ with linear_expression() as e:
+ e += 2
+ #
+ # When the linear expression is constant, then it will be
+ # identified as not potentially variable, and the expression returned
+ # will be itself.
+ #
+ self.assertEqual(EXPR.decompose_term(e), (True, [(e,None)]))
+ e += M.v
+ self.assertEqual(EXPR.decompose_term(-e), (True, [(-2,None), (-1,M.v)]))
+
+def x_(m,i):
+ return i+1
+def P_(m,i):
+ return 10-i
+
+#
+# Test pickle logic
+#
+class Test_pickle(unittest.TestCase):
+
+ def test_simple(self):
+ M = ConcreteModel()
+ M.v = Var()
+ e = 2*M.v
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ flag, terms = EXPR.decompose_term(e_)
+ self.assertTrue(flag)
+ self.assertEqual(terms[0][0], 2)
+ self.assertEqual(str(terms[0][1]), str(M.v))
+
+ def test_sum(self):
+ M = ConcreteModel()
+ M.v = Var()
+ M.w = Var()
+ M.q = Param(initialize=2)
+ e = M.v+M.q
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ flag, terms = EXPR.decompose_term(e_)
+ self.assertTrue(flag)
+ self.assertEqual(terms[0][0], 1)
+ self.assertEqual(str(terms[0][1]), str(M.v))
+ self.assertEqual(terms[1][0], 2)
+ self.assertEqual(terms[1][1], None)
+
+ def Xtest_Sum(self):
+ M = ConcreteModel()
+ A = range(5)
+ M.v = Var(A)
+ e = quicksum(M.v[i] for i in M.v)
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ flag, terms = EXPR.decompose_term(e_)
+ self.assertTrue(flag)
+ self.assertEqual(terms[0][0], 1)
+ self.assertEqual(str(terms[0][1]), str(M.v[0]))
+ self.assertEqual(terms[1][0], 1)
+
+ def test_prod(self):
+ M = ConcreteModel()
+ M.v = Var()
+ M.w = Var()
+ M.q = Param(initialize=2)
+ e = M.v*M.q
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ flag, terms = EXPR.decompose_term(e_)
+ self.assertTrue(flag)
+ self.assertEqual(terms[0][0], 2)
+ self.assertEqual(str(terms[0][1]), str(M.v))
+
+ def test_negation(self):
+ M = ConcreteModel()
+ M.v = Var()
+ e = -(2+M.v)
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ flag, terms = EXPR.decompose_term(e_)
+ self.assertTrue(flag)
+ self.assertEqual(terms[0][0], -2)
+ self.assertEqual(terms[0][1], None)
+ self.assertEqual(terms[1][0], -1)
+ self.assertEqual(str(terms[1][1]), str(M.v))
+
+ def test_reciprocal(self):
+ M = ConcreteModel()
+ M.v = Var()
+ M.q = Param(initialize=2)
+ M.p = Param(initialize=2, mutable=True)
+ e = 1/M.p
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ flag, terms = EXPR.decompose_term(e_)
+ self.assertTrue(flag)
+ self.assertEqual(terms[0][0], 0.5)
+ self.assertEqual(terms[0][1], None)
+
+ def test_multisum(self):
+ M = ConcreteModel()
+ M.v = Var()
+ M.w = Var()
+ M.q = Param(initialize=3)
+ e = EXPR.SumExpression([2,M.q+M.v,M.w])
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ flag, terms = EXPR.decompose_term(e_)
+ self.assertTrue(flag)
+ self.assertEqual(terms[0][0], 2)
+ self.assertEqual(terms[0][1], None)
+ self.assertEqual(terms[1][0], 3)
+ self.assertEqual(terms[1][1], None)
+ self.assertEqual(terms[2][0], 1)
+ self.assertEqual(str(terms[2][1]), str(M.v))
+ self.assertEqual(terms[3][0], 1)
+ self.assertEqual(str(terms[3][1]), str(M.w))
+
+ def test_linear(self):
+ M = ConcreteModel()
+ M.v = Var()
+ M.w = Var()
+ with linear_expression() as e:
+ e += 2
+ #
+ # When the linear expression is constant, then it will be
+ # identified as not potentially variable, and the expression returned
+ # will be itself.
+ #
+ self.assertEqual(EXPR.decompose_term(e), (True, [(e,None)]))
+ e += M.v
+ s = pickle.dumps(-e)
+ e_ = pickle.loads(s)
+ flag, terms = EXPR.decompose_term(e_)
+ self.assertTrue(flag)
+ self.assertEqual(terms[0][0], -2)
+ self.assertEqual(terms[0][1], None)
+ self.assertEqual(terms[1][0], -1)
+ self.assertEqual(str(terms[1][1]), str(M.v))
+
+ def test_ExprIf(self):
+ M = ConcreteModel()
+ M.v = Var()
+ e = EXPR.Expr_if(M.v, 1, 0)
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ self.assertEqual(type(e.arg(0)), type(e_.arg(0)))
+ self.assertEqual(e.arg(1), e_.arg(1))
+ self.assertEqual(e.arg(2), e_.arg(2))
+
+ def test_getitem(self):
+ m = ConcreteModel()
+ m.I = RangeSet(1,9)
+ m.x = Var(m.I, initialize=x_)
+ m.P = Param(m.I, initialize=P_, mutable=True)
+ t = IndexTemplate(m.I)
+
+ e = m.x[t+m.P[t+1]] + 3
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ self.assertEqual("x({I} + P({I} + 1)) + 3", str(e))
+
+ def test_ineq(self):
+ M = ConcreteModel()
+ M.v = Var()
+ e = M.v >= 0
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ self.assertEqual(str(e), str(e_))
+
+ def test_range(self):
+ M = ConcreteModel()
+ M.v = Var()
+ e = inequality(0, M.v, 1)
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ self.assertEqual(str(e), str(e_))
+
+ def test_eq(self):
+ M = ConcreteModel()
+ M.v = Var()
+ e = M.v == 0
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ self.assertEqual(str(e), str(e_))
+
+ def test_abs(self):
+ M = ConcreteModel()
+ M.v = Var()
+ e = abs(M.v)
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ self.assertEqual(str(e), str(e_))
+
+ def test_sin(self):
+ M = ConcreteModel()
+ M.v = Var()
+ e = sin(M.v)
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ self.assertEqual(str(e), str(e_))
+
+ def test_other(self):
+ model = ConcreteModel()
+ model.a = Var()
+ model.x = ExternalFunction(library='foo.so', function='bar')
+ e = model.x(model.a, 1, "foo", [])
+ s = pickle.dumps(e)
+ e_ = pickle.loads(s)
+ self.assertEqual(type(e_), type(e))
+ self.assertEqual(type(e_.arg(0)), type(e.arg(0)))
+ self.assertEqual(type(e_.arg(1)), type(e.arg(1)))
+ self.assertEqual(type(e_.arg(2)), type(e.arg(2)))
+
+#
+# Every class that is duck typed to be a named expression
+# should be tested here.
+#
+class TestNamedExpressionDuckTyping(unittest.TestCase):
+
+ def check_api(self, obj):
+ self.assertTrue(hasattr(obj, 'nargs'))
+ self.assertTrue(hasattr(obj, 'arg'))
+ self.assertTrue(hasattr(obj, 'args'))
+ self.assertTrue(hasattr(obj, '__call__'))
+ self.assertTrue(hasattr(obj, 'to_string'))
+ self.assertTrue(hasattr(obj, '_precedence'))
+ self.assertTrue(hasattr(obj, '_to_string'))
+ self.assertTrue(hasattr(obj, 'clone'))
+ self.assertTrue(hasattr(obj, 'create_node_with_local_data'))
+ self.assertTrue(hasattr(obj, 'is_constant'))
+ self.assertTrue(hasattr(obj, 'is_fixed'))
+ self.assertTrue(hasattr(obj, '_is_fixed'))
+ self.assertTrue(hasattr(obj, 'is_potentially_variable'))
+ self.assertTrue(hasattr(obj, 'is_named_expression_type'))
+ self.assertTrue(hasattr(obj, 'is_expression_type'))
+ self.assertTrue(hasattr(obj, 'polynomial_degree'))
+ self.assertTrue(hasattr(obj, '_compute_polynomial_degree'))
+ self.assertTrue(hasattr(obj, '_apply_operation'))
+
+ def test_Objective(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.e = Objective(expr=M.x)
+ self.check_api(M.e)
+
+ def test_Expression(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.e = Expression(expr=M.x)
+ self.check_api(M.e)
+
+ def test_ExpressionIndex(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.e = Expression([0])
+ M.e[0] = M.x
+ self.check_api(M.e[0])
+
+ def test_expression(self):
+ x = variable()
+ e = expression()
+ e.expr = x
+ self.check_api(e)
+
+ def test_objective(self):
+ x = variable()
+ e = objective()
+ e.expr = x
+ self.check_api(e)
+
+
+class TestNumValueDuckTyping(unittest.TestCase):
+
+ def check_api(self, obj):
+ self.assertTrue(hasattr(obj, 'is_fixed'))
+ self.assertTrue(hasattr(obj, 'is_constant'))
+ self.assertTrue(hasattr(obj, 'is_potentially_variable'))
+ self.assertTrue(hasattr(obj, 'is_variable_type'))
+ self.assertTrue(hasattr(obj, 'is_named_expression_type'))
+ self.assertTrue(hasattr(obj, 'is_expression_type'))
+ self.assertTrue(hasattr(obj, '_compute_polynomial_degree'))
+ self.assertTrue(hasattr(obj, '__call__'))
+ self.assertTrue(hasattr(obj, 'to_string'))
+
+ def test_Var(self):
+ M = ConcreteModel()
+ M.x = Var()
+ self.check_api(M.x)
+
+ def test_VarIndex(self):
+ M = ConcreteModel()
+ M.x = Var([0])
+ self.check_api(M.x[0])
+
+ def test_variable(self):
+ x = variable()
+ self.check_api(x)
+
+
+#
+# Replace all variables with new variables from a varlist
+#
+class ReplacementWalkerTest1(EXPR.ExpressionReplacementVisitor):
+
+ def __init__(self, model):
+ EXPR.ExpressionReplacementVisitor.__init__(self)
+ self.model = model
+
+ def visiting_potential_leaf(self, node):
+ if node.__class__ in nonpyomo_leaf_types or\
+ not node.is_potentially_variable():
+ return True, node
+ if node.is_variable_type():
+ if id(node) in self.memo:
+ return True, self.memo[id(node)]
+ self.memo[id(node)] = self.model.w.add()
+ return True, self.memo[id(node)]
+ return False, None
+
+
+class WalkerTests(unittest.TestCase):
+
+ def test_replacement_walker1(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.y = Var()
+ M.w = VarList()
+
+ e = sin(M.x) + M.x*M.y + 3
+ walker = ReplacementWalkerTest1(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("sin(x) + x*y + 3", str(e))
+ self.assertEqual("sin(w[1]) + w[1]*w[2] + 3", str(f))
+
+ def test_replacement_walker2(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.w = VarList()
+
+ e = M.x
+ walker = ReplacementWalkerTest1(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("x", str(e))
+ self.assertEqual("w[1]", str(f))
+
+ def test_replacement_walker3(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.y = Var()
+ M.w = VarList()
+
+ e = sin(M.x) + M.x*M.y + 3 <= 0
+ walker = ReplacementWalkerTest1(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("sin(x) + x*y + 3 <= 0.0", str(e))
+ self.assertEqual("sin(w[1]) + w[1]*w[2] + 3 <= 0.0", str(f))
+
+ def test_replacement_walker4(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.y = Var()
+ M.w = VarList()
+
+ e = inequality(0, sin(M.x) + M.x*M.y + 3, 1)
+ walker = ReplacementWalkerTest1(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("0 <= sin(x) + x*y + 3 <= 1", str(e))
+ self.assertEqual("0 <= sin(w[1]) + w[1]*w[2] + 3 <= 1", str(f))
+
+ def test_replacement_walker0(self):
+ M = ConcreteModel()
+ M.x = Var(range(3))
+ M.w = VarList()
+ M.z = Param(range(3), mutable=True)
+
+ e = sum_product(M.z, M.x)
+ self.assertIs(type(e), EXPR.LinearExpression)
+ walker = ReplacementWalkerTest1(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("z[0]*x[0] + z[1]*x[1] + z[2]*x[2]", str(e))
+ self.assertEqual("z[0]*w[1] + z[1]*w[2] + z[2]*w[3]", str(f))
+
+ e = 2*sum_product(M.z, M.x)
+ walker = ReplacementWalkerTest1(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("2*(z[0]*x[0] + z[1]*x[1] + z[2]*x[2])", str(e))
+ self.assertEqual("2*(z[0]*w[4] + z[1]*w[5] + z[2]*w[6])", str(f))
+
+ def test_identify_components(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.y = Var()
+ M.w = Var()
+
+ e = sin(M.x) + M.x*M.w + 3
+ v = list(str(v) for v in EXPR.identify_components(e, set([M.x.__class__])))
+ self.assertEqual(v, ['x', 'w'])
+ v = list(str(v) for v in EXPR.identify_components(e, [M.x.__class__]))
+ self.assertEqual(v, ['x', 'w'])
+
+ def test_identify_variables(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.y = Var()
+ M.w = Var()
+ M.w = 2
+ M.w.fixed = True
+
+ e = sin(M.x) + M.x*M.w + 3
+ v = list(str(v) for v in EXPR.identify_variables(e))
+ self.assertEqual(v, ['x', 'w'])
+ v = list(str(v) for v in EXPR.identify_variables(e, include_fixed=False))
+ self.assertEqual(v, ['x'])
+
+ def test_expression_to_string(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.w = Var()
+
+ e = sin(M.x) + M.x*M.w + 3
+ self.assertEqual("sin(x) + x*w + 3", EXPR.expression_to_string(e))
+ M.w = 2
+ M.w.fixed = True
+ self.assertEqual("sin(x) + x*2 + 3", EXPR.expression_to_string(e, compute_values=True))
+
+#
+# Replace all variables with a product expression
+#
+class ReplacementWalkerTest2(EXPR.ExpressionReplacementVisitor):
+
+ def __init__(self, model):
+ EXPR.ExpressionReplacementVisitor.__init__(self)
+ self.model = model
+
+ def visiting_potential_leaf(self, node):
+ if node.__class__ in nonpyomo_leaf_types or\
+ not node.is_potentially_variable():
+ return True, node
+
+ if node.is_variable_type():
+ if id(node) in self.memo:
+ return True, self.memo[id(node)]
+ self.memo[id(node)] = 2 * self.model.w.add()
+ return True, self.memo[id(node)]
+ return False, None
+
+
+class WalkerTests2(unittest.TestCase):
+
+ def test_replacement_walker1(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.y = Var()
+ M.w = VarList()
+
+ e = sin(M.x) + M.x*M.y + 3
+ walker = ReplacementWalkerTest2(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("sin(x) + x*y + 3", str(e))
+ self.assertEqual("sin(2*w[1]) + 2*w[1]*2*w[2] + 3", str(f))
+
+ def test_replacement_walker2(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.w = VarList()
+
+ e = M.x
+ walker = ReplacementWalkerTest2(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("x", str(e))
+ self.assertEqual("2*w[1]", str(f))
+
+ def test_replacement_walker3(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.y = Var()
+ M.w = VarList()
+
+ e = sin(M.x) + M.x*M.y + 3 <= 0
+ walker = ReplacementWalkerTest2(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("sin(x) + x*y + 3 <= 0.0", str(e))
+ self.assertEqual("sin(2*w[1]) + 2*w[1]*2*w[2] + 3 <= 0.0", str(f))
+
+ def test_replacement_walker4(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.y = Var()
+ M.w = VarList()
+
+ e = inequality(0, sin(M.x) + M.x*M.y + 3, 1)
+ walker = ReplacementWalkerTest2(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("0 <= sin(x) + x*y + 3 <= 1", str(e))
+ self.assertEqual("0 <= sin(2*w[1]) + 2*w[1]*2*w[2] + 3 <= 1", str(f))
+
+ def test_replacement_walker5(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.w = VarList()
+ M.z = Param(mutable=True)
+
+ e = M.z*M.x
+ walker = ReplacementWalkerTest2(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertTrue(e.__class__ is EXPR.MonomialTermExpression)
+ self.assertTrue(f.__class__ is EXPR.ProductExpression)
+ self.assertEqual("z*x", str(e))
+ self.assertEqual("z*2*w[1]", str(f))
+
+ def test_replacement_walker0(self):
+ M = ConcreteModel()
+ M.x = Var(range(3))
+ M.w = VarList()
+ M.z = Param(range(3), mutable=True)
+
+ e = sum_product(M.z, M.x)
+ self.assertIs(type(e), EXPR.LinearExpression)
+ walker = ReplacementWalkerTest2(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("z[0]*x[0] + z[1]*x[1] + z[2]*x[2]", str(e))
+ self.assertEqual("z[0]*2*w[1] + z[1]*2*w[2] + z[2]*2*w[3]", str(f))
+
+ e = 2*sum_product(M.z, M.x)
+ walker = ReplacementWalkerTest2(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("2*(z[0]*x[0] + z[1]*x[1] + z[2]*x[2])", str(e))
+ self.assertEqual("2*(z[0]*2*w[4] + z[1]*2*w[5] + z[2]*2*w[6])", str(f))
+
+#
+# Replace all mutable parameters with variables
+#
+class ReplacementWalkerTest3(EXPR.ExpressionReplacementVisitor):
+
+ def __init__(self, model):
+ EXPR.ExpressionReplacementVisitor.__init__(self)
+ self.model = model
+
+ def visiting_potential_leaf(self, node):
+ if node.__class__ in (_ParamData, SimpleParam):
+ if id(node) in self.memo:
+ return True, self.memo[id(node)]
+ self.memo[id(node)] = 2*self.model.w.add()
+ return True, self.memo[id(node)]
+
+ if node.__class__ in nonpyomo_leaf_types or \
+ node.is_constant() or \
+ node.is_variable_type():
+ return True, node
+
+ return False, None
+
+
+class WalkerTests3(unittest.TestCase):
+
+ def test_replacement_walker1(self):
+ M = ConcreteModel()
+ M.x = Param(mutable=True)
+ M.y = Var()
+ M.w = VarList()
+
+ e = sin(M.x) + M.x*M.y + 3
+ walker = ReplacementWalkerTest3(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("sin(x) + x*y + 3", str(e))
+ self.assertEqual("sin(2*w[1]) + 2*w[1]*y + 3", str(f))
+
+ def test_replacement_walker2(self):
+ M = ConcreteModel()
+ M.x = Param(mutable=True)
+ M.w = VarList()
+
+ e = M.x
+ walker = ReplacementWalkerTest3(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("x", str(e))
+ self.assertEqual("2*w[1]", str(f))
+
+ def test_replacement_walker3(self):
+ M = ConcreteModel()
+ M.x = Param(mutable=True)
+ M.y = Var()
+ M.w = VarList()
+
+ e = sin(M.x) + M.x*M.y + 3 <= 0
+ walker = ReplacementWalkerTest3(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("sin(x) + x*y + 3 <= 0.0", str(e))
+ self.assertEqual("sin(2*w[1]) + 2*w[1]*y + 3 <= 0.0", str(f))
+
+ def test_replacement_walker4(self):
+ M = ConcreteModel()
+ M.x = Param(mutable=True)
+ M.y = Var()
+ M.w = VarList()
+
+ e = inequality(0, sin(M.x) + M.x*M.y + 3, 1)
+ walker = ReplacementWalkerTest3(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("0 <= sin(x) + x*y + 3 <= 1", str(e))
+ self.assertEqual("0 <= sin(2*w[1]) + 2*w[1]*y + 3 <= 1", str(f))
+
+ def test_replacement_walker5(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.w = VarList()
+ M.z = Param(mutable=True)
+
+ e = M.z*M.x
+ walker = ReplacementWalkerTest3(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertTrue(e.__class__ is EXPR.MonomialTermExpression)
+ self.assertTrue(f.__class__ is EXPR.ProductExpression)
+ self.assertTrue(f.arg(0).is_potentially_variable())
+ self.assertEqual("z*x", str(e))
+ self.assertEqual("2*w[1]*x", str(f))
+
+ def test_replacement_walker6(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.w = VarList()
+ M.z = Param(mutable=True)
+
+ e = (M.z*2)*3
+ walker = ReplacementWalkerTest3(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertTrue(not e.is_potentially_variable())
+ self.assertTrue(f.is_potentially_variable())
+ self.assertEqual("z*2*3", str(e))
+ self.assertEqual("2*w[1]*2*3", str(f))
+
+ def test_replacement_walker7(self):
+ M = ConcreteModel()
+ M.x = Var()
+ M.w = VarList()
+ M.z = Param(mutable=True)
+ M.e = Expression(expr=M.z*2)
+
+ e = M.x*M.e
+ self.assertTrue(e.arg(1).is_potentially_variable())
+ self.assertTrue(not e.arg(1).arg(0).is_potentially_variable())
+ self.assertEqual("x*(z*2)", str(e))
+ walker = ReplacementWalkerTest3(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertTrue(e.__class__ is EXPR.ProductExpression)
+ self.assertTrue(f.__class__ is EXPR.ProductExpression)
+ self.assertEqual(id(e), id(f))
+ self.assertTrue(f.arg(1).is_potentially_variable())
+ self.assertTrue(f.arg(1).arg(0).is_potentially_variable())
+ self.assertEqual("x*(2*w[1]*2)", str(f))
+
+ def test_replacement_walker0(self):
+ M = ConcreteModel()
+ M.x = Var(range(3))
+ M.w = VarList()
+ M.z = Param(range(3), mutable=True)
+
+ e = sum_product(M.z, M.x)
+ self.assertIs(type(e), EXPR.LinearExpression)
+ walker = ReplacementWalkerTest3(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("z[0]*x[0] + z[1]*x[1] + z[2]*x[2]", str(e))
+ self.assertEqual("2*w[1]*x[0] + 2*w[2]*x[1] + 2*w[3]*x[2]", str(f))
+
+ e = 2*sum_product(M.z, M.x)
+ walker = ReplacementWalkerTest3(M)
+ f = walker.dfs_postorder_stack(e)
+ self.assertEqual("2*(z[0]*x[0] + z[1]*x[1] + z[2]*x[2])", str(e))
+ self.assertEqual("2*(2*w[4]*x[0] + 2*w[5]*x[1] + 2*w[6]*x[2])", str(f))
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/pyomo/core/tests/unit/test_expression.py b/pyomo/core/tests/unit/test_expression.py
index f0642dd27e4..920a6b532f8 100644
--- a/pyomo/core/tests/unit/test_expression.py
+++ b/pyomo/core/tests/unit/test_expression.py
@@ -11,6 +11,8 @@
import copy
from six import StringIO
+from pyomo.core.expr import expr_common
+
import pyutilib.th as unittest
from pyutilib.misc.redirect_io import capture_output
@@ -18,6 +20,8 @@
from pyomo.environ import *
from pyomo.core.base.expression import _GeneralExpressionData
+import six
+
class TestExpressionData(unittest.TestCase):
def test_exprdata_get_set(self):
@@ -79,10 +83,10 @@ def test_copy(self):
self.assertEqual( model.expr1(), 15 )
self.assertEqual( expr2(), 15 )
self.assertEqual( id(model.expr1.expr), id(expr2.expr) )
- self.assertEqual( id(model.expr1.expr._args[0]),
- id(expr2.expr._args[0]) )
- self.assertEqual( id(model.expr1.expr._args[1]),
- id(expr2.expr._args[1]) )
+ self.assertEqual( id(model.expr1.expr.arg(0)),
+ id(expr2.expr.arg(0)) )
+ self.assertEqual( id(model.expr1.expr.arg(1)),
+ id(expr2.expr.arg(1)) )
# Do an in place modification the expression
@@ -91,10 +95,10 @@ def test_copy(self):
self.assertEqual( model.expr1(), 10 )
self.assertEqual( expr2(), 10 )
self.assertEqual( id(model.expr1.expr), id(expr2.expr) )
- self.assertEqual( id(model.expr1.expr._args[0]),
- id(expr2.expr._args[0]) )
- self.assertEqual( id(model.expr1.expr._args[1]),
- id(expr2.expr._args[1]) )
+ self.assertEqual( id(model.expr1.expr.arg(0)),
+ id(expr2.expr.arg(0)) )
+ self.assertEqual( id(model.expr1.expr.arg(1)),
+ id(expr2.expr.arg(1)) )
# Do an in place modification the expression
@@ -112,12 +116,20 @@ def test_model_clone(self):
model.ec = Expression(initialize=model.x**2+1)
model.obj = Objective(expr=model.y+model.ec)
self.assertEqual(model.obj.expr(),5.0)
- self.assertTrue(id(model.ec) in [id(e) for e in model.obj.expr._args])
+ self.assertTrue(id(model.ec) in [id(e) for e in model.obj.expr.args])
inst = model.clone()
self.assertEqual(inst.obj.expr(),5.0)
- self.assertTrue(id(inst.ec) in [id(e) for e in inst.obj.expr._args])
+ if not id(inst.ec) in [id(e) for e in inst.obj.expr.args]:
+ print("BUG?")
+ print(id(inst.ec))
+ print(inst.obj.expr.__class__)
+ print([id(e) for e in inst.obj.expr.args])
+ print([e.__class__ for e in inst.obj.expr.args])
+ print([id(e) for e in model.obj.expr.args])
+ print([e.__class__ for e in model.obj.expr.args])
+ self.assertTrue(id(inst.ec) in [id(e) for e in inst.obj.expr.args])
self.assertNotEqual(id(model.ec), id(inst.ec))
- self.assertFalse(id(inst.ec) in [id(e) for e in model.obj.expr._args])
+ self.assertFalse(id(inst.ec) in [id(e) for e in model.obj.expr.args])
def test_is_constant(self):
model = ConcreteModel()
@@ -151,36 +163,36 @@ def test_init_concrete(self):
model.ec = Expression(expr=0)
model.obj = Objective(expr=1.0+model.ec)
self.assertEqual(model.obj.expr(),1.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e = 1.0
model.ec.set_value(e)
self.assertEqual(model.obj.expr(),2.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e += model.x
model.ec.set_value(e)
self.assertEqual(model.obj.expr(),3.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e += model.x
self.assertEqual(model.obj.expr(),3.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
model.del_component('obj')
model.del_component('ec')
model.ec = Expression(initialize=model.y)
model.obj = Objective(expr=1.0+model.ec)
self.assertEqual(model.obj.expr(),1.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e = 1.0
model.ec.set_value(e)
self.assertEqual(model.obj.expr(),2.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e += model.x
model.ec.set_value(e)
self.assertEqual(model.obj.expr(),3.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e += model.x
self.assertEqual(model.obj.expr(),3.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
model.del_component('obj')
model.del_component('ec')
@@ -188,18 +200,18 @@ def test_init_concrete(self):
model.ec = Expression(initialize=model.y+1.0)
model.obj = Objective(expr=1.0+model.ec)
self.assertEqual(model.obj.expr(),1.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e = 1.0
model.ec.set_value(e)
self.assertEqual(model.obj.expr(),2.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e += model.x
model.ec.set_value(e)
self.assertEqual(model.obj.expr(),3.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e += model.x
self.assertEqual(model.obj.expr(),3.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
def test_init_abstract(self):
model = AbstractModel()
@@ -212,18 +224,18 @@ def obj_rule(model):
model.obj = Objective(rule=obj_rule)
inst = model.create_instance()
self.assertEqual(inst.obj.expr(),1.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e = 1.0
inst.ec.set_value(e)
self.assertEqual(inst.obj.expr(),2.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e += inst.x
inst.ec.set_value(e)
self.assertEqual(inst.obj.expr(),3.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e += inst.x
self.assertEqual(inst.obj.expr(),3.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
model.del_component('obj')
model.del_component('ec')
@@ -233,18 +245,18 @@ def obj_rule(model):
model.obj = Objective(rule=obj_rule)
inst = model.create_instance()
self.assertEqual(inst.obj.expr(),1.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e = 1.0
inst.ec.set_value(e)
self.assertEqual(inst.obj.expr(),2.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e += inst.x
inst.ec.set_value(e)
self.assertEqual(inst.obj.expr(),3.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e += inst.x
self.assertEqual(inst.obj.expr(),3.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
model.del_component('obj')
model.del_component('ec')
@@ -254,30 +266,30 @@ def obj_rule(model):
model.obj = Objective(rule=obj_rule)
inst = model.create_instance()
self.assertEqual(inst.obj.expr(),1.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e = 1.0
inst.ec.set_value(e)
self.assertEqual(inst.obj.expr(),2.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e += inst.x
inst.ec.set_value(e)
self.assertEqual(inst.obj.expr(),3.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e += inst.x
self.assertEqual(inst.obj.expr(),3.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
class TestExpression(unittest.TestCase):
def setUp(self):
- TestExpression._save = pyomo.core.base.expr_common.TO_STRING_VERBOSE
+ TestExpression._save = expr_common.TO_STRING_VERBOSE
# Tests can choose what they want - this just makes sure that
#things are restored after the tests run.
- #pyomo.core.base.expr_common.TO_STRING_VERBOSE = True
+ #expr_common.TO_STRING_VERBOSE = True
def tearDown(self):
- pyomo.core.base.expr_common.TO_STRING_VERBOSE = TestExpression._save
+ expr_common.TO_STRING_VERBOSE = TestExpression._save
def test_unconstructed_singleton(self):
a = Expression()
@@ -545,7 +557,7 @@ def test_init_concrete_indexed(self):
model.x = Var([1,2,3],initialize=1.0)
model.ec = Expression([1,2,3],initialize=1.0)
- model.obj = Objective(expr=1.0+summation(model.ec, index=[1,2,3]))
+ model.obj = Objective(expr=1.0+sum_product(model.ec, index=[1,2,3]))
self.assertEqual(model.obj.expr(),4.0)
model.ec[1].set_value(2.0)
self.assertEqual(model.obj.expr(),5.0)
@@ -558,36 +570,36 @@ def test_init_concrete_nonindexed(self):
model.ec = Expression(initialize=0)
model.obj = Objective(expr=1.0+model.ec)
self.assertEqual(model.obj.expr(),1.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e = 1.0
model.ec.set_value(e)
self.assertEqual(model.obj.expr(),2.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e += model.x
model.ec.set_value(e)
self.assertEqual(model.obj.expr(),3.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e += model.x
self.assertEqual(model.obj.expr(),3.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
model.del_component('obj')
model.del_component('ec')
model.ec = Expression(initialize=model.y)
model.obj = Objective(expr=1.0+model.ec)
self.assertEqual(model.obj.expr(),1.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e = 1.0
model.ec.set_value(e)
self.assertEqual(model.obj.expr(),2.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e += model.x
model.ec.set_value(e)
self.assertEqual(model.obj.expr(),3.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e += model.x
self.assertEqual(model.obj.expr(),3.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
model.del_component('obj')
model.del_component('ec')
@@ -595,23 +607,23 @@ def test_init_concrete_nonindexed(self):
model.ec = Expression(initialize=model.y+1.0)
model.obj = Objective(expr=1.0+model.ec)
self.assertEqual(model.obj.expr(),1.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e = 1.0
model.ec.set_value(e)
self.assertEqual(model.obj.expr(),2.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e += model.x
model.ec.set_value(e)
self.assertEqual(model.obj.expr(),3.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
e += model.x
self.assertEqual(model.obj.expr(),3.0)
- self.assertEqual(id(model.obj.expr._args[0]),id(model.ec))
+ self.assertEqual(id(model.obj.expr.arg(1)),id(model.ec))
def test_init_abstract_indexed(self):
model = AbstractModel()
model.ec = Expression([1,2,3],initialize=1.0)
- model.obj = Objective(rule=lambda m: 1.0+summation(m.ec,index=[1,2,3]))
+ model.obj = Objective(rule=lambda m: 1.0+sum_product(m.ec,index=[1,2,3]))
inst = model.create_instance()
self.assertEqual(inst.obj.expr(),4.0)
inst.ec[1].set_value(2.0)
@@ -628,18 +640,18 @@ def obj_rule(model):
model.obj = Objective(rule=obj_rule)
inst = model.create_instance()
self.assertEqual(inst.obj.expr(),1.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e = 1.0
inst.ec.set_value(e)
self.assertEqual(inst.obj.expr(),2.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e += inst.x
inst.ec.set_value(e)
self.assertEqual(inst.obj.expr(),3.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e += inst.x
self.assertEqual(inst.obj.expr(),3.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
model.del_component('obj')
model.del_component('ec')
@@ -649,18 +661,18 @@ def obj_rule(model):
model.obj = Objective(rule=obj_rule)
inst = model.create_instance()
self.assertEqual(inst.obj.expr(),1.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e = 1.0
inst.ec.set_value(e)
self.assertEqual(inst.obj.expr(),2.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e += inst.x
inst.ec.set_value(e)
self.assertEqual(inst.obj.expr(),3.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e += inst.x
self.assertEqual(inst.obj.expr(),3.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
model.del_component('obj')
model.del_component('ec')
@@ -670,38 +682,38 @@ def obj_rule(model):
model.obj = Objective(rule=obj_rule)
inst = model.create_instance()
self.assertEqual(inst.obj.expr(),1.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e = 1.0
inst.ec.set_value(e)
self.assertEqual(inst.obj.expr(),2.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e += inst.x
inst.ec.set_value(e)
self.assertEqual(inst.obj.expr(),3.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
e += inst.x
self.assertEqual(inst.obj.expr(),3.0)
- self.assertEqual(id(inst.obj.expr._args[0]),id(inst.ec))
+ self.assertEqual(id(inst.obj.expr.arg(1)),id(inst.ec))
def test_pprint_oldStyle(self):
- pyomo.core.base.expr_common.TO_STRING_VERBOSE = True
+ expr_common.TO_STRING_VERBOSE = True
model = ConcreteModel()
model.x = Var()
- model.e = Expression(initialize=model.x+2.0)
+ model.e = Expression(initialize=model.x+2)
model.E = Expression([1,2],initialize=model.x**2+1)
expr = model.e*model.x**2 + model.E[1]
output = \
"""\
-sum( prod( num=( e{sum( 2.0 , x )} , pow( x , 2.0 ) ) ) , E[1]{sum( 1 , pow( x , 2.0 ) )} )
+sum(prod(e{sum(x, 2)}, pow(x, 2)), E[1]{sum(pow(x, 2), 1)})
e : Size=1, Index=None
Key : Expression
- None : sum( 2.0 , x )
+ None : sum(x, 2)
E : Size=2, Index=E_index
Key : Expression
- 1 : sum( 1 , pow( x , 2.0 ) )
- 2 : sum( 1 , pow( x , 2.0 ) )
+ 1 : sum(pow(x, 2), 1)
+ 2 : sum(pow(x, 2), 1)
"""
out = StringIO()
out.write(str(expr)+"\n")
@@ -714,14 +726,14 @@ def test_pprint_oldStyle(self):
model.E[1].set_value(2.0)
output = \
"""\
-sum( prod( num=( e{1.0} , pow( x , 2.0 ) ) ) , E[1]{2.0} )
+sum(prod(e{1.0}, pow(x, 2)), E[1]{2.0})
e : Size=1, Index=None
Key : Expression
None : 1.0
E : Size=2, Index=E_index
Key : Expression
1 : 2.0
- 2 : sum( 1 , pow( x , 2.0 ) )
+ 2 : sum(pow(x, 2), 1)
"""
out = StringIO()
out.write(str(expr)+"\n")
@@ -735,14 +747,14 @@ def test_pprint_oldStyle(self):
model.E[1].set_value(None)
output = \
"""\
-sum( prod( num=( e{Undefined} , pow( x , 2.0 ) ) ) , E[1]{Undefined} )
+sum(prod(e{Undefined}, pow(x, 2)), E[1]{Undefined})
e : Size=1, Index=None
Key : Expression
None : Undefined
E : Size=2, Index=E_index
Key : Expression
1 : Undefined
- 2 : sum( 1 , pow( x , 2.0 ) )
+ 2 : sum(pow(x, 2), 1)
"""
out = StringIO()
out.write(str(expr)+"\n")
@@ -753,24 +765,24 @@ def test_pprint_oldStyle(self):
def test_pprint_newStyle(self):
- pyomo.core.base.expr_common.TO_STRING_VERBOSE = False
+ expr_common.TO_STRING_VERBOSE = False
model = ConcreteModel()
model.x = Var()
- model.e = Expression(initialize=model.x+2.0)
+ model.e = Expression(initialize=model.x+2)
model.E = Expression([1,2],initialize=model.x**2+1)
expr = model.e*model.x**2 + model.E[1]
output = \
"""\
-( 2.0 + x ) * x**2.0 + 1 + x**2.0
+(x + 2)*x**2 + (x**2 + 1)
e : Size=1, Index=None
Key : Expression
- None : 2.0 + x
+ None : x + 2
E : Size=2, Index=E_index
Key : Expression
- 1 : 1 + x**2.0
- 2 : 1 + x**2.0
+ 1 : x**2 + 1
+ 2 : x**2 + 1
"""
out = StringIO()
out.write(str(expr)+"\n")
@@ -781,16 +793,21 @@ def test_pprint_newStyle(self):
model.e.set_value(1.0)
model.E[1].set_value(2.0)
+ #
+ # WEH - the 1.0 seems unnecessary here, but it results from
+ # a fixed variable in a sub-expression. I can't decide if this
+ # is the expected behavior or not.
+ #
output = \
"""\
-1.0 * x**2.0 + 2.0
+x**2 + 2.0
e : Size=1, Index=None
Key : Expression
None : 1.0
E : Size=2, Index=E_index
Key : Expression
1 : 2.0
- 2 : 1 + x**2.0
+ 2 : x**2 + 1
"""
out = StringIO()
out.write(str(expr)+"\n")
@@ -804,14 +821,14 @@ def test_pprint_newStyle(self):
model.E[1].set_value(None)
output = \
"""\
-Undefined * x**2.0 + Undefined
+e{None}*x**2 + E[1]{None}
e : Size=1, Index=None
Key : Expression
None : Undefined
E : Size=2, Index=E_index
Key : Expression
1 : Undefined
- 2 : 1 + x**2.0
+ 2 : x**2 + 1
"""
out = StringIO()
out.write(str(expr)+"\n")
@@ -861,6 +878,105 @@ def test_abstract_index(self):
model.C = model.A | model.B
model.x = Expression(model.C)
+ def test_iadd(self):
+ # make sure simple for loops that look like they
+ # create a new expression do not modify the named
+ # expression
+ m = ConcreteModel()
+ e = m.e = Expression(expr=1.0)
+ expr = 0.0
+ for v in [1.0,e]:
+ expr += v
+ self.assertEqual(e.expr, 1)
+ self.assertEqual(expr(), 2)
+ expr = 0.0
+ for v in [e,1.0]:
+ expr += v
+ self.assertEqual(e.expr, 1)
+ self.assertEqual(expr(), 2)
+
+ def test_isub(self):
+ # make sure simple for loops that look like they
+ # create a new expression do not modify the named
+ # expression
+ m = ConcreteModel()
+ e = m.e = Expression(expr=1.0)
+ expr = 0.0
+ for v in [1.0,e]:
+ expr -= v
+ self.assertEqual(e.expr, 1)
+ self.assertEqual(expr(), -2)
+ expr = 0.0
+ for v in [e,1.0]:
+ expr -= v
+ self.assertEqual(e.expr, 1)
+ self.assertEqual(expr(), -2)
+
+ def test_imul(self):
+ # make sure simple for loops that look like they
+ # create a new expression do not modify the named
+ # expression
+ m = ConcreteModel()
+ e = m.e = Expression(expr=3.0)
+ expr = 1.0
+ for v in [2.0,e]:
+ expr *= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 6)
+ expr = 1.0
+ for v in [e,2.0]:
+ expr *= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 6)
+
+ def test_idiv(self):
+ # make sure simple for loops that look like they
+ # create a new expression do not modify the named
+ # expression
+ # floating point division
+ m = ConcreteModel()
+ e = m.e = Expression(expr=3.0)
+ expr = e
+ for v in [2.0,1.0]:
+ expr /= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 1.5)
+ expr = e
+ for v in [1.0,2.0]:
+ expr /= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 1.5)
+ # note that integer division does not occur within
+ # Pyomo expressions
+ m = ConcreteModel()
+ e = m.e = Expression(expr=3.0)
+ expr = e
+ for v in [2,1]:
+ expr /= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 1.5)
+ expr = e
+ for v in [1,2]:
+ expr /= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 1.5)
+
+ def test_ipow(self):
+ # make sure simple for loops that look like they
+ # create a new expression do not modify the named
+ # expression
+ m = ConcreteModel()
+ e = m.e = Expression(expr=3.0)
+ expr = e
+ for v in [2.0,1.0]:
+ expr **= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 9)
+ expr = e
+ for v in [1.0,2.0]:
+ expr **= v
+ self.assertEqual(e.expr, 3)
+ self.assertEqual(expr(), 9)
if __name__ == "__main__":
unittest.main()
diff --git a/pyomo/core/tests/unit/test_indexed.py b/pyomo/core/tests/unit/test_indexed.py
index d5a58e9eeed..815f972c155 100644
--- a/pyomo/core/tests/unit/test_indexed.py
+++ b/pyomo/core/tests/unit/test_indexed.py
@@ -135,7 +135,7 @@ def test_index_by_unhashable_type(self):
m = ConcreteModel()
m.x = Var([1,2,3], initialize=lambda m,x: 2*x)
self.assertRaisesRegexp(
- TypeError, 'unhashable type',
+ TypeError, '.*',
m.x.__getitem__, {})
diff --git a/pyomo/core/tests/unit/test_misc.py b/pyomo/core/tests/unit/test_misc.py
index b2c904202d1..f5e78c3b4e1 100644
--- a/pyomo/core/tests/unit/test_misc.py
+++ b/pyomo/core/tests/unit/test_misc.py
@@ -59,7 +59,7 @@ def test_construct(self):
display(instance.obj,ostream=OUTPUT)
display(instance.x,ostream=OUTPUT)
display(instance.con,ostream=OUTPUT)
- expr.to_string(ostream=OUTPUT)
+ OUTPUT.write(expr.to_string())
model = AbstractModel()
instance = model.create_instance()
display(instance,ostream=OUTPUT)
@@ -90,7 +90,7 @@ def test_construct2(self):
display(instance.obj,ostream=OUTPUT)
display(instance.x,ostream=OUTPUT)
display(instance.con,ostream=OUTPUT)
- expr.to_string(ostream=OUTPUT)
+ OUTPUT.write(expr.to_string())
model = AbstractModel()
instance = model.create_instance()
display(instance,ostream=OUTPUT)
diff --git a/pyomo/core/tests/unit/test_model.py b/pyomo/core/tests/unit/test_model.py
index 87668681a1f..43fe0f2f3a5 100644
--- a/pyomo/core/tests/unit/test_model.py
+++ b/pyomo/core/tests/unit/test_model.py
@@ -24,7 +24,7 @@
from pyomo.opt import SolutionStatus
from pyomo.opt.parallel.local import SolverManager_Serial
from pyomo.environ import *
-from pyomo.core.base.expr import identify_variables
+from pyomo.core.expr import current as EXPR
solvers = pyomo.opt.check_available_solvers('glpk')
@@ -183,7 +183,7 @@ def test_write(self):
model.A = RangeSet(1,4)
model.x = Var(model.A, bounds=(-1,1))
def obj_rule(model):
- return summation(model.x)
+ return sum_product(model.x)
model.obj = Objective(rule=obj_rule)
model.write()
@@ -192,7 +192,7 @@ def test_write2(self):
model.A = RangeSet(1,4)
model.x = Var(model.A, bounds=(-1,1))
def obj_rule(model):
- return summation(model.x)
+ return sum_product(model.x)
model.obj = Objective(rule=obj_rule)
def c_rule(model):
return (1, model.x[1]+model.x[2], 2)
@@ -204,11 +204,11 @@ def test_write3(self):
model = ConcreteModel()
model.J = RangeSet(1,4)
model.w=Param(model.J, default=4)
- model.x=Var(model.J)
+ model.x=Var(model.J, initialize=3)
def obj_rule(instance):
- return summation(instance.w, instance.x)
+ return sum_product(instance.w, instance.x)
model.obj = Objective(rule=obj_rule)
- self.assertEqual(len(model.obj[None].expr._args), 4)
+ self.assertEqual( value(model.obj), 48 )
@unittest.skipIf(not 'glpk' in solvers, "glpk solver is not available")
def test_solve1(self):
@@ -216,7 +216,7 @@ def test_solve1(self):
model.A = RangeSet(1,4)
model.x = Var(model.A, bounds=(-1,1))
def obj_rule(model):
- return summation(model.x)
+ return sum_product(model.x)
model.obj = Objective(rule=obj_rule)
def c_rule(model):
expr = 0
@@ -292,7 +292,7 @@ def test_solve4(self):
model.A = RangeSet(1,4)
model.x = Var(model.A, bounds=(-1,1))
def obj_rule(model):
- return summation(model.x)
+ return sum_product(model.x)
model.obj = Objective(rule=obj_rule)
def c_rule(model):
expr = 0
@@ -321,7 +321,7 @@ def test_solve6(self):
model.b.A = RangeSet(1,4)
model.b.x = Var(model.b.A, bounds=(-1,1))
def obj_rule(block):
- return summation(block.x)
+ return sum_product(block.x)
model.b.obj = Objective(rule=obj_rule)
def c_rule(model):
expr = model.y
@@ -349,7 +349,7 @@ def test_solve7(self):
model.B = Set(initialize=['A B', 'C,D', 'E'])
model.x = Var(model.A, model.B, bounds=(-1,1))
def obj_rule(model):
- return summation(model.x)
+ return sum_product(model.x)
model.obj = Objective(rule=obj_rule)
def c_rule(model):
expr = model.y
@@ -371,7 +371,7 @@ def test_stats1(self):
model = ConcreteModel()
model.x = Var([1,2])
def obj_rule(model, i):
- return summation(model.x)
+ return sum_product(model.x)
model.obj = Objective([1,2], rule=obj_rule)
def c_rule(model, i):
expr = 0
@@ -388,7 +388,7 @@ def test_stats2(self):
#
model.x = Var([1,2])
def obj_rule(model, i):
- return summation(model.x)
+ return sum_product(model.x)
model.y = VarList()
model.y.add()
model.y.add()
@@ -416,7 +416,7 @@ def test_stats3(self):
model = ConcreteModel()
model.x = Var([1,2])
def obj_rule(model, i):
- return summation(model.x)
+ return sum_product(model.x)
model.obj = Objective([1,2], rule=obj_rule)
def c_rule(model, i):
expr = 0
@@ -443,7 +443,7 @@ def test_solve_with_pickle(self):
model.A = RangeSet(1,4)
model.b = Block()
model.b.x = Var(model.A, bounds=(-1,1))
- model.b.obj = Objective(expr=summation(model.b.x))
+ model.b.obj = Objective(expr=sum_product(model.b.x))
model.c = Constraint(expr=model.b.x[1] >= 0)
opt = SolverFactory('glpk')
self.assertEqual(len(model.solutions), 0)
@@ -451,14 +451,14 @@ def test_solve_with_pickle(self):
self.assertEqual(len(model.solutions), 1)
#
self.assertEqual(model.solutions[0].gap, 0.0)
- self.assertEqual(model.solutions[0].status, SolutionStatus.feasible)
+ #self.assertEqual(model.solutions[0].status, SolutionStatus.feasible)
self.assertEqual(model.solutions[0].message, None)
#
buf = pickle.dumps(model)
tmodel = pickle.loads(buf)
self.assertEqual(len(tmodel.solutions), 1)
self.assertEqual(tmodel.solutions[0].gap, 0.0)
- self.assertEqual(tmodel.solutions[0].status, SolutionStatus.feasible)
+ #self.assertEqual(tmodel.solutions[0].status, SolutionStatus.feasible)
self.assertEqual(tmodel.solutions[0].message, None)
@unittest.skipIf(not 'glpk' in solvers, "glpk solver is not available")
@@ -468,7 +468,7 @@ def test_solve_with_pickle_then_clone(self):
model.A = RangeSet(1,4)
model.b = Block()
model.b.x = Var(model.A, bounds=(-1,1))
- model.b.obj = Objective(expr=summation(model.b.x))
+ model.b.obj = Objective(expr=sum_product(model.b.x))
model.c = Constraint(expr=model.b.x[1] >= 0)
opt = SolverFactory('glpk')
self.assertEqual(len(model.solutions), 0)
@@ -476,14 +476,14 @@ def test_solve_with_pickle_then_clone(self):
self.assertEqual(len(model.solutions), 1)
#
self.assertEqual(model.solutions[0].gap, 0.0)
- self.assertEqual(model.solutions[0].status, SolutionStatus.feasible)
+ #self.assertEqual(model.solutions[0].status, SolutionStatus.feasible)
self.assertEqual(model.solutions[0].message, None)
#
buf = pickle.dumps(model)
tmodel = pickle.loads(buf)
self.assertEqual(len(tmodel.solutions), 1)
self.assertEqual(tmodel.solutions[0].gap, 0.0)
- self.assertEqual(tmodel.solutions[0].status, SolutionStatus.feasible)
+ #self.assertEqual(tmodel.solutions[0].status, SolutionStatus.feasible)
self.assertEqual(tmodel.solutions[0].message, None)
self.assertIn(id(tmodel.b.obj), tmodel.solutions[0]._entry['objective'])
self.assertIs(
@@ -509,7 +509,7 @@ def test_solve_with_pickle_then_clone(self):
self.assertTrue(hasattr(inst,'solutions'))
self.assertEqual(len(inst.solutions), 1)
self.assertEqual(inst.solutions[0].gap, 0.0)
- self.assertEqual(inst.solutions[0].status, SolutionStatus.feasible)
+ #self.assertEqual(inst.solutions[0].status, SolutionStatus.feasible)
self.assertEqual(inst.solutions[0].message, None)
# Spot-check some components and make sure all the weakrefs in
@@ -531,7 +531,7 @@ def test_solve_with_store1(self):
model.A = RangeSet(1,4)
model.b = Block()
model.b.x = Var(model.A, bounds=(-1,1))
- model.b.obj = Objective(expr=summation(model.b.x))
+ model.b.obj = Objective(expr=sum_product(model.b.x))
model.c = Constraint(expr=model.b.x[1] >= 0)
opt = SolverFactory('glpk')
results = opt.solve(model, symbolic_solver_labels=True)
@@ -555,7 +555,7 @@ def test_solve_with_store1(self):
tmodel.A = RangeSet(1,4)
tmodel.b = Block()
tmodel.b.x = Var(tmodel.A, bounds=(-1,1))
- tmodel.b.obj = Objective(expr=summation(tmodel.b.x))
+ tmodel.b.obj = Objective(expr=sum_product(tmodel.b.x))
tmodel.c = Constraint(expr=tmodel.b.x[1] >= 0)
self.assertEqual(len(tmodel.solutions), 0)
tmodel.solutions.load_from(results)
@@ -569,7 +569,7 @@ def test_solve_with_store2(self):
model.A = RangeSet(1,4)
model.b = Block()
model.b.x = Var(model.A, bounds=(-1,1))
- model.b.obj = Objective(expr=summation(model.b.x))
+ model.b.obj = Objective(expr=sum_product(model.b.x))
model.c = Constraint(expr=model.b.x[1] >= 0)
opt = SolverFactory('glpk')
results = opt.solve(model, symbolic_solver_labels=False)
@@ -593,7 +593,7 @@ def test_solve_with_store2(self):
tmodel.A = RangeSet(1,4)
tmodel.b = Block()
tmodel.b.x = Var(tmodel.A, bounds=(-1,1))
- tmodel.b.obj = Objective(expr=summation(tmodel.b.x))
+ tmodel.b.obj = Objective(expr=sum_product(tmodel.b.x))
tmodel.c = Constraint(expr=tmodel.b.x[1] >= 0)
self.assertEqual(len(tmodel.solutions), 0)
tmodel.solutions.load_from(results)
@@ -606,7 +606,7 @@ def test_solve_with_store2(self):
model.A = RangeSet(1,4)
model.b = Block()
model.b.x = Var(model.A, bounds=(-1,1))
- model.b.obj = Objective(expr=summation(model.b.x))
+ model.b.obj = Objective(expr=sum_product(model.b.x))
model.c = Constraint(expr=model.b.x[1] >= 0)
opt = SolverFactory('glpk')
results = opt.solve(model)
@@ -640,7 +640,7 @@ def test_solve_with_store2(self):
tmodel.A = RangeSet(1,3)
tmodel.b = Block()
tmodel.b.x = Var(tmodel.A, bounds=(-1,1))
- tmodel.b.obj = Objective(expr=summation(tmodel.b.x))
+ tmodel.b.obj = Objective(expr=sum_product(tmodel.b.x))
tmodel.c = Constraint(expr=tmodel.b.x[1] >= 0)
self.assertEqual(len(tmodel.solutions), 0)
tmodel.solutions.load_from(results, ignore_invalid_labels=True)
@@ -653,7 +653,7 @@ def test_solve_with_store3(self):
model.A = RangeSet(1,4)
model.b = Block()
model.b.x = Var(model.A, bounds=(-1,1))
- model.b.obj = Objective(expr=summation(model.b.x))
+ model.b.obj = Objective(expr=sum_product(model.b.x))
model.c = Constraint(expr=model.b.x[1] >= 0)
opt = SolverFactory('glpk')
results = opt.solve(model)
@@ -682,7 +682,7 @@ def test_solve_with_store3(self):
tmodel.A = RangeSet(1,4)
tmodel.b = Block()
tmodel.b.x = Var(tmodel.A, bounds=(-1,1))
- tmodel.b.obj = Objective(expr=summation(tmodel.b.x))
+ tmodel.b.obj = Objective(expr=sum_product(tmodel.b.x))
tmodel.c = Constraint(expr=tmodel.b.x[1] >= 0)
self.assertEqual(len(tmodel.solutions), 0)
tmodel.solutions.load_from(results)
@@ -701,7 +701,7 @@ def test_solve_with_store4(self):
model.A = RangeSet(1,4)
model.b = Block()
model.b.x = Var(model.A, bounds=(-1,1))
- model.b.obj = Objective(expr=summation(model.b.x))
+ model.b.obj = Objective(expr=sum_product(model.b.x))
model.c = Constraint(expr=model.b.x[1] >= 0)
opt = SolverFactory('glpk')
results = opt.solve(model, load_solutions=False)
@@ -725,7 +725,7 @@ def test_solve_with_store5(self):
model.A = RangeSet(1,4)
model.b = Block()
model.b.x = Var(model.A, bounds=(-1,1))
- model.b.obj = Objective(expr=summation(model.b.x))
+ model.b.obj = Objective(expr=sum_product(model.b.x))
model.c = Constraint(expr=model.b.x[1] >= 0)
smanager = SolverManager_Serial()
@@ -753,7 +753,7 @@ def make(m):
model = ConcreteModel(rule=make)
self.assertEqual( [x.local_name for x in model.component_objects()],
['I','x','c'] )
- self.assertEqual( len(list(identify_variables(model.c.body))), 3 )
+ self.assertEqual( len(list(EXPR.identify_variables(model.c.body))), 3 )
def test_create_abstract_from_rule(self):
@@ -778,14 +778,14 @@ def c(b):
[] )
self.assertEqual( [x.local_name for x in instance.component_objects()],
['I','x','c'] )
- self.assertEqual( len(list(identify_variables(instance.c.body))), 3 )
+ self.assertEqual( len(list(EXPR.identify_variables(instance.c.body))), 3 )
model = AbstractModel(rule=make)
model.y = Var()
instance = model.create_instance()
self.assertEqual( [x.local_name for x in instance.component_objects()],
['y','I','x','c'] )
- self.assertEqual( len(list(identify_variables(instance.c.body))), 3 )
+ self.assertEqual( len(list(EXPR.identify_variables(instance.c.body))), 3 )
def test_error1(self):
model = ConcreteModel()
diff --git a/pyomo/core/tests/unit/test_mutable.py b/pyomo/core/tests/unit/test_mutable.py
index c978807eb6a..0520098dca6 100644
--- a/pyomo/core/tests/unit/test_mutable.py
+++ b/pyomo/core/tests/unit/test_mutable.py
@@ -66,7 +66,7 @@ def test_mutable_constraint_both(self):
model.X = Var()
def constraint_rule(m):
- return m.Q <= m.X <= m.P
+ return (m.Q, m.X, m.P)
model.C = Constraint(rule=constraint_rule)
instance = model.create_instance()
diff --git a/pyomo/core/tests/unit/test_pickle.py b/pyomo/core/tests/unit/test_pickle.py
index 12259b2b3f3..77d8ffebaac 100644
--- a/pyomo/core/tests/unit/test_pickle.py
+++ b/pyomo/core/tests/unit/test_pickle.py
@@ -12,16 +12,21 @@
#
import pickle
+import six
import os
import sys
from os.path import abspath, dirname
currdir = dirname(abspath(__file__))+os.sep
+import platform
import pyutilib.th as unittest
-
from pyomo.environ import *
+import pyomo.core.expr.current as EXPR
+
+
+using_pypy = platform.python_implementation() == "PyPy"
+_using_pyomo5_trees = EXPR.mode == EXPR.Mode.pyomo5_trees
-import six
def obj_rule(model):
return sum(model.x[a] + model.y[a] for a in model.A)
@@ -263,10 +268,12 @@ def test_pickle1(self):
pickle_str = pickle.dumps(model)
tmodel = pickle.loads(pickle_str)
instance=tmodel.create_instance()
- expr = dot_product(instance.x,instance.B,instance.y)
- self.assertEquals(
- str(expr),
- "x[1] * B[1] * y[1] + x[2] * B[2] * y[2] + x[3] * B[3] * y[3]" )
+ expr = sum_product(instance.x,instance.B,instance.y)
+ if _using_pyomo5_trees:
+ baseline = "B[1]*x[1]*y[1] + B[2]*x[2]*y[2] + B[3]*x[3]*y[3]"
+ else:
+ baseline = "x[1] * B[1] * y[1] + x[2] * B[2] * y[2] + x[3] * B[3] * y[3]"
+ self.assertEquals( str(expr), baseline )
# same as above, but pickles the constructed AbstractModel and
# then operates on the unpickled instance.
@@ -281,10 +288,12 @@ def test_pickle2(self):
tmp=model.create_instance()
pickle_str = pickle.dumps(tmp)
instance = pickle.loads(pickle_str)
- expr = dot_product(instance.x,instance.B,instance.y)
- self.assertEquals(
- str(expr),
- "x[1] * B[1] * y[1] + x[2] * B[2] * y[2] + x[3] * B[3] * y[3]" )
+ expr = sum_product(instance.x,instance.B,instance.y)
+ if _using_pyomo5_trees:
+ baseline = "B[1]*x[1]*y[1] + B[2]*x[2]*y[2] + B[3]*x[3]*y[3]"
+ else:
+ baseline = "x[1] * B[1] * y[1] + x[2] * B[2] * y[2] + x[3] * B[3] * y[3]"
+ self.assertEquals( str(expr), baseline )
# verifies that the use of lambda expressions as rules yields model instances
# that are not pickle'able.
@@ -308,6 +317,9 @@ def rule2(model, i):
instance = model.create_instance()
if (not six.PY3) and ('dill' in sys.modules):
pickle.dumps(instance)
+ elif using_pypy:
+ str_ = pickle.dumps(instance)
+ tmp_ = pickle.loads(str_)
else:
with self.assertRaises((pickle.PicklingError,
TypeError,
diff --git a/pyomo/core/tests/unit/test_smap.py b/pyomo/core/tests/unit/test_smap.py
index 102ac23765d..c45e73d885a 100644
--- a/pyomo/core/tests/unit/test_smap.py
+++ b/pyomo/core/tests/unit/test_smap.py
@@ -36,7 +36,7 @@ def c2_(model, i):
if i == 1:
return model.x <= 2
elif i == 2:
- return 3 <= model.x <= 4
+ return (3, model.x, 4)
else:
return model.x == 5
model.c2 = Constraint(model.A, rule=c2_)
diff --git a/pyomo/core/tests/unit/test_suffix.py b/pyomo/core/tests/unit/test_suffix.py
index dfaf90800bb..957f35a3b64 100644
--- a/pyomo/core/tests/unit/test_suffix.py
+++ b/pyomo/core/tests/unit/test_suffix.py
@@ -263,7 +263,7 @@ def test_set_value_getValue_Objective1(self):
model.junk = Suffix()
model.x = Var()
model.X = Var([1,2,3])
- model.obj = Objective(expr=summation(model.X)+model.x)
+ model.obj = Objective(expr=sum_product(model.X)+model.x)
model.OBJ = Objective([1,2,3], rule=lambda model,i: model.X[i])
model.junk.set_value(model.OBJ,1.0)
@@ -293,7 +293,7 @@ def test_set_value_getValue_Objective2(self):
model.junk = Suffix()
model.x = Var()
model.X = Var([1,2,3])
- model.obj = Objective(expr=summation(model.X)+model.x)
+ model.obj = Objective(expr=sum_product(model.X)+model.x)
model.OBJ = Objective([1,2,3], rule=lambda model,i: model.X[i])
model.OBJ.set_suffix_value('junk', 1.0)
@@ -323,7 +323,7 @@ def test_set_value_getValue_Objective3(self):
model.junk = Suffix()
model.x = Var()
model.X = Var([1,2,3])
- model.obj = Objective(expr=summation(model.X)+model.x)
+ model.obj = Objective(expr=sum_product(model.X)+model.x)
model.OBJ = Objective([1,2,3], rule=lambda model,i: model.X[i])
model.OBJ.set_suffix_value(model.junk, 1.0)
diff --git a/pyomo/core/tests/unit/test_symbol_map.py b/pyomo/core/tests/unit/test_symbol_map.py
index 2f94666c4db..71fb1dc650b 100644
--- a/pyomo/core/tests/unit/test_symbol_map.py
+++ b/pyomo/core/tests/unit/test_symbol_map.py
@@ -2,7 +2,7 @@
import pyutilib.th as unittest
import pyomo.environ
-from pyomo.core.kernel.symbol_map import SymbolMap
+from pyomo.core.expr.symbol_map import SymbolMap
from pyomo.core.kernel.component_variable import variable
class TestSymbolMap(unittest.TestCase):
@@ -10,8 +10,7 @@ class TestSymbolMap(unittest.TestCase):
def test_no_labeler(self):
s = SymbolMap()
v = variable()
- with self.assertRaises(RuntimeError):
- s.getSymbol(v)
+ self.assertEquals(str(v), s.getSymbol(v))
def test_existing_alias(self):
s = SymbolMap()
diff --git a/pyomo/core/tests/unit/test_symbolic.py b/pyomo/core/tests/unit/test_symbolic.py
index b317aed5751..34dc1769a4e 100644
--- a/pyomo/core/tests/unit/test_symbolic.py
+++ b/pyomo/core/tests/unit/test_symbolic.py
@@ -10,6 +10,7 @@
import pyutilib.th as unittest
+import pyomo.environ
from pyomo.util import DeveloperError
from pyomo.core import *
from pyomo.core.base.symbolic import (
@@ -18,12 +19,13 @@
)
def s(e):
- return str(e).replace(' ','')
+ return str(e).replace(' ','').replace('1.0','1').replace('2.0','2')
@unittest.skipIf( not _sympy_available,
"Symbolic derivatives require the sympy package" )
class SymbolicDerivatives(unittest.TestCase):
- def test_single_derivatives(self):
+
+ def test_single_derivatives1(self):
m = ConcreteModel()
m.x = Var()
m.y = Var()
@@ -32,28 +34,58 @@ def test_single_derivatives(self):
self.assertIn(type(e), (int,float))
self.assertEqual(e, 0)
+ def test_single_derivatives2(self):
+ m = ConcreteModel()
+ m.x = Var()
+ m.y = Var()
+
e = differentiate(m.x, wrt=m.x)
self.assertIn(type(e), (int,float))
self.assertEqual(e, 1)
+ def test_single_derivatives3(self):
+ m = ConcreteModel()
+ m.x = Var()
+ m.y = Var()
+
e = differentiate(m.x**2, wrt=m.x)
- self.assertTrue(e.is_expression())
+ self.assertTrue(e.is_expression_type())
self.assertEqual(s(e), s(2.*m.x))
+ def test_single_derivatives4(self):
+ m = ConcreteModel()
+ m.x = Var()
+ m.y = Var()
+
e = differentiate(m.y, wrt=m.x)
self.assertIn(type(e), (int,float))
self.assertEqual(e, 0)
+ def test_single_derivatives5(self):
+ m = ConcreteModel()
+ m.x = Var()
+ m.y = Var()
+
e = differentiate(m.x*m.y, wrt=m.x)
self.assertIs(e, m.y)
self.assertEqual(s(e), s(m.y))
+ def test_single_derivatives6(self):
+ m = ConcreteModel()
+ m.x = Var()
+ m.y = Var()
+
e = differentiate(m.x**2*m.y, wrt=m.x)
- self.assertTrue(e.is_expression())
- self.assertEqual(s(e), s(2.*m.y*m.x))
+ self.assertTrue(e.is_expression_type())
+ self.assertEqual(s(e), s(2.*m.x*m.y))
+
+ def test_single_derivatives7(self):
+ m = ConcreteModel()
+ m.x = Var()
+ m.y = Var()
e = differentiate(m.x**2/m.y, wrt=m.x)
- self.assertTrue(e.is_expression())
+ self.assertTrue(e.is_expression_type())
self.assertEqual(s(e), s(2.*m.x*m.y**-1.))
def test_single_derivative_list(self):
@@ -79,7 +111,7 @@ def test_single_derivative_list(self):
self.assertIs(type(e), list)
self.assertEqual(len(e), 1)
e = e[0]
- self.assertTrue(e.is_expression())
+ self.assertTrue(e.is_expression_type())
self.assertEqual(s(e), s(2.*m.x))
e = differentiate(m.y, wrt_list=[m.x])
@@ -100,14 +132,14 @@ def test_single_derivative_list(self):
self.assertIs(type(e), list)
self.assertEqual(len(e), 1)
e = e[0]
- self.assertTrue(e.is_expression())
- self.assertEqual(s(e), s(2.*m.y*m.x))
+ self.assertTrue(e.is_expression_type())
+ self.assertEqual(s(e), s(2.*m.x*m.y))
e = differentiate(m.x**2/m.y, wrt_list=[m.x])
self.assertIs(type(e), list)
self.assertEqual(len(e), 1)
e = e[0]
- self.assertTrue(e.is_expression())
+ self.assertTrue(e.is_expression_type())
self.assertEqual(s(e), s(2.*m.x*m.y**-1.))
@@ -116,74 +148,94 @@ def test_trig_fuctions(self):
m.x = Var()
e = differentiate(sin(m.x), wrt=m.x)
- self.assertTrue(e.is_expression())
+ self.assertTrue(e.is_expression_type())
self.assertEqual(s(e), s(cos(m.x)))
e = differentiate(cos(m.x), wrt=m.x)
- self.assertTrue(e.is_expression())
+ self.assertTrue(e.is_expression_type())
self.assertEqual(s(e), s(-1.0*sin(m.x)))
e = differentiate(tan(m.x), wrt=m.x)
- self.assertTrue(e.is_expression())
+ self.assertTrue(e.is_expression_type())
self.assertEqual(s(e), s(1.+tan(m.x)**2.))
e = differentiate(sinh(m.x), wrt=m.x)
- self.assertTrue(e.is_expression())
+ self.assertTrue(e.is_expression_type())
self.assertEqual(s(e), s(cosh(m.x)))
e = differentiate(cosh(m.x), wrt=m.x)
- self.assertTrue(e.is_expression())
+ self.assertTrue(e.is_expression_type())
self.assertEqual(s(e), s(sinh(m.x)))
e = differentiate(tanh(m.x), wrt=m.x)
- self.assertTrue(e.is_expression())
- self.assertEqual(s(e), s(1.-tanh(m.x)**2.))
+ self.assertTrue(e.is_expression_type())
+ self.assertEqual(s(e), s(1.0-tanh(m.x)**2.0))
e = differentiate(asin(m.x), wrt=m.x)
- self.assertTrue(e.is_expression())
- self.assertEqual(s(e), s((1.-m.x**2.)**-0.5))
+ self.assertTrue(e.is_expression_type())
+ self.assertEqual(s(e), s((1.0 + (-1.0)*m.x**2.)**-0.5))
e = differentiate(acos(m.x), wrt=m.x)
- self.assertTrue(e.is_expression())
- self.assertEqual(s(e), s(-1.*(1.-m.x**2.)**-0.5))
+ self.assertTrue(e.is_expression_type())
+ self.assertEqual(s(e), s(-1.*(1.+ (-1.0)*m.x**2.)**-0.5))
e = differentiate(atan(m.x), wrt=m.x)
- self.assertTrue(e.is_expression())
+ self.assertTrue(e.is_expression_type())
self.assertEqual(s(e), s((1.+m.x**2.)**-1.))
e = differentiate(asinh(m.x), wrt=m.x)
- self.assertTrue(e.is_expression())
+ self.assertTrue(e.is_expression_type())
self.assertEqual(s(e), s((1.+m.x**2)**-.5))
e = differentiate(acosh(m.x), wrt=m.x)
- self.assertTrue(e.is_expression())
+ self.assertTrue(e.is_expression_type())
self.assertEqual(s(e), s((-1.+m.x**2.)**-.5))
e = differentiate(atanh(m.x), wrt=m.x)
- self.assertTrue(e.is_expression())
- self.assertEqual(s(e), s((1.-m.x**2.)**-1.))
+ self.assertTrue(e.is_expression_type())
+ self.assertEqual(s(e), s((1.+(-1.0)*m.x**2.)**-1.))
- def test_intrinsic_fuctions(self):
+ def test_intrinsic_functions1(self):
m = ConcreteModel()
m.x = Var()
e = differentiate(log(m.x), wrt=m.x)
- self.assertTrue(e.is_expression())
+ self.assertTrue(e.is_expression_type())
self.assertEqual(s(e), s(m.x**-1.))
- e = differentiate(log10(log10(m.x)), wrt=m.x)
- self.assertTrue(e.is_expression())
- self.assertEqual(s(e), s(1./log(10)*m.x**-1.*log(m.x)**-1.))
+ def test_intrinsic_functions2(self):
+ m = ConcreteModel()
+ m.x = Var()
e = differentiate(exp(m.x), wrt=m.x)
- self.assertTrue(e.is_expression())
+ self.assertTrue(e.is_expression_type())
self.assertEqual(s(e), s(exp(m.x)))
+ def test_intrinsic_functions3(self):
+ m = ConcreteModel()
+ m.x = Var()
+
e = differentiate(exp(2 * m.x), wrt=m.x)
self.assertEqual(s(e), s(2. * exp(2. * m.x)))
+ def test_intrinsic_functions4(self):
+ m = ConcreteModel()
+ m.x = Var()
+
+ e = differentiate(log10(m.x), wrt=m.x)
+ self.assertTrue(e.is_expression_type())
+ self.assertEqual(s(e), s(m.x**-1.0 * 1.0/log(10)))
+
+ def test_intrinsic_functions5(self):
+ m = ConcreteModel()
+ m.x = Var()
+
+ e = differentiate(log10(log10(m.x)), wrt=m.x)
+ self.assertTrue(e.is_expression_type())
+ self.assertEqual(s(e), s(m.x**-1.0 * 1.0/log(10) * log(m.x)**-1.0))
+
def test_nondifferentiable(self):
m = ConcreteModel()
diff --git a/pyomo/core/tests/unit/test_template_expr.py b/pyomo/core/tests/unit/test_template_expr.py
index c798eedd621..5b252899b7e 100644
--- a/pyomo/core/tests/unit/test_template_expr.py
+++ b/pyomo/core/tests/unit/test_template_expr.py
@@ -12,8 +12,7 @@
import pyutilib.th as unittest
from pyomo.environ import ConcreteModel, RangeSet, Param, Var, Set, value
-from pyomo.core.base import expr as EXPR
-from pyomo.core.base import expr_common
+import pyomo.core.expr.current as EXPR
from pyomo.core.base.template_expr import (
IndexTemplate,
_GetItemIndexer,
@@ -38,9 +37,9 @@ def test_template_scalar(self):
m = self.m
t = IndexTemplate(m.I)
e = m.x[t]
- self.assertIs(type(e), EXPR._GetItemExpression)
+ self.assertIs(type(e), EXPR.GetItemExpression)
self.assertIs(e._base, m.x)
- self.assertEqual(e._args, (t,))
+ self.assertEqual(tuple(e.args), (t,))
self.assertFalse(e.is_constant())
self.assertFalse(e.is_fixed())
self.assertEqual(e.polynomial_degree(), 1)
@@ -50,9 +49,9 @@ def test_template_scalar(self):
t.set_value(None)
e = m.p[t,10]
- self.assertIs(type(e), EXPR._GetItemExpression)
+ self.assertIs(type(e), EXPR.GetItemExpression)
self.assertIs(e._base, m.p)
- self.assertEqual(e._args, (t,10))
+ self.assertEqual(tuple(e.args), (t,10))
self.assertFalse(e.is_constant())
self.assertTrue(e.is_fixed())
self.assertEqual(e.polynomial_degree(), 0)
@@ -62,9 +61,9 @@ def test_template_scalar(self):
t.set_value(None)
e = m.p[5,t]
- self.assertIs(type(e), EXPR._GetItemExpression)
+ self.assertIs(type(e), EXPR.GetItemExpression)
self.assertIs(e._base, m.p)
- self.assertEqual(e._args, (5,t))
+ self.assertEqual(tuple(e.args), (5,t))
self.assertFalse(e.is_constant())
self.assertTrue(e.is_fixed())
self.assertEqual(e.polynomial_degree(), 0)
@@ -79,9 +78,9 @@ def _test_template_scalar_with_set(self):
m = self.m
t = IndexTemplate(m.I)
e = m.s[t]
- self.assertIs(type(e), EXPR._GetItemExpression)
+ self.assertIs(type(e), EXPR.GetItemExpression)
self.assertIs(e._base, m.s)
- self.assertEqual(e._args, (t,))
+ self.assertEqual(tuple(e.args), (t,))
self.assertFalse(e.is_constant())
self.assertTrue(e.is_fixed())
self.assertEqual(e.polynomial_degree(), 0)
@@ -94,26 +93,26 @@ def test_template_operation(self):
m = self.m
t = IndexTemplate(m.I)
e = m.x[t+m.P[5]]
- self.assertIs(type(e), EXPR._GetItemExpression)
+ self.assertIs(type(e), EXPR.GetItemExpression)
self.assertIs(e._base, m.x)
- self.assertEqual(len(e._args), 1)
- self.assertIs(type(e._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[0], t)
- self.assertIs(e._args[0]._args[1], m.P[5])
+ self.assertEqual(e.nargs(), 1)
+ self.assertTrue(isinstance(e.arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(0), t)
+ self.assertIs(e.arg(0).arg(1), m.P[5])
def test_nested_template_operation(self):
m = self.m
t = IndexTemplate(m.I)
e = m.x[t+m.P[t+1]]
- self.assertIs(type(e), EXPR._GetItemExpression)
+ self.assertIs(type(e), EXPR.GetItemExpression)
self.assertIs(e._base, m.x)
- self.assertEqual(len(e._args), 1)
- self.assertIs(type(e._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[0], t)
- self.assertIs(type(e._args[0]._args[1]), EXPR._GetItemExpression)
- self.assertIs(type(e._args[0]._args[1]._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[1]._args[0]._args[0], t)
+ self.assertEqual(e.nargs(), 1)
+ self.assertTrue(isinstance(e.arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(0), t)
+ self.assertIs(type(e.arg(0).arg(1)), EXPR.GetItemExpression)
+ self.assertTrue(isinstance(e.arg(0).arg(1).arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(1).arg(0).arg(0), t)
def test_template_name(self):
@@ -121,10 +120,10 @@ def test_template_name(self):
t = IndexTemplate(m.I)
E = m.x[t+m.P[1+t]] + m.P[1]
- self.assertEqual( str(E), "x( {I} + P( 1 + {I} ) ) + P[1]" )
+ self.assertEqual( str(E), "x({I} + P(1 + {I})) + P[1]")
E = m.x[t+m.P[1+t]**2.]**2. + m.P[1]
- self.assertEqual( str(E), "x( {I} + P( 1 + {I} )**2.0 )**2.0 + P[1]" )
+ self.assertEqual( str(E), "x({I} + P(1 + {I})**2.0)**2.0 + P[1]")
def test_template_in_expression(self):
@@ -132,55 +131,52 @@ def test_template_in_expression(self):
t = IndexTemplate(m.I)
E = m.x[t+m.P[t+1]] + m.P[1]
- self.assertIs(type(E), EXPR._SumExpression)
- e = E._args[0]
- self.assertIs(type(e), EXPR._GetItemExpression)
+ self.assertTrue(isinstance(E, EXPR.SumExpressionBase))
+ e = E.arg(0)
+ self.assertIs(type(e), EXPR.GetItemExpression)
self.assertIs(e._base, m.x)
- self.assertEqual(len(e._args), 1)
- self.assertIs(type(e._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[0], t)
- self.assertIs(type(e._args[0]._args[1]), EXPR._GetItemExpression)
- self.assertIs(type(e._args[0]._args[1]._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[1]._args[0]._args[0], t)
+ self.assertEqual(e.nargs(), 1)
+ self.assertTrue(isinstance(e.arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(0), t)
+ self.assertIs(type(e.arg(0).arg(1)), EXPR.GetItemExpression)
+ self.assertTrue(isinstance(e.arg(0).arg(1).arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(1).arg(0).arg(0), t)
E = m.P[1] + m.x[t+m.P[t+1]]
- self.assertIs(type(E), EXPR._SumExpression)
- e = E._args[1]
- self.assertIs(type(e), EXPR._GetItemExpression)
+ self.assertTrue(isinstance(E, EXPR.SumExpressionBase))
+ e = E.arg(1)
+ self.assertIs(type(e), EXPR.GetItemExpression)
self.assertIs(e._base, m.x)
- self.assertEqual(len(e._args), 1)
- self.assertIs(type(e._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[0], t)
- self.assertIs(type(e._args[0]._args[1]), EXPR._GetItemExpression)
- self.assertIs(type(e._args[0]._args[1]._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[1]._args[0]._args[0], t)
+ self.assertEqual(e.nargs(), 1)
+ self.assertTrue(isinstance(e.arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(0), t)
+ self.assertIs(type(e.arg(0).arg(1)), EXPR.GetItemExpression)
+ self.assertTrue(isinstance(e.arg(0).arg(1).arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(1).arg(0).arg(0), t)
E = m.x[t+m.P[t+1]] + 1
- self.assertIs(type(E), EXPR._SumExpression)
- e = E._args[0]
- self.assertIs(type(e), EXPR._GetItemExpression)
+ self.assertTrue(isinstance(E, EXPR.SumExpressionBase))
+ e = E.arg(0)
+ self.assertIs(type(e), EXPR.GetItemExpression)
self.assertIs(e._base, m.x)
- self.assertEqual(len(e._args), 1)
- self.assertIs(type(e._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[0], t)
- self.assertIs(type(e._args[0]._args[1]), EXPR._GetItemExpression)
- self.assertIs(type(e._args[0]._args[1]._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[1]._args[0]._args[0], t)
+ self.assertEqual(e.nargs(), 1)
+ self.assertTrue(isinstance(e.arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(0), t)
+ self.assertIs(type(e.arg(0).arg(1)), EXPR.GetItemExpression)
+ self.assertTrue(isinstance(e.arg(0).arg(1).arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(1).arg(0).arg(0), t)
E = 1 + m.x[t+m.P[t+1]]
- self.assertIs(type(E), EXPR._SumExpression)
- # Note: in coopr3, the 1 is held in a separate attribute (so
- # len(_args) is 1), whereas in pyomo4 the constant is a proper
- # argument. The -1 index works for both modes.
- e = E._args[-1]
- self.assertIs(type(e), EXPR._GetItemExpression)
+ self.assertTrue(isinstance(E, EXPR.SumExpressionBase))
+ e = E.arg(E.nargs()-1)
+ self.assertIs(type(e), EXPR.GetItemExpression)
self.assertIs(e._base, m.x)
- self.assertEqual(len(e._args), 1)
- self.assertIs(type(e._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[0], t)
- self.assertIs(type(e._args[0]._args[1]), EXPR._GetItemExpression)
- self.assertIs(type(e._args[0]._args[1]._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[1]._args[0]._args[0], t)
+ self.assertEqual(e.nargs(), 1)
+ self.assertTrue(isinstance(e.arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(0), t)
+ self.assertIs(type(e.arg(0).arg(1)), EXPR.GetItemExpression)
+ self.assertTrue(isinstance(e.arg(0).arg(1).arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(1).arg(0).arg(0), t)
def test_clone(self):
@@ -189,109 +185,117 @@ def test_clone(self):
E_base = m.x[t+m.P[t+1]] + m.P[1]
E = E_base.clone()
- self.assertIs(type(E), EXPR._SumExpression)
- e = E._args[0]
- self.assertIs(type(e), EXPR._GetItemExpression)
- self.assertIsNot(e, E_base._args[0])
+ self.assertTrue(isinstance(E, EXPR.SumExpressionBase))
+ e = E.arg(0)
+ self.assertIs(type(e), EXPR.GetItemExpression)
+ self.assertIsNot(e, E_base.arg(0))
self.assertIs(e._base, m.x)
- self.assertEqual(len(e._args), 1)
- self.assertIs(type(e._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[0], t)
- self.assertIs(type(e._args[0]._args[1]), EXPR._GetItemExpression)
- self.assertIs(type(e._args[0]._args[1]),
- type(E_base._args[0]._args[0]._args[1]))
- self.assertIsNot(e._args[0]._args[1],
- E_base._args[0]._args[0]._args[1])
- self.assertIs(type(e._args[0]._args[1]._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[1]._args[0]._args[0], t)
+ self.assertEqual(e.nargs(), 1)
+ self.assertTrue(isinstance(e.arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(0), t)
+ self.assertIs(type(e.arg(0).arg(1)), EXPR.GetItemExpression)
+ self.assertIs(type(e.arg(0).arg(1)),
+ type(E_base.arg(0).arg(0).arg(1)))
+ self.assertIsNot(e.arg(0).arg(1),
+ E_base.arg(0).arg(0).arg(1))
+ self.assertTrue(isinstance(e.arg(0).arg(1).arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(1).arg(0).arg(0), t)
E_base = m.P[1] + m.x[t+m.P[t+1]]
E = E_base.clone()
- self.assertIs(type(E), EXPR._SumExpression)
- e = E._args[1]
- self.assertIs(type(e), EXPR._GetItemExpression)
- self.assertIsNot(e, E_base._args[0])
+ self.assertTrue(isinstance(E, EXPR.SumExpressionBase))
+ e = E.arg(1)
+ self.assertIs(type(e), EXPR.GetItemExpression)
+ self.assertIsNot(e, E_base.arg(0))
self.assertIs(e._base, m.x)
- self.assertEqual(len(e._args), 1)
- self.assertIs(type(e._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[0], t)
- self.assertIs(type(e._args[0]._args[1]), EXPR._GetItemExpression)
- self.assertIs(type(e._args[0]._args[1]),
- type(E_base._args[1]._args[0]._args[1]))
- self.assertIsNot(e._args[0]._args[1],
- E_base._args[1]._args[0]._args[1])
- self.assertIs(type(e._args[0]._args[1]._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[1]._args[0]._args[0], t)
+ self.assertEqual(e.nargs(), 1)
+ self.assertTrue(isinstance(e.arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(0), t)
+ self.assertIs(type(e.arg(0).arg(1)), EXPR.GetItemExpression)
+ self.assertIs(type(e.arg(0).arg(1)),
+ type(E_base.arg(1).arg(0).arg(1)))
+ self.assertIsNot(e.arg(0).arg(1),
+ E_base.arg(1).arg(0).arg(1))
+ self.assertTrue(isinstance(e.arg(0).arg(1).arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(1).arg(0).arg(0), t)
E_base = m.x[t+m.P[t+1]] + 1
E = E_base.clone()
- self.assertIs(type(E), EXPR._SumExpression)
- e = E._args[0]
- self.assertIs(type(e), EXPR._GetItemExpression)
- self.assertIsNot(e, E_base._args[0])
+ self.assertTrue(isinstance(E, EXPR.SumExpressionBase))
+ e = E.arg(0)
+ self.assertIs(type(e), EXPR.GetItemExpression)
+ self.assertIsNot(e, E_base.arg(0))
self.assertIs(e._base, m.x)
- self.assertEqual(len(e._args), 1)
- self.assertIs(type(e._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[0], t)
- self.assertIs(type(e._args[0]._args[1]), EXPR._GetItemExpression)
- self.assertIs(type(e._args[0]._args[1]),
- type(E_base._args[0]._args[0]._args[1]))
- self.assertIsNot(e._args[0]._args[1],
- E_base._args[0]._args[0]._args[1])
- self.assertIs(type(e._args[0]._args[1]._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[1]._args[0]._args[0], t)
+ self.assertEqual(e.nargs(), 1)
+ self.assertTrue(isinstance(e.arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(0), t)
+ self.assertIs(type(e.arg(0).arg(1)), EXPR.GetItemExpression)
+ self.assertIs(type(e.arg(0).arg(1)),
+ type(E_base.arg(0).arg(0).arg(1)))
+ self.assertIsNot(e.arg(0).arg(1),
+ E_base.arg(0).arg(0).arg(1))
+ self.assertTrue(isinstance(e.arg(0).arg(1).arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(1).arg(0).arg(0), t)
E_base = 1 + m.x[t+m.P[t+1]]
E = E_base.clone()
- self.assertIs(type(E), EXPR._SumExpression)
- # Note: in coopr3, the 1 is held in a separate attribute (so
- # len(_args) is 1), whereas in pyomo4 the constant is a proper
- # argument. The -1 index works for both modes.
- e = E._args[-1]
- self.assertIs(type(e), EXPR._GetItemExpression)
- self.assertIsNot(e, E_base._args[0])
+ self.assertTrue(isinstance(E, EXPR.SumExpressionBase))
+ e = E.arg(-1)
+ self.assertIs(type(e), EXPR.GetItemExpression)
+ self.assertIsNot(e, E_base.arg(0))
self.assertIs(e._base, m.x)
- self.assertEqual(len(e._args), 1)
- self.assertIs(type(e._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[0], t)
- self.assertIs(type(e._args[0]._args[1]), EXPR._GetItemExpression)
- self.assertIs(type(e._args[0]._args[1]),
- type(E_base._args[-1]._args[0]._args[1]))
- self.assertIsNot(e._args[0]._args[1],
- E_base._args[-1]._args[0]._args[1])
- self.assertIs(type(e._args[0]._args[1]._args[0]), EXPR._SumExpression)
- self.assertIs(e._args[0]._args[1]._args[0]._args[0], t)
+ self.assertEqual(e.nargs(), 1)
+ self.assertTrue(isinstance(e.arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(0), t)
+ self.assertIs(type(e.arg(0).arg(1)), EXPR.GetItemExpression)
+ self.assertIs(type(e.arg(0).arg(1)),
+ type(E_base.arg(-1).arg(0).arg(1)))
+ self.assertIsNot(e.arg(0).arg(1),
+ E_base.arg(-1).arg(0).arg(1))
+ self.assertTrue(isinstance(e.arg(0).arg(1).arg(0), EXPR.SumExpressionBase))
+ self.assertIs(e.arg(0).arg(1).arg(0).arg(0), t)
+@unittest.skipIf(EXPR.mode != EXPR.Mode.coopr3_trees, "Only test for Coopr3 expressions")
class TestTemplate_expressionObjects_coopr3\
( ExpressionObjectTester, unittest.TestCase ):
+
def setUp(self):
# This class tests the Coopr 3.x expression trees
- EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
ExpressionObjectTester.setUp(self)
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
-
# see TODO next to _test_template_scalar_with_set
def test_template_scalar_with_set(self):
self._test_template_scalar_with_set()
+
+@unittest.skipIf(EXPR.mode != EXPR.Mode.pyomo4_trees, "Only test for Pyomo4 expressions")
class TestTemplate_expressionObjects_pyomo4\
( ExpressionObjectTester, unittest.TestCase ):
+
def setUp(self):
# This class tests the Pyomo 4.x expression trees
- EXPR.set_expression_tree_format(expr_common.Mode.pyomo4_trees)
ExpressionObjectTester.setUp(self)
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
+ @unittest.expectedFailure
+ def test_template_scalar_with_set(self):
+ self._test_template_scalar_with_set()
+
+
+@unittest.skipIf(EXPR.mode != EXPR.Mode.pyomo5_trees, "Only test for Pyomo5 expressions")
+class TestTemplate_expressionObjects_pyomo5\
+ ( ExpressionObjectTester, unittest.TestCase ):
+
+ def setUp(self):
+ # This class tests the Pyomo 4.x expression trees
+ ExpressionObjectTester.setUp(self)
@unittest.expectedFailure
def test_template_scalar_with_set(self):
self._test_template_scalar_with_set()
+
class TestTemplateSubstitution(unittest.TestCase):
def setUp(self):
@@ -311,7 +315,7 @@ def diffeq(m,t, i):
t = IndexTemplate(m.TIME)
e = diffeq(m, t, 2)
- self.assertTrue( isinstance(e, EXPR._ExpressionBase) )
+ self.assertTrue( isinstance(e, EXPR.ExpressionBase) )
_map = {}
E = substitute_template_expression(
@@ -322,23 +326,23 @@ def diffeq(m,t, i):
idx1 = _GetItemIndexer( m.x[t,1] )
self.assertIs( idx1._base, m.x )
- self.assertEqual( len(idx1._args), 2 )
- self.assertIs( idx1._args[0], t )
- self.assertEqual( idx1._args[1], 1 )
+ self.assertEqual( idx1.nargs(), 2 )
+ self.assertIs( idx1.arg(0), t )
+ self.assertEqual( idx1.arg(1), 1 )
self.assertIn( idx1, _map )
idx2 = _GetItemIndexer( m.dxdt[t,2] )
self.assertIs( idx2._base, m.dxdt )
- self.assertEqual( len(idx2._args), 2 )
- self.assertIs( idx2._args[0], t )
- self.assertEqual( idx2._args[1], 2 )
+ self.assertEqual( idx2.nargs(), 2 )
+ self.assertIs( idx2.arg(0), t )
+ self.assertEqual( idx2.arg(1), 2 )
self.assertIn( idx2, _map )
idx3 = _GetItemIndexer( m.x[t,3] )
self.assertIs( idx3._base, m.x )
- self.assertEqual( len(idx3._args), 2 )
- self.assertIs( idx3._args[0], t )
- self.assertEqual( idx3._args[1], 3 )
+ self.assertEqual( idx3.nargs(), 2 )
+ self.assertIs( idx3.arg(0), t )
+ self.assertEqual( idx3.arg(1), 3 )
self.assertIn( idx3, _map )
self.assertFalse( idx1 == idx2 )
@@ -349,20 +353,20 @@ def diffeq(m,t, i):
self.assertNotIn( idx4, _map )
t.set_value(5)
- self.assertEqual((e._args[0](), e._args[1]()), (10,136))
+ self.assertEqual((e.arg(0)(), e.arg(1)()), (10,136))
self.assertEqual(
str(E),
- 'dxdt[{TIME},2] == {TIME} * x[{TIME},1]**2.0 + y**2.0 + x[{TIME},3] + x[{TIME},1]' )
+ 'dxdt[{TIME},2] == {TIME}*x[{TIME},1]**2 + y**2 + x[{TIME},3] + x[{TIME},1]' )
_map[idx1].set_value( value(m.x[value(t), 1]) )
_map[idx2].set_value( value(m.dxdt[value(t), 2]) )
_map[idx3].set_value( value(m.x[value(t), 3]) )
- self.assertEqual((E._args[0](), E._args[1]()), (10,136))
+ self.assertEqual((E.arg(0)(), E.arg(1)()), (10,136))
_map[idx1].set_value( 12 )
_map[idx2].set_value( 34 )
- self.assertEqual((E._args[0](), E._args[1]()), (34,738))
+ self.assertEqual((E.arg(0)(), E.arg(1)()), (34,738))
def test_simple_substitute_index(self):
@@ -374,15 +378,15 @@ def diffeq(m,t, i):
e = diffeq(m,t, 2)
t.set_value(5)
- self.assertTrue( isinstance(e, EXPR._ExpressionBase) )
- self.assertEqual((e._args[0](), e._args[1]()), (10,126))
+ self.assertTrue( isinstance(e, EXPR.ExpressionBase) )
+ self.assertEqual((e.arg(0)(), e.arg(1)()), (10,126))
E = substitute_template_expression(e, substitute_template_with_value)
self.assertIsNot(e,E)
self.assertEqual(
str(E),
- 'dxdt[5,2] == 5.0 * x[5,2]**2.0 + y**2.0' )
+ 'dxdt[5,2] == 5.0*x[5,2]**2 + y**2' )
if __name__ == "__main__":
unittest.main()
diff --git a/pyomo/core/tests/unit/test_util.py b/pyomo/core/tests/unit/test_util.py
index c9b5719e435..4164295fe0a 100644
--- a/pyomo/core/tests/unit/test_util.py
+++ b/pyomo/core/tests/unit/test_util.py
@@ -15,6 +15,7 @@
from os.path import abspath, dirname
currdir = dirname(abspath(__file__))+os.sep
+import pyomo.core.expr.current as EXPR
import pyutilib.th as unittest
from pyomo.environ import *
@@ -27,41 +28,61 @@ def constr_rule(model,a):
class Test(unittest.TestCase):
+ def test_expr0(self):
+ model = AbstractModel()
+ model.A = Set(initialize=[1,2,3])
+ model.B = Param(model.A,initialize={1:100,2:200,3:300}, mutable=True)
+ model.C = Param(model.A,initialize={1:100,2:200,3:300}, mutable=False)
+ model.x = Var(model.A)
+ model.y = Var(model.A)
+ instance=model.create_instance()
+ expr = sum_product(instance.B,instance.y)
+ baseline = "B[1]*y[1] + B[2]*y[2] + B[3]*y[3]"
+ self.assertEqual( str(expr), baseline )
+ expr = sum_product(instance.C,instance.y)
+ self.assertEqual( str(expr), "100*y[1] + 200*y[2] + 300*y[3]" )
+
def test_expr1(self):
model = AbstractModel()
model.A = Set(initialize=[1,2,3])
model.B = Param(model.A,initialize={1:100,2:200,3:300}, mutable=True)
+ model.C = Param(model.A,initialize={1:100,2:200,3:300}, mutable=False)
model.x = Var(model.A)
model.y = Var(model.A)
instance=model.create_instance()
- expr = dot_product(instance.x,instance.B,instance.y)
- self.assertEqual(
- str(expr),
- "x[1] * B[1] * y[1] + x[2] * B[2] * y[2] + x[3] * B[3] * y[3]" )
+ expr = sum_product(instance.x,instance.B,instance.y)
+ baseline = "B[1]*x[1]*y[1] + B[2]*x[2]*y[2] + B[3]*x[3]*y[3]"
+ self.assertEqual( str(expr), baseline )
+ expr = sum_product(instance.x,instance.C,instance.y)
+ self.assertEqual( str(expr), "100*x[1]*y[1] + 200*x[2]*y[2] + 300*x[3]*y[3]" )
def test_expr2(self):
model = AbstractModel()
model.A = Set(initialize=[1,2,3])
model.B = Param(model.A,initialize={1:100,2:200,3:300}, mutable=True)
+ model.C = Param(model.A,initialize={1:100,2:200,3:300}, mutable=False)
model.x = Var(model.A)
model.y = Var(model.A)
instance=model.create_instance()
- expr = dot_product(instance.x,instance.B,instance.y, index=[1,3])
- self.assertEqual(
- str(expr),
- "x[1] * B[1] * y[1] + x[3] * B[3] * y[3]" )
+ expr = sum_product(instance.x,instance.B,instance.y, index=[1,3])
+ baseline = "B[1]*x[1]*y[1] + B[3]*x[3]*y[3]"
+ self.assertEqual( str(expr), baseline )
+ expr = sum_product(instance.x,instance.C,instance.y, index=[1,3])
+ self.assertEqual( str(expr), "100*x[1]*y[1] + 300*x[3]*y[3]" )
def test_expr3(self):
model = AbstractModel()
model.A = Set(initialize=[1,2,3])
model.B = Param(model.A,initialize={1:100,2:200,3:300}, mutable=True)
+ model.C = Param(model.A,initialize={1:100,2:200,3:300}, mutable=False)
model.x = Var(model.A)
model.y = Var(model.A)
instance=model.create_instance()
- expr = dot_product(instance.x,instance.B,denom=instance.y, index=[1,3])
- self.assertEqual(
- str(expr),
- "x[1] * B[1] / y[1] + x[3] * B[3] / y[3]" )
+ expr = sum_product(instance.x,instance.B,denom=instance.y, index=[1,3])
+ baseline = "B[1]*x[1]*(1/y[1]) + B[3]*x[3]*(1/y[3])"
+ self.assertEqual( str(expr), baseline )
+ expr = sum_product(instance.x,instance.C,denom=instance.y, index=[1,3])
+ self.assertEqual( str(expr), "100*x[1]*(1/y[1]) + 300*x[3]*(1/y[3])" )
def test_expr4(self):
model = AbstractModel()
@@ -70,10 +91,9 @@ def test_expr4(self):
model.x = Var(model.A)
model.y = Var(model.A)
instance=model.create_instance()
- expr = dot_product(denom=[instance.y,instance.x])
- self.assertEqual(
- str(expr),
- "1 / ( y[1] * x[1] ) + 1 / ( y[2] * x[2] ) + 1 / ( y[3] * x[3] )" )
+ expr = sum_product(denom=[instance.y,instance.x])
+ baseline = "(1/(y[1]*x[1])) + (1/(y[2]*x[2])) + (1/(y[3]*x[3]))"
+ self.assertEqual( str(expr), baseline )
def test_expr5(self):
model = ConcreteModel()
@@ -95,12 +115,40 @@ def c2_rule(model, a):
OUTPUT.close()
self.assertFileEqualsBaseline(currdir+"test_expr5.out",currdir+"test_expr5.txt")
- def test_prod(self):
+ def test_prod1(self):
self.assertEqual(prod([1,2,3,5]),30)
+ def test_prod2(self):
+ model = ConcreteModel()
+ model.A = Set(initialize=[1,2,3], doc='set A')
+ model.x = Var(model.A)
+ expr = prod(model.x[i] for i in model.x)
+ baseline = "x[1]*x[2]*x[3]"
+ self.assertEqual( str(expr), baseline )
+ expr = prod(model.x)
+ self.assertEqual( expr, 6)
+
+ def test_sum1(self):
+ self.assertEqual(quicksum([1,2,3,5]),11)
+
+ def test_sum2(self):
+ model = ConcreteModel()
+ model.A = Set(initialize=[1,2,3], doc='set A')
+ model.x = Var(model.A)
+ expr = quicksum(model.x[i] for i in model.x)
+ baseline = "x[1] + x[2] + x[3]"
+ self.assertEqual( str(expr), baseline )
+
+ def test_sum3(self):
+ model = ConcreteModel()
+ model.A = Set(initialize=[1,2,3], doc='set A')
+ model.x = Var(model.A)
+ expr = quicksum(model.x)
+ self.assertEqual( expr, 6)
+
def test_summation_error1(self):
try:
- dot_product()
+ sum_product()
self.fail("Expected ValueError")
except ValueError:
pass
@@ -112,7 +160,7 @@ def test_summation_error2(self):
model.x = Var(model.A)
instance=model.create_instance()
try:
- expr = dot_product(instance.x,instance.B)
+ expr = sum_product(instance.x,instance.B)
self.fail("Expected ValueError")
except ValueError:
pass
@@ -124,7 +172,7 @@ def test_summation_error3(self):
model.x = Var(model.A)
instance=model.create_instance()
try:
- expr = dot_product(denom=(instance.x,instance.B))
+ expr = sum_product(denom=(instance.x,instance.B))
self.fail("Expected ValueError")
except ValueError:
pass
diff --git a/pyomo/core/tests/unit/test_var_set_bounds.py b/pyomo/core/tests/unit/test_var_set_bounds.py
index c31cbfa9b0b..7b19dfebc74 100644
--- a/pyomo/core/tests/unit/test_var_set_bounds.py
+++ b/pyomo/core/tests/unit/test_var_set_bounds.py
@@ -8,7 +8,7 @@
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
#
-# Unit Tests for nontrivial Bounds (_SumExpression, _ProductExpression)
+# Unit Tests for nontrivial Bounds
#
import os
diff --git a/pyomo/core/tests/unit/varpprint.txt b/pyomo/core/tests/unit/varpprint.txt
index 3b79da54aba..07f7c6d7e18 100644
--- a/pyomo/core/tests/unit/varpprint.txt
+++ b/pyomo/core/tests/unit/varpprint.txt
@@ -8,11 +8,9 @@
2 Param Declarations
A : Size=1, Index=None, Domain=Any, Default=-1, Mutable=True
- Key : Value
- None : -1
+ Key : Value
B : Size=1, Index=None, Domain=Any, Default=-2, Mutable=True
- Key : Value
- None : -2
+ Key : Value
4 Var Declarations
b : Size=3, Index=a
diff --git a/pyomo/core/util.c b/pyomo/core/util.c
new file mode 100644
index 00000000000..935bc3d48d5
--- /dev/null
+++ b/pyomo/core/util.c
@@ -0,0 +1,11909 @@
+/* Generated by Cython 0.27.3 */
+
+/* BEGIN: Cython Metadata
+{
+ "distutils": {
+ "name": "pyomo.core.util",
+ "sources": [
+ "pyomo/core/util.pyx"
+ ]
+ },
+ "module_name": "pyomo.core.util"
+}
+END: Cython Metadata */
+
+#define PY_SSIZE_T_CLEAN
+#include "Python.h"
+#ifndef Py_PYTHON_H
+ #error Python headers needed to compile C extensions, please install development version of Python.
+#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
+ #error Cython requires Python 2.6+ or Python 3.3+.
+#else
+#define CYTHON_ABI "0_27_3"
+#define CYTHON_FUTURE_DIVISION 0
+#include
+#ifndef offsetof
+ #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+ #ifndef __stdcall
+ #define __stdcall
+ #endif
+ #ifndef __cdecl
+ #define __cdecl
+ #endif
+ #ifndef __fastcall
+ #define __fastcall
+ #endif
+#endif
+#ifndef DL_IMPORT
+ #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+ #define DL_EXPORT(t) t
+#endif
+#define __PYX_COMMA ,
+#ifndef HAVE_LONG_LONG
+ #if PY_VERSION_HEX >= 0x02070000
+ #define HAVE_LONG_LONG
+ #endif
+#endif
+#ifndef PY_LONG_LONG
+ #define PY_LONG_LONG LONG_LONG
+#endif
+#ifndef Py_HUGE_VAL
+ #define Py_HUGE_VAL HUGE_VAL
+#endif
+#ifdef PYPY_VERSION
+ #define CYTHON_COMPILING_IN_PYPY 1
+ #define CYTHON_COMPILING_IN_PYSTON 0
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #undef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 0
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #if PY_VERSION_HEX < 0x03050000
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #elif !defined(CYTHON_USE_ASYNC_SLOTS)
+ #define CYTHON_USE_ASYNC_SLOTS 1
+ #endif
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #undef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 1
+ #undef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 0
+ #undef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 0
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
+ #undef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT 0
+ #undef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE 0
+#elif defined(PYSTON_VERSION)
+ #define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 1
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
+ #undef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT 0
+ #undef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE 0
+#else
+ #define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 0
+ #define CYTHON_COMPILING_IN_CPYTHON 1
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
+ #define CYTHON_USE_PYTYPE_LOOKUP 1
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #elif !defined(CYTHON_USE_ASYNC_SLOTS)
+ #define CYTHON_USE_ASYNC_SLOTS 1
+ #endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
+ #define CYTHON_USE_PYLONG_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #if PY_VERSION_HEX < 0x030300F0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #elif !defined(CYTHON_USE_UNICODE_WRITER)
+ #define CYTHON_USE_UNICODE_WRITER 1
+ #endif
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #ifndef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 1
+ #endif
+ #ifndef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 1
+ #endif
+ #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
+ #endif
+ #ifndef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
+ #endif
+#endif
+#if !defined(CYTHON_FAST_PYCCALL)
+#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
+#endif
+#if CYTHON_USE_PYLONG_INTERNALS
+ #include "longintrepr.h"
+ #undef SHIFT
+ #undef BASE
+ #undef MASK
+#endif
+#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
+ #define Py_OptimizeFlag 0
+#endif
+#define __PYX_BUILD_PY_SSIZE_T "n"
+#define CYTHON_FORMAT_SSIZE_T "z"
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyClass_Type
+#else
+ #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyType_Type
+#endif
+#ifndef Py_TPFLAGS_CHECKTYPES
+ #define Py_TPFLAGS_CHECKTYPES 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_INDEX
+ #define Py_TPFLAGS_HAVE_INDEX 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
+ #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_FINALIZE
+ #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
+#if PY_VERSION_HEX < 0x030700A0 || !defined(METH_FASTCALL)
+ #ifndef METH_FASTCALL
+ #define METH_FASTCALL 0x80
+ #endif
+ typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args, Py_ssize_t nargs);
+ typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject **args,
+ Py_ssize_t nargs, PyObject *kwnames);
+#else
+ #define __Pyx_PyCFunctionFast _PyCFunctionFast
+ #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
+#endif
+#if CYTHON_FAST_PYCCALL
+#define __Pyx_PyFastCFunction_Check(func)\
+ ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
+#else
+#define __Pyx_PyFastCFunction_Check(func) 0
+#endif
+#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
+ #define __Pyx_PyThreadState_Current PyThreadState_GET()
+#elif PY_VERSION_HEX >= 0x03060000
+ #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
+#elif PY_VERSION_HEX >= 0x03000000
+ #define __Pyx_PyThreadState_Current PyThreadState_GET()
+#else
+ #define __Pyx_PyThreadState_Current _PyThreadState_Current
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
+#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
+#else
+#define __Pyx_PyDict_NewPresized(n) PyDict_New()
+#endif
+#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
+#else
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
+#endif
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+ #define CYTHON_PEP393_ENABLED 1
+ #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
+ 0 : _PyUnicode_Ready((PyObject *)(op)))
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
+ #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
+ #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
+ #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
+#else
+ #define CYTHON_PEP393_ENABLED 0
+ #define PyUnicode_1BYTE_KIND 1
+ #define PyUnicode_2BYTE_KIND 2
+ #define PyUnicode_4BYTE_KIND 4
+ #define __Pyx_PyUnicode_READY(op) (0)
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
+ #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
+ #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
+ #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+ #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
+#else
+ #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
+ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
+ #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
+ #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
+ #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
+ #define PyObject_Malloc(s) PyMem_Malloc(s)
+ #define PyObject_Free(p) PyMem_Free(p)
+ #define PyObject_Realloc(p) PyMem_Realloc(p)
+#endif
+#if CYTHON_COMPILING_IN_PYSTON
+ #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
+#else
+ #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
+#endif
+#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
+#else
+ #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
+#endif
+#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
+ #define PyObject_ASCII(o) PyObject_Repr(o)
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBaseString_Type PyUnicode_Type
+ #define PyStringObject PyUnicodeObject
+ #define PyString_Type PyUnicode_Type
+ #define PyString_Check PyUnicode_Check
+ #define PyString_CheckExact PyUnicode_CheckExact
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+ #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+ #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
+ #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
+#ifndef PySet_CheckExact
+ #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
+#endif
+#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
+#if PY_MAJOR_VERSION >= 3
+ #define PyIntObject PyLongObject
+ #define PyInt_Type PyLong_Type
+ #define PyInt_Check(op) PyLong_Check(op)
+ #define PyInt_CheckExact(op) PyLong_CheckExact(op)
+ #define PyInt_FromString PyLong_FromString
+ #define PyInt_FromUnicode PyLong_FromUnicode
+ #define PyInt_FromLong PyLong_FromLong
+ #define PyInt_FromSize_t PyLong_FromSize_t
+ #define PyInt_FromSsize_t PyLong_FromSsize_t
+ #define PyInt_AsLong PyLong_AsLong
+ #define PyInt_AS_LONG PyLong_AS_LONG
+ #define PyInt_AsSsize_t PyLong_AsSsize_t
+ #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
+ #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+ #define PyNumber_Int PyNumber_Long
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBoolObject PyLongObject
+#endif
+#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
+ #ifndef PyUnicode_InternFromString
+ #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
+ #endif
+#endif
+#if PY_VERSION_HEX < 0x030200A4
+ typedef long Py_hash_t;
+ #define __Pyx_PyInt_FromHash_t PyInt_FromLong
+ #define __Pyx_PyInt_AsHash_t PyInt_AsLong
+#else
+ #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
+ #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
+#else
+ #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
+#endif
+#ifndef __has_attribute
+ #define __has_attribute(x) 0
+#endif
+#ifndef __has_cpp_attribute
+ #define __has_cpp_attribute(x) 0
+#endif
+#if CYTHON_USE_ASYNC_SLOTS
+ #if PY_VERSION_HEX >= 0x030500B1
+ #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
+ #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
+ #else
+ #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
+ #endif
+#else
+ #define __Pyx_PyType_AsAsync(obj) NULL
+#endif
+#ifndef __Pyx_PyAsyncMethodsStruct
+ typedef struct {
+ unaryfunc am_await;
+ unaryfunc am_aiter;
+ unaryfunc am_anext;
+ } __Pyx_PyAsyncMethodsStruct;
+#endif
+#ifndef CYTHON_RESTRICT
+ #if defined(__GNUC__)
+ #define CYTHON_RESTRICT __restrict__
+ #elif defined(_MSC_VER) && _MSC_VER >= 1400
+ #define CYTHON_RESTRICT __restrict
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_RESTRICT restrict
+ #else
+ #define CYTHON_RESTRICT
+ #endif
+#endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+# if defined(__cplusplus)
+ template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+# else
+# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+# endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+# define CYTHON_NCP_UNUSED
+# else
+# define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
+#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
+#ifdef _MSC_VER
+ #ifndef _MSC_STDINT_H_
+ #if _MSC_VER < 1300
+ typedef unsigned char uint8_t;
+ typedef unsigned int uint32_t;
+ #else
+ typedef unsigned __int8 uint8_t;
+ typedef unsigned __int32 uint32_t;
+ #endif
+ #endif
+#else
+ #include
+#endif
+#ifndef CYTHON_FALLTHROUGH
+ #if defined(__cplusplus) && __cplusplus >= 201103L
+ #if __has_cpp_attribute(fallthrough)
+ #define CYTHON_FALLTHROUGH [[fallthrough]]
+ #elif __has_cpp_attribute(clang::fallthrough)
+ #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
+ #elif __has_cpp_attribute(gnu::fallthrough)
+ #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
+ #endif
+ #endif
+ #ifndef CYTHON_FALLTHROUGH
+ #if __has_attribute(fallthrough)
+ #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
+ #else
+ #define CYTHON_FALLTHROUGH
+ #endif
+ #endif
+ #if defined(__clang__ ) && defined(__apple_build_version__)
+ #if __apple_build_version__ < 7000000
+ #undef CYTHON_FALLTHROUGH
+ #define CYTHON_FALLTHROUGH
+ #endif
+ #endif
+#endif
+
+#ifndef CYTHON_INLINE
+ #if defined(__clang__)
+ #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+ #elif defined(__GNUC__)
+ #define CYTHON_INLINE __inline__
+ #elif defined(_MSC_VER)
+ #define CYTHON_INLINE __inline
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_INLINE inline
+ #else
+ #define CYTHON_INLINE
+ #endif
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+ #define _USE_MATH_DEFINES
+#endif
+#include
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+ float value;
+ memset(&value, 0xFF, sizeof(value));
+ return value;
+}
+#endif
+#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
+#define __Pyx_truncl trunc
+#else
+#define __Pyx_truncl truncl
+#endif
+
+
+#define __PYX_ERR(f_index, lineno, Ln_error) \
+{ \
+ __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
+}
+
+#ifndef __PYX_EXTERN_C
+ #ifdef __cplusplus
+ #define __PYX_EXTERN_C extern "C"
+ #else
+ #define __PYX_EXTERN_C extern
+ #endif
+#endif
+
+#define __PYX_HAVE__pyomo__core__util
+#define __PYX_HAVE_API__pyomo__core__util
+#ifdef _OPENMP
+#include
+#endif /* _OPENMP */
+
+#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
+ const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_uchar_cast(c) ((unsigned char)c)
+#define __Pyx_long_cast(x) ((long)x)
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
+ (sizeof(type) < sizeof(Py_ssize_t)) ||\
+ (sizeof(type) > sizeof(Py_ssize_t) &&\
+ likely(v < (type)PY_SSIZE_T_MAX ||\
+ v == (type)PY_SSIZE_T_MAX) &&\
+ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
+ v == (type)PY_SSIZE_T_MIN))) ||\
+ (sizeof(type) == sizeof(Py_ssize_t) &&\
+ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
+ v == (type)PY_SSIZE_T_MAX))) )
+#if defined (__cplusplus) && __cplusplus >= 201103L
+ #include
+ #define __Pyx_sst_abs(value) std::abs(value)
+#elif SIZEOF_INT >= SIZEOF_SIZE_T
+ #define __Pyx_sst_abs(value) abs(value)
+#elif SIZEOF_LONG >= SIZEOF_SIZE_T
+ #define __Pyx_sst_abs(value) labs(value)
+#elif defined (_MSC_VER)
+ #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
+#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define __Pyx_sst_abs(value) llabs(value)
+#elif defined (__GNUC__)
+ #define __Pyx_sst_abs(value) __builtin_llabs(value)
+#else
+ #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
+#endif
+static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+ #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
+#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
+#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
+#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
+#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
+ const Py_UNICODE *u_end = u;
+ while (*u_end++) ;
+ return (size_t)(u_end - u - 1);
+}
+#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
+#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
+#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
+#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
+#define __Pyx_PySequence_Tuple(obj)\
+ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+#if CYTHON_ASSUME_SAFE_MACROS
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
+#else
+#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
+#endif
+#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ PyObject* ascii_chars_u = NULL;
+ PyObject* ascii_chars_b = NULL;
+ const char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ if (strcmp(default_encoding_c, "ascii") == 0) {
+ __Pyx_sys_getdefaultencoding_not_ascii = 0;
+ } else {
+ char ascii_chars[128];
+ int c;
+ for (c = 0; c < 128; c++) {
+ ascii_chars[c] = c;
+ }
+ __Pyx_sys_getdefaultencoding_not_ascii = 1;
+ ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+ if (!ascii_chars_u) goto bad;
+ ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+ if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+ PyErr_Format(
+ PyExc_ValueError,
+ "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+ default_encoding_c);
+ goto bad;
+ }
+ Py_DECREF(ascii_chars_u);
+ Py_DECREF(ascii_chars_b);
+ }
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ Py_XDECREF(ascii_chars_u);
+ Py_XDECREF(ascii_chars_b);
+ return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+ if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
+ strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ return -1;
+}
+#endif
+#endif
+
+
+/* Test for GCC > 2.95 */
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
+ #define likely(x) __builtin_expect(!!(x), 1)
+ #define unlikely(x) __builtin_expect(!!(x), 0)
+#else /* !__GNUC__ or GCC < 2.95 */
+ #define likely(x) (x)
+ #define unlikely(x) (x)
+#endif /* __GNUC__ */
+static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
+
+static PyObject *__pyx_m = NULL;
+static PyObject *__pyx_d;
+static PyObject *__pyx_b;
+static PyObject *__pyx_cython_runtime;
+static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
+static PyObject *__pyx_empty_unicode;
+static int __pyx_lineno;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+
+
+static const char *__pyx_f[] = {
+ "pyomo/core/util.pyx",
+};
+
+/*--- Type declarations ---*/
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation;
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr;
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr;
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr;
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr;
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr;
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr;
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr;
+
+/* "pyomo/core/util.pyx":144
+ *
+ *
+ * def summation(*args, **kwds): # <<<<<<<<<<<<<<
+ * """
+ * A utility function to compute a generalized dot product.
+ */
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation {
+ PyObject_HEAD
+ PyObject *__pyx_v_args;
+ PyObject *__pyx_v_denom;
+ PyObject *__pyx_v_denom_index;
+ PyObject *__pyx_v_index;
+ PyObject *__pyx_v_num_index;
+};
+
+
+/* "pyomo/core/util.pyx":238
+ * return expr
+ * #
+ * return Sum((prod(args[j][i] for j in num_index) for i in index), start) # <<<<<<<<<<<<<<
+ * elif nargs == 0:
+ * #
+ */
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *__pyx_outer_scope;
+ PyObject *__pyx_v_genexpr;
+ PyObject *__pyx_v_i;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr *__pyx_outer_scope;
+ PyObject *__pyx_v_j;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pyomo/core/util.pyx":244
+ * #
+ * denom_index = range(0,ndenom)
+ * return Sum((1/prod(denom[j][i] for j in denom_index) for i in index), start) # <<<<<<<<<<<<<<
+ * else:
+ * #
+ */
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *__pyx_outer_scope;
+ PyObject *__pyx_v_genexpr;
+ PyObject *__pyx_v_i;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr *__pyx_outer_scope;
+ PyObject *__pyx_v_j;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pyomo/core/util.pyx":250
+ * #
+ * denom_index = range(0,ndenom)
+ * return Sum((prod(args[j][i] for j in num_index)/prod(denom[j][i] for j in denom_index) for i in index), start) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *__pyx_outer_scope;
+ PyObject *__pyx_v_genexpr;
+ PyObject *__pyx_v_i;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *__pyx_outer_scope;
+ PyObject *__pyx_v_j;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *__pyx_outer_scope;
+ PyObject *__pyx_v_j;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* --- Runtime support code (head) --- */
+/* Refnanny.proto */
+#ifndef CYTHON_REFNANNY
+ #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+ typedef struct {
+ void (*INCREF)(void*, PyObject*, int);
+ void (*DECREF)(void*, PyObject*, int);
+ void (*GOTREF)(void*, PyObject*, int);
+ void (*GIVEREF)(void*, PyObject*, int);
+ void* (*SetupContext)(const char*, int, const char*);
+ void (*FinishContext)(void**);
+ } __Pyx_RefNannyAPIStruct;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
+ #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ if (acquire_gil) {\
+ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ PyGILState_Release(__pyx_gilstate_save);\
+ } else {\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ }
+#else
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+ #define __Pyx_RefNannyFinishContext()\
+ __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+ #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+ #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+ #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+ #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+ #define __Pyx_RefNannyDeclarations
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)
+ #define __Pyx_RefNannyFinishContext()
+ #define __Pyx_INCREF(r) Py_INCREF(r)
+ #define __Pyx_DECREF(r) Py_DECREF(r)
+ #define __Pyx_GOTREF(r)
+ #define __Pyx_GIVEREF(r)
+ #define __Pyx_XINCREF(r) Py_XINCREF(r)
+ #define __Pyx_XDECREF(r) Py_XDECREF(r)
+ #define __Pyx_XGOTREF(r)
+ #define __Pyx_XGIVEREF(r)
+#endif
+#define __Pyx_XDECREF_SET(r, v) do {\
+ PyObject *tmp = (PyObject *) r;\
+ r = v; __Pyx_XDECREF(tmp);\
+ } while (0)
+#define __Pyx_DECREF_SET(r, v) do {\
+ PyObject *tmp = (PyObject *) r;\
+ r = v; __Pyx_DECREF(tmp);\
+ } while (0)
+#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+
+/* PyObjectGetAttrStr.proto */
+#if CYTHON_USE_TYPE_SLOTS
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_getattro))
+ return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_getattr))
+ return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+ return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+/* GetBuiltinName.proto */
+static PyObject *__Pyx_GetBuiltinName(PyObject *name);
+
+/* RaiseDoubleKeywords.proto */
+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
+
+/* ParseKeywords.proto */
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
+ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
+ const char* function_name);
+
+/* RaiseArgTupleInvalid.proto */
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+ Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
+
+/* GetModuleGlobalName.proto */
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
+
+/* PySequenceContains.proto */
+static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
+ int result = PySequence_Contains(seq, item);
+ return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+/* PyThreadStateGet.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
+#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
+#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
+#else
+#define __Pyx_PyThreadState_declare
+#define __Pyx_PyThreadState_assign
+#define __Pyx_PyErr_Occurred() PyErr_Occurred()
+#endif
+
+/* PyErrFetchRestore.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
+#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
+#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
+#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
+#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
+static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
+#else
+#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
+#endif
+#else
+#define __Pyx_PyErr_Clear() PyErr_Clear()
+#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
+#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
+#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
+#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
+#endif
+
+/* IterNext.proto */
+#define __Pyx_PyIter_Next(obj) __Pyx_PyIter_Next2(obj, NULL)
+static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject *, PyObject *);
+
+/* PyCFunctionFastCall.proto */
+#if CYTHON_FAST_PYCCALL
+static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
+#else
+#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
+#endif
+
+/* PyFunctionFastCall.proto */
+#if CYTHON_FAST_PYCALL
+#define __Pyx_PyFunction_FastCall(func, args, nargs)\
+ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
+#else
+#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
+#endif
+#endif
+
+/* PyObjectCall.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
+/* PyObjectCallMethO.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
+#endif
+
+/* PyObjectCallOneArg.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
+
+/* RaiseTooManyValuesToUnpack.proto */
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+
+/* RaiseNeedMoreValuesToUnpack.proto */
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+/* IterFinish.proto */
+static CYTHON_INLINE int __Pyx_IterFinish(void);
+
+/* UnpackItemEndCheck.proto */
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
+ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
+#endif
+
+/* PyObjectLookupSpecial.proto */
+#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
+static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
+ PyObject *res;
+ PyTypeObject *tp = Py_TYPE(obj);
+#if PY_MAJOR_VERSION < 3
+ if (unlikely(PyInstance_Check(obj)))
+ return __Pyx_PyObject_GetAttrStr(obj, attr_name);
+#endif
+ res = _PyType_Lookup(tp, attr_name);
+ if (likely(res)) {
+ descrgetfunc f = Py_TYPE(res)->tp_descr_get;
+ if (!f) {
+ Py_INCREF(res);
+ } else {
+ res = f(res, obj, (PyObject *)tp);
+ }
+ } else {
+ PyErr_SetObject(PyExc_AttributeError, attr_name);
+ }
+ return res;
+}
+#else
+#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
+#endif
+
+/* PyObjectCallNoArg.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
+#else
+#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
+#endif
+
+/* SaveResetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
+#else
+#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
+#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
+#endif
+
+/* GetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#else
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
+#endif
+
+/* None.proto */
+static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname);
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
+ PyObject_RichCompare(op1, op2, Py_EQ)
+ #endif
+
+/* KeywordStringCheck.proto */
+static int __Pyx_CheckKeywordStrings(PyObject *kwdict, const char* function_name, int kw_allowed);
+
+/* None.proto */
+static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
+
+/* RaiseException.proto */
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
+
+/* PyDictContains.proto */
+static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
+ int result = PyDict_Contains(dict, item);
+ return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+/* DictGetItem.proto */
+#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
+static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
+ PyObject *value;
+ value = PyDict_GetItemWithError(d, key);
+ if (unlikely(!value)) {
+ if (!PyErr_Occurred()) {
+ PyObject* args = PyTuple_Pack(1, key);
+ if (likely(args))
+ PyErr_SetObject(PyExc_KeyError, args);
+ Py_XDECREF(args);
+ }
+ return NULL;
+ }
+ Py_INCREF(value);
+ return value;
+}
+#else
+ #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
+#endif
+
+/* GetItemInt.proto */
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
+ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
+ __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+ int is_list, int wraparound, int boundscheck);
+
+/* dict_getitem_default.proto */
+static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value);
+
+/* ListAppend.proto */
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+ PyListObject* L = (PyListObject*) list;
+ Py_ssize_t len = Py_SIZE(list);
+ if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
+ Py_INCREF(x);
+ PyList_SET_ITEM(list, len, x);
+ Py_SIZE(list) = len+1;
+ return 0;
+ }
+ return PyList_Append(list, x);
+}
+#else
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#endif
+
+/* Import.proto */
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
+
+/* ImportFrom.proto */
+static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
+
+/* IncludeStringH.proto */
+#include
+
+/* CLineInTraceback.proto */
+#ifdef CYTHON_CLINE_IN_TRACEBACK
+#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
+#else
+static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
+#endif
+
+/* CodeObjectCache.proto */
+typedef struct {
+ PyCodeObject* code_object;
+ int code_line;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+ int count;
+ int max_count;
+ __Pyx_CodeObjectCacheEntry* entries;
+};
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+
+/* AddTraceback.proto */
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+
+/* FastTypeChecks.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
+static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
+#else
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
+#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
+#endif
+
+/* FetchCommonType.proto */
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
+
+/* SwapException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#else
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
+#endif
+
+/* PyObjectCallMethod1.proto */
+static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
+static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg);
+
+/* CoroutineBase.proto */
+typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
+typedef struct {
+ PyObject_HEAD
+ __pyx_coroutine_body_t body;
+ PyObject *closure;
+ PyObject *exc_type;
+ PyObject *exc_value;
+ PyObject *exc_traceback;
+ PyObject *gi_weakreflist;
+ PyObject *classobj;
+ PyObject *yieldfrom;
+ PyObject *gi_name;
+ PyObject *gi_qualname;
+ PyObject *gi_modulename;
+ int resume_label;
+ char is_running;
+} __pyx_CoroutineObject;
+static __pyx_CoroutineObject *__Pyx__Coroutine_New(
+ PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *closure,
+ PyObject *name, PyObject *qualname, PyObject *module_name);
+static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
+ __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *closure,
+ PyObject *name, PyObject *qualname, PyObject *module_name);
+static int __Pyx_Coroutine_clear(PyObject *self);
+static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
+static PyObject *__Pyx_Coroutine_Close(PyObject *self);
+static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
+#define __Pyx_Coroutine_SwapException(self) {\
+ __Pyx_ExceptionSwap(&(self)->exc_type, &(self)->exc_value, &(self)->exc_traceback);\
+ __Pyx_Coroutine_ResetFrameBackpointer(self);\
+ }
+#define __Pyx_Coroutine_ResetAndClearException(self) {\
+ __Pyx_ExceptionReset((self)->exc_type, (self)->exc_value, (self)->exc_traceback);\
+ (self)->exc_type = (self)->exc_value = (self)->exc_traceback = NULL;\
+ }
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
+ __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
+#else
+#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
+ __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
+#endif
+static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
+static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self);
+
+/* PatchModuleWithCoroutine.proto */
+static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
+
+/* PatchGeneratorABC.proto */
+static int __Pyx_patch_abc(void);
+
+/* Generator.proto */
+#define __Pyx_Generator_USED
+static PyTypeObject *__pyx_GeneratorType = 0;
+#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
+#define __Pyx_Generator_New(body, closure, name, qualname, module_name)\
+ __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname, module_name)
+static PyObject *__Pyx_Generator_Next(PyObject *self);
+static int __pyx_Generator_init(void);
+
+/* CheckBinaryVersion.proto */
+static int __Pyx_check_binary_version(void);
+
+/* InitStrings.proto */
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
+
+
+/* Module declarations from 'pyomo.core.util' */
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct__summation = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_1_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_2_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_3_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_4_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_5_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_6_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_7_genexpr = 0;
+#define __Pyx_MODULE_NAME "pyomo.core.util"
+extern int __pyx_module_is_main_pyomo__core__util;
+int __pyx_module_is_main_pyomo__core__util = 0;
+
+/* Implementation of 'pyomo.core.util' */
+static PyObject *__pyx_builtin_ValueError;
+static PyObject *__pyx_builtin_range;
+static const char __pyx_k_c[] = "c";
+static const char __pyx_k_e[] = "e";
+static const char __pyx_k_i[] = "i";
+static const char __pyx_k_j[] = "j";
+static const char __pyx_k_p[] = "p";
+static const char __pyx_k_v[] = "v";
+static const char __pyx_k_Sum[] = "Sum";
+static const char __pyx_k_Var[] = "Var";
+static const char __pyx_k_all[] = "__all__";
+static const char __pyx_k_ans[] = "ans";
+static const char __pyx_k_arg[] = "arg";
+static const char __pyx_k_get[] = "get";
+static const char __pyx_k_pop[] = "pop";
+static const char __pyx_k_var[] = "var";
+static const char __pyx_k_EXPR[] = "EXPR";
+static const char __pyx_k_Prod[] = "Prod";
+static const char __pyx_k_args[] = "args";
+static const char __pyx_k_base[] = "base";
+static const char __pyx_k_core[] = "core";
+static const char __pyx_k_exit[] = "__exit__";
+static const char __pyx_k_expr[] = "expr";
+static const char __pyx_k_iarg[] = "iarg";
+static const char __pyx_k_kwds[] = "kwds";
+static const char __pyx_k_main[] = "__main__";
+static const char __pyx_k_nvar[] = "nvar";
+static const char __pyx_k_prod[] = "prod";
+static const char __pyx_k_send[] = "send";
+static const char __pyx_k_term[] = "term";
+static const char __pyx_k_test[] = "__test__";
+static const char __pyx_k_vars[] = "vars_";
+static const char __pyx_k_class[] = "__class__";
+static const char __pyx_k_close[] = "close";
+static const char __pyx_k_denom[] = "denom";
+static const char __pyx_k_enter[] = "__enter__";
+static const char __pyx_k_first[] = "first";
+static const char __pyx_k_index[] = "index";
+static const char __pyx_k_nargs[] = "nargs";
+static const char __pyx_k_nvars[] = "nvars";
+static const char __pyx_k_pyomo[] = "pyomo";
+static const char __pyx_k_range[] = "range";
+static const char __pyx_k_start[] = "start";
+static const char __pyx_k_terms[] = "terms";
+static const char __pyx_k_throw[] = "throw";
+static const char __pyx_k_import[] = "__import__";
+static const char __pyx_k_linear[] = "linear";
+static const char __pyx_k_ndenom[] = "ndenom";
+static const char __pyx_k_params[] = "params_";
+static const char __pyx_k_reduce[] = "reduce";
+static const char __pyx_k_xrange[] = "xrange";
+static const char __pyx_k_genexpr[] = "genexpr";
+static const char __pyx_k_constant[] = "constant";
+static const char __pyx_k_operator[] = "operator";
+static const char __pyx_k_sequence[] = "sequence";
+static const char __pyx_k_functools[] = "functools";
+static const char __pyx_k_index_set[] = "index_set";
+static const char __pyx_k_num_index[] = "num_index";
+static const char __pyx_k_six_moves[] = "six.moves";
+static const char __pyx_k_summation[] = "summation";
+static const char __pyx_k_xsequence[] = "xsequence";
+static const char __pyx_k_Expression[] = "Expression";
+static const char __pyx_k_ValueError[] = "ValueError";
+static const char __pyx_k_expression[] = "expression";
+static const char __pyx_k_pyomo_core[] = "pyomo.core";
+static const char __pyx_k_denom_index[] = "denom_index";
+static const char __pyx_k_dot_product[] = "dot_product";
+static const char __pyx_k_is_constant[] = "is_constant";
+static const char __pyx_k_decompose_term[] = "decompose_term";
+static const char __pyx_k_pyomo_core_util[] = "pyomo.core.util";
+static const char __pyx_k_linear_expression[] = "linear_expression";
+static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
+static const char __pyx_k_deprecation_warning[] = "deprecation_warning";
+static const char __pyx_k_pyomo_core_base_var[] = "pyomo.core.base.var";
+static const char __pyx_k_pyomo_core_util_pyx[] = "pyomo/core/util.pyx";
+static const char __pyx_k_native_numeric_types[] = "native_numeric_types";
+static const char __pyx_k_nonlinear_expression[] = "nonlinear_expression";
+static const char __pyx_k_pyomo_util_deprecation[] = "pyomo.util.deprecation";
+static const char __pyx_k_pyomo_core_expr_numvalue[] = "pyomo.core.expr.numvalue";
+static const char __pyx_k_summation_locals_genexpr[] = "summation..genexpr";
+static const char __pyx_k_pyomo_core_expr_expr_pyomo5[] = "pyomo.core.expr.expr_pyomo5";
+static const char __pyx_k_argument_or_a_denominator_term[] = "argument or a denominator term";
+static const char __pyx_k_summation_locals_genexpr_locals[] = "summation..genexpr..genexpr";
+static const char __pyx_k_Error_executing_summation_The_la[] = "Error executing summation(): The last argument value must be a variable or expression object if no 'index' option is specified";
+static const char __pyx_k_The_summation_command_requires_a[] = "The summation() command requires at least an ";
+static const char __pyx_k_The_xsequence_function_is_deprec[] = "The xsequence function is deprecated. Use the sequence() function, which returns a generator.";
+static const char __pyx_k_sequence_expected_at_least_1_arg[] = "sequence expected at least 1 arguments, got 0";
+static const char __pyx_k_sequence_expected_at_most_3_argu[] = "sequence expected at most 3 arguments, got %d";
+static const char __pyx_k_Error_executing_summation_The_la_2[] = "Error executing summation(): The last denom argument value must be a variable or expression object if no 'index' option is specified";
+static PyObject *__pyx_n_s_EXPR;
+static PyObject *__pyx_kp_s_Error_executing_summation_The_la;
+static PyObject *__pyx_kp_s_Error_executing_summation_The_la_2;
+static PyObject *__pyx_n_s_Expression;
+static PyObject *__pyx_n_s_Prod;
+static PyObject *__pyx_n_s_Sum;
+static PyObject *__pyx_kp_s_The_summation_command_requires_a;
+static PyObject *__pyx_kp_s_The_xsequence_function_is_deprec;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_n_s_Var;
+static PyObject *__pyx_n_s_all;
+static PyObject *__pyx_n_s_ans;
+static PyObject *__pyx_n_s_arg;
+static PyObject *__pyx_n_s_args;
+static PyObject *__pyx_kp_s_argument_or_a_denominator_term;
+static PyObject *__pyx_n_s_base;
+static PyObject *__pyx_n_s_c;
+static PyObject *__pyx_n_s_class;
+static PyObject *__pyx_n_s_cline_in_traceback;
+static PyObject *__pyx_n_s_close;
+static PyObject *__pyx_n_s_constant;
+static PyObject *__pyx_n_s_core;
+static PyObject *__pyx_n_s_decompose_term;
+static PyObject *__pyx_n_s_denom;
+static PyObject *__pyx_n_s_denom_index;
+static PyObject *__pyx_n_s_deprecation_warning;
+static PyObject *__pyx_n_s_dot_product;
+static PyObject *__pyx_n_s_e;
+static PyObject *__pyx_n_s_enter;
+static PyObject *__pyx_n_s_exit;
+static PyObject *__pyx_n_s_expr;
+static PyObject *__pyx_n_s_expression;
+static PyObject *__pyx_n_s_first;
+static PyObject *__pyx_n_s_functools;
+static PyObject *__pyx_n_s_genexpr;
+static PyObject *__pyx_n_s_get;
+static PyObject *__pyx_n_s_i;
+static PyObject *__pyx_n_s_iarg;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_n_s_index;
+static PyObject *__pyx_n_s_index_set;
+static PyObject *__pyx_n_s_is_constant;
+static PyObject *__pyx_n_s_j;
+static PyObject *__pyx_n_s_kwds;
+static PyObject *__pyx_n_s_linear;
+static PyObject *__pyx_n_s_linear_expression;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_nargs;
+static PyObject *__pyx_n_s_native_numeric_types;
+static PyObject *__pyx_n_s_ndenom;
+static PyObject *__pyx_n_s_nonlinear_expression;
+static PyObject *__pyx_n_s_num_index;
+static PyObject *__pyx_n_s_nvar;
+static PyObject *__pyx_n_s_nvars;
+static PyObject *__pyx_n_s_operator;
+static PyObject *__pyx_n_s_p;
+static PyObject *__pyx_n_s_params;
+static PyObject *__pyx_n_s_pop;
+static PyObject *__pyx_n_s_prod;
+static PyObject *__pyx_n_s_pyomo;
+static PyObject *__pyx_n_s_pyomo_core;
+static PyObject *__pyx_n_s_pyomo_core_base_var;
+static PyObject *__pyx_n_s_pyomo_core_expr_expr_pyomo5;
+static PyObject *__pyx_n_s_pyomo_core_expr_numvalue;
+static PyObject *__pyx_n_s_pyomo_core_util;
+static PyObject *__pyx_kp_s_pyomo_core_util_pyx;
+static PyObject *__pyx_n_s_pyomo_util_deprecation;
+static PyObject *__pyx_n_s_range;
+static PyObject *__pyx_n_s_reduce;
+static PyObject *__pyx_n_s_send;
+static PyObject *__pyx_n_s_sequence;
+static PyObject *__pyx_kp_s_sequence_expected_at_least_1_arg;
+static PyObject *__pyx_kp_s_sequence_expected_at_most_3_argu;
+static PyObject *__pyx_n_s_six_moves;
+static PyObject *__pyx_n_s_start;
+static PyObject *__pyx_n_s_summation;
+static PyObject *__pyx_n_s_summation_locals_genexpr;
+static PyObject *__pyx_n_s_summation_locals_genexpr_locals;
+static PyObject *__pyx_n_s_term;
+static PyObject *__pyx_n_s_terms;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_throw;
+static PyObject *__pyx_n_s_v;
+static PyObject *__pyx_n_s_var;
+static PyObject *__pyx_n_s_vars;
+static PyObject *__pyx_n_s_xrange;
+static PyObject *__pyx_n_s_xsequence;
+static PyObject *__pyx_pf_5pyomo_4core_4util_prod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_terms); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4util_2Sum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_start, PyObject *__pyx_v_linear); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4util_9summation_7genexpr_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4util_9summation_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4util_9summation_7genexpr_3genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4util_9summation_3genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4util_9summation_7genexpr_6genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4util_9summation_7genexpr_9genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4util_9summation_6genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4util_4summation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwds); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4util_6sequence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
+static PyObject *__pyx_pf_5pyomo_4core_4util_8xsequence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args); /* proto */
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct__summation(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_3_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_4_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_7_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_int_0;
+static PyObject *__pyx_int_1;
+static PyObject *__pyx_tuple_;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__3;
+static PyObject *__pyx_tuple__4;
+static PyObject *__pyx_tuple__5;
+static PyObject *__pyx_tuple__6;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_tuple__10;
+static PyObject *__pyx_tuple__11;
+static PyObject *__pyx_tuple__12;
+static PyObject *__pyx_tuple__14;
+static PyObject *__pyx_tuple__16;
+static PyObject *__pyx_tuple__18;
+static PyObject *__pyx_tuple__20;
+static PyObject *__pyx_codeobj__13;
+static PyObject *__pyx_codeobj__15;
+static PyObject *__pyx_codeobj__17;
+static PyObject *__pyx_codeobj__19;
+static PyObject *__pyx_codeobj__21;
+
+/* "pyomo/core/util.pyx":26
+ *
+ *
+ * def prod(terms): # <<<<<<<<<<<<<<
+ * """
+ * A utility function to compute the product of a list of terms.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4util_1prod(PyObject *__pyx_self, PyObject *__pyx_v_terms); /*proto*/
+static char __pyx_doc_5pyomo_4core_4util_prod[] = "\n A utility function to compute the product of a list of terms.\n\n .. note::\n Should this function be capitalized to be consistent with Sum()?\n\n Args:\n terms (list): A list of terms that are multiplied together.\n\n Returns:\n The value of the product, which may be a Pyomo expression object.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4util_1prod = {"prod", (PyCFunction)__pyx_pw_5pyomo_4core_4util_1prod, METH_O, __pyx_doc_5pyomo_4core_4util_prod};
+static PyObject *__pyx_pw_5pyomo_4core_4util_1prod(PyObject *__pyx_self, PyObject *__pyx_v_terms) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("prod (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4core_4util_prod(__pyx_self, ((PyObject *)__pyx_v_terms));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4util_prod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_terms) {
+ PyObject *__pyx_v_ans = NULL;
+ PyObject *__pyx_v_term = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *(*__pyx_t_3)(PyObject *);
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannySetupContext("prod", 0);
+
+ /* "pyomo/core/util.pyx":39
+ * The value of the product, which may be a Pyomo expression object.
+ * """
+ * ans = 1 # <<<<<<<<<<<<<<
+ * for term in terms:
+ * ans *= term
+ */
+ __Pyx_INCREF(__pyx_int_1);
+ __pyx_v_ans = __pyx_int_1;
+
+ /* "pyomo/core/util.pyx":40
+ * """
+ * ans = 1
+ * for term in terms: # <<<<<<<<<<<<<<
+ * ans *= term
+ * return ans
+ */
+ if (likely(PyList_CheckExact(__pyx_v_terms)) || PyTuple_CheckExact(__pyx_v_terms)) {
+ __pyx_t_1 = __pyx_v_terms; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ __pyx_t_3 = NULL;
+ } else {
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_terms); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 40, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_3)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 40, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 40, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 40, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_3(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 40, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_term, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/util.pyx":41
+ * ans = 1
+ * for term in terms:
+ * ans *= term # <<<<<<<<<<<<<<
+ * return ans
+ *
+ */
+ __pyx_t_4 = PyNumber_InPlaceMultiply(__pyx_v_ans, __pyx_v_term); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 41, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF_SET(__pyx_v_ans, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "pyomo/core/util.pyx":40
+ * """
+ * ans = 1
+ * for term in terms: # <<<<<<<<<<<<<<
+ * ans *= term
+ * return ans
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":42
+ * for term in terms:
+ * ans *= term
+ * return ans # <<<<<<<<<<<<<<
+ *
+ * Prod = prod
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_ans);
+ __pyx_r = __pyx_v_ans;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":26
+ *
+ *
+ * def prod(terms): # <<<<<<<<<<<<<<
+ * """
+ * A utility function to compute the product of a list of terms.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("pyomo.core.util.prod", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_ans);
+ __Pyx_XDECREF(__pyx_v_term);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/util.pyx":47
+ *
+ *
+ * def Sum(args, start=0, linear=None): # <<<<<<<<<<<<<<
+ * """
+ * A utility function to compute a sum of Pyomo expressions.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4util_3Sum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4util_2Sum[] = "\n A utility function to compute a sum of Pyomo expressions.\n\n The behavior of :func:`Sum` is similar to the builtin :func:`sum`\n function, but this function generates a more compact Pyomo\n expression.\n\n .. note::\n Is there a better name for this function? Sum() and sum() are very similar, which could make it \n difficult to see whether this function is being used. But that similarity means that changes\n from standard Python expressions are quite similar.\n\n Args:\n args: A generator for terms in the sum.\n\n start: A value that is initializes the sum. If\n this value is not a numeric constant, then the += \n operator is used to add terms to this object.\n Defaults to zero.\n\n linear: If :attr:`start` is not a numeric constant, then this \n option is ignored. Otherwise, this value indicates\n whether the terms in the sum are linear. If the value\n is :const:`False`, then the terms are\n treated as nonlinear, and if :const:`True`, then\n the terms are treated as linear. Default is\n :const:`None`, which indicates that the first term\n in the :attr:`args` is used to determine this value.\n\n Returns:\n The value of the sum, which may be a Pyomo expression object.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4util_3Sum = {"Sum", (PyCFunction)__pyx_pw_5pyomo_4core_4util_3Sum, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4util_2Sum};
+static PyObject *__pyx_pw_5pyomo_4core_4util_3Sum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_start = 0;
+ PyObject *__pyx_v_linear = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("Sum (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_args,&__pyx_n_s_start,&__pyx_n_s_linear,0};
+ PyObject* values[3] = {0,0,0};
+ values[1] = ((PyObject *)__pyx_int_0);
+ values[2] = ((PyObject *)Py_None);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_args)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_start);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_linear);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "Sum") < 0)) __PYX_ERR(0, 47, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_args = values[0];
+ __pyx_v_start = values[1];
+ __pyx_v_linear = values[2];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("Sum", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 47, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.core.util.Sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4core_4util_2Sum(__pyx_self, __pyx_v_args, __pyx_v_start, __pyx_v_linear);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4util_2Sum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_start, PyObject *__pyx_v_linear) {
+ PyObject *__pyx_v_first = NULL;
+ PyObject *__pyx_v_terms = NULL;
+ PyObject *__pyx_v_nvar = NULL;
+ PyObject *__pyx_v_term = NULL;
+ PyObject *__pyx_v_c = NULL;
+ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_v_e = NULL;
+ PyObject *__pyx_v_arg = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *(*__pyx_t_7)(PyObject *);
+ Py_ssize_t __pyx_t_8;
+ PyObject *(*__pyx_t_9)(PyObject *);
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ __Pyx_RefNannySetupContext("Sum", 0);
+ __Pyx_INCREF(__pyx_v_start);
+ __Pyx_INCREF(__pyx_v_linear);
+
+ /* "pyomo/core/util.pyx":85
+ * # return a static version to the user.
+ * #
+ * if start.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if linear is None:
+ * #
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 85, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/util.pyx":86
+ * #
+ * if start.__class__ in native_numeric_types:
+ * if linear is None: # <<<<<<<<<<<<<<
+ * #
+ * # Get the first term, which we will test for linearity
+ */
+ __pyx_t_4 = (__pyx_v_linear == Py_None);
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/util.pyx":90
+ * # Get the first term, which we will test for linearity
+ * #
+ * first = next(args, None) # <<<<<<<<<<<<<<
+ * if first is None:
+ * return start
+ */
+ __pyx_t_2 = __Pyx_PyIter_Next2(__pyx_v_args, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 90, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_v_first = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":91
+ * #
+ * first = next(args, None)
+ * if first is None: # <<<<<<<<<<<<<<
+ * return start
+ * #
+ */
+ __pyx_t_3 = (__pyx_v_first == Py_None);
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/util.pyx":92
+ * first = next(args, None)
+ * if first is None:
+ * return start # <<<<<<<<<<<<<<
+ * #
+ * # Check if the first term is linear, and if so return the terms
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_start);
+ __pyx_r = __pyx_v_start;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":91
+ * #
+ * first = next(args, None)
+ * if first is None: # <<<<<<<<<<<<<<
+ * return start
+ * #
+ */
+ }
+
+ /* "pyomo/core/util.pyx":96
+ * # Check if the first term is linear, and if so return the terms
+ * #
+ * linear, terms = decompose_term(first) # <<<<<<<<<<<<<<
+ * #
+ * # Right now Pyomo5 expressions can only handle single linear
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_decompose_term); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_first); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_first};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_first};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_first);
+ __Pyx_GIVEREF(__pyx_v_first);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_first);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+ PyObject* sequence = __pyx_t_2;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 96, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_6 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 2) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
+ __pyx_t_7 = NULL;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L7_unpacking_done;
+ __pyx_L6_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_7 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 96, __pyx_L1_error)
+ __pyx_L7_unpacking_done:;
+ }
+ __Pyx_DECREF_SET(__pyx_v_linear, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_v_terms = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":105
+ * # objects are created for the constant term.
+ * #
+ * if linear: # <<<<<<<<<<<<<<
+ * nvar=0
+ * for term in terms:
+ */
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_linear); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 105, __pyx_L1_error)
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/util.pyx":106
+ * #
+ * if linear:
+ * nvar=0 # <<<<<<<<<<<<<<
+ * for term in terms:
+ * c,v = term
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_v_nvar = __pyx_int_0;
+
+ /* "pyomo/core/util.pyx":107
+ * if linear:
+ * nvar=0
+ * for term in terms: # <<<<<<<<<<<<<<
+ * c,v = term
+ * if not v is None:
+ */
+ if (likely(PyList_CheckExact(__pyx_v_terms)) || PyTuple_CheckExact(__pyx_v_terms)) {
+ __pyx_t_2 = __pyx_v_terms; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
+ __pyx_t_9 = NULL;
+ } else {
+ __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_terms); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 107, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 107, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_9)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 107, __pyx_L1_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 107, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ } else {
+ if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 107, __pyx_L1_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_2, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 107, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ }
+ } else {
+ __pyx_t_6 = __pyx_t_9(__pyx_t_2);
+ if (unlikely(!__pyx_t_6)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 107, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_term, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":108
+ * nvar=0
+ * for term in terms:
+ * c,v = term # <<<<<<<<<<<<<<
+ * if not v is None:
+ * nvar += 1
+ */
+ if ((likely(PyTuple_CheckExact(__pyx_v_term))) || (PyList_CheckExact(__pyx_v_term))) {
+ PyObject* sequence = __pyx_v_term;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 108, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_1);
+ #else
+ __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_5 = PyObject_GetIter(__pyx_v_term); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 108, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = Py_TYPE(__pyx_t_5)->tp_iternext;
+ index = 0; __pyx_t_6 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_6)) goto __pyx_L11_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_6);
+ index = 1; __pyx_t_1 = __pyx_t_7(__pyx_t_5); if (unlikely(!__pyx_t_1)) goto __pyx_L11_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_7(__pyx_t_5), 2) < 0) __PYX_ERR(0, 108, __pyx_L1_error)
+ __pyx_t_7 = NULL;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L12_unpacking_done;
+ __pyx_L11_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_7 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 108, __pyx_L1_error)
+ __pyx_L12_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":109
+ * for term in terms:
+ * c,v = term
+ * if not v is None: # <<<<<<<<<<<<<<
+ * nvar += 1
+ * elif not c.__class__ in native_numeric_types:
+ */
+ __pyx_t_4 = (__pyx_v_v != Py_None);
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/util.pyx":110
+ * c,v = term
+ * if not v is None:
+ * nvar += 1 # <<<<<<<<<<<<<<
+ * elif not c.__class__ in native_numeric_types:
+ * linear = False
+ */
+ __pyx_t_1 = __Pyx_PyInt_AddObjC(__pyx_v_nvar, __pyx_int_1, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 110, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_nvar, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":109
+ * for term in terms:
+ * c,v = term
+ * if not v is None: # <<<<<<<<<<<<<<
+ * nvar += 1
+ * elif not c.__class__ in native_numeric_types:
+ */
+ goto __pyx_L13;
+ }
+
+ /* "pyomo/core/util.pyx":111
+ * if not v is None:
+ * nvar += 1
+ * elif not c.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * linear = False
+ * if nvar > 1:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_6, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 111, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/util.pyx":112
+ * nvar += 1
+ * elif not c.__class__ in native_numeric_types:
+ * linear = False # <<<<<<<<<<<<<<
+ * if nvar > 1:
+ * linear = False
+ */
+ __Pyx_INCREF(Py_False);
+ __Pyx_DECREF_SET(__pyx_v_linear, Py_False);
+
+ /* "pyomo/core/util.pyx":111
+ * if not v is None:
+ * nvar += 1
+ * elif not c.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * linear = False
+ * if nvar > 1:
+ */
+ }
+ __pyx_L13:;
+
+ /* "pyomo/core/util.pyx":107
+ * if linear:
+ * nvar=0
+ * for term in terms: # <<<<<<<<<<<<<<
+ * c,v = term
+ * if not v is None:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":113
+ * elif not c.__class__ in native_numeric_types:
+ * linear = False
+ * if nvar > 1: # <<<<<<<<<<<<<<
+ * linear = False
+ * start = start+first
+ */
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_nvar, __pyx_int_1, Py_GT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 113, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/util.pyx":114
+ * linear = False
+ * if nvar > 1:
+ * linear = False # <<<<<<<<<<<<<<
+ * start = start+first
+ * if linear:
+ */
+ __Pyx_INCREF(Py_False);
+ __Pyx_DECREF_SET(__pyx_v_linear, Py_False);
+
+ /* "pyomo/core/util.pyx":113
+ * elif not c.__class__ in native_numeric_types:
+ * linear = False
+ * if nvar > 1: # <<<<<<<<<<<<<<
+ * linear = False
+ * start = start+first
+ */
+ }
+
+ /* "pyomo/core/util.pyx":105
+ * # objects are created for the constant term.
+ * #
+ * if linear: # <<<<<<<<<<<<<<
+ * nvar=0
+ * for term in terms:
+ */
+ }
+
+ /* "pyomo/core/util.pyx":115
+ * if nvar > 1:
+ * linear = False
+ * start = start+first # <<<<<<<<<<<<<<
+ * if linear:
+ * with EXPR.linear_expression as e:
+ */
+ __pyx_t_2 = PyNumber_Add(__pyx_v_start, __pyx_v_first); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 115, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v_start, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":86
+ * #
+ * if start.__class__ in native_numeric_types:
+ * if linear is None: # <<<<<<<<<<<<<<
+ * #
+ * # Get the first term, which we will test for linearity
+ */
+ }
+
+ /* "pyomo/core/util.pyx":116
+ * linear = False
+ * start = start+first
+ * if linear: # <<<<<<<<<<<<<<
+ * with EXPR.linear_expression as e:
+ * e += start
+ */
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_linear); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 116, __pyx_L1_error)
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/util.pyx":117
+ * start = start+first
+ * if linear:
+ * with EXPR.linear_expression as e: # <<<<<<<<<<<<<<
+ * e += start
+ * for arg in args:
+ */
+ /*with:*/ {
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_linear_expression); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 117, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_10 = __Pyx_PyObject_LookupSpecial(__pyx_t_6, __pyx_n_s_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 117, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_6, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 117, __pyx_L16_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L16_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 117, __pyx_L16_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ /*try:*/ {
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
+ __Pyx_XGOTREF(__pyx_t_11);
+ __Pyx_XGOTREF(__pyx_t_12);
+ __Pyx_XGOTREF(__pyx_t_13);
+ /*try:*/ {
+ __pyx_v_e = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":118
+ * if linear:
+ * with EXPR.linear_expression as e:
+ * e += start # <<<<<<<<<<<<<<
+ * for arg in args:
+ * e += arg
+ */
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_e, __pyx_v_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 118, __pyx_L20_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":119
+ * with EXPR.linear_expression as e:
+ * e += start
+ * for arg in args: # <<<<<<<<<<<<<<
+ * e += arg
+ * # Return the constant term if the linear expression does not contains variables
+ */
+ if (likely(PyList_CheckExact(__pyx_v_args)) || PyTuple_CheckExact(__pyx_v_args)) {
+ __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
+ __pyx_t_9 = NULL;
+ } else {
+ __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 119, __pyx_L20_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 119, __pyx_L20_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_9)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 119, __pyx_L20_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 119, __pyx_L20_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ } else {
+ if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 119, __pyx_L20_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 119, __pyx_L20_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ }
+ } else {
+ __pyx_t_6 = __pyx_t_9(__pyx_t_1);
+ if (unlikely(!__pyx_t_6)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 119, __pyx_L20_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":120
+ * e += start
+ * for arg in args:
+ * e += arg # <<<<<<<<<<<<<<
+ * # Return the constant term if the linear expression does not contains variables
+ * if e.is_constant():
+ */
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_e, __pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L20_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":119
+ * with EXPR.linear_expression as e:
+ * e += start
+ * for arg in args: # <<<<<<<<<<<<<<
+ * e += arg
+ * # Return the constant term if the linear expression does not contains variables
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":117
+ * start = start+first
+ * if linear:
+ * with EXPR.linear_expression as e: # <<<<<<<<<<<<<<
+ * e += start
+ * for arg in args:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ goto __pyx_L25_try_end;
+ __pyx_L20_error:;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ /*except:*/ {
+ __Pyx_AddTraceback("pyomo.core.util.Sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_2) < 0) __PYX_ERR(0, 117, __pyx_L22_except_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 117, __pyx_L22_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 117, __pyx_L22_except_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ if (__pyx_t_4 < 0) __PYX_ERR(0, 117, __pyx_L22_except_error)
+ __pyx_t_3 = ((!(__pyx_t_4 != 0)) != 0);
+ if (__pyx_t_3) {
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_6, __pyx_t_2);
+ __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_2 = 0;
+ __PYX_ERR(0, 117, __pyx_L22_except_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L21_exception_handled;
+ }
+ __pyx_L22_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
+ goto __pyx_L1_error;
+ __pyx_L21_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
+ __pyx_L25_try_end:;
+ }
+ }
+ /*finally:*/ {
+ /*normal exit:*/{
+ if (__pyx_t_10) {
+ __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple_, NULL);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 117, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
+ goto __pyx_L19;
+ }
+ __pyx_L19:;
+ }
+ goto __pyx_L31;
+ __pyx_L16_error:;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ goto __pyx_L1_error;
+ __pyx_L31:;
+ }
+
+ /* "pyomo/core/util.pyx":122
+ * e += arg
+ * # Return the constant term if the linear expression does not contains variables
+ * if e.is_constant(): # <<<<<<<<<<<<<<
+ * return e.constant
+ * return e
+ */
+ if (unlikely(!__pyx_v_e)) { __Pyx_RaiseUnboundLocalError("e"); __PYX_ERR(0, 122, __pyx_L1_error) }
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 122, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 122, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/core/util.pyx":123
+ * # Return the constant term if the linear expression does not contains variables
+ * if e.is_constant():
+ * return e.constant # <<<<<<<<<<<<<<
+ * return e
+ * else:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ if (unlikely(!__pyx_v_e)) { __Pyx_RaiseUnboundLocalError("e"); __PYX_ERR(0, 123, __pyx_L1_error) }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":122
+ * e += arg
+ * # Return the constant term if the linear expression does not contains variables
+ * if e.is_constant(): # <<<<<<<<<<<<<<
+ * return e.constant
+ * return e
+ */
+ }
+
+ /* "pyomo/core/util.pyx":124
+ * if e.is_constant():
+ * return e.constant
+ * return e # <<<<<<<<<<<<<<
+ * else:
+ * with EXPR.nonlinear_expression as e:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ if (unlikely(!__pyx_v_e)) { __Pyx_RaiseUnboundLocalError("e"); __PYX_ERR(0, 124, __pyx_L1_error) }
+ __Pyx_INCREF(__pyx_v_e);
+ __pyx_r = __pyx_v_e;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":116
+ * linear = False
+ * start = start+first
+ * if linear: # <<<<<<<<<<<<<<
+ * with EXPR.linear_expression as e:
+ * e += start
+ */
+ }
+
+ /* "pyomo/core/util.pyx":126
+ * return e
+ * else:
+ * with EXPR.nonlinear_expression as e: # <<<<<<<<<<<<<<
+ * e += start
+ * for arg in args:
+ */
+ /*else*/ {
+ /*with:*/ {
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_nonlinear_expression); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_10 = __Pyx_PyObject_LookupSpecial(__pyx_t_6, __pyx_n_s_exit); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ __pyx_t_1 = __Pyx_PyObject_LookupSpecial(__pyx_t_6, __pyx_n_s_enter); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 126, __pyx_L33_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L33_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 126, __pyx_L33_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ /*try:*/ {
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_12, &__pyx_t_11);
+ __Pyx_XGOTREF(__pyx_t_13);
+ __Pyx_XGOTREF(__pyx_t_12);
+ __Pyx_XGOTREF(__pyx_t_11);
+ /*try:*/ {
+ __pyx_v_e = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":127
+ * else:
+ * with EXPR.nonlinear_expression as e:
+ * e += start # <<<<<<<<<<<<<<
+ * for arg in args:
+ * e += arg
+ */
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_e, __pyx_v_start); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L37_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":128
+ * with EXPR.nonlinear_expression as e:
+ * e += start
+ * for arg in args: # <<<<<<<<<<<<<<
+ * e += arg
+ * if e.nargs() == 0:
+ */
+ if (likely(PyList_CheckExact(__pyx_v_args)) || PyTuple_CheckExact(__pyx_v_args)) {
+ __pyx_t_1 = __pyx_v_args; __Pyx_INCREF(__pyx_t_1); __pyx_t_8 = 0;
+ __pyx_t_9 = NULL;
+ } else {
+ __pyx_t_8 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L37_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 128, __pyx_L37_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_9)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 128, __pyx_L37_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L37_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ } else {
+ if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_8); __Pyx_INCREF(__pyx_t_6); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 128, __pyx_L37_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_1, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L37_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ }
+ } else {
+ __pyx_t_6 = __pyx_t_9(__pyx_t_1);
+ if (unlikely(!__pyx_t_6)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 128, __pyx_L37_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":129
+ * e += start
+ * for arg in args:
+ * e += arg # <<<<<<<<<<<<<<
+ * if e.nargs() == 0:
+ * return 0
+ */
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_e, __pyx_v_arg); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 129, __pyx_L37_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":128
+ * with EXPR.nonlinear_expression as e:
+ * e += start
+ * for arg in args: # <<<<<<<<<<<<<<
+ * e += arg
+ * if e.nargs() == 0:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":126
+ * return e
+ * else:
+ * with EXPR.nonlinear_expression as e: # <<<<<<<<<<<<<<
+ * e += start
+ * for arg in args:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ goto __pyx_L42_try_end;
+ __pyx_L37_error:;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ /*except:*/ {
+ __Pyx_AddTraceback("pyomo.core.util.Sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_6, &__pyx_t_2) < 0) __PYX_ERR(0, 126, __pyx_L39_except_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = PyTuple_Pack(3, __pyx_t_1, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 126, __pyx_L39_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_t_5, NULL);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 126, __pyx_L39_except_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ if (__pyx_t_3 < 0) __PYX_ERR(0, 126, __pyx_L39_except_error)
+ __pyx_t_4 = ((!(__pyx_t_3 != 0)) != 0);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_ErrRestoreWithState(__pyx_t_1, __pyx_t_6, __pyx_t_2);
+ __pyx_t_1 = 0; __pyx_t_6 = 0; __pyx_t_2 = 0;
+ __PYX_ERR(0, 126, __pyx_L39_except_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L38_exception_handled;
+ }
+ __pyx_L39_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
+ goto __pyx_L1_error;
+ __pyx_L38_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_12, __pyx_t_11);
+ __pyx_L42_try_end:;
+ }
+ }
+ /*finally:*/ {
+ /*normal exit:*/{
+ if (__pyx_t_10) {
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_10, __pyx_tuple__2, NULL);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ goto __pyx_L36;
+ }
+ __pyx_L36:;
+ }
+ goto __pyx_L48;
+ __pyx_L33_error:;
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ goto __pyx_L1_error;
+ __pyx_L48:;
+ }
+
+ /* "pyomo/core/util.pyx":130
+ * for arg in args:
+ * e += arg
+ * if e.nargs() == 0: # <<<<<<<<<<<<<<
+ * return 0
+ * elif e.nargs() == 1:
+ */
+ if (unlikely(!__pyx_v_e)) { __Pyx_RaiseUnboundLocalError("e"); __PYX_ERR(0, 130, __pyx_L1_error) }
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_nargs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 130, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyInt_EqObjC(__pyx_t_2, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/util.pyx":131
+ * e += arg
+ * if e.nargs() == 0:
+ * return 0 # <<<<<<<<<<<<<<
+ * elif e.nargs() == 1:
+ * return e.arg(0)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":130
+ * for arg in args:
+ * e += arg
+ * if e.nargs() == 0: # <<<<<<<<<<<<<<
+ * return 0
+ * elif e.nargs() == 1:
+ */
+ }
+
+ /* "pyomo/core/util.pyx":132
+ * if e.nargs() == 0:
+ * return 0
+ * elif e.nargs() == 1: # <<<<<<<<<<<<<<
+ * return e.arg(0)
+ * return e
+ */
+ if (unlikely(!__pyx_v_e)) { __Pyx_RaiseUnboundLocalError("e"); __PYX_ERR(0, 132, __pyx_L1_error) }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_nargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 132, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/core/util.pyx":133
+ * return 0
+ * elif e.nargs() == 1:
+ * return e.arg(0) # <<<<<<<<<<<<<<
+ * return e
+ * #
+ */
+ __Pyx_XDECREF(__pyx_r);
+ if (unlikely(!__pyx_v_e)) { __Pyx_RaiseUnboundLocalError("e"); __PYX_ERR(0, 133, __pyx_L1_error) }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_e, __pyx_n_s_arg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 133, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":132
+ * if e.nargs() == 0:
+ * return 0
+ * elif e.nargs() == 1: # <<<<<<<<<<<<<<
+ * return e.arg(0)
+ * return e
+ */
+ }
+
+ /* "pyomo/core/util.pyx":134
+ * elif e.nargs() == 1:
+ * return e.arg(0)
+ * return e # <<<<<<<<<<<<<<
+ * #
+ * # Otherwise, use the context that is provided and return it.
+ */
+ __Pyx_XDECREF(__pyx_r);
+ if (unlikely(!__pyx_v_e)) { __Pyx_RaiseUnboundLocalError("e"); __PYX_ERR(0, 134, __pyx_L1_error) }
+ __Pyx_INCREF(__pyx_v_e);
+ __pyx_r = __pyx_v_e;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/util.pyx":85
+ * # return a static version to the user.
+ * #
+ * if start.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if linear is None:
+ * #
+ */
+ }
+
+ /* "pyomo/core/util.pyx":138
+ * # Otherwise, use the context that is provided and return it.
+ * #
+ * e = start # <<<<<<<<<<<<<<
+ * for arg in args:
+ * e += arg
+ */
+ __Pyx_INCREF(__pyx_v_start);
+ __pyx_v_e = __pyx_v_start;
+
+ /* "pyomo/core/util.pyx":139
+ * #
+ * e = start
+ * for arg in args: # <<<<<<<<<<<<<<
+ * e += arg
+ * return e
+ */
+ if (likely(PyList_CheckExact(__pyx_v_args)) || PyTuple_CheckExact(__pyx_v_args)) {
+ __pyx_t_6 = __pyx_v_args; __Pyx_INCREF(__pyx_t_6); __pyx_t_8 = 0;
+ __pyx_t_9 = NULL;
+ } else {
+ __pyx_t_8 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_v_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 139, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_9)) {
+ if (likely(PyList_CheckExact(__pyx_t_6))) {
+ if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 139, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_8); __Pyx_INCREF(__pyx_t_2); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 139, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 139, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_9(__pyx_t_6);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 139, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":140
+ * e = start
+ * for arg in args:
+ * e += arg # <<<<<<<<<<<<<<
+ * return e
+ *
+ */
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_e, __pyx_v_arg); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v_e, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":139
+ * #
+ * e = start
+ * for arg in args: # <<<<<<<<<<<<<<
+ * e += arg
+ * return e
+ */
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":141
+ * for arg in args:
+ * e += arg
+ * return e # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_e);
+ __pyx_r = __pyx_v_e;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":47
+ *
+ *
+ * def Sum(args, start=0, linear=None): # <<<<<<<<<<<<<<
+ * """
+ * A utility function to compute a sum of Pyomo expressions.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.util.Sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_first);
+ __Pyx_XDECREF(__pyx_v_terms);
+ __Pyx_XDECREF(__pyx_v_nvar);
+ __Pyx_XDECREF(__pyx_v_term);
+ __Pyx_XDECREF(__pyx_v_c);
+ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XDECREF(__pyx_v_e);
+ __Pyx_XDECREF(__pyx_v_arg);
+ __Pyx_XDECREF(__pyx_v_start);
+ __Pyx_XDECREF(__pyx_v_linear);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/util.pyx":144
+ *
+ *
+ * def summation(*args, **kwds): # <<<<<<<<<<<<<<
+ * """
+ * A utility function to compute a generalized dot product.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4util_5summation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4util_4summation[] = "\n A utility function to compute a generalized dot product. \n\n This function accepts one or more components that provide terms\n that are multiplied together. These products are added together\n to form a sum.\n\n Args:\n *args: Variable length argument list of generators that\n create terms in the summation.\n **kwds: Arbitrary keyword arguments.\n\n Keyword Args:\n index: A set that is used to index the components used to\n create the terms\n denom: A component or tuple of components that are used to\n create the denominator of the terms\n start: The initial value used in the sum\n\n Returns:\n The value of the sum.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4util_5summation = {"summation", (PyCFunction)__pyx_pw_5pyomo_4core_4util_5summation, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4util_4summation};
+static PyObject *__pyx_pw_5pyomo_4core_4util_5summation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_v_kwds = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("summation (wrapper)", 0);
+ if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "summation", 1))) return NULL;
+ __pyx_v_kwds = (__pyx_kwds) ? PyDict_Copy(__pyx_kwds) : PyDict_New(); if (unlikely(!__pyx_v_kwds)) return NULL;
+ __Pyx_GOTREF(__pyx_v_kwds);
+ __Pyx_INCREF(__pyx_args);
+ __pyx_v_args = __pyx_args;
+ __pyx_r = __pyx_pf_5pyomo_4core_4util_4summation(__pyx_self, __pyx_v_args, __pyx_v_kwds);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_XDECREF(__pyx_v_kwds);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4core_4util_9summation_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_5pyomo_4core_4util_9summation_7genexpr_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/core/util.pyx":238
+ * return expr
+ * #
+ * return Sum((prod(args[j][i] for j in num_index) for i in index), start) # <<<<<<<<<<<<<<
+ * elif nargs == 0:
+ * #
+ */
+
+static PyObject *__pyx_pf_5pyomo_4core_4util_9summation_7genexpr_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr *)__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_2_genexpr(__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 238, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4util_9summation_7genexpr_2generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_summation_locals_genexpr_locals, __pyx_n_s_pyomo_core_util); if (unlikely(!gen)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.util.summation.genexpr.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4util_9summation_7genexpr_2generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *(*__pyx_t_3)(PyObject *);
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 238, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_num_index)) { __Pyx_RaiseClosureNameError("num_index"); __PYX_ERR(0, 238, __pyx_L1_error) }
+ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_num_index)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_num_index)) {
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_num_index; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ __pyx_t_3 = NULL;
+ } else {
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_num_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_3)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 238, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 238, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_3(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 238, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_j);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_j, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); __PYX_ERR(0, 238, __pyx_L1_error) }
+ if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(0, 238, __pyx_L1_error)
+ }
+ __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_args, __pyx_cur_scope->__pyx_v_j); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_i)) { __Pyx_RaiseClosureNameError("i"); __PYX_ERR(0, 238, __pyx_L1_error) }
+ __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 238, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4util_9summation_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr *)__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_1_genexpr(__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 238, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4util_9summation_2generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_summation_locals_genexpr, __pyx_n_s_pyomo_core_util); if (unlikely(!gen)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.util.summation.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4util_9summation_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *(*__pyx_t_3)(PyObject *);
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 238, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_index)) { __Pyx_RaiseClosureNameError("index"); __PYX_ERR(0, 238, __pyx_L1_error) }
+ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_index)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_index)) {
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_index; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ __pyx_t_3 = NULL;
+ } else {
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_3)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 238, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 238, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_3(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 238, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_prod); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __pyx_pf_5pyomo_4core_4util_9summation_7genexpr_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 238, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4core_4util_9summation_5generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_5pyomo_4core_4util_9summation_7genexpr_5generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/core/util.pyx":244
+ * #
+ * denom_index = range(0,ndenom)
+ * return Sum((1/prod(denom[j][i] for j in denom_index) for i in index), start) # <<<<<<<<<<<<<<
+ * else:
+ * #
+ */
+
+static PyObject *__pyx_pf_5pyomo_4core_4util_9summation_7genexpr_3genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr *)__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_4_genexpr(__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_4_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 244, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4util_9summation_7genexpr_5generator3, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_summation_locals_genexpr_locals, __pyx_n_s_pyomo_core_util); if (unlikely(!gen)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.util.summation.genexpr.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4util_9summation_7genexpr_5generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *(*__pyx_t_3)(PyObject *);
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 244, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_denom_index)) { __Pyx_RaiseClosureNameError("denom_index"); __PYX_ERR(0, 244, __pyx_L1_error) }
+ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_denom_index)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_denom_index)) {
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_denom_index; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ __pyx_t_3 = NULL;
+ } else {
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_denom_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_3)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 244, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 244, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_3(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 244, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_j);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_j, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_denom)) { __Pyx_RaiseClosureNameError("denom"); __PYX_ERR(0, 244, __pyx_L1_error) }
+ __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_denom, __pyx_cur_scope->__pyx_v_j); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_i)) { __Pyx_RaiseClosureNameError("i"); __PYX_ERR(0, 244, __pyx_L1_error) }
+ __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 244, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4util_9summation_3genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr *)__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_3_genexpr(__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_3_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 244, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4util_9summation_5generator2, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_summation_locals_genexpr, __pyx_n_s_pyomo_core_util); if (unlikely(!gen)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.util.summation.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4util_9summation_5generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *(*__pyx_t_3)(PyObject *);
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 244, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_index)) { __Pyx_RaiseClosureNameError("index"); __PYX_ERR(0, 244, __pyx_L1_error) }
+ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_index)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_index)) {
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_index; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ __pyx_t_3 = NULL;
+ } else {
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_3)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 244, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 244, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_3(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 244, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_prod); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __pyx_pf_5pyomo_4core_4util_9summation_7genexpr_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyNumber_Divide(__pyx_int_1, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 244, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4core_4util_9summation_8generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+static PyObject *__pyx_gb_5pyomo_4core_4util_9summation_7genexpr_8generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/core/util.pyx":250
+ * #
+ * denom_index = range(0,ndenom)
+ * return Sum((prod(args[j][i] for j in num_index)/prod(denom[j][i] for j in denom_index) for i in index), start) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+
+static PyObject *__pyx_pf_5pyomo_4core_4util_9summation_7genexpr_6genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr *)__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_6_genexpr(__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_6_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 250, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4util_9summation_7genexpr_8generator5, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_summation_locals_genexpr_locals, __pyx_n_s_pyomo_core_util); if (unlikely(!gen)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.util.summation.genexpr.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4util_9summation_7genexpr_8generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *(*__pyx_t_3)(PyObject *);
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 250, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_num_index)) { __Pyx_RaiseClosureNameError("num_index"); __PYX_ERR(0, 250, __pyx_L1_error) }
+ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_num_index)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_num_index)) {
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_num_index; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ __pyx_t_3 = NULL;
+ } else {
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_num_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_3)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 250, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 250, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_3(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 250, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_j);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_j, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_args)) { __Pyx_RaiseClosureNameError("args"); __PYX_ERR(0, 250, __pyx_L1_error) }
+ if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_args == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(0, 250, __pyx_L1_error)
+ }
+ __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_args, __pyx_cur_scope->__pyx_v_j); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_i)) { __Pyx_RaiseClosureNameError("i"); __PYX_ERR(0, 250, __pyx_L1_error) }
+ __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 250, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4core_4util_9summation_7genexpr_11generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+static PyObject *__pyx_pf_5pyomo_4core_4util_9summation_7genexpr_9genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr *)__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_7_genexpr(__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_7_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 250, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4util_9summation_7genexpr_11generator6, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_summation_locals_genexpr_locals, __pyx_n_s_pyomo_core_util); if (unlikely(!gen)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.util.summation.genexpr.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4util_9summation_7genexpr_11generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *(*__pyx_t_3)(PyObject *);
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 250, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_denom_index)) { __Pyx_RaiseClosureNameError("denom_index"); __PYX_ERR(0, 250, __pyx_L1_error) }
+ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_denom_index)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_denom_index)) {
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_denom_index; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ __pyx_t_3 = NULL;
+ } else {
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_denom_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_3)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 250, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 250, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_3(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 250, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_j);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_j, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_denom)) { __Pyx_RaiseClosureNameError("denom"); __PYX_ERR(0, 250, __pyx_L1_error) }
+ __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_outer_scope->__pyx_v_denom, __pyx_cur_scope->__pyx_v_j); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_i)) { __Pyx_RaiseClosureNameError("i"); __PYX_ERR(0, 250, __pyx_L1_error) }
+ __pyx_t_5 = PyObject_GetItem(__pyx_t_4, __pyx_cur_scope->__pyx_outer_scope->__pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 250, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4util_9summation_6genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *)__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_5_genexpr(__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_5_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 250, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4core_4util_9summation_8generator4, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_summation_locals_genexpr, __pyx_n_s_pyomo_core_util); if (unlikely(!gen)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.core.util.summation.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4core_4util_9summation_8generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *(*__pyx_t_3)(PyObject *);
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 250, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_index)) { __Pyx_RaiseClosureNameError("index"); __PYX_ERR(0, 250, __pyx_L1_error) }
+ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_index)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_index)) {
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_index; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ __pyx_t_3 = NULL;
+ } else {
+ __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_3)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 250, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 250, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_3(__pyx_t_1);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 250, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_i);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_i, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_prod); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __pyx_pf_5pyomo_4core_4util_9summation_7genexpr_6genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_prod); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = __pyx_pf_5pyomo_4core_4util_9summation_7genexpr_9genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_6};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyNumber_Divide(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_3;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 250, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/util.pyx":144
+ *
+ *
+ * def summation(*args, **kwds): # <<<<<<<<<<<<<<
+ * """
+ * A utility function to compute a generalized dot product.
+ */
+
+static PyObject *__pyx_pf_5pyomo_4core_4util_4summation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwds) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *__pyx_cur_scope;
+ Py_ssize_t __pyx_v_nargs;
+ Py_ssize_t __pyx_v_ndenom;
+ PyObject *__pyx_v_iarg = NULL;
+ PyObject *__pyx_v_start = NULL;
+ PyObject *__pyx_v_vars_ = NULL;
+ PyObject *__pyx_v_params_ = NULL;
+ PyObject *__pyx_v_arg = NULL;
+ Py_ssize_t __pyx_v_nvars;
+ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_v_expr = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_v_p = NULL;
+ PyObject *__pyx_v_term = NULL;
+ PyObject *__pyx_v_j = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ int __pyx_t_8;
+ Py_ssize_t __pyx_t_9;
+ int __pyx_t_10;
+ int __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *(*__pyx_t_16)(PyObject *);
+ PyObject *__pyx_t_17 = NULL;
+ Py_ssize_t __pyx_t_18;
+ PyObject *(*__pyx_t_19)(PyObject *);
+ __Pyx_RefNannySetupContext("summation", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *)__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct__summation(__pyx_ptype_5pyomo_4core_4util___pyx_scope_struct__summation, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 144, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_v_args = __pyx_v_args;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_args);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_args);
+
+ /* "pyomo/core/util.pyx":167
+ * The value of the sum.
+ * """
+ * denom = kwds.pop('denom', tuple() ) # <<<<<<<<<<<<<<
+ * if type(denom) not in (list, tuple):
+ * denom = [denom]
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_kwds, __pyx_n_s_pop); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_denom, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_n_s_denom, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_INCREF(__pyx_n_s_denom);
+ __Pyx_GIVEREF(__pyx_n_s_denom);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_n_s_denom);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_v_denom = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":168
+ * """
+ * denom = kwds.pop('denom', tuple() )
+ * if type(denom) not in (list, tuple): # <<<<<<<<<<<<<<
+ * denom = [denom]
+ * nargs = len(args)
+ */
+ __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_cur_scope->__pyx_v_denom)));
+ __pyx_t_1 = ((PyObject *)Py_TYPE(__pyx_cur_scope->__pyx_v_denom));
+ __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)(&PyList_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+ } else {
+ __pyx_t_7 = __pyx_t_8;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = PyObject_RichCompare(((PyObject *)__pyx_t_1), ((PyObject *)(&PyTuple_Type)), Py_NE); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_7 = __pyx_t_8;
+ __pyx_L4_bool_binop_done:;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = (__pyx_t_7 != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/util.pyx":169
+ * denom = kwds.pop('denom', tuple() )
+ * if type(denom) not in (list, tuple):
+ * denom = [denom] # <<<<<<<<<<<<<<
+ * nargs = len(args)
+ * ndenom = len(denom)
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_denom);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_denom);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_cur_scope->__pyx_v_denom);
+ __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_denom);
+ __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_denom, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":168
+ * """
+ * denom = kwds.pop('denom', tuple() )
+ * if type(denom) not in (list, tuple): # <<<<<<<<<<<<<<
+ * denom = [denom]
+ * nargs = len(args)
+ */
+ }
+
+ /* "pyomo/core/util.pyx":170
+ * if type(denom) not in (list, tuple):
+ * denom = [denom]
+ * nargs = len(args) # <<<<<<<<<<<<<<
+ * ndenom = len(denom)
+ *
+ */
+ __pyx_t_1 = __pyx_cur_scope->__pyx_v_args;
+ __Pyx_INCREF(__pyx_t_1);
+ if (unlikely(__pyx_t_1 == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
+ __PYX_ERR(0, 170, __pyx_L1_error)
+ }
+ __pyx_t_9 = PyTuple_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_nargs = __pyx_t_9;
+
+ /* "pyomo/core/util.pyx":171
+ * denom = [denom]
+ * nargs = len(args)
+ * ndenom = len(denom) # <<<<<<<<<<<<<<
+ *
+ * if nargs == 0 and ndenom == 0:
+ */
+ __pyx_t_1 = __pyx_cur_scope->__pyx_v_denom;
+ __Pyx_INCREF(__pyx_t_1);
+ __pyx_t_9 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_ndenom = __pyx_t_9;
+
+ /* "pyomo/core/util.pyx":173
+ * ndenom = len(denom)
+ *
+ * if nargs == 0 and ndenom == 0: # <<<<<<<<<<<<<<
+ * raise ValueError("The summation() command requires at least an " + \
+ * "argument or a denominator term")
+ */
+ __pyx_t_7 = ((__pyx_v_nargs == 0) != 0);
+ if (__pyx_t_7) {
+ } else {
+ __pyx_t_8 = __pyx_t_7;
+ goto __pyx_L7_bool_binop_done;
+ }
+ __pyx_t_7 = ((__pyx_v_ndenom == 0) != 0);
+ __pyx_t_8 = __pyx_t_7;
+ __pyx_L7_bool_binop_done:;
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/util.pyx":174
+ *
+ * if nargs == 0 and ndenom == 0:
+ * raise ValueError("The summation() command requires at least an " + \ # <<<<<<<<<<<<<<
+ * "argument or a denominator term")
+ *
+ */
+ __pyx_t_1 = PyNumber_Add(__pyx_kp_s_The_summation_command_requires_a, __pyx_kp_s_argument_or_a_denominator_term); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 174, __pyx_L1_error)
+
+ /* "pyomo/core/util.pyx":173
+ * ndenom = len(denom)
+ *
+ * if nargs == 0 and ndenom == 0: # <<<<<<<<<<<<<<
+ * raise ValueError("The summation() command requires at least an " + \
+ * "argument or a denominator term")
+ */
+ }
+
+ /* "pyomo/core/util.pyx":177
+ * "argument or a denominator term")
+ *
+ * if 'index' in kwds: # <<<<<<<<<<<<<<
+ * index=kwds['index']
+ * else:
+ */
+ __pyx_t_8 = (__Pyx_PyDict_ContainsTF(__pyx_n_s_index, __pyx_v_kwds, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 177, __pyx_L1_error)
+ __pyx_t_7 = (__pyx_t_8 != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/util.pyx":178
+ *
+ * if 'index' in kwds:
+ * index=kwds['index'] # <<<<<<<<<<<<<<
+ * else:
+ * if nargs > 0:
+ */
+ __pyx_t_1 = __Pyx_PyDict_GetItem(__pyx_v_kwds, __pyx_n_s_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_v_index = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":177
+ * "argument or a denominator term")
+ *
+ * if 'index' in kwds: # <<<<<<<<<<<<<<
+ * index=kwds['index']
+ * else:
+ */
+ goto __pyx_L9;
+ }
+
+ /* "pyomo/core/util.pyx":180
+ * index=kwds['index']
+ * else:
+ * if nargs > 0: # <<<<<<<<<<<<<<
+ * iarg=args[-1]
+ * if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression):
+ */
+ /*else*/ {
+ __pyx_t_7 = ((__pyx_v_nargs > 0) != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/util.pyx":181
+ * else:
+ * if nargs > 0:
+ * iarg=args[-1] # <<<<<<<<<<<<<<
+ * if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression):
+ * raise ValueError("Error executing summation(): The last argument value must be a variable or expression object if no 'index' option is specified")
+ */
+ __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_cur_scope->__pyx_v_args, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 181, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_iarg = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":182
+ * if nargs > 0:
+ * iarg=args[-1]
+ * if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression): # <<<<<<<<<<<<<<
+ * raise ValueError("Error executing summation(): The last argument value must be a variable or expression object if no 'index' option is specified")
+ * else:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyomo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_var); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = PyObject_IsInstance(__pyx_v_iarg, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 182, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_10 = ((!(__pyx_t_8 != 0)) != 0);
+ if (__pyx_t_10) {
+ } else {
+ __pyx_t_7 = __pyx_t_10;
+ goto __pyx_L12_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyomo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 182, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Expression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 182, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_10 = PyObject_IsInstance(__pyx_v_iarg, __pyx_t_1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 182, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = ((!(__pyx_t_10 != 0)) != 0);
+ __pyx_t_7 = __pyx_t_8;
+ __pyx_L12_bool_binop_done:;
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/util.pyx":183
+ * iarg=args[-1]
+ * if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression):
+ * raise ValueError("Error executing summation(): The last argument value must be a variable or expression object if no 'index' option is specified") # <<<<<<<<<<<<<<
+ * else:
+ * iarg=denom[-1]
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 183, __pyx_L1_error)
+
+ /* "pyomo/core/util.pyx":182
+ * if nargs > 0:
+ * iarg=args[-1]
+ * if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression): # <<<<<<<<<<<<<<
+ * raise ValueError("Error executing summation(): The last argument value must be a variable or expression object if no 'index' option is specified")
+ * else:
+ */
+ }
+
+ /* "pyomo/core/util.pyx":180
+ * index=kwds['index']
+ * else:
+ * if nargs > 0: # <<<<<<<<<<<<<<
+ * iarg=args[-1]
+ * if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression):
+ */
+ goto __pyx_L10;
+ }
+
+ /* "pyomo/core/util.pyx":185
+ * raise ValueError("Error executing summation(): The last argument value must be a variable or expression object if no 'index' option is specified")
+ * else:
+ * iarg=denom[-1] # <<<<<<<<<<<<<<
+ * if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression):
+ * raise ValueError("Error executing summation(): The last denom argument value must be a variable or expression object if no 'index' option is specified")
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_denom, -1L, long, 1, __Pyx_PyInt_From_long, 0, 1, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 185, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_iarg = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":186
+ * else:
+ * iarg=denom[-1]
+ * if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression): # <<<<<<<<<<<<<<
+ * raise ValueError("Error executing summation(): The last denom argument value must be a variable or expression object if no 'index' option is specified")
+ * index = iarg.index_set()
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyomo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_var); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Var); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = PyObject_IsInstance(__pyx_v_iarg, __pyx_t_1); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 186, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_10 = ((!(__pyx_t_8 != 0)) != 0);
+ if (__pyx_t_10) {
+ } else {
+ __pyx_t_7 = __pyx_t_10;
+ goto __pyx_L15_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyomo); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_core); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_base); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_Expression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_10 = PyObject_IsInstance(__pyx_v_iarg, __pyx_t_1); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 186, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = ((!(__pyx_t_10 != 0)) != 0);
+ __pyx_t_7 = __pyx_t_8;
+ __pyx_L15_bool_binop_done:;
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/util.pyx":187
+ * iarg=denom[-1]
+ * if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression):
+ * raise ValueError("Error executing summation(): The last denom argument value must be a variable or expression object if no 'index' option is specified") # <<<<<<<<<<<<<<
+ * index = iarg.index_set()
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 187, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_Raise(__pyx_t_1, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __PYX_ERR(0, 187, __pyx_L1_error)
+
+ /* "pyomo/core/util.pyx":186
+ * else:
+ * iarg=denom[-1]
+ * if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression): # <<<<<<<<<<<<<<
+ * raise ValueError("Error executing summation(): The last denom argument value must be a variable or expression object if no 'index' option is specified")
+ * index = iarg.index_set()
+ */
+ }
+ }
+ __pyx_L10:;
+
+ /* "pyomo/core/util.pyx":188
+ * if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression):
+ * raise ValueError("Error executing summation(): The last denom argument value must be a variable or expression object if no 'index' option is specified")
+ * index = iarg.index_set() # <<<<<<<<<<<<<<
+ *
+ * start = kwds.get("start", 0)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_iarg, __pyx_n_s_index_set); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 188, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 188, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_v_index = __pyx_t_1;
+ __pyx_t_1 = 0;
+ }
+ __pyx_L9:;
+
+ /* "pyomo/core/util.pyx":190
+ * index = iarg.index_set()
+ *
+ * start = kwds.get("start", 0) # <<<<<<<<<<<<<<
+ * vars_ = []
+ * params_ = []
+ */
+ __pyx_t_1 = __Pyx_PyDict_GetItemDefault(__pyx_v_kwds, __pyx_n_s_start, __pyx_int_0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_start = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":191
+ *
+ * start = kwds.get("start", 0)
+ * vars_ = [] # <<<<<<<<<<<<<<
+ * params_ = []
+ * for arg in args:
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_vars_ = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":192
+ * start = kwds.get("start", 0)
+ * vars_ = []
+ * params_ = [] # <<<<<<<<<<<<<<
+ * for arg in args:
+ * if isinstance(arg, pyomo.core.base.var.Var):
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_params_ = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":193
+ * vars_ = []
+ * params_ = []
+ * for arg in args: # <<<<<<<<<<<<<<
+ * if isinstance(arg, pyomo.core.base.var.Var):
+ * vars_.append(arg)
+ */
+ __pyx_t_1 = __pyx_cur_scope->__pyx_v_args; __Pyx_INCREF(__pyx_t_1); __pyx_t_9 = 0;
+ for (;;) {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 193, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ __Pyx_XDECREF_SET(__pyx_v_arg, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":194
+ * params_ = []
+ * for arg in args:
+ * if isinstance(arg, pyomo.core.base.var.Var): # <<<<<<<<<<<<<<
+ * vars_.append(arg)
+ * else:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_pyomo); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_core); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_base); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_var); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Var); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 194, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_7 = PyObject_IsInstance(__pyx_v_arg, __pyx_t_2); if (unlikely(__pyx_t_7 == ((int)-1))) __PYX_ERR(0, 194, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = (__pyx_t_7 != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/util.pyx":195
+ * for arg in args:
+ * if isinstance(arg, pyomo.core.base.var.Var):
+ * vars_.append(arg) # <<<<<<<<<<<<<<
+ * else:
+ * params_.append(arg)
+ */
+ __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_vars_, __pyx_v_arg); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 195, __pyx_L1_error)
+
+ /* "pyomo/core/util.pyx":194
+ * params_ = []
+ * for arg in args:
+ * if isinstance(arg, pyomo.core.base.var.Var): # <<<<<<<<<<<<<<
+ * vars_.append(arg)
+ * else:
+ */
+ goto __pyx_L19;
+ }
+
+ /* "pyomo/core/util.pyx":197
+ * vars_.append(arg)
+ * else:
+ * params_.append(arg) # <<<<<<<<<<<<<<
+ * nvars = len(vars_)
+ *
+ */
+ /*else*/ {
+ __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_params_, __pyx_v_arg); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 197, __pyx_L1_error)
+ }
+ __pyx_L19:;
+
+ /* "pyomo/core/util.pyx":193
+ * vars_ = []
+ * params_ = []
+ * for arg in args: # <<<<<<<<<<<<<<
+ * if isinstance(arg, pyomo.core.base.var.Var):
+ * vars_.append(arg)
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":198
+ * else:
+ * params_.append(arg)
+ * nvars = len(vars_) # <<<<<<<<<<<<<<
+ *
+ * num_index = range(0,nargs)
+ */
+ __pyx_t_9 = PyList_GET_SIZE(__pyx_v_vars_); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 198, __pyx_L1_error)
+ __pyx_v_nvars = __pyx_t_9;
+
+ /* "pyomo/core/util.pyx":200
+ * nvars = len(vars_)
+ *
+ * num_index = range(0,nargs) # <<<<<<<<<<<<<<
+ * if ndenom == 0:
+ * #
+ */
+ __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_nargs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_v_num_index = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":201
+ *
+ * num_index = range(0,nargs)
+ * if ndenom == 0: # <<<<<<<<<<<<<<
+ * #
+ * # Sum of polynomial terms
+ */
+ __pyx_t_8 = ((__pyx_v_ndenom == 0) != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/util.pyx":205
+ * # Sum of polynomial terms
+ * #
+ * if start.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if nvars == 1:
+ * v = vars_[0]
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_start, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_7 = (__pyx_t_8 != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/util.pyx":206
+ * #
+ * if start.__class__ in native_numeric_types:
+ * if nvars == 1: # <<<<<<<<<<<<<<
+ * v = vars_[0]
+ * if len(params_) == 0:
+ */
+ __pyx_t_7 = ((__pyx_v_nvars == 1) != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/util.pyx":207
+ * if start.__class__ in native_numeric_types:
+ * if nvars == 1:
+ * v = vars_[0] # <<<<<<<<<<<<<<
+ * if len(params_) == 0:
+ * with EXPR.linear_expression as expr:
+ */
+ __pyx_t_2 = __Pyx_GetItemInt_List(__pyx_v_vars_, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_v_v = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":208
+ * if nvars == 1:
+ * v = vars_[0]
+ * if len(params_) == 0: # <<<<<<<<<<<<<<
+ * with EXPR.linear_expression as expr:
+ * expr += start
+ */
+ __pyx_t_9 = PyList_GET_SIZE(__pyx_v_params_); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 208, __pyx_L1_error)
+ __pyx_t_7 = ((__pyx_t_9 == 0) != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/util.pyx":209
+ * v = vars_[0]
+ * if len(params_) == 0:
+ * with EXPR.linear_expression as expr: # <<<<<<<<<<<<<<
+ * expr += start
+ * for i in index:
+ */
+ /*with:*/ {
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_linear_expression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 209, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 209, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 209, __pyx_L24_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L24_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 209, __pyx_L24_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ /*try:*/ {
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
+ __Pyx_XGOTREF(__pyx_t_13);
+ __Pyx_XGOTREF(__pyx_t_14);
+ __Pyx_XGOTREF(__pyx_t_15);
+ /*try:*/ {
+ __pyx_v_expr = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":210
+ * if len(params_) == 0:
+ * with EXPR.linear_expression as expr:
+ * expr += start # <<<<<<<<<<<<<<
+ * for i in index:
+ * expr += v[i]
+ */
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_v_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 210, __pyx_L28_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":211
+ * with EXPR.linear_expression as expr:
+ * expr += start
+ * for i in index: # <<<<<<<<<<<<<<
+ * expr += v[i]
+ * elif len(params_) == 1:
+ */
+ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_index)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_index)) {
+ __pyx_t_6 = __pyx_cur_scope->__pyx_v_index; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 211, __pyx_L28_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_16 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 211, __pyx_L28_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_6))) {
+ if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 211, __pyx_L28_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L28_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 211, __pyx_L28_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L28_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_16(__pyx_t_6);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 211, __pyx_L28_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":212
+ * expr += start
+ * for i in index:
+ * expr += v[i] # <<<<<<<<<<<<<<
+ * elif len(params_) == 1:
+ * p = params_[0]
+ */
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_v, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 212, __pyx_L28_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 212, __pyx_L28_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":211
+ * with EXPR.linear_expression as expr:
+ * expr += start
+ * for i in index: # <<<<<<<<<<<<<<
+ * expr += v[i]
+ * elif len(params_) == 1:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":209
+ * v = vars_[0]
+ * if len(params_) == 0:
+ * with EXPR.linear_expression as expr: # <<<<<<<<<<<<<<
+ * expr += start
+ * for i in index:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ goto __pyx_L33_try_end;
+ __pyx_L28_error:;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ /*except:*/ {
+ __Pyx_AddTraceback("pyomo.core.util.summation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_2, &__pyx_t_1) < 0) __PYX_ERR(0, 209, __pyx_L30_except_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyTuple_Pack(3, __pyx_t_6, __pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 209, __pyx_L30_except_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_3, NULL);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 209, __pyx_L30_except_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_17);
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ if (__pyx_t_7 < 0) __PYX_ERR(0, 209, __pyx_L30_except_error)
+ __pyx_t_8 = ((!(__pyx_t_7 != 0)) != 0);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_2, __pyx_t_1);
+ __pyx_t_6 = 0; __pyx_t_2 = 0; __pyx_t_1 = 0;
+ __PYX_ERR(0, 209, __pyx_L30_except_error)
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L29_exception_handled;
+ }
+ __pyx_L30_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
+ goto __pyx_L1_error;
+ __pyx_L29_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
+ __pyx_L33_try_end:;
+ }
+ }
+ /*finally:*/ {
+ /*normal exit:*/{
+ if (__pyx_t_12) {
+ __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__6, NULL);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 209, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ }
+ goto __pyx_L27;
+ }
+ __pyx_L27:;
+ }
+ goto __pyx_L39;
+ __pyx_L24_error:;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ goto __pyx_L1_error;
+ __pyx_L39:;
+ }
+
+ /* "pyomo/core/util.pyx":208
+ * if nvars == 1:
+ * v = vars_[0]
+ * if len(params_) == 0: # <<<<<<<<<<<<<<
+ * with EXPR.linear_expression as expr:
+ * expr += start
+ */
+ goto __pyx_L23;
+ }
+
+ /* "pyomo/core/util.pyx":213
+ * for i in index:
+ * expr += v[i]
+ * elif len(params_) == 1: # <<<<<<<<<<<<<<
+ * p = params_[0]
+ * with EXPR.linear_expression as expr:
+ */
+ __pyx_t_9 = PyList_GET_SIZE(__pyx_v_params_); if (unlikely(__pyx_t_9 == ((Py_ssize_t)-1))) __PYX_ERR(0, 213, __pyx_L1_error)
+ __pyx_t_8 = ((__pyx_t_9 == 1) != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/core/util.pyx":214
+ * expr += v[i]
+ * elif len(params_) == 1:
+ * p = params_[0] # <<<<<<<<<<<<<<
+ * with EXPR.linear_expression as expr:
+ * expr += start
+ */
+ __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_params_, 0, long, 1, __Pyx_PyInt_From_long, 1, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 214, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_p = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":215
+ * elif len(params_) == 1:
+ * p = params_[0]
+ * with EXPR.linear_expression as expr: # <<<<<<<<<<<<<<
+ * expr += start
+ * for i in index:
+ */
+ /*with:*/ {
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_linear_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_exit); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 215, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_2, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 215, __pyx_L40_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L40_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 215, __pyx_L40_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __pyx_t_1;
+ __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ /*try:*/ {
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
+ __Pyx_XGOTREF(__pyx_t_15);
+ __Pyx_XGOTREF(__pyx_t_14);
+ __Pyx_XGOTREF(__pyx_t_13);
+ /*try:*/ {
+ __pyx_v_expr = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":216
+ * p = params_[0]
+ * with EXPR.linear_expression as expr:
+ * expr += start # <<<<<<<<<<<<<<
+ * for i in index:
+ * expr += p[i]*v[i]
+ */
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_v_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 216, __pyx_L44_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":217
+ * with EXPR.linear_expression as expr:
+ * expr += start
+ * for i in index: # <<<<<<<<<<<<<<
+ * expr += p[i]*v[i]
+ * else:
+ */
+ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_index)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_index)) {
+ __pyx_t_6 = __pyx_cur_scope->__pyx_v_index; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 217, __pyx_L44_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_16 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 217, __pyx_L44_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_6))) {
+ if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 217, __pyx_L44_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L44_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_2); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 217, __pyx_L44_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 217, __pyx_L44_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_16(__pyx_t_6);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 217, __pyx_L44_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":218
+ * expr += start
+ * for i in index:
+ * expr += p[i]*v[i] # <<<<<<<<<<<<<<
+ * else:
+ * with EXPR.linear_expression as expr:
+ */
+ __pyx_t_2 = PyObject_GetItem(__pyx_v_p, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 218, __pyx_L44_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_v, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L44_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 218, __pyx_L44_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 218, __pyx_L44_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":217
+ * with EXPR.linear_expression as expr:
+ * expr += start
+ * for i in index: # <<<<<<<<<<<<<<
+ * expr += p[i]*v[i]
+ * else:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":215
+ * elif len(params_) == 1:
+ * p = params_[0]
+ * with EXPR.linear_expression as expr: # <<<<<<<<<<<<<<
+ * expr += start
+ * for i in index:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ goto __pyx_L49_try_end;
+ __pyx_L44_error:;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ /*except:*/ {
+ __Pyx_AddTraceback("pyomo.core.util.summation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 215, __pyx_L46_except_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyTuple_Pack(3, __pyx_t_6, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 215, __pyx_L46_except_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_2, NULL);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 215, __pyx_L46_except_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_17);
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ if (__pyx_t_8 < 0) __PYX_ERR(0, 215, __pyx_L46_except_error)
+ __pyx_t_7 = ((!(__pyx_t_8 != 0)) != 0);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_1, __pyx_t_3);
+ __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0;
+ __PYX_ERR(0, 215, __pyx_L46_except_error)
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L45_exception_handled;
+ }
+ __pyx_L46_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
+ goto __pyx_L1_error;
+ __pyx_L45_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
+ __pyx_L49_try_end:;
+ }
+ }
+ /*finally:*/ {
+ /*normal exit:*/{
+ if (__pyx_t_12) {
+ __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__7, NULL);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 215, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
+ goto __pyx_L43;
+ }
+ __pyx_L43:;
+ }
+ goto __pyx_L55;
+ __pyx_L40_error:;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ goto __pyx_L1_error;
+ __pyx_L55:;
+ }
+
+ /* "pyomo/core/util.pyx":213
+ * for i in index:
+ * expr += v[i]
+ * elif len(params_) == 1: # <<<<<<<<<<<<<<
+ * p = params_[0]
+ * with EXPR.linear_expression as expr:
+ */
+ goto __pyx_L23;
+ }
+
+ /* "pyomo/core/util.pyx":220
+ * expr += p[i]*v[i]
+ * else:
+ * with EXPR.linear_expression as expr: # <<<<<<<<<<<<<<
+ * expr += start
+ * for i in index:
+ */
+ /*else*/ {
+ /*with:*/ {
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_linear_expression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 220, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 220, __pyx_L56_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L56_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 220, __pyx_L56_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ /*try:*/ {
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_13, &__pyx_t_14, &__pyx_t_15);
+ __Pyx_XGOTREF(__pyx_t_13);
+ __Pyx_XGOTREF(__pyx_t_14);
+ __Pyx_XGOTREF(__pyx_t_15);
+ /*try:*/ {
+ __pyx_v_expr = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":221
+ * else:
+ * with EXPR.linear_expression as expr:
+ * expr += start # <<<<<<<<<<<<<<
+ * for i in index:
+ * term = 1
+ */
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_v_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 221, __pyx_L60_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":222
+ * with EXPR.linear_expression as expr:
+ * expr += start
+ * for i in index: # <<<<<<<<<<<<<<
+ * term = 1
+ * for j in params_:
+ */
+ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_index)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_index)) {
+ __pyx_t_6 = __pyx_cur_scope->__pyx_v_index; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 222, __pyx_L60_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_16 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 222, __pyx_L60_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_6))) {
+ if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 222, __pyx_L60_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L60_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 222, __pyx_L60_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 222, __pyx_L60_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_16(__pyx_t_6);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 222, __pyx_L60_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":223
+ * expr += start
+ * for i in index:
+ * term = 1 # <<<<<<<<<<<<<<
+ * for j in params_:
+ * term *= params_[j][i]
+ */
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_XDECREF_SET(__pyx_v_term, __pyx_int_1);
+
+ /* "pyomo/core/util.pyx":224
+ * for i in index:
+ * term = 1
+ * for j in params_: # <<<<<<<<<<<<<<
+ * term *= params_[j][i]
+ * expr += term * v[i]
+ */
+ __pyx_t_1 = __pyx_v_params_; __Pyx_INCREF(__pyx_t_1); __pyx_t_18 = 0;
+ for (;;) {
+ if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_3); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 224, __pyx_L60_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 224, __pyx_L60_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/util.pyx":225
+ * term = 1
+ * for j in params_:
+ * term *= params_[j][i] # <<<<<<<<<<<<<<
+ * expr += term * v[i]
+ * return expr
+ */
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_params_, __pyx_v_j); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L60_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L60_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_v_term, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 225, __pyx_L60_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_term, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/util.pyx":224
+ * for i in index:
+ * term = 1
+ * for j in params_: # <<<<<<<<<<<<<<
+ * term *= params_[j][i]
+ * expr += term * v[i]
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":226
+ * for j in params_:
+ * term *= params_[j][i]
+ * expr += term * v[i] # <<<<<<<<<<<<<<
+ * return expr
+ * #
+ */
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_v, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L60_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_v_term, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 226, __pyx_L60_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 226, __pyx_L60_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":222
+ * with EXPR.linear_expression as expr:
+ * expr += start
+ * for i in index: # <<<<<<<<<<<<<<
+ * term = 1
+ * for j in params_:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":220
+ * expr += p[i]*v[i]
+ * else:
+ * with EXPR.linear_expression as expr: # <<<<<<<<<<<<<<
+ * expr += start
+ * for i in index:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ goto __pyx_L65_try_end;
+ __pyx_L60_error:;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ /*except:*/ {
+ __Pyx_AddTraceback("pyomo.core.util.summation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 220, __pyx_L62_except_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyTuple_Pack(3, __pyx_t_6, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L62_except_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_2, NULL);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 220, __pyx_L62_except_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_17);
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ if (__pyx_t_7 < 0) __PYX_ERR(0, 220, __pyx_L62_except_error)
+ __pyx_t_8 = ((!(__pyx_t_7 != 0)) != 0);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_1, __pyx_t_3);
+ __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0;
+ __PYX_ERR(0, 220, __pyx_L62_except_error)
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L61_exception_handled;
+ }
+ __pyx_L62_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
+ goto __pyx_L1_error;
+ __pyx_L61_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_ExceptionReset(__pyx_t_13, __pyx_t_14, __pyx_t_15);
+ __pyx_L65_try_end:;
+ }
+ }
+ /*finally:*/ {
+ /*normal exit:*/{
+ if (__pyx_t_12) {
+ __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__8, NULL);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 220, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ }
+ goto __pyx_L59;
+ }
+ __pyx_L59:;
+ }
+ goto __pyx_L73;
+ __pyx_L56_error:;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ goto __pyx_L1_error;
+ __pyx_L73:;
+ }
+ }
+ __pyx_L23:;
+
+ /* "pyomo/core/util.pyx":227
+ * term *= params_[j][i]
+ * expr += term * v[i]
+ * return expr # <<<<<<<<<<<<<<
+ * #
+ * with EXPR.nonlinear_expression as expr:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ if (unlikely(!__pyx_v_expr)) { __Pyx_RaiseUnboundLocalError("expr"); __PYX_ERR(0, 227, __pyx_L1_error) }
+ __Pyx_INCREF(__pyx_v_expr);
+ __pyx_r = __pyx_v_expr;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":206
+ * #
+ * if start.__class__ in native_numeric_types:
+ * if nvars == 1: # <<<<<<<<<<<<<<
+ * v = vars_[0]
+ * if len(params_) == 0:
+ */
+ }
+
+ /* "pyomo/core/util.pyx":229
+ * return expr
+ * #
+ * with EXPR.nonlinear_expression as expr: # <<<<<<<<<<<<<<
+ * expr += start
+ * for i in index:
+ */
+ /*with:*/ {
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_nonlinear_expression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_12 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_6 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 229, __pyx_L74_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L74_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 229, __pyx_L74_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ /*try:*/ {
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_15, &__pyx_t_14, &__pyx_t_13);
+ __Pyx_XGOTREF(__pyx_t_15);
+ __Pyx_XGOTREF(__pyx_t_14);
+ __Pyx_XGOTREF(__pyx_t_13);
+ /*try:*/ {
+ __pyx_v_expr = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":230
+ * #
+ * with EXPR.nonlinear_expression as expr:
+ * expr += start # <<<<<<<<<<<<<<
+ * for i in index:
+ * term = 1
+ */
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_v_start); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 230, __pyx_L78_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":231
+ * with EXPR.nonlinear_expression as expr:
+ * expr += start
+ * for i in index: # <<<<<<<<<<<<<<
+ * term = 1
+ * for j in num_index:
+ */
+ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_index)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_index)) {
+ __pyx_t_6 = __pyx_cur_scope->__pyx_v_index; __Pyx_INCREF(__pyx_t_6); __pyx_t_9 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_9 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_index); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L78_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_16 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 231, __pyx_L78_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_6))) {
+ if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 231, __pyx_L78_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L78_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 231, __pyx_L78_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_6, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 231, __pyx_L78_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_16(__pyx_t_6);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 231, __pyx_L78_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":232
+ * expr += start
+ * for i in index:
+ * term = 1 # <<<<<<<<<<<<<<
+ * for j in num_index:
+ * term *= args[j][i]
+ */
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_XDECREF_SET(__pyx_v_term, __pyx_int_1);
+
+ /* "pyomo/core/util.pyx":233
+ * for i in index:
+ * term = 1
+ * for j in num_index: # <<<<<<<<<<<<<<
+ * term *= args[j][i]
+ * expr += term
+ */
+ if (likely(PyList_CheckExact(__pyx_cur_scope->__pyx_v_num_index)) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_v_num_index)) {
+ __pyx_t_1 = __pyx_cur_scope->__pyx_v_num_index; __Pyx_INCREF(__pyx_t_1); __pyx_t_18 = 0;
+ __pyx_t_19 = NULL;
+ } else {
+ __pyx_t_18 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_v_num_index); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 233, __pyx_L78_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_19 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_19)) __PYX_ERR(0, 233, __pyx_L78_error)
+ }
+ for (;;) {
+ if (likely(!__pyx_t_19)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_18 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_3); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 233, __pyx_L78_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L78_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_18 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_18); __Pyx_INCREF(__pyx_t_3); __pyx_t_18++; if (unlikely(0 < 0)) __PYX_ERR(0, 233, __pyx_L78_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_18); __pyx_t_18++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 233, __pyx_L78_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_19(__pyx_t_1);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 233, __pyx_L78_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_j, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/util.pyx":234
+ * term = 1
+ * for j in num_index:
+ * term *= args[j][i] # <<<<<<<<<<<<<<
+ * expr += term
+ * return expr
+ */
+ __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_args, __pyx_v_j); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L78_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 234, __pyx_L78_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_InPlaceMultiply(__pyx_v_term, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L78_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_term, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/util.pyx":233
+ * for i in index:
+ * term = 1
+ * for j in num_index: # <<<<<<<<<<<<<<
+ * term *= args[j][i]
+ * expr += term
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":235
+ * for j in num_index:
+ * term *= args[j][i]
+ * expr += term # <<<<<<<<<<<<<<
+ * return expr
+ * #
+ */
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_v_term); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 235, __pyx_L78_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":231
+ * with EXPR.nonlinear_expression as expr:
+ * expr += start
+ * for i in index: # <<<<<<<<<<<<<<
+ * term = 1
+ * for j in num_index:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/core/util.pyx":229
+ * return expr
+ * #
+ * with EXPR.nonlinear_expression as expr: # <<<<<<<<<<<<<<
+ * expr += start
+ * for i in index:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ goto __pyx_L83_try_end;
+ __pyx_L78_error:;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ /*except:*/ {
+ __Pyx_AddTraceback("pyomo.core.util.summation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_1, &__pyx_t_3) < 0) __PYX_ERR(0, 229, __pyx_L80_except_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyTuple_Pack(3, __pyx_t_6, __pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L80_except_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_17 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_2, NULL);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 229, __pyx_L80_except_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_17);
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ if (__pyx_t_8 < 0) __PYX_ERR(0, 229, __pyx_L80_except_error)
+ __pyx_t_7 = ((!(__pyx_t_8 != 0)) != 0);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ErrRestoreWithState(__pyx_t_6, __pyx_t_1, __pyx_t_3);
+ __pyx_t_6 = 0; __pyx_t_1 = 0; __pyx_t_3 = 0;
+ __PYX_ERR(0, 229, __pyx_L80_except_error)
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L79_exception_handled;
+ }
+ __pyx_L80_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
+ goto __pyx_L1_error;
+ __pyx_L79_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_15);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_ExceptionReset(__pyx_t_15, __pyx_t_14, __pyx_t_13);
+ __pyx_L83_try_end:;
+ }
+ }
+ /*finally:*/ {
+ /*normal exit:*/{
+ if (__pyx_t_12) {
+ __pyx_t_13 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_tuple__9, NULL);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ }
+ goto __pyx_L77;
+ }
+ __pyx_L77:;
+ }
+ goto __pyx_L91;
+ __pyx_L74_error:;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ goto __pyx_L1_error;
+ __pyx_L91:;
+ }
+
+ /* "pyomo/core/util.pyx":236
+ * term *= args[j][i]
+ * expr += term
+ * return expr # <<<<<<<<<<<<<<
+ * #
+ * return Sum((prod(args[j][i] for j in num_index) for i in index), start)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ if (unlikely(!__pyx_v_expr)) { __Pyx_RaiseUnboundLocalError("expr"); __PYX_ERR(0, 236, __pyx_L1_error) }
+ __Pyx_INCREF(__pyx_v_expr);
+ __pyx_r = __pyx_v_expr;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":205
+ * # Sum of polynomial terms
+ * #
+ * if start.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if nvars == 1:
+ * v = vars_[0]
+ */
+ }
+
+ /* "pyomo/core/util.pyx":238
+ * return expr
+ * #
+ * return Sum((prod(args[j][i] for j in num_index) for i in index), start) # <<<<<<<<<<<<<<
+ * elif nargs == 0:
+ * #
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __pyx_pf_5pyomo_4core_4util_9summation_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_6, __pyx_v_start};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_6, __pyx_v_start};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__pyx_t_2) {
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_5, __pyx_t_6);
+ __Pyx_INCREF(__pyx_v_start);
+ __Pyx_GIVEREF(__pyx_v_start);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_5, __pyx_v_start);
+ __pyx_t_6 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":201
+ *
+ * num_index = range(0,nargs)
+ * if ndenom == 0: # <<<<<<<<<<<<<<
+ * #
+ * # Sum of polynomial terms
+ */
+ }
+
+ /* "pyomo/core/util.pyx":239
+ * #
+ * return Sum((prod(args[j][i] for j in num_index) for i in index), start)
+ * elif nargs == 0: # <<<<<<<<<<<<<<
+ * #
+ * # Sum of reciprocals
+ */
+ __pyx_t_7 = ((__pyx_v_nargs == 0) != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/core/util.pyx":243
+ * # Sum of reciprocals
+ * #
+ * denom_index = range(0,ndenom) # <<<<<<<<<<<<<<
+ * return Sum((1/prod(denom[j][i] for j in denom_index) for i in index), start)
+ * else:
+ */
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_ndenom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 243, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_0);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_v_denom_index = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/util.pyx":244
+ * #
+ * denom_index = range(0,ndenom)
+ * return Sum((1/prod(denom[j][i] for j in denom_index) for i in index), start) # <<<<<<<<<<<<<<
+ * else:
+ * #
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __pyx_pf_5pyomo_4core_4util_9summation_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_v_start};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_4, __pyx_v_start};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_5, __pyx_t_4);
+ __Pyx_INCREF(__pyx_v_start);
+ __Pyx_GIVEREF(__pyx_v_start);
+ PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_5, __pyx_v_start);
+ __pyx_t_4 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":239
+ * #
+ * return Sum((prod(args[j][i] for j in num_index) for i in index), start)
+ * elif nargs == 0: # <<<<<<<<<<<<<<
+ * #
+ * # Sum of reciprocals
+ */
+ }
+
+ /* "pyomo/core/util.pyx":249
+ * # Sum of fractions
+ * #
+ * denom_index = range(0,ndenom) # <<<<<<<<<<<<<<
+ * return Sum((prod(args[j][i] for j in num_index)/prod(denom[j][i] for j in denom_index) for i in index), start)
+ *
+ */
+ /*else*/ {
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_v_ndenom); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_int_0);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_range, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 249, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_v_denom_index = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/core/util.pyx":250
+ * #
+ * denom_index = range(0,ndenom)
+ * return Sum((prod(args[j][i] for j in num_index)/prod(denom[j][i] for j in denom_index) for i in index), start) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_pf_5pyomo_4core_4util_9summation_6genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_start};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_2, __pyx_v_start};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_start);
+ __Pyx_GIVEREF(__pyx_v_start);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_v_start);
+ __pyx_t_2 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/core/util.pyx":144
+ *
+ *
+ * def summation(*args, **kwds): # <<<<<<<<<<<<<<
+ * """
+ * A utility function to compute a generalized dot product.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.core.util.summation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_iarg);
+ __Pyx_XDECREF(__pyx_v_start);
+ __Pyx_XDECREF(__pyx_v_vars_);
+ __Pyx_XDECREF(__pyx_v_params_);
+ __Pyx_XDECREF(__pyx_v_arg);
+ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XDECREF(__pyx_v_expr);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XDECREF(__pyx_v_p);
+ __Pyx_XDECREF(__pyx_v_term);
+ __Pyx_XDECREF(__pyx_v_j);
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/util.pyx":257
+ *
+ *
+ * def sequence(*args): # <<<<<<<<<<<<<<
+ * """
+ * sequence([start,] stop[, step]) -> generator for a list of integers
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4util_7sequence(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4core_4util_6sequence[] = "\n sequence([start,] stop[, step]) -> generator for a list of integers\n\n Return a generator that containing an arithmetic\n progression of integers. \n sequence(i, j) returns [i, i+1, i+2, ..., j]; \n start defaults to 1. \n step specifies the increment (or decrement)\n For example, sequence(4) returns [1, 2, 3, 4].\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4core_4util_7sequence = {"sequence", (PyCFunction)__pyx_pw_5pyomo_4core_4util_7sequence, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4core_4util_6sequence};
+static PyObject *__pyx_pw_5pyomo_4core_4util_7sequence(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("sequence (wrapper)", 0);
+ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "sequence", 0))) return NULL;
+ __Pyx_INCREF(__pyx_args);
+ __pyx_v_args = __pyx_args;
+ __pyx_r = __pyx_pf_5pyomo_4core_4util_6sequence(__pyx_self, __pyx_v_args);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4util_6sequence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ Py_ssize_t __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ __Pyx_RefNannySetupContext("sequence", 0);
+
+ /* "pyomo/core/util.pyx":268
+ * For example, sequence(4) returns [1, 2, 3, 4].
+ * """
+ * if len(args) == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('sequence expected at least 1 arguments, got 0')
+ * if len(args) > 3:
+ */
+ __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 268, __pyx_L1_error)
+ __pyx_t_2 = ((__pyx_t_1 == 0) != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/util.pyx":269
+ * """
+ * if len(args) == 0:
+ * raise ValueError('sequence expected at least 1 arguments, got 0') # <<<<<<<<<<<<<<
+ * if len(args) > 3:
+ * raise ValueError('sequence expected at most 3 arguments, got %d' % len(args))
+ */
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(0, 269, __pyx_L1_error)
+
+ /* "pyomo/core/util.pyx":268
+ * For example, sequence(4) returns [1, 2, 3, 4].
+ * """
+ * if len(args) == 0: # <<<<<<<<<<<<<<
+ * raise ValueError('sequence expected at least 1 arguments, got 0')
+ * if len(args) > 3:
+ */
+ }
+
+ /* "pyomo/core/util.pyx":270
+ * if len(args) == 0:
+ * raise ValueError('sequence expected at least 1 arguments, got 0')
+ * if len(args) > 3: # <<<<<<<<<<<<<<
+ * raise ValueError('sequence expected at most 3 arguments, got %d' % len(args))
+ * if len(args) == 1:
+ */
+ __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 270, __pyx_L1_error)
+ __pyx_t_2 = ((__pyx_t_1 > 3) != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/util.pyx":271
+ * raise ValueError('sequence expected at least 1 arguments, got 0')
+ * if len(args) > 3:
+ * raise ValueError('sequence expected at most 3 arguments, got %d' % len(args)) # <<<<<<<<<<<<<<
+ * if len(args) == 1:
+ * return xrange(1,args[0]+1)
+ */
+ __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 271, __pyx_L1_error)
+ __pyx_t_3 = PyInt_FromSsize_t(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_sequence_expected_at_most_3_argu, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(0, 271, __pyx_L1_error)
+
+ /* "pyomo/core/util.pyx":270
+ * if len(args) == 0:
+ * raise ValueError('sequence expected at least 1 arguments, got 0')
+ * if len(args) > 3: # <<<<<<<<<<<<<<
+ * raise ValueError('sequence expected at most 3 arguments, got %d' % len(args))
+ * if len(args) == 1:
+ */
+ }
+
+ /* "pyomo/core/util.pyx":272
+ * if len(args) > 3:
+ * raise ValueError('sequence expected at most 3 arguments, got %d' % len(args))
+ * if len(args) == 1: # <<<<<<<<<<<<<<
+ * return xrange(1,args[0]+1)
+ * if len(args) == 2:
+ */
+ __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 272, __pyx_L1_error)
+ __pyx_t_2 = ((__pyx_t_1 == 1) != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/util.pyx":273
+ * raise ValueError('sequence expected at most 3 arguments, got %d' % len(args))
+ * if len(args) == 1:
+ * return xrange(1,args[0]+1) # <<<<<<<<<<<<<<
+ * if len(args) == 2:
+ * return xrange(args[0],args[1]+1)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_xrange); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_int_1, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_int_1, __pyx_t_6};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_int_1);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 273, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":272
+ * if len(args) > 3:
+ * raise ValueError('sequence expected at most 3 arguments, got %d' % len(args))
+ * if len(args) == 1: # <<<<<<<<<<<<<<
+ * return xrange(1,args[0]+1)
+ * if len(args) == 2:
+ */
+ }
+
+ /* "pyomo/core/util.pyx":274
+ * if len(args) == 1:
+ * return xrange(1,args[0]+1)
+ * if len(args) == 2: # <<<<<<<<<<<<<<
+ * return xrange(args[0],args[1]+1)
+ * return xrange(args[0],args[1]+1,args[2])
+ */
+ __pyx_t_1 = PyTuple_GET_SIZE(__pyx_v_args); if (unlikely(__pyx_t_1 == ((Py_ssize_t)-1))) __PYX_ERR(0, 274, __pyx_L1_error)
+ __pyx_t_2 = ((__pyx_t_1 == 2) != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/core/util.pyx":275
+ * return xrange(1,args[0]+1)
+ * if len(args) == 2:
+ * return xrange(args[0],args[1]+1) # <<<<<<<<<<<<<<
+ * return xrange(args[0],args[1]+1,args[2])
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_xrange); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 275, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 275, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 275, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyInt_AddObjC(__pyx_t_6, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 275, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_8, __pyx_t_5};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_8, __pyx_t_5};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 275, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_t_5);
+ __pyx_t_8 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 275, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":274
+ * if len(args) == 1:
+ * return xrange(1,args[0]+1)
+ * if len(args) == 2: # <<<<<<<<<<<<<<
+ * return xrange(args[0],args[1]+1)
+ * return xrange(args[0],args[1]+1,args[2])
+ */
+ }
+
+ /* "pyomo/core/util.pyx":276
+ * if len(args) == 2:
+ * return xrange(args[0],args[1]+1)
+ * return xrange(args[0],args[1]+1,args[2]) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_xrange); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_8 = __Pyx_PyInt_AddObjC(__pyx_t_5, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v_args, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_9, __pyx_t_8, __pyx_t_5};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[4] = {__pyx_t_6, __pyx_t_9, __pyx_t_8, __pyx_t_5};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 3+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_7, __pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_7, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_7, __pyx_t_5);
+ __pyx_t_9 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_10, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 276, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":257
+ *
+ *
+ * def sequence(*args): # <<<<<<<<<<<<<<
+ * """
+ * sequence([start,] stop[, step]) -> generator for a list of integers
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_AddTraceback("pyomo.core.util.sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/core/util.pyx":279
+ *
+ *
+ * def xsequence(*args): # <<<<<<<<<<<<<<
+ * from pyomo.util.deprecation import deprecation_warning
+ * deprecation_warning("The xsequence function is deprecated. Use the sequence() function, which returns a generator.") # Remove in Pyomo 6.0
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4core_4util_9xsequence(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4core_4util_9xsequence = {"xsequence", (PyCFunction)__pyx_pw_5pyomo_4core_4util_9xsequence, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4core_4util_9xsequence(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("xsequence (wrapper)", 0);
+ if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "xsequence", 0))) return NULL;
+ __Pyx_INCREF(__pyx_args);
+ __pyx_v_args = __pyx_args;
+ __pyx_r = __pyx_pf_5pyomo_4core_4util_8xsequence(__pyx_self, __pyx_v_args);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4core_4util_8xsequence(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_args) {
+ PyObject *__pyx_v_deprecation_warning = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannySetupContext("xsequence", 0);
+
+ /* "pyomo/core/util.pyx":280
+ *
+ * def xsequence(*args):
+ * from pyomo.util.deprecation import deprecation_warning # <<<<<<<<<<<<<<
+ * deprecation_warning("The xsequence function is deprecated. Use the sequence() function, which returns a generator.") # Remove in Pyomo 6.0
+ * return sequence(*args)
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_deprecation_warning);
+ __Pyx_GIVEREF(__pyx_n_s_deprecation_warning);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_deprecation_warning);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_util_deprecation, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_deprecation_warning); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_1);
+ __pyx_v_deprecation_warning = __pyx_t_1;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":281
+ * def xsequence(*args):
+ * from pyomo.util.deprecation import deprecation_warning
+ * deprecation_warning("The xsequence function is deprecated. Use the sequence() function, which returns a generator.") # Remove in Pyomo 6.0 # <<<<<<<<<<<<<<
+ * return sequence(*args)
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_deprecation_warning, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 281, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":282
+ * from pyomo.util.deprecation import deprecation_warning
+ * deprecation_warning("The xsequence function is deprecated. Use the sequence() function, which returns a generator.") # Remove in Pyomo 6.0
+ * return sequence(*args) # <<<<<<<<<<<<<<
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_sequence); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_v_args, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 282, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/core/util.pyx":279
+ *
+ *
+ * def xsequence(*args): # <<<<<<<<<<<<<<
+ * from pyomo.util.deprecation import deprecation_warning
+ * deprecation_warning("The xsequence function is deprecated. Use the sequence() function, which returns a generator.") # Remove in Pyomo 6.0
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.core.util.xsequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_deprecation_warning);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct__summation[8];
+static int __pyx_freecount_5pyomo_4core_4util___pyx_scope_struct__summation = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct__summation(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct__summation > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct__summation[--__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct__summation];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct__summation(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_args);
+ Py_CLEAR(p->__pyx_v_denom);
+ Py_CLEAR(p->__pyx_v_denom_index);
+ Py_CLEAR(p->__pyx_v_index);
+ Py_CLEAR(p->__pyx_v_num_index);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct__summation < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation)))) {
+ __pyx_freelist_5pyomo_4core_4util___pyx_scope_struct__summation[__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct__summation++] = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct__summation(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *)o;
+ if (p->__pyx_v_args) {
+ e = (*v)(p->__pyx_v_args, a); if (e) return e;
+ }
+ if (p->__pyx_v_denom) {
+ e = (*v)(p->__pyx_v_denom, a); if (e) return e;
+ }
+ if (p->__pyx_v_denom_index) {
+ e = (*v)(p->__pyx_v_denom_index, a); if (e) return e;
+ }
+ if (p->__pyx_v_index) {
+ e = (*v)(p->__pyx_v_index, a); if (e) return e;
+ }
+ if (p->__pyx_v_num_index) {
+ e = (*v)(p->__pyx_v_num_index, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_5pyomo_4core_4util___pyx_scope_struct__summation(PyObject *o) {
+ PyObject* tmp;
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation *)o;
+ tmp = ((PyObject*)p->__pyx_v_args);
+ p->__pyx_v_args = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_denom);
+ p->__pyx_v_denom = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_denom_index);
+ p->__pyx_v_denom_index = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_index);
+ p->__pyx_v_index = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_num_index);
+ p->__pyx_v_num_index = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4util___pyx_scope_struct__summation = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.util.__pyx_scope_struct__summation", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct__summation), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct__summation, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct__summation, /*tp_traverse*/
+ __pyx_tp_clear_5pyomo_4core_4util___pyx_scope_struct__summation, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct__summation, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr *__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_1_genexpr[8];
+static int __pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_1_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_1_genexpr[--__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_1_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct_1_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_genexpr);
+ Py_CLEAR(p->__pyx_v_i);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr)))) {
+ __pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_1_genexpr[__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_genexpr) {
+ e = (*v)(p->__pyx_v_genexpr, a); if (e) return e;
+ }
+ if (p->__pyx_v_i) {
+ e = (*v)(p->__pyx_v_i, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4util___pyx_scope_struct_1_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.util.__pyx_scope_struct_1_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct_1_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_1_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr *__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_2_genexpr[8];
+static int __pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_2_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_2_genexpr[--__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_2_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct_2_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_j);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr)))) {
+ __pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_2_genexpr[__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_j) {
+ e = (*v)(p->__pyx_v_j, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4util___pyx_scope_struct_2_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.util.__pyx_scope_struct_2_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_2_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct_2_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct_2_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_2_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr *__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_3_genexpr[8];
+static int __pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_3_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_3_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_3_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_3_genexpr[--__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_3_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct_3_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_genexpr);
+ Py_CLEAR(p->__pyx_v_i);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_3_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr)))) {
+ __pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_3_genexpr[__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_3_genexpr++] = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct_3_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_genexpr) {
+ e = (*v)(p->__pyx_v_genexpr, a); if (e) return e;
+ }
+ if (p->__pyx_v_i) {
+ e = (*v)(p->__pyx_v_i, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4util___pyx_scope_struct_3_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.util.__pyx_scope_struct_3_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_3_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct_3_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct_3_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_3_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr *__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_4_genexpr[8];
+static int __pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_4_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_4_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_4_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_4_genexpr[--__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_4_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct_4_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_j);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_4_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr)))) {
+ __pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_4_genexpr[__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_4_genexpr++] = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct_4_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_j) {
+ e = (*v)(p->__pyx_v_j, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4util___pyx_scope_struct_4_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.util.__pyx_scope_struct_4_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_4_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct_4_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct_4_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_4_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_5_genexpr[8];
+static int __pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_5_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_5_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_5_genexpr[--__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_5_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct_5_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_genexpr);
+ Py_CLEAR(p->__pyx_v_i);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_5_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr)))) {
+ __pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_5_genexpr[__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_genexpr) {
+ e = (*v)(p->__pyx_v_genexpr, a); if (e) return e;
+ }
+ if (p->__pyx_v_i) {
+ e = (*v)(p->__pyx_v_i, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4util___pyx_scope_struct_5_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.util.__pyx_scope_struct_5_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_5_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct_5_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct_5_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_5_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr *__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_6_genexpr[8];
+static int __pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_6_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_6_genexpr[--__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_6_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct_6_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_j);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr)))) {
+ __pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_6_genexpr[__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_j) {
+ e = (*v)(p->__pyx_v_j, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4util___pyx_scope_struct_6_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.util.__pyx_scope_struct_6_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_6_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct_6_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct_6_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_6_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr *__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_7_genexpr[8];
+static int __pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_7_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_7_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_7_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_7_genexpr[--__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_7_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct_7_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_j);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_7_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr)))) {
+ __pyx_freelist_5pyomo_4core_4util___pyx_scope_struct_7_genexpr[__pyx_freecount_5pyomo_4core_4util___pyx_scope_struct_7_genexpr++] = ((struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct_7_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_j) {
+ e = (*v)(p->__pyx_v_j, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4core_4util___pyx_scope_struct_7_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.core.util.__pyx_scope_struct_7_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4core_4util___pyx_scope_struct_7_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4core_4util___pyx_scope_struct_7_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4core_4util___pyx_scope_struct_7_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4core_4util___pyx_scope_struct_7_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static PyMethodDef __pyx_methods[] = {
+ {0, 0, 0, 0}
+};
+
+#if PY_MAJOR_VERSION >= 3
+#if CYTHON_PEP489_MULTI_PHASE_INIT
+static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
+static int __pyx_pymod_exec_util(PyObject* module); /*proto*/
+static PyModuleDef_Slot __pyx_moduledef_slots[] = {
+ {Py_mod_create, (void*)__pyx_pymod_create},
+ {Py_mod_exec, (void*)__pyx_pymod_exec_util},
+ {0, NULL}
+};
+#endif
+
+static struct PyModuleDef __pyx_moduledef = {
+ PyModuleDef_HEAD_INIT,
+ "util",
+ 0, /* m_doc */
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ 0, /* m_size */
+ #else
+ -1, /* m_size */
+ #endif
+ __pyx_methods /* m_methods */,
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ __pyx_moduledef_slots, /* m_slots */
+ #else
+ NULL, /* m_reload */
+ #endif
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL /* m_free */
+};
+#endif
+
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+ {&__pyx_n_s_EXPR, __pyx_k_EXPR, sizeof(__pyx_k_EXPR), 0, 0, 1, 1},
+ {&__pyx_kp_s_Error_executing_summation_The_la, __pyx_k_Error_executing_summation_The_la, sizeof(__pyx_k_Error_executing_summation_The_la), 0, 0, 1, 0},
+ {&__pyx_kp_s_Error_executing_summation_The_la_2, __pyx_k_Error_executing_summation_The_la_2, sizeof(__pyx_k_Error_executing_summation_The_la_2), 0, 0, 1, 0},
+ {&__pyx_n_s_Expression, __pyx_k_Expression, sizeof(__pyx_k_Expression), 0, 0, 1, 1},
+ {&__pyx_n_s_Prod, __pyx_k_Prod, sizeof(__pyx_k_Prod), 0, 0, 1, 1},
+ {&__pyx_n_s_Sum, __pyx_k_Sum, sizeof(__pyx_k_Sum), 0, 0, 1, 1},
+ {&__pyx_kp_s_The_summation_command_requires_a, __pyx_k_The_summation_command_requires_a, sizeof(__pyx_k_The_summation_command_requires_a), 0, 0, 1, 0},
+ {&__pyx_kp_s_The_xsequence_function_is_deprec, __pyx_k_The_xsequence_function_is_deprec, sizeof(__pyx_k_The_xsequence_function_is_deprec), 0, 0, 1, 0},
+ {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+ {&__pyx_n_s_Var, __pyx_k_Var, sizeof(__pyx_k_Var), 0, 0, 1, 1},
+ {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
+ {&__pyx_n_s_ans, __pyx_k_ans, sizeof(__pyx_k_ans), 0, 0, 1, 1},
+ {&__pyx_n_s_arg, __pyx_k_arg, sizeof(__pyx_k_arg), 0, 0, 1, 1},
+ {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
+ {&__pyx_kp_s_argument_or_a_denominator_term, __pyx_k_argument_or_a_denominator_term, sizeof(__pyx_k_argument_or_a_denominator_term), 0, 0, 1, 0},
+ {&__pyx_n_s_base, __pyx_k_base, sizeof(__pyx_k_base), 0, 0, 1, 1},
+ {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
+ {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
+ {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
+ {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
+ {&__pyx_n_s_constant, __pyx_k_constant, sizeof(__pyx_k_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_core, __pyx_k_core, sizeof(__pyx_k_core), 0, 0, 1, 1},
+ {&__pyx_n_s_decompose_term, __pyx_k_decompose_term, sizeof(__pyx_k_decompose_term), 0, 0, 1, 1},
+ {&__pyx_n_s_denom, __pyx_k_denom, sizeof(__pyx_k_denom), 0, 0, 1, 1},
+ {&__pyx_n_s_denom_index, __pyx_k_denom_index, sizeof(__pyx_k_denom_index), 0, 0, 1, 1},
+ {&__pyx_n_s_deprecation_warning, __pyx_k_deprecation_warning, sizeof(__pyx_k_deprecation_warning), 0, 0, 1, 1},
+ {&__pyx_n_s_dot_product, __pyx_k_dot_product, sizeof(__pyx_k_dot_product), 0, 0, 1, 1},
+ {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
+ {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
+ {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
+ {&__pyx_n_s_expr, __pyx_k_expr, sizeof(__pyx_k_expr), 0, 0, 1, 1},
+ {&__pyx_n_s_expression, __pyx_k_expression, sizeof(__pyx_k_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_first, __pyx_k_first, sizeof(__pyx_k_first), 0, 0, 1, 1},
+ {&__pyx_n_s_functools, __pyx_k_functools, sizeof(__pyx_k_functools), 0, 0, 1, 1},
+ {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
+ {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
+ {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
+ {&__pyx_n_s_iarg, __pyx_k_iarg, sizeof(__pyx_k_iarg), 0, 0, 1, 1},
+ {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+ {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
+ {&__pyx_n_s_index_set, __pyx_k_index_set, sizeof(__pyx_k_index_set), 0, 0, 1, 1},
+ {&__pyx_n_s_is_constant, __pyx_k_is_constant, sizeof(__pyx_k_is_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_j, __pyx_k_j, sizeof(__pyx_k_j), 0, 0, 1, 1},
+ {&__pyx_n_s_kwds, __pyx_k_kwds, sizeof(__pyx_k_kwds), 0, 0, 1, 1},
+ {&__pyx_n_s_linear, __pyx_k_linear, sizeof(__pyx_k_linear), 0, 0, 1, 1},
+ {&__pyx_n_s_linear_expression, __pyx_k_linear_expression, sizeof(__pyx_k_linear_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+ {&__pyx_n_s_nargs, __pyx_k_nargs, sizeof(__pyx_k_nargs), 0, 0, 1, 1},
+ {&__pyx_n_s_native_numeric_types, __pyx_k_native_numeric_types, sizeof(__pyx_k_native_numeric_types), 0, 0, 1, 1},
+ {&__pyx_n_s_ndenom, __pyx_k_ndenom, sizeof(__pyx_k_ndenom), 0, 0, 1, 1},
+ {&__pyx_n_s_nonlinear_expression, __pyx_k_nonlinear_expression, sizeof(__pyx_k_nonlinear_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_num_index, __pyx_k_num_index, sizeof(__pyx_k_num_index), 0, 0, 1, 1},
+ {&__pyx_n_s_nvar, __pyx_k_nvar, sizeof(__pyx_k_nvar), 0, 0, 1, 1},
+ {&__pyx_n_s_nvars, __pyx_k_nvars, sizeof(__pyx_k_nvars), 0, 0, 1, 1},
+ {&__pyx_n_s_operator, __pyx_k_operator, sizeof(__pyx_k_operator), 0, 0, 1, 1},
+ {&__pyx_n_s_p, __pyx_k_p, sizeof(__pyx_k_p), 0, 0, 1, 1},
+ {&__pyx_n_s_params, __pyx_k_params, sizeof(__pyx_k_params), 0, 0, 1, 1},
+ {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
+ {&__pyx_n_s_prod, __pyx_k_prod, sizeof(__pyx_k_prod), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo, __pyx_k_pyomo, sizeof(__pyx_k_pyomo), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core, __pyx_k_pyomo_core, sizeof(__pyx_k_pyomo_core), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_base_var, __pyx_k_pyomo_core_base_var, sizeof(__pyx_k_pyomo_core_base_var), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_k_pyomo_core_expr_expr_pyomo5, sizeof(__pyx_k_pyomo_core_expr_expr_pyomo5), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_expr_numvalue, __pyx_k_pyomo_core_expr_numvalue, sizeof(__pyx_k_pyomo_core_expr_numvalue), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_util, __pyx_k_pyomo_core_util, sizeof(__pyx_k_pyomo_core_util), 0, 0, 1, 1},
+ {&__pyx_kp_s_pyomo_core_util_pyx, __pyx_k_pyomo_core_util_pyx, sizeof(__pyx_k_pyomo_core_util_pyx), 0, 0, 1, 0},
+ {&__pyx_n_s_pyomo_util_deprecation, __pyx_k_pyomo_util_deprecation, sizeof(__pyx_k_pyomo_util_deprecation), 0, 0, 1, 1},
+ {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
+ {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
+ {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
+ {&__pyx_n_s_sequence, __pyx_k_sequence, sizeof(__pyx_k_sequence), 0, 0, 1, 1},
+ {&__pyx_kp_s_sequence_expected_at_least_1_arg, __pyx_k_sequence_expected_at_least_1_arg, sizeof(__pyx_k_sequence_expected_at_least_1_arg), 0, 0, 1, 0},
+ {&__pyx_kp_s_sequence_expected_at_most_3_argu, __pyx_k_sequence_expected_at_most_3_argu, sizeof(__pyx_k_sequence_expected_at_most_3_argu), 0, 0, 1, 0},
+ {&__pyx_n_s_six_moves, __pyx_k_six_moves, sizeof(__pyx_k_six_moves), 0, 0, 1, 1},
+ {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
+ {&__pyx_n_s_summation, __pyx_k_summation, sizeof(__pyx_k_summation), 0, 0, 1, 1},
+ {&__pyx_n_s_summation_locals_genexpr, __pyx_k_summation_locals_genexpr, sizeof(__pyx_k_summation_locals_genexpr), 0, 0, 1, 1},
+ {&__pyx_n_s_summation_locals_genexpr_locals, __pyx_k_summation_locals_genexpr_locals, sizeof(__pyx_k_summation_locals_genexpr_locals), 0, 0, 1, 1},
+ {&__pyx_n_s_term, __pyx_k_term, sizeof(__pyx_k_term), 0, 0, 1, 1},
+ {&__pyx_n_s_terms, __pyx_k_terms, sizeof(__pyx_k_terms), 0, 0, 1, 1},
+ {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+ {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
+ {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
+ {&__pyx_n_s_var, __pyx_k_var, sizeof(__pyx_k_var), 0, 0, 1, 1},
+ {&__pyx_n_s_vars, __pyx_k_vars, sizeof(__pyx_k_vars), 0, 0, 1, 1},
+ {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
+ {&__pyx_n_s_xsequence, __pyx_k_xsequence, sizeof(__pyx_k_xsequence), 0, 0, 1, 1},
+ {0, 0, 0, 0, 0, 0, 0}
+};
+static int __Pyx_InitCachedBuiltins(void) {
+ __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 174, __pyx_L1_error)
+ __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) __PYX_ERR(0, 200, __pyx_L1_error)
+ return 0;
+ __pyx_L1_error:;
+ return -1;
+}
+
+static int __Pyx_InitCachedConstants(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+
+ /* "pyomo/core/util.pyx":117
+ * start = start+first
+ * if linear:
+ * with EXPR.linear_expression as e: # <<<<<<<<<<<<<<
+ * e += start
+ * for arg in args:
+ */
+ __pyx_tuple_ = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple_)) __PYX_ERR(0, 117, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple_);
+ __Pyx_GIVEREF(__pyx_tuple_);
+
+ /* "pyomo/core/util.pyx":126
+ * return e
+ * else:
+ * with EXPR.nonlinear_expression as e: # <<<<<<<<<<<<<<
+ * e += start
+ * for arg in args:
+ */
+ __pyx_tuple__2 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 126, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__2);
+ __Pyx_GIVEREF(__pyx_tuple__2);
+
+ /* "pyomo/core/util.pyx":133
+ * return 0
+ * elif e.nargs() == 1:
+ * return e.arg(0) # <<<<<<<<<<<<<<
+ * return e
+ * #
+ */
+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_int_0); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 133, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__3);
+ __Pyx_GIVEREF(__pyx_tuple__3);
+
+ /* "pyomo/core/util.pyx":183
+ * iarg=args[-1]
+ * if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression):
+ * raise ValueError("Error executing summation(): The last argument value must be a variable or expression object if no 'index' option is specified") # <<<<<<<<<<<<<<
+ * else:
+ * iarg=denom[-1]
+ */
+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_Error_executing_summation_The_la); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__4);
+ __Pyx_GIVEREF(__pyx_tuple__4);
+
+ /* "pyomo/core/util.pyx":187
+ * iarg=denom[-1]
+ * if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression):
+ * raise ValueError("Error executing summation(): The last denom argument value must be a variable or expression object if no 'index' option is specified") # <<<<<<<<<<<<<<
+ * index = iarg.index_set()
+ *
+ */
+ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_Error_executing_summation_The_la_2); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 187, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__5);
+ __Pyx_GIVEREF(__pyx_tuple__5);
+
+ /* "pyomo/core/util.pyx":209
+ * v = vars_[0]
+ * if len(params_) == 0:
+ * with EXPR.linear_expression as expr: # <<<<<<<<<<<<<<
+ * expr += start
+ * for i in index:
+ */
+ __pyx_tuple__6 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 209, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__6);
+ __Pyx_GIVEREF(__pyx_tuple__6);
+
+ /* "pyomo/core/util.pyx":215
+ * elif len(params_) == 1:
+ * p = params_[0]
+ * with EXPR.linear_expression as expr: # <<<<<<<<<<<<<<
+ * expr += start
+ * for i in index:
+ */
+ __pyx_tuple__7 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 215, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__7);
+ __Pyx_GIVEREF(__pyx_tuple__7);
+
+ /* "pyomo/core/util.pyx":220
+ * expr += p[i]*v[i]
+ * else:
+ * with EXPR.linear_expression as expr: # <<<<<<<<<<<<<<
+ * expr += start
+ * for i in index:
+ */
+ __pyx_tuple__8 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 220, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__8);
+ __Pyx_GIVEREF(__pyx_tuple__8);
+
+ /* "pyomo/core/util.pyx":229
+ * return expr
+ * #
+ * with EXPR.nonlinear_expression as expr: # <<<<<<<<<<<<<<
+ * expr += start
+ * for i in index:
+ */
+ __pyx_tuple__9 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__9);
+ __Pyx_GIVEREF(__pyx_tuple__9);
+
+ /* "pyomo/core/util.pyx":269
+ * """
+ * if len(args) == 0:
+ * raise ValueError('sequence expected at least 1 arguments, got 0') # <<<<<<<<<<<<<<
+ * if len(args) > 3:
+ * raise ValueError('sequence expected at most 3 arguments, got %d' % len(args))
+ */
+ __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_sequence_expected_at_least_1_arg); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 269, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__10);
+ __Pyx_GIVEREF(__pyx_tuple__10);
+
+ /* "pyomo/core/util.pyx":281
+ * def xsequence(*args):
+ * from pyomo.util.deprecation import deprecation_warning
+ * deprecation_warning("The xsequence function is deprecated. Use the sequence() function, which returns a generator.") # Remove in Pyomo 6.0 # <<<<<<<<<<<<<<
+ * return sequence(*args)
+ *
+ */
+ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_The_xsequence_function_is_deprec); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 281, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__11);
+ __Pyx_GIVEREF(__pyx_tuple__11);
+
+ /* "pyomo/core/util.pyx":26
+ *
+ *
+ * def prod(terms): # <<<<<<<<<<<<<<
+ * """
+ * A utility function to compute the product of a list of terms.
+ */
+ __pyx_tuple__12 = PyTuple_Pack(3, __pyx_n_s_terms, __pyx_n_s_ans, __pyx_n_s_term); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 26, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__12);
+ __Pyx_GIVEREF(__pyx_tuple__12);
+ __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_util_pyx, __pyx_n_s_prod, 26, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(0, 26, __pyx_L1_error)
+
+ /* "pyomo/core/util.pyx":47
+ *
+ *
+ * def Sum(args, start=0, linear=None): # <<<<<<<<<<<<<<
+ * """
+ * A utility function to compute a sum of Pyomo expressions.
+ */
+ __pyx_tuple__14 = PyTuple_Pack(11, __pyx_n_s_args, __pyx_n_s_start, __pyx_n_s_linear, __pyx_n_s_first, __pyx_n_s_terms, __pyx_n_s_nvar, __pyx_n_s_term, __pyx_n_s_c, __pyx_n_s_v, __pyx_n_s_e, __pyx_n_s_arg); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 47, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__14);
+ __Pyx_GIVEREF(__pyx_tuple__14);
+ __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(3, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_util_pyx, __pyx_n_s_Sum, 47, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) __PYX_ERR(0, 47, __pyx_L1_error)
+
+ /* "pyomo/core/util.pyx":144
+ *
+ *
+ * def summation(*args, **kwds): # <<<<<<<<<<<<<<
+ * """
+ * A utility function to compute a generalized dot product.
+ */
+ __pyx_tuple__16 = PyTuple_Pack(24, __pyx_n_s_args, __pyx_n_s_kwds, __pyx_n_s_denom, __pyx_n_s_nargs, __pyx_n_s_ndenom, __pyx_n_s_index, __pyx_n_s_iarg, __pyx_n_s_start, __pyx_n_s_vars, __pyx_n_s_params, __pyx_n_s_arg, __pyx_n_s_nvars, __pyx_n_s_num_index, __pyx_n_s_v, __pyx_n_s_expr, __pyx_n_s_i, __pyx_n_s_p, __pyx_n_s_term, __pyx_n_s_j, __pyx_n_s_denom_index, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__16)) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__16);
+ __Pyx_GIVEREF(__pyx_tuple__16);
+ __pyx_codeobj__17 = (PyObject*)__Pyx_PyCode_New(0, 0, 24, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS|CO_VARKEYWORDS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__16, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_util_pyx, __pyx_n_s_summation, 144, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__17)) __PYX_ERR(0, 144, __pyx_L1_error)
+
+ /* "pyomo/core/util.pyx":257
+ *
+ *
+ * def sequence(*args): # <<<<<<<<<<<<<<
+ * """
+ * sequence([start,] stop[, step]) -> generator for a list of integers
+ */
+ __pyx_tuple__18 = PyTuple_Pack(1, __pyx_n_s_args); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 257, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__18);
+ __Pyx_GIVEREF(__pyx_tuple__18);
+ __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_util_pyx, __pyx_n_s_sequence, 257, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 257, __pyx_L1_error)
+
+ /* "pyomo/core/util.pyx":279
+ *
+ *
+ * def xsequence(*args): # <<<<<<<<<<<<<<
+ * from pyomo.util.deprecation import deprecation_warning
+ * deprecation_warning("The xsequence function is deprecated. Use the sequence() function, which returns a generator.") # Remove in Pyomo 6.0
+ */
+ __pyx_tuple__20 = PyTuple_Pack(2, __pyx_n_s_args, __pyx_n_s_deprecation_warning); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 279, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__20);
+ __Pyx_GIVEREF(__pyx_tuple__20);
+ __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_core_util_pyx, __pyx_n_s_xsequence, 279, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 279, __pyx_L1_error)
+ __Pyx_RefNannyFinishContext();
+ return 0;
+ __pyx_L1_error:;
+ __Pyx_RefNannyFinishContext();
+ return -1;
+}
+
+static int __Pyx_InitGlobals(void) {
+ if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+ __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+ return 0;
+ __pyx_L1_error:;
+ return -1;
+}
+
+#if PY_MAJOR_VERSION < 3
+PyMODINIT_FUNC initutil(void); /*proto*/
+PyMODINIT_FUNC initutil(void)
+#else
+PyMODINIT_FUNC PyInit_util(void); /*proto*/
+PyMODINIT_FUNC PyInit_util(void)
+#if CYTHON_PEP489_MULTI_PHASE_INIT
+{
+ return PyModuleDef_Init(&__pyx_moduledef);
+}
+static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
+ PyObject *value = PyObject_GetAttrString(spec, from_name);
+ int result = 0;
+ if (likely(value)) {
+ result = PyDict_SetItemString(moddict, to_name, value);
+ Py_DECREF(value);
+ } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_Clear();
+ } else {
+ result = -1;
+ }
+ return result;
+}
+static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
+ PyObject *module = NULL, *moddict, *modname;
+ if (__pyx_m)
+ return __Pyx_NewRef(__pyx_m);
+ modname = PyObject_GetAttrString(spec, "name");
+ if (unlikely(!modname)) goto bad;
+ module = PyModule_NewObject(modname);
+ Py_DECREF(modname);
+ if (unlikely(!module)) goto bad;
+ moddict = PyModule_GetDict(module);
+ if (unlikely(!moddict)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
+ return module;
+bad:
+ Py_XDECREF(module);
+ return NULL;
+}
+
+
+static int __pyx_pymod_exec_util(PyObject *__pyx_pyinit_module)
+#endif
+#endif
+{
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ __Pyx_RefNannyDeclarations
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
+ #endif
+ #if CYTHON_REFNANNY
+ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+ if (!__Pyx_RefNanny) {
+ PyErr_Clear();
+ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+ if (!__Pyx_RefNanny)
+ Py_FatalError("failed to import 'refnanny' module");
+ }
+ #endif
+ __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_util(void)", 0);
+ if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #ifdef __Pyx_CyFunction_USED
+ if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_FusedFunction_USED
+ if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_Generator_USED
+ if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_StopAsyncIteration_USED
+ if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ /*--- Library function declarations ---*/
+ /*--- Threads initialization code ---*/
+ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+ #ifdef WITH_THREAD /* Python build with threading support? */
+ PyEval_InitThreads();
+ #endif
+ #endif
+ /*--- Module creation code ---*/
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ __pyx_m = __pyx_pyinit_module;
+ Py_INCREF(__pyx_m);
+ #else
+ #if PY_MAJOR_VERSION < 3
+ __pyx_m = Py_InitModule4("util", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+ #else
+ __pyx_m = PyModule_Create(&__pyx_moduledef);
+ #endif
+ if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
+ Py_INCREF(__pyx_d);
+ __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #if CYTHON_COMPILING_IN_PYPY
+ Py_INCREF(__pyx_b);
+ #endif
+ if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+ /*--- Initialize various global constants etc. ---*/
+ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+ if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ if (__pyx_module_is_main_pyomo__core__util) {
+ if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ }
+ #if PY_MAJOR_VERSION >= 3
+ {
+ PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
+ if (!PyDict_GetItemString(modules, "pyomo.core.util")) {
+ if (unlikely(PyDict_SetItemString(modules, "pyomo.core.util", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ }
+ }
+ #endif
+ /*--- Builtin init code ---*/
+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ /*--- Constants init code ---*/
+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ /*--- Global init code ---*/
+ /*--- Variable export code ---*/
+ /*--- Function export code ---*/
+ /*--- Type init code ---*/
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4util___pyx_scope_struct__summation) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4util___pyx_scope_struct__summation.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4util___pyx_scope_struct__summation = &__pyx_type_5pyomo_4core_4util___pyx_scope_struct__summation;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4util___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 238, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4util___pyx_scope_struct_1_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_1_genexpr = &__pyx_type_5pyomo_4core_4util___pyx_scope_struct_1_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4util___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 238, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4util___pyx_scope_struct_2_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_2_genexpr = &__pyx_type_5pyomo_4core_4util___pyx_scope_struct_2_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4util___pyx_scope_struct_3_genexpr) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4util___pyx_scope_struct_3_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_3_genexpr = &__pyx_type_5pyomo_4core_4util___pyx_scope_struct_3_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4util___pyx_scope_struct_4_genexpr) < 0) __PYX_ERR(0, 244, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4util___pyx_scope_struct_4_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_4_genexpr = &__pyx_type_5pyomo_4core_4util___pyx_scope_struct_4_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4util___pyx_scope_struct_5_genexpr) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4util___pyx_scope_struct_5_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_5_genexpr = &__pyx_type_5pyomo_4core_4util___pyx_scope_struct_5_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4util___pyx_scope_struct_6_genexpr) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4util___pyx_scope_struct_6_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_6_genexpr = &__pyx_type_5pyomo_4core_4util___pyx_scope_struct_6_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4core_4util___pyx_scope_struct_7_genexpr) < 0) __PYX_ERR(0, 250, __pyx_L1_error)
+ __pyx_type_5pyomo_4core_4util___pyx_scope_struct_7_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4core_4util___pyx_scope_struct_7_genexpr = &__pyx_type_5pyomo_4core_4util___pyx_scope_struct_7_genexpr;
+ /*--- Type import code ---*/
+ /*--- Variable import code ---*/
+ /*--- Function import code ---*/
+ /*--- Execution code ---*/
+ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+ if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+
+ /* "pyomo/core/util.pyx":15
+ * #
+ *
+ * __all__ = ['summation', 'dot_product', 'sequence', 'prod', 'Prod', 'Sum'] # <<<<<<<<<<<<<<
+ *
+ * from six.moves import xrange
+ */
+ __pyx_t_1 = PyList_New(6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 15, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_summation);
+ __Pyx_GIVEREF(__pyx_n_s_summation);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_summation);
+ __Pyx_INCREF(__pyx_n_s_dot_product);
+ __Pyx_GIVEREF(__pyx_n_s_dot_product);
+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_dot_product);
+ __Pyx_INCREF(__pyx_n_s_sequence);
+ __Pyx_GIVEREF(__pyx_n_s_sequence);
+ PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_sequence);
+ __Pyx_INCREF(__pyx_n_s_prod);
+ __Pyx_GIVEREF(__pyx_n_s_prod);
+ PyList_SET_ITEM(__pyx_t_1, 3, __pyx_n_s_prod);
+ __Pyx_INCREF(__pyx_n_s_Prod);
+ __Pyx_GIVEREF(__pyx_n_s_Prod);
+ PyList_SET_ITEM(__pyx_t_1, 4, __pyx_n_s_Prod);
+ __Pyx_INCREF(__pyx_n_s_Sum);
+ __Pyx_GIVEREF(__pyx_n_s_Sum);
+ PyList_SET_ITEM(__pyx_t_1, 5, __pyx_n_s_Sum);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_1) < 0) __PYX_ERR(0, 15, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":17
+ * __all__ = ['summation', 'dot_product', 'sequence', 'prod', 'Prod', 'Sum']
+ *
+ * from six.moves import xrange # <<<<<<<<<<<<<<
+ * from functools import reduce
+ * import operator
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_xrange);
+ __Pyx_GIVEREF(__pyx_n_s_xrange);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_xrange);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_six_moves, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_xrange); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_xrange, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":18
+ *
+ * from six.moves import xrange
+ * from functools import reduce # <<<<<<<<<<<<<<
+ * import operator
+ * from pyomo.core.expr.numvalue import native_numeric_types
+ */
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_reduce);
+ __Pyx_GIVEREF(__pyx_n_s_reduce);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_reduce);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_functools, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_reduce); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 18, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce, __pyx_t_2) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":19
+ * from six.moves import xrange
+ * from functools import reduce
+ * import operator # <<<<<<<<<<<<<<
+ * from pyomo.core.expr.numvalue import native_numeric_types
+ * from pyomo.core.expr.expr_pyomo5 import decompose_term
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_operator, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_operator, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":20
+ * from functools import reduce
+ * import operator
+ * from pyomo.core.expr.numvalue import native_numeric_types # <<<<<<<<<<<<<<
+ * from pyomo.core.expr.expr_pyomo5 import decompose_term
+ * from pyomo.core import expr as EXPR
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_native_numeric_types);
+ __Pyx_GIVEREF(__pyx_n_s_native_numeric_types);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_native_numeric_types);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_core_expr_numvalue, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 20, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 20, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_native_numeric_types, __pyx_t_1) < 0) __PYX_ERR(0, 20, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":21
+ * import operator
+ * from pyomo.core.expr.numvalue import native_numeric_types
+ * from pyomo.core.expr.expr_pyomo5 import decompose_term # <<<<<<<<<<<<<<
+ * from pyomo.core import expr as EXPR
+ * import pyomo.core.base.var
+ */
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_decompose_term);
+ __Pyx_GIVEREF(__pyx_n_s_decompose_term);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_decompose_term);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyomo_core_expr_expr_pyomo5, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_decompose_term); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_decompose_term, __pyx_t_2) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/core/util.pyx":22
+ * from pyomo.core.expr.numvalue import native_numeric_types
+ * from pyomo.core.expr.expr_pyomo5 import decompose_term
+ * from pyomo.core import expr as EXPR # <<<<<<<<<<<<<<
+ * import pyomo.core.base.var
+ *
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_expr);
+ __Pyx_GIVEREF(__pyx_n_s_expr);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_expr);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_core, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 22, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 22, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXPR, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":23
+ * from pyomo.core.expr.expr_pyomo5 import decompose_term
+ * from pyomo.core import expr as EXPR
+ * import pyomo.core.base.var # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_core_base_var, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 23, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyomo, __pyx_t_2) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":26
+ *
+ *
+ * def prod(terms): # <<<<<<<<<<<<<<
+ * """
+ * A utility function to compute the product of a list of terms.
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4util_1prod, NULL, __pyx_n_s_pyomo_core_util); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_prod, __pyx_t_2) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":44
+ * return ans
+ *
+ * Prod = prod # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_prod); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Prod, __pyx_t_2) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":47
+ *
+ *
+ * def Sum(args, start=0, linear=None): # <<<<<<<<<<<<<<
+ * """
+ * A utility function to compute a sum of Pyomo expressions.
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4util_3Sum, NULL, __pyx_n_s_pyomo_core_util); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 47, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Sum, __pyx_t_2) < 0) __PYX_ERR(0, 47, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":144
+ *
+ *
+ * def summation(*args, **kwds): # <<<<<<<<<<<<<<
+ * """
+ * A utility function to compute a generalized dot product.
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4util_5summation, NULL, __pyx_n_s_pyomo_core_util); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_summation, __pyx_t_2) < 0) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":254
+ *
+ * #: An alias for :func:`summation `
+ * dot_product = summation # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_summation); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 254, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_dot_product, __pyx_t_2) < 0) __PYX_ERR(0, 254, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":257
+ *
+ *
+ * def sequence(*args): # <<<<<<<<<<<<<<
+ * """
+ * sequence([start,] stop[, step]) -> generator for a list of integers
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4util_7sequence, NULL, __pyx_n_s_pyomo_core_util); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sequence, __pyx_t_2) < 0) __PYX_ERR(0, 257, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":279
+ *
+ *
+ * def xsequence(*args): # <<<<<<<<<<<<<<
+ * from pyomo.util.deprecation import deprecation_warning
+ * deprecation_warning("The xsequence function is deprecated. Use the sequence() function, which returns a generator.") # Remove in Pyomo 6.0
+ */
+ __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4core_4util_9xsequence, NULL, __pyx_n_s_pyomo_core_util); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_xsequence, __pyx_t_2) < 0) __PYX_ERR(0, 279, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/core/util.pyx":1
+ * # ___________________________________________________________________________ # <<<<<<<<<<<<<<
+ * #
+ * # Pyomo: Python Optimization Modeling Objects
+ */
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /*--- Wrapped vars code ---*/
+
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ if (__pyx_m) {
+ if (__pyx_d) {
+ __Pyx_AddTraceback("init pyomo.core.util", 0, __pyx_lineno, __pyx_filename);
+ }
+ Py_DECREF(__pyx_m); __pyx_m = 0;
+ } else if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_ImportError, "init pyomo.core.util");
+ }
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ return (__pyx_m != NULL) ? 0 : -1;
+ #elif PY_MAJOR_VERSION >= 3
+ return __pyx_m;
+ #else
+ return;
+ #endif
+}
+
+/* --- Runtime support code --- */
+/* Refnanny */
+#if CYTHON_REFNANNY
+static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
+ PyObject *m = NULL, *p = NULL;
+ void *r = NULL;
+ m = PyImport_ImportModule((char *)modname);
+ if (!m) goto end;
+ p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
+ if (!p) goto end;
+ r = PyLong_AsVoidPtr(p);
+end:
+ Py_XDECREF(p);
+ Py_XDECREF(m);
+ return (__Pyx_RefNannyAPIStruct *)r;
+}
+#endif
+
+/* GetBuiltinName */
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+ PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+ if (unlikely(!result)) {
+ PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+ "name '%U' is not defined", name);
+#else
+ "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
+ }
+ return result;
+}
+
+/* RaiseDoubleKeywords */
+static void __Pyx_RaiseDoubleKeywordsError(
+ const char* func_name,
+ PyObject* kw_name)
+{
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION >= 3
+ "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
+ #else
+ "%s() got multiple values for keyword argument '%s'", func_name,
+ PyString_AsString(kw_name));
+ #endif
+}
+
+/* ParseKeywords */
+static int __Pyx_ParseOptionalKeywords(
+ PyObject *kwds,
+ PyObject **argnames[],
+ PyObject *kwds2,
+ PyObject *values[],
+ Py_ssize_t num_pos_args,
+ const char* function_name)
+{
+ PyObject *key = 0, *value = 0;
+ Py_ssize_t pos = 0;
+ PyObject*** name;
+ PyObject*** first_kw_arg = argnames + num_pos_args;
+ while (PyDict_Next(kwds, &pos, &key, &value)) {
+ name = first_kw_arg;
+ while (*name && (**name != key)) name++;
+ if (*name) {
+ values[name-argnames] = value;
+ continue;
+ }
+ name = first_kw_arg;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
+ while (*name) {
+ if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
+ && _PyString_Eq(**name, key)) {
+ values[name-argnames] = value;
+ break;
+ }
+ name++;
+ }
+ if (*name) continue;
+ else {
+ PyObject*** argname = argnames;
+ while (argname != first_kw_arg) {
+ if ((**argname == key) || (
+ (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
+ && _PyString_Eq(**argname, key))) {
+ goto arg_passed_twice;
+ }
+ argname++;
+ }
+ }
+ } else
+ #endif
+ if (likely(PyUnicode_Check(key))) {
+ while (*name) {
+ int cmp = (**name == key) ? 0 :
+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+ (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
+ #endif
+ PyUnicode_Compare(**name, key);
+ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+ if (cmp == 0) {
+ values[name-argnames] = value;
+ break;
+ }
+ name++;
+ }
+ if (*name) continue;
+ else {
+ PyObject*** argname = argnames;
+ while (argname != first_kw_arg) {
+ int cmp = (**argname == key) ? 0 :
+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+ (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
+ #endif
+ PyUnicode_Compare(**argname, key);
+ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+ if (cmp == 0) goto arg_passed_twice;
+ argname++;
+ }
+ }
+ } else
+ goto invalid_keyword_type;
+ if (kwds2) {
+ if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+ } else {
+ goto invalid_keyword;
+ }
+ }
+ return 0;
+arg_passed_twice:
+ __Pyx_RaiseDoubleKeywordsError(function_name, key);
+ goto bad;
+invalid_keyword_type:
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() keywords must be strings", function_name);
+ goto bad;
+invalid_keyword:
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION < 3
+ "%.200s() got an unexpected keyword argument '%.200s'",
+ function_name, PyString_AsString(key));
+ #else
+ "%s() got an unexpected keyword argument '%U'",
+ function_name, key);
+ #endif
+bad:
+ return -1;
+}
+
+/* RaiseArgTupleInvalid */
+static void __Pyx_RaiseArgtupleInvalid(
+ const char* func_name,
+ int exact,
+ Py_ssize_t num_min,
+ Py_ssize_t num_max,
+ Py_ssize_t num_found)
+{
+ Py_ssize_t num_expected;
+ const char *more_or_less;
+ if (num_found < num_min) {
+ num_expected = num_min;
+ more_or_less = "at least";
+ } else {
+ num_expected = num_max;
+ more_or_less = "at most";
+ }
+ if (exact) {
+ more_or_less = "exactly";
+ }
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+ func_name, more_or_less, num_expected,
+ (num_expected == 1) ? "" : "s", num_found);
+}
+
+/* GetModuleGlobalName */
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+ PyObject *result;
+#if !CYTHON_AVOID_BORROWED_REFS
+ result = PyDict_GetItem(__pyx_d, name);
+ if (likely(result)) {
+ Py_INCREF(result);
+ } else {
+#else
+ result = PyObject_GetItem(__pyx_d, name);
+ if (!result) {
+ PyErr_Clear();
+#endif
+ result = __Pyx_GetBuiltinName(name);
+ }
+ return result;
+}
+
+/* PyErrFetchRestore */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ tmp_type = tstate->curexc_type;
+ tmp_value = tstate->curexc_value;
+ tmp_tb = tstate->curexc_traceback;
+ tstate->curexc_type = type;
+ tstate->curexc_value = value;
+ tstate->curexc_traceback = tb;
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+}
+static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ *type = tstate->curexc_type;
+ *value = tstate->curexc_value;
+ *tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+}
+#endif
+
+/* IterNext */
+ static PyObject *__Pyx_PyIter_Next2Default(PyObject* defval) {
+ PyObject* exc_type;
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ exc_type = __Pyx_PyErr_Occurred();
+ if (unlikely(exc_type)) {
+ if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
+ return NULL;
+ if (defval) {
+ __Pyx_PyErr_Clear();
+ Py_INCREF(defval);
+ }
+ return defval;
+ }
+ if (defval) {
+ Py_INCREF(defval);
+ return defval;
+ }
+ __Pyx_PyErr_SetNone(PyExc_StopIteration);
+ return NULL;
+}
+static void __Pyx_PyIter_Next_ErrorNoIterator(PyObject *iterator) {
+ PyErr_Format(PyExc_TypeError,
+ "%.200s object is not an iterator", Py_TYPE(iterator)->tp_name);
+}
+static CYTHON_INLINE PyObject *__Pyx_PyIter_Next2(PyObject* iterator, PyObject* defval) {
+ PyObject* next;
+ iternextfunc iternext = Py_TYPE(iterator)->tp_iternext;
+ if (likely(iternext)) {
+#if CYTHON_USE_TYPE_SLOTS
+ next = iternext(iterator);
+ if (likely(next))
+ return next;
+ #if PY_VERSION_HEX >= 0x02070000
+ if (unlikely(iternext == &_PyObject_NextNotImplemented))
+ return NULL;
+ #endif
+#else
+ next = PyIter_Next(iterator);
+ if (likely(next))
+ return next;
+#endif
+ } else if (CYTHON_USE_TYPE_SLOTS || !PyIter_Check(iterator)) {
+ __Pyx_PyIter_Next_ErrorNoIterator(iterator);
+ return NULL;
+ }
+ return __Pyx_PyIter_Next2Default(defval);
+}
+
+/* PyCFunctionFastCall */
+ #if CYTHON_FAST_PYCCALL
+static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
+ PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
+ PyCFunction meth = PyCFunction_GET_FUNCTION(func);
+ PyObject *self = PyCFunction_GET_SELF(func);
+ int flags = PyCFunction_GET_FLAGS(func);
+ assert(PyCFunction_Check(func));
+ assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
+ assert(nargs >= 0);
+ assert(nargs == 0 || args != NULL);
+ /* _PyCFunction_FastCallDict() must not be called with an exception set,
+ because it may clear it (directly or indirectly) and so the
+ caller loses its exception */
+ assert(!PyErr_Occurred());
+ if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
+ return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
+ } else {
+ return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
+ }
+}
+#endif
+
+/* PyFunctionFastCall */
+ #if CYTHON_FAST_PYCALL
+#include "frameobject.h"
+static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
+ PyObject *globals) {
+ PyFrameObject *f;
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ PyObject **fastlocals;
+ Py_ssize_t i;
+ PyObject *result;
+ assert(globals != NULL);
+ /* XXX Perhaps we should create a specialized
+ PyFrame_New() that doesn't take locals, but does
+ take builtins without sanity checking them.
+ */
+ assert(tstate != NULL);
+ f = PyFrame_New(tstate, co, globals, NULL);
+ if (f == NULL) {
+ return NULL;
+ }
+ fastlocals = f->f_localsplus;
+ for (i = 0; i < na; i++) {
+ Py_INCREF(*args);
+ fastlocals[i] = *args++;
+ }
+ result = PyEval_EvalFrameEx(f,0);
+ ++tstate->recursion_depth;
+ Py_DECREF(f);
+ --tstate->recursion_depth;
+ return result;
+}
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
+ PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
+ PyObject *globals = PyFunction_GET_GLOBALS(func);
+ PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
+ PyObject *closure;
+#if PY_MAJOR_VERSION >= 3
+ PyObject *kwdefs;
+#endif
+ PyObject *kwtuple, **k;
+ PyObject **d;
+ Py_ssize_t nd;
+ Py_ssize_t nk;
+ PyObject *result;
+ assert(kwargs == NULL || PyDict_Check(kwargs));
+ nk = kwargs ? PyDict_Size(kwargs) : 0;
+ if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
+ return NULL;
+ }
+ if (
+#if PY_MAJOR_VERSION >= 3
+ co->co_kwonlyargcount == 0 &&
+#endif
+ likely(kwargs == NULL || nk == 0) &&
+ co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
+ if (argdefs == NULL && co->co_argcount == nargs) {
+ result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
+ goto done;
+ }
+ else if (nargs == 0 && argdefs != NULL
+ && co->co_argcount == Py_SIZE(argdefs)) {
+ /* function called with no arguments, but all parameters have
+ a default value: use default values as arguments .*/
+ args = &PyTuple_GET_ITEM(argdefs, 0);
+ result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
+ goto done;
+ }
+ }
+ if (kwargs != NULL) {
+ Py_ssize_t pos, i;
+ kwtuple = PyTuple_New(2 * nk);
+ if (kwtuple == NULL) {
+ result = NULL;
+ goto done;
+ }
+ k = &PyTuple_GET_ITEM(kwtuple, 0);
+ pos = i = 0;
+ while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
+ Py_INCREF(k[i]);
+ Py_INCREF(k[i+1]);
+ i += 2;
+ }
+ nk = i / 2;
+ }
+ else {
+ kwtuple = NULL;
+ k = NULL;
+ }
+ closure = PyFunction_GET_CLOSURE(func);
+#if PY_MAJOR_VERSION >= 3
+ kwdefs = PyFunction_GET_KW_DEFAULTS(func);
+#endif
+ if (argdefs != NULL) {
+ d = &PyTuple_GET_ITEM(argdefs, 0);
+ nd = Py_SIZE(argdefs);
+ }
+ else {
+ d = NULL;
+ nd = 0;
+ }
+#if PY_MAJOR_VERSION >= 3
+ result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
+ args, nargs,
+ k, (int)nk,
+ d, (int)nd, kwdefs, closure);
+#else
+ result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
+ args, nargs,
+ k, (int)nk,
+ d, (int)nd, closure);
+#endif
+ Py_XDECREF(kwtuple);
+done:
+ Py_LeaveRecursiveCall();
+ return result;
+}
+#endif
+#endif
+
+/* PyObjectCall */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+ PyObject *result;
+ ternaryfunc call = func->ob_type->tp_call;
+ if (unlikely(!call))
+ return PyObject_Call(func, arg, kw);
+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+ return NULL;
+ result = (*call)(func, arg, kw);
+ Py_LeaveRecursiveCall();
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+ PyErr_SetString(
+ PyExc_SystemError,
+ "NULL result without error in PyObject_Call");
+ }
+ return result;
+}
+#endif
+
+/* PyObjectCallMethO */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
+ PyObject *self, *result;
+ PyCFunction cfunc;
+ cfunc = PyCFunction_GET_FUNCTION(func);
+ self = PyCFunction_GET_SELF(func);
+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+ return NULL;
+ result = cfunc(self, arg);
+ Py_LeaveRecursiveCall();
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+ PyErr_SetString(
+ PyExc_SystemError,
+ "NULL result without error in PyObject_Call");
+ }
+ return result;
+}
+#endif
+
+/* PyObjectCallOneArg */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+ PyObject *result;
+ PyObject *args = PyTuple_New(1);
+ if (unlikely(!args)) return NULL;
+ Py_INCREF(arg);
+ PyTuple_SET_ITEM(args, 0, arg);
+ result = __Pyx_PyObject_Call(func, args, NULL);
+ Py_DECREF(args);
+ return result;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+#if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(func)) {
+ return __Pyx_PyFunction_FastCall(func, &arg, 1);
+ }
+#endif
+ if (likely(PyCFunction_Check(func))) {
+ if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
+ return __Pyx_PyObject_CallMethO(func, arg);
+#if CYTHON_FAST_PYCCALL
+ } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
+ return __Pyx_PyCFunction_FastCall(func, &arg, 1);
+#endif
+ }
+ }
+ return __Pyx__PyObject_CallOneArg(func, arg);
+}
+#else
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+ PyObject *result;
+ PyObject *args = PyTuple_Pack(1, arg);
+ if (unlikely(!args)) return NULL;
+ result = __Pyx_PyObject_Call(func, args, NULL);
+ Py_DECREF(args);
+ return result;
+}
+#endif
+
+/* RaiseTooManyValuesToUnpack */
+ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+ PyErr_Format(PyExc_ValueError,
+ "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
+}
+
+/* RaiseNeedMoreValuesToUnpack */
+ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+ PyErr_Format(PyExc_ValueError,
+ "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
+ index, (index == 1) ? "" : "s");
+}
+
+/* IterFinish */
+ static CYTHON_INLINE int __Pyx_IterFinish(void) {
+#if CYTHON_FAST_THREAD_STATE
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ PyObject* exc_type = tstate->curexc_type;
+ if (unlikely(exc_type)) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
+ PyObject *exc_value, *exc_tb;
+ exc_value = tstate->curexc_value;
+ exc_tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+ Py_DECREF(exc_type);
+ Py_XDECREF(exc_value);
+ Py_XDECREF(exc_tb);
+ return 0;
+ } else {
+ return -1;
+ }
+ }
+ return 0;
+#else
+ if (unlikely(PyErr_Occurred())) {
+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
+ PyErr_Clear();
+ return 0;
+ } else {
+ return -1;
+ }
+ }
+ return 0;
+#endif
+}
+
+/* UnpackItemEndCheck */
+ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
+ if (unlikely(retval)) {
+ Py_DECREF(retval);
+ __Pyx_RaiseTooManyValuesError(expected);
+ return -1;
+ } else {
+ return __Pyx_IterFinish();
+ }
+ return 0;
+}
+
+/* PyIntBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ const long b = intval;
+ long x;
+ long a = PyInt_AS_LONG(op1);
+ x = (long)((unsigned long)a + b);
+ if (likely((x^a) >= 0 || (x^b) >= 0))
+ return PyInt_FromLong(x);
+ return PyLong_Type.tp_as_number->nb_add(op1, op2);
+ }
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+ if (likely(PyLong_CheckExact(op1))) {
+ const long b = intval;
+ long a, x;
+#ifdef HAVE_LONG_LONG
+ const PY_LONG_LONG llb = intval;
+ PY_LONG_LONG lla, llx;
+#endif
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ a = likely(size) ? digits[0] : 0;
+ if (size == -1) a = -a;
+ } else {
+ switch (size) {
+ case -2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
+ }
+ }
+ x = a + b;
+ return PyLong_FromLong(x);
+#ifdef HAVE_LONG_LONG
+ long_long:
+ llx = lla + llb;
+ return PyLong_FromLongLong(llx);
+#endif
+
+
+ }
+ #endif
+ if (PyFloat_CheckExact(op1)) {
+ const long b = intval;
+ double a = PyFloat_AS_DOUBLE(op1);
+ double result;
+ PyFPE_START_PROTECT("add", return NULL)
+ result = ((double)a) + (double)b;
+ PyFPE_END_PROTECT(result)
+ return PyFloat_FromDouble(result);
+ }
+ return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
+}
+#endif
+
+/* PyObjectCallNoArg */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
+#if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(func)) {
+ return __Pyx_PyFunction_FastCall(func, NULL, 0);
+ }
+#endif
+#ifdef __Pyx_CyFunction_USED
+ if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
+#else
+ if (likely(PyCFunction_Check(func))) {
+#endif
+ if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
+ return __Pyx_PyObject_CallMethO(func, NULL);
+ }
+ }
+ return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
+}
+#endif
+
+/* SaveResetException */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ #if PY_VERSION_HEX >= 0x030700A2
+ *type = tstate->exc_state.exc_type;
+ *value = tstate->exc_state.exc_value;
+ *tb = tstate->exc_state.exc_traceback;
+ #else
+ *type = tstate->exc_type;
+ *value = tstate->exc_value;
+ *tb = tstate->exc_traceback;
+ #endif
+ Py_XINCREF(*type);
+ Py_XINCREF(*value);
+ Py_XINCREF(*tb);
+}
+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ #if PY_VERSION_HEX >= 0x030700A2
+ tmp_type = tstate->exc_state.exc_type;
+ tmp_value = tstate->exc_state.exc_value;
+ tmp_tb = tstate->exc_state.exc_traceback;
+ tstate->exc_state.exc_type = type;
+ tstate->exc_state.exc_value = value;
+ tstate->exc_state.exc_traceback = tb;
+ #else
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = type;
+ tstate->exc_value = value;
+ tstate->exc_traceback = tb;
+ #endif
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+}
+#endif
+
+/* GetException */
+ #if CYTHON_FAST_THREAD_STATE
+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+#else
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
+#endif
+ PyObject *local_type, *local_value, *local_tb;
+#if CYTHON_FAST_THREAD_STATE
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ local_type = tstate->curexc_type;
+ local_value = tstate->curexc_value;
+ local_tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+#else
+ PyErr_Fetch(&local_type, &local_value, &local_tb);
+#endif
+ PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+#if CYTHON_FAST_THREAD_STATE
+ if (unlikely(tstate->curexc_type))
+#else
+ if (unlikely(PyErr_Occurred()))
+#endif
+ goto bad;
+ #if PY_MAJOR_VERSION >= 3
+ if (local_tb) {
+ if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+ goto bad;
+ }
+ #endif
+ Py_XINCREF(local_tb);
+ Py_XINCREF(local_type);
+ Py_XINCREF(local_value);
+ *type = local_type;
+ *value = local_value;
+ *tb = local_tb;
+#if CYTHON_FAST_THREAD_STATE
+ #if PY_VERSION_HEX >= 0x030700A2
+ tmp_type = tstate->exc_state.exc_type;
+ tmp_value = tstate->exc_state.exc_value;
+ tmp_tb = tstate->exc_state.exc_traceback;
+ tstate->exc_state.exc_type = local_type;
+ tstate->exc_state.exc_value = local_value;
+ tstate->exc_state.exc_traceback = local_tb;
+ #else
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = local_type;
+ tstate->exc_value = local_value;
+ tstate->exc_traceback = local_tb;
+ #endif
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+#else
+ PyErr_SetExcInfo(local_type, local_value, local_tb);
+#endif
+ return 0;
+bad:
+ *type = 0;
+ *value = 0;
+ *tb = 0;
+ Py_XDECREF(local_type);
+ Py_XDECREF(local_value);
+ Py_XDECREF(local_tb);
+ return -1;
+}
+
+/* None */
+ static CYTHON_INLINE void __Pyx_RaiseUnboundLocalError(const char *varname) {
+ PyErr_Format(PyExc_UnboundLocalError, "local variable '%s' referenced before assignment", varname);
+}
+
+/* PyIntBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
+ if (op1 == op2) {
+ Py_RETURN_TRUE;
+ }
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ const long b = intval;
+ long a = PyInt_AS_LONG(op1);
+ if (a == b) {
+ Py_RETURN_TRUE;
+ } else {
+ Py_RETURN_FALSE;
+ }
+ }
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+ if (likely(PyLong_CheckExact(op1))) {
+ const long b = intval;
+ long a;
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ a = likely(size) ? digits[0] : 0;
+ if (size == -1) a = -a;
+ } else {
+ switch (size) {
+ case -2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case 2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case -3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case 3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case -4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case 4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
+ default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
+ #else
+ default: Py_RETURN_FALSE;
+ #endif
+ }
+ }
+ if (a == b) {
+ Py_RETURN_TRUE;
+ } else {
+ Py_RETURN_FALSE;
+ }
+ }
+ #endif
+ if (PyFloat_CheckExact(op1)) {
+ const long b = intval;
+ double a = PyFloat_AS_DOUBLE(op1);
+ if ((double)a == (double)b) {
+ Py_RETURN_TRUE;
+ } else {
+ Py_RETURN_FALSE;
+ }
+ }
+ return PyObject_RichCompare(op1, op2, Py_EQ);
+}
+#endif
+
+/* KeywordStringCheck */
+ static int __Pyx_CheckKeywordStrings(
+ PyObject *kwdict,
+ const char* function_name,
+ int kw_allowed)
+{
+ PyObject* key = 0;
+ Py_ssize_t pos = 0;
+#if CYTHON_COMPILING_IN_PYPY
+ if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
+ goto invalid_keyword;
+ return 1;
+#else
+ while (PyDict_Next(kwdict, &pos, &key, 0)) {
+ #if PY_MAJOR_VERSION < 3
+ if (unlikely(!PyString_Check(key)))
+ #endif
+ if (unlikely(!PyUnicode_Check(key)))
+ goto invalid_keyword_type;
+ }
+ if ((!kw_allowed) && unlikely(key))
+ goto invalid_keyword;
+ return 1;
+invalid_keyword_type:
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() keywords must be strings", function_name);
+ return 0;
+#endif
+invalid_keyword:
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION < 3
+ "%.200s() got an unexpected keyword argument '%.200s'",
+ function_name, PyString_AsString(key));
+ #else
+ "%s() got an unexpected keyword argument '%U'",
+ function_name, key);
+ #endif
+ return 0;
+}
+
+/* None */
+ static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
+ PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
+}
+
+/* RaiseException */
+ #if PY_MAJOR_VERSION < 3
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
+ CYTHON_UNUSED PyObject *cause) {
+ __Pyx_PyThreadState_declare
+ Py_XINCREF(type);
+ if (!value || value == Py_None)
+ value = NULL;
+ else
+ Py_INCREF(value);
+ if (!tb || tb == Py_None)
+ tb = NULL;
+ else {
+ Py_INCREF(tb);
+ if (!PyTraceBack_Check(tb)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: arg 3 must be a traceback or None");
+ goto raise_error;
+ }
+ }
+ if (PyType_Check(type)) {
+#if CYTHON_COMPILING_IN_PYPY
+ if (!value) {
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+#endif
+ PyErr_NormalizeException(&type, &value, &tb);
+ } else {
+ if (value) {
+ PyErr_SetString(PyExc_TypeError,
+ "instance exception may not have a separate value");
+ goto raise_error;
+ }
+ value = type;
+ type = (PyObject*) Py_TYPE(type);
+ Py_INCREF(type);
+ if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: exception class must be a subclass of BaseException");
+ goto raise_error;
+ }
+ }
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrRestore(type, value, tb);
+ return;
+raise_error:
+ Py_XDECREF(value);
+ Py_XDECREF(type);
+ Py_XDECREF(tb);
+ return;
+}
+#else
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
+ PyObject* owned_instance = NULL;
+ if (tb == Py_None) {
+ tb = 0;
+ } else if (tb && !PyTraceBack_Check(tb)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: arg 3 must be a traceback or None");
+ goto bad;
+ }
+ if (value == Py_None)
+ value = 0;
+ if (PyExceptionInstance_Check(type)) {
+ if (value) {
+ PyErr_SetString(PyExc_TypeError,
+ "instance exception may not have a separate value");
+ goto bad;
+ }
+ value = type;
+ type = (PyObject*) Py_TYPE(value);
+ } else if (PyExceptionClass_Check(type)) {
+ PyObject *instance_class = NULL;
+ if (value && PyExceptionInstance_Check(value)) {
+ instance_class = (PyObject*) Py_TYPE(value);
+ if (instance_class != type) {
+ int is_subclass = PyObject_IsSubclass(instance_class, type);
+ if (!is_subclass) {
+ instance_class = NULL;
+ } else if (unlikely(is_subclass == -1)) {
+ goto bad;
+ } else {
+ type = instance_class;
+ }
+ }
+ }
+ if (!instance_class) {
+ PyObject *args;
+ if (!value)
+ args = PyTuple_New(0);
+ else if (PyTuple_Check(value)) {
+ Py_INCREF(value);
+ args = value;
+ } else
+ args = PyTuple_Pack(1, value);
+ if (!args)
+ goto bad;
+ owned_instance = PyObject_Call(type, args, NULL);
+ Py_DECREF(args);
+ if (!owned_instance)
+ goto bad;
+ value = owned_instance;
+ if (!PyExceptionInstance_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "calling %R should have returned an instance of "
+ "BaseException, not %R",
+ type, Py_TYPE(value));
+ goto bad;
+ }
+ }
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: exception class must be a subclass of BaseException");
+ goto bad;
+ }
+ if (cause) {
+ PyObject *fixed_cause;
+ if (cause == Py_None) {
+ fixed_cause = NULL;
+ } else if (PyExceptionClass_Check(cause)) {
+ fixed_cause = PyObject_CallObject(cause, NULL);
+ if (fixed_cause == NULL)
+ goto bad;
+ } else if (PyExceptionInstance_Check(cause)) {
+ fixed_cause = cause;
+ Py_INCREF(fixed_cause);
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "exception causes must derive from "
+ "BaseException");
+ goto bad;
+ }
+ PyException_SetCause(value, fixed_cause);
+ }
+ PyErr_SetObject(type, value);
+ if (tb) {
+#if CYTHON_COMPILING_IN_PYPY
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
+ Py_INCREF(tb);
+ PyErr_Restore(tmp_type, tmp_value, tb);
+ Py_XDECREF(tmp_tb);
+#else
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ PyObject* tmp_tb = tstate->curexc_traceback;
+ if (tb != tmp_tb) {
+ Py_INCREF(tb);
+ tstate->curexc_traceback = tb;
+ Py_XDECREF(tmp_tb);
+ }
+#endif
+ }
+bad:
+ Py_XDECREF(owned_instance);
+ return;
+}
+#endif
+
+/* GetItemInt */
+ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+ PyObject *r;
+ if (!j) return NULL;
+ r = PyObject_GetItem(o, j);
+ Py_DECREF(j);
+ return r;
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ Py_ssize_t wrapped_i = i;
+ if (wraparound & unlikely(i < 0)) {
+ wrapped_i += PyList_GET_SIZE(o);
+ }
+ if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) {
+ PyObject *r = PyList_GET_ITEM(o, wrapped_i);
+ Py_INCREF(r);
+ return r;
+ }
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+ return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ Py_ssize_t wrapped_i = i;
+ if (wraparound & unlikely(i < 0)) {
+ wrapped_i += PyTuple_GET_SIZE(o);
+ }
+ if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) {
+ PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
+ Py_INCREF(r);
+ return r;
+ }
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+ return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
+ if (is_list || PyList_CheckExact(o)) {
+ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+ if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
+ PyObject *r = PyList_GET_ITEM(o, n);
+ Py_INCREF(r);
+ return r;
+ }
+ }
+ else if (PyTuple_CheckExact(o)) {
+ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+ if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
+ PyObject *r = PyTuple_GET_ITEM(o, n);
+ Py_INCREF(r);
+ return r;
+ }
+ } else {
+ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+ if (likely(m && m->sq_item)) {
+ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+ Py_ssize_t l = m->sq_length(o);
+ if (likely(l >= 0)) {
+ i += l;
+ } else {
+ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+ return NULL;
+ PyErr_Clear();
+ }
+ }
+ return m->sq_item(o, i);
+ }
+ }
+#else
+ if (is_list || PySequence_Check(o)) {
+ return PySequence_GetItem(o, i);
+ }
+#endif
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+}
+
+/* dict_getitem_default */
+ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObject* default_value) {
+ PyObject* value;
+#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
+ value = PyDict_GetItemWithError(d, key);
+ if (unlikely(!value)) {
+ if (unlikely(PyErr_Occurred()))
+ return NULL;
+ value = default_value;
+ }
+ Py_INCREF(value);
+#else
+ if (PyString_CheckExact(key) || PyUnicode_CheckExact(key) || PyInt_CheckExact(key)) {
+ value = PyDict_GetItem(d, key);
+ if (unlikely(!value)) {
+ value = default_value;
+ }
+ Py_INCREF(value);
+ } else {
+ if (default_value == Py_None)
+ default_value = NULL;
+ value = PyObject_CallMethodObjArgs(
+ d, __pyx_n_s_get, key, default_value, NULL);
+ }
+#endif
+ return value;
+}
+
+/* Import */
+ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+ PyObject *empty_list = 0;
+ PyObject *module = 0;
+ PyObject *global_dict = 0;
+ PyObject *empty_dict = 0;
+ PyObject *list;
+ #if PY_MAJOR_VERSION < 3
+ PyObject *py_import;
+ py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+ if (!py_import)
+ goto bad;
+ #endif
+ if (from_list)
+ list = from_list;
+ else {
+ empty_list = PyList_New(0);
+ if (!empty_list)
+ goto bad;
+ list = empty_list;
+ }
+ global_dict = PyModule_GetDict(__pyx_m);
+ if (!global_dict)
+ goto bad;
+ empty_dict = PyDict_New();
+ if (!empty_dict)
+ goto bad;
+ {
+ #if PY_MAJOR_VERSION >= 3
+ if (level == -1) {
+ if (strchr(__Pyx_MODULE_NAME, '.')) {
+ module = PyImport_ImportModuleLevelObject(
+ name, global_dict, empty_dict, list, 1);
+ if (!module) {
+ if (!PyErr_ExceptionMatches(PyExc_ImportError))
+ goto bad;
+ PyErr_Clear();
+ }
+ }
+ level = 0;
+ }
+ #endif
+ if (!module) {
+ #if PY_MAJOR_VERSION < 3
+ PyObject *py_level = PyInt_FromLong(level);
+ if (!py_level)
+ goto bad;
+ module = PyObject_CallFunctionObjArgs(py_import,
+ name, global_dict, empty_dict, list, py_level, NULL);
+ Py_DECREF(py_level);
+ #else
+ module = PyImport_ImportModuleLevelObject(
+ name, global_dict, empty_dict, list, level);
+ #endif
+ }
+ }
+bad:
+ #if PY_MAJOR_VERSION < 3
+ Py_XDECREF(py_import);
+ #endif
+ Py_XDECREF(empty_list);
+ Py_XDECREF(empty_dict);
+ return module;
+}
+
+/* ImportFrom */
+ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
+ PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
+ if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_Format(PyExc_ImportError,
+ #if PY_MAJOR_VERSION < 3
+ "cannot import name %.230s", PyString_AS_STRING(name));
+ #else
+ "cannot import name %S", name);
+ #endif
+ }
+ return value;
+}
+
+/* CLineInTraceback */
+ #ifndef CYTHON_CLINE_IN_TRACEBACK
+static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
+ PyObject *use_cline;
+ PyObject *ptype, *pvalue, *ptraceback;
+#if CYTHON_COMPILING_IN_CPYTHON
+ PyObject **cython_runtime_dict;
+#endif
+ __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
+#if CYTHON_COMPILING_IN_CPYTHON
+ cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
+ if (likely(cython_runtime_dict)) {
+ use_cline = PyDict_GetItem(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
+ } else
+#endif
+ {
+ PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
+ if (use_cline_obj) {
+ use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
+ Py_DECREF(use_cline_obj);
+ } else {
+ PyErr_Clear();
+ use_cline = NULL;
+ }
+ }
+ if (!use_cline) {
+ c_line = 0;
+ PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
+ }
+ else if (PyObject_Not(use_cline) != 0) {
+ c_line = 0;
+ }
+ __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
+ return c_line;
+}
+#endif
+
+/* CodeObjectCache */
+ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+ int start = 0, mid = 0, end = count - 1;
+ if (end >= 0 && code_line > entries[end].code_line) {
+ return count;
+ }
+ while (start < end) {
+ mid = start + (end - start) / 2;
+ if (code_line < entries[mid].code_line) {
+ end = mid;
+ } else if (code_line > entries[mid].code_line) {
+ start = mid + 1;
+ } else {
+ return mid;
+ }
+ }
+ if (code_line <= entries[mid].code_line) {
+ return mid;
+ } else {
+ return mid + 1;
+ }
+}
+static PyCodeObject *__pyx_find_code_object(int code_line) {
+ PyCodeObject* code_object;
+ int pos;
+ if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
+ return NULL;
+ }
+ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+ if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
+ return NULL;
+ }
+ code_object = __pyx_code_cache.entries[pos].code_object;
+ Py_INCREF(code_object);
+ return code_object;
+}
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
+ int pos, i;
+ __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
+ if (unlikely(!code_line)) {
+ return;
+ }
+ if (unlikely(!entries)) {
+ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
+ if (likely(entries)) {
+ __pyx_code_cache.entries = entries;
+ __pyx_code_cache.max_count = 64;
+ __pyx_code_cache.count = 1;
+ entries[0].code_line = code_line;
+ entries[0].code_object = code_object;
+ Py_INCREF(code_object);
+ }
+ return;
+ }
+ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+ if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
+ PyCodeObject* tmp = entries[pos].code_object;
+ entries[pos].code_object = code_object;
+ Py_DECREF(tmp);
+ return;
+ }
+ if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
+ int new_max = __pyx_code_cache.max_count + 64;
+ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
+ __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
+ if (unlikely(!entries)) {
+ return;
+ }
+ __pyx_code_cache.entries = entries;
+ __pyx_code_cache.max_count = new_max;
+ }
+ for (i=__pyx_code_cache.count; i>pos; i--) {
+ entries[i] = entries[i-1];
+ }
+ entries[pos].code_line = code_line;
+ entries[pos].code_object = code_object;
+ __pyx_code_cache.count++;
+ Py_INCREF(code_object);
+}
+
+/* AddTraceback */
+ #include "compile.h"
+#include "frameobject.h"
+#include "traceback.h"
+static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
+ const char *funcname, int c_line,
+ int py_line, const char *filename) {
+ PyCodeObject *py_code = 0;
+ PyObject *py_srcfile = 0;
+ PyObject *py_funcname = 0;
+ #if PY_MAJOR_VERSION < 3
+ py_srcfile = PyString_FromString(filename);
+ #else
+ py_srcfile = PyUnicode_FromString(filename);
+ #endif
+ if (!py_srcfile) goto bad;
+ if (c_line) {
+ #if PY_MAJOR_VERSION < 3
+ py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+ #else
+ py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+ #endif
+ }
+ else {
+ #if PY_MAJOR_VERSION < 3
+ py_funcname = PyString_FromString(funcname);
+ #else
+ py_funcname = PyUnicode_FromString(funcname);
+ #endif
+ }
+ if (!py_funcname) goto bad;
+ py_code = __Pyx_PyCode_New(
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ __pyx_empty_bytes, /*PyObject *code,*/
+ __pyx_empty_tuple, /*PyObject *consts,*/
+ __pyx_empty_tuple, /*PyObject *names,*/
+ __pyx_empty_tuple, /*PyObject *varnames,*/
+ __pyx_empty_tuple, /*PyObject *freevars,*/
+ __pyx_empty_tuple, /*PyObject *cellvars,*/
+ py_srcfile, /*PyObject *filename,*/
+ py_funcname, /*PyObject *name,*/
+ py_line,
+ __pyx_empty_bytes /*PyObject *lnotab*/
+ );
+ Py_DECREF(py_srcfile);
+ Py_DECREF(py_funcname);
+ return py_code;
+bad:
+ Py_XDECREF(py_srcfile);
+ Py_XDECREF(py_funcname);
+ return NULL;
+}
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename) {
+ PyCodeObject *py_code = 0;
+ PyFrameObject *py_frame = 0;
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ if (c_line) {
+ c_line = __Pyx_CLineForTraceback(tstate, c_line);
+ }
+ py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
+ if (!py_code) {
+ py_code = __Pyx_CreateCodeObjectForTraceback(
+ funcname, c_line, py_line, filename);
+ if (!py_code) goto bad;
+ __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
+ }
+ py_frame = PyFrame_New(
+ tstate, /*PyThreadState *tstate,*/
+ py_code, /*PyCodeObject *code,*/
+ __pyx_d, /*PyObject *globals,*/
+ 0 /*PyObject *locals*/
+ );
+ if (!py_frame) goto bad;
+ __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
+ PyTraceBack_Here(py_frame);
+bad:
+ Py_XDECREF(py_code);
+ Py_XDECREF(py_frame);
+}
+
+/* CIntToPy */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+ const long neg_one = (long) -1, const_zero = (long) 0;
+ const int is_unsigned = neg_one > const_zero;
+ if (is_unsigned) {
+ if (sizeof(long) < sizeof(long)) {
+ return PyInt_FromLong((long) value);
+ } else if (sizeof(long) <= sizeof(unsigned long)) {
+ return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
+ }
+ } else {
+ if (sizeof(long) <= sizeof(long)) {
+ return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
+ return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
+ }
+ }
+ {
+ int one = 1; int little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&value;
+ return _PyLong_FromByteArray(bytes, sizeof(long),
+ little, !is_unsigned);
+ }
+}
+
+/* CIntFromPyVerify */
+ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
+#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
+#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
+ {\
+ func_type value = func_value;\
+ if (sizeof(target_type) < sizeof(func_type)) {\
+ if (unlikely(value != (func_type) (target_type) value)) {\
+ func_type zero = 0;\
+ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
+ return (target_type) -1;\
+ if (is_unsigned && unlikely(value < zero))\
+ goto raise_neg_overflow;\
+ else\
+ goto raise_overflow;\
+ }\
+ }\
+ return (target_type) value;\
+ }
+
+/* CIntFromPy */
+ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+ const long neg_one = (long) -1, const_zero = (long) 0;
+ const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+ if (sizeof(long) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
+ } else {
+ long val = PyInt_AS_LONG(x);
+ if (is_unsigned && unlikely(val < 0)) {
+ goto raise_neg_overflow;
+ }
+ return (long) val;
+ }
+ } else
+#endif
+ if (likely(PyLong_Check(x))) {
+ if (is_unsigned) {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (long) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
+ case 2:
+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
+ return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
+ return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
+ return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ }
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ if (unlikely(Py_SIZE(x) < 0)) {
+ goto raise_neg_overflow;
+ }
+#else
+ {
+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
+ if (unlikely(result < 0))
+ return (long) -1;
+ if (unlikely(result == 1))
+ goto raise_neg_overflow;
+ }
+#endif
+ if (sizeof(long) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
+ }
+ } else {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (long) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
+ case -2:
+ if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 2:
+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case -3:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case -4:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ }
+#endif
+ if (sizeof(long) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
+ }
+ }
+ {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+ PyErr_SetString(PyExc_RuntimeError,
+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+ long val;
+ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+#endif
+ return (long) -1;
+ }
+ } else {
+ long val;
+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+ if (!tmp) return (long) -1;
+ val = __Pyx_PyInt_As_long(tmp);
+ Py_DECREF(tmp);
+ return val;
+ }
+raise_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "value too large to convert to long");
+ return (long) -1;
+raise_neg_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "can't convert negative value to long");
+ return (long) -1;
+}
+
+/* CIntFromPy */
+ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+ const int neg_one = (int) -1, const_zero = (int) 0;
+ const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+ if (sizeof(int) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
+ } else {
+ long val = PyInt_AS_LONG(x);
+ if (is_unsigned && unlikely(val < 0)) {
+ goto raise_neg_overflow;
+ }
+ return (int) val;
+ }
+ } else
+#endif
+ if (likely(PyLong_Check(x))) {
+ if (is_unsigned) {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (int) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
+ case 2:
+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
+ return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
+ return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
+ return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ }
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ if (unlikely(Py_SIZE(x) < 0)) {
+ goto raise_neg_overflow;
+ }
+#else
+ {
+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
+ if (unlikely(result < 0))
+ return (int) -1;
+ if (unlikely(result == 1))
+ goto raise_neg_overflow;
+ }
+#endif
+ if (sizeof(int) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
+ }
+ } else {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (int) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
+ case -2:
+ if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 2:
+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case -3:
+ if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case -4:
+ if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
+ return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ }
+#endif
+ if (sizeof(int) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
+ }
+ }
+ {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+ PyErr_SetString(PyExc_RuntimeError,
+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+ int val;
+ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+#endif
+ return (int) -1;
+ }
+ } else {
+ int val;
+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+ if (!tmp) return (int) -1;
+ val = __Pyx_PyInt_As_int(tmp);
+ Py_DECREF(tmp);
+ return val;
+ }
+raise_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "value too large to convert to int");
+ return (int) -1;
+raise_neg_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "can't convert negative value to int");
+ return (int) -1;
+}
+
+/* FastTypeChecks */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
+ while (a) {
+ a = a->tp_base;
+ if (a == b)
+ return 1;
+ }
+ return b == &PyBaseObject_Type;
+}
+static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
+ PyObject *mro;
+ if (a == b) return 1;
+ mro = a->tp_mro;
+ if (likely(mro)) {
+ Py_ssize_t i, n;
+ n = PyTuple_GET_SIZE(mro);
+ for (i = 0; i < n; i++) {
+ if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
+ return 1;
+ }
+ return 0;
+ }
+ return __Pyx_InBases(a, b);
+}
+#if PY_MAJOR_VERSION == 2
+static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
+ PyObject *exception, *value, *tb;
+ int res;
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrFetch(&exception, &value, &tb);
+ res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
+ if (unlikely(res == -1)) {
+ PyErr_WriteUnraisable(err);
+ res = 0;
+ }
+ if (!res) {
+ res = PyObject_IsSubclass(err, exc_type2);
+ if (unlikely(res == -1)) {
+ PyErr_WriteUnraisable(err);
+ res = 0;
+ }
+ }
+ __Pyx_ErrRestore(exception, value, tb);
+ return res;
+}
+#else
+static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
+ int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
+ if (!res) {
+ res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
+ }
+ return res;
+}
+#endif
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
+ if (likely(err == exc_type)) return 1;
+ if (likely(PyExceptionClass_Check(err))) {
+ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
+ }
+ return PyErr_GivenExceptionMatches(err, exc_type);
+}
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
+ if (likely(err == exc_type1 || err == exc_type2)) return 1;
+ if (likely(PyExceptionClass_Check(err))) {
+ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
+ }
+ return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
+}
+#endif
+
+/* FetchCommonType */
+ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
+ PyObject* fake_module;
+ PyTypeObject* cached_type = NULL;
+ fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
+ if (!fake_module) return NULL;
+ Py_INCREF(fake_module);
+ cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
+ if (cached_type) {
+ if (!PyType_Check((PyObject*)cached_type)) {
+ PyErr_Format(PyExc_TypeError,
+ "Shared Cython type %.200s is not a type object",
+ type->tp_name);
+ goto bad;
+ }
+ if (cached_type->tp_basicsize != type->tp_basicsize) {
+ PyErr_Format(PyExc_TypeError,
+ "Shared Cython type %.200s has the wrong size, try recompiling",
+ type->tp_name);
+ goto bad;
+ }
+ } else {
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
+ PyErr_Clear();
+ if (PyType_Ready(type) < 0) goto bad;
+ if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
+ goto bad;
+ Py_INCREF(type);
+ cached_type = type;
+ }
+done:
+ Py_DECREF(fake_module);
+ return cached_type;
+bad:
+ Py_XDECREF(cached_type);
+ cached_type = NULL;
+ goto done;
+}
+
+/* SwapException */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ #if PY_VERSION_HEX >= 0x030700A2
+ tmp_type = tstate->exc_state.exc_type;
+ tmp_value = tstate->exc_state.exc_value;
+ tmp_tb = tstate->exc_state.exc_traceback;
+ tstate->exc_state.exc_type = *type;
+ tstate->exc_state.exc_value = *value;
+ tstate->exc_state.exc_traceback = *tb;
+ #else
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = *type;
+ tstate->exc_value = *value;
+ tstate->exc_traceback = *tb;
+ #endif
+ *type = tmp_type;
+ *value = tmp_value;
+ *tb = tmp_tb;
+}
+#else
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
+ PyErr_SetExcInfo(*type, *value, *tb);
+ *type = tmp_type;
+ *value = tmp_value;
+ *tb = tmp_tb;
+}
+#endif
+
+/* PyObjectCallMethod1 */
+ static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
+ PyObject *result = NULL;
+#if CYTHON_UNPACK_METHODS
+ if (likely(PyMethod_Check(method))) {
+ PyObject *self = PyMethod_GET_SELF(method);
+ if (likely(self)) {
+ PyObject *args;
+ PyObject *function = PyMethod_GET_FUNCTION(method);
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(function)) {
+ PyObject *args[2] = {self, arg};
+ result = __Pyx_PyFunction_FastCall(function, args, 2);
+ goto done;
+ }
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(function)) {
+ PyObject *args[2] = {self, arg};
+ result = __Pyx_PyCFunction_FastCall(function, args, 2);
+ goto done;
+ }
+ #endif
+ args = PyTuple_New(2);
+ if (unlikely(!args)) goto done;
+ Py_INCREF(self);
+ PyTuple_SET_ITEM(args, 0, self);
+ Py_INCREF(arg);
+ PyTuple_SET_ITEM(args, 1, arg);
+ Py_INCREF(function);
+ result = __Pyx_PyObject_Call(function, args, NULL);
+ Py_DECREF(args);
+ Py_DECREF(function);
+ return result;
+ }
+ }
+#endif
+ result = __Pyx_PyObject_CallOneArg(method, arg);
+ goto done;
+done:
+ return result;
+}
+static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
+ PyObject *method, *result = NULL;
+ method = __Pyx_PyObject_GetAttrStr(obj, method_name);
+ if (unlikely(!method)) goto done;
+ result = __Pyx__PyObject_CallMethod1(method, arg);
+done:
+ Py_XDECREF(method);
+ return result;
+}
+
+/* CoroutineBase */
+ #include
+#include
+#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
+static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
+ PyObject *et, *ev, *tb;
+ PyObject *value = NULL;
+ __Pyx_ErrFetch(&et, &ev, &tb);
+ if (!et) {
+ Py_XDECREF(tb);
+ Py_XDECREF(ev);
+ Py_INCREF(Py_None);
+ *pvalue = Py_None;
+ return 0;
+ }
+ if (likely(et == PyExc_StopIteration)) {
+ if (!ev) {
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+#if PY_VERSION_HEX >= 0x030300A0
+ else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
+ value = ((PyStopIterationObject *)ev)->value;
+ Py_INCREF(value);
+ Py_DECREF(ev);
+ }
+#endif
+ else if (unlikely(PyTuple_Check(ev))) {
+ if (PyTuple_GET_SIZE(ev) >= 1) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ value = PyTuple_GET_ITEM(ev, 0);
+ Py_INCREF(value);
+#else
+ value = PySequence_ITEM(ev, 0);
+#endif
+ } else {
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+ Py_DECREF(ev);
+ }
+ else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
+ value = ev;
+ }
+ if (likely(value)) {
+ Py_XDECREF(tb);
+ Py_DECREF(et);
+ *pvalue = value;
+ return 0;
+ }
+ } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
+ __Pyx_ErrRestore(et, ev, tb);
+ return -1;
+ }
+ PyErr_NormalizeException(&et, &ev, &tb);
+ if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
+ __Pyx_ErrRestore(et, ev, tb);
+ return -1;
+ }
+ Py_XDECREF(tb);
+ Py_DECREF(et);
+#if PY_VERSION_HEX >= 0x030300A0
+ value = ((PyStopIterationObject *)ev)->value;
+ Py_INCREF(value);
+ Py_DECREF(ev);
+#else
+ {
+ PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
+ Py_DECREF(ev);
+ if (likely(args)) {
+ value = PySequence_GetItem(args, 0);
+ Py_DECREF(args);
+ }
+ if (unlikely(!value)) {
+ __Pyx_ErrRestore(NULL, NULL, NULL);
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+ }
+#endif
+ *pvalue = value;
+ return 0;
+}
+static CYTHON_INLINE
+void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
+ PyObject *exc_type = self->exc_type;
+ PyObject *exc_value = self->exc_value;
+ PyObject *exc_traceback = self->exc_traceback;
+ self->exc_type = NULL;
+ self->exc_value = NULL;
+ self->exc_traceback = NULL;
+ Py_XDECREF(exc_type);
+ Py_XDECREF(exc_value);
+ Py_XDECREF(exc_traceback);
+}
+#define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
+static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
+ const char *msg;
+ if (0) {
+ #ifdef __Pyx_Coroutine_USED
+ } else if (__Pyx_Coroutine_CheckExact((PyObject*)gen)) {
+ msg = "coroutine already executing";
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
+ msg = "async generator already executing";
+ #endif
+ } else {
+ msg = "generator already executing";
+ }
+ PyErr_SetString(PyExc_ValueError, msg);
+}
+#define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
+static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
+ const char *msg;
+ if (0) {
+ #ifdef __Pyx_Coroutine_USED
+ } else if (__Pyx_Coroutine_CheckExact(gen)) {
+ msg = "can't send non-None value to a just-started coroutine";
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ } else if (__Pyx_AsyncGen_CheckExact(gen)) {
+ msg = "can't send non-None value to a just-started async generator";
+ #endif
+ } else {
+ msg = "can't send non-None value to a just-started generator";
+ }
+ PyErr_SetString(PyExc_TypeError, msg);
+}
+#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
+static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
+ #ifdef __Pyx_Coroutine_USED
+ if (!closing && __Pyx_Coroutine_CheckExact(gen)) {
+ PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
+ } else
+ #endif
+ if (value) {
+ #ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(gen))
+ PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
+ else
+ #endif
+ PyErr_SetNone(PyExc_StopIteration);
+ }
+}
+static
+PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
+ __Pyx_PyThreadState_declare
+ PyThreadState *tstate;
+ PyObject *retval;
+ assert(!self->is_running);
+ if (unlikely(self->resume_label == 0)) {
+ if (unlikely(value && value != Py_None)) {
+ return __Pyx_Coroutine_NotStartedError((PyObject*)self);
+ }
+ }
+ if (unlikely(self->resume_label == -1)) {
+ return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
+ }
+#if CYTHON_FAST_THREAD_STATE
+ __Pyx_PyThreadState_assign
+ tstate = __pyx_tstate;
+#else
+ tstate = __Pyx_PyThreadState_Current;
+#endif
+ if (self->exc_type) {
+#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
+#else
+ if (self->exc_traceback) {
+ PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
+ PyFrameObject *f = tb->tb_frame;
+ Py_XINCREF(tstate->frame);
+ assert(f->f_back == NULL);
+ f->f_back = tstate->frame;
+ }
+#endif
+ __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
+ &self->exc_traceback);
+ } else {
+ __Pyx_Coroutine_ExceptionClear(self);
+ __Pyx_ExceptionSave(&self->exc_type, &self->exc_value, &self->exc_traceback);
+ }
+ self->is_running = 1;
+ retval = self->body((PyObject *) self, tstate, value);
+ self->is_running = 0;
+ return retval;
+}
+static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self) {
+ if (likely(self->exc_traceback)) {
+#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
+#else
+ PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
+ PyFrameObject *f = tb->tb_frame;
+ Py_CLEAR(f->f_back);
+#endif
+ }
+}
+static CYTHON_INLINE
+PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
+ if (unlikely(!retval)) {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ if (!__Pyx_PyErr_Occurred()) {
+ PyObject *exc = PyExc_StopIteration;
+ #ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(gen))
+ exc = __Pyx_PyExc_StopAsyncIteration;
+ #endif
+ __Pyx_PyErr_SetNone(exc);
+ }
+ }
+ return retval;
+}
+static CYTHON_INLINE
+PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
+ PyObject *ret;
+ PyObject *val = NULL;
+ __Pyx_Coroutine_Undelegate(gen);
+ __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
+ ret = __Pyx_Coroutine_SendEx(gen, val, 0);
+ Py_XDECREF(val);
+ return ret;
+}
+static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
+ PyObject *retval;
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
+ PyObject *yf = gen->yieldfrom;
+ if (unlikely(gen->is_running))
+ return __Pyx_Coroutine_AlreadyRunningError(gen);
+ if (yf) {
+ PyObject *ret;
+ gen->is_running = 1;
+ #ifdef __Pyx_Generator_USED
+ if (__Pyx_Generator_CheckExact(yf)) {
+ ret = __Pyx_Coroutine_Send(yf, value);
+ } else
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ if (__Pyx_Coroutine_CheckExact(yf)) {
+ ret = __Pyx_Coroutine_Send(yf, value);
+ } else
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
+ ret = __Pyx_async_gen_asend_send(yf, value);
+ } else
+ #endif
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
+ if (PyGen_CheckExact(yf)) {
+ ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
+ } else
+ #endif
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
+ if (PyCoro_CheckExact(yf)) {
+ ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
+ } else
+ #endif
+ {
+ if (value == Py_None)
+ ret = Py_TYPE(yf)->tp_iternext(yf);
+ else
+ ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
+ }
+ gen->is_running = 0;
+ if (likely(ret)) {
+ return ret;
+ }
+ retval = __Pyx_Coroutine_FinishDelegation(gen);
+ } else {
+ retval = __Pyx_Coroutine_SendEx(gen, value, 0);
+ }
+ return __Pyx_Coroutine_MethodReturn(self, retval);
+}
+static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
+ PyObject *retval = NULL;
+ int err = 0;
+ #ifdef __Pyx_Generator_USED
+ if (__Pyx_Generator_CheckExact(yf)) {
+ retval = __Pyx_Coroutine_Close(yf);
+ if (!retval)
+ return -1;
+ } else
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ if (__Pyx_Coroutine_CheckExact(yf)) {
+ retval = __Pyx_Coroutine_Close(yf);
+ if (!retval)
+ return -1;
+ } else
+ if (__Pyx_CoroutineAwait_CheckExact(yf)) {
+ retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf);
+ if (!retval)
+ return -1;
+ } else
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
+ retval = __Pyx_async_gen_asend_close(yf, NULL);
+ } else
+ if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
+ retval = __Pyx_async_gen_athrow_close(yf, NULL);
+ } else
+ #endif
+ {
+ PyObject *meth;
+ gen->is_running = 1;
+ meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
+ if (unlikely(!meth)) {
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_WriteUnraisable(yf);
+ }
+ PyErr_Clear();
+ } else {
+ retval = PyObject_CallFunction(meth, NULL);
+ Py_DECREF(meth);
+ if (!retval)
+ err = -1;
+ }
+ gen->is_running = 0;
+ }
+ Py_XDECREF(retval);
+ return err;
+}
+static PyObject *__Pyx_Generator_Next(PyObject *self) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
+ PyObject *yf = gen->yieldfrom;
+ if (unlikely(gen->is_running))
+ return __Pyx_Coroutine_AlreadyRunningError(gen);
+ if (yf) {
+ PyObject *ret;
+ gen->is_running = 1;
+ #ifdef __Pyx_Generator_USED
+ if (__Pyx_Generator_CheckExact(yf)) {
+ ret = __Pyx_Generator_Next(yf);
+ } else
+ #endif
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
+ if (PyGen_CheckExact(yf)) {
+ ret = _PyGen_Send((PyGenObject*)yf, NULL);
+ } else
+ #endif
+ ret = Py_TYPE(yf)->tp_iternext(yf);
+ gen->is_running = 0;
+ if (likely(ret)) {
+ return ret;
+ }
+ return __Pyx_Coroutine_FinishDelegation(gen);
+ }
+ return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
+}
+static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ PyObject *retval, *raised_exception;
+ PyObject *yf = gen->yieldfrom;
+ int err = 0;
+ if (unlikely(gen->is_running))
+ return __Pyx_Coroutine_AlreadyRunningError(gen);
+ if (yf) {
+ Py_INCREF(yf);
+ err = __Pyx_Coroutine_CloseIter(gen, yf);
+ __Pyx_Coroutine_Undelegate(gen);
+ Py_DECREF(yf);
+ }
+ if (err == 0)
+ PyErr_SetNone(PyExc_GeneratorExit);
+ retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
+ if (unlikely(retval)) {
+ const char *msg;
+ Py_DECREF(retval);
+ if ((0)) {
+ #ifdef __Pyx_Coroutine_USED
+ } else if (__Pyx_Coroutine_CheckExact(self)) {
+ msg = "coroutine ignored GeneratorExit";
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ } else if (__Pyx_AsyncGen_CheckExact(self)) {
+#if PY_VERSION_HEX < 0x03060000
+ msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
+#else
+ msg = "async generator ignored GeneratorExit";
+#endif
+ #endif
+ } else {
+ msg = "generator ignored GeneratorExit";
+ }
+ PyErr_SetString(PyExc_RuntimeError, msg);
+ return NULL;
+ }
+ raised_exception = PyErr_Occurred();
+ if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
+ if (raised_exception) PyErr_Clear();
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ return NULL;
+}
+static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
+ PyObject *args, int close_on_genexit) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ PyObject *yf = gen->yieldfrom;
+ if (unlikely(gen->is_running))
+ return __Pyx_Coroutine_AlreadyRunningError(gen);
+ if (yf) {
+ PyObject *ret;
+ Py_INCREF(yf);
+ if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
+ int err = __Pyx_Coroutine_CloseIter(gen, yf);
+ Py_DECREF(yf);
+ __Pyx_Coroutine_Undelegate(gen);
+ if (err < 0)
+ return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
+ goto throw_here;
+ }
+ gen->is_running = 1;
+ if (0
+ #ifdef __Pyx_Generator_USED
+ || __Pyx_Generator_CheckExact(yf)
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ || __Pyx_Coroutine_CheckExact(yf)
+ #endif
+ ) {
+ ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
+ #ifdef __Pyx_Coroutine_USED
+ } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
+ ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
+ #endif
+ } else {
+ PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
+ if (unlikely(!meth)) {
+ Py_DECREF(yf);
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ gen->is_running = 0;
+ return NULL;
+ }
+ PyErr_Clear();
+ __Pyx_Coroutine_Undelegate(gen);
+ gen->is_running = 0;
+ goto throw_here;
+ }
+ if (likely(args)) {
+ ret = PyObject_CallObject(meth, args);
+ } else {
+ ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
+ }
+ Py_DECREF(meth);
+ }
+ gen->is_running = 0;
+ Py_DECREF(yf);
+ if (!ret) {
+ ret = __Pyx_Coroutine_FinishDelegation(gen);
+ }
+ return __Pyx_Coroutine_MethodReturn(self, ret);
+ }
+throw_here:
+ __Pyx_Raise(typ, val, tb, NULL);
+ return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
+}
+static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
+ PyObject *typ;
+ PyObject *val = NULL;
+ PyObject *tb = NULL;
+ if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
+ return NULL;
+ return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
+}
+static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
+ Py_VISIT(gen->closure);
+ Py_VISIT(gen->classobj);
+ Py_VISIT(gen->yieldfrom);
+ Py_VISIT(gen->exc_type);
+ Py_VISIT(gen->exc_value);
+ Py_VISIT(gen->exc_traceback);
+ return 0;
+}
+static int __Pyx_Coroutine_clear(PyObject *self) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ Py_CLEAR(gen->closure);
+ Py_CLEAR(gen->classobj);
+ Py_CLEAR(gen->yieldfrom);
+ Py_CLEAR(gen->exc_type);
+ Py_CLEAR(gen->exc_value);
+ Py_CLEAR(gen->exc_traceback);
+#ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(self)) {
+ Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
+ }
+#endif
+ Py_CLEAR(gen->gi_name);
+ Py_CLEAR(gen->gi_qualname);
+ Py_CLEAR(gen->gi_modulename);
+ return 0;
+}
+static void __Pyx_Coroutine_dealloc(PyObject *self) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ PyObject_GC_UnTrack(gen);
+ if (gen->gi_weakreflist != NULL)
+ PyObject_ClearWeakRefs(self);
+ if (gen->resume_label >= 0) {
+ PyObject_GC_Track(self);
+#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
+ if (PyObject_CallFinalizerFromDealloc(self))
+#else
+ Py_TYPE(gen)->tp_del(self);
+ if (self->ob_refcnt > 0)
+#endif
+ {
+ return;
+ }
+ PyObject_GC_UnTrack(self);
+ }
+#ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(self)) {
+ /* We have to handle this case for asynchronous generators
+ right here, because this code has to be between UNTRACK
+ and GC_Del. */
+ Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
+ }
+#endif
+ __Pyx_Coroutine_clear(self);
+ PyObject_GC_Del(gen);
+}
+static void __Pyx_Coroutine_del(PyObject *self) {
+ PyObject *error_type, *error_value, *error_traceback;
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ __Pyx_PyThreadState_declare
+ if (gen->resume_label < 0) {
+ return;
+ }
+#if !CYTHON_USE_TP_FINALIZE
+ assert(self->ob_refcnt == 0);
+ self->ob_refcnt = 1;
+#endif
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
+#ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(self)) {
+ __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
+ PyObject *finalizer = agen->ag_finalizer;
+ if (finalizer && !agen->ag_closed) {
+ PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
+ if (unlikely(!res)) {
+ PyErr_WriteUnraisable(self);
+ } else {
+ Py_DECREF(res);
+ }
+ __Pyx_ErrRestore(error_type, error_value, error_traceback);
+ return;
+ }
+ }
+#endif
+ if (unlikely(gen->resume_label == 0 && !error_value)) {
+#ifdef __Pyx_Coroutine_USED
+#ifdef __Pyx_Generator_USED
+ if (!__Pyx_Generator_CheckExact(self))
+#endif
+ {
+ PyObject_GC_UnTrack(self);
+#if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
+ if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
+ PyErr_WriteUnraisable(self);
+#else
+ {PyObject *msg;
+ char *cmsg;
+ #if CYTHON_COMPILING_IN_PYPY
+ msg = NULL;
+ cmsg = (char*) "coroutine was never awaited";
+ #else
+ char *cname;
+ PyObject *qualname;
+ qualname = gen->gi_qualname;
+ cname = PyString_AS_STRING(qualname);
+ msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
+ if (unlikely(!msg)) {
+ PyErr_Clear();
+ cmsg = (char*) "coroutine was never awaited";
+ } else {
+ cmsg = PyString_AS_STRING(msg);
+ }
+ #endif
+ if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
+ PyErr_WriteUnraisable(self);
+ Py_XDECREF(msg);}
+#endif
+ PyObject_GC_Track(self);
+ }
+#endif
+ } else {
+ PyObject *res = __Pyx_Coroutine_Close(self);
+ if (unlikely(!res)) {
+ if (PyErr_Occurred())
+ PyErr_WriteUnraisable(self);
+ } else {
+ Py_DECREF(res);
+ }
+ }
+ __Pyx_ErrRestore(error_type, error_value, error_traceback);
+#if !CYTHON_USE_TP_FINALIZE
+ assert(self->ob_refcnt > 0);
+ if (--self->ob_refcnt == 0) {
+ return;
+ }
+ {
+ Py_ssize_t refcnt = self->ob_refcnt;
+ _Py_NewReference(self);
+ self->ob_refcnt = refcnt;
+ }
+#if CYTHON_COMPILING_IN_CPYTHON
+ assert(PyType_IS_GC(self->ob_type) &&
+ _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
+ _Py_DEC_REFTOTAL;
+#endif
+#ifdef COUNT_ALLOCS
+ --Py_TYPE(self)->tp_frees;
+ --Py_TYPE(self)->tp_allocs;
+#endif
+#endif
+}
+static PyObject *
+__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
+{
+ PyObject *name = self->gi_name;
+ if (unlikely(!name)) name = Py_None;
+ Py_INCREF(name);
+ return name;
+}
+static int
+__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
+{
+ PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+ if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+ if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+ PyErr_SetString(PyExc_TypeError,
+ "__name__ must be set to a string object");
+ return -1;
+ }
+ tmp = self->gi_name;
+ Py_INCREF(value);
+ self->gi_name = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
+{
+ PyObject *name = self->gi_qualname;
+ if (unlikely(!name)) name = Py_None;
+ Py_INCREF(name);
+ return name;
+}
+static int
+__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
+{
+ PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+ if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+ if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+ PyErr_SetString(PyExc_TypeError,
+ "__qualname__ must be set to a string object");
+ return -1;
+ }
+ tmp = self->gi_qualname;
+ Py_INCREF(value);
+ self->gi_qualname = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static __pyx_CoroutineObject *__Pyx__Coroutine_New(
+ PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *closure,
+ PyObject *name, PyObject *qualname, PyObject *module_name) {
+ __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
+ if (unlikely(!gen))
+ return NULL;
+ return __Pyx__Coroutine_NewInit(gen, body, closure, name, qualname, module_name);
+}
+static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
+ __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *closure,
+ PyObject *name, PyObject *qualname, PyObject *module_name) {
+ gen->body = body;
+ gen->closure = closure;
+ Py_XINCREF(closure);
+ gen->is_running = 0;
+ gen->resume_label = 0;
+ gen->classobj = NULL;
+ gen->yieldfrom = NULL;
+ gen->exc_type = NULL;
+ gen->exc_value = NULL;
+ gen->exc_traceback = NULL;
+ gen->gi_weakreflist = NULL;
+ Py_XINCREF(qualname);
+ gen->gi_qualname = qualname;
+ Py_XINCREF(name);
+ gen->gi_name = name;
+ Py_XINCREF(module_name);
+ gen->gi_modulename = module_name;
+ PyObject_GC_Track(gen);
+ return gen;
+}
+
+/* PatchModuleWithCoroutine */
+ static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
+#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+ int result;
+ PyObject *globals, *result_obj;
+ globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
+ result = PyDict_SetItemString(globals, "_cython_coroutine_type",
+ #ifdef __Pyx_Coroutine_USED
+ (PyObject*)__pyx_CoroutineType);
+ #else
+ Py_None);
+ #endif
+ if (unlikely(result < 0)) goto ignore;
+ result = PyDict_SetItemString(globals, "_cython_generator_type",
+ #ifdef __Pyx_Generator_USED
+ (PyObject*)__pyx_GeneratorType);
+ #else
+ Py_None);
+ #endif
+ if (unlikely(result < 0)) goto ignore;
+ if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
+ if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
+ result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
+ if (unlikely(!result_obj)) goto ignore;
+ Py_DECREF(result_obj);
+ Py_DECREF(globals);
+ return module;
+ignore:
+ Py_XDECREF(globals);
+ PyErr_WriteUnraisable(module);
+ if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
+ Py_DECREF(module);
+ module = NULL;
+ }
+#else
+ py_code++;
+#endif
+ return module;
+}
+
+/* PatchGeneratorABC */
+ #ifndef CYTHON_REGISTER_ABCS
+#define CYTHON_REGISTER_ABCS 1
+#endif
+#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+static PyObject* __Pyx_patch_abc_module(PyObject *module);
+static PyObject* __Pyx_patch_abc_module(PyObject *module) {
+ module = __Pyx_Coroutine_patch_module(
+ module, ""
+"if _cython_generator_type is not None:\n"
+" try: Generator = _module.Generator\n"
+" except AttributeError: pass\n"
+" else: Generator.register(_cython_generator_type)\n"
+"if _cython_coroutine_type is not None:\n"
+" try: Coroutine = _module.Coroutine\n"
+" except AttributeError: pass\n"
+" else: Coroutine.register(_cython_coroutine_type)\n"
+ );
+ return module;
+}
+#endif
+static int __Pyx_patch_abc(void) {
+#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+ static int abc_patched = 0;
+ if (CYTHON_REGISTER_ABCS && !abc_patched) {
+ PyObject *module;
+ module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
+ if (!module) {
+ PyErr_WriteUnraisable(NULL);
+ if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
+ ((PY_MAJOR_VERSION >= 3) ?
+ "Cython module failed to register with collections.abc module" :
+ "Cython module failed to register with collections module"), 1) < 0)) {
+ return -1;
+ }
+ } else {
+ module = __Pyx_patch_abc_module(module);
+ abc_patched = 1;
+ if (unlikely(!module))
+ return -1;
+ Py_DECREF(module);
+ }
+ module = PyImport_ImportModule("backports_abc");
+ if (module) {
+ module = __Pyx_patch_abc_module(module);
+ Py_XDECREF(module);
+ }
+ if (!module) {
+ PyErr_Clear();
+ }
+ }
+#else
+ if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
+#endif
+ return 0;
+}
+
+/* Generator */
+ static PyMethodDef __pyx_Generator_methods[] = {
+ {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
+ (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
+ {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
+ (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
+ {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
+ (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
+ {0, 0, 0, 0}
+};
+static PyMemberDef __pyx_Generator_memberlist[] = {
+ {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
+ {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
+ (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
+ {0, 0, 0, 0, 0}
+};
+static PyGetSetDef __pyx_Generator_getsets[] = {
+ {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
+ (char*) PyDoc_STR("name of the generator"), 0},
+ {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
+ (char*) PyDoc_STR("qualified name of the generator"), 0},
+ {0, 0, 0, 0, 0}
+};
+static PyTypeObject __pyx_GeneratorType_type = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "generator",
+ sizeof(__pyx_CoroutineObject),
+ 0,
+ (destructor) __Pyx_Coroutine_dealloc,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
+ 0,
+ (traverseproc) __Pyx_Coroutine_traverse,
+ 0,
+ 0,
+ offsetof(__pyx_CoroutineObject, gi_weakreflist),
+ 0,
+ (iternextfunc) __Pyx_Generator_Next,
+ __pyx_Generator_methods,
+ __pyx_Generator_memberlist,
+ __pyx_Generator_getsets,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+#if CYTHON_USE_TP_FINALIZE
+ 0,
+#else
+ __Pyx_Coroutine_del,
+#endif
+ 0,
+#if CYTHON_USE_TP_FINALIZE
+ __Pyx_Coroutine_del,
+#elif PY_VERSION_HEX >= 0x030400a1
+ 0,
+#endif
+};
+static int __pyx_Generator_init(void) {
+ __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
+ __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
+ __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
+ if (unlikely(!__pyx_GeneratorType)) {
+ return -1;
+ }
+ return 0;
+}
+
+/* CheckBinaryVersion */
+ static int __Pyx_check_binary_version(void) {
+ char ctversion[4], rtversion[4];
+ PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
+ PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
+ if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
+ char message[200];
+ PyOS_snprintf(message, sizeof(message),
+ "compiletime version %s of module '%.100s' "
+ "does not match runtime version %s",
+ ctversion, __Pyx_MODULE_NAME, rtversion);
+ return PyErr_WarnEx(NULL, message, 1);
+ }
+ return 0;
+}
+
+/* InitStrings */
+ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
+ while (t->p) {
+ #if PY_MAJOR_VERSION < 3
+ if (t->is_unicode) {
+ *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
+ } else if (t->intern) {
+ *t->p = PyString_InternFromString(t->s);
+ } else {
+ *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
+ }
+ #else
+ if (t->is_unicode | t->is_str) {
+ if (t->intern) {
+ *t->p = PyUnicode_InternFromString(t->s);
+ } else if (t->encoding) {
+ *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
+ } else {
+ *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+ }
+ } else {
+ *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
+ }
+ #endif
+ if (!*t->p)
+ return -1;
+ if (PyObject_Hash(*t->p) == -1)
+ PyErr_Clear();
+ ++t;
+ }
+ return 0;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
+ return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
+}
+static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
+ Py_ssize_t ignore;
+ return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+#if !CYTHON_PEP393_ENABLED
+static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+ char* defenc_c;
+ PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+ if (!defenc) return NULL;
+ defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ {
+ char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+ char* c;
+ for (c = defenc_c; c < end; c++) {
+ if ((unsigned char) (*c) >= 128) {
+ PyUnicode_AsASCIIString(o);
+ return NULL;
+ }
+ }
+ }
+#endif
+ *length = PyBytes_GET_SIZE(defenc);
+ return defenc_c;
+}
+#else
+static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+ if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ if (likely(PyUnicode_IS_ASCII(o))) {
+ *length = PyUnicode_GET_LENGTH(o);
+ return PyUnicode_AsUTF8(o);
+ } else {
+ PyUnicode_AsASCIIString(o);
+ return NULL;
+ }
+#else
+ return PyUnicode_AsUTF8AndSize(o, length);
+#endif
+}
+#endif
+#endif
+static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+ if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+ PyUnicode_Check(o)) {
+ return __Pyx_PyUnicode_AsStringAndSize(o, length);
+ } else
+#endif
+#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
+ if (PyByteArray_Check(o)) {
+ *length = PyByteArray_GET_SIZE(o);
+ return PyByteArray_AS_STRING(o);
+ } else
+#endif
+ {
+ char* result;
+ int r = PyBytes_AsStringAndSize(o, &result, length);
+ if (unlikely(r < 0)) {
+ return NULL;
+ } else {
+ return result;
+ }
+ }
+}
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+ int is_true = x == Py_True;
+ if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
+ else return PyObject_IsTrue(x);
+}
+static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
+#if PY_MAJOR_VERSION >= 3
+ if (PyLong_Check(result)) {
+ if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
+ "__int__ returned non-int (type %.200s). "
+ "The ability to return an instance of a strict subclass of int "
+ "is deprecated, and may be removed in a future version of Python.",
+ Py_TYPE(result)->tp_name)) {
+ Py_DECREF(result);
+ return NULL;
+ }
+ return result;
+ }
+#endif
+ PyErr_Format(PyExc_TypeError,
+ "__%.4s__ returned non-%.4s (type %.200s)",
+ type_name, type_name, Py_TYPE(result)->tp_name);
+ Py_DECREF(result);
+ return NULL;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
+#if CYTHON_USE_TYPE_SLOTS
+ PyNumberMethods *m;
+#endif
+ const char *name = NULL;
+ PyObject *res = NULL;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x) || PyLong_Check(x)))
+#else
+ if (likely(PyLong_Check(x)))
+#endif
+ return __Pyx_NewRef(x);
+#if CYTHON_USE_TYPE_SLOTS
+ m = Py_TYPE(x)->tp_as_number;
+ #if PY_MAJOR_VERSION < 3
+ if (m && m->nb_int) {
+ name = "int";
+ res = m->nb_int(x);
+ }
+ else if (m && m->nb_long) {
+ name = "long";
+ res = m->nb_long(x);
+ }
+ #else
+ if (likely(m && m->nb_int)) {
+ name = "int";
+ res = m->nb_int(x);
+ }
+ #endif
+#else
+ if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
+ res = PyNumber_Int(x);
+ }
+#endif
+ if (likely(res)) {
+#if PY_MAJOR_VERSION < 3
+ if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
+#else
+ if (unlikely(!PyLong_CheckExact(res))) {
+#endif
+ return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
+ }
+ }
+ else if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_TypeError,
+ "an integer is required");
+ }
+ return res;
+}
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+ Py_ssize_t ival;
+ PyObject *x;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(b))) {
+ if (sizeof(Py_ssize_t) >= sizeof(long))
+ return PyInt_AS_LONG(b);
+ else
+ return PyInt_AsSsize_t(x);
+ }
+#endif
+ if (likely(PyLong_CheckExact(b))) {
+ #if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)b)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(b);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ ival = likely(size) ? digits[0] : 0;
+ if (size == -1) ival = -ival;
+ return ival;
+ } else {
+ switch (size) {
+ case 2:
+ if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -2:
+ if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case 3:
+ if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -3:
+ if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case 4:
+ if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -4:
+ if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ }
+ }
+ #endif
+ return PyLong_AsSsize_t(b);
+ }
+ x = PyNumber_Index(b);
+ if (!x) return -1;
+ ival = PyInt_AsSsize_t(x);
+ Py_DECREF(x);
+ return ival;
+}
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+ return PyInt_FromSize_t(ival);
+}
+
+
+#endif /* Py_PYTHON_H */
diff --git a/pyomo/core/util.py b/pyomo/core/util.py
new file mode 100644
index 00000000000..8e5a9e9c2b9
--- /dev/null
+++ b/pyomo/core/util.py
@@ -0,0 +1,283 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+
+#
+# Utility functions
+#
+
+__all__ = ['sum_product', 'summation', 'dot_product', 'sequence', 'prod', 'quicksum']
+
+from six.moves import xrange
+from functools import reduce
+import operator
+from pyomo.core.expr.numvalue import native_numeric_types
+from pyomo.core.expr.expr_pyomo5 import decompose_term
+from pyomo.core.expr import current as EXPR
+import pyomo.core.base.var
+
+
+def prod(terms):
+ """
+ A utility function to compute the product of a list of terms.
+
+ Args:
+ terms (list): A list of terms that are multiplied together.
+
+ Returns:
+ The value of the product, which may be a Pyomo expression object.
+ """
+ ans = 1
+ for term in terms:
+ ans *= term
+ return ans
+
+
+def quicksum(args, start=0, linear=None):
+ """
+ A utility function to compute a sum of Pyomo expressions.
+
+ The behavior of :func:`quicksum` is similar to the builtin :func:`sum`
+ function, but this function generates a more compact Pyomo
+ expression.
+
+ Args:
+ args: A generator for terms in the sum.
+
+ start: A value that is initializes the sum. If
+ this value is not a numeric constant, then the +=
+ operator is used to add terms to this object.
+ Defaults to zero.
+
+ linear: If :attr:`start` is not a numeric constant, then this
+ option is ignored. Otherwise, this value indicates
+ whether the terms in the sum are linear. If the value
+ is :const:`False`, then the terms are
+ treated as nonlinear, and if :const:`True`, then
+ the terms are treated as linear. Default is
+ :const:`None`, which indicates that the first term
+ in the :attr:`args` is used to determine this value.
+
+ Returns:
+ The value of the sum, which may be a Pyomo expression object.
+ """
+ #
+ # If we're starting with a numeric value, then
+ # create a new nonlinear sum expression but
+ # return a static version to the user.
+ #
+ if start.__class__ in native_numeric_types:
+ if linear is None:
+ #
+ # Get the first term, which we will test for linearity
+ #
+ try:
+ first = next(args, None)
+ except:
+ try:
+ args = args.__iter__()
+ first = next(args, None)
+ except:
+ raise RuntimeError("The argument to quicksum() is not iterable!")
+ if first is None:
+ return start
+ #
+ # Check if the first term is linear, and if so return the terms
+ #
+ linear, terms = decompose_term(first)
+ #
+ # Right now Pyomo5 expressions can only handle single linear
+ # terms.
+ #
+ # Also, we treat linear expressions as nonlinear if the constant
+ # term is not a native numeric type. Otherwise, large summation
+ # objects are created for the constant term.
+ #
+ if linear:
+ nvar=0
+ for term in terms:
+ c,v = term
+ if not v is None:
+ nvar += 1
+ elif not c.__class__ in native_numeric_types:
+ linear = False
+ if nvar > 1:
+ linear = False
+ start = start+first
+ if linear:
+ with EXPR.linear_expression() as e:
+ e += start
+ for arg in args:
+ e += arg
+ # Return the constant term if the linear expression does not contains variables
+ if e.is_constant():
+ return e.constant
+ return e
+ else:
+ with EXPR.nonlinear_expression() as e:
+ e += start
+ for arg in args:
+ e += arg
+ if e.nargs() == 0:
+ return 0
+ elif e.nargs() == 1:
+ return e.arg(0)
+ return e
+ #
+ # Otherwise, use the context that is provided and return it.
+ #
+ e = start
+ for arg in args:
+ e += arg
+ return e
+
+
+def sum_product(*args, **kwds):
+ """
+ A utility function to compute a generalized dot product.
+
+ This function accepts one or more components that provide terms
+ that are multiplied together. These products are added together
+ to form a sum.
+
+ Args:
+ *args: Variable length argument list of generators that
+ create terms in the summation.
+ **kwds: Arbitrary keyword arguments.
+
+ Keyword Args:
+ index: A set that is used to index the components used to
+ create the terms
+ denom: A component or tuple of components that are used to
+ create the denominator of the terms
+ start: The initial value used in the sum
+
+ Returns:
+ The value of the sum.
+ """
+ denom = kwds.pop('denom', tuple() )
+ if type(denom) not in (list, tuple):
+ denom = [denom]
+ nargs = len(args)
+ ndenom = len(denom)
+
+ if nargs == 0 and ndenom == 0:
+ raise ValueError("The sum_product() command requires at least an " + \
+ "argument or a denominator term")
+
+ if 'index' in kwds:
+ index=kwds['index']
+ else:
+ if nargs > 0:
+ iarg=args[-1]
+ if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression):
+ raise ValueError("Error executing sum_product(): The last argument value must be a variable or expression object if no 'index' option is specified")
+ else:
+ iarg=denom[-1]
+ if not isinstance(iarg,pyomo.core.base.var.Var) and not isinstance(iarg, pyomo.core.base.expression.Expression):
+ raise ValueError("Error executing sum_product(): The last denom argument value must be a variable or expression object if no 'index' option is specified")
+ index = iarg.index_set()
+
+ start = kwds.get("start", 0)
+ vars_ = []
+ params_ = []
+ for arg in args:
+ if isinstance(arg, pyomo.core.base.var.Var):
+ vars_.append(arg)
+ else:
+ params_.append(arg)
+ nvars = len(vars_)
+
+ num_index = range(0,nargs)
+ if ndenom == 0:
+ #
+ # Sum of polynomial terms
+ #
+ if start.__class__ in native_numeric_types:
+ if nvars == 1:
+ v = vars_[0]
+ if len(params_) == 0:
+ with EXPR.linear_expression() as expr:
+ expr += start
+ for i in index:
+ expr += v[i]
+ elif len(params_) == 1:
+ p = params_[0]
+ with EXPR.linear_expression() as expr:
+ expr += start
+ for i in index:
+ expr += p[i]*v[i]
+ else:
+ with EXPR.linear_expression() as expr:
+ expr += start
+ for i in index:
+ term = 1
+ for j in params_:
+ term *= params_[j][i]
+ expr += term * v[i]
+ return expr
+ #
+ with EXPR.nonlinear_expression() as expr:
+ expr += start
+ for i in index:
+ term = 1
+ for j in num_index:
+ term *= args[j][i]
+ expr += term
+ return expr
+ #
+ return quicksum((prod(args[j][i] for j in num_index) for i in index), start)
+ elif nargs == 0:
+ #
+ # Sum of reciprocals
+ #
+ denom_index = range(0,ndenom)
+ return quicksum((1/prod(denom[j][i] for j in denom_index) for i in index), start)
+ else:
+ #
+ # Sum of fractions
+ #
+ denom_index = range(0,ndenom)
+ return quicksum((prod(args[j][i] for j in num_index)/prod(denom[j][i] for j in denom_index) for i in index), start)
+
+
+#: An alias for :func:`sum_product `
+dot_product = sum_product
+
+#: An alias for :func:`sum_product `
+summation = sum_product
+
+
+def sequence(*args):
+ """
+ sequence([start,] stop[, step]) -> generator for a list of integers
+
+ Return a generator that containing an arithmetic
+ progression of integers.
+ sequence(i, j) returns [i, i+1, i+2, ..., j];
+ start defaults to 1.
+ step specifies the increment (or decrement)
+ For example, sequence(4) returns [1, 2, 3, 4].
+ """
+ if len(args) == 0:
+ raise ValueError('sequence expected at least 1 arguments, got 0')
+ if len(args) > 3:
+ raise ValueError('sequence expected at most 3 arguments, got %d' % len(args))
+ if len(args) == 1:
+ return xrange(1,args[0]+1)
+ if len(args) == 2:
+ return xrange(args[0],args[1]+1)
+ return xrange(args[0],args[1]+1,args[2])
+
+
+def xsequence(*args):
+ from pyomo.util.deprecation import deprecation_warning
+ deprecation_warning("The xsequence function is deprecated. Use the sequence() function, which returns a generator.") # Remove in Pyomo 6.0
+ return sequence(*args)
+
diff --git a/pyomo/dae/simulator.py b/pyomo/dae/simulator.py
index 61894cda8d1..0680b718891 100644
--- a/pyomo/dae/simulator.py
+++ b/pyomo/dae/simulator.py
@@ -11,16 +11,10 @@
from pyomo.dae import ContinuousSet, DerivativeVar
from pyomo.dae.diffvar import DAE_Error
+from pyomo.core.expr import current as EXPR
+from pyomo.core.expr.numvalue import NumericValue, native_numeric_types, as_numeric
from pyomo.core.base.plugin import register_component
-from pyomo.core.base import expr as EXPR
-from pyomo.core.base import expr_common as common
-from pyomo.core.base.template_expr import (
- IndexTemplate,
- _GetItemIndexer,
- substitute_template_expression,
- substitute_getitem_with_param,
- substitute_template_with_value,
-)
+from pyomo.core.base.template_expr import IndexTemplate, _GetItemIndexer
from six import iterkeys, itervalues
@@ -39,6 +33,10 @@
# Check integrator availability
scipy_available = True
try:
+ import platform
+ if platform.python_implementation() == "PyPy":
+ # The scipy is importable into PyPy, but ODE integrators don't work. (2/18)
+ raise ImportError
import scipy.integrate as scipy
except ImportError:
scipy_available = False
@@ -46,6 +44,25 @@
casadi_available = True
try:
import casadi
+ casadi_intrinsic = {\
+ 'log': casadi.log,
+ 'log10': casadi.log10,
+ 'sin': casadi.sin,
+ 'cos': casadi.cos,
+ 'tan': casadi.tan,
+ 'cosh': casadi.cosh,
+ 'sinh': casadi.sinh,
+ 'tanh': casadi.tanh,
+ 'asin': casadi.asin,
+ 'acos': casadi.acos,
+ 'atan': casadi.atan,
+ 'exp': casadi.exp,
+ 'sqrt': casadi.sqrt,
+ 'asinh': casadi.asinh,
+ 'acosh': casadi.acosh,
+ 'atanh': casadi.atanh,
+ 'ceil': casadi.ceil,
+ 'floor': casadi.floor}
except ImportError:
casadi_available = False
@@ -53,13 +70,13 @@
def _check_getitemexpression(expr, i):
"""
Accepts an equality expression and an index value. Checks the
- GetItemExpression at expr._args[i] to see if it is a
+ GetItemExpression at expr.arg(i) to see if it is a
:py:class:`DerivativeVar`. If so, return the
GetItemExpression for the :py:class:`DerivativeVar` and
the RHS. If not, return None.
"""
- if type(expr._args[i]._base) is DerivativeVar:
- return [expr._args[i], expr._args[i - 1]]
+ if type(expr.arg(i)._base) is DerivativeVar:
+ return [expr.arg(i), expr.arg(1-i)]
else:
return None
@@ -67,202 +84,285 @@ def _check_getitemexpression(expr, i):
def _check_productexpression(expr, i):
"""
Accepts an equality expression and an index value. Checks the
- ProductExpression at expr._args[i] to see if it contains a
+ ProductExpression at expr.arg(i) to see if it contains a
:py:class:`DerivativeVar`. If so, return the
GetItemExpression for the
:py:class:`DerivativeVar` and the RHS. If not,
return None.
"""
- if common.mode is common.Mode.coopr3_trees:
- num = expr._args[i]._numerator
- denom = expr._args[i]._denominator
- coef = expr._args[i]._coef
-
- dv = None
- # Check if there is a DerivativeVar in the numerator
- for idx, obj in enumerate(num):
- if type(obj) is EXPR._GetItemExpression and \
- type(obj._base) is DerivativeVar:
- dv = obj
- num = num[0:idx] + num[idx + 1:]
- break
- if dv is not None:
- RHS = expr._args[i - 1] / coef
- for obj in num:
- RHS *= (1 / obj)
- for obj in denom:
- RHS = RHS * obj
- return [dv, RHS]
+ expr_ = expr.arg(i)
+ stack = [(expr_,1)]
+ pterms = []
+ dv = None
+
+ while stack:
+ curr,e_ = stack.pop()
+ if curr.__class__ is EXPR.ProductExpression:
+ stack.append((curr.arg(0),e_))
+ stack.append((curr.arg(1),e_))
+ elif curr.__class__ is EXPR.ReciprocalExpression:
+ stack.append((curr.arg(0),- e_))
+ elif type(curr) is EXPR.GetItemExpression and type(curr._base) is DerivativeVar:
+ dv = (curr,e_)
else:
- # Check if there is a DerivativeVar in the denominator
- for idx, obj in enumerate(denom):
- if type(obj) is EXPR._GetItemExpression and \
- type(obj._base) is DerivativeVar:
- dv = obj
- denom = denom[0:idx] + denom[idx + 1:]
- break
- if dv is not None:
- tempnum = coef
- for obj in num:
- tempnum *= obj
-
- tempdenom = expr._args[i - 1]
- for obj in denom:
- tempdenom *= obj
-
- RHS = tempnum / tempdenom
- return [dv, RHS]
+ pterms.append((curr,e_))
+
+ if dv is None:
+ return None
+
+ numer = 1
+ denom = 1
+ for term,e_ in pterms:
+ if e_ == 1:
+ denom *= term
+ else:
+ numer *= term
+ curr,e_ = dv
+ if e_ == 1:
+ return [curr, expr.arg(1-i)*numer/denom]
else:
- raise TypeError(
- "Simulator is unable to handle pyomo4 expression trees.")
+ return [curr, denom/(expr.arg(1-i)*numer)]
+
+
+def _check_negationexpression(expr, i):
+ """
+ Accepts an equality expression and an index value. Checks the
+ NegationExpression at expr.arg(i) to see if it contains a
+ :py:class:`DerivativeVar`. If so, return the
+ GetItemExpression for the
+ :py:class:`DerivativeVar` and the RHS. If not,
+ return None.
+ """
+ arg = expr.arg(i).arg(0)
+
+ if type(arg) is EXPR.GetItemExpression and type(arg._base) is DerivativeVar:
+ return [arg, - expr.arg(1-i)]
+
+ if type(arg) is EXPR.ProductExpression:
+ lhs = arg.arg(0)
+ rhs = arg.arg(1)
+
+ if not (type(lhs) in native_numeric_types or not lhs.is_potentially_variable()):
+ return None
+ if not (type(rhs) is EXPR.GetItemExpression and type(rhs._base) is DerivativeVar):
+ return None
+
+ return [rhs, - expr.arg(1-i)/lhs]
+
return None
-def _check_sumexpression(expr, i):
+def _check_viewsumexpression(expr, i):
"""
Accepts an equality expression and an index value. Checks the
- SumExpression at expr._args[i] to see if it contains a
+ Sum expression at expr.arg(i) to see if it contains a
:py:class:`DerivativeVar`. If so, return the
GetItemExpression for the
:py:class:`DerivativeVar` and the RHS. If not,
return None.
"""
- sumexp = expr._args[i]
- items = sumexp._args
- coefs = sumexp._coef
+ sumexp = expr.arg(i) # Get the side of the equality expression with the derivative variable
+ items = []
dv = None
dvcoef = 1
- for idx, item in enumerate(items):
- if type(item) is EXPR._GetItemExpression and \
+ for idx, item in enumerate(sumexp.args):
+ if dv is not None:
+ items.append( item )
+ elif type(item) is EXPR.GetItemExpression and \
type(item._base) is DerivativeVar:
dv = item
- dvcoef = coefs[idx]
- items = items[0:idx] + items[idx + 1:]
- coefs = coefs[0:idx] + coefs[idx + 1:]
- break
+ elif type(item) is EXPR.ProductExpression:
+ lhs = item.arg(0) # This will contain the constant coefficient if there is one
+ rhs = item.arg(1) # This is a potentially variable expression
+ if (type(lhs) in native_numeric_types or not lhs.is_potentially_variable()) and \
+ (type(rhs) is EXPR.GetItemExpression and type(rhs._base) is DerivativeVar):
+ dv = rhs
+ dvcoef = lhs
+ else:
+ items.append(item)
if dv is not None:
- RHS = expr._args[i - 1]
- for idx, item in enumerate(items):
- RHS -= coefs[idx] * item
+ RHS = expr.arg(1-i) # Form the "other" side of the equality expression
+ for item in items:
+ RHS -= item
RHS = RHS / dvcoef
return [dv, RHS]
return None
-def substitute_getitem_with_casadi_sym(expr, _map):
- """
- Replaces _GetItemExpression objects with casadi sym objects
- """
- if type(expr) is IndexTemplate:
- return expr
+if scipy_available:
+ class Pyomo2Scipy_Visitor(EXPR.ExpressionReplacementVisitor):
+ """
+ Expression walker that replaces _GetItemExpression
+ instances with mutable parameters.
+ """
- _id = _GetItemIndexer(expr)
- if _id not in _map:
- name = "%s[%s]" % (
- expr._base.name, ','.join(str(x) for x in _id._args))
- _map[_id] = casadi.SX.sym(name)
- return _map[_id]
+ def __init__(self, templatemap):
+ super(Pyomo2Scipy_Visitor,self).__init__(self)
+ self.templatemap = templatemap
+ def visiting_potential_leaf(self, node):
+ if type(node) in native_numeric_types or \
+ not node.is_expression_type() or\
+ type(node) is IndexTemplate:
+ return True, node
-def substitute_intrinsic_function_with_casadi(expr):
- """
- Replaces intrinsic functions in Pyomo expressions with casadi
- versions of those functions.
- """
- functionmap = {'log': casadi.log,
- 'log10': casadi.log10,
- 'sin': casadi.sin,
- 'cos': casadi.cos,
- 'tan': casadi.tan,
- 'cosh': casadi.cosh,
- 'sinh': casadi.sinh,
- 'tanh': casadi.tanh,
- 'asin': casadi.asin,
- 'acos': casadi.acos,
- 'atan': casadi.atan,
- 'exp': casadi.exp,
- 'sqrt': casadi.sqrt,
- 'asinh': casadi.asinh,
- 'acosh': casadi.acosh,
- 'atanh': casadi.atanh,
- 'ceil': casadi.ceil,
- 'floor': casadi.floor}
- expr._operator = functionmap[expr.name]
- return expr
-
-
-def substitute_intrinsic_function(expr, substituter, *args):
+ if type(node) is EXPR.GetItemExpression:
+ _id = _GetItemIndexer(node)
+ if _id not in self.templatemap:
+ self.templatemap[_id] = Param(mutable=True)
+ self.templatemap[_id].construct()
+ _args = []
+ self.templatemap[_id]._name = "%s[%s]" % (
+ node._base.name, ','.join(str(x) for x in _id._args) )
+ return True, self.templatemap[_id]
+
+ return False, None
+
+
+def convert_pyomo2scipy(expr, templatemap):
+ """Substitute _GetItem nodes in an expression tree.
+
+ This substition function is used to replace Pyomo _GetItem
+ nodes with mutable Params.
+
+ Args:
+ templatemap: dictionary mapping _GetItemIndexer objects to
+ mutable params
+
+ Returns:
+ a new expression tree with all substitutions done
"""
+ if not scipy_available:
+ raise DAE_Error("SciPy is not installed. Cannot substitute SciPy intrinsic functions.")
+ visitor = Pyomo2Scipy_Visitor(templatemap)
+ return visitor.dfs_postorder_stack(expr)
+
+
+if casadi_available:
+ class Substitute_Pyomo2Casadi_Visitor(EXPR.ExpressionReplacementVisitor):
+ """
+ Expression walker that replaces
+
+ * _UnaryFunctionExpression instances with unary
+ functions that point to casadi intrinsic
+ functions.
+
+ * _GetItemExpressions with _GetItemIndexer objects
+ that references CasADi variables.
+ """
+
+ def __init__(self, templatemap):
+ super(Substitute_Pyomo2Casadi_Visitor,self).__init__(self)
+ self.templatemap = templatemap
+
+ def visit(self, node, values):
+ """Replace a node if it's a unary function."""
+ if type(node) is EXPR.UnaryFunctionExpression:
+ return EXPR.UnaryFunctionExpression(
+ values[0],
+ node._name,
+ casadi_intrinsic[node._name])
+ return node
+
+ def visiting_potential_leaf(self, node):
+ """Replace a node if it's a _GetItemExpression."""
+ if type(node) is EXPR.GetItemExpression:
+ _id = _GetItemIndexer(node)
+ if _id not in self.templatemap:
+ name = "%s[%s]" % (
+ node._base.name, ','.join(str(x) for x in _id._args))
+ self.templatemap[_id] = casadi.SX.sym(name)
+ return True, self.templatemap[_id]
+
+ if type(node) in native_numeric_types or \
+ not node.is_expression_type() or\
+ type(node) is IndexTemplate:
+ return True, node
+
+ return False, None
+
+
+ class Convert_Pyomo2Casadi_Visitor(EXPR.ExpressionValueVisitor):
+ """
+ Expression walker that evaluates an expression
+ generated by the Substitute_Pyomo2Casadi_Visitor walker.
+
+ In Coopr3 this walker was not necessary because the
+ expression could be simply evaluated. But in Pyomo5,
+ the evaluation logic was changed to be non-recursive, which
+ involves checks on the types of leaves in the expression tree.
+ Hence, the evaluation logic fails if leaves in the tree
+ are not standard Pyomo5 variable types.
+ """
+
+ def visit(self, node, values):
+ """ Visit nodes that have been expanded """
+ return node._apply_operation(values)
+
+ def visiting_potential_leaf(self, node):
+ """
+ Visiting a potential leaf.
+
+ Return True if the node is not expanded.
+ """
+ if node.__class__ in native_numeric_types:
+ return True, node
+
+ if node.__class__ is casadi.SX:
+ return True, node
+
+ if node.is_variable_type():
+ return True, value(node)
+
+ if not node.is_expression_type():
+ return True, value(node)
+
+ return False, None
+
+
+def substitute_pyomo2casadi(expr, templatemap):
+ """Substitute IndexTemplates in an expression tree.
+
This substition function is used to replace Pyomo intrinsic
- functions with CasADi functions before sending expressions to a
- CasADi integrator
+ functions with CasADi functions.
- This substituter is copied from template_expr.py with some minor
- modifications to make it compatible with CasADi expressions.
- TODO: We need a generalized expression tree walker to avoid
- copying code like this
+ Args:
+ expr: a Pyomo expression
+ templatemap: dictionary mapping _GetItemIndexer objects to
+ mutable params
+
+ Returns:
+ a new expression tree with all substitutions done
"""
+ if not casadi_available:
+ raise DAE_Error("CASADI is not installed. Cannot substitute CasADi variables and intrinsic functions.")
+ visitor = Substitute_Pyomo2Casadi_Visitor(templatemap)
+ return visitor.dfs_postorder_stack(expr)
- # Again, due to circular imports, we cannot import expr at the
- # module scope because this module gets imported by expr
- from pyomo.core.base import expr as EXPR
- from pyomo.core.base import expr_common as common
- from pyomo.core.base.numvalue import (
- NumericValue, native_numeric_types, as_numeric)
-
- if type(expr) is casadi.SX:
- return expr
-
- _stack = [[[expr.clone()], 0, 1, None]]
- _stack_idx = 0
- while _stack_idx >= 0:
- _ptr = _stack[_stack_idx]
- while _ptr[1] < _ptr[2]:
- _obj = _ptr[0][_ptr[1]]
- _ptr[1] += 1
- _subType = type(_obj)
- if _subType is EXPR._IntrinsicFunctionExpression:
- if type(_ptr[0]) is tuple:
- _list = list(_ptr[0])
- _list[_ptr[1] - 1] = substituter(_obj, *args)
- _ptr[0] = tuple(_list)
- _ptr[3]._args = _list
- else:
- _ptr[0][_ptr[1] - 1] = substituter(_obj, *args)
- elif _subType in native_numeric_types or \
- type(_obj) is casadi.SX or not _obj.is_expression():
- continue
- elif _subType is EXPR._ProductExpression:
- # _ProductExpression is fundamentally different in
- # Coopr3 / Pyomo4 expression systems and must be handled
- # specially.
- if common.mode is common.Mode.coopr3_trees:
- _lists = (_obj._numerator, _obj._denominator)
- else:
- _lists = (_obj._args,)
- for _list in _lists:
- if not _list:
- continue
- _stack_idx += 1
- _ptr = [_list, 0, len(_list), _obj]
- if _stack_idx < len(_stack):
- _stack[_stack_idx] = _ptr
- else:
- _stack.append(_ptr)
- else:
- if not _obj._args:
- continue
- _stack_idx += 1
- _ptr = [_obj._args, 0, len(_obj._args), _obj]
- if _stack_idx < len(_stack):
- _stack[_stack_idx] = _ptr
- else:
- _stack.append(_ptr)
- _stack_idx -= 1
- return _stack[0][0][0]
+
+def convert_pyomo2casadi(expr):
+ """Convert a Pyomo expression tree to Casadi.
+
+ This function replaces a Pyomo expression with a CasADi expression.
+ This assumes that the `substitute_pyomo2casadi` function has
+ been called, so the Pyomo expression contains CasADi variables
+ and intrinsic functions. The resulting expression can be used
+ with the CasADi integrator.
+
+ Args:
+ expr: a Pyomo expression with CasADi variables and intrinsic
+ functions
+
+ Returns:
+ a CasADi expression tree.
+ """
+ if not casadi_available:
+ raise DAE_Error("CASADI is not installed. Cannot convert a Pyomo expression to a Casadi expression.")
+ visitor = Convert_Pyomo2Casadi_Visitor()
+ return visitor.dfs_postorder_stack(expr)
class Simulator:
@@ -295,7 +395,6 @@ def __init__(self, m, package='scipy'):
logger.warning("The scipy module is not available. You may "
"build the Simulator object but you will not "
"be able to run the simulation.")
- substituter = substitute_getitem_with_param
else:
if not casadi_available:
# Initializing the simulator for use with casadi requires
@@ -303,7 +402,6 @@ def __init__(self, m, package='scipy'):
# here instead of a warning.
raise ValueError("The casadi module is not available. "
"Cannot simulate model.")
- substituter = substitute_getitem_with_casadi_sym
# Check for active Blocks and throw error if any are found
if len(list(m.component_data_objects(Block, active=True,
@@ -389,48 +487,61 @@ def __init__(self, m, package='scipy'):
tempidx = i[0:csidx] + (cstemplate,) + i[csidx:]
tempexp = conrule(m, *tempidx)
- # Check to make sure it's an _EqualityExpression
- if not type(tempexp) is EXPR._EqualityExpression:
+ # Check to make sure it's an EqualityExpression
+ if not type(tempexp) is EXPR.EqualityExpression:
continue
# Check to make sure it's a differential equation with
# separable RHS
args = None
# Case 1: m.dxdt[t] = RHS
- if type(tempexp._args[0]) is EXPR._GetItemExpression:
+ if type(tempexp.arg(0)) is EXPR.GetItemExpression:
args = _check_getitemexpression(tempexp, 0)
# Case 2: RHS = m.dxdt[t]
if args is None:
- if type(tempexp._args[1]) is EXPR._GetItemExpression:
+ if type(tempexp.arg(1)) is EXPR.GetItemExpression:
args = _check_getitemexpression(tempexp, 1)
# Case 3: m.p*m.dxdt[t] = RHS
if args is None:
- if type(tempexp._args[0]) is EXPR._ProductExpression:
+ if type(tempexp.arg(0)) is EXPR.ProductExpression or \
+ type(tempexp.arg(0)) is EXPR.ReciprocalExpression:
args = _check_productexpression(tempexp, 0)
# Case 4: RHS = m.p*m.dxdt[t]
if args is None:
- if type(tempexp._args[1]) is EXPR._ProductExpression:
+ if type(tempexp.arg(1)) is EXPR.ProductExpression or \
+ type(tempexp.arg(1)) is EXPR.ReciprocalExpression:
args = _check_productexpression(tempexp, 1)
- # Case 5: m.dxdt[t] + CONSTANT = RHS
+ # Case 5: m.dxdt[t] + sum(ELSE) = RHS
# or CONSTANT + m.dxdt[t] = RHS
if args is None:
- if type(tempexp._args[0]) is EXPR._SumExpression:
- args = _check_sumexpression(tempexp, 0)
+ if type(tempexp.arg(0)) is EXPR.SumExpression:
+ args = _check_viewsumexpression(tempexp, 0)
- # Case 6: RHS = m.dxdt[t] + CONSTANT
+ # Case 6: RHS = m.dxdt[t] + sum(ELSE)
if args is None:
- if type(tempexp._args[1]) is EXPR._SumExpression:
- args = _check_sumexpression(tempexp, 1)
+ if type(tempexp.arg(1)) is EXPR.SumExpression:
+ args = _check_viewsumexpression(tempexp, 1)
# Case 7: RHS = m.p*m.dxdt[t] + CONSTANT
# This case will be caught by Case 6 if p is immutable. If
# p is mutable then this case will not be detected as a
# separable differential equation
+ # Case 8: - dxdt[t] = RHS
+ if args is None:
+ if type(tempexp.arg(0)) is EXPR.NegationExpression:
+ args = _check_negationexpression(tempexp, 0)
+
+ # Case 9: RHS = - dxdt[t]
+ if args is None:
+ if type(tempexp.arg(1)) is EXPR.NegationExpression:
+ args = _check_negationexpression(tempexp, 1)
+
+
# At this point if args is not None then args[0] contains
# the _GetItemExpression for the DerivativeVar and args[1]
# contains the RHS expression. If args is None then the
@@ -446,12 +557,8 @@ def __init__(self, m, package='scipy'):
"trying to simulate a DAE model you must use "
"CasADi as the integration package."
% str(con.name))
- tempexp = tempexp._args[0] - tempexp._args[1]
- algexp = substitute_template_expression(tempexp,
- substituter,
- templatemap)
- algexp = substitute_intrinsic_function(
- algexp, substitute_intrinsic_function_with_casadi)
+ tempexp = tempexp.arg(0) - tempexp.arg(1)
+ algexp = substitute_pyomo2casadi(tempexp, templatemap)
alglist.append(algexp)
continue
@@ -465,15 +572,10 @@ def __init__(self, m, package='scipy'):
"DerivativeVar %s" % str(dvkey))
derivlist.append(dvkey)
- tempexp = substitute_template_expression(
- RHS, substituter, templatemap)
if self._intpackage is 'casadi':
- # After substituting GetItemExpression objects
- # replace intrinsic Pyomo functions with casadi
- # functions
- tempexp = substitute_intrinsic_function(
- tempexp, substitute_intrinsic_function_with_casadi)
- rhsdict[dvkey] = tempexp
+ rhsdict[dvkey] = substitute_pyomo2casadi(RHS, templatemap)
+ else:
+ rhsdict[dvkey] = convert_pyomo2scipy(RHS, templatemap)
# Check to see if we found a RHS for every DerivativeVar in
# the model
# FIXME: Not sure how to rework this for multi-index case
@@ -811,7 +913,7 @@ def _simulate_with_casadi_no_inputs(self, initcon, tsim, integrator,
xalltemp = [self._templatemap[i] for i in self._diffvars]
xall = casadi.vertcat(*xalltemp)
- odealltemp = [value(self._rhsdict[i]) for i in self._derivlist]
+ odealltemp = [convert_pyomo2casadi(self._rhsdict[i]) for i in self._derivlist]
odeall = casadi.vertcat(*odealltemp)
dae = {'x': xall, 'ode': odeall}
@@ -819,7 +921,7 @@ def _simulate_with_casadi_no_inputs(self, initcon, tsim, integrator,
zalltemp = [self._templatemap[i] for i in self._simalgvars]
zall = casadi.vertcat(*zalltemp)
- algalltemp = [value(i) for i in self._alglist]
+ algalltemp = [convert_pyomo2casadi(i) for i in self._alglist]
algall = casadi.vertcat(*algalltemp)
dae['z'] = zall
dae['alg'] = algall
@@ -844,7 +946,7 @@ def _simulate_with_casadi_with_inputs(self, initcon, tsim, varying_inputs,
time = casadi.SX.sym('time')
- odealltemp = [time * value(self._rhsdict[i])
+ odealltemp = [time * convert_pyomo2casadi(self._rhsdict[i])
for i in self._derivlist]
odeall = casadi.vertcat(*odealltemp)
@@ -859,7 +961,7 @@ def _simulate_with_casadi_with_inputs(self, initcon, tsim, varying_inputs,
zalltemp = [self._templatemap[i] for i in self._simalgvars]
zall = casadi.vertcat(*zalltemp)
# Need to do anything special with time scaling??
- algalltemp = [value(i) for i in self._alglist]
+ algalltemp = [convert_pyomo2casadi(i) for i in self._alglist]
algall = casadi.vertcat(*algalltemp)
dae['z'] = zall
dae['alg'] = algall
diff --git a/pyomo/dae/tests/simulator_ode_example.casadi.txt b/pyomo/dae/tests/simulator_ode_example.casadi.txt
index 822e9811e3a..5fcc70cbb0c 100644
--- a/pyomo/dae/tests/simulator_ode_example.casadi.txt
+++ b/pyomo/dae/tests/simulator_ode_example.casadi.txt
@@ -138,7 +138,7 @@
4.0 : None : 2.98882137087 : None : False : False : Reals
4.057104 : None : 2.81261373275 : None : False : False : Reals
4.276843 : None : 1.84451738792 : None : False : False : Reals
- 4.58359 : None : 0.283476577158 : None : False : False : Reals
+ 4.58359 : None : 0.283476577159 : None : False : False : Reals
4.86024 : None : -1.05794775672 : None : False : False : Reals
5.0 : None : -1.66929122385 : None : False : False : Reals
5.057104 : None : -1.90219757192 : None : False : False : Reals
@@ -149,23 +149,23 @@
6.057104 : None : -0.776917363925 : None : False : False : Reals
6.276843 : None : 0.24319396474 : None : False : False : Reals
6.58359 : None : 1.50686448553 : None : False : False : Reals
- 6.86024 : None : 2.19686100862 : None : False : False : Reals
- 7.0 : None : 2.25390221046 : None : False : False : Reals
- 7.057104 : None : 2.22299642675 : None : False : False : Reals
- 7.276843 : None : 1.78220623588 : None : False : False : Reals
- 7.58359 : None : 0.650826699669 : None : False : False : Reals
- 7.86024 : None : -0.475937555457 : None : False : False : Reals
- 8.0 : None : -0.989405964761 : None : False : False : Reals
+ 6.86024 : None : 2.19686100861 : None : False : False : Reals
+ 7.0 : None : 2.25390221045 : None : False : False : Reals
+ 7.057104 : None : 2.22299642674 : None : False : False : Reals
+ 7.276843 : None : 1.78220623587 : None : False : False : Reals
+ 7.58359 : None : 0.650826699654 : None : False : False : Reals
+ 7.86024 : None : -0.475937555463 : None : False : False : Reals
+ 8.0 : None : -0.989405964762 : None : False : False : Reals
8.057104 : None : -1.17772174412 : None : False : False : Reals
- 8.276843 : None : -1.72857955401 : None : False : False : Reals
- 8.58359 : None : -1.82788389429 : None : False : False : Reals
- 8.86024 : None : -1.23259781241 : None : False : False : Reals
- 9.0 : None : -0.784341315869 : None : False : False : Reals
- 9.057104 : None : -0.584143291772 : None : False : False : Reals
- 9.276843 : None : 0.196857216649 : None : False : False : Reals
- 9.58359 : None : 1.13358175254 : None : False : False : Reals
- 9.86024 : None : 1.55494228383 : None : False : False : Reals
- 10.0 : None : 1.56385842926 : None : False : False : Reals
+ 8.276843 : None : -1.72857955399 : None : False : False : Reals
+ 8.58359 : None : -1.82788389426 : None : False : False : Reals
+ 8.86024 : None : -1.23259781238 : None : False : False : Reals
+ 9.0 : None : -0.784341315848 : None : False : False : Reals
+ 9.057104 : None : -0.584143291753 : None : False : False : Reals
+ 9.276843 : None : 0.196857216665 : None : False : False : Reals
+ 9.58359 : None : 1.13358175253 : None : False : False : Reals
+ 9.86024 : None : 1.55494228381 : None : False : False : Reals
+ 10.0 : None : 1.56385842925 : None : False : False : Reals
theta : Size=51, Index=t
Key : Lower : Value : Upper : Fixed : Stale : Domain
0.0 : None : 3.04 : None : False : False : Reals
@@ -187,7 +187,7 @@
3.057104 : None : -1.83892648779 : None : False : False : Reals
3.276843 : None : -1.58510628476 : None : False : False : Reals
3.58359 : None : -0.874879240519 : None : False : False : Reals
- 3.86024 : None : 0.00109629546615 : None : False : False : Reals
+ 3.86024 : None : 0.00109629546613 : None : False : False : Reals
4.0 : None : 0.440559372007 : None : False : False : Reals
4.057104 : None : 0.607801260665 : None : False : False : Reals
4.276843 : None : 1.12310078819 : None : False : False : Reals
@@ -201,79 +201,79 @@
6.0 : None : -1.05419561307 : None : False : False : Reals
6.057104 : None : -1.11104485228 : None : False : False : Reals
6.276843 : None : -1.16704241034 : None : False : False : Reals
- 6.58359 : None : -0.890105814579 : None : False : False : Reals
- 6.86024 : None : -0.363923767771 : None : False : False : Reals
- 7.0 : None : -0.0503543436636 : None : False : False : Reals
- 7.057104 : None : 0.078268098944 : None : False : False : Reals
+ 6.58359 : None : -0.89010581458 : None : False : False : Reals
+ 6.86024 : None : -0.363923767768 : None : False : False : Reals
+ 7.0 : None : -0.0503543436604 : None : False : False : Reals
+ 7.057104 : None : 0.0782680989466 : None : False : False : Reals
7.276843 : None : 0.527093474144 : None : False : False : Reals
- 7.58359 : None : 0.908477581807 : None : False : False : Reals
- 7.86024 : None : 0.929578843425 : None : False : False : Reals
- 8.0 : None : 0.826347007449 : None : False : False : Reals
- 8.057104 : None : 0.763915384299 : None : False : False : Reals
- 8.276843 : None : 0.440372783687 : None : False : False : Reals
- 8.58359 : None : -0.127136016061 : None : False : False : Reals
- 8.86024 : None : -0.560481227396 : None : False : False : Reals
- 9.0 : None : -0.70398319544 : None : False : False : Reals
- 9.057104 : None : -0.740757144228 : None : False : False : Reals
- 9.276843 : None : -0.784799079693 : None : False : False : Reals
- 9.58359 : None : -0.572881790888 : None : False : False : Reals
- 9.86024 : None : -0.187877594901 : None : False : False : Reals
- 10.0 : None : 0.0317769938428 : None : False : False : Reals
+ 7.58359 : None : 0.908477581799 : None : False : False : Reals
+ 7.86024 : None : 0.929578843415 : None : False : False : Reals
+ 8.0 : None : 0.826347007435 : None : False : False : Reals
+ 8.057104 : None : 0.763915384285 : None : False : False : Reals
+ 8.276843 : None : 0.440372783675 : None : False : False : Reals
+ 8.58359 : None : -0.127136016065 : None : False : False : Reals
+ 8.86024 : None : -0.560481227392 : None : False : False : Reals
+ 9.0 : None : -0.703983195433 : None : False : False : Reals
+ 9.057104 : None : -0.74075714422 : None : False : False : Reals
+ 9.276843 : None : -0.78479907968 : None : False : False : Reals
+ 9.58359 : None : -0.572881790873 : None : False : False : Reals
+ 9.86024 : None : -0.187877594892 : None : False : False : Reals
+ 10.0 : None : 0.0317769938495 : None : False : False : Reals
4 Constraint Declarations
diffeq1 : Size=51, Index=t, Active=True
- Key : Lower : Body : Upper : Active
- 0.0 : 0.0 : domegadt[0.0] + 0.25*omega[0.0] + 5.0*sin( theta[0.0] ) : 0.0 : True
- 0.057104 : 0.0 : domegadt[0.057104] + 0.25*omega[0.057104] + 5.0*sin( theta[0.057104] ) : 0.0 : True
- 0.276843 : 0.0 : domegadt[0.276843] + 0.25*omega[0.276843] + 5.0*sin( theta[0.276843] ) : 0.0 : True
- 0.58359 : 0.0 : domegadt[0.58359] + 0.25*omega[0.58359] + 5.0*sin( theta[0.58359] ) : 0.0 : True
- 0.86024 : 0.0 : domegadt[0.86024] + 0.25*omega[0.86024] + 5.0*sin( theta[0.86024] ) : 0.0 : True
- 1.0 : 0.0 : domegadt[1.0] + 0.25*omega[1.0] + 5.0*sin( theta[1.0] ) : 0.0 : True
- 1.057104 : 0.0 : domegadt[1.057104] + 0.25*omega[1.057104] + 5.0*sin( theta[1.057104] ) : 0.0 : True
- 1.276843 : 0.0 : domegadt[1.276843] + 0.25*omega[1.276843] + 5.0*sin( theta[1.276843] ) : 0.0 : True
- 1.58359 : 0.0 : domegadt[1.58359] + 0.25*omega[1.58359] + 5.0*sin( theta[1.58359] ) : 0.0 : True
- 1.86024 : 0.0 : domegadt[1.86024] + 0.25*omega[1.86024] + 5.0*sin( theta[1.86024] ) : 0.0 : True
- 2.0 : 0.0 : domegadt[2.0] + 0.25*omega[2.0] + 5.0*sin( theta[2.0] ) : 0.0 : True
- 2.057104 : 0.0 : domegadt[2.057104] + 0.25*omega[2.057104] + 5.0*sin( theta[2.057104] ) : 0.0 : True
- 2.276843 : 0.0 : domegadt[2.276843] + 0.25*omega[2.276843] + 5.0*sin( theta[2.276843] ) : 0.0 : True
- 2.58359 : 0.0 : domegadt[2.58359] + 0.25*omega[2.58359] + 5.0*sin( theta[2.58359] ) : 0.0 : True
- 2.86024 : 0.0 : domegadt[2.86024] + 0.25*omega[2.86024] + 5.0*sin( theta[2.86024] ) : 0.0 : True
- 3.0 : 0.0 : domegadt[3.0] + 0.25*omega[3.0] + 5.0*sin( theta[3.0] ) : 0.0 : True
- 3.057104 : 0.0 : domegadt[3.057104] + 0.25*omega[3.057104] + 5.0*sin( theta[3.057104] ) : 0.0 : True
- 3.276843 : 0.0 : domegadt[3.276843] + 0.25*omega[3.276843] + 5.0*sin( theta[3.276843] ) : 0.0 : True
- 3.58359 : 0.0 : domegadt[3.58359] + 0.25*omega[3.58359] + 5.0*sin( theta[3.58359] ) : 0.0 : True
- 3.86024 : 0.0 : domegadt[3.86024] + 0.25*omega[3.86024] + 5.0*sin( theta[3.86024] ) : 0.0 : True
- 4.0 : 0.0 : domegadt[4.0] + 0.25*omega[4.0] + 5.0*sin( theta[4.0] ) : 0.0 : True
- 4.057104 : 0.0 : domegadt[4.057104] + 0.25*omega[4.057104] + 5.0*sin( theta[4.057104] ) : 0.0 : True
- 4.276843 : 0.0 : domegadt[4.276843] + 0.25*omega[4.276843] + 5.0*sin( theta[4.276843] ) : 0.0 : True
- 4.58359 : 0.0 : domegadt[4.58359] + 0.25*omega[4.58359] + 5.0*sin( theta[4.58359] ) : 0.0 : True
- 4.86024 : 0.0 : domegadt[4.86024] + 0.25*omega[4.86024] + 5.0*sin( theta[4.86024] ) : 0.0 : True
- 5.0 : 0.0 : domegadt[5.0] + 0.25*omega[5.0] + 5.0*sin( theta[5.0] ) : 0.0 : True
- 5.057104 : 0.0 : domegadt[5.057104] + 0.25*omega[5.057104] + 5.0*sin( theta[5.057104] ) : 0.0 : True
- 5.276843 : 0.0 : domegadt[5.276843] + 0.25*omega[5.276843] + 5.0*sin( theta[5.276843] ) : 0.0 : True
- 5.58359 : 0.0 : domegadt[5.58359] + 0.25*omega[5.58359] + 5.0*sin( theta[5.58359] ) : 0.0 : True
- 5.86024 : 0.0 : domegadt[5.86024] + 0.25*omega[5.86024] + 5.0*sin( theta[5.86024] ) : 0.0 : True
- 6.0 : 0.0 : domegadt[6.0] + 0.25*omega[6.0] + 5.0*sin( theta[6.0] ) : 0.0 : True
- 6.057104 : 0.0 : domegadt[6.057104] + 0.25*omega[6.057104] + 5.0*sin( theta[6.057104] ) : 0.0 : True
- 6.276843 : 0.0 : domegadt[6.276843] + 0.25*omega[6.276843] + 5.0*sin( theta[6.276843] ) : 0.0 : True
- 6.58359 : 0.0 : domegadt[6.58359] + 0.25*omega[6.58359] + 5.0*sin( theta[6.58359] ) : 0.0 : True
- 6.86024 : 0.0 : domegadt[6.86024] + 0.25*omega[6.86024] + 5.0*sin( theta[6.86024] ) : 0.0 : True
- 7.0 : 0.0 : domegadt[7.0] + 0.25*omega[7.0] + 5.0*sin( theta[7.0] ) : 0.0 : True
- 7.057104 : 0.0 : domegadt[7.057104] + 0.25*omega[7.057104] + 5.0*sin( theta[7.057104] ) : 0.0 : True
- 7.276843 : 0.0 : domegadt[7.276843] + 0.25*omega[7.276843] + 5.0*sin( theta[7.276843] ) : 0.0 : True
- 7.58359 : 0.0 : domegadt[7.58359] + 0.25*omega[7.58359] + 5.0*sin( theta[7.58359] ) : 0.0 : True
- 7.86024 : 0.0 : domegadt[7.86024] + 0.25*omega[7.86024] + 5.0*sin( theta[7.86024] ) : 0.0 : True
- 8.0 : 0.0 : domegadt[8.0] + 0.25*omega[8.0] + 5.0*sin( theta[8.0] ) : 0.0 : True
- 8.057104 : 0.0 : domegadt[8.057104] + 0.25*omega[8.057104] + 5.0*sin( theta[8.057104] ) : 0.0 : True
- 8.276843 : 0.0 : domegadt[8.276843] + 0.25*omega[8.276843] + 5.0*sin( theta[8.276843] ) : 0.0 : True
- 8.58359 : 0.0 : domegadt[8.58359] + 0.25*omega[8.58359] + 5.0*sin( theta[8.58359] ) : 0.0 : True
- 8.86024 : 0.0 : domegadt[8.86024] + 0.25*omega[8.86024] + 5.0*sin( theta[8.86024] ) : 0.0 : True
- 9.0 : 0.0 : domegadt[9.0] + 0.25*omega[9.0] + 5.0*sin( theta[9.0] ) : 0.0 : True
- 9.057104 : 0.0 : domegadt[9.057104] + 0.25*omega[9.057104] + 5.0*sin( theta[9.057104] ) : 0.0 : True
- 9.276843 : 0.0 : domegadt[9.276843] + 0.25*omega[9.276843] + 5.0*sin( theta[9.276843] ) : 0.0 : True
- 9.58359 : 0.0 : domegadt[9.58359] + 0.25*omega[9.58359] + 5.0*sin( theta[9.58359] ) : 0.0 : True
- 9.86024 : 0.0 : domegadt[9.86024] + 0.25*omega[9.86024] + 5.0*sin( theta[9.86024] ) : 0.0 : True
- 10.0 : 0.0 : domegadt[10.0] + 0.25*omega[10.0] + 5.0*sin( theta[10.0] ) : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 0.0 : 0.0 : domegadt[0.0] + 0.25*omega[0.0] + 5.0*sin(theta[0.0]) : 0.0 : True
+ 0.057104 : 0.0 : domegadt[0.057104] + 0.25*omega[0.057104] + 5.0*sin(theta[0.057104]) : 0.0 : True
+ 0.276843 : 0.0 : domegadt[0.276843] + 0.25*omega[0.276843] + 5.0*sin(theta[0.276843]) : 0.0 : True
+ 0.58359 : 0.0 : domegadt[0.58359] + 0.25*omega[0.58359] + 5.0*sin(theta[0.58359]) : 0.0 : True
+ 0.86024 : 0.0 : domegadt[0.86024] + 0.25*omega[0.86024] + 5.0*sin(theta[0.86024]) : 0.0 : True
+ 1.0 : 0.0 : domegadt[1.0] + 0.25*omega[1.0] + 5.0*sin(theta[1.0]) : 0.0 : True
+ 1.057104 : 0.0 : domegadt[1.057104] + 0.25*omega[1.057104] + 5.0*sin(theta[1.057104]) : 0.0 : True
+ 1.276843 : 0.0 : domegadt[1.276843] + 0.25*omega[1.276843] + 5.0*sin(theta[1.276843]) : 0.0 : True
+ 1.58359 : 0.0 : domegadt[1.58359] + 0.25*omega[1.58359] + 5.0*sin(theta[1.58359]) : 0.0 : True
+ 1.86024 : 0.0 : domegadt[1.86024] + 0.25*omega[1.86024] + 5.0*sin(theta[1.86024]) : 0.0 : True
+ 2.0 : 0.0 : domegadt[2.0] + 0.25*omega[2.0] + 5.0*sin(theta[2.0]) : 0.0 : True
+ 2.057104 : 0.0 : domegadt[2.057104] + 0.25*omega[2.057104] + 5.0*sin(theta[2.057104]) : 0.0 : True
+ 2.276843 : 0.0 : domegadt[2.276843] + 0.25*omega[2.276843] + 5.0*sin(theta[2.276843]) : 0.0 : True
+ 2.58359 : 0.0 : domegadt[2.58359] + 0.25*omega[2.58359] + 5.0*sin(theta[2.58359]) : 0.0 : True
+ 2.86024 : 0.0 : domegadt[2.86024] + 0.25*omega[2.86024] + 5.0*sin(theta[2.86024]) : 0.0 : True
+ 3.0 : 0.0 : domegadt[3.0] + 0.25*omega[3.0] + 5.0*sin(theta[3.0]) : 0.0 : True
+ 3.057104 : 0.0 : domegadt[3.057104] + 0.25*omega[3.057104] + 5.0*sin(theta[3.057104]) : 0.0 : True
+ 3.276843 : 0.0 : domegadt[3.276843] + 0.25*omega[3.276843] + 5.0*sin(theta[3.276843]) : 0.0 : True
+ 3.58359 : 0.0 : domegadt[3.58359] + 0.25*omega[3.58359] + 5.0*sin(theta[3.58359]) : 0.0 : True
+ 3.86024 : 0.0 : domegadt[3.86024] + 0.25*omega[3.86024] + 5.0*sin(theta[3.86024]) : 0.0 : True
+ 4.0 : 0.0 : domegadt[4.0] + 0.25*omega[4.0] + 5.0*sin(theta[4.0]) : 0.0 : True
+ 4.057104 : 0.0 : domegadt[4.057104] + 0.25*omega[4.057104] + 5.0*sin(theta[4.057104]) : 0.0 : True
+ 4.276843 : 0.0 : domegadt[4.276843] + 0.25*omega[4.276843] + 5.0*sin(theta[4.276843]) : 0.0 : True
+ 4.58359 : 0.0 : domegadt[4.58359] + 0.25*omega[4.58359] + 5.0*sin(theta[4.58359]) : 0.0 : True
+ 4.86024 : 0.0 : domegadt[4.86024] + 0.25*omega[4.86024] + 5.0*sin(theta[4.86024]) : 0.0 : True
+ 5.0 : 0.0 : domegadt[5.0] + 0.25*omega[5.0] + 5.0*sin(theta[5.0]) : 0.0 : True
+ 5.057104 : 0.0 : domegadt[5.057104] + 0.25*omega[5.057104] + 5.0*sin(theta[5.057104]) : 0.0 : True
+ 5.276843 : 0.0 : domegadt[5.276843] + 0.25*omega[5.276843] + 5.0*sin(theta[5.276843]) : 0.0 : True
+ 5.58359 : 0.0 : domegadt[5.58359] + 0.25*omega[5.58359] + 5.0*sin(theta[5.58359]) : 0.0 : True
+ 5.86024 : 0.0 : domegadt[5.86024] + 0.25*omega[5.86024] + 5.0*sin(theta[5.86024]) : 0.0 : True
+ 6.0 : 0.0 : domegadt[6.0] + 0.25*omega[6.0] + 5.0*sin(theta[6.0]) : 0.0 : True
+ 6.057104 : 0.0 : domegadt[6.057104] + 0.25*omega[6.057104] + 5.0*sin(theta[6.057104]) : 0.0 : True
+ 6.276843 : 0.0 : domegadt[6.276843] + 0.25*omega[6.276843] + 5.0*sin(theta[6.276843]) : 0.0 : True
+ 6.58359 : 0.0 : domegadt[6.58359] + 0.25*omega[6.58359] + 5.0*sin(theta[6.58359]) : 0.0 : True
+ 6.86024 : 0.0 : domegadt[6.86024] + 0.25*omega[6.86024] + 5.0*sin(theta[6.86024]) : 0.0 : True
+ 7.0 : 0.0 : domegadt[7.0] + 0.25*omega[7.0] + 5.0*sin(theta[7.0]) : 0.0 : True
+ 7.057104 : 0.0 : domegadt[7.057104] + 0.25*omega[7.057104] + 5.0*sin(theta[7.057104]) : 0.0 : True
+ 7.276843 : 0.0 : domegadt[7.276843] + 0.25*omega[7.276843] + 5.0*sin(theta[7.276843]) : 0.0 : True
+ 7.58359 : 0.0 : domegadt[7.58359] + 0.25*omega[7.58359] + 5.0*sin(theta[7.58359]) : 0.0 : True
+ 7.86024 : 0.0 : domegadt[7.86024] + 0.25*omega[7.86024] + 5.0*sin(theta[7.86024]) : 0.0 : True
+ 8.0 : 0.0 : domegadt[8.0] + 0.25*omega[8.0] + 5.0*sin(theta[8.0]) : 0.0 : True
+ 8.057104 : 0.0 : domegadt[8.057104] + 0.25*omega[8.057104] + 5.0*sin(theta[8.057104]) : 0.0 : True
+ 8.276843 : 0.0 : domegadt[8.276843] + 0.25*omega[8.276843] + 5.0*sin(theta[8.276843]) : 0.0 : True
+ 8.58359 : 0.0 : domegadt[8.58359] + 0.25*omega[8.58359] + 5.0*sin(theta[8.58359]) : 0.0 : True
+ 8.86024 : 0.0 : domegadt[8.86024] + 0.25*omega[8.86024] + 5.0*sin(theta[8.86024]) : 0.0 : True
+ 9.0 : 0.0 : domegadt[9.0] + 0.25*omega[9.0] + 5.0*sin(theta[9.0]) : 0.0 : True
+ 9.057104 : 0.0 : domegadt[9.057104] + 0.25*omega[9.057104] + 5.0*sin(theta[9.057104]) : 0.0 : True
+ 9.276843 : 0.0 : domegadt[9.276843] + 0.25*omega[9.276843] + 5.0*sin(theta[9.276843]) : 0.0 : True
+ 9.58359 : 0.0 : domegadt[9.58359] + 0.25*omega[9.58359] + 5.0*sin(theta[9.58359]) : 0.0 : True
+ 9.86024 : 0.0 : domegadt[9.86024] + 0.25*omega[9.86024] + 5.0*sin(theta[9.86024]) : 0.0 : True
+ 10.0 : 0.0 : domegadt[10.0] + 0.25*omega[10.0] + 5.0*sin(theta[10.0]) : 0.0 : True
diffeq2 : Size=51, Index=t, Active=True
Key : Lower : Body : Upper : Active
0.0 : 0.0 : dthetadt[0.0] - omega[0.0] : 0.0 : True
@@ -328,113 +328,113 @@
9.86024 : 0.0 : dthetadt[9.86024] - omega[9.86024] : 0.0 : True
10.0 : 0.0 : dthetadt[10.0] - omega[10.0] : 0.0 : True
domegadt_disc_eq : Size=50, Index=t, Active=True
- Key : Lower : Body : Upper : Active
- 0.057104 : 0.0 : domegadt[0.057104] + 11.0386792412*omega[0.0] - 8.75592397794*omega[0.057104] - 2.89194261538*omega[0.276843] + 0.8751863962*omega[0.58359] - 0.39970520794*omega[0.86024] + 0.133706163849*omega[1.0] : 0.0 : True
- 0.276843 : 0.0 : domegadt[0.276843] - 3.5830685225*omega[0.0] + 7.16138072015*omega[0.057104] - 1.80607772408*omega[0.276843] - 2.36379717607*omega[0.58359] + 0.865900780283*omega[0.86024] - 0.274338077775*omega[1.0] : 0.0 : True
- 0.58359 : 0.0 : domegadt[0.58359] + 2.3441715579*omega[0.0] - 4.12216524624*omega[0.057104] + 4.49601712581*omega[0.276843] - 0.856765245397*omega[0.58359] - 2.51832094921*omega[0.86024] + 0.657062757134*omega[1.0] : 0.0 : True
- 0.86024 : 0.0 : domegadt[0.86024] - 2.28263550021*omega[0.0] + 3.87866321972*omega[0.057104] - 3.39315191806*omega[0.276843] + 5.18834090641*omega[0.58359] - 0.581233052581*omega[0.86024] - 2.80998365528*omega[1.0] : 0.0 : True
- 1.0 : 0.0 : domegadt[1.0] + 5.0*omega[0.0] - 8.41242422359*omega[0.057104] + 6.97025611666*omega[0.276843] - 8.77711420415*omega[0.58359] + 18.2192823111*omega[0.86024] - 13.0*omega[1.0] : 0.0 : True
- 1.057104 : 0.0 : domegadt[1.057104] + 11.0386792412*omega[1.0] - 8.75592397794*omega[1.057104] - 2.89194261538*omega[1.276843] + 0.8751863962*omega[1.58359] - 0.39970520794*omega[1.86024] + 0.133706163849*omega[2.0] : 0.0 : True
- 1.276843 : 0.0 : domegadt[1.276843] - 3.5830685225*omega[1.0] + 7.16138072015*omega[1.057104] - 1.80607772408*omega[1.276843] - 2.36379717607*omega[1.58359] + 0.865900780283*omega[1.86024] - 0.274338077775*omega[2.0] : 0.0 : True
- 1.58359 : 0.0 : domegadt[1.58359] + 2.3441715579*omega[1.0] - 4.12216524624*omega[1.057104] + 4.49601712581*omega[1.276843] - 0.856765245397*omega[1.58359] - 2.51832094921*omega[1.86024] + 0.657062757134*omega[2.0] : 0.0 : True
- 1.86024 : 0.0 : domegadt[1.86024] - 2.28263550021*omega[1.0] + 3.87866321972*omega[1.057104] - 3.39315191806*omega[1.276843] + 5.18834090641*omega[1.58359] - 0.581233052581*omega[1.86024] - 2.80998365528*omega[2.0] : 0.0 : True
- 2.0 : 0.0 : domegadt[2.0] + 5.0*omega[1.0] - 8.41242422359*omega[1.057104] + 6.97025611666*omega[1.276843] - 8.77711420415*omega[1.58359] + 18.2192823111*omega[1.86024] - 13.0*omega[2.0] : 0.0 : True
- 2.057104 : 0.0 : domegadt[2.057104] + 11.0386792412*omega[2.0] - 8.75592397794*omega[2.057104] - 2.89194261538*omega[2.276843] + 0.8751863962*omega[2.58359] - 0.39970520794*omega[2.86024] + 0.133706163849*omega[3.0] : 0.0 : True
- 2.276843 : 0.0 : domegadt[2.276843] - 3.5830685225*omega[2.0] + 7.16138072015*omega[2.057104] - 1.80607772408*omega[2.276843] - 2.36379717607*omega[2.58359] + 0.865900780283*omega[2.86024] - 0.274338077775*omega[3.0] : 0.0 : True
- 2.58359 : 0.0 : domegadt[2.58359] + 2.3441715579*omega[2.0] - 4.12216524624*omega[2.057104] + 4.49601712581*omega[2.276843] - 0.856765245397*omega[2.58359] - 2.51832094921*omega[2.86024] + 0.657062757134*omega[3.0] : 0.0 : True
- 2.86024 : 0.0 : domegadt[2.86024] - 2.28263550021*omega[2.0] + 3.87866321972*omega[2.057104] - 3.39315191806*omega[2.276843] + 5.18834090641*omega[2.58359] - 0.581233052581*omega[2.86024] - 2.80998365528*omega[3.0] : 0.0 : True
- 3.0 : 0.0 : domegadt[3.0] + 5.0*omega[2.0] - 8.41242422359*omega[2.057104] + 6.97025611666*omega[2.276843] - 8.77711420415*omega[2.58359] + 18.2192823111*omega[2.86024] - 13.0*omega[3.0] : 0.0 : True
- 3.057104 : 0.0 : domegadt[3.057104] + 11.0386792412*omega[3.0] - 8.75592397794*omega[3.057104] - 2.89194261538*omega[3.276843] + 0.8751863962*omega[3.58359] - 0.39970520794*omega[3.86024] + 0.133706163849*omega[4.0] : 0.0 : True
- 3.276843 : 0.0 : domegadt[3.276843] - 3.5830685225*omega[3.0] + 7.16138072015*omega[3.057104] - 1.80607772408*omega[3.276843] - 2.36379717607*omega[3.58359] + 0.865900780283*omega[3.86024] - 0.274338077775*omega[4.0] : 0.0 : True
- 3.58359 : 0.0 : domegadt[3.58359] + 2.3441715579*omega[3.0] - 4.12216524624*omega[3.057104] + 4.49601712581*omega[3.276843] - 0.856765245397*omega[3.58359] - 2.51832094921*omega[3.86024] + 0.657062757134*omega[4.0] : 0.0 : True
- 3.86024 : 0.0 : domegadt[3.86024] - 2.28263550021*omega[3.0] + 3.87866321972*omega[3.057104] - 3.39315191806*omega[3.276843] + 5.18834090641*omega[3.58359] - 0.581233052581*omega[3.86024] - 2.80998365528*omega[4.0] : 0.0 : True
- 4.0 : 0.0 : domegadt[4.0] + 5.0*omega[3.0] - 8.41242422359*omega[3.057104] + 6.97025611666*omega[3.276843] - 8.77711420415*omega[3.58359] + 18.2192823111*omega[3.86024] - 13.0*omega[4.0] : 0.0 : True
- 4.057104 : 0.0 : domegadt[4.057104] + 11.0386792412*omega[4.0] - 8.75592397794*omega[4.057104] - 2.89194261538*omega[4.276843] + 0.8751863962*omega[4.58359] - 0.39970520794*omega[4.86024] + 0.133706163849*omega[5.0] : 0.0 : True
- 4.276843 : 0.0 : domegadt[4.276843] - 3.5830685225*omega[4.0] + 7.16138072015*omega[4.057104] - 1.80607772408*omega[4.276843] - 2.36379717607*omega[4.58359] + 0.865900780283*omega[4.86024] - 0.274338077775*omega[5.0] : 0.0 : True
- 4.58359 : 0.0 : domegadt[4.58359] + 2.3441715579*omega[4.0] - 4.12216524624*omega[4.057104] + 4.49601712581*omega[4.276843] - 0.856765245397*omega[4.58359] - 2.51832094921*omega[4.86024] + 0.657062757134*omega[5.0] : 0.0 : True
- 4.86024 : 0.0 : domegadt[4.86024] - 2.28263550021*omega[4.0] + 3.87866321972*omega[4.057104] - 3.39315191806*omega[4.276843] + 5.18834090641*omega[4.58359] - 0.581233052581*omega[4.86024] - 2.80998365528*omega[5.0] : 0.0 : True
- 5.0 : 0.0 : domegadt[5.0] + 5.0*omega[4.0] - 8.41242422359*omega[4.057104] + 6.97025611666*omega[4.276843] - 8.77711420415*omega[4.58359] + 18.2192823111*omega[4.86024] - 13.0*omega[5.0] : 0.0 : True
- 5.057104 : 0.0 : domegadt[5.057104] + 11.0386792412*omega[5.0] - 8.75592397794*omega[5.057104] - 2.89194261538*omega[5.276843] + 0.8751863962*omega[5.58359] - 0.39970520794*omega[5.86024] + 0.133706163849*omega[6.0] : 0.0 : True
- 5.276843 : 0.0 : domegadt[5.276843] - 3.5830685225*omega[5.0] + 7.16138072015*omega[5.057104] - 1.80607772408*omega[5.276843] - 2.36379717607*omega[5.58359] + 0.865900780283*omega[5.86024] - 0.274338077775*omega[6.0] : 0.0 : True
- 5.58359 : 0.0 : domegadt[5.58359] + 2.3441715579*omega[5.0] - 4.12216524624*omega[5.057104] + 4.49601712581*omega[5.276843] - 0.856765245397*omega[5.58359] - 2.51832094921*omega[5.86024] + 0.657062757134*omega[6.0] : 0.0 : True
- 5.86024 : 0.0 : domegadt[5.86024] - 2.28263550021*omega[5.0] + 3.87866321972*omega[5.057104] - 3.39315191806*omega[5.276843] + 5.18834090641*omega[5.58359] - 0.581233052581*omega[5.86024] - 2.80998365528*omega[6.0] : 0.0 : True
- 6.0 : 0.0 : domegadt[6.0] + 5.0*omega[5.0] - 8.41242422359*omega[5.057104] + 6.97025611666*omega[5.276843] - 8.77711420415*omega[5.58359] + 18.2192823111*omega[5.86024] - 13.0*omega[6.0] : 0.0 : True
- 6.057104 : 0.0 : domegadt[6.057104] + 11.0386792412*omega[6.0] - 8.75592397794*omega[6.057104] - 2.89194261538*omega[6.276843] + 0.8751863962*omega[6.58359] - 0.39970520794*omega[6.86024] + 0.133706163849*omega[7.0] : 0.0 : True
- 6.276843 : 0.0 : domegadt[6.276843] - 3.5830685225*omega[6.0] + 7.16138072015*omega[6.057104] - 1.80607772408*omega[6.276843] - 2.36379717607*omega[6.58359] + 0.865900780283*omega[6.86024] - 0.274338077775*omega[7.0] : 0.0 : True
- 6.58359 : 0.0 : domegadt[6.58359] + 2.3441715579*omega[6.0] - 4.12216524624*omega[6.057104] + 4.49601712581*omega[6.276843] - 0.856765245397*omega[6.58359] - 2.51832094921*omega[6.86024] + 0.657062757134*omega[7.0] : 0.0 : True
- 6.86024 : 0.0 : domegadt[6.86024] - 2.28263550021*omega[6.0] + 3.87866321972*omega[6.057104] - 3.39315191806*omega[6.276843] + 5.18834090641*omega[6.58359] - 0.581233052581*omega[6.86024] - 2.80998365528*omega[7.0] : 0.0 : True
- 7.0 : 0.0 : domegadt[7.0] + 5.0*omega[6.0] - 8.41242422359*omega[6.057104] + 6.97025611666*omega[6.276843] - 8.77711420415*omega[6.58359] + 18.2192823111*omega[6.86024] - 13.0*omega[7.0] : 0.0 : True
- 7.057104 : 0.0 : domegadt[7.057104] + 11.0386792412*omega[7.0] - 8.75592397794*omega[7.057104] - 2.89194261538*omega[7.276843] + 0.8751863962*omega[7.58359] - 0.39970520794*omega[7.86024] + 0.133706163849*omega[8.0] : 0.0 : True
- 7.276843 : 0.0 : domegadt[7.276843] - 3.5830685225*omega[7.0] + 7.16138072015*omega[7.057104] - 1.80607772408*omega[7.276843] - 2.36379717607*omega[7.58359] + 0.865900780283*omega[7.86024] - 0.274338077775*omega[8.0] : 0.0 : True
- 7.58359 : 0.0 : domegadt[7.58359] + 2.3441715579*omega[7.0] - 4.12216524624*omega[7.057104] + 4.49601712581*omega[7.276843] - 0.856765245397*omega[7.58359] - 2.51832094921*omega[7.86024] + 0.657062757134*omega[8.0] : 0.0 : True
- 7.86024 : 0.0 : domegadt[7.86024] - 2.28263550021*omega[7.0] + 3.87866321972*omega[7.057104] - 3.39315191806*omega[7.276843] + 5.18834090641*omega[7.58359] - 0.581233052581*omega[7.86024] - 2.80998365528*omega[8.0] : 0.0 : True
- 8.0 : 0.0 : domegadt[8.0] + 5.0*omega[7.0] - 8.41242422359*omega[7.057104] + 6.97025611666*omega[7.276843] - 8.77711420415*omega[7.58359] + 18.2192823111*omega[7.86024] - 13.0*omega[8.0] : 0.0 : True
- 8.057104 : 0.0 : domegadt[8.057104] + 11.0386792412*omega[8.0] - 8.75592397794*omega[8.057104] - 2.89194261538*omega[8.276843] + 0.8751863962*omega[8.58359] - 0.39970520794*omega[8.86024] + 0.133706163849*omega[9.0] : 0.0 : True
- 8.276843 : 0.0 : domegadt[8.276843] - 3.5830685225*omega[8.0] + 7.16138072015*omega[8.057104] - 1.80607772408*omega[8.276843] - 2.36379717607*omega[8.58359] + 0.865900780283*omega[8.86024] - 0.274338077775*omega[9.0] : 0.0 : True
- 8.58359 : 0.0 : domegadt[8.58359] + 2.3441715579*omega[8.0] - 4.12216524624*omega[8.057104] + 4.49601712581*omega[8.276843] - 0.856765245397*omega[8.58359] - 2.51832094921*omega[8.86024] + 0.657062757134*omega[9.0] : 0.0 : True
- 8.86024 : 0.0 : domegadt[8.86024] - 2.28263550021*omega[8.0] + 3.87866321972*omega[8.057104] - 3.39315191806*omega[8.276843] + 5.18834090641*omega[8.58359] - 0.581233052581*omega[8.86024] - 2.80998365528*omega[9.0] : 0.0 : True
- 9.0 : 0.0 : domegadt[9.0] + 5.0*omega[8.0] - 8.41242422359*omega[8.057104] + 6.97025611666*omega[8.276843] - 8.77711420415*omega[8.58359] + 18.2192823111*omega[8.86024] - 13.0*omega[9.0] : 0.0 : True
- 9.057104 : 0.0 : domegadt[9.057104] + 11.0386792412*omega[9.0] - 8.75592397794*omega[9.057104] - 2.89194261538*omega[9.276843] + 0.8751863962*omega[9.58359] - 0.39970520794*omega[9.86024] + 0.133706163849*omega[10.0] : 0.0 : True
- 9.276843 : 0.0 : domegadt[9.276843] - 3.5830685225*omega[9.0] + 7.16138072015*omega[9.057104] - 1.80607772408*omega[9.276843] - 2.36379717607*omega[9.58359] + 0.865900780283*omega[9.86024] - 0.274338077775*omega[10.0] : 0.0 : True
- 9.58359 : 0.0 : domegadt[9.58359] + 2.3441715579*omega[9.0] - 4.12216524624*omega[9.057104] + 4.49601712581*omega[9.276843] - 0.856765245397*omega[9.58359] - 2.51832094921*omega[9.86024] + 0.657062757134*omega[10.0] : 0.0 : True
- 9.86024 : 0.0 : domegadt[9.86024] - 2.28263550021*omega[9.0] + 3.87866321972*omega[9.057104] - 3.39315191806*omega[9.276843] + 5.18834090641*omega[9.58359] - 0.581233052581*omega[9.86024] - 2.80998365528*omega[10.0] : 0.0 : True
- 10.0 : 0.0 : domegadt[10.0] + 5.0*omega[9.0] - 8.41242422359*omega[9.057104] + 6.97025611666*omega[9.276843] - 8.77711420415*omega[9.58359] + 18.2192823111*omega[9.86024] - 13.0*omega[10.0] : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 0.057104 : 0.0 : domegadt[0.057104] + 11.038679241208952*omega[0.0] - 8.755923977938355*omega[0.057104] - 2.8919426153801258*omega[0.276843] + 0.87518639620027*omega[0.58359] - 0.39970520793996167*omega[0.86024] + 0.13370616384921521*omega[1.0] : 0.0 : True
+ 0.276843 : 0.0 : domegadt[0.276843] - 3.5830685225010477*omega[0.0] + 7.161380720145321*omega[0.057104] - 1.8060777240835826*omega[0.276843] - 2.3637971760686236*omega[0.58359] + 0.8659007802831209*omega[0.86024] - 0.274338077775192*omega[1.0] : 0.0 : True
+ 0.58359 : 0.0 : domegadt[0.58359] + 2.3441715579038664*omega[0.0] - 4.122165246243398*omega[0.057104] + 4.496017125813501*omega[0.276843] - 0.8567652453972836*omega[0.58359] - 2.518320949211015*omega[0.86024] + 0.657062757134355*omega[1.0] : 0.0 : True
+ 0.86024 : 0.0 : domegadt[0.86024] - 2.282635500205682*omega[0.0] + 3.8786632197240785*omega[0.057104] - 3.3931519180649445*omega[0.276843] + 5.188340906407153*omega[0.58359] - 0.5812330525807557*omega[0.86024] - 2.8099836552797197*omega[1.0] : 0.0 : True
+ 1.0 : 0.0 : domegadt[1.0] + 4.999999999999989*omega[0.0] - 8.412424223594346*omega[0.057104] + 6.970256116656801*omega[0.276843] - 8.777114204150497*omega[0.58359] + 18.219282311088037*omega[0.86024] - 12.99999999999998*omega[1.0] : 0.0 : True
+ 1.057104 : 0.0 : domegadt[1.057104] + 11.038679241208952*omega[1.0] - 8.755923977938355*omega[1.057104] - 2.8919426153801258*omega[1.276843] + 0.87518639620027*omega[1.58359] - 0.39970520793996167*omega[1.86024] + 0.13370616384921521*omega[2.0] : 0.0 : True
+ 1.276843 : 0.0 : domegadt[1.276843] - 3.5830685225010477*omega[1.0] + 7.161380720145321*omega[1.057104] - 1.8060777240835826*omega[1.276843] - 2.3637971760686236*omega[1.58359] + 0.8659007802831209*omega[1.86024] - 0.274338077775192*omega[2.0] : 0.0 : True
+ 1.58359 : 0.0 : domegadt[1.58359] + 2.3441715579038664*omega[1.0] - 4.122165246243398*omega[1.057104] + 4.496017125813501*omega[1.276843] - 0.8567652453972836*omega[1.58359] - 2.518320949211015*omega[1.86024] + 0.657062757134355*omega[2.0] : 0.0 : True
+ 1.86024 : 0.0 : domegadt[1.86024] - 2.282635500205682*omega[1.0] + 3.8786632197240785*omega[1.057104] - 3.3931519180649445*omega[1.276843] + 5.188340906407153*omega[1.58359] - 0.5812330525807557*omega[1.86024] - 2.8099836552797197*omega[2.0] : 0.0 : True
+ 2.0 : 0.0 : domegadt[2.0] + 4.999999999999989*omega[1.0] - 8.412424223594346*omega[1.057104] + 6.970256116656801*omega[1.276843] - 8.777114204150497*omega[1.58359] + 18.219282311088037*omega[1.86024] - 12.99999999999998*omega[2.0] : 0.0 : True
+ 2.057104 : 0.0 : domegadt[2.057104] + 11.038679241208952*omega[2.0] - 8.755923977938355*omega[2.057104] - 2.8919426153801258*omega[2.276843] + 0.87518639620027*omega[2.58359] - 0.39970520793996167*omega[2.86024] + 0.13370616384921521*omega[3.0] : 0.0 : True
+ 2.276843 : 0.0 : domegadt[2.276843] - 3.5830685225010477*omega[2.0] + 7.161380720145321*omega[2.057104] - 1.8060777240835826*omega[2.276843] - 2.3637971760686236*omega[2.58359] + 0.8659007802831209*omega[2.86024] - 0.274338077775192*omega[3.0] : 0.0 : True
+ 2.58359 : 0.0 : domegadt[2.58359] + 2.3441715579038664*omega[2.0] - 4.122165246243398*omega[2.057104] + 4.496017125813501*omega[2.276843] - 0.8567652453972836*omega[2.58359] - 2.518320949211015*omega[2.86024] + 0.657062757134355*omega[3.0] : 0.0 : True
+ 2.86024 : 0.0 : domegadt[2.86024] - 2.282635500205682*omega[2.0] + 3.8786632197240785*omega[2.057104] - 3.3931519180649445*omega[2.276843] + 5.188340906407153*omega[2.58359] - 0.5812330525807557*omega[2.86024] - 2.8099836552797197*omega[3.0] : 0.0 : True
+ 3.0 : 0.0 : domegadt[3.0] + 4.999999999999989*omega[2.0] - 8.412424223594346*omega[2.057104] + 6.970256116656801*omega[2.276843] - 8.777114204150497*omega[2.58359] + 18.219282311088037*omega[2.86024] - 12.99999999999998*omega[3.0] : 0.0 : True
+ 3.057104 : 0.0 : domegadt[3.057104] + 11.038679241208952*omega[3.0] - 8.755923977938355*omega[3.057104] - 2.8919426153801258*omega[3.276843] + 0.87518639620027*omega[3.58359] - 0.39970520793996167*omega[3.86024] + 0.13370616384921521*omega[4.0] : 0.0 : True
+ 3.276843 : 0.0 : domegadt[3.276843] - 3.5830685225010477*omega[3.0] + 7.161380720145321*omega[3.057104] - 1.8060777240835826*omega[3.276843] - 2.3637971760686236*omega[3.58359] + 0.8659007802831209*omega[3.86024] - 0.274338077775192*omega[4.0] : 0.0 : True
+ 3.58359 : 0.0 : domegadt[3.58359] + 2.3441715579038664*omega[3.0] - 4.122165246243398*omega[3.057104] + 4.496017125813501*omega[3.276843] - 0.8567652453972836*omega[3.58359] - 2.518320949211015*omega[3.86024] + 0.657062757134355*omega[4.0] : 0.0 : True
+ 3.86024 : 0.0 : domegadt[3.86024] - 2.282635500205682*omega[3.0] + 3.8786632197240785*omega[3.057104] - 3.3931519180649445*omega[3.276843] + 5.188340906407153*omega[3.58359] - 0.5812330525807557*omega[3.86024] - 2.8099836552797197*omega[4.0] : 0.0 : True
+ 4.0 : 0.0 : domegadt[4.0] + 4.999999999999989*omega[3.0] - 8.412424223594346*omega[3.057104] + 6.970256116656801*omega[3.276843] - 8.777114204150497*omega[3.58359] + 18.219282311088037*omega[3.86024] - 12.99999999999998*omega[4.0] : 0.0 : True
+ 4.057104 : 0.0 : domegadt[4.057104] + 11.038679241208952*omega[4.0] - 8.755923977938355*omega[4.057104] - 2.8919426153801258*omega[4.276843] + 0.87518639620027*omega[4.58359] - 0.39970520793996167*omega[4.86024] + 0.13370616384921521*omega[5.0] : 0.0 : True
+ 4.276843 : 0.0 : domegadt[4.276843] - 3.5830685225010477*omega[4.0] + 7.161380720145321*omega[4.057104] - 1.8060777240835826*omega[4.276843] - 2.3637971760686236*omega[4.58359] + 0.8659007802831209*omega[4.86024] - 0.274338077775192*omega[5.0] : 0.0 : True
+ 4.58359 : 0.0 : domegadt[4.58359] + 2.3441715579038664*omega[4.0] - 4.122165246243398*omega[4.057104] + 4.496017125813501*omega[4.276843] - 0.8567652453972836*omega[4.58359] - 2.518320949211015*omega[4.86024] + 0.657062757134355*omega[5.0] : 0.0 : True
+ 4.86024 : 0.0 : domegadt[4.86024] - 2.282635500205682*omega[4.0] + 3.8786632197240785*omega[4.057104] - 3.3931519180649445*omega[4.276843] + 5.188340906407153*omega[4.58359] - 0.5812330525807557*omega[4.86024] - 2.8099836552797197*omega[5.0] : 0.0 : True
+ 5.0 : 0.0 : domegadt[5.0] + 4.999999999999989*omega[4.0] - 8.412424223594346*omega[4.057104] + 6.970256116656801*omega[4.276843] - 8.777114204150497*omega[4.58359] + 18.219282311088037*omega[4.86024] - 12.99999999999998*omega[5.0] : 0.0 : True
+ 5.057104 : 0.0 : domegadt[5.057104] + 11.038679241208952*omega[5.0] - 8.755923977938355*omega[5.057104] - 2.8919426153801258*omega[5.276843] + 0.87518639620027*omega[5.58359] - 0.39970520793996167*omega[5.86024] + 0.13370616384921521*omega[6.0] : 0.0 : True
+ 5.276843 : 0.0 : domegadt[5.276843] - 3.5830685225010477*omega[5.0] + 7.161380720145321*omega[5.057104] - 1.8060777240835826*omega[5.276843] - 2.3637971760686236*omega[5.58359] + 0.8659007802831209*omega[5.86024] - 0.274338077775192*omega[6.0] : 0.0 : True
+ 5.58359 : 0.0 : domegadt[5.58359] + 2.3441715579038664*omega[5.0] - 4.122165246243398*omega[5.057104] + 4.496017125813501*omega[5.276843] - 0.8567652453972836*omega[5.58359] - 2.518320949211015*omega[5.86024] + 0.657062757134355*omega[6.0] : 0.0 : True
+ 5.86024 : 0.0 : domegadt[5.86024] - 2.282635500205682*omega[5.0] + 3.8786632197240785*omega[5.057104] - 3.3931519180649445*omega[5.276843] + 5.188340906407153*omega[5.58359] - 0.5812330525807557*omega[5.86024] - 2.8099836552797197*omega[6.0] : 0.0 : True
+ 6.0 : 0.0 : domegadt[6.0] + 4.999999999999989*omega[5.0] - 8.412424223594346*omega[5.057104] + 6.970256116656801*omega[5.276843] - 8.777114204150497*omega[5.58359] + 18.219282311088037*omega[5.86024] - 12.99999999999998*omega[6.0] : 0.0 : True
+ 6.057104 : 0.0 : domegadt[6.057104] + 11.038679241208952*omega[6.0] - 8.755923977938355*omega[6.057104] - 2.8919426153801258*omega[6.276843] + 0.87518639620027*omega[6.58359] - 0.39970520793996167*omega[6.86024] + 0.13370616384921521*omega[7.0] : 0.0 : True
+ 6.276843 : 0.0 : domegadt[6.276843] - 3.5830685225010477*omega[6.0] + 7.161380720145321*omega[6.057104] - 1.8060777240835826*omega[6.276843] - 2.3637971760686236*omega[6.58359] + 0.8659007802831209*omega[6.86024] - 0.274338077775192*omega[7.0] : 0.0 : True
+ 6.58359 : 0.0 : domegadt[6.58359] + 2.3441715579038664*omega[6.0] - 4.122165246243398*omega[6.057104] + 4.496017125813501*omega[6.276843] - 0.8567652453972836*omega[6.58359] - 2.518320949211015*omega[6.86024] + 0.657062757134355*omega[7.0] : 0.0 : True
+ 6.86024 : 0.0 : domegadt[6.86024] - 2.282635500205682*omega[6.0] + 3.8786632197240785*omega[6.057104] - 3.3931519180649445*omega[6.276843] + 5.188340906407153*omega[6.58359] - 0.5812330525807557*omega[6.86024] - 2.8099836552797197*omega[7.0] : 0.0 : True
+ 7.0 : 0.0 : domegadt[7.0] + 4.999999999999989*omega[6.0] - 8.412424223594346*omega[6.057104] + 6.970256116656801*omega[6.276843] - 8.777114204150497*omega[6.58359] + 18.219282311088037*omega[6.86024] - 12.99999999999998*omega[7.0] : 0.0 : True
+ 7.057104 : 0.0 : domegadt[7.057104] + 11.038679241208952*omega[7.0] - 8.755923977938355*omega[7.057104] - 2.8919426153801258*omega[7.276843] + 0.87518639620027*omega[7.58359] - 0.39970520793996167*omega[7.86024] + 0.13370616384921521*omega[8.0] : 0.0 : True
+ 7.276843 : 0.0 : domegadt[7.276843] - 3.5830685225010477*omega[7.0] + 7.161380720145321*omega[7.057104] - 1.8060777240835826*omega[7.276843] - 2.3637971760686236*omega[7.58359] + 0.8659007802831209*omega[7.86024] - 0.274338077775192*omega[8.0] : 0.0 : True
+ 7.58359 : 0.0 : domegadt[7.58359] + 2.3441715579038664*omega[7.0] - 4.122165246243398*omega[7.057104] + 4.496017125813501*omega[7.276843] - 0.8567652453972836*omega[7.58359] - 2.518320949211015*omega[7.86024] + 0.657062757134355*omega[8.0] : 0.0 : True
+ 7.86024 : 0.0 : domegadt[7.86024] - 2.282635500205682*omega[7.0] + 3.8786632197240785*omega[7.057104] - 3.3931519180649445*omega[7.276843] + 5.188340906407153*omega[7.58359] - 0.5812330525807557*omega[7.86024] - 2.8099836552797197*omega[8.0] : 0.0 : True
+ 8.0 : 0.0 : domegadt[8.0] + 4.999999999999989*omega[7.0] - 8.412424223594346*omega[7.057104] + 6.970256116656801*omega[7.276843] - 8.777114204150497*omega[7.58359] + 18.219282311088037*omega[7.86024] - 12.99999999999998*omega[8.0] : 0.0 : True
+ 8.057104 : 0.0 : domegadt[8.057104] + 11.038679241208952*omega[8.0] - 8.755923977938355*omega[8.057104] - 2.8919426153801258*omega[8.276843] + 0.87518639620027*omega[8.58359] - 0.39970520793996167*omega[8.86024] + 0.13370616384921521*omega[9.0] : 0.0 : True
+ 8.276843 : 0.0 : domegadt[8.276843] - 3.5830685225010477*omega[8.0] + 7.161380720145321*omega[8.057104] - 1.8060777240835826*omega[8.276843] - 2.3637971760686236*omega[8.58359] + 0.8659007802831209*omega[8.86024] - 0.274338077775192*omega[9.0] : 0.0 : True
+ 8.58359 : 0.0 : domegadt[8.58359] + 2.3441715579038664*omega[8.0] - 4.122165246243398*omega[8.057104] + 4.496017125813501*omega[8.276843] - 0.8567652453972836*omega[8.58359] - 2.518320949211015*omega[8.86024] + 0.657062757134355*omega[9.0] : 0.0 : True
+ 8.86024 : 0.0 : domegadt[8.86024] - 2.282635500205682*omega[8.0] + 3.8786632197240785*omega[8.057104] - 3.3931519180649445*omega[8.276843] + 5.188340906407153*omega[8.58359] - 0.5812330525807557*omega[8.86024] - 2.8099836552797197*omega[9.0] : 0.0 : True
+ 9.0 : 0.0 : domegadt[9.0] + 4.999999999999989*omega[8.0] - 8.412424223594346*omega[8.057104] + 6.970256116656801*omega[8.276843] - 8.777114204150497*omega[8.58359] + 18.219282311088037*omega[8.86024] - 12.99999999999998*omega[9.0] : 0.0 : True
+ 9.057104 : 0.0 : domegadt[9.057104] + 11.038679241208952*omega[9.0] - 8.755923977938355*omega[9.057104] - 2.8919426153801258*omega[9.276843] + 0.87518639620027*omega[9.58359] - 0.39970520793996167*omega[9.86024] + 0.13370616384921521*omega[10.0] : 0.0 : True
+ 9.276843 : 0.0 : domegadt[9.276843] - 3.5830685225010477*omega[9.0] + 7.161380720145321*omega[9.057104] - 1.8060777240835826*omega[9.276843] - 2.3637971760686236*omega[9.58359] + 0.8659007802831209*omega[9.86024] - 0.274338077775192*omega[10.0] : 0.0 : True
+ 9.58359 : 0.0 : domegadt[9.58359] + 2.3441715579038664*omega[9.0] - 4.122165246243398*omega[9.057104] + 4.496017125813501*omega[9.276843] - 0.8567652453972836*omega[9.58359] - 2.518320949211015*omega[9.86024] + 0.657062757134355*omega[10.0] : 0.0 : True
+ 9.86024 : 0.0 : domegadt[9.86024] - 2.282635500205682*omega[9.0] + 3.8786632197240785*omega[9.057104] - 3.3931519180649445*omega[9.276843] + 5.188340906407153*omega[9.58359] - 0.5812330525807557*omega[9.86024] - 2.8099836552797197*omega[10.0] : 0.0 : True
+ 10.0 : 0.0 : domegadt[10.0] + 4.999999999999989*omega[9.0] - 8.412424223594346*omega[9.057104] + 6.970256116656801*omega[9.276843] - 8.777114204150497*omega[9.58359] + 18.219282311088037*omega[9.86024] - 12.99999999999998*omega[10.0] : 0.0 : True
dthetadt_disc_eq : Size=50, Index=t, Active=True
- Key : Lower : Body : Upper : Active
- 0.057104 : 0.0 : dthetadt[0.057104] + 11.0386792412*theta[0.0] - 8.75592397794*theta[0.057104] - 2.89194261538*theta[0.276843] + 0.8751863962*theta[0.58359] - 0.39970520794*theta[0.86024] + 0.133706163849*theta[1.0] : 0.0 : True
- 0.276843 : 0.0 : dthetadt[0.276843] - 3.5830685225*theta[0.0] + 7.16138072015*theta[0.057104] - 1.80607772408*theta[0.276843] - 2.36379717607*theta[0.58359] + 0.865900780283*theta[0.86024] - 0.274338077775*theta[1.0] : 0.0 : True
- 0.58359 : 0.0 : dthetadt[0.58359] + 2.3441715579*theta[0.0] - 4.12216524624*theta[0.057104] + 4.49601712581*theta[0.276843] - 0.856765245397*theta[0.58359] - 2.51832094921*theta[0.86024] + 0.657062757134*theta[1.0] : 0.0 : True
- 0.86024 : 0.0 : dthetadt[0.86024] - 2.28263550021*theta[0.0] + 3.87866321972*theta[0.057104] - 3.39315191806*theta[0.276843] + 5.18834090641*theta[0.58359] - 0.581233052581*theta[0.86024] - 2.80998365528*theta[1.0] : 0.0 : True
- 1.0 : 0.0 : dthetadt[1.0] + 5.0*theta[0.0] - 8.41242422359*theta[0.057104] + 6.97025611666*theta[0.276843] - 8.77711420415*theta[0.58359] + 18.2192823111*theta[0.86024] - 13.0*theta[1.0] : 0.0 : True
- 1.057104 : 0.0 : dthetadt[1.057104] + 11.0386792412*theta[1.0] - 8.75592397794*theta[1.057104] - 2.89194261538*theta[1.276843] + 0.8751863962*theta[1.58359] - 0.39970520794*theta[1.86024] + 0.133706163849*theta[2.0] : 0.0 : True
- 1.276843 : 0.0 : dthetadt[1.276843] - 3.5830685225*theta[1.0] + 7.16138072015*theta[1.057104] - 1.80607772408*theta[1.276843] - 2.36379717607*theta[1.58359] + 0.865900780283*theta[1.86024] - 0.274338077775*theta[2.0] : 0.0 : True
- 1.58359 : 0.0 : dthetadt[1.58359] + 2.3441715579*theta[1.0] - 4.12216524624*theta[1.057104] + 4.49601712581*theta[1.276843] - 0.856765245397*theta[1.58359] - 2.51832094921*theta[1.86024] + 0.657062757134*theta[2.0] : 0.0 : True
- 1.86024 : 0.0 : dthetadt[1.86024] - 2.28263550021*theta[1.0] + 3.87866321972*theta[1.057104] - 3.39315191806*theta[1.276843] + 5.18834090641*theta[1.58359] - 0.581233052581*theta[1.86024] - 2.80998365528*theta[2.0] : 0.0 : True
- 2.0 : 0.0 : dthetadt[2.0] + 5.0*theta[1.0] - 8.41242422359*theta[1.057104] + 6.97025611666*theta[1.276843] - 8.77711420415*theta[1.58359] + 18.2192823111*theta[1.86024] - 13.0*theta[2.0] : 0.0 : True
- 2.057104 : 0.0 : dthetadt[2.057104] + 11.0386792412*theta[2.0] - 8.75592397794*theta[2.057104] - 2.89194261538*theta[2.276843] + 0.8751863962*theta[2.58359] - 0.39970520794*theta[2.86024] + 0.133706163849*theta[3.0] : 0.0 : True
- 2.276843 : 0.0 : dthetadt[2.276843] - 3.5830685225*theta[2.0] + 7.16138072015*theta[2.057104] - 1.80607772408*theta[2.276843] - 2.36379717607*theta[2.58359] + 0.865900780283*theta[2.86024] - 0.274338077775*theta[3.0] : 0.0 : True
- 2.58359 : 0.0 : dthetadt[2.58359] + 2.3441715579*theta[2.0] - 4.12216524624*theta[2.057104] + 4.49601712581*theta[2.276843] - 0.856765245397*theta[2.58359] - 2.51832094921*theta[2.86024] + 0.657062757134*theta[3.0] : 0.0 : True
- 2.86024 : 0.0 : dthetadt[2.86024] - 2.28263550021*theta[2.0] + 3.87866321972*theta[2.057104] - 3.39315191806*theta[2.276843] + 5.18834090641*theta[2.58359] - 0.581233052581*theta[2.86024] - 2.80998365528*theta[3.0] : 0.0 : True
- 3.0 : 0.0 : dthetadt[3.0] + 5.0*theta[2.0] - 8.41242422359*theta[2.057104] + 6.97025611666*theta[2.276843] - 8.77711420415*theta[2.58359] + 18.2192823111*theta[2.86024] - 13.0*theta[3.0] : 0.0 : True
- 3.057104 : 0.0 : dthetadt[3.057104] + 11.0386792412*theta[3.0] - 8.75592397794*theta[3.057104] - 2.89194261538*theta[3.276843] + 0.8751863962*theta[3.58359] - 0.39970520794*theta[3.86024] + 0.133706163849*theta[4.0] : 0.0 : True
- 3.276843 : 0.0 : dthetadt[3.276843] - 3.5830685225*theta[3.0] + 7.16138072015*theta[3.057104] - 1.80607772408*theta[3.276843] - 2.36379717607*theta[3.58359] + 0.865900780283*theta[3.86024] - 0.274338077775*theta[4.0] : 0.0 : True
- 3.58359 : 0.0 : dthetadt[3.58359] + 2.3441715579*theta[3.0] - 4.12216524624*theta[3.057104] + 4.49601712581*theta[3.276843] - 0.856765245397*theta[3.58359] - 2.51832094921*theta[3.86024] + 0.657062757134*theta[4.0] : 0.0 : True
- 3.86024 : 0.0 : dthetadt[3.86024] - 2.28263550021*theta[3.0] + 3.87866321972*theta[3.057104] - 3.39315191806*theta[3.276843] + 5.18834090641*theta[3.58359] - 0.581233052581*theta[3.86024] - 2.80998365528*theta[4.0] : 0.0 : True
- 4.0 : 0.0 : dthetadt[4.0] + 5.0*theta[3.0] - 8.41242422359*theta[3.057104] + 6.97025611666*theta[3.276843] - 8.77711420415*theta[3.58359] + 18.2192823111*theta[3.86024] - 13.0*theta[4.0] : 0.0 : True
- 4.057104 : 0.0 : dthetadt[4.057104] + 11.0386792412*theta[4.0] - 8.75592397794*theta[4.057104] - 2.89194261538*theta[4.276843] + 0.8751863962*theta[4.58359] - 0.39970520794*theta[4.86024] + 0.133706163849*theta[5.0] : 0.0 : True
- 4.276843 : 0.0 : dthetadt[4.276843] - 3.5830685225*theta[4.0] + 7.16138072015*theta[4.057104] - 1.80607772408*theta[4.276843] - 2.36379717607*theta[4.58359] + 0.865900780283*theta[4.86024] - 0.274338077775*theta[5.0] : 0.0 : True
- 4.58359 : 0.0 : dthetadt[4.58359] + 2.3441715579*theta[4.0] - 4.12216524624*theta[4.057104] + 4.49601712581*theta[4.276843] - 0.856765245397*theta[4.58359] - 2.51832094921*theta[4.86024] + 0.657062757134*theta[5.0] : 0.0 : True
- 4.86024 : 0.0 : dthetadt[4.86024] - 2.28263550021*theta[4.0] + 3.87866321972*theta[4.057104] - 3.39315191806*theta[4.276843] + 5.18834090641*theta[4.58359] - 0.581233052581*theta[4.86024] - 2.80998365528*theta[5.0] : 0.0 : True
- 5.0 : 0.0 : dthetadt[5.0] + 5.0*theta[4.0] - 8.41242422359*theta[4.057104] + 6.97025611666*theta[4.276843] - 8.77711420415*theta[4.58359] + 18.2192823111*theta[4.86024] - 13.0*theta[5.0] : 0.0 : True
- 5.057104 : 0.0 : dthetadt[5.057104] + 11.0386792412*theta[5.0] - 8.75592397794*theta[5.057104] - 2.89194261538*theta[5.276843] + 0.8751863962*theta[5.58359] - 0.39970520794*theta[5.86024] + 0.133706163849*theta[6.0] : 0.0 : True
- 5.276843 : 0.0 : dthetadt[5.276843] - 3.5830685225*theta[5.0] + 7.16138072015*theta[5.057104] - 1.80607772408*theta[5.276843] - 2.36379717607*theta[5.58359] + 0.865900780283*theta[5.86024] - 0.274338077775*theta[6.0] : 0.0 : True
- 5.58359 : 0.0 : dthetadt[5.58359] + 2.3441715579*theta[5.0] - 4.12216524624*theta[5.057104] + 4.49601712581*theta[5.276843] - 0.856765245397*theta[5.58359] - 2.51832094921*theta[5.86024] + 0.657062757134*theta[6.0] : 0.0 : True
- 5.86024 : 0.0 : dthetadt[5.86024] - 2.28263550021*theta[5.0] + 3.87866321972*theta[5.057104] - 3.39315191806*theta[5.276843] + 5.18834090641*theta[5.58359] - 0.581233052581*theta[5.86024] - 2.80998365528*theta[6.0] : 0.0 : True
- 6.0 : 0.0 : dthetadt[6.0] + 5.0*theta[5.0] - 8.41242422359*theta[5.057104] + 6.97025611666*theta[5.276843] - 8.77711420415*theta[5.58359] + 18.2192823111*theta[5.86024] - 13.0*theta[6.0] : 0.0 : True
- 6.057104 : 0.0 : dthetadt[6.057104] + 11.0386792412*theta[6.0] - 8.75592397794*theta[6.057104] - 2.89194261538*theta[6.276843] + 0.8751863962*theta[6.58359] - 0.39970520794*theta[6.86024] + 0.133706163849*theta[7.0] : 0.0 : True
- 6.276843 : 0.0 : dthetadt[6.276843] - 3.5830685225*theta[6.0] + 7.16138072015*theta[6.057104] - 1.80607772408*theta[6.276843] - 2.36379717607*theta[6.58359] + 0.865900780283*theta[6.86024] - 0.274338077775*theta[7.0] : 0.0 : True
- 6.58359 : 0.0 : dthetadt[6.58359] + 2.3441715579*theta[6.0] - 4.12216524624*theta[6.057104] + 4.49601712581*theta[6.276843] - 0.856765245397*theta[6.58359] - 2.51832094921*theta[6.86024] + 0.657062757134*theta[7.0] : 0.0 : True
- 6.86024 : 0.0 : dthetadt[6.86024] - 2.28263550021*theta[6.0] + 3.87866321972*theta[6.057104] - 3.39315191806*theta[6.276843] + 5.18834090641*theta[6.58359] - 0.581233052581*theta[6.86024] - 2.80998365528*theta[7.0] : 0.0 : True
- 7.0 : 0.0 : dthetadt[7.0] + 5.0*theta[6.0] - 8.41242422359*theta[6.057104] + 6.97025611666*theta[6.276843] - 8.77711420415*theta[6.58359] + 18.2192823111*theta[6.86024] - 13.0*theta[7.0] : 0.0 : True
- 7.057104 : 0.0 : dthetadt[7.057104] + 11.0386792412*theta[7.0] - 8.75592397794*theta[7.057104] - 2.89194261538*theta[7.276843] + 0.8751863962*theta[7.58359] - 0.39970520794*theta[7.86024] + 0.133706163849*theta[8.0] : 0.0 : True
- 7.276843 : 0.0 : dthetadt[7.276843] - 3.5830685225*theta[7.0] + 7.16138072015*theta[7.057104] - 1.80607772408*theta[7.276843] - 2.36379717607*theta[7.58359] + 0.865900780283*theta[7.86024] - 0.274338077775*theta[8.0] : 0.0 : True
- 7.58359 : 0.0 : dthetadt[7.58359] + 2.3441715579*theta[7.0] - 4.12216524624*theta[7.057104] + 4.49601712581*theta[7.276843] - 0.856765245397*theta[7.58359] - 2.51832094921*theta[7.86024] + 0.657062757134*theta[8.0] : 0.0 : True
- 7.86024 : 0.0 : dthetadt[7.86024] - 2.28263550021*theta[7.0] + 3.87866321972*theta[7.057104] - 3.39315191806*theta[7.276843] + 5.18834090641*theta[7.58359] - 0.581233052581*theta[7.86024] - 2.80998365528*theta[8.0] : 0.0 : True
- 8.0 : 0.0 : dthetadt[8.0] + 5.0*theta[7.0] - 8.41242422359*theta[7.057104] + 6.97025611666*theta[7.276843] - 8.77711420415*theta[7.58359] + 18.2192823111*theta[7.86024] - 13.0*theta[8.0] : 0.0 : True
- 8.057104 : 0.0 : dthetadt[8.057104] + 11.0386792412*theta[8.0] - 8.75592397794*theta[8.057104] - 2.89194261538*theta[8.276843] + 0.8751863962*theta[8.58359] - 0.39970520794*theta[8.86024] + 0.133706163849*theta[9.0] : 0.0 : True
- 8.276843 : 0.0 : dthetadt[8.276843] - 3.5830685225*theta[8.0] + 7.16138072015*theta[8.057104] - 1.80607772408*theta[8.276843] - 2.36379717607*theta[8.58359] + 0.865900780283*theta[8.86024] - 0.274338077775*theta[9.0] : 0.0 : True
- 8.58359 : 0.0 : dthetadt[8.58359] + 2.3441715579*theta[8.0] - 4.12216524624*theta[8.057104] + 4.49601712581*theta[8.276843] - 0.856765245397*theta[8.58359] - 2.51832094921*theta[8.86024] + 0.657062757134*theta[9.0] : 0.0 : True
- 8.86024 : 0.0 : dthetadt[8.86024] - 2.28263550021*theta[8.0] + 3.87866321972*theta[8.057104] - 3.39315191806*theta[8.276843] + 5.18834090641*theta[8.58359] - 0.581233052581*theta[8.86024] - 2.80998365528*theta[9.0] : 0.0 : True
- 9.0 : 0.0 : dthetadt[9.0] + 5.0*theta[8.0] - 8.41242422359*theta[8.057104] + 6.97025611666*theta[8.276843] - 8.77711420415*theta[8.58359] + 18.2192823111*theta[8.86024] - 13.0*theta[9.0] : 0.0 : True
- 9.057104 : 0.0 : dthetadt[9.057104] + 11.0386792412*theta[9.0] - 8.75592397794*theta[9.057104] - 2.89194261538*theta[9.276843] + 0.8751863962*theta[9.58359] - 0.39970520794*theta[9.86024] + 0.133706163849*theta[10.0] : 0.0 : True
- 9.276843 : 0.0 : dthetadt[9.276843] - 3.5830685225*theta[9.0] + 7.16138072015*theta[9.057104] - 1.80607772408*theta[9.276843] - 2.36379717607*theta[9.58359] + 0.865900780283*theta[9.86024] - 0.274338077775*theta[10.0] : 0.0 : True
- 9.58359 : 0.0 : dthetadt[9.58359] + 2.3441715579*theta[9.0] - 4.12216524624*theta[9.057104] + 4.49601712581*theta[9.276843] - 0.856765245397*theta[9.58359] - 2.51832094921*theta[9.86024] + 0.657062757134*theta[10.0] : 0.0 : True
- 9.86024 : 0.0 : dthetadt[9.86024] - 2.28263550021*theta[9.0] + 3.87866321972*theta[9.057104] - 3.39315191806*theta[9.276843] + 5.18834090641*theta[9.58359] - 0.581233052581*theta[9.86024] - 2.80998365528*theta[10.0] : 0.0 : True
- 10.0 : 0.0 : dthetadt[10.0] + 5.0*theta[9.0] - 8.41242422359*theta[9.057104] + 6.97025611666*theta[9.276843] - 8.77711420415*theta[9.58359] + 18.2192823111*theta[9.86024] - 13.0*theta[10.0] : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 0.057104 : 0.0 : dthetadt[0.057104] + 11.038679241208952*theta[0.0] - 8.755923977938355*theta[0.057104] - 2.8919426153801258*theta[0.276843] + 0.87518639620027*theta[0.58359] - 0.39970520793996167*theta[0.86024] + 0.13370616384921521*theta[1.0] : 0.0 : True
+ 0.276843 : 0.0 : dthetadt[0.276843] - 3.5830685225010477*theta[0.0] + 7.161380720145321*theta[0.057104] - 1.8060777240835826*theta[0.276843] - 2.3637971760686236*theta[0.58359] + 0.8659007802831209*theta[0.86024] - 0.274338077775192*theta[1.0] : 0.0 : True
+ 0.58359 : 0.0 : dthetadt[0.58359] + 2.3441715579038664*theta[0.0] - 4.122165246243398*theta[0.057104] + 4.496017125813501*theta[0.276843] - 0.8567652453972836*theta[0.58359] - 2.518320949211015*theta[0.86024] + 0.657062757134355*theta[1.0] : 0.0 : True
+ 0.86024 : 0.0 : dthetadt[0.86024] - 2.282635500205682*theta[0.0] + 3.8786632197240785*theta[0.057104] - 3.3931519180649445*theta[0.276843] + 5.188340906407153*theta[0.58359] - 0.5812330525807557*theta[0.86024] - 2.8099836552797197*theta[1.0] : 0.0 : True
+ 1.0 : 0.0 : dthetadt[1.0] + 4.999999999999989*theta[0.0] - 8.412424223594346*theta[0.057104] + 6.970256116656801*theta[0.276843] - 8.777114204150497*theta[0.58359] + 18.219282311088037*theta[0.86024] - 12.99999999999998*theta[1.0] : 0.0 : True
+ 1.057104 : 0.0 : dthetadt[1.057104] + 11.038679241208952*theta[1.0] - 8.755923977938355*theta[1.057104] - 2.8919426153801258*theta[1.276843] + 0.87518639620027*theta[1.58359] - 0.39970520793996167*theta[1.86024] + 0.13370616384921521*theta[2.0] : 0.0 : True
+ 1.276843 : 0.0 : dthetadt[1.276843] - 3.5830685225010477*theta[1.0] + 7.161380720145321*theta[1.057104] - 1.8060777240835826*theta[1.276843] - 2.3637971760686236*theta[1.58359] + 0.8659007802831209*theta[1.86024] - 0.274338077775192*theta[2.0] : 0.0 : True
+ 1.58359 : 0.0 : dthetadt[1.58359] + 2.3441715579038664*theta[1.0] - 4.122165246243398*theta[1.057104] + 4.496017125813501*theta[1.276843] - 0.8567652453972836*theta[1.58359] - 2.518320949211015*theta[1.86024] + 0.657062757134355*theta[2.0] : 0.0 : True
+ 1.86024 : 0.0 : dthetadt[1.86024] - 2.282635500205682*theta[1.0] + 3.8786632197240785*theta[1.057104] - 3.3931519180649445*theta[1.276843] + 5.188340906407153*theta[1.58359] - 0.5812330525807557*theta[1.86024] - 2.8099836552797197*theta[2.0] : 0.0 : True
+ 2.0 : 0.0 : dthetadt[2.0] + 4.999999999999989*theta[1.0] - 8.412424223594346*theta[1.057104] + 6.970256116656801*theta[1.276843] - 8.777114204150497*theta[1.58359] + 18.219282311088037*theta[1.86024] - 12.99999999999998*theta[2.0] : 0.0 : True
+ 2.057104 : 0.0 : dthetadt[2.057104] + 11.038679241208952*theta[2.0] - 8.755923977938355*theta[2.057104] - 2.8919426153801258*theta[2.276843] + 0.87518639620027*theta[2.58359] - 0.39970520793996167*theta[2.86024] + 0.13370616384921521*theta[3.0] : 0.0 : True
+ 2.276843 : 0.0 : dthetadt[2.276843] - 3.5830685225010477*theta[2.0] + 7.161380720145321*theta[2.057104] - 1.8060777240835826*theta[2.276843] - 2.3637971760686236*theta[2.58359] + 0.8659007802831209*theta[2.86024] - 0.274338077775192*theta[3.0] : 0.0 : True
+ 2.58359 : 0.0 : dthetadt[2.58359] + 2.3441715579038664*theta[2.0] - 4.122165246243398*theta[2.057104] + 4.496017125813501*theta[2.276843] - 0.8567652453972836*theta[2.58359] - 2.518320949211015*theta[2.86024] + 0.657062757134355*theta[3.0] : 0.0 : True
+ 2.86024 : 0.0 : dthetadt[2.86024] - 2.282635500205682*theta[2.0] + 3.8786632197240785*theta[2.057104] - 3.3931519180649445*theta[2.276843] + 5.188340906407153*theta[2.58359] - 0.5812330525807557*theta[2.86024] - 2.8099836552797197*theta[3.0] : 0.0 : True
+ 3.0 : 0.0 : dthetadt[3.0] + 4.999999999999989*theta[2.0] - 8.412424223594346*theta[2.057104] + 6.970256116656801*theta[2.276843] - 8.777114204150497*theta[2.58359] + 18.219282311088037*theta[2.86024] - 12.99999999999998*theta[3.0] : 0.0 : True
+ 3.057104 : 0.0 : dthetadt[3.057104] + 11.038679241208952*theta[3.0] - 8.755923977938355*theta[3.057104] - 2.8919426153801258*theta[3.276843] + 0.87518639620027*theta[3.58359] - 0.39970520793996167*theta[3.86024] + 0.13370616384921521*theta[4.0] : 0.0 : True
+ 3.276843 : 0.0 : dthetadt[3.276843] - 3.5830685225010477*theta[3.0] + 7.161380720145321*theta[3.057104] - 1.8060777240835826*theta[3.276843] - 2.3637971760686236*theta[3.58359] + 0.8659007802831209*theta[3.86024] - 0.274338077775192*theta[4.0] : 0.0 : True
+ 3.58359 : 0.0 : dthetadt[3.58359] + 2.3441715579038664*theta[3.0] - 4.122165246243398*theta[3.057104] + 4.496017125813501*theta[3.276843] - 0.8567652453972836*theta[3.58359] - 2.518320949211015*theta[3.86024] + 0.657062757134355*theta[4.0] : 0.0 : True
+ 3.86024 : 0.0 : dthetadt[3.86024] - 2.282635500205682*theta[3.0] + 3.8786632197240785*theta[3.057104] - 3.3931519180649445*theta[3.276843] + 5.188340906407153*theta[3.58359] - 0.5812330525807557*theta[3.86024] - 2.8099836552797197*theta[4.0] : 0.0 : True
+ 4.0 : 0.0 : dthetadt[4.0] + 4.999999999999989*theta[3.0] - 8.412424223594346*theta[3.057104] + 6.970256116656801*theta[3.276843] - 8.777114204150497*theta[3.58359] + 18.219282311088037*theta[3.86024] - 12.99999999999998*theta[4.0] : 0.0 : True
+ 4.057104 : 0.0 : dthetadt[4.057104] + 11.038679241208952*theta[4.0] - 8.755923977938355*theta[4.057104] - 2.8919426153801258*theta[4.276843] + 0.87518639620027*theta[4.58359] - 0.39970520793996167*theta[4.86024] + 0.13370616384921521*theta[5.0] : 0.0 : True
+ 4.276843 : 0.0 : dthetadt[4.276843] - 3.5830685225010477*theta[4.0] + 7.161380720145321*theta[4.057104] - 1.8060777240835826*theta[4.276843] - 2.3637971760686236*theta[4.58359] + 0.8659007802831209*theta[4.86024] - 0.274338077775192*theta[5.0] : 0.0 : True
+ 4.58359 : 0.0 : dthetadt[4.58359] + 2.3441715579038664*theta[4.0] - 4.122165246243398*theta[4.057104] + 4.496017125813501*theta[4.276843] - 0.8567652453972836*theta[4.58359] - 2.518320949211015*theta[4.86024] + 0.657062757134355*theta[5.0] : 0.0 : True
+ 4.86024 : 0.0 : dthetadt[4.86024] - 2.282635500205682*theta[4.0] + 3.8786632197240785*theta[4.057104] - 3.3931519180649445*theta[4.276843] + 5.188340906407153*theta[4.58359] - 0.5812330525807557*theta[4.86024] - 2.8099836552797197*theta[5.0] : 0.0 : True
+ 5.0 : 0.0 : dthetadt[5.0] + 4.999999999999989*theta[4.0] - 8.412424223594346*theta[4.057104] + 6.970256116656801*theta[4.276843] - 8.777114204150497*theta[4.58359] + 18.219282311088037*theta[4.86024] - 12.99999999999998*theta[5.0] : 0.0 : True
+ 5.057104 : 0.0 : dthetadt[5.057104] + 11.038679241208952*theta[5.0] - 8.755923977938355*theta[5.057104] - 2.8919426153801258*theta[5.276843] + 0.87518639620027*theta[5.58359] - 0.39970520793996167*theta[5.86024] + 0.13370616384921521*theta[6.0] : 0.0 : True
+ 5.276843 : 0.0 : dthetadt[5.276843] - 3.5830685225010477*theta[5.0] + 7.161380720145321*theta[5.057104] - 1.8060777240835826*theta[5.276843] - 2.3637971760686236*theta[5.58359] + 0.8659007802831209*theta[5.86024] - 0.274338077775192*theta[6.0] : 0.0 : True
+ 5.58359 : 0.0 : dthetadt[5.58359] + 2.3441715579038664*theta[5.0] - 4.122165246243398*theta[5.057104] + 4.496017125813501*theta[5.276843] - 0.8567652453972836*theta[5.58359] - 2.518320949211015*theta[5.86024] + 0.657062757134355*theta[6.0] : 0.0 : True
+ 5.86024 : 0.0 : dthetadt[5.86024] - 2.282635500205682*theta[5.0] + 3.8786632197240785*theta[5.057104] - 3.3931519180649445*theta[5.276843] + 5.188340906407153*theta[5.58359] - 0.5812330525807557*theta[5.86024] - 2.8099836552797197*theta[6.0] : 0.0 : True
+ 6.0 : 0.0 : dthetadt[6.0] + 4.999999999999989*theta[5.0] - 8.412424223594346*theta[5.057104] + 6.970256116656801*theta[5.276843] - 8.777114204150497*theta[5.58359] + 18.219282311088037*theta[5.86024] - 12.99999999999998*theta[6.0] : 0.0 : True
+ 6.057104 : 0.0 : dthetadt[6.057104] + 11.038679241208952*theta[6.0] - 8.755923977938355*theta[6.057104] - 2.8919426153801258*theta[6.276843] + 0.87518639620027*theta[6.58359] - 0.39970520793996167*theta[6.86024] + 0.13370616384921521*theta[7.0] : 0.0 : True
+ 6.276843 : 0.0 : dthetadt[6.276843] - 3.5830685225010477*theta[6.0] + 7.161380720145321*theta[6.057104] - 1.8060777240835826*theta[6.276843] - 2.3637971760686236*theta[6.58359] + 0.8659007802831209*theta[6.86024] - 0.274338077775192*theta[7.0] : 0.0 : True
+ 6.58359 : 0.0 : dthetadt[6.58359] + 2.3441715579038664*theta[6.0] - 4.122165246243398*theta[6.057104] + 4.496017125813501*theta[6.276843] - 0.8567652453972836*theta[6.58359] - 2.518320949211015*theta[6.86024] + 0.657062757134355*theta[7.0] : 0.0 : True
+ 6.86024 : 0.0 : dthetadt[6.86024] - 2.282635500205682*theta[6.0] + 3.8786632197240785*theta[6.057104] - 3.3931519180649445*theta[6.276843] + 5.188340906407153*theta[6.58359] - 0.5812330525807557*theta[6.86024] - 2.8099836552797197*theta[7.0] : 0.0 : True
+ 7.0 : 0.0 : dthetadt[7.0] + 4.999999999999989*theta[6.0] - 8.412424223594346*theta[6.057104] + 6.970256116656801*theta[6.276843] - 8.777114204150497*theta[6.58359] + 18.219282311088037*theta[6.86024] - 12.99999999999998*theta[7.0] : 0.0 : True
+ 7.057104 : 0.0 : dthetadt[7.057104] + 11.038679241208952*theta[7.0] - 8.755923977938355*theta[7.057104] - 2.8919426153801258*theta[7.276843] + 0.87518639620027*theta[7.58359] - 0.39970520793996167*theta[7.86024] + 0.13370616384921521*theta[8.0] : 0.0 : True
+ 7.276843 : 0.0 : dthetadt[7.276843] - 3.5830685225010477*theta[7.0] + 7.161380720145321*theta[7.057104] - 1.8060777240835826*theta[7.276843] - 2.3637971760686236*theta[7.58359] + 0.8659007802831209*theta[7.86024] - 0.274338077775192*theta[8.0] : 0.0 : True
+ 7.58359 : 0.0 : dthetadt[7.58359] + 2.3441715579038664*theta[7.0] - 4.122165246243398*theta[7.057104] + 4.496017125813501*theta[7.276843] - 0.8567652453972836*theta[7.58359] - 2.518320949211015*theta[7.86024] + 0.657062757134355*theta[8.0] : 0.0 : True
+ 7.86024 : 0.0 : dthetadt[7.86024] - 2.282635500205682*theta[7.0] + 3.8786632197240785*theta[7.057104] - 3.3931519180649445*theta[7.276843] + 5.188340906407153*theta[7.58359] - 0.5812330525807557*theta[7.86024] - 2.8099836552797197*theta[8.0] : 0.0 : True
+ 8.0 : 0.0 : dthetadt[8.0] + 4.999999999999989*theta[7.0] - 8.412424223594346*theta[7.057104] + 6.970256116656801*theta[7.276843] - 8.777114204150497*theta[7.58359] + 18.219282311088037*theta[7.86024] - 12.99999999999998*theta[8.0] : 0.0 : True
+ 8.057104 : 0.0 : dthetadt[8.057104] + 11.038679241208952*theta[8.0] - 8.755923977938355*theta[8.057104] - 2.8919426153801258*theta[8.276843] + 0.87518639620027*theta[8.58359] - 0.39970520793996167*theta[8.86024] + 0.13370616384921521*theta[9.0] : 0.0 : True
+ 8.276843 : 0.0 : dthetadt[8.276843] - 3.5830685225010477*theta[8.0] + 7.161380720145321*theta[8.057104] - 1.8060777240835826*theta[8.276843] - 2.3637971760686236*theta[8.58359] + 0.8659007802831209*theta[8.86024] - 0.274338077775192*theta[9.0] : 0.0 : True
+ 8.58359 : 0.0 : dthetadt[8.58359] + 2.3441715579038664*theta[8.0] - 4.122165246243398*theta[8.057104] + 4.496017125813501*theta[8.276843] - 0.8567652453972836*theta[8.58359] - 2.518320949211015*theta[8.86024] + 0.657062757134355*theta[9.0] : 0.0 : True
+ 8.86024 : 0.0 : dthetadt[8.86024] - 2.282635500205682*theta[8.0] + 3.8786632197240785*theta[8.057104] - 3.3931519180649445*theta[8.276843] + 5.188340906407153*theta[8.58359] - 0.5812330525807557*theta[8.86024] - 2.8099836552797197*theta[9.0] : 0.0 : True
+ 9.0 : 0.0 : dthetadt[9.0] + 4.999999999999989*theta[8.0] - 8.412424223594346*theta[8.057104] + 6.970256116656801*theta[8.276843] - 8.777114204150497*theta[8.58359] + 18.219282311088037*theta[8.86024] - 12.99999999999998*theta[9.0] : 0.0 : True
+ 9.057104 : 0.0 : dthetadt[9.057104] + 11.038679241208952*theta[9.0] - 8.755923977938355*theta[9.057104] - 2.8919426153801258*theta[9.276843] + 0.87518639620027*theta[9.58359] - 0.39970520793996167*theta[9.86024] + 0.13370616384921521*theta[10.0] : 0.0 : True
+ 9.276843 : 0.0 : dthetadt[9.276843] - 3.5830685225010477*theta[9.0] + 7.161380720145321*theta[9.057104] - 1.8060777240835826*theta[9.276843] - 2.3637971760686236*theta[9.58359] + 0.8659007802831209*theta[9.86024] - 0.274338077775192*theta[10.0] : 0.0 : True
+ 9.58359 : 0.0 : dthetadt[9.58359] + 2.3441715579038664*theta[9.0] - 4.122165246243398*theta[9.057104] + 4.496017125813501*theta[9.276843] - 0.8567652453972836*theta[9.58359] - 2.518320949211015*theta[9.86024] + 0.657062757134355*theta[10.0] : 0.0 : True
+ 9.86024 : 0.0 : dthetadt[9.86024] - 2.282635500205682*theta[9.0] + 3.8786632197240785*theta[9.057104] - 3.3931519180649445*theta[9.276843] + 5.188340906407153*theta[9.58359] - 0.5812330525807557*theta[9.86024] - 2.8099836552797197*theta[10.0] : 0.0 : True
+ 10.0 : 0.0 : dthetadt[10.0] + 4.999999999999989*theta[9.0] - 8.412424223594346*theta[9.057104] + 6.970256116656801*theta[9.276843] - 8.777114204150497*theta[9.58359] + 18.219282311088037*theta[9.86024] - 12.99999999999998*theta[10.0] : 0.0 : True
1 ContinuousSet Declarations
t : Dim=0, Dimen=1, Size=51, Domain=None, Ordered=Sorted, Bounds=(0.0, 10.0)
- [0.0, 0.057104, 0.276843, 0.58359, 0.86024, 1.0, 1.057104, 1.276843, 1.58359, 1.86024, 2.0, 2.057104, 2.276843, 2.58359, 2.86024, 3.0, 3.057104, 3.276843, 3.58359, 3.86024, 4.0, 4.057104, 4.276843, 4.58359, 4.86024, 5.0, 5.057104, 5.276843, 5.58359, 5.86024, 6.0, 6.057104, 6.276843, 6.58359, 6.86024, 7.0, 7.057104, 7.276843, 7.58359, 7.86024, 8.0, 8.057104, 8.276843, 8.58359, 8.86024, 9.0, 9.057104, 9.276843, 9.58359, 9.86024, 10.0]
+ [0.0, 0.057104000000000002, 0.27684300000000001, 0.58359000000000005, 0.86024, 1.0, 1.057104, 1.276843, 1.5835900000000001, 1.8602399999999999, 2.0, 2.0571039999999998, 2.276843, 2.5835900000000001, 2.8602400000000001, 3.0, 3.0571039999999998, 3.276843, 3.5835900000000001, 3.8602400000000001, 4.0, 4.0571039999999998, 4.2768430000000004, 4.5835900000000001, 4.8602400000000001, 5.0, 5.0571039999999998, 5.2768430000000004, 5.5835900000000001, 5.8602400000000001, 6.0, 6.0571039999999998, 6.2768430000000004, 6.5835900000000001, 6.8602400000000001, 7.0, 7.0571039999999998, 7.2768430000000004, 7.5835900000000001, 7.8602400000000001, 8.0, 8.0571040000000007, 8.2768429999999995, 8.5835899999999992, 8.8602399999999992, 9.0, 9.0571040000000007, 9.2768429999999995, 9.5835899999999992, 9.8602399999999992, 10.0]
11 Declarations: t b c omega theta domegadt dthetadt diffeq1 diffeq2 domegadt_disc_eq dthetadt_disc_eq
[[ 0.0000 3.0400]
diff --git a/pyomo/dae/tests/simulator_ode_example.scipy.txt b/pyomo/dae/tests/simulator_ode_example.scipy.txt
index 2c2b791f161..ae7a0137bbe 100644
--- a/pyomo/dae/tests/simulator_ode_example.scipy.txt
+++ b/pyomo/dae/tests/simulator_ode_example.scipy.txt
@@ -114,166 +114,166 @@
9.86024 : None : None : None : False : True : Reals
10.0 : None : None : None : False : True : Reals
omega : Size=51, Index=t
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- 0.0 : None : 0.0 : None : False : False : Reals
- 0.057104 : None : -0.0288367678572 : None : False : False : Reals
- 0.276843 : None : -0.14493547298 : None : False : False : Reals
- 0.58359 : None : -0.360925548408 : None : False : False : Reals
- 0.86024 : None : -0.681755642637 : None : False : False : Reals
- 1.0 : None : -0.916582879182 : None : False : False : Reals
- 1.057104 : None : -1.03638712138 : None : False : False : Reals
- 1.276843 : None : -1.61446929263 : None : False : False : Reals
- 1.58359 : None : -2.77863468007 : None : False : False : Reals
- 1.86024 : None : -3.79648284773 : None : False : False : Reals
- 2.0 : None : -3.98879646591 : None : False : False : Reals
- 2.057104 : None : -3.95362311251 : None : False : False : Reals
- 2.276843 : None : -3.3125752077 : None : False : False : Reals
- 2.58359 : None : -1.71001289659 : None : False : False : Reals
- 2.86024 : None : -0.291504520974 : None : False : False : Reals
- 3.0 : None : 0.372878210502 : None : False : False : Reals
- 3.057104 : None : 0.63986314977 : None : False : False : Reals
- 3.276843 : None : 1.65645157132 : None : False : False : Reals
- 3.58359 : None : 2.89957479521 : None : False : False : Reals
- 3.86024 : None : 3.25695015449 : None : False : False : Reals
- 4.0 : None : 2.98879443998 : None : False : False : Reals
- 4.057104 : None : 2.8125811174 : None : False : False : Reals
- 4.276843 : None : 1.84447152297 : None : False : False : Reals
- 4.58359 : None : 0.283425210784 : None : False : False : Reals
- 4.86024 : None : -1.05799313411 : None : False : False : Reals
- 5.0 : None : -1.66932889675 : None : False : False : Reals
- 5.057104 : None : -1.90223084091 : None : False : False : Reals
- 5.276843 : None : -2.55893753165 : None : False : False : Reals
- 5.58359 : None : -2.56372567553 : None : False : False : Reals
- 5.86024 : None : -1.66638592808 : None : False : False : Reals
- 6.0 : None : -1.04118349534 : None : False : False : Reals
- 6.057104 : None : -0.776866391181 : None : False : False : Reals
- 6.276843 : None : 0.243243946736 : None : False : False : Reals
- 6.58359 : None : 1.50689915222 : None : False : False : Reals
- 6.86024 : None : 2.19686614438 : None : False : False : Reals
- 7.0 : None : 2.25389179447 : None : False : False : Reals
- 7.057104 : None : 2.22298061377 : None : False : False : Reals
- 7.276843 : None : 1.78217340649 : None : False : False : Reals
- 7.58359 : None : 0.650787061424 : None : False : False : Reals
- 7.86024 : None : -0.475976267561 : None : False : False : Reals
- 8.0 : None : -0.989440305176 : None : False : False : Reals
- 8.057104 : None : -1.1777525964 : None : False : False : Reals
- 8.276843 : None : -1.72859360088 : None : False : False : Reals
- 8.58359 : None : -1.82787592704 : None : False : False : Reals
- 8.86024 : None : -1.23257418606 : None : False : False : Reals
- 9.0 : None : -0.784311239003 : None : False : False : Reals
- 9.057104 : None : -0.58411118598 : None : False : False : Reals
- 9.276843 : None : 0.196892050912 : None : False : False : Reals
- 9.58359 : None : 1.13360713385 : None : False : False : Reals
- 9.86024 : None : 1.55494850475 : None : False : False : Reals
- 10.0 : None : 1.56385476992 : None : False : False : Reals
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ 0.0 : None : 0.0 : None : False : False : Reals
+ 0.057104 : None : -0.0288367678571954 : None : False : False : Reals
+ 0.276843 : None : -0.14493547297962298 : None : False : False : Reals
+ 0.58359 : None : -0.3609255484078798 : None : False : False : Reals
+ 0.86024 : None : -0.6817556426373107 : None : False : False : Reals
+ 1.0 : None : -0.9165828791830309 : None : False : False : Reals
+ 1.057104 : None : -1.0363871213806717 : None : False : False : Reals
+ 1.276843 : None : -1.6144692926364337 : None : False : False : Reals
+ 1.58359 : None : -2.778634680075688 : None : False : False : Reals
+ 1.86024 : None : -3.79648284775337 : None : False : False : Reals
+ 2.0 : None : -3.988796465928554 : None : False : False : Reals
+ 2.057104 : None : -3.9536231125313166 : None : False : False : Reals
+ 2.276843 : None : -3.3125752076882047 : None : False : False : Reals
+ 2.58359 : None : -1.710012896601475 : None : False : False : Reals
+ 2.86024 : None : -0.2915045209866684 : None : False : False : Reals
+ 3.0 : None : 0.372878210487349 : None : False : False : Reals
+ 3.057104 : None : 0.6398631497543629 : None : False : False : Reals
+ 3.276843 : None : 1.6564515713044317 : None : False : False : Reals
+ 3.58359 : None : 2.8995747952012128 : None : False : False : Reals
+ 3.86024 : None : 3.2569501545230115 : None : False : False : Reals
+ 4.0 : None : 2.9887944400187783 : None : False : False : Reals
+ 4.057104 : None : 2.8125811174423694 : None : False : False : Reals
+ 4.276843 : None : 1.8444715230192887 : None : False : False : Reals
+ 4.58359 : None : 0.2834252108238402 : None : False : False : Reals
+ 4.86024 : None : -1.057993134080183 : None : False : False : Reals
+ 5.0 : None : -1.6693288967205664 : None : False : False : Reals
+ 5.057104 : None : -1.9022308408799535 : None : False : False : Reals
+ 5.276843 : None : -2.558937531652716 : None : False : False : Reals
+ 5.58359 : None : -2.563725675578094 : None : False : False : Reals
+ 5.86024 : None : -1.6663859280776347 : None : False : False : Reals
+ 6.0 : None : -1.0411834953693138 : None : False : False : Reals
+ 6.057104 : None : -0.7768663909741436 : None : False : False : Reals
+ 6.276843 : None : 0.24324394670869176 : None : False : False : Reals
+ 6.58359 : None : 1.506899152287275 : None : False : False : Reals
+ 6.86024 : None : 2.196866144117729 : None : False : False : Reals
+ 7.0 : None : 2.2538917941075023 : None : False : False : Reals
+ 7.057104 : None : 2.222980613588319 : None : False : False : Reals
+ 7.276843 : None : 1.782173406282398 : None : False : False : Reals
+ 7.58359 : None : 0.6507870709652979 : None : False : False : Reals
+ 7.86024 : None : -0.4759762642191314 : None : False : False : Reals
+ 8.0 : None : -0.9894403155920486 : None : False : False : Reals
+ 8.057104 : None : -1.177752596518665 : None : False : False : Reals
+ 8.276843 : None : -1.7285935472347709 : None : False : False : Reals
+ 8.58359 : None : -1.8278759157066458 : None : False : False : Reals
+ 8.86024 : None : -1.23257470405372 : None : False : False : Reals
+ 9.0 : None : -0.7843117915439277 : None : False : False : Reals
+ 9.057104 : None : -0.5841118111548802 : None : False : False : Reals
+ 9.276843 : None : 0.19689143410950405 : None : False : False : Reals
+ 9.58359 : None : 1.1336067750399608 : None : False : False : Reals
+ 9.86024 : None : 1.5549500931784928 : None : False : False : Reals
+ 10.0 : None : 1.563856037467057 : None : False : False : Reals
theta : Size=51, Index=t
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- 0.0 : None : 3.04 : None : False : False : Reals
- 0.057104 : None : 3.0385436319 : None : False : False : Reals
- 0.276843 : None : 3.01985183613 : None : False : False : Reals
- 0.58359 : None : 2.94479775764 : None : False : False : Reals
- 0.86024 : None : 2.8038967152 : None : False : False : Reals
- 1.0 : None : 2.6943413503 : None : False : False : Reals
- 1.057104 : None : 2.63693317456 : None : False : False : Reals
- 1.276843 : None : 2.34999199229 : None : False : False : Reals
- 1.58359 : None : 1.6854393889 : None : False : False : Reals
- 1.86024 : None : 0.764341626865 : None : False : False : Reals
- 2.0 : None : 0.216576016619 : None : False : False : Reals
- 2.057104 : None : -0.00977846353746 : None : False : False : Reals
- 2.276843 : None : -0.821940540053 : None : False : False : Reals
- 2.58359 : None : -1.59939554065 : None : False : False : Reals
- 2.86024 : None : -1.87328732369 : None : False : False : Reals
- 3.0 : None : -1.86746528287 : None : False : False : Reals
- 3.057104 : None : -1.83891374154 : None : False : False : Reals
- 3.276843 : None : -1.58508899359 : None : False : False : Reals
- 3.58359 : None : -0.874855651808 : None : False : False : Reals
- 3.86024 : None : 0.00112257398207 : None : False : False : Reals
- 4.0 : None : 0.44058291421 : None : False : False : Reals
- 4.057104 : None : 0.607823103738 : None : False : False : Reals
- 4.276843 : None : 1.1231142077 : None : False : False : Reals
- 4.58359 : None : 1.44954549945 : None : False : False : Reals
- 4.86024 : None : 1.34299719607 : None : False : False : Reals
- 5.0 : None : 1.14827381901 : None : False : False : Reals
- 5.057104 : None : 1.05014516038 : None : False : False : Reals
- 5.276843 : None : 0.550480972104 : None : False : False : Reals
- 5.58359 : None : -0.266430877493 : None : False : False : Reals
- 5.86024 : None : -0.869554527438 : None : False : False : Reals
- 6.0 : None : -1.05420343153 : None : False : False : Reals
- 6.057104 : None : -1.11104992839 : None : False : False : Reals
- 6.276843 : None : -1.16703596463 : None : False : False : Reals
- 6.58359 : None : -0.890085746258 : None : False : False : Reals
- 6.86024 : None : -0.363899685656 : None : False : False : Reals
- 7.0 : None : -0.0503314378827 : None : False : False : Reals
- 7.057104 : None : 0.0782902450697 : None : False : False : Reals
- 7.276843 : None : 0.527110485435 : None : False : False : Reals
- 7.58359 : None : 0.908484357387 : None : False : False : Reals
- 7.86024 : None : 0.929574194943 : None : False : False : Reals
- 8.0 : None : 0.826337319292 : None : False : False : Reals
- 8.057104 : None : 0.763903856351 : None : False : False : Reals
- 8.276843 : None : 0.440356550325 : None : False : False : Reals
- 8.58359 : None : -0.127152302941 : None : False : False : Reals
- 8.86024 : None : -0.560493718334 : None : False : False : Reals
- 9.0 : None : -0.703992176477 : None : False : False : Reals
- 9.057104 : None : -0.740764398307 : None : False : False : Reals
- 9.276843 : None : -0.784798840301 : None : False : False : Reals
- 9.58359 : None : -0.572871946765 : None : False : False : Reals
- 9.86024 : None : -0.187863449026 : None : False : False : Reals
- 10.0 : None : 0.0317912313011 : None : False : False : Reals
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ 0.0 : None : 3.04 : None : False : False : Reals
+ 0.057104 : None : 3.038543631896333 : None : False : False : Reals
+ 0.276843 : None : 3.019851836127963 : None : False : False : Reals
+ 0.58359 : None : 2.9447977576344537 : None : False : False : Reals
+ 0.86024 : None : 2.8038967152002052 : None : False : False : Reals
+ 1.0 : None : 2.6943413502975 : None : False : False : Reals
+ 1.057104 : None : 2.63693317455725 : None : False : False : Reals
+ 1.276843 : None : 2.3499919922857972 : None : False : False : Reals
+ 1.58359 : None : 1.6854393888932513 : None : False : False : Reals
+ 1.86024 : None : 0.7643416268571628 : None : False : False : Reals
+ 2.0 : None : 0.21657601660924686 : None : False : False : Reals
+ 2.057104 : None : -0.009778463548521271 : None : False : False : Reals
+ 2.276843 : None : -0.8219405400650371 : None : False : False : Reals
+ 2.58359 : None : -1.5993955406633624 : None : False : False : Reals
+ 2.86024 : None : -1.8732873237018672 : None : False : False : Reals
+ 3.0 : None : -1.8674652828919989 : None : False : False : Reals
+ 3.057104 : None : -1.8389137415633605 : None : False : False : Reals
+ 3.276843 : None : -1.5850889936130301 : None : False : False : Reals
+ 3.58359 : None : -0.874855651835759 : None : False : False : Reals
+ 3.86024 : None : 0.0011225739576981725 : None : False : False : Reals
+ 4.0 : None : 0.4405829141908524 : None : False : False : Reals
+ 4.057104 : None : 0.6078231037212737 : None : False : False : Reals
+ 4.276843 : None : 1.123114207698621 : None : False : False : Reals
+ 4.58359 : None : 1.449545499460466 : None : False : False : Reals
+ 4.86024 : None : 1.3429971960922067 : None : False : False : Reals
+ 5.0 : None : 1.1482738190342978 : None : False : False : Reals
+ 5.057104 : None : 1.0501451604025767 : None : False : False : Reals
+ 5.276843 : None : 0.5504809721319138 : None : False : False : Reals
+ 5.58359 : None : -0.266430877472533 : None : False : False : Reals
+ 5.86024 : None : -0.8695545274350406 : None : False : False : Reals
+ 6.0 : None : -1.0542034315209994 : None : False : False : Reals
+ 6.057104 : None : -1.1110499283931439 : None : False : False : Reals
+ 6.276843 : None : -1.1670359646194137 : None : False : False : Reals
+ 6.58359 : None : -0.8900857462259287 : None : False : False : Reals
+ 6.86024 : None : -0.36389968565759245 : None : False : False : Reals
+ 7.0 : None : -0.050331438008618265 : None : False : False : Reals
+ 7.057104 : None : 0.07829024490877882 : None : False : False : Reals
+ 7.276843 : None : 0.5271104849972925 : None : False : False : Reals
+ 7.58359 : None : 0.9084843557947639 : None : False : False : Reals
+ 7.86024 : None : 0.929574195290587 : None : False : False : Reals
+ 8.0 : None : 0.8263373164710168 : None : False : False : Reals
+ 8.057104 : None : 0.7639038523119559 : None : False : False : Reals
+ 8.276843 : None : 0.44035655257316964 : None : False : False : Reals
+ 8.58359 : None : -0.1271522815342985 : None : False : False : Reals
+ 8.86024 : None : -0.5604937275209211 : None : False : False : Reals
+ 9.0 : None : -0.7039923793461461 : None : False : False : Reals
+ 9.057104 : None : -0.7407646255052835 : None : False : False : Reals
+ 9.276843 : None : -0.7847991880652745 : None : False : False : Reals
+ 9.58359 : None : -0.5728724256003687 : None : False : False : Reals
+ 9.86024 : None : -0.18786346624234584 : None : False : False : Reals
+ 10.0 : None : 0.03179163438205111 : None : False : False : Reals
4 Constraint Declarations
diffeq1 : Size=51, Index=t, Active=True
- Key : Lower : Body : Upper : Active
- 0.0 : 0.0 : domegadt[0.0] + 0.25*omega[0.0] + 5.0*sin( theta[0.0] ) : 0.0 : True
- 0.057104 : 0.0 : domegadt[0.057104] + 0.25*omega[0.057104] + 5.0*sin( theta[0.057104] ) : 0.0 : True
- 0.276843 : 0.0 : domegadt[0.276843] + 0.25*omega[0.276843] + 5.0*sin( theta[0.276843] ) : 0.0 : True
- 0.58359 : 0.0 : domegadt[0.58359] + 0.25*omega[0.58359] + 5.0*sin( theta[0.58359] ) : 0.0 : True
- 0.86024 : 0.0 : domegadt[0.86024] + 0.25*omega[0.86024] + 5.0*sin( theta[0.86024] ) : 0.0 : True
- 1.0 : 0.0 : domegadt[1.0] + 0.25*omega[1.0] + 5.0*sin( theta[1.0] ) : 0.0 : True
- 1.057104 : 0.0 : domegadt[1.057104] + 0.25*omega[1.057104] + 5.0*sin( theta[1.057104] ) : 0.0 : True
- 1.276843 : 0.0 : domegadt[1.276843] + 0.25*omega[1.276843] + 5.0*sin( theta[1.276843] ) : 0.0 : True
- 1.58359 : 0.0 : domegadt[1.58359] + 0.25*omega[1.58359] + 5.0*sin( theta[1.58359] ) : 0.0 : True
- 1.86024 : 0.0 : domegadt[1.86024] + 0.25*omega[1.86024] + 5.0*sin( theta[1.86024] ) : 0.0 : True
- 2.0 : 0.0 : domegadt[2.0] + 0.25*omega[2.0] + 5.0*sin( theta[2.0] ) : 0.0 : True
- 2.057104 : 0.0 : domegadt[2.057104] + 0.25*omega[2.057104] + 5.0*sin( theta[2.057104] ) : 0.0 : True
- 2.276843 : 0.0 : domegadt[2.276843] + 0.25*omega[2.276843] + 5.0*sin( theta[2.276843] ) : 0.0 : True
- 2.58359 : 0.0 : domegadt[2.58359] + 0.25*omega[2.58359] + 5.0*sin( theta[2.58359] ) : 0.0 : True
- 2.86024 : 0.0 : domegadt[2.86024] + 0.25*omega[2.86024] + 5.0*sin( theta[2.86024] ) : 0.0 : True
- 3.0 : 0.0 : domegadt[3.0] + 0.25*omega[3.0] + 5.0*sin( theta[3.0] ) : 0.0 : True
- 3.057104 : 0.0 : domegadt[3.057104] + 0.25*omega[3.057104] + 5.0*sin( theta[3.057104] ) : 0.0 : True
- 3.276843 : 0.0 : domegadt[3.276843] + 0.25*omega[3.276843] + 5.0*sin( theta[3.276843] ) : 0.0 : True
- 3.58359 : 0.0 : domegadt[3.58359] + 0.25*omega[3.58359] + 5.0*sin( theta[3.58359] ) : 0.0 : True
- 3.86024 : 0.0 : domegadt[3.86024] + 0.25*omega[3.86024] + 5.0*sin( theta[3.86024] ) : 0.0 : True
- 4.0 : 0.0 : domegadt[4.0] + 0.25*omega[4.0] + 5.0*sin( theta[4.0] ) : 0.0 : True
- 4.057104 : 0.0 : domegadt[4.057104] + 0.25*omega[4.057104] + 5.0*sin( theta[4.057104] ) : 0.0 : True
- 4.276843 : 0.0 : domegadt[4.276843] + 0.25*omega[4.276843] + 5.0*sin( theta[4.276843] ) : 0.0 : True
- 4.58359 : 0.0 : domegadt[4.58359] + 0.25*omega[4.58359] + 5.0*sin( theta[4.58359] ) : 0.0 : True
- 4.86024 : 0.0 : domegadt[4.86024] + 0.25*omega[4.86024] + 5.0*sin( theta[4.86024] ) : 0.0 : True
- 5.0 : 0.0 : domegadt[5.0] + 0.25*omega[5.0] + 5.0*sin( theta[5.0] ) : 0.0 : True
- 5.057104 : 0.0 : domegadt[5.057104] + 0.25*omega[5.057104] + 5.0*sin( theta[5.057104] ) : 0.0 : True
- 5.276843 : 0.0 : domegadt[5.276843] + 0.25*omega[5.276843] + 5.0*sin( theta[5.276843] ) : 0.0 : True
- 5.58359 : 0.0 : domegadt[5.58359] + 0.25*omega[5.58359] + 5.0*sin( theta[5.58359] ) : 0.0 : True
- 5.86024 : 0.0 : domegadt[5.86024] + 0.25*omega[5.86024] + 5.0*sin( theta[5.86024] ) : 0.0 : True
- 6.0 : 0.0 : domegadt[6.0] + 0.25*omega[6.0] + 5.0*sin( theta[6.0] ) : 0.0 : True
- 6.057104 : 0.0 : domegadt[6.057104] + 0.25*omega[6.057104] + 5.0*sin( theta[6.057104] ) : 0.0 : True
- 6.276843 : 0.0 : domegadt[6.276843] + 0.25*omega[6.276843] + 5.0*sin( theta[6.276843] ) : 0.0 : True
- 6.58359 : 0.0 : domegadt[6.58359] + 0.25*omega[6.58359] + 5.0*sin( theta[6.58359] ) : 0.0 : True
- 6.86024 : 0.0 : domegadt[6.86024] + 0.25*omega[6.86024] + 5.0*sin( theta[6.86024] ) : 0.0 : True
- 7.0 : 0.0 : domegadt[7.0] + 0.25*omega[7.0] + 5.0*sin( theta[7.0] ) : 0.0 : True
- 7.057104 : 0.0 : domegadt[7.057104] + 0.25*omega[7.057104] + 5.0*sin( theta[7.057104] ) : 0.0 : True
- 7.276843 : 0.0 : domegadt[7.276843] + 0.25*omega[7.276843] + 5.0*sin( theta[7.276843] ) : 0.0 : True
- 7.58359 : 0.0 : domegadt[7.58359] + 0.25*omega[7.58359] + 5.0*sin( theta[7.58359] ) : 0.0 : True
- 7.86024 : 0.0 : domegadt[7.86024] + 0.25*omega[7.86024] + 5.0*sin( theta[7.86024] ) : 0.0 : True
- 8.0 : 0.0 : domegadt[8.0] + 0.25*omega[8.0] + 5.0*sin( theta[8.0] ) : 0.0 : True
- 8.057104 : 0.0 : domegadt[8.057104] + 0.25*omega[8.057104] + 5.0*sin( theta[8.057104] ) : 0.0 : True
- 8.276843 : 0.0 : domegadt[8.276843] + 0.25*omega[8.276843] + 5.0*sin( theta[8.276843] ) : 0.0 : True
- 8.58359 : 0.0 : domegadt[8.58359] + 0.25*omega[8.58359] + 5.0*sin( theta[8.58359] ) : 0.0 : True
- 8.86024 : 0.0 : domegadt[8.86024] + 0.25*omega[8.86024] + 5.0*sin( theta[8.86024] ) : 0.0 : True
- 9.0 : 0.0 : domegadt[9.0] + 0.25*omega[9.0] + 5.0*sin( theta[9.0] ) : 0.0 : True
- 9.057104 : 0.0 : domegadt[9.057104] + 0.25*omega[9.057104] + 5.0*sin( theta[9.057104] ) : 0.0 : True
- 9.276843 : 0.0 : domegadt[9.276843] + 0.25*omega[9.276843] + 5.0*sin( theta[9.276843] ) : 0.0 : True
- 9.58359 : 0.0 : domegadt[9.58359] + 0.25*omega[9.58359] + 5.0*sin( theta[9.58359] ) : 0.0 : True
- 9.86024 : 0.0 : domegadt[9.86024] + 0.25*omega[9.86024] + 5.0*sin( theta[9.86024] ) : 0.0 : True
- 10.0 : 0.0 : domegadt[10.0] + 0.25*omega[10.0] + 5.0*sin( theta[10.0] ) : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 0.0 : 0.0 : domegadt[0.0] - (-0.25*omega[0.0] - 5.0*sin(theta[0.0])) : 0.0 : True
+ 0.057104 : 0.0 : domegadt[0.057104] - (-0.25*omega[0.057104] - 5.0*sin(theta[0.057104])) : 0.0 : True
+ 0.276843 : 0.0 : domegadt[0.276843] - (-0.25*omega[0.276843] - 5.0*sin(theta[0.276843])) : 0.0 : True
+ 0.58359 : 0.0 : domegadt[0.58359] - (-0.25*omega[0.58359] - 5.0*sin(theta[0.58359])) : 0.0 : True
+ 0.86024 : 0.0 : domegadt[0.86024] - (-0.25*omega[0.86024] - 5.0*sin(theta[0.86024])) : 0.0 : True
+ 1.0 : 0.0 : domegadt[1.0] - (-0.25*omega[1.0] - 5.0*sin(theta[1.0])) : 0.0 : True
+ 1.057104 : 0.0 : domegadt[1.057104] - (-0.25*omega[1.057104] - 5.0*sin(theta[1.057104])) : 0.0 : True
+ 1.276843 : 0.0 : domegadt[1.276843] - (-0.25*omega[1.276843] - 5.0*sin(theta[1.276843])) : 0.0 : True
+ 1.58359 : 0.0 : domegadt[1.58359] - (-0.25*omega[1.58359] - 5.0*sin(theta[1.58359])) : 0.0 : True
+ 1.86024 : 0.0 : domegadt[1.86024] - (-0.25*omega[1.86024] - 5.0*sin(theta[1.86024])) : 0.0 : True
+ 2.0 : 0.0 : domegadt[2.0] - (-0.25*omega[2.0] - 5.0*sin(theta[2.0])) : 0.0 : True
+ 2.057104 : 0.0 : domegadt[2.057104] - (-0.25*omega[2.057104] - 5.0*sin(theta[2.057104])) : 0.0 : True
+ 2.276843 : 0.0 : domegadt[2.276843] - (-0.25*omega[2.276843] - 5.0*sin(theta[2.276843])) : 0.0 : True
+ 2.58359 : 0.0 : domegadt[2.58359] - (-0.25*omega[2.58359] - 5.0*sin(theta[2.58359])) : 0.0 : True
+ 2.86024 : 0.0 : domegadt[2.86024] - (-0.25*omega[2.86024] - 5.0*sin(theta[2.86024])) : 0.0 : True
+ 3.0 : 0.0 : domegadt[3.0] - (-0.25*omega[3.0] - 5.0*sin(theta[3.0])) : 0.0 : True
+ 3.057104 : 0.0 : domegadt[3.057104] - (-0.25*omega[3.057104] - 5.0*sin(theta[3.057104])) : 0.0 : True
+ 3.276843 : 0.0 : domegadt[3.276843] - (-0.25*omega[3.276843] - 5.0*sin(theta[3.276843])) : 0.0 : True
+ 3.58359 : 0.0 : domegadt[3.58359] - (-0.25*omega[3.58359] - 5.0*sin(theta[3.58359])) : 0.0 : True
+ 3.86024 : 0.0 : domegadt[3.86024] - (-0.25*omega[3.86024] - 5.0*sin(theta[3.86024])) : 0.0 : True
+ 4.0 : 0.0 : domegadt[4.0] - (-0.25*omega[4.0] - 5.0*sin(theta[4.0])) : 0.0 : True
+ 4.057104 : 0.0 : domegadt[4.057104] - (-0.25*omega[4.057104] - 5.0*sin(theta[4.057104])) : 0.0 : True
+ 4.276843 : 0.0 : domegadt[4.276843] - (-0.25*omega[4.276843] - 5.0*sin(theta[4.276843])) : 0.0 : True
+ 4.58359 : 0.0 : domegadt[4.58359] - (-0.25*omega[4.58359] - 5.0*sin(theta[4.58359])) : 0.0 : True
+ 4.86024 : 0.0 : domegadt[4.86024] - (-0.25*omega[4.86024] - 5.0*sin(theta[4.86024])) : 0.0 : True
+ 5.0 : 0.0 : domegadt[5.0] - (-0.25*omega[5.0] - 5.0*sin(theta[5.0])) : 0.0 : True
+ 5.057104 : 0.0 : domegadt[5.057104] - (-0.25*omega[5.057104] - 5.0*sin(theta[5.057104])) : 0.0 : True
+ 5.276843 : 0.0 : domegadt[5.276843] - (-0.25*omega[5.276843] - 5.0*sin(theta[5.276843])) : 0.0 : True
+ 5.58359 : 0.0 : domegadt[5.58359] - (-0.25*omega[5.58359] - 5.0*sin(theta[5.58359])) : 0.0 : True
+ 5.86024 : 0.0 : domegadt[5.86024] - (-0.25*omega[5.86024] - 5.0*sin(theta[5.86024])) : 0.0 : True
+ 6.0 : 0.0 : domegadt[6.0] - (-0.25*omega[6.0] - 5.0*sin(theta[6.0])) : 0.0 : True
+ 6.057104 : 0.0 : domegadt[6.057104] - (-0.25*omega[6.057104] - 5.0*sin(theta[6.057104])) : 0.0 : True
+ 6.276843 : 0.0 : domegadt[6.276843] - (-0.25*omega[6.276843] - 5.0*sin(theta[6.276843])) : 0.0 : True
+ 6.58359 : 0.0 : domegadt[6.58359] - (-0.25*omega[6.58359] - 5.0*sin(theta[6.58359])) : 0.0 : True
+ 6.86024 : 0.0 : domegadt[6.86024] - (-0.25*omega[6.86024] - 5.0*sin(theta[6.86024])) : 0.0 : True
+ 7.0 : 0.0 : domegadt[7.0] - (-0.25*omega[7.0] - 5.0*sin(theta[7.0])) : 0.0 : True
+ 7.057104 : 0.0 : domegadt[7.057104] - (-0.25*omega[7.057104] - 5.0*sin(theta[7.057104])) : 0.0 : True
+ 7.276843 : 0.0 : domegadt[7.276843] - (-0.25*omega[7.276843] - 5.0*sin(theta[7.276843])) : 0.0 : True
+ 7.58359 : 0.0 : domegadt[7.58359] - (-0.25*omega[7.58359] - 5.0*sin(theta[7.58359])) : 0.0 : True
+ 7.86024 : 0.0 : domegadt[7.86024] - (-0.25*omega[7.86024] - 5.0*sin(theta[7.86024])) : 0.0 : True
+ 8.0 : 0.0 : domegadt[8.0] - (-0.25*omega[8.0] - 5.0*sin(theta[8.0])) : 0.0 : True
+ 8.057104 : 0.0 : domegadt[8.057104] - (-0.25*omega[8.057104] - 5.0*sin(theta[8.057104])) : 0.0 : True
+ 8.276843 : 0.0 : domegadt[8.276843] - (-0.25*omega[8.276843] - 5.0*sin(theta[8.276843])) : 0.0 : True
+ 8.58359 : 0.0 : domegadt[8.58359] - (-0.25*omega[8.58359] - 5.0*sin(theta[8.58359])) : 0.0 : True
+ 8.86024 : 0.0 : domegadt[8.86024] - (-0.25*omega[8.86024] - 5.0*sin(theta[8.86024])) : 0.0 : True
+ 9.0 : 0.0 : domegadt[9.0] - (-0.25*omega[9.0] - 5.0*sin(theta[9.0])) : 0.0 : True
+ 9.057104 : 0.0 : domegadt[9.057104] - (-0.25*omega[9.057104] - 5.0*sin(theta[9.057104])) : 0.0 : True
+ 9.276843 : 0.0 : domegadt[9.276843] - (-0.25*omega[9.276843] - 5.0*sin(theta[9.276843])) : 0.0 : True
+ 9.58359 : 0.0 : domegadt[9.58359] - (-0.25*omega[9.58359] - 5.0*sin(theta[9.58359])) : 0.0 : True
+ 9.86024 : 0.0 : domegadt[9.86024] - (-0.25*omega[9.86024] - 5.0*sin(theta[9.86024])) : 0.0 : True
+ 10.0 : 0.0 : domegadt[10.0] - (-0.25*omega[10.0] - 5.0*sin(theta[10.0])) : 0.0 : True
diffeq2 : Size=51, Index=t, Active=True
Key : Lower : Body : Upper : Active
0.0 : 0.0 : dthetadt[0.0] - omega[0.0] : 0.0 : True
@@ -328,109 +328,109 @@
9.86024 : 0.0 : dthetadt[9.86024] - omega[9.86024] : 0.0 : True
10.0 : 0.0 : dthetadt[10.0] - omega[10.0] : 0.0 : True
domegadt_disc_eq : Size=50, Index=t, Active=True
- Key : Lower : Body : Upper : Active
- 0.057104 : 0.0 : domegadt[0.057104] + 11.0386792412*omega[0.0] - 8.75592397794*omega[0.057104] - 2.89194261538*omega[0.276843] + 0.8751863962*omega[0.58359] - 0.39970520794*omega[0.86024] + 0.133706163849*omega[1.0] : 0.0 : True
- 0.276843 : 0.0 : domegadt[0.276843] - 3.5830685225*omega[0.0] + 7.16138072015*omega[0.057104] - 1.80607772408*omega[0.276843] - 2.36379717607*omega[0.58359] + 0.865900780283*omega[0.86024] - 0.274338077775*omega[1.0] : 0.0 : True
- 0.58359 : 0.0 : domegadt[0.58359] + 2.3441715579*omega[0.0] - 4.12216524624*omega[0.057104] + 4.49601712581*omega[0.276843] - 0.856765245397*omega[0.58359] - 2.51832094921*omega[0.86024] + 0.657062757134*omega[1.0] : 0.0 : True
- 0.86024 : 0.0 : domegadt[0.86024] - 2.28263550021*omega[0.0] + 3.87866321972*omega[0.057104] - 3.39315191806*omega[0.276843] + 5.18834090641*omega[0.58359] - 0.581233052581*omega[0.86024] - 2.80998365528*omega[1.0] : 0.0 : True
- 1.0 : 0.0 : domegadt[1.0] + 5.0*omega[0.0] - 8.41242422359*omega[0.057104] + 6.97025611666*omega[0.276843] - 8.77711420415*omega[0.58359] + 18.2192823111*omega[0.86024] - 13.0*omega[1.0] : 0.0 : True
- 1.057104 : 0.0 : domegadt[1.057104] + 11.0386792412*omega[1.0] - 8.75592397794*omega[1.057104] - 2.89194261538*omega[1.276843] + 0.8751863962*omega[1.58359] - 0.39970520794*omega[1.86024] + 0.133706163849*omega[2.0] : 0.0 : True
- 1.276843 : 0.0 : domegadt[1.276843] - 3.5830685225*omega[1.0] + 7.16138072015*omega[1.057104] - 1.80607772408*omega[1.276843] - 2.36379717607*omega[1.58359] + 0.865900780283*omega[1.86024] - 0.274338077775*omega[2.0] : 0.0 : True
- 1.58359 : 0.0 : domegadt[1.58359] + 2.3441715579*omega[1.0] - 4.12216524624*omega[1.057104] + 4.49601712581*omega[1.276843] - 0.856765245397*omega[1.58359] - 2.51832094921*omega[1.86024] + 0.657062757134*omega[2.0] : 0.0 : True
- 1.86024 : 0.0 : domegadt[1.86024] - 2.28263550021*omega[1.0] + 3.87866321972*omega[1.057104] - 3.39315191806*omega[1.276843] + 5.18834090641*omega[1.58359] - 0.581233052581*omega[1.86024] - 2.80998365528*omega[2.0] : 0.0 : True
- 2.0 : 0.0 : domegadt[2.0] + 5.0*omega[1.0] - 8.41242422359*omega[1.057104] + 6.97025611666*omega[1.276843] - 8.77711420415*omega[1.58359] + 18.2192823111*omega[1.86024] - 13.0*omega[2.0] : 0.0 : True
- 2.057104 : 0.0 : domegadt[2.057104] + 11.0386792412*omega[2.0] - 8.75592397794*omega[2.057104] - 2.89194261538*omega[2.276843] + 0.8751863962*omega[2.58359] - 0.39970520794*omega[2.86024] + 0.133706163849*omega[3.0] : 0.0 : True
- 2.276843 : 0.0 : domegadt[2.276843] - 3.5830685225*omega[2.0] + 7.16138072015*omega[2.057104] - 1.80607772408*omega[2.276843] - 2.36379717607*omega[2.58359] + 0.865900780283*omega[2.86024] - 0.274338077775*omega[3.0] : 0.0 : True
- 2.58359 : 0.0 : domegadt[2.58359] + 2.3441715579*omega[2.0] - 4.12216524624*omega[2.057104] + 4.49601712581*omega[2.276843] - 0.856765245397*omega[2.58359] - 2.51832094921*omega[2.86024] + 0.657062757134*omega[3.0] : 0.0 : True
- 2.86024 : 0.0 : domegadt[2.86024] - 2.28263550021*omega[2.0] + 3.87866321972*omega[2.057104] - 3.39315191806*omega[2.276843] + 5.18834090641*omega[2.58359] - 0.581233052581*omega[2.86024] - 2.80998365528*omega[3.0] : 0.0 : True
- 3.0 : 0.0 : domegadt[3.0] + 5.0*omega[2.0] - 8.41242422359*omega[2.057104] + 6.97025611666*omega[2.276843] - 8.77711420415*omega[2.58359] + 18.2192823111*omega[2.86024] - 13.0*omega[3.0] : 0.0 : True
- 3.057104 : 0.0 : domegadt[3.057104] + 11.0386792412*omega[3.0] - 8.75592397794*omega[3.057104] - 2.89194261538*omega[3.276843] + 0.8751863962*omega[3.58359] - 0.39970520794*omega[3.86024] + 0.133706163849*omega[4.0] : 0.0 : True
- 3.276843 : 0.0 : domegadt[3.276843] - 3.5830685225*omega[3.0] + 7.16138072015*omega[3.057104] - 1.80607772408*omega[3.276843] - 2.36379717607*omega[3.58359] + 0.865900780283*omega[3.86024] - 0.274338077775*omega[4.0] : 0.0 : True
- 3.58359 : 0.0 : domegadt[3.58359] + 2.3441715579*omega[3.0] - 4.12216524624*omega[3.057104] + 4.49601712581*omega[3.276843] - 0.856765245397*omega[3.58359] - 2.51832094921*omega[3.86024] + 0.657062757134*omega[4.0] : 0.0 : True
- 3.86024 : 0.0 : domegadt[3.86024] - 2.28263550021*omega[3.0] + 3.87866321972*omega[3.057104] - 3.39315191806*omega[3.276843] + 5.18834090641*omega[3.58359] - 0.581233052581*omega[3.86024] - 2.80998365528*omega[4.0] : 0.0 : True
- 4.0 : 0.0 : domegadt[4.0] + 5.0*omega[3.0] - 8.41242422359*omega[3.057104] + 6.97025611666*omega[3.276843] - 8.77711420415*omega[3.58359] + 18.2192823111*omega[3.86024] - 13.0*omega[4.0] : 0.0 : True
- 4.057104 : 0.0 : domegadt[4.057104] + 11.0386792412*omega[4.0] - 8.75592397794*omega[4.057104] - 2.89194261538*omega[4.276843] + 0.8751863962*omega[4.58359] - 0.39970520794*omega[4.86024] + 0.133706163849*omega[5.0] : 0.0 : True
- 4.276843 : 0.0 : domegadt[4.276843] - 3.5830685225*omega[4.0] + 7.16138072015*omega[4.057104] - 1.80607772408*omega[4.276843] - 2.36379717607*omega[4.58359] + 0.865900780283*omega[4.86024] - 0.274338077775*omega[5.0] : 0.0 : True
- 4.58359 : 0.0 : domegadt[4.58359] + 2.3441715579*omega[4.0] - 4.12216524624*omega[4.057104] + 4.49601712581*omega[4.276843] - 0.856765245397*omega[4.58359] - 2.51832094921*omega[4.86024] + 0.657062757134*omega[5.0] : 0.0 : True
- 4.86024 : 0.0 : domegadt[4.86024] - 2.28263550021*omega[4.0] + 3.87866321972*omega[4.057104] - 3.39315191806*omega[4.276843] + 5.18834090641*omega[4.58359] - 0.581233052581*omega[4.86024] - 2.80998365528*omega[5.0] : 0.0 : True
- 5.0 : 0.0 : domegadt[5.0] + 5.0*omega[4.0] - 8.41242422359*omega[4.057104] + 6.97025611666*omega[4.276843] - 8.77711420415*omega[4.58359] + 18.2192823111*omega[4.86024] - 13.0*omega[5.0] : 0.0 : True
- 5.057104 : 0.0 : domegadt[5.057104] + 11.0386792412*omega[5.0] - 8.75592397794*omega[5.057104] - 2.89194261538*omega[5.276843] + 0.8751863962*omega[5.58359] - 0.39970520794*omega[5.86024] + 0.133706163849*omega[6.0] : 0.0 : True
- 5.276843 : 0.0 : domegadt[5.276843] - 3.5830685225*omega[5.0] + 7.16138072015*omega[5.057104] - 1.80607772408*omega[5.276843] - 2.36379717607*omega[5.58359] + 0.865900780283*omega[5.86024] - 0.274338077775*omega[6.0] : 0.0 : True
- 5.58359 : 0.0 : domegadt[5.58359] + 2.3441715579*omega[5.0] - 4.12216524624*omega[5.057104] + 4.49601712581*omega[5.276843] - 0.856765245397*omega[5.58359] - 2.51832094921*omega[5.86024] + 0.657062757134*omega[6.0] : 0.0 : True
- 5.86024 : 0.0 : domegadt[5.86024] - 2.28263550021*omega[5.0] + 3.87866321972*omega[5.057104] - 3.39315191806*omega[5.276843] + 5.18834090641*omega[5.58359] - 0.581233052581*omega[5.86024] - 2.80998365528*omega[6.0] : 0.0 : True
- 6.0 : 0.0 : domegadt[6.0] + 5.0*omega[5.0] - 8.41242422359*omega[5.057104] + 6.97025611666*omega[5.276843] - 8.77711420415*omega[5.58359] + 18.2192823111*omega[5.86024] - 13.0*omega[6.0] : 0.0 : True
- 6.057104 : 0.0 : domegadt[6.057104] + 11.0386792412*omega[6.0] - 8.75592397794*omega[6.057104] - 2.89194261538*omega[6.276843] + 0.8751863962*omega[6.58359] - 0.39970520794*omega[6.86024] + 0.133706163849*omega[7.0] : 0.0 : True
- 6.276843 : 0.0 : domegadt[6.276843] - 3.5830685225*omega[6.0] + 7.16138072015*omega[6.057104] - 1.80607772408*omega[6.276843] - 2.36379717607*omega[6.58359] + 0.865900780283*omega[6.86024] - 0.274338077775*omega[7.0] : 0.0 : True
- 6.58359 : 0.0 : domegadt[6.58359] + 2.3441715579*omega[6.0] - 4.12216524624*omega[6.057104] + 4.49601712581*omega[6.276843] - 0.856765245397*omega[6.58359] - 2.51832094921*omega[6.86024] + 0.657062757134*omega[7.0] : 0.0 : True
- 6.86024 : 0.0 : domegadt[6.86024] - 2.28263550021*omega[6.0] + 3.87866321972*omega[6.057104] - 3.39315191806*omega[6.276843] + 5.18834090641*omega[6.58359] - 0.581233052581*omega[6.86024] - 2.80998365528*omega[7.0] : 0.0 : True
- 7.0 : 0.0 : domegadt[7.0] + 5.0*omega[6.0] - 8.41242422359*omega[6.057104] + 6.97025611666*omega[6.276843] - 8.77711420415*omega[6.58359] + 18.2192823111*omega[6.86024] - 13.0*omega[7.0] : 0.0 : True
- 7.057104 : 0.0 : domegadt[7.057104] + 11.0386792412*omega[7.0] - 8.75592397794*omega[7.057104] - 2.89194261538*omega[7.276843] + 0.8751863962*omega[7.58359] - 0.39970520794*omega[7.86024] + 0.133706163849*omega[8.0] : 0.0 : True
- 7.276843 : 0.0 : domegadt[7.276843] - 3.5830685225*omega[7.0] + 7.16138072015*omega[7.057104] - 1.80607772408*omega[7.276843] - 2.36379717607*omega[7.58359] + 0.865900780283*omega[7.86024] - 0.274338077775*omega[8.0] : 0.0 : True
- 7.58359 : 0.0 : domegadt[7.58359] + 2.3441715579*omega[7.0] - 4.12216524624*omega[7.057104] + 4.49601712581*omega[7.276843] - 0.856765245397*omega[7.58359] - 2.51832094921*omega[7.86024] + 0.657062757134*omega[8.0] : 0.0 : True
- 7.86024 : 0.0 : domegadt[7.86024] - 2.28263550021*omega[7.0] + 3.87866321972*omega[7.057104] - 3.39315191806*omega[7.276843] + 5.18834090641*omega[7.58359] - 0.581233052581*omega[7.86024] - 2.80998365528*omega[8.0] : 0.0 : True
- 8.0 : 0.0 : domegadt[8.0] + 5.0*omega[7.0] - 8.41242422359*omega[7.057104] + 6.97025611666*omega[7.276843] - 8.77711420415*omega[7.58359] + 18.2192823111*omega[7.86024] - 13.0*omega[8.0] : 0.0 : True
- 8.057104 : 0.0 : domegadt[8.057104] + 11.0386792412*omega[8.0] - 8.75592397794*omega[8.057104] - 2.89194261538*omega[8.276843] + 0.8751863962*omega[8.58359] - 0.39970520794*omega[8.86024] + 0.133706163849*omega[9.0] : 0.0 : True
- 8.276843 : 0.0 : domegadt[8.276843] - 3.5830685225*omega[8.0] + 7.16138072015*omega[8.057104] - 1.80607772408*omega[8.276843] - 2.36379717607*omega[8.58359] + 0.865900780283*omega[8.86024] - 0.274338077775*omega[9.0] : 0.0 : True
- 8.58359 : 0.0 : domegadt[8.58359] + 2.3441715579*omega[8.0] - 4.12216524624*omega[8.057104] + 4.49601712581*omega[8.276843] - 0.856765245397*omega[8.58359] - 2.51832094921*omega[8.86024] + 0.657062757134*omega[9.0] : 0.0 : True
- 8.86024 : 0.0 : domegadt[8.86024] - 2.28263550021*omega[8.0] + 3.87866321972*omega[8.057104] - 3.39315191806*omega[8.276843] + 5.18834090641*omega[8.58359] - 0.581233052581*omega[8.86024] - 2.80998365528*omega[9.0] : 0.0 : True
- 9.0 : 0.0 : domegadt[9.0] + 5.0*omega[8.0] - 8.41242422359*omega[8.057104] + 6.97025611666*omega[8.276843] - 8.77711420415*omega[8.58359] + 18.2192823111*omega[8.86024] - 13.0*omega[9.0] : 0.0 : True
- 9.057104 : 0.0 : domegadt[9.057104] + 11.0386792412*omega[9.0] - 8.75592397794*omega[9.057104] - 2.89194261538*omega[9.276843] + 0.8751863962*omega[9.58359] - 0.39970520794*omega[9.86024] + 0.133706163849*omega[10.0] : 0.0 : True
- 9.276843 : 0.0 : domegadt[9.276843] - 3.5830685225*omega[9.0] + 7.16138072015*omega[9.057104] - 1.80607772408*omega[9.276843] - 2.36379717607*omega[9.58359] + 0.865900780283*omega[9.86024] - 0.274338077775*omega[10.0] : 0.0 : True
- 9.58359 : 0.0 : domegadt[9.58359] + 2.3441715579*omega[9.0] - 4.12216524624*omega[9.057104] + 4.49601712581*omega[9.276843] - 0.856765245397*omega[9.58359] - 2.51832094921*omega[9.86024] + 0.657062757134*omega[10.0] : 0.0 : True
- 9.86024 : 0.0 : domegadt[9.86024] - 2.28263550021*omega[9.0] + 3.87866321972*omega[9.057104] - 3.39315191806*omega[9.276843] + 5.18834090641*omega[9.58359] - 0.581233052581*omega[9.86024] - 2.80998365528*omega[10.0] : 0.0 : True
- 10.0 : 0.0 : domegadt[10.0] + 5.0*omega[9.0] - 8.41242422359*omega[9.057104] + 6.97025611666*omega[9.276843] - 8.77711420415*omega[9.58359] + 18.2192823111*omega[9.86024] - 13.0*omega[10.0] : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 0.057104 : 0.0 : domegadt[0.057104] - (-11.038679241208952*omega[0.0] + 8.755923977938355*omega[0.057104] + 2.8919426153801258*omega[0.276843] - 0.87518639620027*omega[0.58359] + 0.39970520793996167*omega[0.86024] - 0.13370616384921521*omega[1.0]) : 0.0 : True
+ 0.276843 : 0.0 : domegadt[0.276843] - (3.5830685225010477*omega[0.0] - 7.161380720145321*omega[0.057104] + 1.8060777240835826*omega[0.276843] + 2.3637971760686236*omega[0.58359] - 0.8659007802831209*omega[0.86024] + 0.274338077775192*omega[1.0]) : 0.0 : True
+ 0.58359 : 0.0 : domegadt[0.58359] - (-2.3441715579038664*omega[0.0] + 4.122165246243398*omega[0.057104] - 4.496017125813501*omega[0.276843] + 0.8567652453972836*omega[0.58359] + 2.518320949211015*omega[0.86024] - 0.657062757134355*omega[1.0]) : 0.0 : True
+ 0.86024 : 0.0 : domegadt[0.86024] - (2.282635500205682*omega[0.0] - 3.8786632197240785*omega[0.057104] + 3.3931519180649445*omega[0.276843] - 5.188340906407153*omega[0.58359] + 0.5812330525807557*omega[0.86024] + 2.8099836552797197*omega[1.0]) : 0.0 : True
+ 1.0 : 0.0 : domegadt[1.0] - (-4.999999999999989*omega[0.0] + 8.412424223594346*omega[0.057104] - 6.970256116656801*omega[0.276843] + 8.777114204150497*omega[0.58359] - 18.219282311088037*omega[0.86024] + 12.99999999999998*omega[1.0]) : 0.0 : True
+ 1.057104 : 0.0 : domegadt[1.057104] - (-11.038679241208952*omega[1.0] + 8.755923977938355*omega[1.057104] + 2.8919426153801258*omega[1.276843] - 0.87518639620027*omega[1.58359] + 0.39970520793996167*omega[1.86024] - 0.13370616384921521*omega[2.0]) : 0.0 : True
+ 1.276843 : 0.0 : domegadt[1.276843] - (3.5830685225010477*omega[1.0] - 7.161380720145321*omega[1.057104] + 1.8060777240835826*omega[1.276843] + 2.3637971760686236*omega[1.58359] - 0.8659007802831209*omega[1.86024] + 0.274338077775192*omega[2.0]) : 0.0 : True
+ 1.58359 : 0.0 : domegadt[1.58359] - (-2.3441715579038664*omega[1.0] + 4.122165246243398*omega[1.057104] - 4.496017125813501*omega[1.276843] + 0.8567652453972836*omega[1.58359] + 2.518320949211015*omega[1.86024] - 0.657062757134355*omega[2.0]) : 0.0 : True
+ 1.86024 : 0.0 : domegadt[1.86024] - (2.282635500205682*omega[1.0] - 3.8786632197240785*omega[1.057104] + 3.3931519180649445*omega[1.276843] - 5.188340906407153*omega[1.58359] + 0.5812330525807557*omega[1.86024] + 2.8099836552797197*omega[2.0]) : 0.0 : True
+ 2.0 : 0.0 : domegadt[2.0] - (-4.999999999999989*omega[1.0] + 8.412424223594346*omega[1.057104] - 6.970256116656801*omega[1.276843] + 8.777114204150497*omega[1.58359] - 18.219282311088037*omega[1.86024] + 12.99999999999998*omega[2.0]) : 0.0 : True
+ 2.057104 : 0.0 : domegadt[2.057104] - (-11.038679241208952*omega[2.0] + 8.755923977938355*omega[2.057104] + 2.8919426153801258*omega[2.276843] - 0.87518639620027*omega[2.58359] + 0.39970520793996167*omega[2.86024] - 0.13370616384921521*omega[3.0]) : 0.0 : True
+ 2.276843 : 0.0 : domegadt[2.276843] - (3.5830685225010477*omega[2.0] - 7.161380720145321*omega[2.057104] + 1.8060777240835826*omega[2.276843] + 2.3637971760686236*omega[2.58359] - 0.8659007802831209*omega[2.86024] + 0.274338077775192*omega[3.0]) : 0.0 : True
+ 2.58359 : 0.0 : domegadt[2.58359] - (-2.3441715579038664*omega[2.0] + 4.122165246243398*omega[2.057104] - 4.496017125813501*omega[2.276843] + 0.8567652453972836*omega[2.58359] + 2.518320949211015*omega[2.86024] - 0.657062757134355*omega[3.0]) : 0.0 : True
+ 2.86024 : 0.0 : domegadt[2.86024] - (2.282635500205682*omega[2.0] - 3.8786632197240785*omega[2.057104] + 3.3931519180649445*omega[2.276843] - 5.188340906407153*omega[2.58359] + 0.5812330525807557*omega[2.86024] + 2.8099836552797197*omega[3.0]) : 0.0 : True
+ 3.0 : 0.0 : domegadt[3.0] - (-4.999999999999989*omega[2.0] + 8.412424223594346*omega[2.057104] - 6.970256116656801*omega[2.276843] + 8.777114204150497*omega[2.58359] - 18.219282311088037*omega[2.86024] + 12.99999999999998*omega[3.0]) : 0.0 : True
+ 3.057104 : 0.0 : domegadt[3.057104] - (-11.038679241208952*omega[3.0] + 8.755923977938355*omega[3.057104] + 2.8919426153801258*omega[3.276843] - 0.87518639620027*omega[3.58359] + 0.39970520793996167*omega[3.86024] - 0.13370616384921521*omega[4.0]) : 0.0 : True
+ 3.276843 : 0.0 : domegadt[3.276843] - (3.5830685225010477*omega[3.0] - 7.161380720145321*omega[3.057104] + 1.8060777240835826*omega[3.276843] + 2.3637971760686236*omega[3.58359] - 0.8659007802831209*omega[3.86024] + 0.274338077775192*omega[4.0]) : 0.0 : True
+ 3.58359 : 0.0 : domegadt[3.58359] - (-2.3441715579038664*omega[3.0] + 4.122165246243398*omega[3.057104] - 4.496017125813501*omega[3.276843] + 0.8567652453972836*omega[3.58359] + 2.518320949211015*omega[3.86024] - 0.657062757134355*omega[4.0]) : 0.0 : True
+ 3.86024 : 0.0 : domegadt[3.86024] - (2.282635500205682*omega[3.0] - 3.8786632197240785*omega[3.057104] + 3.3931519180649445*omega[3.276843] - 5.188340906407153*omega[3.58359] + 0.5812330525807557*omega[3.86024] + 2.8099836552797197*omega[4.0]) : 0.0 : True
+ 4.0 : 0.0 : domegadt[4.0] - (-4.999999999999989*omega[3.0] + 8.412424223594346*omega[3.057104] - 6.970256116656801*omega[3.276843] + 8.777114204150497*omega[3.58359] - 18.219282311088037*omega[3.86024] + 12.99999999999998*omega[4.0]) : 0.0 : True
+ 4.057104 : 0.0 : domegadt[4.057104] - (-11.038679241208952*omega[4.0] + 8.755923977938355*omega[4.057104] + 2.8919426153801258*omega[4.276843] - 0.87518639620027*omega[4.58359] + 0.39970520793996167*omega[4.86024] - 0.13370616384921521*omega[5.0]) : 0.0 : True
+ 4.276843 : 0.0 : domegadt[4.276843] - (3.5830685225010477*omega[4.0] - 7.161380720145321*omega[4.057104] + 1.8060777240835826*omega[4.276843] + 2.3637971760686236*omega[4.58359] - 0.8659007802831209*omega[4.86024] + 0.274338077775192*omega[5.0]) : 0.0 : True
+ 4.58359 : 0.0 : domegadt[4.58359] - (-2.3441715579038664*omega[4.0] + 4.122165246243398*omega[4.057104] - 4.496017125813501*omega[4.276843] + 0.8567652453972836*omega[4.58359] + 2.518320949211015*omega[4.86024] - 0.657062757134355*omega[5.0]) : 0.0 : True
+ 4.86024 : 0.0 : domegadt[4.86024] - (2.282635500205682*omega[4.0] - 3.8786632197240785*omega[4.057104] + 3.3931519180649445*omega[4.276843] - 5.188340906407153*omega[4.58359] + 0.5812330525807557*omega[4.86024] + 2.8099836552797197*omega[5.0]) : 0.0 : True
+ 5.0 : 0.0 : domegadt[5.0] - (-4.999999999999989*omega[4.0] + 8.412424223594346*omega[4.057104] - 6.970256116656801*omega[4.276843] + 8.777114204150497*omega[4.58359] - 18.219282311088037*omega[4.86024] + 12.99999999999998*omega[5.0]) : 0.0 : True
+ 5.057104 : 0.0 : domegadt[5.057104] - (-11.038679241208952*omega[5.0] + 8.755923977938355*omega[5.057104] + 2.8919426153801258*omega[5.276843] - 0.87518639620027*omega[5.58359] + 0.39970520793996167*omega[5.86024] - 0.13370616384921521*omega[6.0]) : 0.0 : True
+ 5.276843 : 0.0 : domegadt[5.276843] - (3.5830685225010477*omega[5.0] - 7.161380720145321*omega[5.057104] + 1.8060777240835826*omega[5.276843] + 2.3637971760686236*omega[5.58359] - 0.8659007802831209*omega[5.86024] + 0.274338077775192*omega[6.0]) : 0.0 : True
+ 5.58359 : 0.0 : domegadt[5.58359] - (-2.3441715579038664*omega[5.0] + 4.122165246243398*omega[5.057104] - 4.496017125813501*omega[5.276843] + 0.8567652453972836*omega[5.58359] + 2.518320949211015*omega[5.86024] - 0.657062757134355*omega[6.0]) : 0.0 : True
+ 5.86024 : 0.0 : domegadt[5.86024] - (2.282635500205682*omega[5.0] - 3.8786632197240785*omega[5.057104] + 3.3931519180649445*omega[5.276843] - 5.188340906407153*omega[5.58359] + 0.5812330525807557*omega[5.86024] + 2.8099836552797197*omega[6.0]) : 0.0 : True
+ 6.0 : 0.0 : domegadt[6.0] - (-4.999999999999989*omega[5.0] + 8.412424223594346*omega[5.057104] - 6.970256116656801*omega[5.276843] + 8.777114204150497*omega[5.58359] - 18.219282311088037*omega[5.86024] + 12.99999999999998*omega[6.0]) : 0.0 : True
+ 6.057104 : 0.0 : domegadt[6.057104] - (-11.038679241208952*omega[6.0] + 8.755923977938355*omega[6.057104] + 2.8919426153801258*omega[6.276843] - 0.87518639620027*omega[6.58359] + 0.39970520793996167*omega[6.86024] - 0.13370616384921521*omega[7.0]) : 0.0 : True
+ 6.276843 : 0.0 : domegadt[6.276843] - (3.5830685225010477*omega[6.0] - 7.161380720145321*omega[6.057104] + 1.8060777240835826*omega[6.276843] + 2.3637971760686236*omega[6.58359] - 0.8659007802831209*omega[6.86024] + 0.274338077775192*omega[7.0]) : 0.0 : True
+ 6.58359 : 0.0 : domegadt[6.58359] - (-2.3441715579038664*omega[6.0] + 4.122165246243398*omega[6.057104] - 4.496017125813501*omega[6.276843] + 0.8567652453972836*omega[6.58359] + 2.518320949211015*omega[6.86024] - 0.657062757134355*omega[7.0]) : 0.0 : True
+ 6.86024 : 0.0 : domegadt[6.86024] - (2.282635500205682*omega[6.0] - 3.8786632197240785*omega[6.057104] + 3.3931519180649445*omega[6.276843] - 5.188340906407153*omega[6.58359] + 0.5812330525807557*omega[6.86024] + 2.8099836552797197*omega[7.0]) : 0.0 : True
+ 7.0 : 0.0 : domegadt[7.0] - (-4.999999999999989*omega[6.0] + 8.412424223594346*omega[6.057104] - 6.970256116656801*omega[6.276843] + 8.777114204150497*omega[6.58359] - 18.219282311088037*omega[6.86024] + 12.99999999999998*omega[7.0]) : 0.0 : True
+ 7.057104 : 0.0 : domegadt[7.057104] - (-11.038679241208952*omega[7.0] + 8.755923977938355*omega[7.057104] + 2.8919426153801258*omega[7.276843] - 0.87518639620027*omega[7.58359] + 0.39970520793996167*omega[7.86024] - 0.13370616384921521*omega[8.0]) : 0.0 : True
+ 7.276843 : 0.0 : domegadt[7.276843] - (3.5830685225010477*omega[7.0] - 7.161380720145321*omega[7.057104] + 1.8060777240835826*omega[7.276843] + 2.3637971760686236*omega[7.58359] - 0.8659007802831209*omega[7.86024] + 0.274338077775192*omega[8.0]) : 0.0 : True
+ 7.58359 : 0.0 : domegadt[7.58359] - (-2.3441715579038664*omega[7.0] + 4.122165246243398*omega[7.057104] - 4.496017125813501*omega[7.276843] + 0.8567652453972836*omega[7.58359] + 2.518320949211015*omega[7.86024] - 0.657062757134355*omega[8.0]) : 0.0 : True
+ 7.86024 : 0.0 : domegadt[7.86024] - (2.282635500205682*omega[7.0] - 3.8786632197240785*omega[7.057104] + 3.3931519180649445*omega[7.276843] - 5.188340906407153*omega[7.58359] + 0.5812330525807557*omega[7.86024] + 2.8099836552797197*omega[8.0]) : 0.0 : True
+ 8.0 : 0.0 : domegadt[8.0] - (-4.999999999999989*omega[7.0] + 8.412424223594346*omega[7.057104] - 6.970256116656801*omega[7.276843] + 8.777114204150497*omega[7.58359] - 18.219282311088037*omega[7.86024] + 12.99999999999998*omega[8.0]) : 0.0 : True
+ 8.057104 : 0.0 : domegadt[8.057104] - (-11.038679241208952*omega[8.0] + 8.755923977938355*omega[8.057104] + 2.8919426153801258*omega[8.276843] - 0.87518639620027*omega[8.58359] + 0.39970520793996167*omega[8.86024] - 0.13370616384921521*omega[9.0]) : 0.0 : True
+ 8.276843 : 0.0 : domegadt[8.276843] - (3.5830685225010477*omega[8.0] - 7.161380720145321*omega[8.057104] + 1.8060777240835826*omega[8.276843] + 2.3637971760686236*omega[8.58359] - 0.8659007802831209*omega[8.86024] + 0.274338077775192*omega[9.0]) : 0.0 : True
+ 8.58359 : 0.0 : domegadt[8.58359] - (-2.3441715579038664*omega[8.0] + 4.122165246243398*omega[8.057104] - 4.496017125813501*omega[8.276843] + 0.8567652453972836*omega[8.58359] + 2.518320949211015*omega[8.86024] - 0.657062757134355*omega[9.0]) : 0.0 : True
+ 8.86024 : 0.0 : domegadt[8.86024] - (2.282635500205682*omega[8.0] - 3.8786632197240785*omega[8.057104] + 3.3931519180649445*omega[8.276843] - 5.188340906407153*omega[8.58359] + 0.5812330525807557*omega[8.86024] + 2.8099836552797197*omega[9.0]) : 0.0 : True
+ 9.0 : 0.0 : domegadt[9.0] - (-4.999999999999989*omega[8.0] + 8.412424223594346*omega[8.057104] - 6.970256116656801*omega[8.276843] + 8.777114204150497*omega[8.58359] - 18.219282311088037*omega[8.86024] + 12.99999999999998*omega[9.0]) : 0.0 : True
+ 9.057104 : 0.0 : domegadt[9.057104] - (-11.038679241208952*omega[9.0] + 8.755923977938355*omega[9.057104] + 2.8919426153801258*omega[9.276843] - 0.87518639620027*omega[9.58359] + 0.39970520793996167*omega[9.86024] - 0.13370616384921521*omega[10.0]) : 0.0 : True
+ 9.276843 : 0.0 : domegadt[9.276843] - (3.5830685225010477*omega[9.0] - 7.161380720145321*omega[9.057104] + 1.8060777240835826*omega[9.276843] + 2.3637971760686236*omega[9.58359] - 0.8659007802831209*omega[9.86024] + 0.274338077775192*omega[10.0]) : 0.0 : True
+ 9.58359 : 0.0 : domegadt[9.58359] - (-2.3441715579038664*omega[9.0] + 4.122165246243398*omega[9.057104] - 4.496017125813501*omega[9.276843] + 0.8567652453972836*omega[9.58359] + 2.518320949211015*omega[9.86024] - 0.657062757134355*omega[10.0]) : 0.0 : True
+ 9.86024 : 0.0 : domegadt[9.86024] - (2.282635500205682*omega[9.0] - 3.8786632197240785*omega[9.057104] + 3.3931519180649445*omega[9.276843] - 5.188340906407153*omega[9.58359] + 0.5812330525807557*omega[9.86024] + 2.8099836552797197*omega[10.0]) : 0.0 : True
+ 10.0 : 0.0 : domegadt[10.0] - (-4.999999999999989*omega[9.0] + 8.412424223594346*omega[9.057104] - 6.970256116656801*omega[9.276843] + 8.777114204150497*omega[9.58359] - 18.219282311088037*omega[9.86024] + 12.99999999999998*omega[10.0]) : 0.0 : True
dthetadt_disc_eq : Size=50, Index=t, Active=True
- Key : Lower : Body : Upper : Active
- 0.057104 : 0.0 : dthetadt[0.057104] + 11.0386792412*theta[0.0] - 8.75592397794*theta[0.057104] - 2.89194261538*theta[0.276843] + 0.8751863962*theta[0.58359] - 0.39970520794*theta[0.86024] + 0.133706163849*theta[1.0] : 0.0 : True
- 0.276843 : 0.0 : dthetadt[0.276843] - 3.5830685225*theta[0.0] + 7.16138072015*theta[0.057104] - 1.80607772408*theta[0.276843] - 2.36379717607*theta[0.58359] + 0.865900780283*theta[0.86024] - 0.274338077775*theta[1.0] : 0.0 : True
- 0.58359 : 0.0 : dthetadt[0.58359] + 2.3441715579*theta[0.0] - 4.12216524624*theta[0.057104] + 4.49601712581*theta[0.276843] - 0.856765245397*theta[0.58359] - 2.51832094921*theta[0.86024] + 0.657062757134*theta[1.0] : 0.0 : True
- 0.86024 : 0.0 : dthetadt[0.86024] - 2.28263550021*theta[0.0] + 3.87866321972*theta[0.057104] - 3.39315191806*theta[0.276843] + 5.18834090641*theta[0.58359] - 0.581233052581*theta[0.86024] - 2.80998365528*theta[1.0] : 0.0 : True
- 1.0 : 0.0 : dthetadt[1.0] + 5.0*theta[0.0] - 8.41242422359*theta[0.057104] + 6.97025611666*theta[0.276843] - 8.77711420415*theta[0.58359] + 18.2192823111*theta[0.86024] - 13.0*theta[1.0] : 0.0 : True
- 1.057104 : 0.0 : dthetadt[1.057104] + 11.0386792412*theta[1.0] - 8.75592397794*theta[1.057104] - 2.89194261538*theta[1.276843] + 0.8751863962*theta[1.58359] - 0.39970520794*theta[1.86024] + 0.133706163849*theta[2.0] : 0.0 : True
- 1.276843 : 0.0 : dthetadt[1.276843] - 3.5830685225*theta[1.0] + 7.16138072015*theta[1.057104] - 1.80607772408*theta[1.276843] - 2.36379717607*theta[1.58359] + 0.865900780283*theta[1.86024] - 0.274338077775*theta[2.0] : 0.0 : True
- 1.58359 : 0.0 : dthetadt[1.58359] + 2.3441715579*theta[1.0] - 4.12216524624*theta[1.057104] + 4.49601712581*theta[1.276843] - 0.856765245397*theta[1.58359] - 2.51832094921*theta[1.86024] + 0.657062757134*theta[2.0] : 0.0 : True
- 1.86024 : 0.0 : dthetadt[1.86024] - 2.28263550021*theta[1.0] + 3.87866321972*theta[1.057104] - 3.39315191806*theta[1.276843] + 5.18834090641*theta[1.58359] - 0.581233052581*theta[1.86024] - 2.80998365528*theta[2.0] : 0.0 : True
- 2.0 : 0.0 : dthetadt[2.0] + 5.0*theta[1.0] - 8.41242422359*theta[1.057104] + 6.97025611666*theta[1.276843] - 8.77711420415*theta[1.58359] + 18.2192823111*theta[1.86024] - 13.0*theta[2.0] : 0.0 : True
- 2.057104 : 0.0 : dthetadt[2.057104] + 11.0386792412*theta[2.0] - 8.75592397794*theta[2.057104] - 2.89194261538*theta[2.276843] + 0.8751863962*theta[2.58359] - 0.39970520794*theta[2.86024] + 0.133706163849*theta[3.0] : 0.0 : True
- 2.276843 : 0.0 : dthetadt[2.276843] - 3.5830685225*theta[2.0] + 7.16138072015*theta[2.057104] - 1.80607772408*theta[2.276843] - 2.36379717607*theta[2.58359] + 0.865900780283*theta[2.86024] - 0.274338077775*theta[3.0] : 0.0 : True
- 2.58359 : 0.0 : dthetadt[2.58359] + 2.3441715579*theta[2.0] - 4.12216524624*theta[2.057104] + 4.49601712581*theta[2.276843] - 0.856765245397*theta[2.58359] - 2.51832094921*theta[2.86024] + 0.657062757134*theta[3.0] : 0.0 : True
- 2.86024 : 0.0 : dthetadt[2.86024] - 2.28263550021*theta[2.0] + 3.87866321972*theta[2.057104] - 3.39315191806*theta[2.276843] + 5.18834090641*theta[2.58359] - 0.581233052581*theta[2.86024] - 2.80998365528*theta[3.0] : 0.0 : True
- 3.0 : 0.0 : dthetadt[3.0] + 5.0*theta[2.0] - 8.41242422359*theta[2.057104] + 6.97025611666*theta[2.276843] - 8.77711420415*theta[2.58359] + 18.2192823111*theta[2.86024] - 13.0*theta[3.0] : 0.0 : True
- 3.057104 : 0.0 : dthetadt[3.057104] + 11.0386792412*theta[3.0] - 8.75592397794*theta[3.057104] - 2.89194261538*theta[3.276843] + 0.8751863962*theta[3.58359] - 0.39970520794*theta[3.86024] + 0.133706163849*theta[4.0] : 0.0 : True
- 3.276843 : 0.0 : dthetadt[3.276843] - 3.5830685225*theta[3.0] + 7.16138072015*theta[3.057104] - 1.80607772408*theta[3.276843] - 2.36379717607*theta[3.58359] + 0.865900780283*theta[3.86024] - 0.274338077775*theta[4.0] : 0.0 : True
- 3.58359 : 0.0 : dthetadt[3.58359] + 2.3441715579*theta[3.0] - 4.12216524624*theta[3.057104] + 4.49601712581*theta[3.276843] - 0.856765245397*theta[3.58359] - 2.51832094921*theta[3.86024] + 0.657062757134*theta[4.0] : 0.0 : True
- 3.86024 : 0.0 : dthetadt[3.86024] - 2.28263550021*theta[3.0] + 3.87866321972*theta[3.057104] - 3.39315191806*theta[3.276843] + 5.18834090641*theta[3.58359] - 0.581233052581*theta[3.86024] - 2.80998365528*theta[4.0] : 0.0 : True
- 4.0 : 0.0 : dthetadt[4.0] + 5.0*theta[3.0] - 8.41242422359*theta[3.057104] + 6.97025611666*theta[3.276843] - 8.77711420415*theta[3.58359] + 18.2192823111*theta[3.86024] - 13.0*theta[4.0] : 0.0 : True
- 4.057104 : 0.0 : dthetadt[4.057104] + 11.0386792412*theta[4.0] - 8.75592397794*theta[4.057104] - 2.89194261538*theta[4.276843] + 0.8751863962*theta[4.58359] - 0.39970520794*theta[4.86024] + 0.133706163849*theta[5.0] : 0.0 : True
- 4.276843 : 0.0 : dthetadt[4.276843] - 3.5830685225*theta[4.0] + 7.16138072015*theta[4.057104] - 1.80607772408*theta[4.276843] - 2.36379717607*theta[4.58359] + 0.865900780283*theta[4.86024] - 0.274338077775*theta[5.0] : 0.0 : True
- 4.58359 : 0.0 : dthetadt[4.58359] + 2.3441715579*theta[4.0] - 4.12216524624*theta[4.057104] + 4.49601712581*theta[4.276843] - 0.856765245397*theta[4.58359] - 2.51832094921*theta[4.86024] + 0.657062757134*theta[5.0] : 0.0 : True
- 4.86024 : 0.0 : dthetadt[4.86024] - 2.28263550021*theta[4.0] + 3.87866321972*theta[4.057104] - 3.39315191806*theta[4.276843] + 5.18834090641*theta[4.58359] - 0.581233052581*theta[4.86024] - 2.80998365528*theta[5.0] : 0.0 : True
- 5.0 : 0.0 : dthetadt[5.0] + 5.0*theta[4.0] - 8.41242422359*theta[4.057104] + 6.97025611666*theta[4.276843] - 8.77711420415*theta[4.58359] + 18.2192823111*theta[4.86024] - 13.0*theta[5.0] : 0.0 : True
- 5.057104 : 0.0 : dthetadt[5.057104] + 11.0386792412*theta[5.0] - 8.75592397794*theta[5.057104] - 2.89194261538*theta[5.276843] + 0.8751863962*theta[5.58359] - 0.39970520794*theta[5.86024] + 0.133706163849*theta[6.0] : 0.0 : True
- 5.276843 : 0.0 : dthetadt[5.276843] - 3.5830685225*theta[5.0] + 7.16138072015*theta[5.057104] - 1.80607772408*theta[5.276843] - 2.36379717607*theta[5.58359] + 0.865900780283*theta[5.86024] - 0.274338077775*theta[6.0] : 0.0 : True
- 5.58359 : 0.0 : dthetadt[5.58359] + 2.3441715579*theta[5.0] - 4.12216524624*theta[5.057104] + 4.49601712581*theta[5.276843] - 0.856765245397*theta[5.58359] - 2.51832094921*theta[5.86024] + 0.657062757134*theta[6.0] : 0.0 : True
- 5.86024 : 0.0 : dthetadt[5.86024] - 2.28263550021*theta[5.0] + 3.87866321972*theta[5.057104] - 3.39315191806*theta[5.276843] + 5.18834090641*theta[5.58359] - 0.581233052581*theta[5.86024] - 2.80998365528*theta[6.0] : 0.0 : True
- 6.0 : 0.0 : dthetadt[6.0] + 5.0*theta[5.0] - 8.41242422359*theta[5.057104] + 6.97025611666*theta[5.276843] - 8.77711420415*theta[5.58359] + 18.2192823111*theta[5.86024] - 13.0*theta[6.0] : 0.0 : True
- 6.057104 : 0.0 : dthetadt[6.057104] + 11.0386792412*theta[6.0] - 8.75592397794*theta[6.057104] - 2.89194261538*theta[6.276843] + 0.8751863962*theta[6.58359] - 0.39970520794*theta[6.86024] + 0.133706163849*theta[7.0] : 0.0 : True
- 6.276843 : 0.0 : dthetadt[6.276843] - 3.5830685225*theta[6.0] + 7.16138072015*theta[6.057104] - 1.80607772408*theta[6.276843] - 2.36379717607*theta[6.58359] + 0.865900780283*theta[6.86024] - 0.274338077775*theta[7.0] : 0.0 : True
- 6.58359 : 0.0 : dthetadt[6.58359] + 2.3441715579*theta[6.0] - 4.12216524624*theta[6.057104] + 4.49601712581*theta[6.276843] - 0.856765245397*theta[6.58359] - 2.51832094921*theta[6.86024] + 0.657062757134*theta[7.0] : 0.0 : True
- 6.86024 : 0.0 : dthetadt[6.86024] - 2.28263550021*theta[6.0] + 3.87866321972*theta[6.057104] - 3.39315191806*theta[6.276843] + 5.18834090641*theta[6.58359] - 0.581233052581*theta[6.86024] - 2.80998365528*theta[7.0] : 0.0 : True
- 7.0 : 0.0 : dthetadt[7.0] + 5.0*theta[6.0] - 8.41242422359*theta[6.057104] + 6.97025611666*theta[6.276843] - 8.77711420415*theta[6.58359] + 18.2192823111*theta[6.86024] - 13.0*theta[7.0] : 0.0 : True
- 7.057104 : 0.0 : dthetadt[7.057104] + 11.0386792412*theta[7.0] - 8.75592397794*theta[7.057104] - 2.89194261538*theta[7.276843] + 0.8751863962*theta[7.58359] - 0.39970520794*theta[7.86024] + 0.133706163849*theta[8.0] : 0.0 : True
- 7.276843 : 0.0 : dthetadt[7.276843] - 3.5830685225*theta[7.0] + 7.16138072015*theta[7.057104] - 1.80607772408*theta[7.276843] - 2.36379717607*theta[7.58359] + 0.865900780283*theta[7.86024] - 0.274338077775*theta[8.0] : 0.0 : True
- 7.58359 : 0.0 : dthetadt[7.58359] + 2.3441715579*theta[7.0] - 4.12216524624*theta[7.057104] + 4.49601712581*theta[7.276843] - 0.856765245397*theta[7.58359] - 2.51832094921*theta[7.86024] + 0.657062757134*theta[8.0] : 0.0 : True
- 7.86024 : 0.0 : dthetadt[7.86024] - 2.28263550021*theta[7.0] + 3.87866321972*theta[7.057104] - 3.39315191806*theta[7.276843] + 5.18834090641*theta[7.58359] - 0.581233052581*theta[7.86024] - 2.80998365528*theta[8.0] : 0.0 : True
- 8.0 : 0.0 : dthetadt[8.0] + 5.0*theta[7.0] - 8.41242422359*theta[7.057104] + 6.97025611666*theta[7.276843] - 8.77711420415*theta[7.58359] + 18.2192823111*theta[7.86024] - 13.0*theta[8.0] : 0.0 : True
- 8.057104 : 0.0 : dthetadt[8.057104] + 11.0386792412*theta[8.0] - 8.75592397794*theta[8.057104] - 2.89194261538*theta[8.276843] + 0.8751863962*theta[8.58359] - 0.39970520794*theta[8.86024] + 0.133706163849*theta[9.0] : 0.0 : True
- 8.276843 : 0.0 : dthetadt[8.276843] - 3.5830685225*theta[8.0] + 7.16138072015*theta[8.057104] - 1.80607772408*theta[8.276843] - 2.36379717607*theta[8.58359] + 0.865900780283*theta[8.86024] - 0.274338077775*theta[9.0] : 0.0 : True
- 8.58359 : 0.0 : dthetadt[8.58359] + 2.3441715579*theta[8.0] - 4.12216524624*theta[8.057104] + 4.49601712581*theta[8.276843] - 0.856765245397*theta[8.58359] - 2.51832094921*theta[8.86024] + 0.657062757134*theta[9.0] : 0.0 : True
- 8.86024 : 0.0 : dthetadt[8.86024] - 2.28263550021*theta[8.0] + 3.87866321972*theta[8.057104] - 3.39315191806*theta[8.276843] + 5.18834090641*theta[8.58359] - 0.581233052581*theta[8.86024] - 2.80998365528*theta[9.0] : 0.0 : True
- 9.0 : 0.0 : dthetadt[9.0] + 5.0*theta[8.0] - 8.41242422359*theta[8.057104] + 6.97025611666*theta[8.276843] - 8.77711420415*theta[8.58359] + 18.2192823111*theta[8.86024] - 13.0*theta[9.0] : 0.0 : True
- 9.057104 : 0.0 : dthetadt[9.057104] + 11.0386792412*theta[9.0] - 8.75592397794*theta[9.057104] - 2.89194261538*theta[9.276843] + 0.8751863962*theta[9.58359] - 0.39970520794*theta[9.86024] + 0.133706163849*theta[10.0] : 0.0 : True
- 9.276843 : 0.0 : dthetadt[9.276843] - 3.5830685225*theta[9.0] + 7.16138072015*theta[9.057104] - 1.80607772408*theta[9.276843] - 2.36379717607*theta[9.58359] + 0.865900780283*theta[9.86024] - 0.274338077775*theta[10.0] : 0.0 : True
- 9.58359 : 0.0 : dthetadt[9.58359] + 2.3441715579*theta[9.0] - 4.12216524624*theta[9.057104] + 4.49601712581*theta[9.276843] - 0.856765245397*theta[9.58359] - 2.51832094921*theta[9.86024] + 0.657062757134*theta[10.0] : 0.0 : True
- 9.86024 : 0.0 : dthetadt[9.86024] - 2.28263550021*theta[9.0] + 3.87866321972*theta[9.057104] - 3.39315191806*theta[9.276843] + 5.18834090641*theta[9.58359] - 0.581233052581*theta[9.86024] - 2.80998365528*theta[10.0] : 0.0 : True
- 10.0 : 0.0 : dthetadt[10.0] + 5.0*theta[9.0] - 8.41242422359*theta[9.057104] + 6.97025611666*theta[9.276843] - 8.77711420415*theta[9.58359] + 18.2192823111*theta[9.86024] - 13.0*theta[10.0] : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 0.057104 : 0.0 : dthetadt[0.057104] - (-11.038679241208952*theta[0.0] + 8.755923977938355*theta[0.057104] + 2.8919426153801258*theta[0.276843] - 0.87518639620027*theta[0.58359] + 0.39970520793996167*theta[0.86024] - 0.13370616384921521*theta[1.0]) : 0.0 : True
+ 0.276843 : 0.0 : dthetadt[0.276843] - (3.5830685225010477*theta[0.0] - 7.161380720145321*theta[0.057104] + 1.8060777240835826*theta[0.276843] + 2.3637971760686236*theta[0.58359] - 0.8659007802831209*theta[0.86024] + 0.274338077775192*theta[1.0]) : 0.0 : True
+ 0.58359 : 0.0 : dthetadt[0.58359] - (-2.3441715579038664*theta[0.0] + 4.122165246243398*theta[0.057104] - 4.496017125813501*theta[0.276843] + 0.8567652453972836*theta[0.58359] + 2.518320949211015*theta[0.86024] - 0.657062757134355*theta[1.0]) : 0.0 : True
+ 0.86024 : 0.0 : dthetadt[0.86024] - (2.282635500205682*theta[0.0] - 3.8786632197240785*theta[0.057104] + 3.3931519180649445*theta[0.276843] - 5.188340906407153*theta[0.58359] + 0.5812330525807557*theta[0.86024] + 2.8099836552797197*theta[1.0]) : 0.0 : True
+ 1.0 : 0.0 : dthetadt[1.0] - (-4.999999999999989*theta[0.0] + 8.412424223594346*theta[0.057104] - 6.970256116656801*theta[0.276843] + 8.777114204150497*theta[0.58359] - 18.219282311088037*theta[0.86024] + 12.99999999999998*theta[1.0]) : 0.0 : True
+ 1.057104 : 0.0 : dthetadt[1.057104] - (-11.038679241208952*theta[1.0] + 8.755923977938355*theta[1.057104] + 2.8919426153801258*theta[1.276843] - 0.87518639620027*theta[1.58359] + 0.39970520793996167*theta[1.86024] - 0.13370616384921521*theta[2.0]) : 0.0 : True
+ 1.276843 : 0.0 : dthetadt[1.276843] - (3.5830685225010477*theta[1.0] - 7.161380720145321*theta[1.057104] + 1.8060777240835826*theta[1.276843] + 2.3637971760686236*theta[1.58359] - 0.8659007802831209*theta[1.86024] + 0.274338077775192*theta[2.0]) : 0.0 : True
+ 1.58359 : 0.0 : dthetadt[1.58359] - (-2.3441715579038664*theta[1.0] + 4.122165246243398*theta[1.057104] - 4.496017125813501*theta[1.276843] + 0.8567652453972836*theta[1.58359] + 2.518320949211015*theta[1.86024] - 0.657062757134355*theta[2.0]) : 0.0 : True
+ 1.86024 : 0.0 : dthetadt[1.86024] - (2.282635500205682*theta[1.0] - 3.8786632197240785*theta[1.057104] + 3.3931519180649445*theta[1.276843] - 5.188340906407153*theta[1.58359] + 0.5812330525807557*theta[1.86024] + 2.8099836552797197*theta[2.0]) : 0.0 : True
+ 2.0 : 0.0 : dthetadt[2.0] - (-4.999999999999989*theta[1.0] + 8.412424223594346*theta[1.057104] - 6.970256116656801*theta[1.276843] + 8.777114204150497*theta[1.58359] - 18.219282311088037*theta[1.86024] + 12.99999999999998*theta[2.0]) : 0.0 : True
+ 2.057104 : 0.0 : dthetadt[2.057104] - (-11.038679241208952*theta[2.0] + 8.755923977938355*theta[2.057104] + 2.8919426153801258*theta[2.276843] - 0.87518639620027*theta[2.58359] + 0.39970520793996167*theta[2.86024] - 0.13370616384921521*theta[3.0]) : 0.0 : True
+ 2.276843 : 0.0 : dthetadt[2.276843] - (3.5830685225010477*theta[2.0] - 7.161380720145321*theta[2.057104] + 1.8060777240835826*theta[2.276843] + 2.3637971760686236*theta[2.58359] - 0.8659007802831209*theta[2.86024] + 0.274338077775192*theta[3.0]) : 0.0 : True
+ 2.58359 : 0.0 : dthetadt[2.58359] - (-2.3441715579038664*theta[2.0] + 4.122165246243398*theta[2.057104] - 4.496017125813501*theta[2.276843] + 0.8567652453972836*theta[2.58359] + 2.518320949211015*theta[2.86024] - 0.657062757134355*theta[3.0]) : 0.0 : True
+ 2.86024 : 0.0 : dthetadt[2.86024] - (2.282635500205682*theta[2.0] - 3.8786632197240785*theta[2.057104] + 3.3931519180649445*theta[2.276843] - 5.188340906407153*theta[2.58359] + 0.5812330525807557*theta[2.86024] + 2.8099836552797197*theta[3.0]) : 0.0 : True
+ 3.0 : 0.0 : dthetadt[3.0] - (-4.999999999999989*theta[2.0] + 8.412424223594346*theta[2.057104] - 6.970256116656801*theta[2.276843] + 8.777114204150497*theta[2.58359] - 18.219282311088037*theta[2.86024] + 12.99999999999998*theta[3.0]) : 0.0 : True
+ 3.057104 : 0.0 : dthetadt[3.057104] - (-11.038679241208952*theta[3.0] + 8.755923977938355*theta[3.057104] + 2.8919426153801258*theta[3.276843] - 0.87518639620027*theta[3.58359] + 0.39970520793996167*theta[3.86024] - 0.13370616384921521*theta[4.0]) : 0.0 : True
+ 3.276843 : 0.0 : dthetadt[3.276843] - (3.5830685225010477*theta[3.0] - 7.161380720145321*theta[3.057104] + 1.8060777240835826*theta[3.276843] + 2.3637971760686236*theta[3.58359] - 0.8659007802831209*theta[3.86024] + 0.274338077775192*theta[4.0]) : 0.0 : True
+ 3.58359 : 0.0 : dthetadt[3.58359] - (-2.3441715579038664*theta[3.0] + 4.122165246243398*theta[3.057104] - 4.496017125813501*theta[3.276843] + 0.8567652453972836*theta[3.58359] + 2.518320949211015*theta[3.86024] - 0.657062757134355*theta[4.0]) : 0.0 : True
+ 3.86024 : 0.0 : dthetadt[3.86024] - (2.282635500205682*theta[3.0] - 3.8786632197240785*theta[3.057104] + 3.3931519180649445*theta[3.276843] - 5.188340906407153*theta[3.58359] + 0.5812330525807557*theta[3.86024] + 2.8099836552797197*theta[4.0]) : 0.0 : True
+ 4.0 : 0.0 : dthetadt[4.0] - (-4.999999999999989*theta[3.0] + 8.412424223594346*theta[3.057104] - 6.970256116656801*theta[3.276843] + 8.777114204150497*theta[3.58359] - 18.219282311088037*theta[3.86024] + 12.99999999999998*theta[4.0]) : 0.0 : True
+ 4.057104 : 0.0 : dthetadt[4.057104] - (-11.038679241208952*theta[4.0] + 8.755923977938355*theta[4.057104] + 2.8919426153801258*theta[4.276843] - 0.87518639620027*theta[4.58359] + 0.39970520793996167*theta[4.86024] - 0.13370616384921521*theta[5.0]) : 0.0 : True
+ 4.276843 : 0.0 : dthetadt[4.276843] - (3.5830685225010477*theta[4.0] - 7.161380720145321*theta[4.057104] + 1.8060777240835826*theta[4.276843] + 2.3637971760686236*theta[4.58359] - 0.8659007802831209*theta[4.86024] + 0.274338077775192*theta[5.0]) : 0.0 : True
+ 4.58359 : 0.0 : dthetadt[4.58359] - (-2.3441715579038664*theta[4.0] + 4.122165246243398*theta[4.057104] - 4.496017125813501*theta[4.276843] + 0.8567652453972836*theta[4.58359] + 2.518320949211015*theta[4.86024] - 0.657062757134355*theta[5.0]) : 0.0 : True
+ 4.86024 : 0.0 : dthetadt[4.86024] - (2.282635500205682*theta[4.0] - 3.8786632197240785*theta[4.057104] + 3.3931519180649445*theta[4.276843] - 5.188340906407153*theta[4.58359] + 0.5812330525807557*theta[4.86024] + 2.8099836552797197*theta[5.0]) : 0.0 : True
+ 5.0 : 0.0 : dthetadt[5.0] - (-4.999999999999989*theta[4.0] + 8.412424223594346*theta[4.057104] - 6.970256116656801*theta[4.276843] + 8.777114204150497*theta[4.58359] - 18.219282311088037*theta[4.86024] + 12.99999999999998*theta[5.0]) : 0.0 : True
+ 5.057104 : 0.0 : dthetadt[5.057104] - (-11.038679241208952*theta[5.0] + 8.755923977938355*theta[5.057104] + 2.8919426153801258*theta[5.276843] - 0.87518639620027*theta[5.58359] + 0.39970520793996167*theta[5.86024] - 0.13370616384921521*theta[6.0]) : 0.0 : True
+ 5.276843 : 0.0 : dthetadt[5.276843] - (3.5830685225010477*theta[5.0] - 7.161380720145321*theta[5.057104] + 1.8060777240835826*theta[5.276843] + 2.3637971760686236*theta[5.58359] - 0.8659007802831209*theta[5.86024] + 0.274338077775192*theta[6.0]) : 0.0 : True
+ 5.58359 : 0.0 : dthetadt[5.58359] - (-2.3441715579038664*theta[5.0] + 4.122165246243398*theta[5.057104] - 4.496017125813501*theta[5.276843] + 0.8567652453972836*theta[5.58359] + 2.518320949211015*theta[5.86024] - 0.657062757134355*theta[6.0]) : 0.0 : True
+ 5.86024 : 0.0 : dthetadt[5.86024] - (2.282635500205682*theta[5.0] - 3.8786632197240785*theta[5.057104] + 3.3931519180649445*theta[5.276843] - 5.188340906407153*theta[5.58359] + 0.5812330525807557*theta[5.86024] + 2.8099836552797197*theta[6.0]) : 0.0 : True
+ 6.0 : 0.0 : dthetadt[6.0] - (-4.999999999999989*theta[5.0] + 8.412424223594346*theta[5.057104] - 6.970256116656801*theta[5.276843] + 8.777114204150497*theta[5.58359] - 18.219282311088037*theta[5.86024] + 12.99999999999998*theta[6.0]) : 0.0 : True
+ 6.057104 : 0.0 : dthetadt[6.057104] - (-11.038679241208952*theta[6.0] + 8.755923977938355*theta[6.057104] + 2.8919426153801258*theta[6.276843] - 0.87518639620027*theta[6.58359] + 0.39970520793996167*theta[6.86024] - 0.13370616384921521*theta[7.0]) : 0.0 : True
+ 6.276843 : 0.0 : dthetadt[6.276843] - (3.5830685225010477*theta[6.0] - 7.161380720145321*theta[6.057104] + 1.8060777240835826*theta[6.276843] + 2.3637971760686236*theta[6.58359] - 0.8659007802831209*theta[6.86024] + 0.274338077775192*theta[7.0]) : 0.0 : True
+ 6.58359 : 0.0 : dthetadt[6.58359] - (-2.3441715579038664*theta[6.0] + 4.122165246243398*theta[6.057104] - 4.496017125813501*theta[6.276843] + 0.8567652453972836*theta[6.58359] + 2.518320949211015*theta[6.86024] - 0.657062757134355*theta[7.0]) : 0.0 : True
+ 6.86024 : 0.0 : dthetadt[6.86024] - (2.282635500205682*theta[6.0] - 3.8786632197240785*theta[6.057104] + 3.3931519180649445*theta[6.276843] - 5.188340906407153*theta[6.58359] + 0.5812330525807557*theta[6.86024] + 2.8099836552797197*theta[7.0]) : 0.0 : True
+ 7.0 : 0.0 : dthetadt[7.0] - (-4.999999999999989*theta[6.0] + 8.412424223594346*theta[6.057104] - 6.970256116656801*theta[6.276843] + 8.777114204150497*theta[6.58359] - 18.219282311088037*theta[6.86024] + 12.99999999999998*theta[7.0]) : 0.0 : True
+ 7.057104 : 0.0 : dthetadt[7.057104] - (-11.038679241208952*theta[7.0] + 8.755923977938355*theta[7.057104] + 2.8919426153801258*theta[7.276843] - 0.87518639620027*theta[7.58359] + 0.39970520793996167*theta[7.86024] - 0.13370616384921521*theta[8.0]) : 0.0 : True
+ 7.276843 : 0.0 : dthetadt[7.276843] - (3.5830685225010477*theta[7.0] - 7.161380720145321*theta[7.057104] + 1.8060777240835826*theta[7.276843] + 2.3637971760686236*theta[7.58359] - 0.8659007802831209*theta[7.86024] + 0.274338077775192*theta[8.0]) : 0.0 : True
+ 7.58359 : 0.0 : dthetadt[7.58359] - (-2.3441715579038664*theta[7.0] + 4.122165246243398*theta[7.057104] - 4.496017125813501*theta[7.276843] + 0.8567652453972836*theta[7.58359] + 2.518320949211015*theta[7.86024] - 0.657062757134355*theta[8.0]) : 0.0 : True
+ 7.86024 : 0.0 : dthetadt[7.86024] - (2.282635500205682*theta[7.0] - 3.8786632197240785*theta[7.057104] + 3.3931519180649445*theta[7.276843] - 5.188340906407153*theta[7.58359] + 0.5812330525807557*theta[7.86024] + 2.8099836552797197*theta[8.0]) : 0.0 : True
+ 8.0 : 0.0 : dthetadt[8.0] - (-4.999999999999989*theta[7.0] + 8.412424223594346*theta[7.057104] - 6.970256116656801*theta[7.276843] + 8.777114204150497*theta[7.58359] - 18.219282311088037*theta[7.86024] + 12.99999999999998*theta[8.0]) : 0.0 : True
+ 8.057104 : 0.0 : dthetadt[8.057104] - (-11.038679241208952*theta[8.0] + 8.755923977938355*theta[8.057104] + 2.8919426153801258*theta[8.276843] - 0.87518639620027*theta[8.58359] + 0.39970520793996167*theta[8.86024] - 0.13370616384921521*theta[9.0]) : 0.0 : True
+ 8.276843 : 0.0 : dthetadt[8.276843] - (3.5830685225010477*theta[8.0] - 7.161380720145321*theta[8.057104] + 1.8060777240835826*theta[8.276843] + 2.3637971760686236*theta[8.58359] - 0.8659007802831209*theta[8.86024] + 0.274338077775192*theta[9.0]) : 0.0 : True
+ 8.58359 : 0.0 : dthetadt[8.58359] - (-2.3441715579038664*theta[8.0] + 4.122165246243398*theta[8.057104] - 4.496017125813501*theta[8.276843] + 0.8567652453972836*theta[8.58359] + 2.518320949211015*theta[8.86024] - 0.657062757134355*theta[9.0]) : 0.0 : True
+ 8.86024 : 0.0 : dthetadt[8.86024] - (2.282635500205682*theta[8.0] - 3.8786632197240785*theta[8.057104] + 3.3931519180649445*theta[8.276843] - 5.188340906407153*theta[8.58359] + 0.5812330525807557*theta[8.86024] + 2.8099836552797197*theta[9.0]) : 0.0 : True
+ 9.0 : 0.0 : dthetadt[9.0] - (-4.999999999999989*theta[8.0] + 8.412424223594346*theta[8.057104] - 6.970256116656801*theta[8.276843] + 8.777114204150497*theta[8.58359] - 18.219282311088037*theta[8.86024] + 12.99999999999998*theta[9.0]) : 0.0 : True
+ 9.057104 : 0.0 : dthetadt[9.057104] - (-11.038679241208952*theta[9.0] + 8.755923977938355*theta[9.057104] + 2.8919426153801258*theta[9.276843] - 0.87518639620027*theta[9.58359] + 0.39970520793996167*theta[9.86024] - 0.13370616384921521*theta[10.0]) : 0.0 : True
+ 9.276843 : 0.0 : dthetadt[9.276843] - (3.5830685225010477*theta[9.0] - 7.161380720145321*theta[9.057104] + 1.8060777240835826*theta[9.276843] + 2.3637971760686236*theta[9.58359] - 0.8659007802831209*theta[9.86024] + 0.274338077775192*theta[10.0]) : 0.0 : True
+ 9.58359 : 0.0 : dthetadt[9.58359] - (-2.3441715579038664*theta[9.0] + 4.122165246243398*theta[9.057104] - 4.496017125813501*theta[9.276843] + 0.8567652453972836*theta[9.58359] + 2.518320949211015*theta[9.86024] - 0.657062757134355*theta[10.0]) : 0.0 : True
+ 9.86024 : 0.0 : dthetadt[9.86024] - (2.282635500205682*theta[9.0] - 3.8786632197240785*theta[9.057104] + 3.3931519180649445*theta[9.276843] - 5.188340906407153*theta[9.58359] + 0.5812330525807557*theta[9.86024] + 2.8099836552797197*theta[10.0]) : 0.0 : True
+ 10.0 : 0.0 : dthetadt[10.0] - (-4.999999999999989*theta[9.0] + 8.412424223594346*theta[9.057104] - 6.970256116656801*theta[9.276843] + 8.777114204150497*theta[9.58359] - 18.219282311088037*theta[9.86024] + 12.99999999999998*theta[10.0]) : 0.0 : True
1 ContinuousSet Declarations
t : Dim=0, Dimen=1, Size=51, Domain=None, Ordered=Sorted, Bounds=(0.0, 10.0)
diff --git a/pyomo/dae/tests/simulator_ode_multindex_example.casadi.txt b/pyomo/dae/tests/simulator_ode_multindex_example.casadi.txt
index 35d73b4276e..1c0bf27d726 100644
--- a/pyomo/dae/tests/simulator_ode_multindex_example.casadi.txt
+++ b/pyomo/dae/tests/simulator_ode_multindex_example.casadi.txt
@@ -166,7 +166,7 @@
18.114208 : None : -0.620355007629 : None : False : False : Reals
18.553686 : None : 0.682800758587 : None : False : False : Reals
19.167181 : None : -0.447135799476 : None : False : False : Reals
- 19.72048 : None : -0.0584028363221 : None : False : False : Reals
+ 19.72048 : None : -0.0584028363222 : None : False : False : Reals
20.0 : None : -0.709688679945 : None : False : False : Reals
theta : Size=51, Index=t
Key : Lower : Value : Upper : Fixed : Stale : Domain
@@ -207,7 +207,7 @@
13.72048 : None : -0.0146516681089 : None : False : False : Reals
14.0 : None : -0.0985083880672 : None : False : False : Reals
14.114208 : None : -0.0280094635414 : None : False : False : Reals
- 14.553686 : None : 0.0397261585264 : None : False : False : Reals
+ 14.553686 : None : 0.0397261585263 : None : False : False : Reals
15.167181 : None : 0.084135158928 : None : False : False : Reals
15.72048 : None : -0.101500735908 : None : False : False : Reals
16.0 : None : 0.0418304000833 : None : False : False : Reals
@@ -224,58 +224,58 @@
4 Constraint Declarations
diffeq1 : Size=51, Index=t, Active=True
- Key : Lower : Body : Upper : Active
- 0.0 : 0.0 : domegadt[0.0] + 0.25*omega[0.0] + 5.0*sin( theta[0.0] ) : 0.0 : True
- 0.114208 : 0.0 : domegadt[0.114208] + 0.25*omega[0.114208] + 5*sin( theta[0.114208] ) : 0.0 : True
- 0.553686 : 0.0 : domegadt[0.553686] + 0.25*omega[0.553686] + 5*sin( theta[0.553686] ) : 0.0 : True
- 1.167181 : 0.0 : domegadt[1.167181] + 0.25*omega[1.167181] + 5*sin( theta[1.167181] ) : 0.0 : True
- 1.72048 : 0.0 : domegadt[1.72048] + 0.25*omega[1.72048] + 5*sin( theta[1.72048] ) : 0.0 : True
- 2.0 : 0.0 : domegadt[2.0] + 0.25*omega[2.0] + 5*sin( theta[2.0] ) : 0.0 : True
- 2.114208 : 0.0 : domegadt[2.114208] + 0.25*omega[2.114208] + 5*sin( theta[2.114208] ) : 0.0 : True
- 2.553686 : 0.0 : domegadt[2.553686] + 0.25*omega[2.553686] + 5*sin( theta[2.553686] ) : 0.0 : True
- 3.167181 : 0.0 : domegadt[3.167181] + 0.25*omega[3.167181] + 5*sin( theta[3.167181] ) : 0.0 : True
- 3.72048 : 0.0 : domegadt[3.72048] + 0.25*omega[3.72048] + 5*sin( theta[3.72048] ) : 0.0 : True
- 4.0 : 0.0 : domegadt[4.0] + 0.25*omega[4.0] + 5*sin( theta[4.0] ) : 0.0 : True
- 4.114208 : 0.0 : domegadt[4.114208] + 0.25*omega[4.114208] + 5*sin( theta[4.114208] ) : 0.0 : True
- 4.553686 : 0.0 : domegadt[4.553686] + 0.25*omega[4.553686] + 5*sin( theta[4.553686] ) : 0.0 : True
- 5.167181 : 0.0 : domegadt[5.167181] + 0.25*omega[5.167181] + 5*sin( theta[5.167181] ) : 0.0 : True
- 5.72048 : 0.0 : domegadt[5.72048] + 0.25*omega[5.72048] + 5*sin( theta[5.72048] ) : 0.0 : True
- 6.0 : 0.0 : domegadt[6.0] + 0.25*omega[6.0] + 5*sin( theta[6.0] ) : 0.0 : True
- 6.114208 : 0.0 : domegadt[6.114208] + 0.25*omega[6.114208] + 5*sin( theta[6.114208] ) : 0.0 : True
- 6.553686 : 0.0 : domegadt[6.553686] + 0.25*omega[6.553686] + 5*sin( theta[6.553686] ) : 0.0 : True
- 7.167181 : 0.0 : domegadt[7.167181] + 0.25*omega[7.167181] + 50*sin( theta[7.167181] ) : 0.0 : True
- 7.72048 : 0.0 : domegadt[7.72048] + 0.25*omega[7.72048] + 50*sin( theta[7.72048] ) : 0.0 : True
- 8.0 : 0.0 : domegadt[8.0] + 0.25*omega[8.0] + 50*sin( theta[8.0] ) : 0.0 : True
- 8.114208 : 0.0 : domegadt[8.114208] + 0.25*omega[8.114208] + 50*sin( theta[8.114208] ) : 0.0 : True
- 8.553686 : 0.0 : domegadt[8.553686] + 0.25*omega[8.553686] + 50*sin( theta[8.553686] ) : 0.0 : True
- 9.167181 : 0.0 : domegadt[9.167181] + 0.25*omega[9.167181] + 50*sin( theta[9.167181] ) : 0.0 : True
- 9.72048 : 0.0 : domegadt[9.72048] + 0.25*omega[9.72048] + 50*sin( theta[9.72048] ) : 0.0 : True
- 10.0 : 0.0 : domegadt[10.0] + 0.25*omega[10.0] + 50*sin( theta[10.0] ) : 0.0 : True
- 10.114208 : 0.0 : domegadt[10.114208] + 0.25*omega[10.114208] + 50*sin( theta[10.114208] ) : 0.0 : True
- 10.553686 : 0.0 : domegadt[10.553686] + 0.25*omega[10.553686] + 50*sin( theta[10.553686] ) : 0.0 : True
- 11.167181 : 0.0 : domegadt[11.167181] + 0.25*omega[11.167181] + 50*sin( theta[11.167181] ) : 0.0 : True
- 11.72048 : 0.0 : domegadt[11.72048] + 0.25*omega[11.72048] + 50*sin( theta[11.72048] ) : 0.0 : True
- 12.0 : 0.0 : domegadt[12.0] + 0.25*omega[12.0] + 50*sin( theta[12.0] ) : 0.0 : True
- 12.114208 : 0.0 : domegadt[12.114208] + 0.25*omega[12.114208] + 50*sin( theta[12.114208] ) : 0.0 : True
- 12.553686 : 0.0 : domegadt[12.553686] + 0.25*omega[12.553686] + 50*sin( theta[12.553686] ) : 0.0 : True
- 13.167181 : 0.0 : domegadt[13.167181] + 0.25*omega[13.167181] + 50*sin( theta[13.167181] ) : 0.0 : True
- 13.72048 : 0.0 : domegadt[13.72048] + 0.25*omega[13.72048] + 50*sin( theta[13.72048] ) : 0.0 : True
- 14.0 : 0.0 : domegadt[14.0] + 0.25*omega[14.0] + 50*sin( theta[14.0] ) : 0.0 : True
- 14.114208 : 0.0 : domegadt[14.114208] + 0.25*omega[14.114208] + 50*sin( theta[14.114208] ) : 0.0 : True
- 14.553686 : 0.0 : domegadt[14.553686] + 0.25*omega[14.553686] + 50*sin( theta[14.553686] ) : 0.0 : True
- 15.167181 : 0.0 : domegadt[15.167181] + 0.025*omega[15.167181] + 50*sin( theta[15.167181] ) : 0.0 : True
- 15.72048 : 0.0 : domegadt[15.72048] + 0.025*omega[15.72048] + 50*sin( theta[15.72048] ) : 0.0 : True
- 16.0 : 0.0 : domegadt[16.0] + 0.025*omega[16.0] + 50*sin( theta[16.0] ) : 0.0 : True
- 16.114208 : 0.0 : domegadt[16.114208] + 0.025*omega[16.114208] + 50*sin( theta[16.114208] ) : 0.0 : True
- 16.553686 : 0.0 : domegadt[16.553686] + 0.025*omega[16.553686] + 50*sin( theta[16.553686] ) : 0.0 : True
- 17.167181 : 0.0 : domegadt[17.167181] + 0.025*omega[17.167181] + 50*sin( theta[17.167181] ) : 0.0 : True
- 17.72048 : 0.0 : domegadt[17.72048] + 0.025*omega[17.72048] + 50*sin( theta[17.72048] ) : 0.0 : True
- 18.0 : 0.0 : domegadt[18.0] + 0.025*omega[18.0] + 50*sin( theta[18.0] ) : 0.0 : True
- 18.114208 : 0.0 : domegadt[18.114208] + 0.025*omega[18.114208] + 50*sin( theta[18.114208] ) : 0.0 : True
- 18.553686 : 0.0 : domegadt[18.553686] + 0.025*omega[18.553686] + 50*sin( theta[18.553686] ) : 0.0 : True
- 19.167181 : 0.0 : domegadt[19.167181] + 0.025*omega[19.167181] + 50*sin( theta[19.167181] ) : 0.0 : True
- 19.72048 : 0.0 : domegadt[19.72048] + 0.025*omega[19.72048] + 50*sin( theta[19.72048] ) : 0.0 : True
- 20.0 : 0.0 : domegadt[20.0] + 0.25*omega[20.0] + 5.0*sin( theta[20.0] ) : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 0.0 : 0.0 : domegadt[0.0] + 0.25*omega[0.0] + 5.0*sin(theta[0.0]) : 0.0 : True
+ 0.114208 : 0.0 : domegadt[0.114208] + 0.25*omega[0.114208] + 5*sin(theta[0.114208]) : 0.0 : True
+ 0.553686 : 0.0 : domegadt[0.553686] + 0.25*omega[0.553686] + 5*sin(theta[0.553686]) : 0.0 : True
+ 1.167181 : 0.0 : domegadt[1.167181] + 0.25*omega[1.167181] + 5*sin(theta[1.167181]) : 0.0 : True
+ 1.72048 : 0.0 : domegadt[1.72048] + 0.25*omega[1.72048] + 5*sin(theta[1.72048]) : 0.0 : True
+ 2.0 : 0.0 : domegadt[2.0] + 0.25*omega[2.0] + 5*sin(theta[2.0]) : 0.0 : True
+ 2.114208 : 0.0 : domegadt[2.114208] + 0.25*omega[2.114208] + 5*sin(theta[2.114208]) : 0.0 : True
+ 2.553686 : 0.0 : domegadt[2.553686] + 0.25*omega[2.553686] + 5*sin(theta[2.553686]) : 0.0 : True
+ 3.167181 : 0.0 : domegadt[3.167181] + 0.25*omega[3.167181] + 5*sin(theta[3.167181]) : 0.0 : True
+ 3.72048 : 0.0 : domegadt[3.72048] + 0.25*omega[3.72048] + 5*sin(theta[3.72048]) : 0.0 : True
+ 4.0 : 0.0 : domegadt[4.0] + 0.25*omega[4.0] + 5*sin(theta[4.0]) : 0.0 : True
+ 4.114208 : 0.0 : domegadt[4.114208] + 0.25*omega[4.114208] + 5*sin(theta[4.114208]) : 0.0 : True
+ 4.553686 : 0.0 : domegadt[4.553686] + 0.25*omega[4.553686] + 5*sin(theta[4.553686]) : 0.0 : True
+ 5.167181 : 0.0 : domegadt[5.167181] + 0.25*omega[5.167181] + 5*sin(theta[5.167181]) : 0.0 : True
+ 5.72048 : 0.0 : domegadt[5.72048] + 0.25*omega[5.72048] + 5*sin(theta[5.72048]) : 0.0 : True
+ 6.0 : 0.0 : domegadt[6.0] + 0.25*omega[6.0] + 5*sin(theta[6.0]) : 0.0 : True
+ 6.114208 : 0.0 : domegadt[6.114208] + 0.25*omega[6.114208] + 5*sin(theta[6.114208]) : 0.0 : True
+ 6.553686 : 0.0 : domegadt[6.553686] + 0.25*omega[6.553686] + 5*sin(theta[6.553686]) : 0.0 : True
+ 7.167181 : 0.0 : domegadt[7.167181] + 0.25*omega[7.167181] + 50*sin(theta[7.167181]) : 0.0 : True
+ 7.72048 : 0.0 : domegadt[7.72048] + 0.25*omega[7.72048] + 50*sin(theta[7.72048]) : 0.0 : True
+ 8.0 : 0.0 : domegadt[8.0] + 0.25*omega[8.0] + 50*sin(theta[8.0]) : 0.0 : True
+ 8.114208 : 0.0 : domegadt[8.114208] + 0.25*omega[8.114208] + 50*sin(theta[8.114208]) : 0.0 : True
+ 8.553686 : 0.0 : domegadt[8.553686] + 0.25*omega[8.553686] + 50*sin(theta[8.553686]) : 0.0 : True
+ 9.167181 : 0.0 : domegadt[9.167181] + 0.25*omega[9.167181] + 50*sin(theta[9.167181]) : 0.0 : True
+ 9.72048 : 0.0 : domegadt[9.72048] + 0.25*omega[9.72048] + 50*sin(theta[9.72048]) : 0.0 : True
+ 10.0 : 0.0 : domegadt[10.0] + 0.25*omega[10.0] + 50*sin(theta[10.0]) : 0.0 : True
+ 10.114208 : 0.0 : domegadt[10.114208] + 0.25*omega[10.114208] + 50*sin(theta[10.114208]) : 0.0 : True
+ 10.553686 : 0.0 : domegadt[10.553686] + 0.25*omega[10.553686] + 50*sin(theta[10.553686]) : 0.0 : True
+ 11.167181 : 0.0 : domegadt[11.167181] + 0.25*omega[11.167181] + 50*sin(theta[11.167181]) : 0.0 : True
+ 11.72048 : 0.0 : domegadt[11.72048] + 0.25*omega[11.72048] + 50*sin(theta[11.72048]) : 0.0 : True
+ 12.0 : 0.0 : domegadt[12.0] + 0.25*omega[12.0] + 50*sin(theta[12.0]) : 0.0 : True
+ 12.114208 : 0.0 : domegadt[12.114208] + 0.25*omega[12.114208] + 50*sin(theta[12.114208]) : 0.0 : True
+ 12.553686 : 0.0 : domegadt[12.553686] + 0.25*omega[12.553686] + 50*sin(theta[12.553686]) : 0.0 : True
+ 13.167181 : 0.0 : domegadt[13.167181] + 0.25*omega[13.167181] + 50*sin(theta[13.167181]) : 0.0 : True
+ 13.72048 : 0.0 : domegadt[13.72048] + 0.25*omega[13.72048] + 50*sin(theta[13.72048]) : 0.0 : True
+ 14.0 : 0.0 : domegadt[14.0] + 0.25*omega[14.0] + 50*sin(theta[14.0]) : 0.0 : True
+ 14.114208 : 0.0 : domegadt[14.114208] + 0.25*omega[14.114208] + 50*sin(theta[14.114208]) : 0.0 : True
+ 14.553686 : 0.0 : domegadt[14.553686] + 0.25*omega[14.553686] + 50*sin(theta[14.553686]) : 0.0 : True
+ 15.167181 : 0.0 : domegadt[15.167181] + 0.025*omega[15.167181] + 50*sin(theta[15.167181]) : 0.0 : True
+ 15.72048 : 0.0 : domegadt[15.72048] + 0.025*omega[15.72048] + 50*sin(theta[15.72048]) : 0.0 : True
+ 16.0 : 0.0 : domegadt[16.0] + 0.025*omega[16.0] + 50*sin(theta[16.0]) : 0.0 : True
+ 16.114208 : 0.0 : domegadt[16.114208] + 0.025*omega[16.114208] + 50*sin(theta[16.114208]) : 0.0 : True
+ 16.553686 : 0.0 : domegadt[16.553686] + 0.025*omega[16.553686] + 50*sin(theta[16.553686]) : 0.0 : True
+ 17.167181 : 0.0 : domegadt[17.167181] + 0.025*omega[17.167181] + 50*sin(theta[17.167181]) : 0.0 : True
+ 17.72048 : 0.0 : domegadt[17.72048] + 0.025*omega[17.72048] + 50*sin(theta[17.72048]) : 0.0 : True
+ 18.0 : 0.0 : domegadt[18.0] + 0.025*omega[18.0] + 50*sin(theta[18.0]) : 0.0 : True
+ 18.114208 : 0.0 : domegadt[18.114208] + 0.025*omega[18.114208] + 50*sin(theta[18.114208]) : 0.0 : True
+ 18.553686 : 0.0 : domegadt[18.553686] + 0.025*omega[18.553686] + 50*sin(theta[18.553686]) : 0.0 : True
+ 19.167181 : 0.0 : domegadt[19.167181] + 0.025*omega[19.167181] + 50*sin(theta[19.167181]) : 0.0 : True
+ 19.72048 : 0.0 : domegadt[19.72048] + 0.025*omega[19.72048] + 50*sin(theta[19.72048]) : 0.0 : True
+ 20.0 : 0.0 : domegadt[20.0] + 0.25*omega[20.0] + 5.0*sin(theta[20.0]) : 0.0 : True
diffeq2 : Size=51, Index=t, Active=True
Key : Lower : Body : Upper : Active
0.0 : 0.0 : dthetadt[0.0] - omega[0.0] : 0.0 : True
@@ -330,113 +330,113 @@
19.72048 : 0.0 : dthetadt[19.72048] - omega[19.72048] : 0.0 : True
20.0 : 0.0 : dthetadt[20.0] - omega[20.0] : 0.0 : True
domegadt_disc_eq : Size=50, Index=t, Active=True
- Key : Lower : Body : Upper : Active
- 0.114208 : 0.0 : domegadt[0.114208] + 5.5193396206*omega[0.0] - 4.37796198897*omega[0.114208] - 1.44597130769*omega[0.553686] + 0.4375931981*omega[1.167181] - 0.19985260397*omega[1.72048] + 0.0668530819246*omega[2.0] : 0.0 : True
- 0.553686 : 0.0 : domegadt[0.553686] - 1.79153426125*omega[0.0] + 3.58069036007*omega[0.114208] - 0.903038862042*omega[0.553686] - 1.18189858803*omega[1.167181] + 0.432950390142*omega[1.72048] - 0.137169038888*omega[2.0] : 0.0 : True
- 1.167181 : 0.0 : domegadt[1.167181] + 1.17208577895*omega[0.0] - 2.06108262312*omega[0.114208] + 2.24800856291*omega[0.553686] - 0.428382622699*omega[1.167181] - 1.25916047461*omega[1.72048] + 0.328531378567*omega[2.0] : 0.0 : True
- 1.72048 : 0.0 : domegadt[1.72048] - 1.1413177501*omega[0.0] + 1.93933160986*omega[0.114208] - 1.69657595903*omega[0.553686] + 2.5941704532*omega[1.167181] - 0.29061652629*omega[1.72048] - 1.40499182764*omega[2.0] : 0.0 : True
- 2.0 : 0.0 : domegadt[2.0] + 2.5*omega[0.0] - 4.2062121118*omega[0.114208] + 3.48512805833*omega[0.553686] - 4.38855710208*omega[1.167181] + 9.10964115554*omega[1.72048] - 6.5*omega[2.0] : 0.0 : True
- 2.114208 : 0.0 : domegadt[2.114208] + 5.5193396206*omega[2.0] - 4.37796198897*omega[2.114208] - 1.44597130769*omega[2.553686] + 0.4375931981*omega[3.167181] - 0.19985260397*omega[3.72048] + 0.0668530819246*omega[4.0] : 0.0 : True
- 2.553686 : 0.0 : domegadt[2.553686] - 1.79153426125*omega[2.0] + 3.58069036007*omega[2.114208] - 0.903038862042*omega[2.553686] - 1.18189858803*omega[3.167181] + 0.432950390142*omega[3.72048] - 0.137169038888*omega[4.0] : 0.0 : True
- 3.167181 : 0.0 : domegadt[3.167181] + 1.17208577895*omega[2.0] - 2.06108262312*omega[2.114208] + 2.24800856291*omega[2.553686] - 0.428382622699*omega[3.167181] - 1.25916047461*omega[3.72048] + 0.328531378567*omega[4.0] : 0.0 : True
- 3.72048 : 0.0 : domegadt[3.72048] - 1.1413177501*omega[2.0] + 1.93933160986*omega[2.114208] - 1.69657595903*omega[2.553686] + 2.5941704532*omega[3.167181] - 0.29061652629*omega[3.72048] - 1.40499182764*omega[4.0] : 0.0 : True
- 4.0 : 0.0 : domegadt[4.0] + 2.5*omega[2.0] - 4.2062121118*omega[2.114208] + 3.48512805833*omega[2.553686] - 4.38855710208*omega[3.167181] + 9.10964115554*omega[3.72048] - 6.5*omega[4.0] : 0.0 : True
- 4.114208 : 0.0 : domegadt[4.114208] + 5.5193396206*omega[4.0] - 4.37796198897*omega[4.114208] - 1.44597130769*omega[4.553686] + 0.4375931981*omega[5.167181] - 0.19985260397*omega[5.72048] + 0.0668530819246*omega[6.0] : 0.0 : True
- 4.553686 : 0.0 : domegadt[4.553686] - 1.79153426125*omega[4.0] + 3.58069036007*omega[4.114208] - 0.903038862042*omega[4.553686] - 1.18189858803*omega[5.167181] + 0.432950390142*omega[5.72048] - 0.137169038888*omega[6.0] : 0.0 : True
- 5.167181 : 0.0 : domegadt[5.167181] + 1.17208577895*omega[4.0] - 2.06108262312*omega[4.114208] + 2.24800856291*omega[4.553686] - 0.428382622699*omega[5.167181] - 1.25916047461*omega[5.72048] + 0.328531378567*omega[6.0] : 0.0 : True
- 5.72048 : 0.0 : domegadt[5.72048] - 1.1413177501*omega[4.0] + 1.93933160986*omega[4.114208] - 1.69657595903*omega[4.553686] + 2.5941704532*omega[5.167181] - 0.29061652629*omega[5.72048] - 1.40499182764*omega[6.0] : 0.0 : True
- 6.0 : 0.0 : domegadt[6.0] + 2.5*omega[4.0] - 4.2062121118*omega[4.114208] + 3.48512805833*omega[4.553686] - 4.38855710208*omega[5.167181] + 9.10964115554*omega[5.72048] - 6.5*omega[6.0] : 0.0 : True
- 6.114208 : 0.0 : domegadt[6.114208] + 5.5193396206*omega[6.0] - 4.37796198897*omega[6.114208] - 1.44597130769*omega[6.553686] + 0.4375931981*omega[7.167181] - 0.19985260397*omega[7.72048] + 0.0668530819246*omega[8.0] : 0.0 : True
- 6.553686 : 0.0 : domegadt[6.553686] - 1.79153426125*omega[6.0] + 3.58069036007*omega[6.114208] - 0.903038862042*omega[6.553686] - 1.18189858803*omega[7.167181] + 0.432950390142*omega[7.72048] - 0.137169038888*omega[8.0] : 0.0 : True
- 7.167181 : 0.0 : domegadt[7.167181] + 1.17208577895*omega[6.0] - 2.06108262312*omega[6.114208] + 2.24800856291*omega[6.553686] - 0.428382622699*omega[7.167181] - 1.25916047461*omega[7.72048] + 0.328531378567*omega[8.0] : 0.0 : True
- 7.72048 : 0.0 : domegadt[7.72048] - 1.1413177501*omega[6.0] + 1.93933160986*omega[6.114208] - 1.69657595903*omega[6.553686] + 2.5941704532*omega[7.167181] - 0.29061652629*omega[7.72048] - 1.40499182764*omega[8.0] : 0.0 : True
- 8.0 : 0.0 : domegadt[8.0] + 2.5*omega[6.0] - 4.2062121118*omega[6.114208] + 3.48512805833*omega[6.553686] - 4.38855710208*omega[7.167181] + 9.10964115554*omega[7.72048] - 6.5*omega[8.0] : 0.0 : True
- 8.114208 : 0.0 : domegadt[8.114208] + 5.5193396206*omega[8.0] - 4.37796198897*omega[8.114208] - 1.44597130769*omega[8.553686] + 0.4375931981*omega[9.167181] - 0.19985260397*omega[9.72048] + 0.0668530819246*omega[10.0] : 0.0 : True
- 8.553686 : 0.0 : domegadt[8.553686] - 1.79153426125*omega[8.0] + 3.58069036007*omega[8.114208] - 0.903038862042*omega[8.553686] - 1.18189858803*omega[9.167181] + 0.432950390142*omega[9.72048] - 0.137169038888*omega[10.0] : 0.0 : True
- 9.167181 : 0.0 : domegadt[9.167181] + 1.17208577895*omega[8.0] - 2.06108262312*omega[8.114208] + 2.24800856291*omega[8.553686] - 0.428382622699*omega[9.167181] - 1.25916047461*omega[9.72048] + 0.328531378567*omega[10.0] : 0.0 : True
- 9.72048 : 0.0 : domegadt[9.72048] - 1.1413177501*omega[8.0] + 1.93933160986*omega[8.114208] - 1.69657595903*omega[8.553686] + 2.5941704532*omega[9.167181] - 0.29061652629*omega[9.72048] - 1.40499182764*omega[10.0] : 0.0 : True
- 10.0 : 0.0 : domegadt[10.0] + 2.5*omega[8.0] - 4.2062121118*omega[8.114208] + 3.48512805833*omega[8.553686] - 4.38855710208*omega[9.167181] + 9.10964115554*omega[9.72048] - 6.5*omega[10.0] : 0.0 : True
- 10.114208 : 0.0 : domegadt[10.114208] + 5.5193396206*omega[10.0] - 4.37796198897*omega[10.114208] - 1.44597130769*omega[10.553686] + 0.4375931981*omega[11.167181] - 0.19985260397*omega[11.72048] + 0.0668530819246*omega[12.0] : 0.0 : True
- 10.553686 : 0.0 : domegadt[10.553686] - 1.79153426125*omega[10.0] + 3.58069036007*omega[10.114208] - 0.903038862042*omega[10.553686] - 1.18189858803*omega[11.167181] + 0.432950390142*omega[11.72048] - 0.137169038888*omega[12.0] : 0.0 : True
- 11.167181 : 0.0 : domegadt[11.167181] + 1.17208577895*omega[10.0] - 2.06108262312*omega[10.114208] + 2.24800856291*omega[10.553686] - 0.428382622699*omega[11.167181] - 1.25916047461*omega[11.72048] + 0.328531378567*omega[12.0] : 0.0 : True
- 11.72048 : 0.0 : domegadt[11.72048] - 1.1413177501*omega[10.0] + 1.93933160986*omega[10.114208] - 1.69657595903*omega[10.553686] + 2.5941704532*omega[11.167181] - 0.29061652629*omega[11.72048] - 1.40499182764*omega[12.0] : 0.0 : True
- 12.0 : 0.0 : domegadt[12.0] + 2.5*omega[10.0] - 4.2062121118*omega[10.114208] + 3.48512805833*omega[10.553686] - 4.38855710208*omega[11.167181] + 9.10964115554*omega[11.72048] - 6.5*omega[12.0] : 0.0 : True
- 12.114208 : 0.0 : domegadt[12.114208] + 5.5193396206*omega[12.0] - 4.37796198897*omega[12.114208] - 1.44597130769*omega[12.553686] + 0.4375931981*omega[13.167181] - 0.19985260397*omega[13.72048] + 0.0668530819246*omega[14.0] : 0.0 : True
- 12.553686 : 0.0 : domegadt[12.553686] - 1.79153426125*omega[12.0] + 3.58069036007*omega[12.114208] - 0.903038862042*omega[12.553686] - 1.18189858803*omega[13.167181] + 0.432950390142*omega[13.72048] - 0.137169038888*omega[14.0] : 0.0 : True
- 13.167181 : 0.0 : domegadt[13.167181] + 1.17208577895*omega[12.0] - 2.06108262312*omega[12.114208] + 2.24800856291*omega[12.553686] - 0.428382622699*omega[13.167181] - 1.25916047461*omega[13.72048] + 0.328531378567*omega[14.0] : 0.0 : True
- 13.72048 : 0.0 : domegadt[13.72048] - 1.1413177501*omega[12.0] + 1.93933160986*omega[12.114208] - 1.69657595903*omega[12.553686] + 2.5941704532*omega[13.167181] - 0.29061652629*omega[13.72048] - 1.40499182764*omega[14.0] : 0.0 : True
- 14.0 : 0.0 : domegadt[14.0] + 2.5*omega[12.0] - 4.2062121118*omega[12.114208] + 3.48512805833*omega[12.553686] - 4.38855710208*omega[13.167181] + 9.10964115554*omega[13.72048] - 6.5*omega[14.0] : 0.0 : True
- 14.114208 : 0.0 : domegadt[14.114208] + 5.5193396206*omega[14.0] - 4.37796198897*omega[14.114208] - 1.44597130769*omega[14.553686] + 0.4375931981*omega[15.167181] - 0.19985260397*omega[15.72048] + 0.0668530819246*omega[16.0] : 0.0 : True
- 14.553686 : 0.0 : domegadt[14.553686] - 1.79153426125*omega[14.0] + 3.58069036007*omega[14.114208] - 0.903038862042*omega[14.553686] - 1.18189858803*omega[15.167181] + 0.432950390142*omega[15.72048] - 0.137169038888*omega[16.0] : 0.0 : True
- 15.167181 : 0.0 : domegadt[15.167181] + 1.17208577895*omega[14.0] - 2.06108262312*omega[14.114208] + 2.24800856291*omega[14.553686] - 0.428382622699*omega[15.167181] - 1.25916047461*omega[15.72048] + 0.328531378567*omega[16.0] : 0.0 : True
- 15.72048 : 0.0 : domegadt[15.72048] - 1.1413177501*omega[14.0] + 1.93933160986*omega[14.114208] - 1.69657595903*omega[14.553686] + 2.5941704532*omega[15.167181] - 0.29061652629*omega[15.72048] - 1.40499182764*omega[16.0] : 0.0 : True
- 16.0 : 0.0 : domegadt[16.0] + 2.5*omega[14.0] - 4.2062121118*omega[14.114208] + 3.48512805833*omega[14.553686] - 4.38855710208*omega[15.167181] + 9.10964115554*omega[15.72048] - 6.5*omega[16.0] : 0.0 : True
- 16.114208 : 0.0 : domegadt[16.114208] + 5.5193396206*omega[16.0] - 4.37796198897*omega[16.114208] - 1.44597130769*omega[16.553686] + 0.4375931981*omega[17.167181] - 0.19985260397*omega[17.72048] + 0.0668530819246*omega[18.0] : 0.0 : True
- 16.553686 : 0.0 : domegadt[16.553686] - 1.79153426125*omega[16.0] + 3.58069036007*omega[16.114208] - 0.903038862042*omega[16.553686] - 1.18189858803*omega[17.167181] + 0.432950390142*omega[17.72048] - 0.137169038888*omega[18.0] : 0.0 : True
- 17.167181 : 0.0 : domegadt[17.167181] + 1.17208577895*omega[16.0] - 2.06108262312*omega[16.114208] + 2.24800856291*omega[16.553686] - 0.428382622699*omega[17.167181] - 1.25916047461*omega[17.72048] + 0.328531378567*omega[18.0] : 0.0 : True
- 17.72048 : 0.0 : domegadt[17.72048] - 1.1413177501*omega[16.0] + 1.93933160986*omega[16.114208] - 1.69657595903*omega[16.553686] + 2.5941704532*omega[17.167181] - 0.29061652629*omega[17.72048] - 1.40499182764*omega[18.0] : 0.0 : True
- 18.0 : 0.0 : domegadt[18.0] + 2.5*omega[16.0] - 4.2062121118*omega[16.114208] + 3.48512805833*omega[16.553686] - 4.38855710208*omega[17.167181] + 9.10964115554*omega[17.72048] - 6.5*omega[18.0] : 0.0 : True
- 18.114208 : 0.0 : domegadt[18.114208] + 5.5193396206*omega[18.0] - 4.37796198897*omega[18.114208] - 1.44597130769*omega[18.553686] + 0.4375931981*omega[19.167181] - 0.19985260397*omega[19.72048] + 0.0668530819246*omega[20.0] : 0.0 : True
- 18.553686 : 0.0 : domegadt[18.553686] - 1.79153426125*omega[18.0] + 3.58069036007*omega[18.114208] - 0.903038862042*omega[18.553686] - 1.18189858803*omega[19.167181] + 0.432950390142*omega[19.72048] - 0.137169038888*omega[20.0] : 0.0 : True
- 19.167181 : 0.0 : domegadt[19.167181] + 1.17208577895*omega[18.0] - 2.06108262312*omega[18.114208] + 2.24800856291*omega[18.553686] - 0.428382622699*omega[19.167181] - 1.25916047461*omega[19.72048] + 0.328531378567*omega[20.0] : 0.0 : True
- 19.72048 : 0.0 : domegadt[19.72048] - 1.1413177501*omega[18.0] + 1.93933160986*omega[18.114208] - 1.69657595903*omega[18.553686] + 2.5941704532*omega[19.167181] - 0.29061652629*omega[19.72048] - 1.40499182764*omega[20.0] : 0.0 : True
- 20.0 : 0.0 : domegadt[20.0] + 2.5*omega[18.0] - 4.2062121118*omega[18.114208] + 3.48512805833*omega[18.553686] - 4.38855710208*omega[19.167181] + 9.10964115554*omega[19.72048] - 6.5*omega[20.0] : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 0.114208 : 0.0 : domegadt[0.114208] + 5.519339620604476*omega[0.0] - 4.377961988969178*omega[0.114208] - 1.4459713076900629*omega[0.553686] + 0.437593198100135*omega[1.167181] - 0.19985260396998084*omega[1.72048] + 0.06685308192460761*omega[2.0] : 0.0 : True
+ 0.553686 : 0.0 : domegadt[0.553686] - 1.7915342612505238*omega[0.0] + 3.5806903600726603*omega[0.114208] - 0.9030388620417913*omega[0.553686] - 1.1818985880343118*omega[1.167181] + 0.43295039014156045*omega[1.72048] - 0.137169038887596*omega[2.0] : 0.0 : True
+ 1.167181 : 0.0 : domegadt[1.167181] + 1.1720857789519332*omega[0.0] - 2.061082623121699*omega[0.114208] + 2.2480085629067506*omega[0.553686] - 0.4283826226986418*omega[1.167181] - 1.2591604746055074*omega[1.72048] + 0.3285313785671775*omega[2.0] : 0.0 : True
+ 1.72048 : 0.0 : domegadt[1.72048] - 1.141317750102841*omega[0.0] + 1.9393316098620392*omega[0.114208] - 1.6965759590324723*omega[0.553686] + 2.5941704532035765*omega[1.167181] - 0.2906165262903779*omega[1.72048] - 1.4049918276398599*omega[2.0] : 0.0 : True
+ 2.0 : 0.0 : domegadt[2.0] + 2.4999999999999947*omega[0.0] - 4.206212111797173*omega[0.114208] + 3.4851280583284003*omega[0.553686] - 4.388557102075248*omega[1.167181] + 9.109641155544018*omega[1.72048] - 6.49999999999999*omega[2.0] : 0.0 : True
+ 2.114208 : 0.0 : domegadt[2.114208] + 5.519339620604476*omega[2.0] - 4.377961988969178*omega[2.114208] - 1.4459713076900629*omega[2.553686] + 0.437593198100135*omega[3.167181] - 0.19985260396998084*omega[3.72048] + 0.06685308192460761*omega[4.0] : 0.0 : True
+ 2.553686 : 0.0 : domegadt[2.553686] - 1.7915342612505238*omega[2.0] + 3.5806903600726603*omega[2.114208] - 0.9030388620417913*omega[2.553686] - 1.1818985880343118*omega[3.167181] + 0.43295039014156045*omega[3.72048] - 0.137169038887596*omega[4.0] : 0.0 : True
+ 3.167181 : 0.0 : domegadt[3.167181] + 1.1720857789519332*omega[2.0] - 2.061082623121699*omega[2.114208] + 2.2480085629067506*omega[2.553686] - 0.4283826226986418*omega[3.167181] - 1.2591604746055074*omega[3.72048] + 0.3285313785671775*omega[4.0] : 0.0 : True
+ 3.72048 : 0.0 : domegadt[3.72048] - 1.141317750102841*omega[2.0] + 1.9393316098620392*omega[2.114208] - 1.6965759590324723*omega[2.553686] + 2.5941704532035765*omega[3.167181] - 0.2906165262903779*omega[3.72048] - 1.4049918276398599*omega[4.0] : 0.0 : True
+ 4.0 : 0.0 : domegadt[4.0] + 2.4999999999999947*omega[2.0] - 4.206212111797173*omega[2.114208] + 3.4851280583284003*omega[2.553686] - 4.388557102075248*omega[3.167181] + 9.109641155544018*omega[3.72048] - 6.49999999999999*omega[4.0] : 0.0 : True
+ 4.114208 : 0.0 : domegadt[4.114208] + 5.519339620604476*omega[4.0] - 4.377961988969178*omega[4.114208] - 1.4459713076900629*omega[4.553686] + 0.437593198100135*omega[5.167181] - 0.19985260396998084*omega[5.72048] + 0.06685308192460761*omega[6.0] : 0.0 : True
+ 4.553686 : 0.0 : domegadt[4.553686] - 1.7915342612505238*omega[4.0] + 3.5806903600726603*omega[4.114208] - 0.9030388620417913*omega[4.553686] - 1.1818985880343118*omega[5.167181] + 0.43295039014156045*omega[5.72048] - 0.137169038887596*omega[6.0] : 0.0 : True
+ 5.167181 : 0.0 : domegadt[5.167181] + 1.1720857789519332*omega[4.0] - 2.061082623121699*omega[4.114208] + 2.2480085629067506*omega[4.553686] - 0.4283826226986418*omega[5.167181] - 1.2591604746055074*omega[5.72048] + 0.3285313785671775*omega[6.0] : 0.0 : True
+ 5.72048 : 0.0 : domegadt[5.72048] - 1.141317750102841*omega[4.0] + 1.9393316098620392*omega[4.114208] - 1.6965759590324723*omega[4.553686] + 2.5941704532035765*omega[5.167181] - 0.2906165262903779*omega[5.72048] - 1.4049918276398599*omega[6.0] : 0.0 : True
+ 6.0 : 0.0 : domegadt[6.0] + 2.4999999999999947*omega[4.0] - 4.206212111797173*omega[4.114208] + 3.4851280583284003*omega[4.553686] - 4.388557102075248*omega[5.167181] + 9.109641155544018*omega[5.72048] - 6.49999999999999*omega[6.0] : 0.0 : True
+ 6.114208 : 0.0 : domegadt[6.114208] + 5.519339620604476*omega[6.0] - 4.377961988969178*omega[6.114208] - 1.4459713076900629*omega[6.553686] + 0.437593198100135*omega[7.167181] - 0.19985260396998084*omega[7.72048] + 0.06685308192460761*omega[8.0] : 0.0 : True
+ 6.553686 : 0.0 : domegadt[6.553686] - 1.7915342612505238*omega[6.0] + 3.5806903600726603*omega[6.114208] - 0.9030388620417913*omega[6.553686] - 1.1818985880343118*omega[7.167181] + 0.43295039014156045*omega[7.72048] - 0.137169038887596*omega[8.0] : 0.0 : True
+ 7.167181 : 0.0 : domegadt[7.167181] + 1.1720857789519332*omega[6.0] - 2.061082623121699*omega[6.114208] + 2.2480085629067506*omega[6.553686] - 0.4283826226986418*omega[7.167181] - 1.2591604746055074*omega[7.72048] + 0.3285313785671775*omega[8.0] : 0.0 : True
+ 7.72048 : 0.0 : domegadt[7.72048] - 1.141317750102841*omega[6.0] + 1.9393316098620392*omega[6.114208] - 1.6965759590324723*omega[6.553686] + 2.5941704532035765*omega[7.167181] - 0.2906165262903779*omega[7.72048] - 1.4049918276398599*omega[8.0] : 0.0 : True
+ 8.0 : 0.0 : domegadt[8.0] + 2.4999999999999947*omega[6.0] - 4.206212111797173*omega[6.114208] + 3.4851280583284003*omega[6.553686] - 4.388557102075248*omega[7.167181] + 9.109641155544018*omega[7.72048] - 6.49999999999999*omega[8.0] : 0.0 : True
+ 8.114208 : 0.0 : domegadt[8.114208] + 5.519339620604476*omega[8.0] - 4.377961988969178*omega[8.114208] - 1.4459713076900629*omega[8.553686] + 0.437593198100135*omega[9.167181] - 0.19985260396998084*omega[9.72048] + 0.06685308192460761*omega[10.0] : 0.0 : True
+ 8.553686 : 0.0 : domegadt[8.553686] - 1.7915342612505238*omega[8.0] + 3.5806903600726603*omega[8.114208] - 0.9030388620417913*omega[8.553686] - 1.1818985880343118*omega[9.167181] + 0.43295039014156045*omega[9.72048] - 0.137169038887596*omega[10.0] : 0.0 : True
+ 9.167181 : 0.0 : domegadt[9.167181] + 1.1720857789519332*omega[8.0] - 2.061082623121699*omega[8.114208] + 2.2480085629067506*omega[8.553686] - 0.4283826226986418*omega[9.167181] - 1.2591604746055074*omega[9.72048] + 0.3285313785671775*omega[10.0] : 0.0 : True
+ 9.72048 : 0.0 : domegadt[9.72048] - 1.141317750102841*omega[8.0] + 1.9393316098620392*omega[8.114208] - 1.6965759590324723*omega[8.553686] + 2.5941704532035765*omega[9.167181] - 0.2906165262903779*omega[9.72048] - 1.4049918276398599*omega[10.0] : 0.0 : True
+ 10.0 : 0.0 : domegadt[10.0] + 2.4999999999999947*omega[8.0] - 4.206212111797173*omega[8.114208] + 3.4851280583284003*omega[8.553686] - 4.388557102075248*omega[9.167181] + 9.109641155544018*omega[9.72048] - 6.49999999999999*omega[10.0] : 0.0 : True
+ 10.114208 : 0.0 : domegadt[10.114208] + 5.519339620604476*omega[10.0] - 4.377961988969178*omega[10.114208] - 1.4459713076900629*omega[10.553686] + 0.437593198100135*omega[11.167181] - 0.19985260396998084*omega[11.72048] + 0.06685308192460761*omega[12.0] : 0.0 : True
+ 10.553686 : 0.0 : domegadt[10.553686] - 1.7915342612505238*omega[10.0] + 3.5806903600726603*omega[10.114208] - 0.9030388620417913*omega[10.553686] - 1.1818985880343118*omega[11.167181] + 0.43295039014156045*omega[11.72048] - 0.137169038887596*omega[12.0] : 0.0 : True
+ 11.167181 : 0.0 : domegadt[11.167181] + 1.1720857789519332*omega[10.0] - 2.061082623121699*omega[10.114208] + 2.2480085629067506*omega[10.553686] - 0.4283826226986418*omega[11.167181] - 1.2591604746055074*omega[11.72048] + 0.3285313785671775*omega[12.0] : 0.0 : True
+ 11.72048 : 0.0 : domegadt[11.72048] - 1.141317750102841*omega[10.0] + 1.9393316098620392*omega[10.114208] - 1.6965759590324723*omega[10.553686] + 2.5941704532035765*omega[11.167181] - 0.2906165262903779*omega[11.72048] - 1.4049918276398599*omega[12.0] : 0.0 : True
+ 12.0 : 0.0 : domegadt[12.0] + 2.4999999999999947*omega[10.0] - 4.206212111797173*omega[10.114208] + 3.4851280583284003*omega[10.553686] - 4.388557102075248*omega[11.167181] + 9.109641155544018*omega[11.72048] - 6.49999999999999*omega[12.0] : 0.0 : True
+ 12.114208 : 0.0 : domegadt[12.114208] + 5.519339620604476*omega[12.0] - 4.377961988969178*omega[12.114208] - 1.4459713076900629*omega[12.553686] + 0.437593198100135*omega[13.167181] - 0.19985260396998084*omega[13.72048] + 0.06685308192460761*omega[14.0] : 0.0 : True
+ 12.553686 : 0.0 : domegadt[12.553686] - 1.7915342612505238*omega[12.0] + 3.5806903600726603*omega[12.114208] - 0.9030388620417913*omega[12.553686] - 1.1818985880343118*omega[13.167181] + 0.43295039014156045*omega[13.72048] - 0.137169038887596*omega[14.0] : 0.0 : True
+ 13.167181 : 0.0 : domegadt[13.167181] + 1.1720857789519332*omega[12.0] - 2.061082623121699*omega[12.114208] + 2.2480085629067506*omega[12.553686] - 0.4283826226986418*omega[13.167181] - 1.2591604746055074*omega[13.72048] + 0.3285313785671775*omega[14.0] : 0.0 : True
+ 13.72048 : 0.0 : domegadt[13.72048] - 1.141317750102841*omega[12.0] + 1.9393316098620392*omega[12.114208] - 1.6965759590324723*omega[12.553686] + 2.5941704532035765*omega[13.167181] - 0.2906165262903779*omega[13.72048] - 1.4049918276398599*omega[14.0] : 0.0 : True
+ 14.0 : 0.0 : domegadt[14.0] + 2.4999999999999947*omega[12.0] - 4.206212111797173*omega[12.114208] + 3.4851280583284003*omega[12.553686] - 4.388557102075248*omega[13.167181] + 9.109641155544018*omega[13.72048] - 6.49999999999999*omega[14.0] : 0.0 : True
+ 14.114208 : 0.0 : domegadt[14.114208] + 5.519339620604476*omega[14.0] - 4.377961988969178*omega[14.114208] - 1.4459713076900629*omega[14.553686] + 0.437593198100135*omega[15.167181] - 0.19985260396998084*omega[15.72048] + 0.06685308192460761*omega[16.0] : 0.0 : True
+ 14.553686 : 0.0 : domegadt[14.553686] - 1.7915342612505238*omega[14.0] + 3.5806903600726603*omega[14.114208] - 0.9030388620417913*omega[14.553686] - 1.1818985880343118*omega[15.167181] + 0.43295039014156045*omega[15.72048] - 0.137169038887596*omega[16.0] : 0.0 : True
+ 15.167181 : 0.0 : domegadt[15.167181] + 1.1720857789519332*omega[14.0] - 2.061082623121699*omega[14.114208] + 2.2480085629067506*omega[14.553686] - 0.4283826226986418*omega[15.167181] - 1.2591604746055074*omega[15.72048] + 0.3285313785671775*omega[16.0] : 0.0 : True
+ 15.72048 : 0.0 : domegadt[15.72048] - 1.141317750102841*omega[14.0] + 1.9393316098620392*omega[14.114208] - 1.6965759590324723*omega[14.553686] + 2.5941704532035765*omega[15.167181] - 0.2906165262903779*omega[15.72048] - 1.4049918276398599*omega[16.0] : 0.0 : True
+ 16.0 : 0.0 : domegadt[16.0] + 2.4999999999999947*omega[14.0] - 4.206212111797173*omega[14.114208] + 3.4851280583284003*omega[14.553686] - 4.388557102075248*omega[15.167181] + 9.109641155544018*omega[15.72048] - 6.49999999999999*omega[16.0] : 0.0 : True
+ 16.114208 : 0.0 : domegadt[16.114208] + 5.519339620604476*omega[16.0] - 4.377961988969178*omega[16.114208] - 1.4459713076900629*omega[16.553686] + 0.437593198100135*omega[17.167181] - 0.19985260396998084*omega[17.72048] + 0.06685308192460761*omega[18.0] : 0.0 : True
+ 16.553686 : 0.0 : domegadt[16.553686] - 1.7915342612505238*omega[16.0] + 3.5806903600726603*omega[16.114208] - 0.9030388620417913*omega[16.553686] - 1.1818985880343118*omega[17.167181] + 0.43295039014156045*omega[17.72048] - 0.137169038887596*omega[18.0] : 0.0 : True
+ 17.167181 : 0.0 : domegadt[17.167181] + 1.1720857789519332*omega[16.0] - 2.061082623121699*omega[16.114208] + 2.2480085629067506*omega[16.553686] - 0.4283826226986418*omega[17.167181] - 1.2591604746055074*omega[17.72048] + 0.3285313785671775*omega[18.0] : 0.0 : True
+ 17.72048 : 0.0 : domegadt[17.72048] - 1.141317750102841*omega[16.0] + 1.9393316098620392*omega[16.114208] - 1.6965759590324723*omega[16.553686] + 2.5941704532035765*omega[17.167181] - 0.2906165262903779*omega[17.72048] - 1.4049918276398599*omega[18.0] : 0.0 : True
+ 18.0 : 0.0 : domegadt[18.0] + 2.4999999999999947*omega[16.0] - 4.206212111797173*omega[16.114208] + 3.4851280583284003*omega[16.553686] - 4.388557102075248*omega[17.167181] + 9.109641155544018*omega[17.72048] - 6.49999999999999*omega[18.0] : 0.0 : True
+ 18.114208 : 0.0 : domegadt[18.114208] + 5.519339620604476*omega[18.0] - 4.377961988969178*omega[18.114208] - 1.4459713076900629*omega[18.553686] + 0.437593198100135*omega[19.167181] - 0.19985260396998084*omega[19.72048] + 0.06685308192460761*omega[20.0] : 0.0 : True
+ 18.553686 : 0.0 : domegadt[18.553686] - 1.7915342612505238*omega[18.0] + 3.5806903600726603*omega[18.114208] - 0.9030388620417913*omega[18.553686] - 1.1818985880343118*omega[19.167181] + 0.43295039014156045*omega[19.72048] - 0.137169038887596*omega[20.0] : 0.0 : True
+ 19.167181 : 0.0 : domegadt[19.167181] + 1.1720857789519332*omega[18.0] - 2.061082623121699*omega[18.114208] + 2.2480085629067506*omega[18.553686] - 0.4283826226986418*omega[19.167181] - 1.2591604746055074*omega[19.72048] + 0.3285313785671775*omega[20.0] : 0.0 : True
+ 19.72048 : 0.0 : domegadt[19.72048] - 1.141317750102841*omega[18.0] + 1.9393316098620392*omega[18.114208] - 1.6965759590324723*omega[18.553686] + 2.5941704532035765*omega[19.167181] - 0.2906165262903779*omega[19.72048] - 1.4049918276398599*omega[20.0] : 0.0 : True
+ 20.0 : 0.0 : domegadt[20.0] + 2.4999999999999947*omega[18.0] - 4.206212111797173*omega[18.114208] + 3.4851280583284003*omega[18.553686] - 4.388557102075248*omega[19.167181] + 9.109641155544018*omega[19.72048] - 6.49999999999999*omega[20.0] : 0.0 : True
dthetadt_disc_eq : Size=50, Index=t, Active=True
- Key : Lower : Body : Upper : Active
- 0.114208 : 0.0 : dthetadt[0.114208] + 5.5193396206*theta[0.0] - 4.37796198897*theta[0.114208] - 1.44597130769*theta[0.553686] + 0.4375931981*theta[1.167181] - 0.19985260397*theta[1.72048] + 0.0668530819246*theta[2.0] : 0.0 : True
- 0.553686 : 0.0 : dthetadt[0.553686] - 1.79153426125*theta[0.0] + 3.58069036007*theta[0.114208] - 0.903038862042*theta[0.553686] - 1.18189858803*theta[1.167181] + 0.432950390142*theta[1.72048] - 0.137169038888*theta[2.0] : 0.0 : True
- 1.167181 : 0.0 : dthetadt[1.167181] + 1.17208577895*theta[0.0] - 2.06108262312*theta[0.114208] + 2.24800856291*theta[0.553686] - 0.428382622699*theta[1.167181] - 1.25916047461*theta[1.72048] + 0.328531378567*theta[2.0] : 0.0 : True
- 1.72048 : 0.0 : dthetadt[1.72048] - 1.1413177501*theta[0.0] + 1.93933160986*theta[0.114208] - 1.69657595903*theta[0.553686] + 2.5941704532*theta[1.167181] - 0.29061652629*theta[1.72048] - 1.40499182764*theta[2.0] : 0.0 : True
- 2.0 : 0.0 : dthetadt[2.0] + 2.5*theta[0.0] - 4.2062121118*theta[0.114208] + 3.48512805833*theta[0.553686] - 4.38855710208*theta[1.167181] + 9.10964115554*theta[1.72048] - 6.5*theta[2.0] : 0.0 : True
- 2.114208 : 0.0 : dthetadt[2.114208] + 5.5193396206*theta[2.0] - 4.37796198897*theta[2.114208] - 1.44597130769*theta[2.553686] + 0.4375931981*theta[3.167181] - 0.19985260397*theta[3.72048] + 0.0668530819246*theta[4.0] : 0.0 : True
- 2.553686 : 0.0 : dthetadt[2.553686] - 1.79153426125*theta[2.0] + 3.58069036007*theta[2.114208] - 0.903038862042*theta[2.553686] - 1.18189858803*theta[3.167181] + 0.432950390142*theta[3.72048] - 0.137169038888*theta[4.0] : 0.0 : True
- 3.167181 : 0.0 : dthetadt[3.167181] + 1.17208577895*theta[2.0] - 2.06108262312*theta[2.114208] + 2.24800856291*theta[2.553686] - 0.428382622699*theta[3.167181] - 1.25916047461*theta[3.72048] + 0.328531378567*theta[4.0] : 0.0 : True
- 3.72048 : 0.0 : dthetadt[3.72048] - 1.1413177501*theta[2.0] + 1.93933160986*theta[2.114208] - 1.69657595903*theta[2.553686] + 2.5941704532*theta[3.167181] - 0.29061652629*theta[3.72048] - 1.40499182764*theta[4.0] : 0.0 : True
- 4.0 : 0.0 : dthetadt[4.0] + 2.5*theta[2.0] - 4.2062121118*theta[2.114208] + 3.48512805833*theta[2.553686] - 4.38855710208*theta[3.167181] + 9.10964115554*theta[3.72048] - 6.5*theta[4.0] : 0.0 : True
- 4.114208 : 0.0 : dthetadt[4.114208] + 5.5193396206*theta[4.0] - 4.37796198897*theta[4.114208] - 1.44597130769*theta[4.553686] + 0.4375931981*theta[5.167181] - 0.19985260397*theta[5.72048] + 0.0668530819246*theta[6.0] : 0.0 : True
- 4.553686 : 0.0 : dthetadt[4.553686] - 1.79153426125*theta[4.0] + 3.58069036007*theta[4.114208] - 0.903038862042*theta[4.553686] - 1.18189858803*theta[5.167181] + 0.432950390142*theta[5.72048] - 0.137169038888*theta[6.0] : 0.0 : True
- 5.167181 : 0.0 : dthetadt[5.167181] + 1.17208577895*theta[4.0] - 2.06108262312*theta[4.114208] + 2.24800856291*theta[4.553686] - 0.428382622699*theta[5.167181] - 1.25916047461*theta[5.72048] + 0.328531378567*theta[6.0] : 0.0 : True
- 5.72048 : 0.0 : dthetadt[5.72048] - 1.1413177501*theta[4.0] + 1.93933160986*theta[4.114208] - 1.69657595903*theta[4.553686] + 2.5941704532*theta[5.167181] - 0.29061652629*theta[5.72048] - 1.40499182764*theta[6.0] : 0.0 : True
- 6.0 : 0.0 : dthetadt[6.0] + 2.5*theta[4.0] - 4.2062121118*theta[4.114208] + 3.48512805833*theta[4.553686] - 4.38855710208*theta[5.167181] + 9.10964115554*theta[5.72048] - 6.5*theta[6.0] : 0.0 : True
- 6.114208 : 0.0 : dthetadt[6.114208] + 5.5193396206*theta[6.0] - 4.37796198897*theta[6.114208] - 1.44597130769*theta[6.553686] + 0.4375931981*theta[7.167181] - 0.19985260397*theta[7.72048] + 0.0668530819246*theta[8.0] : 0.0 : True
- 6.553686 : 0.0 : dthetadt[6.553686] - 1.79153426125*theta[6.0] + 3.58069036007*theta[6.114208] - 0.903038862042*theta[6.553686] - 1.18189858803*theta[7.167181] + 0.432950390142*theta[7.72048] - 0.137169038888*theta[8.0] : 0.0 : True
- 7.167181 : 0.0 : dthetadt[7.167181] + 1.17208577895*theta[6.0] - 2.06108262312*theta[6.114208] + 2.24800856291*theta[6.553686] - 0.428382622699*theta[7.167181] - 1.25916047461*theta[7.72048] + 0.328531378567*theta[8.0] : 0.0 : True
- 7.72048 : 0.0 : dthetadt[7.72048] - 1.1413177501*theta[6.0] + 1.93933160986*theta[6.114208] - 1.69657595903*theta[6.553686] + 2.5941704532*theta[7.167181] - 0.29061652629*theta[7.72048] - 1.40499182764*theta[8.0] : 0.0 : True
- 8.0 : 0.0 : dthetadt[8.0] + 2.5*theta[6.0] - 4.2062121118*theta[6.114208] + 3.48512805833*theta[6.553686] - 4.38855710208*theta[7.167181] + 9.10964115554*theta[7.72048] - 6.5*theta[8.0] : 0.0 : True
- 8.114208 : 0.0 : dthetadt[8.114208] + 5.5193396206*theta[8.0] - 4.37796198897*theta[8.114208] - 1.44597130769*theta[8.553686] + 0.4375931981*theta[9.167181] - 0.19985260397*theta[9.72048] + 0.0668530819246*theta[10.0] : 0.0 : True
- 8.553686 : 0.0 : dthetadt[8.553686] - 1.79153426125*theta[8.0] + 3.58069036007*theta[8.114208] - 0.903038862042*theta[8.553686] - 1.18189858803*theta[9.167181] + 0.432950390142*theta[9.72048] - 0.137169038888*theta[10.0] : 0.0 : True
- 9.167181 : 0.0 : dthetadt[9.167181] + 1.17208577895*theta[8.0] - 2.06108262312*theta[8.114208] + 2.24800856291*theta[8.553686] - 0.428382622699*theta[9.167181] - 1.25916047461*theta[9.72048] + 0.328531378567*theta[10.0] : 0.0 : True
- 9.72048 : 0.0 : dthetadt[9.72048] - 1.1413177501*theta[8.0] + 1.93933160986*theta[8.114208] - 1.69657595903*theta[8.553686] + 2.5941704532*theta[9.167181] - 0.29061652629*theta[9.72048] - 1.40499182764*theta[10.0] : 0.0 : True
- 10.0 : 0.0 : dthetadt[10.0] + 2.5*theta[8.0] - 4.2062121118*theta[8.114208] + 3.48512805833*theta[8.553686] - 4.38855710208*theta[9.167181] + 9.10964115554*theta[9.72048] - 6.5*theta[10.0] : 0.0 : True
- 10.114208 : 0.0 : dthetadt[10.114208] + 5.5193396206*theta[10.0] - 4.37796198897*theta[10.114208] - 1.44597130769*theta[10.553686] + 0.4375931981*theta[11.167181] - 0.19985260397*theta[11.72048] + 0.0668530819246*theta[12.0] : 0.0 : True
- 10.553686 : 0.0 : dthetadt[10.553686] - 1.79153426125*theta[10.0] + 3.58069036007*theta[10.114208] - 0.903038862042*theta[10.553686] - 1.18189858803*theta[11.167181] + 0.432950390142*theta[11.72048] - 0.137169038888*theta[12.0] : 0.0 : True
- 11.167181 : 0.0 : dthetadt[11.167181] + 1.17208577895*theta[10.0] - 2.06108262312*theta[10.114208] + 2.24800856291*theta[10.553686] - 0.428382622699*theta[11.167181] - 1.25916047461*theta[11.72048] + 0.328531378567*theta[12.0] : 0.0 : True
- 11.72048 : 0.0 : dthetadt[11.72048] - 1.1413177501*theta[10.0] + 1.93933160986*theta[10.114208] - 1.69657595903*theta[10.553686] + 2.5941704532*theta[11.167181] - 0.29061652629*theta[11.72048] - 1.40499182764*theta[12.0] : 0.0 : True
- 12.0 : 0.0 : dthetadt[12.0] + 2.5*theta[10.0] - 4.2062121118*theta[10.114208] + 3.48512805833*theta[10.553686] - 4.38855710208*theta[11.167181] + 9.10964115554*theta[11.72048] - 6.5*theta[12.0] : 0.0 : True
- 12.114208 : 0.0 : dthetadt[12.114208] + 5.5193396206*theta[12.0] - 4.37796198897*theta[12.114208] - 1.44597130769*theta[12.553686] + 0.4375931981*theta[13.167181] - 0.19985260397*theta[13.72048] + 0.0668530819246*theta[14.0] : 0.0 : True
- 12.553686 : 0.0 : dthetadt[12.553686] - 1.79153426125*theta[12.0] + 3.58069036007*theta[12.114208] - 0.903038862042*theta[12.553686] - 1.18189858803*theta[13.167181] + 0.432950390142*theta[13.72048] - 0.137169038888*theta[14.0] : 0.0 : True
- 13.167181 : 0.0 : dthetadt[13.167181] + 1.17208577895*theta[12.0] - 2.06108262312*theta[12.114208] + 2.24800856291*theta[12.553686] - 0.428382622699*theta[13.167181] - 1.25916047461*theta[13.72048] + 0.328531378567*theta[14.0] : 0.0 : True
- 13.72048 : 0.0 : dthetadt[13.72048] - 1.1413177501*theta[12.0] + 1.93933160986*theta[12.114208] - 1.69657595903*theta[12.553686] + 2.5941704532*theta[13.167181] - 0.29061652629*theta[13.72048] - 1.40499182764*theta[14.0] : 0.0 : True
- 14.0 : 0.0 : dthetadt[14.0] + 2.5*theta[12.0] - 4.2062121118*theta[12.114208] + 3.48512805833*theta[12.553686] - 4.38855710208*theta[13.167181] + 9.10964115554*theta[13.72048] - 6.5*theta[14.0] : 0.0 : True
- 14.114208 : 0.0 : dthetadt[14.114208] + 5.5193396206*theta[14.0] - 4.37796198897*theta[14.114208] - 1.44597130769*theta[14.553686] + 0.4375931981*theta[15.167181] - 0.19985260397*theta[15.72048] + 0.0668530819246*theta[16.0] : 0.0 : True
- 14.553686 : 0.0 : dthetadt[14.553686] - 1.79153426125*theta[14.0] + 3.58069036007*theta[14.114208] - 0.903038862042*theta[14.553686] - 1.18189858803*theta[15.167181] + 0.432950390142*theta[15.72048] - 0.137169038888*theta[16.0] : 0.0 : True
- 15.167181 : 0.0 : dthetadt[15.167181] + 1.17208577895*theta[14.0] - 2.06108262312*theta[14.114208] + 2.24800856291*theta[14.553686] - 0.428382622699*theta[15.167181] - 1.25916047461*theta[15.72048] + 0.328531378567*theta[16.0] : 0.0 : True
- 15.72048 : 0.0 : dthetadt[15.72048] - 1.1413177501*theta[14.0] + 1.93933160986*theta[14.114208] - 1.69657595903*theta[14.553686] + 2.5941704532*theta[15.167181] - 0.29061652629*theta[15.72048] - 1.40499182764*theta[16.0] : 0.0 : True
- 16.0 : 0.0 : dthetadt[16.0] + 2.5*theta[14.0] - 4.2062121118*theta[14.114208] + 3.48512805833*theta[14.553686] - 4.38855710208*theta[15.167181] + 9.10964115554*theta[15.72048] - 6.5*theta[16.0] : 0.0 : True
- 16.114208 : 0.0 : dthetadt[16.114208] + 5.5193396206*theta[16.0] - 4.37796198897*theta[16.114208] - 1.44597130769*theta[16.553686] + 0.4375931981*theta[17.167181] - 0.19985260397*theta[17.72048] + 0.0668530819246*theta[18.0] : 0.0 : True
- 16.553686 : 0.0 : dthetadt[16.553686] - 1.79153426125*theta[16.0] + 3.58069036007*theta[16.114208] - 0.903038862042*theta[16.553686] - 1.18189858803*theta[17.167181] + 0.432950390142*theta[17.72048] - 0.137169038888*theta[18.0] : 0.0 : True
- 17.167181 : 0.0 : dthetadt[17.167181] + 1.17208577895*theta[16.0] - 2.06108262312*theta[16.114208] + 2.24800856291*theta[16.553686] - 0.428382622699*theta[17.167181] - 1.25916047461*theta[17.72048] + 0.328531378567*theta[18.0] : 0.0 : True
- 17.72048 : 0.0 : dthetadt[17.72048] - 1.1413177501*theta[16.0] + 1.93933160986*theta[16.114208] - 1.69657595903*theta[16.553686] + 2.5941704532*theta[17.167181] - 0.29061652629*theta[17.72048] - 1.40499182764*theta[18.0] : 0.0 : True
- 18.0 : 0.0 : dthetadt[18.0] + 2.5*theta[16.0] - 4.2062121118*theta[16.114208] + 3.48512805833*theta[16.553686] - 4.38855710208*theta[17.167181] + 9.10964115554*theta[17.72048] - 6.5*theta[18.0] : 0.0 : True
- 18.114208 : 0.0 : dthetadt[18.114208] + 5.5193396206*theta[18.0] - 4.37796198897*theta[18.114208] - 1.44597130769*theta[18.553686] + 0.4375931981*theta[19.167181] - 0.19985260397*theta[19.72048] + 0.0668530819246*theta[20.0] : 0.0 : True
- 18.553686 : 0.0 : dthetadt[18.553686] - 1.79153426125*theta[18.0] + 3.58069036007*theta[18.114208] - 0.903038862042*theta[18.553686] - 1.18189858803*theta[19.167181] + 0.432950390142*theta[19.72048] - 0.137169038888*theta[20.0] : 0.0 : True
- 19.167181 : 0.0 : dthetadt[19.167181] + 1.17208577895*theta[18.0] - 2.06108262312*theta[18.114208] + 2.24800856291*theta[18.553686] - 0.428382622699*theta[19.167181] - 1.25916047461*theta[19.72048] + 0.328531378567*theta[20.0] : 0.0 : True
- 19.72048 : 0.0 : dthetadt[19.72048] - 1.1413177501*theta[18.0] + 1.93933160986*theta[18.114208] - 1.69657595903*theta[18.553686] + 2.5941704532*theta[19.167181] - 0.29061652629*theta[19.72048] - 1.40499182764*theta[20.0] : 0.0 : True
- 20.0 : 0.0 : dthetadt[20.0] + 2.5*theta[18.0] - 4.2062121118*theta[18.114208] + 3.48512805833*theta[18.553686] - 4.38855710208*theta[19.167181] + 9.10964115554*theta[19.72048] - 6.5*theta[20.0] : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 0.114208 : 0.0 : dthetadt[0.114208] + 5.519339620604476*theta[0.0] - 4.377961988969178*theta[0.114208] - 1.4459713076900629*theta[0.553686] + 0.437593198100135*theta[1.167181] - 0.19985260396998084*theta[1.72048] + 0.06685308192460761*theta[2.0] : 0.0 : True
+ 0.553686 : 0.0 : dthetadt[0.553686] - 1.7915342612505238*theta[0.0] + 3.5806903600726603*theta[0.114208] - 0.9030388620417913*theta[0.553686] - 1.1818985880343118*theta[1.167181] + 0.43295039014156045*theta[1.72048] - 0.137169038887596*theta[2.0] : 0.0 : True
+ 1.167181 : 0.0 : dthetadt[1.167181] + 1.1720857789519332*theta[0.0] - 2.061082623121699*theta[0.114208] + 2.2480085629067506*theta[0.553686] - 0.4283826226986418*theta[1.167181] - 1.2591604746055074*theta[1.72048] + 0.3285313785671775*theta[2.0] : 0.0 : True
+ 1.72048 : 0.0 : dthetadt[1.72048] - 1.141317750102841*theta[0.0] + 1.9393316098620392*theta[0.114208] - 1.6965759590324723*theta[0.553686] + 2.5941704532035765*theta[1.167181] - 0.2906165262903779*theta[1.72048] - 1.4049918276398599*theta[2.0] : 0.0 : True
+ 2.0 : 0.0 : dthetadt[2.0] + 2.4999999999999947*theta[0.0] - 4.206212111797173*theta[0.114208] + 3.4851280583284003*theta[0.553686] - 4.388557102075248*theta[1.167181] + 9.109641155544018*theta[1.72048] - 6.49999999999999*theta[2.0] : 0.0 : True
+ 2.114208 : 0.0 : dthetadt[2.114208] + 5.519339620604476*theta[2.0] - 4.377961988969178*theta[2.114208] - 1.4459713076900629*theta[2.553686] + 0.437593198100135*theta[3.167181] - 0.19985260396998084*theta[3.72048] + 0.06685308192460761*theta[4.0] : 0.0 : True
+ 2.553686 : 0.0 : dthetadt[2.553686] - 1.7915342612505238*theta[2.0] + 3.5806903600726603*theta[2.114208] - 0.9030388620417913*theta[2.553686] - 1.1818985880343118*theta[3.167181] + 0.43295039014156045*theta[3.72048] - 0.137169038887596*theta[4.0] : 0.0 : True
+ 3.167181 : 0.0 : dthetadt[3.167181] + 1.1720857789519332*theta[2.0] - 2.061082623121699*theta[2.114208] + 2.2480085629067506*theta[2.553686] - 0.4283826226986418*theta[3.167181] - 1.2591604746055074*theta[3.72048] + 0.3285313785671775*theta[4.0] : 0.0 : True
+ 3.72048 : 0.0 : dthetadt[3.72048] - 1.141317750102841*theta[2.0] + 1.9393316098620392*theta[2.114208] - 1.6965759590324723*theta[2.553686] + 2.5941704532035765*theta[3.167181] - 0.2906165262903779*theta[3.72048] - 1.4049918276398599*theta[4.0] : 0.0 : True
+ 4.0 : 0.0 : dthetadt[4.0] + 2.4999999999999947*theta[2.0] - 4.206212111797173*theta[2.114208] + 3.4851280583284003*theta[2.553686] - 4.388557102075248*theta[3.167181] + 9.109641155544018*theta[3.72048] - 6.49999999999999*theta[4.0] : 0.0 : True
+ 4.114208 : 0.0 : dthetadt[4.114208] + 5.519339620604476*theta[4.0] - 4.377961988969178*theta[4.114208] - 1.4459713076900629*theta[4.553686] + 0.437593198100135*theta[5.167181] - 0.19985260396998084*theta[5.72048] + 0.06685308192460761*theta[6.0] : 0.0 : True
+ 4.553686 : 0.0 : dthetadt[4.553686] - 1.7915342612505238*theta[4.0] + 3.5806903600726603*theta[4.114208] - 0.9030388620417913*theta[4.553686] - 1.1818985880343118*theta[5.167181] + 0.43295039014156045*theta[5.72048] - 0.137169038887596*theta[6.0] : 0.0 : True
+ 5.167181 : 0.0 : dthetadt[5.167181] + 1.1720857789519332*theta[4.0] - 2.061082623121699*theta[4.114208] + 2.2480085629067506*theta[4.553686] - 0.4283826226986418*theta[5.167181] - 1.2591604746055074*theta[5.72048] + 0.3285313785671775*theta[6.0] : 0.0 : True
+ 5.72048 : 0.0 : dthetadt[5.72048] - 1.141317750102841*theta[4.0] + 1.9393316098620392*theta[4.114208] - 1.6965759590324723*theta[4.553686] + 2.5941704532035765*theta[5.167181] - 0.2906165262903779*theta[5.72048] - 1.4049918276398599*theta[6.0] : 0.0 : True
+ 6.0 : 0.0 : dthetadt[6.0] + 2.4999999999999947*theta[4.0] - 4.206212111797173*theta[4.114208] + 3.4851280583284003*theta[4.553686] - 4.388557102075248*theta[5.167181] + 9.109641155544018*theta[5.72048] - 6.49999999999999*theta[6.0] : 0.0 : True
+ 6.114208 : 0.0 : dthetadt[6.114208] + 5.519339620604476*theta[6.0] - 4.377961988969178*theta[6.114208] - 1.4459713076900629*theta[6.553686] + 0.437593198100135*theta[7.167181] - 0.19985260396998084*theta[7.72048] + 0.06685308192460761*theta[8.0] : 0.0 : True
+ 6.553686 : 0.0 : dthetadt[6.553686] - 1.7915342612505238*theta[6.0] + 3.5806903600726603*theta[6.114208] - 0.9030388620417913*theta[6.553686] - 1.1818985880343118*theta[7.167181] + 0.43295039014156045*theta[7.72048] - 0.137169038887596*theta[8.0] : 0.0 : True
+ 7.167181 : 0.0 : dthetadt[7.167181] + 1.1720857789519332*theta[6.0] - 2.061082623121699*theta[6.114208] + 2.2480085629067506*theta[6.553686] - 0.4283826226986418*theta[7.167181] - 1.2591604746055074*theta[7.72048] + 0.3285313785671775*theta[8.0] : 0.0 : True
+ 7.72048 : 0.0 : dthetadt[7.72048] - 1.141317750102841*theta[6.0] + 1.9393316098620392*theta[6.114208] - 1.6965759590324723*theta[6.553686] + 2.5941704532035765*theta[7.167181] - 0.2906165262903779*theta[7.72048] - 1.4049918276398599*theta[8.0] : 0.0 : True
+ 8.0 : 0.0 : dthetadt[8.0] + 2.4999999999999947*theta[6.0] - 4.206212111797173*theta[6.114208] + 3.4851280583284003*theta[6.553686] - 4.388557102075248*theta[7.167181] + 9.109641155544018*theta[7.72048] - 6.49999999999999*theta[8.0] : 0.0 : True
+ 8.114208 : 0.0 : dthetadt[8.114208] + 5.519339620604476*theta[8.0] - 4.377961988969178*theta[8.114208] - 1.4459713076900629*theta[8.553686] + 0.437593198100135*theta[9.167181] - 0.19985260396998084*theta[9.72048] + 0.06685308192460761*theta[10.0] : 0.0 : True
+ 8.553686 : 0.0 : dthetadt[8.553686] - 1.7915342612505238*theta[8.0] + 3.5806903600726603*theta[8.114208] - 0.9030388620417913*theta[8.553686] - 1.1818985880343118*theta[9.167181] + 0.43295039014156045*theta[9.72048] - 0.137169038887596*theta[10.0] : 0.0 : True
+ 9.167181 : 0.0 : dthetadt[9.167181] + 1.1720857789519332*theta[8.0] - 2.061082623121699*theta[8.114208] + 2.2480085629067506*theta[8.553686] - 0.4283826226986418*theta[9.167181] - 1.2591604746055074*theta[9.72048] + 0.3285313785671775*theta[10.0] : 0.0 : True
+ 9.72048 : 0.0 : dthetadt[9.72048] - 1.141317750102841*theta[8.0] + 1.9393316098620392*theta[8.114208] - 1.6965759590324723*theta[8.553686] + 2.5941704532035765*theta[9.167181] - 0.2906165262903779*theta[9.72048] - 1.4049918276398599*theta[10.0] : 0.0 : True
+ 10.0 : 0.0 : dthetadt[10.0] + 2.4999999999999947*theta[8.0] - 4.206212111797173*theta[8.114208] + 3.4851280583284003*theta[8.553686] - 4.388557102075248*theta[9.167181] + 9.109641155544018*theta[9.72048] - 6.49999999999999*theta[10.0] : 0.0 : True
+ 10.114208 : 0.0 : dthetadt[10.114208] + 5.519339620604476*theta[10.0] - 4.377961988969178*theta[10.114208] - 1.4459713076900629*theta[10.553686] + 0.437593198100135*theta[11.167181] - 0.19985260396998084*theta[11.72048] + 0.06685308192460761*theta[12.0] : 0.0 : True
+ 10.553686 : 0.0 : dthetadt[10.553686] - 1.7915342612505238*theta[10.0] + 3.5806903600726603*theta[10.114208] - 0.9030388620417913*theta[10.553686] - 1.1818985880343118*theta[11.167181] + 0.43295039014156045*theta[11.72048] - 0.137169038887596*theta[12.0] : 0.0 : True
+ 11.167181 : 0.0 : dthetadt[11.167181] + 1.1720857789519332*theta[10.0] - 2.061082623121699*theta[10.114208] + 2.2480085629067506*theta[10.553686] - 0.4283826226986418*theta[11.167181] - 1.2591604746055074*theta[11.72048] + 0.3285313785671775*theta[12.0] : 0.0 : True
+ 11.72048 : 0.0 : dthetadt[11.72048] - 1.141317750102841*theta[10.0] + 1.9393316098620392*theta[10.114208] - 1.6965759590324723*theta[10.553686] + 2.5941704532035765*theta[11.167181] - 0.2906165262903779*theta[11.72048] - 1.4049918276398599*theta[12.0] : 0.0 : True
+ 12.0 : 0.0 : dthetadt[12.0] + 2.4999999999999947*theta[10.0] - 4.206212111797173*theta[10.114208] + 3.4851280583284003*theta[10.553686] - 4.388557102075248*theta[11.167181] + 9.109641155544018*theta[11.72048] - 6.49999999999999*theta[12.0] : 0.0 : True
+ 12.114208 : 0.0 : dthetadt[12.114208] + 5.519339620604476*theta[12.0] - 4.377961988969178*theta[12.114208] - 1.4459713076900629*theta[12.553686] + 0.437593198100135*theta[13.167181] - 0.19985260396998084*theta[13.72048] + 0.06685308192460761*theta[14.0] : 0.0 : True
+ 12.553686 : 0.0 : dthetadt[12.553686] - 1.7915342612505238*theta[12.0] + 3.5806903600726603*theta[12.114208] - 0.9030388620417913*theta[12.553686] - 1.1818985880343118*theta[13.167181] + 0.43295039014156045*theta[13.72048] - 0.137169038887596*theta[14.0] : 0.0 : True
+ 13.167181 : 0.0 : dthetadt[13.167181] + 1.1720857789519332*theta[12.0] - 2.061082623121699*theta[12.114208] + 2.2480085629067506*theta[12.553686] - 0.4283826226986418*theta[13.167181] - 1.2591604746055074*theta[13.72048] + 0.3285313785671775*theta[14.0] : 0.0 : True
+ 13.72048 : 0.0 : dthetadt[13.72048] - 1.141317750102841*theta[12.0] + 1.9393316098620392*theta[12.114208] - 1.6965759590324723*theta[12.553686] + 2.5941704532035765*theta[13.167181] - 0.2906165262903779*theta[13.72048] - 1.4049918276398599*theta[14.0] : 0.0 : True
+ 14.0 : 0.0 : dthetadt[14.0] + 2.4999999999999947*theta[12.0] - 4.206212111797173*theta[12.114208] + 3.4851280583284003*theta[12.553686] - 4.388557102075248*theta[13.167181] + 9.109641155544018*theta[13.72048] - 6.49999999999999*theta[14.0] : 0.0 : True
+ 14.114208 : 0.0 : dthetadt[14.114208] + 5.519339620604476*theta[14.0] - 4.377961988969178*theta[14.114208] - 1.4459713076900629*theta[14.553686] + 0.437593198100135*theta[15.167181] - 0.19985260396998084*theta[15.72048] + 0.06685308192460761*theta[16.0] : 0.0 : True
+ 14.553686 : 0.0 : dthetadt[14.553686] - 1.7915342612505238*theta[14.0] + 3.5806903600726603*theta[14.114208] - 0.9030388620417913*theta[14.553686] - 1.1818985880343118*theta[15.167181] + 0.43295039014156045*theta[15.72048] - 0.137169038887596*theta[16.0] : 0.0 : True
+ 15.167181 : 0.0 : dthetadt[15.167181] + 1.1720857789519332*theta[14.0] - 2.061082623121699*theta[14.114208] + 2.2480085629067506*theta[14.553686] - 0.4283826226986418*theta[15.167181] - 1.2591604746055074*theta[15.72048] + 0.3285313785671775*theta[16.0] : 0.0 : True
+ 15.72048 : 0.0 : dthetadt[15.72048] - 1.141317750102841*theta[14.0] + 1.9393316098620392*theta[14.114208] - 1.6965759590324723*theta[14.553686] + 2.5941704532035765*theta[15.167181] - 0.2906165262903779*theta[15.72048] - 1.4049918276398599*theta[16.0] : 0.0 : True
+ 16.0 : 0.0 : dthetadt[16.0] + 2.4999999999999947*theta[14.0] - 4.206212111797173*theta[14.114208] + 3.4851280583284003*theta[14.553686] - 4.388557102075248*theta[15.167181] + 9.109641155544018*theta[15.72048] - 6.49999999999999*theta[16.0] : 0.0 : True
+ 16.114208 : 0.0 : dthetadt[16.114208] + 5.519339620604476*theta[16.0] - 4.377961988969178*theta[16.114208] - 1.4459713076900629*theta[16.553686] + 0.437593198100135*theta[17.167181] - 0.19985260396998084*theta[17.72048] + 0.06685308192460761*theta[18.0] : 0.0 : True
+ 16.553686 : 0.0 : dthetadt[16.553686] - 1.7915342612505238*theta[16.0] + 3.5806903600726603*theta[16.114208] - 0.9030388620417913*theta[16.553686] - 1.1818985880343118*theta[17.167181] + 0.43295039014156045*theta[17.72048] - 0.137169038887596*theta[18.0] : 0.0 : True
+ 17.167181 : 0.0 : dthetadt[17.167181] + 1.1720857789519332*theta[16.0] - 2.061082623121699*theta[16.114208] + 2.2480085629067506*theta[16.553686] - 0.4283826226986418*theta[17.167181] - 1.2591604746055074*theta[17.72048] + 0.3285313785671775*theta[18.0] : 0.0 : True
+ 17.72048 : 0.0 : dthetadt[17.72048] - 1.141317750102841*theta[16.0] + 1.9393316098620392*theta[16.114208] - 1.6965759590324723*theta[16.553686] + 2.5941704532035765*theta[17.167181] - 0.2906165262903779*theta[17.72048] - 1.4049918276398599*theta[18.0] : 0.0 : True
+ 18.0 : 0.0 : dthetadt[18.0] + 2.4999999999999947*theta[16.0] - 4.206212111797173*theta[16.114208] + 3.4851280583284003*theta[16.553686] - 4.388557102075248*theta[17.167181] + 9.109641155544018*theta[17.72048] - 6.49999999999999*theta[18.0] : 0.0 : True
+ 18.114208 : 0.0 : dthetadt[18.114208] + 5.519339620604476*theta[18.0] - 4.377961988969178*theta[18.114208] - 1.4459713076900629*theta[18.553686] + 0.437593198100135*theta[19.167181] - 0.19985260396998084*theta[19.72048] + 0.06685308192460761*theta[20.0] : 0.0 : True
+ 18.553686 : 0.0 : dthetadt[18.553686] - 1.7915342612505238*theta[18.0] + 3.5806903600726603*theta[18.114208] - 0.9030388620417913*theta[18.553686] - 1.1818985880343118*theta[19.167181] + 0.43295039014156045*theta[19.72048] - 0.137169038887596*theta[20.0] : 0.0 : True
+ 19.167181 : 0.0 : dthetadt[19.167181] + 1.1720857789519332*theta[18.0] - 2.061082623121699*theta[18.114208] + 2.2480085629067506*theta[18.553686] - 0.4283826226986418*theta[19.167181] - 1.2591604746055074*theta[19.72048] + 0.3285313785671775*theta[20.0] : 0.0 : True
+ 19.72048 : 0.0 : dthetadt[19.72048] - 1.141317750102841*theta[18.0] + 1.9393316098620392*theta[18.114208] - 1.6965759590324723*theta[18.553686] + 2.5941704532035765*theta[19.167181] - 0.2906165262903779*theta[19.72048] - 1.4049918276398599*theta[20.0] : 0.0 : True
+ 20.0 : 0.0 : dthetadt[20.0] + 2.4999999999999947*theta[18.0] - 4.206212111797173*theta[18.114208] + 3.4851280583284003*theta[18.553686] - 4.388557102075248*theta[19.167181] + 9.109641155544018*theta[19.72048] - 6.49999999999999*theta[20.0] : 0.0 : True
1 ContinuousSet Declarations
t : Dim=0, Dimen=1, Size=51, Domain=None, Ordered=Sorted, Bounds=(0.0, 20.0)
- [0.0, 0.114208, 0.553686, 1.167181, 1.72048, 2.0, 2.114208, 2.553686, 3.167181, 3.72048, 4.0, 4.114208, 4.553686, 5.167181, 5.72048, 6.0, 6.114208, 6.553686, 7.167181, 7.72048, 8.0, 8.114208, 8.553686, 9.167181, 9.72048, 10.0, 10.114208, 10.553686, 11.167181, 11.72048, 12.0, 12.114208, 12.553686, 13.167181, 13.72048, 14.0, 14.114208, 14.553686, 15.167181, 15.72048, 16.0, 16.114208, 16.553686, 17.167181, 17.72048, 18.0, 18.114208, 18.553686, 19.167181, 19.72048, 20.0]
+ [0.0, 0.114208, 0.55368600000000001, 1.167181, 1.72048, 2.0, 2.1142080000000001, 2.5536859999999999, 3.1671809999999998, 3.7204799999999998, 4.0, 4.1142079999999996, 4.5536859999999999, 5.1671810000000002, 5.7204800000000002, 6.0, 6.1142079999999996, 6.5536859999999999, 7.1671810000000002, 7.7204800000000002, 8.0, 8.1142079999999996, 8.5536860000000008, 9.1671809999999994, 9.7204800000000002, 10.0, 10.114208, 10.553686000000001, 11.167180999999999, 11.72048, 12.0, 12.114208, 12.553686000000001, 13.167180999999999, 13.72048, 14.0, 14.114208, 14.553686000000001, 15.167180999999999, 15.72048, 16.0, 16.114208000000001, 16.553685999999999, 17.167180999999999, 17.720479999999998, 18.0, 18.114208000000001, 18.553685999999999, 19.167180999999999, 19.720479999999998, 20.0]
1 Suffix Declarations
var_input : Direction=Suffix.LOCAL, Datatype=Suffix.FLOAT
diff --git a/pyomo/dae/tests/simulator_ode_multindex_example.scipy.txt b/pyomo/dae/tests/simulator_ode_multindex_example.scipy.txt
index 48138cd817a..c6f7eb2a731 100644
--- a/pyomo/dae/tests/simulator_ode_multindex_example.scipy.txt
+++ b/pyomo/dae/tests/simulator_ode_multindex_example.scipy.txt
@@ -116,166 +116,166 @@
19.72048 : None : None : None : False : True : Reals
20.0 : None : None : None : False : True : Reals
omega : Size=51, Index=t
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- 0.0 : None : 0.0 : None : False : False : Reals
- 0.114208 : None : -0.0584051872853 : None : False : False : Reals
- 0.553686 : None : -0.339031136069 : None : False : False : Reals
- 1.167181 : None : -1.30856886092 : None : False : False : Reals
- 1.72048 : None : -3.31952037051 : None : False : False : Reals
- 2.0 : None : -3.97141094188 : None : False : False : Reals
- 2.114208 : None : -3.79415576393 : None : False : False : Reals
- 2.553686 : None : -1.87418113761 : None : False : False : Reals
- 3.167181 : None : 1.15052925881 : None : False : False : Reals
- 3.72048 : None : 3.15494655604 : None : False : False : Reals
- 4.0 : None : 2.9590358618 : None : False : False : Reals
- 4.114208 : None : 2.56315302891 : None : False : False : Reals
- 4.553686 : None : 0.437973418591 : None : False : False : Reals
- 5.167181 : None : -2.24815498778 : None : False : False : Reals
- 5.72048 : None : -2.17122505507 : None : False : False : Reals
- 6.0 : None : -1.03456382028 : None : False : False : Reals
- 6.114208 : None : -0.511168319645 : None : False : False : Reals
- 6.553686 : None : 1.37742695475 : None : False : False : Reals
- 7.167181 : None : 0.882566537486 : None : False : False : Reals
- 7.72048 : None : 0.275620472816 : None : False : False : Reals
- 8.0 : None : 1.24150584652 : None : False : False : Reals
- 8.114208 : None : 0.357304564107 : None : False : False : Reals
- 8.553686 : None : -0.373119665004 : None : False : False : Reals
- 9.167181 : None : -1.07227616981 : None : False : False : Reals
- 9.72048 : None : 1.45905457302 : None : False : False : Reals
- 10.0 : None : -0.612339765206 : None : False : False : Reals
- 10.114208 : None : -1.41554198554 : None : False : False : Reals
- 10.553686 : None : 1.15091627529 : None : False : False : Reals
- 11.167181 : None : -0.702475233035 : None : False : False : Reals
- 11.72048 : None : -0.143255605023 : None : False : False : Reals
- 12.0 : None : -0.825799654027 : None : False : False : Reals
- 12.114208 : None : -0.260819856373 : None : False : False : Reals
- 12.553686 : None : 0.32465023719 : None : False : False : Reals
- 13.167181 : None : 0.687827050811 : None : False : False : Reals
- 13.72048 : None : -0.903650882312 : None : False : False : Reals
- 14.0 : None : 0.330857727667 : None : False : False : Reals
- 14.114208 : None : 0.812695173328 : None : False : False : Reals
- 14.553686 : None : -0.812019424461 : None : False : False : Reals
- 15.167181 : None : 0.514970057988 : None : False : False : Reals
- 15.72048 : None : 0.0914075596991 : None : False : False : Reals
- 16.0 : None : 0.640880369613 : None : False : False : Reals
- 16.114208 : None : 0.156453575901 : None : False : False : Reals
- 16.553686 : None : -0.227041192349 : None : False : False : Reals
- 17.167181 : None : -0.619116205323 : None : False : False : Reals
- 17.72048 : None : 0.649079781066 : None : False : False : Reals
- 18.0 : None : -0.316885336294 : None : False : False : Reals
- 18.114208 : None : -0.614816719496 : None : False : False : Reals
- 18.553686 : None : 0.676764250833 : None : False : False : Reals
- 19.167181 : None : -0.441638189582 : None : False : False : Reals
- 19.72048 : None : -0.0592480768706 : None : False : False : Reals
- 20.0 : None : -0.702138256531 : None : False : False : Reals
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ 0.0 : None : 0.0 : None : False : False : Reals
+ 0.114208 : None : -0.05840518728529297 : None : False : False : Reals
+ 0.553686 : None : -0.33903113606858515 : None : False : False : Reals
+ 1.167181 : None : -1.3085688609164685 : None : False : False : Reals
+ 1.72048 : None : -3.3195203705189478 : None : False : False : Reals
+ 2.0 : None : -3.971410941890654 : None : False : False : Reals
+ 2.114208 : None : -3.794155763934756 : None : False : False : Reals
+ 2.553686 : None : -1.8741811376093058 : None : False : False : Reals
+ 3.167181 : None : 1.1505292588051295 : None : False : False : Reals
+ 3.72048 : None : 3.154946556040063 : None : False : False : Reals
+ 4.0 : None : 2.959035861817344 : None : False : False : Reals
+ 4.114208 : None : 2.5631530289304605 : None : False : False : Reals
+ 4.553686 : None : 0.43797341860473205 : None : False : False : Reals
+ 5.167181 : None : -2.2481549877719074 : None : False : False : Reals
+ 5.72048 : None : -2.1712250550780148 : None : False : False : Reals
+ 6.0 : None : -1.0345638202207303 : None : False : False : Reals
+ 6.114208 : None : -0.5111683195844986 : None : False : False : Reals
+ 6.553686 : None : 1.377426954760057 : None : False : False : Reals
+ 7.167181 : None : 0.8825691591707236 : None : False : False : Reals
+ 7.72048 : None : 0.27562060781474523 : None : False : False : Reals
+ 8.0 : None : 1.2415085602797453 : None : False : False : Reals
+ 8.114208 : None : 0.35730521416534533 : None : False : False : Reals
+ 8.553686 : None : -0.37311945747578856 : None : False : False : Reals
+ 9.167181 : None : -1.0722771136763014 : None : False : False : Reals
+ 9.72048 : None : 1.4590559399332974 : None : False : False : Reals
+ 10.0 : None : -0.6123414908986775 : None : False : False : Reals
+ 10.114208 : None : -1.4155461020839633 : None : False : False : Reals
+ 10.553686 : None : 1.1509214227179199 : None : False : False : Reals
+ 11.167181 : None : -0.7024778138324768 : None : False : False : Reals
+ 11.72048 : None : -0.14325678317959728 : None : False : False : Reals
+ 12.0 : None : -0.8258030249397513 : None : False : False : Reals
+ 12.114208 : None : -0.2608206367935919 : None : False : False : Reals
+ 12.553686 : None : 0.32465103254108085 : None : False : False : Reals
+ 13.167181 : None : 0.6878250767369194 : None : False : False : Reals
+ 13.72048 : None : -0.9036518232694581 : None : False : False : Reals
+ 14.0 : None : 0.3308573279261381 : None : False : False : Reals
+ 14.114208 : None : 0.8126956228555574 : None : False : False : Reals
+ 14.553686 : None : -0.8120209365021307 : None : False : False : Reals
+ 15.167181 : None : 0.5142100976785681 : None : False : False : Reals
+ 15.72048 : None : 0.09083076802710022 : None : False : False : Reals
+ 16.0 : None : 0.6396823348545468 : None : False : False : Reals
+ 16.114208 : None : 0.1564774468707475 : None : False : False : Reals
+ 16.553686 : None : -0.22695009220371032 : None : False : False : Reals
+ 17.167181 : None : -0.617549500630223 : None : False : False : Reals
+ 17.72048 : None : 0.6477468256651164 : None : False : False : Reals
+ 18.0 : None : -0.3158907127113538 : None : False : False : Reals
+ 18.114208 : None : -0.6134419278390677 : None : False : False : Reals
+ 18.553686 : None : 0.6752404445081958 : None : False : False : Reals
+ 19.167181 : None : -0.44095848270081756 : None : False : False : Reals
+ 19.72048 : None : -0.0588549574535181 : None : False : False : Reals
+ 20.0 : None : -0.7008015257685942 : None : False : False : Reals
theta : Size=51, Index=t
- Key : Lower : Value : Upper : Fixed : Stale : Domain
- 0.0 : None : 3.04 : None : False : False : Reals
- 0.114208 : None : 3.03414975283 : None : False : False : Reals
- 0.553686 : None : 2.95279135289 : None : False : False : Reals
- 1.167181 : None : 2.50354310971 : None : False : False : Reals
- 1.72048 : None : 1.25040907693 : None : False : False : Reals
- 2.0 : None : 0.214999282056 : None : False : False : Reals
- 2.114208 : None : -0.224838252211 : None : False : False : Reals
- 2.553686 : None : -1.52696078201 : None : False : False : Reals
- 3.167181 : None : -1.72423860531 : None : False : False : Reals
- 3.72048 : None : -0.449758615753 : None : False : False : Reals
- 4.0 : None : 0.436423786866 : None : False : False : Reals
- 4.114208 : None : 0.745370313206 : None : False : False : Reals
- 4.553686 : None : 1.41918482603 : None : False : False : Reals
- 5.167181 : None : 0.804017757166 : None : False : False : Reals
- 5.72048 : None : -0.582373877464 : None : False : False : Reals
- 6.0 : None : -1.04032034191 : None : False : False : Reals
- 6.114208 : None : -1.1300021319 : None : False : False : Reals
- 6.553686 : None : -0.918002829433 : None : False : False : Reals
- 7.167181 : None : 0.201857304267 : None : False : False : Reals
- 7.72048 : None : -0.246404902761 : None : False : False : Reals
- 8.0 : None : 0.124821409276 : None : False : False : Reals
- 8.114208 : None : 0.239219409989 : None : False : False : Reals
- 8.553686 : None : -0.200916157177 : None : False : False : Reals
- 9.167181 : None : 0.116796746438 : None : False : False : Reals
- 9.72048 : None : 0.020249297411 : None : False : False : Reals
- 10.0 : None : 0.144591960089 : None : False : False : Reals
- 10.114208 : None : 0.051898622533 : None : False : False : Reals
- 10.553686 : None : -0.0554295879115 : None : False : False : Reals
- 11.167181 : None : -0.117345222756 : None : False : False : Reals
- 11.72048 : None : 0.174840138209 : None : False : False : Reals
- 12.0 : None : -0.0597053142507 : None : False : False : Reals
- 12.114208 : None : -0.15959601827 : None : False : False : Reals
- 12.553686 : None : 0.134811216298 : None : False : False : Reals
- 13.167181 : None : -0.0863283725034 : None : False : False : Reals
- 13.72048 : None : -0.0147303413768 : None : False : False : Reals
- 14.0 : None : -0.0975229396636 : None : False : False : Reals
- 14.114208 : None : -0.027553231423 : None : False : False : Reals
- 14.553686 : None : 0.0391556772659 : None : False : False : Reals
- 15.167181 : None : 0.083471150705 : None : False : False : Reals
- 15.72048 : None : -0.100518162495 : None : False : False : Reals
- 16.0 : None : 0.0416062267588 : None : False : False : Reals
- 16.114208 : None : 0.0947185243885 : None : False : False : Reals
- 16.553686 : None : -0.105813704402 : None : False : False : Reals
- 17.167181 : None : 0.0719280781616 : None : False : False : Reals
- 17.72048 : None : 0.0110139294542 : None : False : False : Reals
- 18.0 : None : 0.095128097614 : None : False : False : Reals
- 18.114208 : None : 0.0219715011632 : None : False : False : Reals
- 18.553686 : None : -0.0274916318885 : None : False : False : Reals
- 19.167181 : None : -0.0800921197111 : None : False : False : Reals
- 19.72048 : None : 0.0858369482775 : None : False : False : Reals
- 20.0 : None : -0.0502920990847 : None : False : False : Reals
+ Key : Lower : Value : Upper : Fixed : Stale : Domain
+ 0.0 : None : 3.04 : None : False : False : Reals
+ 0.114208 : None : 3.0341497528311976 : None : False : False : Reals
+ 0.553686 : None : 2.9527913528861425 : None : False : False : Reals
+ 1.167181 : None : 2.5035431097094536 : None : False : False : Reals
+ 1.72048 : None : 1.250409076931434 : None : False : False : Reals
+ 2.0 : None : 0.2149992820516392 : None : False : False : Reals
+ 2.114208 : None : -0.22483825221628687 : None : False : False : Reals
+ 2.553686 : None : -1.5269607820151825 : None : False : False : Reals
+ 3.167181 : None : -1.7242386053151164 : None : False : False : Reals
+ 3.72048 : None : -0.44975861576214854 : None : False : False : Reals
+ 4.0 : None : 0.4364237868596348 : None : False : False : Reals
+ 4.114208 : None : 0.745370313201912 : None : False : False : Reals
+ 4.553686 : None : 1.4191848260304087 : None : False : False : Reals
+ 5.167181 : None : 0.8040177571749516 : None : False : False : Reals
+ 5.72048 : None : -0.582373877459648 : None : False : False : Reals
+ 6.0 : None : -1.0403203419082923 : None : False : False : Reals
+ 6.114208 : None : -1.130002131905896 : None : False : False : Reals
+ 6.553686 : None : -0.9180028294238982 : None : False : False : Reals
+ 7.167181 : None : 0.20185782102257516 : None : False : False : Reals
+ 7.72048 : None : -0.24640554939492132 : None : False : False : Reals
+ 8.0 : None : 0.12482160078413115 : None : False : False : Reals
+ 8.114208 : None : 0.23921983201296348 : None : False : False : Reals
+ 8.553686 : None : -0.2009164892007298 : None : False : False : Reals
+ 9.167181 : None : 0.11679693171358822 : None : False : False : Reals
+ 9.72048 : None : 0.020249278736801844 : None : False : False : Reals
+ 10.0 : None : 0.14459231552267343 : None : False : False : Reals
+ 10.114208 : None : 0.05189881142697694 : None : False : False : Reals
+ 10.553686 : None : -0.055429688437884345 : None : False : False : Reals
+ 11.167181 : None : -0.1173456963960226 : None : False : False : Reals
+ 11.72048 : None : 0.17484066431249684 : None : False : False : Reals
+ 12.0 : None : -0.05970562477162156 : None : False : False : Reals
+ 12.114208 : None : -0.15959680847739643 : None : False : False : Reals
+ 12.553686 : None : 0.13481157135799096 : None : False : False : Reals
+ 13.167181 : None : -0.08632839719832919 : None : False : False : Reals
+ 13.72048 : None : -0.014730329786527718 : None : False : False : Reals
+ 14.0 : None : -0.09752308108750504 : None : False : False : Reals
+ 14.114208 : None : -0.027553350797782164 : None : False : False : Reals
+ 14.553686 : None : 0.039155763642574316 : None : False : False : Reals
+ 15.167181 : None : 0.08325365710114234 : None : False : False : Reals
+ 15.72048 : None : -0.10031207198145223 : None : False : False : Reals
+ 16.0 : None : 0.04146954000357528 : None : False : False : Reals
+ 16.114208 : None : 0.09450602902280374 : None : False : False : Reals
+ 16.553686 : None : -0.1055728698158523 : None : False : False : Reals
+ 17.167181 : None : 0.07181952046982307 : None : False : False : Reals
+ 17.72048 : None : 0.01094553524698505 : None : False : False : Reals
+ 18.0 : None : 0.09494833123377587 : None : False : False : Reals
+ 18.114208 : None : 0.021966789396689307 : None : False : False : Reals
+ 18.553686 : None : -0.027478259693785853 : None : False : False : Reals
+ 19.167181 : None : -0.07989350894282768 : None : False : False : Reals
+ 19.72048 : None : 0.08565791488122151 : None : False : False : Reals
+ 20.0 : None : -0.05014197803019069 : None : False : False : Reals
4 Constraint Declarations
diffeq1 : Size=51, Index=t, Active=True
- Key : Lower : Body : Upper : Active
- 0.0 : 0.0 : domegadt[0.0] + 0.25*omega[0.0] + 5.0*sin( theta[0.0] ) : 0.0 : True
- 0.114208 : 0.0 : domegadt[0.114208] + 0.25*omega[0.114208] + 5*sin( theta[0.114208] ) : 0.0 : True
- 0.553686 : 0.0 : domegadt[0.553686] + 0.25*omega[0.553686] + 5*sin( theta[0.553686] ) : 0.0 : True
- 1.167181 : 0.0 : domegadt[1.167181] + 0.25*omega[1.167181] + 5*sin( theta[1.167181] ) : 0.0 : True
- 1.72048 : 0.0 : domegadt[1.72048] + 0.25*omega[1.72048] + 5*sin( theta[1.72048] ) : 0.0 : True
- 2.0 : 0.0 : domegadt[2.0] + 0.25*omega[2.0] + 5*sin( theta[2.0] ) : 0.0 : True
- 2.114208 : 0.0 : domegadt[2.114208] + 0.25*omega[2.114208] + 5*sin( theta[2.114208] ) : 0.0 : True
- 2.553686 : 0.0 : domegadt[2.553686] + 0.25*omega[2.553686] + 5*sin( theta[2.553686] ) : 0.0 : True
- 3.167181 : 0.0 : domegadt[3.167181] + 0.25*omega[3.167181] + 5*sin( theta[3.167181] ) : 0.0 : True
- 3.72048 : 0.0 : domegadt[3.72048] + 0.25*omega[3.72048] + 5*sin( theta[3.72048] ) : 0.0 : True
- 4.0 : 0.0 : domegadt[4.0] + 0.25*omega[4.0] + 5*sin( theta[4.0] ) : 0.0 : True
- 4.114208 : 0.0 : domegadt[4.114208] + 0.25*omega[4.114208] + 5*sin( theta[4.114208] ) : 0.0 : True
- 4.553686 : 0.0 : domegadt[4.553686] + 0.25*omega[4.553686] + 5*sin( theta[4.553686] ) : 0.0 : True
- 5.167181 : 0.0 : domegadt[5.167181] + 0.25*omega[5.167181] + 5*sin( theta[5.167181] ) : 0.0 : True
- 5.72048 : 0.0 : domegadt[5.72048] + 0.25*omega[5.72048] + 5*sin( theta[5.72048] ) : 0.0 : True
- 6.0 : 0.0 : domegadt[6.0] + 0.25*omega[6.0] + 5*sin( theta[6.0] ) : 0.0 : True
- 6.114208 : 0.0 : domegadt[6.114208] + 0.25*omega[6.114208] + 5*sin( theta[6.114208] ) : 0.0 : True
- 6.553686 : 0.0 : domegadt[6.553686] + 0.25*omega[6.553686] + 5*sin( theta[6.553686] ) : 0.0 : True
- 7.167181 : 0.0 : domegadt[7.167181] + 0.25*omega[7.167181] + 50*sin( theta[7.167181] ) : 0.0 : True
- 7.72048 : 0.0 : domegadt[7.72048] + 0.25*omega[7.72048] + 50*sin( theta[7.72048] ) : 0.0 : True
- 8.0 : 0.0 : domegadt[8.0] + 0.25*omega[8.0] + 50*sin( theta[8.0] ) : 0.0 : True
- 8.114208 : 0.0 : domegadt[8.114208] + 0.25*omega[8.114208] + 50*sin( theta[8.114208] ) : 0.0 : True
- 8.553686 : 0.0 : domegadt[8.553686] + 0.25*omega[8.553686] + 50*sin( theta[8.553686] ) : 0.0 : True
- 9.167181 : 0.0 : domegadt[9.167181] + 0.25*omega[9.167181] + 50*sin( theta[9.167181] ) : 0.0 : True
- 9.72048 : 0.0 : domegadt[9.72048] + 0.25*omega[9.72048] + 50*sin( theta[9.72048] ) : 0.0 : True
- 10.0 : 0.0 : domegadt[10.0] + 0.25*omega[10.0] + 50*sin( theta[10.0] ) : 0.0 : True
- 10.114208 : 0.0 : domegadt[10.114208] + 0.25*omega[10.114208] + 50*sin( theta[10.114208] ) : 0.0 : True
- 10.553686 : 0.0 : domegadt[10.553686] + 0.25*omega[10.553686] + 50*sin( theta[10.553686] ) : 0.0 : True
- 11.167181 : 0.0 : domegadt[11.167181] + 0.25*omega[11.167181] + 50*sin( theta[11.167181] ) : 0.0 : True
- 11.72048 : 0.0 : domegadt[11.72048] + 0.25*omega[11.72048] + 50*sin( theta[11.72048] ) : 0.0 : True
- 12.0 : 0.0 : domegadt[12.0] + 0.25*omega[12.0] + 50*sin( theta[12.0] ) : 0.0 : True
- 12.114208 : 0.0 : domegadt[12.114208] + 0.25*omega[12.114208] + 50*sin( theta[12.114208] ) : 0.0 : True
- 12.553686 : 0.0 : domegadt[12.553686] + 0.25*omega[12.553686] + 50*sin( theta[12.553686] ) : 0.0 : True
- 13.167181 : 0.0 : domegadt[13.167181] + 0.25*omega[13.167181] + 50*sin( theta[13.167181] ) : 0.0 : True
- 13.72048 : 0.0 : domegadt[13.72048] + 0.25*omega[13.72048] + 50*sin( theta[13.72048] ) : 0.0 : True
- 14.0 : 0.0 : domegadt[14.0] + 0.25*omega[14.0] + 50*sin( theta[14.0] ) : 0.0 : True
- 14.114208 : 0.0 : domegadt[14.114208] + 0.25*omega[14.114208] + 50*sin( theta[14.114208] ) : 0.0 : True
- 14.553686 : 0.0 : domegadt[14.553686] + 0.25*omega[14.553686] + 50*sin( theta[14.553686] ) : 0.0 : True
- 15.167181 : 0.0 : domegadt[15.167181] + 0.025*omega[15.167181] + 50*sin( theta[15.167181] ) : 0.0 : True
- 15.72048 : 0.0 : domegadt[15.72048] + 0.025*omega[15.72048] + 50*sin( theta[15.72048] ) : 0.0 : True
- 16.0 : 0.0 : domegadt[16.0] + 0.025*omega[16.0] + 50*sin( theta[16.0] ) : 0.0 : True
- 16.114208 : 0.0 : domegadt[16.114208] + 0.025*omega[16.114208] + 50*sin( theta[16.114208] ) : 0.0 : True
- 16.553686 : 0.0 : domegadt[16.553686] + 0.025*omega[16.553686] + 50*sin( theta[16.553686] ) : 0.0 : True
- 17.167181 : 0.0 : domegadt[17.167181] + 0.025*omega[17.167181] + 50*sin( theta[17.167181] ) : 0.0 : True
- 17.72048 : 0.0 : domegadt[17.72048] + 0.025*omega[17.72048] + 50*sin( theta[17.72048] ) : 0.0 : True
- 18.0 : 0.0 : domegadt[18.0] + 0.025*omega[18.0] + 50*sin( theta[18.0] ) : 0.0 : True
- 18.114208 : 0.0 : domegadt[18.114208] + 0.025*omega[18.114208] + 50*sin( theta[18.114208] ) : 0.0 : True
- 18.553686 : 0.0 : domegadt[18.553686] + 0.025*omega[18.553686] + 50*sin( theta[18.553686] ) : 0.0 : True
- 19.167181 : 0.0 : domegadt[19.167181] + 0.025*omega[19.167181] + 50*sin( theta[19.167181] ) : 0.0 : True
- 19.72048 : 0.0 : domegadt[19.72048] + 0.025*omega[19.72048] + 50*sin( theta[19.72048] ) : 0.0 : True
- 20.0 : 0.0 : domegadt[20.0] + 0.25*omega[20.0] + 5.0*sin( theta[20.0] ) : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 0.0 : 0.0 : domegadt[0.0] - (-0.25*omega[0.0] - 5.0*sin(theta[0.0])) : 0.0 : True
+ 0.114208 : 0.0 : domegadt[0.114208] - (-0.25*omega[0.114208] - 5*sin(theta[0.114208])) : 0.0 : True
+ 0.553686 : 0.0 : domegadt[0.553686] - (-0.25*omega[0.553686] - 5*sin(theta[0.553686])) : 0.0 : True
+ 1.167181 : 0.0 : domegadt[1.167181] - (-0.25*omega[1.167181] - 5*sin(theta[1.167181])) : 0.0 : True
+ 1.72048 : 0.0 : domegadt[1.72048] - (-0.25*omega[1.72048] - 5*sin(theta[1.72048])) : 0.0 : True
+ 2.0 : 0.0 : domegadt[2.0] - (-0.25*omega[2.0] - 5*sin(theta[2.0])) : 0.0 : True
+ 2.114208 : 0.0 : domegadt[2.114208] - (-0.25*omega[2.114208] - 5*sin(theta[2.114208])) : 0.0 : True
+ 2.553686 : 0.0 : domegadt[2.553686] - (-0.25*omega[2.553686] - 5*sin(theta[2.553686])) : 0.0 : True
+ 3.167181 : 0.0 : domegadt[3.167181] - (-0.25*omega[3.167181] - 5*sin(theta[3.167181])) : 0.0 : True
+ 3.72048 : 0.0 : domegadt[3.72048] - (-0.25*omega[3.72048] - 5*sin(theta[3.72048])) : 0.0 : True
+ 4.0 : 0.0 : domegadt[4.0] - (-0.25*omega[4.0] - 5*sin(theta[4.0])) : 0.0 : True
+ 4.114208 : 0.0 : domegadt[4.114208] - (-0.25*omega[4.114208] - 5*sin(theta[4.114208])) : 0.0 : True
+ 4.553686 : 0.0 : domegadt[4.553686] - (-0.25*omega[4.553686] - 5*sin(theta[4.553686])) : 0.0 : True
+ 5.167181 : 0.0 : domegadt[5.167181] - (-0.25*omega[5.167181] - 5*sin(theta[5.167181])) : 0.0 : True
+ 5.72048 : 0.0 : domegadt[5.72048] - (-0.25*omega[5.72048] - 5*sin(theta[5.72048])) : 0.0 : True
+ 6.0 : 0.0 : domegadt[6.0] - (-0.25*omega[6.0] - 5*sin(theta[6.0])) : 0.0 : True
+ 6.114208 : 0.0 : domegadt[6.114208] - (-0.25*omega[6.114208] - 5*sin(theta[6.114208])) : 0.0 : True
+ 6.553686 : 0.0 : domegadt[6.553686] - (-0.25*omega[6.553686] - 5*sin(theta[6.553686])) : 0.0 : True
+ 7.167181 : 0.0 : domegadt[7.167181] - (-0.25*omega[7.167181] - 50*sin(theta[7.167181])) : 0.0 : True
+ 7.72048 : 0.0 : domegadt[7.72048] - (-0.25*omega[7.72048] - 50*sin(theta[7.72048])) : 0.0 : True
+ 8.0 : 0.0 : domegadt[8.0] - (-0.25*omega[8.0] - 50*sin(theta[8.0])) : 0.0 : True
+ 8.114208 : 0.0 : domegadt[8.114208] - (-0.25*omega[8.114208] - 50*sin(theta[8.114208])) : 0.0 : True
+ 8.553686 : 0.0 : domegadt[8.553686] - (-0.25*omega[8.553686] - 50*sin(theta[8.553686])) : 0.0 : True
+ 9.167181 : 0.0 : domegadt[9.167181] - (-0.25*omega[9.167181] - 50*sin(theta[9.167181])) : 0.0 : True
+ 9.72048 : 0.0 : domegadt[9.72048] - (-0.25*omega[9.72048] - 50*sin(theta[9.72048])) : 0.0 : True
+ 10.0 : 0.0 : domegadt[10.0] - (-0.25*omega[10.0] - 50*sin(theta[10.0])) : 0.0 : True
+ 10.114208 : 0.0 : domegadt[10.114208] - (-0.25*omega[10.114208] - 50*sin(theta[10.114208])) : 0.0 : True
+ 10.553686 : 0.0 : domegadt[10.553686] - (-0.25*omega[10.553686] - 50*sin(theta[10.553686])) : 0.0 : True
+ 11.167181 : 0.0 : domegadt[11.167181] - (-0.25*omega[11.167181] - 50*sin(theta[11.167181])) : 0.0 : True
+ 11.72048 : 0.0 : domegadt[11.72048] - (-0.25*omega[11.72048] - 50*sin(theta[11.72048])) : 0.0 : True
+ 12.0 : 0.0 : domegadt[12.0] - (-0.25*omega[12.0] - 50*sin(theta[12.0])) : 0.0 : True
+ 12.114208 : 0.0 : domegadt[12.114208] - (-0.25*omega[12.114208] - 50*sin(theta[12.114208])) : 0.0 : True
+ 12.553686 : 0.0 : domegadt[12.553686] - (-0.25*omega[12.553686] - 50*sin(theta[12.553686])) : 0.0 : True
+ 13.167181 : 0.0 : domegadt[13.167181] - (-0.25*omega[13.167181] - 50*sin(theta[13.167181])) : 0.0 : True
+ 13.72048 : 0.0 : domegadt[13.72048] - (-0.25*omega[13.72048] - 50*sin(theta[13.72048])) : 0.0 : True
+ 14.0 : 0.0 : domegadt[14.0] - (-0.25*omega[14.0] - 50*sin(theta[14.0])) : 0.0 : True
+ 14.114208 : 0.0 : domegadt[14.114208] - (-0.25*omega[14.114208] - 50*sin(theta[14.114208])) : 0.0 : True
+ 14.553686 : 0.0 : domegadt[14.553686] - (-0.25*omega[14.553686] - 50*sin(theta[14.553686])) : 0.0 : True
+ 15.167181 : 0.0 : domegadt[15.167181] - (-0.025*omega[15.167181] - 50*sin(theta[15.167181])) : 0.0 : True
+ 15.72048 : 0.0 : domegadt[15.72048] - (-0.025*omega[15.72048] - 50*sin(theta[15.72048])) : 0.0 : True
+ 16.0 : 0.0 : domegadt[16.0] - (-0.025*omega[16.0] - 50*sin(theta[16.0])) : 0.0 : True
+ 16.114208 : 0.0 : domegadt[16.114208] - (-0.025*omega[16.114208] - 50*sin(theta[16.114208])) : 0.0 : True
+ 16.553686 : 0.0 : domegadt[16.553686] - (-0.025*omega[16.553686] - 50*sin(theta[16.553686])) : 0.0 : True
+ 17.167181 : 0.0 : domegadt[17.167181] - (-0.025*omega[17.167181] - 50*sin(theta[17.167181])) : 0.0 : True
+ 17.72048 : 0.0 : domegadt[17.72048] - (-0.025*omega[17.72048] - 50*sin(theta[17.72048])) : 0.0 : True
+ 18.0 : 0.0 : domegadt[18.0] - (-0.025*omega[18.0] - 50*sin(theta[18.0])) : 0.0 : True
+ 18.114208 : 0.0 : domegadt[18.114208] - (-0.025*omega[18.114208] - 50*sin(theta[18.114208])) : 0.0 : True
+ 18.553686 : 0.0 : domegadt[18.553686] - (-0.025*omega[18.553686] - 50*sin(theta[18.553686])) : 0.0 : True
+ 19.167181 : 0.0 : domegadt[19.167181] - (-0.025*omega[19.167181] - 50*sin(theta[19.167181])) : 0.0 : True
+ 19.72048 : 0.0 : domegadt[19.72048] - (-0.025*omega[19.72048] - 50*sin(theta[19.72048])) : 0.0 : True
+ 20.0 : 0.0 : domegadt[20.0] - (-0.25*omega[20.0] - 5.0*sin(theta[20.0])) : 0.0 : True
diffeq2 : Size=51, Index=t, Active=True
Key : Lower : Body : Upper : Active
0.0 : 0.0 : dthetadt[0.0] - omega[0.0] : 0.0 : True
@@ -330,109 +330,109 @@
19.72048 : 0.0 : dthetadt[19.72048] - omega[19.72048] : 0.0 : True
20.0 : 0.0 : dthetadt[20.0] - omega[20.0] : 0.0 : True
domegadt_disc_eq : Size=50, Index=t, Active=True
- Key : Lower : Body : Upper : Active
- 0.114208 : 0.0 : domegadt[0.114208] + 5.5193396206*omega[0.0] - 4.37796198897*omega[0.114208] - 1.44597130769*omega[0.553686] + 0.4375931981*omega[1.167181] - 0.19985260397*omega[1.72048] + 0.0668530819246*omega[2.0] : 0.0 : True
- 0.553686 : 0.0 : domegadt[0.553686] - 1.79153426125*omega[0.0] + 3.58069036007*omega[0.114208] - 0.903038862042*omega[0.553686] - 1.18189858803*omega[1.167181] + 0.432950390142*omega[1.72048] - 0.137169038888*omega[2.0] : 0.0 : True
- 1.167181 : 0.0 : domegadt[1.167181] + 1.17208577895*omega[0.0] - 2.06108262312*omega[0.114208] + 2.24800856291*omega[0.553686] - 0.428382622699*omega[1.167181] - 1.25916047461*omega[1.72048] + 0.328531378567*omega[2.0] : 0.0 : True
- 1.72048 : 0.0 : domegadt[1.72048] - 1.1413177501*omega[0.0] + 1.93933160986*omega[0.114208] - 1.69657595903*omega[0.553686] + 2.5941704532*omega[1.167181] - 0.29061652629*omega[1.72048] - 1.40499182764*omega[2.0] : 0.0 : True
- 2.0 : 0.0 : domegadt[2.0] + 2.5*omega[0.0] - 4.2062121118*omega[0.114208] + 3.48512805833*omega[0.553686] - 4.38855710208*omega[1.167181] + 9.10964115554*omega[1.72048] - 6.5*omega[2.0] : 0.0 : True
- 2.114208 : 0.0 : domegadt[2.114208] + 5.5193396206*omega[2.0] - 4.37796198897*omega[2.114208] - 1.44597130769*omega[2.553686] + 0.4375931981*omega[3.167181] - 0.19985260397*omega[3.72048] + 0.0668530819246*omega[4.0] : 0.0 : True
- 2.553686 : 0.0 : domegadt[2.553686] - 1.79153426125*omega[2.0] + 3.58069036007*omega[2.114208] - 0.903038862042*omega[2.553686] - 1.18189858803*omega[3.167181] + 0.432950390142*omega[3.72048] - 0.137169038888*omega[4.0] : 0.0 : True
- 3.167181 : 0.0 : domegadt[3.167181] + 1.17208577895*omega[2.0] - 2.06108262312*omega[2.114208] + 2.24800856291*omega[2.553686] - 0.428382622699*omega[3.167181] - 1.25916047461*omega[3.72048] + 0.328531378567*omega[4.0] : 0.0 : True
- 3.72048 : 0.0 : domegadt[3.72048] - 1.1413177501*omega[2.0] + 1.93933160986*omega[2.114208] - 1.69657595903*omega[2.553686] + 2.5941704532*omega[3.167181] - 0.29061652629*omega[3.72048] - 1.40499182764*omega[4.0] : 0.0 : True
- 4.0 : 0.0 : domegadt[4.0] + 2.5*omega[2.0] - 4.2062121118*omega[2.114208] + 3.48512805833*omega[2.553686] - 4.38855710208*omega[3.167181] + 9.10964115554*omega[3.72048] - 6.5*omega[4.0] : 0.0 : True
- 4.114208 : 0.0 : domegadt[4.114208] + 5.5193396206*omega[4.0] - 4.37796198897*omega[4.114208] - 1.44597130769*omega[4.553686] + 0.4375931981*omega[5.167181] - 0.19985260397*omega[5.72048] + 0.0668530819246*omega[6.0] : 0.0 : True
- 4.553686 : 0.0 : domegadt[4.553686] - 1.79153426125*omega[4.0] + 3.58069036007*omega[4.114208] - 0.903038862042*omega[4.553686] - 1.18189858803*omega[5.167181] + 0.432950390142*omega[5.72048] - 0.137169038888*omega[6.0] : 0.0 : True
- 5.167181 : 0.0 : domegadt[5.167181] + 1.17208577895*omega[4.0] - 2.06108262312*omega[4.114208] + 2.24800856291*omega[4.553686] - 0.428382622699*omega[5.167181] - 1.25916047461*omega[5.72048] + 0.328531378567*omega[6.0] : 0.0 : True
- 5.72048 : 0.0 : domegadt[5.72048] - 1.1413177501*omega[4.0] + 1.93933160986*omega[4.114208] - 1.69657595903*omega[4.553686] + 2.5941704532*omega[5.167181] - 0.29061652629*omega[5.72048] - 1.40499182764*omega[6.0] : 0.0 : True
- 6.0 : 0.0 : domegadt[6.0] + 2.5*omega[4.0] - 4.2062121118*omega[4.114208] + 3.48512805833*omega[4.553686] - 4.38855710208*omega[5.167181] + 9.10964115554*omega[5.72048] - 6.5*omega[6.0] : 0.0 : True
- 6.114208 : 0.0 : domegadt[6.114208] + 5.5193396206*omega[6.0] - 4.37796198897*omega[6.114208] - 1.44597130769*omega[6.553686] + 0.4375931981*omega[7.167181] - 0.19985260397*omega[7.72048] + 0.0668530819246*omega[8.0] : 0.0 : True
- 6.553686 : 0.0 : domegadt[6.553686] - 1.79153426125*omega[6.0] + 3.58069036007*omega[6.114208] - 0.903038862042*omega[6.553686] - 1.18189858803*omega[7.167181] + 0.432950390142*omega[7.72048] - 0.137169038888*omega[8.0] : 0.0 : True
- 7.167181 : 0.0 : domegadt[7.167181] + 1.17208577895*omega[6.0] - 2.06108262312*omega[6.114208] + 2.24800856291*omega[6.553686] - 0.428382622699*omega[7.167181] - 1.25916047461*omega[7.72048] + 0.328531378567*omega[8.0] : 0.0 : True
- 7.72048 : 0.0 : domegadt[7.72048] - 1.1413177501*omega[6.0] + 1.93933160986*omega[6.114208] - 1.69657595903*omega[6.553686] + 2.5941704532*omega[7.167181] - 0.29061652629*omega[7.72048] - 1.40499182764*omega[8.0] : 0.0 : True
- 8.0 : 0.0 : domegadt[8.0] + 2.5*omega[6.0] - 4.2062121118*omega[6.114208] + 3.48512805833*omega[6.553686] - 4.38855710208*omega[7.167181] + 9.10964115554*omega[7.72048] - 6.5*omega[8.0] : 0.0 : True
- 8.114208 : 0.0 : domegadt[8.114208] + 5.5193396206*omega[8.0] - 4.37796198897*omega[8.114208] - 1.44597130769*omega[8.553686] + 0.4375931981*omega[9.167181] - 0.19985260397*omega[9.72048] + 0.0668530819246*omega[10.0] : 0.0 : True
- 8.553686 : 0.0 : domegadt[8.553686] - 1.79153426125*omega[8.0] + 3.58069036007*omega[8.114208] - 0.903038862042*omega[8.553686] - 1.18189858803*omega[9.167181] + 0.432950390142*omega[9.72048] - 0.137169038888*omega[10.0] : 0.0 : True
- 9.167181 : 0.0 : domegadt[9.167181] + 1.17208577895*omega[8.0] - 2.06108262312*omega[8.114208] + 2.24800856291*omega[8.553686] - 0.428382622699*omega[9.167181] - 1.25916047461*omega[9.72048] + 0.328531378567*omega[10.0] : 0.0 : True
- 9.72048 : 0.0 : domegadt[9.72048] - 1.1413177501*omega[8.0] + 1.93933160986*omega[8.114208] - 1.69657595903*omega[8.553686] + 2.5941704532*omega[9.167181] - 0.29061652629*omega[9.72048] - 1.40499182764*omega[10.0] : 0.0 : True
- 10.0 : 0.0 : domegadt[10.0] + 2.5*omega[8.0] - 4.2062121118*omega[8.114208] + 3.48512805833*omega[8.553686] - 4.38855710208*omega[9.167181] + 9.10964115554*omega[9.72048] - 6.5*omega[10.0] : 0.0 : True
- 10.114208 : 0.0 : domegadt[10.114208] + 5.5193396206*omega[10.0] - 4.37796198897*omega[10.114208] - 1.44597130769*omega[10.553686] + 0.4375931981*omega[11.167181] - 0.19985260397*omega[11.72048] + 0.0668530819246*omega[12.0] : 0.0 : True
- 10.553686 : 0.0 : domegadt[10.553686] - 1.79153426125*omega[10.0] + 3.58069036007*omega[10.114208] - 0.903038862042*omega[10.553686] - 1.18189858803*omega[11.167181] + 0.432950390142*omega[11.72048] - 0.137169038888*omega[12.0] : 0.0 : True
- 11.167181 : 0.0 : domegadt[11.167181] + 1.17208577895*omega[10.0] - 2.06108262312*omega[10.114208] + 2.24800856291*omega[10.553686] - 0.428382622699*omega[11.167181] - 1.25916047461*omega[11.72048] + 0.328531378567*omega[12.0] : 0.0 : True
- 11.72048 : 0.0 : domegadt[11.72048] - 1.1413177501*omega[10.0] + 1.93933160986*omega[10.114208] - 1.69657595903*omega[10.553686] + 2.5941704532*omega[11.167181] - 0.29061652629*omega[11.72048] - 1.40499182764*omega[12.0] : 0.0 : True
- 12.0 : 0.0 : domegadt[12.0] + 2.5*omega[10.0] - 4.2062121118*omega[10.114208] + 3.48512805833*omega[10.553686] - 4.38855710208*omega[11.167181] + 9.10964115554*omega[11.72048] - 6.5*omega[12.0] : 0.0 : True
- 12.114208 : 0.0 : domegadt[12.114208] + 5.5193396206*omega[12.0] - 4.37796198897*omega[12.114208] - 1.44597130769*omega[12.553686] + 0.4375931981*omega[13.167181] - 0.19985260397*omega[13.72048] + 0.0668530819246*omega[14.0] : 0.0 : True
- 12.553686 : 0.0 : domegadt[12.553686] - 1.79153426125*omega[12.0] + 3.58069036007*omega[12.114208] - 0.903038862042*omega[12.553686] - 1.18189858803*omega[13.167181] + 0.432950390142*omega[13.72048] - 0.137169038888*omega[14.0] : 0.0 : True
- 13.167181 : 0.0 : domegadt[13.167181] + 1.17208577895*omega[12.0] - 2.06108262312*omega[12.114208] + 2.24800856291*omega[12.553686] - 0.428382622699*omega[13.167181] - 1.25916047461*omega[13.72048] + 0.328531378567*omega[14.0] : 0.0 : True
- 13.72048 : 0.0 : domegadt[13.72048] - 1.1413177501*omega[12.0] + 1.93933160986*omega[12.114208] - 1.69657595903*omega[12.553686] + 2.5941704532*omega[13.167181] - 0.29061652629*omega[13.72048] - 1.40499182764*omega[14.0] : 0.0 : True
- 14.0 : 0.0 : domegadt[14.0] + 2.5*omega[12.0] - 4.2062121118*omega[12.114208] + 3.48512805833*omega[12.553686] - 4.38855710208*omega[13.167181] + 9.10964115554*omega[13.72048] - 6.5*omega[14.0] : 0.0 : True
- 14.114208 : 0.0 : domegadt[14.114208] + 5.5193396206*omega[14.0] - 4.37796198897*omega[14.114208] - 1.44597130769*omega[14.553686] + 0.4375931981*omega[15.167181] - 0.19985260397*omega[15.72048] + 0.0668530819246*omega[16.0] : 0.0 : True
- 14.553686 : 0.0 : domegadt[14.553686] - 1.79153426125*omega[14.0] + 3.58069036007*omega[14.114208] - 0.903038862042*omega[14.553686] - 1.18189858803*omega[15.167181] + 0.432950390142*omega[15.72048] - 0.137169038888*omega[16.0] : 0.0 : True
- 15.167181 : 0.0 : domegadt[15.167181] + 1.17208577895*omega[14.0] - 2.06108262312*omega[14.114208] + 2.24800856291*omega[14.553686] - 0.428382622699*omega[15.167181] - 1.25916047461*omega[15.72048] + 0.328531378567*omega[16.0] : 0.0 : True
- 15.72048 : 0.0 : domegadt[15.72048] - 1.1413177501*omega[14.0] + 1.93933160986*omega[14.114208] - 1.69657595903*omega[14.553686] + 2.5941704532*omega[15.167181] - 0.29061652629*omega[15.72048] - 1.40499182764*omega[16.0] : 0.0 : True
- 16.0 : 0.0 : domegadt[16.0] + 2.5*omega[14.0] - 4.2062121118*omega[14.114208] + 3.48512805833*omega[14.553686] - 4.38855710208*omega[15.167181] + 9.10964115554*omega[15.72048] - 6.5*omega[16.0] : 0.0 : True
- 16.114208 : 0.0 : domegadt[16.114208] + 5.5193396206*omega[16.0] - 4.37796198897*omega[16.114208] - 1.44597130769*omega[16.553686] + 0.4375931981*omega[17.167181] - 0.19985260397*omega[17.72048] + 0.0668530819246*omega[18.0] : 0.0 : True
- 16.553686 : 0.0 : domegadt[16.553686] - 1.79153426125*omega[16.0] + 3.58069036007*omega[16.114208] - 0.903038862042*omega[16.553686] - 1.18189858803*omega[17.167181] + 0.432950390142*omega[17.72048] - 0.137169038888*omega[18.0] : 0.0 : True
- 17.167181 : 0.0 : domegadt[17.167181] + 1.17208577895*omega[16.0] - 2.06108262312*omega[16.114208] + 2.24800856291*omega[16.553686] - 0.428382622699*omega[17.167181] - 1.25916047461*omega[17.72048] + 0.328531378567*omega[18.0] : 0.0 : True
- 17.72048 : 0.0 : domegadt[17.72048] - 1.1413177501*omega[16.0] + 1.93933160986*omega[16.114208] - 1.69657595903*omega[16.553686] + 2.5941704532*omega[17.167181] - 0.29061652629*omega[17.72048] - 1.40499182764*omega[18.0] : 0.0 : True
- 18.0 : 0.0 : domegadt[18.0] + 2.5*omega[16.0] - 4.2062121118*omega[16.114208] + 3.48512805833*omega[16.553686] - 4.38855710208*omega[17.167181] + 9.10964115554*omega[17.72048] - 6.5*omega[18.0] : 0.0 : True
- 18.114208 : 0.0 : domegadt[18.114208] + 5.5193396206*omega[18.0] - 4.37796198897*omega[18.114208] - 1.44597130769*omega[18.553686] + 0.4375931981*omega[19.167181] - 0.19985260397*omega[19.72048] + 0.0668530819246*omega[20.0] : 0.0 : True
- 18.553686 : 0.0 : domegadt[18.553686] - 1.79153426125*omega[18.0] + 3.58069036007*omega[18.114208] - 0.903038862042*omega[18.553686] - 1.18189858803*omega[19.167181] + 0.432950390142*omega[19.72048] - 0.137169038888*omega[20.0] : 0.0 : True
- 19.167181 : 0.0 : domegadt[19.167181] + 1.17208577895*omega[18.0] - 2.06108262312*omega[18.114208] + 2.24800856291*omega[18.553686] - 0.428382622699*omega[19.167181] - 1.25916047461*omega[19.72048] + 0.328531378567*omega[20.0] : 0.0 : True
- 19.72048 : 0.0 : domegadt[19.72048] - 1.1413177501*omega[18.0] + 1.93933160986*omega[18.114208] - 1.69657595903*omega[18.553686] + 2.5941704532*omega[19.167181] - 0.29061652629*omega[19.72048] - 1.40499182764*omega[20.0] : 0.0 : True
- 20.0 : 0.0 : domegadt[20.0] + 2.5*omega[18.0] - 4.2062121118*omega[18.114208] + 3.48512805833*omega[18.553686] - 4.38855710208*omega[19.167181] + 9.10964115554*omega[19.72048] - 6.5*omega[20.0] : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 0.114208 : 0.0 : domegadt[0.114208] - (-5.519339620604476*omega[0.0] + 4.377961988969178*omega[0.114208] + 1.4459713076900629*omega[0.553686] - 0.437593198100135*omega[1.167181] + 0.19985260396998084*omega[1.72048] - 0.06685308192460761*omega[2.0]) : 0.0 : True
+ 0.553686 : 0.0 : domegadt[0.553686] - (1.7915342612505238*omega[0.0] - 3.5806903600726603*omega[0.114208] + 0.9030388620417913*omega[0.553686] + 1.1818985880343118*omega[1.167181] - 0.43295039014156045*omega[1.72048] + 0.137169038887596*omega[2.0]) : 0.0 : True
+ 1.167181 : 0.0 : domegadt[1.167181] - (-1.1720857789519332*omega[0.0] + 2.061082623121699*omega[0.114208] - 2.2480085629067506*omega[0.553686] + 0.4283826226986418*omega[1.167181] + 1.2591604746055074*omega[1.72048] - 0.3285313785671775*omega[2.0]) : 0.0 : True
+ 1.72048 : 0.0 : domegadt[1.72048] - (1.141317750102841*omega[0.0] - 1.9393316098620392*omega[0.114208] + 1.6965759590324723*omega[0.553686] - 2.5941704532035765*omega[1.167181] + 0.2906165262903779*omega[1.72048] + 1.4049918276398599*omega[2.0]) : 0.0 : True
+ 2.0 : 0.0 : domegadt[2.0] - (-2.4999999999999947*omega[0.0] + 4.206212111797173*omega[0.114208] - 3.4851280583284003*omega[0.553686] + 4.388557102075248*omega[1.167181] - 9.109641155544018*omega[1.72048] + 6.49999999999999*omega[2.0]) : 0.0 : True
+ 2.114208 : 0.0 : domegadt[2.114208] - (-5.519339620604476*omega[2.0] + 4.377961988969178*omega[2.114208] + 1.4459713076900629*omega[2.553686] - 0.437593198100135*omega[3.167181] + 0.19985260396998084*omega[3.72048] - 0.06685308192460761*omega[4.0]) : 0.0 : True
+ 2.553686 : 0.0 : domegadt[2.553686] - (1.7915342612505238*omega[2.0] - 3.5806903600726603*omega[2.114208] + 0.9030388620417913*omega[2.553686] + 1.1818985880343118*omega[3.167181] - 0.43295039014156045*omega[3.72048] + 0.137169038887596*omega[4.0]) : 0.0 : True
+ 3.167181 : 0.0 : domegadt[3.167181] - (-1.1720857789519332*omega[2.0] + 2.061082623121699*omega[2.114208] - 2.2480085629067506*omega[2.553686] + 0.4283826226986418*omega[3.167181] + 1.2591604746055074*omega[3.72048] - 0.3285313785671775*omega[4.0]) : 0.0 : True
+ 3.72048 : 0.0 : domegadt[3.72048] - (1.141317750102841*omega[2.0] - 1.9393316098620392*omega[2.114208] + 1.6965759590324723*omega[2.553686] - 2.5941704532035765*omega[3.167181] + 0.2906165262903779*omega[3.72048] + 1.4049918276398599*omega[4.0]) : 0.0 : True
+ 4.0 : 0.0 : domegadt[4.0] - (-2.4999999999999947*omega[2.0] + 4.206212111797173*omega[2.114208] - 3.4851280583284003*omega[2.553686] + 4.388557102075248*omega[3.167181] - 9.109641155544018*omega[3.72048] + 6.49999999999999*omega[4.0]) : 0.0 : True
+ 4.114208 : 0.0 : domegadt[4.114208] - (-5.519339620604476*omega[4.0] + 4.377961988969178*omega[4.114208] + 1.4459713076900629*omega[4.553686] - 0.437593198100135*omega[5.167181] + 0.19985260396998084*omega[5.72048] - 0.06685308192460761*omega[6.0]) : 0.0 : True
+ 4.553686 : 0.0 : domegadt[4.553686] - (1.7915342612505238*omega[4.0] - 3.5806903600726603*omega[4.114208] + 0.9030388620417913*omega[4.553686] + 1.1818985880343118*omega[5.167181] - 0.43295039014156045*omega[5.72048] + 0.137169038887596*omega[6.0]) : 0.0 : True
+ 5.167181 : 0.0 : domegadt[5.167181] - (-1.1720857789519332*omega[4.0] + 2.061082623121699*omega[4.114208] - 2.2480085629067506*omega[4.553686] + 0.4283826226986418*omega[5.167181] + 1.2591604746055074*omega[5.72048] - 0.3285313785671775*omega[6.0]) : 0.0 : True
+ 5.72048 : 0.0 : domegadt[5.72048] - (1.141317750102841*omega[4.0] - 1.9393316098620392*omega[4.114208] + 1.6965759590324723*omega[4.553686] - 2.5941704532035765*omega[5.167181] + 0.2906165262903779*omega[5.72048] + 1.4049918276398599*omega[6.0]) : 0.0 : True
+ 6.0 : 0.0 : domegadt[6.0] - (-2.4999999999999947*omega[4.0] + 4.206212111797173*omega[4.114208] - 3.4851280583284003*omega[4.553686] + 4.388557102075248*omega[5.167181] - 9.109641155544018*omega[5.72048] + 6.49999999999999*omega[6.0]) : 0.0 : True
+ 6.114208 : 0.0 : domegadt[6.114208] - (-5.519339620604476*omega[6.0] + 4.377961988969178*omega[6.114208] + 1.4459713076900629*omega[6.553686] - 0.437593198100135*omega[7.167181] + 0.19985260396998084*omega[7.72048] - 0.06685308192460761*omega[8.0]) : 0.0 : True
+ 6.553686 : 0.0 : domegadt[6.553686] - (1.7915342612505238*omega[6.0] - 3.5806903600726603*omega[6.114208] + 0.9030388620417913*omega[6.553686] + 1.1818985880343118*omega[7.167181] - 0.43295039014156045*omega[7.72048] + 0.137169038887596*omega[8.0]) : 0.0 : True
+ 7.167181 : 0.0 : domegadt[7.167181] - (-1.1720857789519332*omega[6.0] + 2.061082623121699*omega[6.114208] - 2.2480085629067506*omega[6.553686] + 0.4283826226986418*omega[7.167181] + 1.2591604746055074*omega[7.72048] - 0.3285313785671775*omega[8.0]) : 0.0 : True
+ 7.72048 : 0.0 : domegadt[7.72048] - (1.141317750102841*omega[6.0] - 1.9393316098620392*omega[6.114208] + 1.6965759590324723*omega[6.553686] - 2.5941704532035765*omega[7.167181] + 0.2906165262903779*omega[7.72048] + 1.4049918276398599*omega[8.0]) : 0.0 : True
+ 8.0 : 0.0 : domegadt[8.0] - (-2.4999999999999947*omega[6.0] + 4.206212111797173*omega[6.114208] - 3.4851280583284003*omega[6.553686] + 4.388557102075248*omega[7.167181] - 9.109641155544018*omega[7.72048] + 6.49999999999999*omega[8.0]) : 0.0 : True
+ 8.114208 : 0.0 : domegadt[8.114208] - (-5.519339620604476*omega[8.0] + 4.377961988969178*omega[8.114208] + 1.4459713076900629*omega[8.553686] - 0.437593198100135*omega[9.167181] + 0.19985260396998084*omega[9.72048] - 0.06685308192460761*omega[10.0]) : 0.0 : True
+ 8.553686 : 0.0 : domegadt[8.553686] - (1.7915342612505238*omega[8.0] - 3.5806903600726603*omega[8.114208] + 0.9030388620417913*omega[8.553686] + 1.1818985880343118*omega[9.167181] - 0.43295039014156045*omega[9.72048] + 0.137169038887596*omega[10.0]) : 0.0 : True
+ 9.167181 : 0.0 : domegadt[9.167181] - (-1.1720857789519332*omega[8.0] + 2.061082623121699*omega[8.114208] - 2.2480085629067506*omega[8.553686] + 0.4283826226986418*omega[9.167181] + 1.2591604746055074*omega[9.72048] - 0.3285313785671775*omega[10.0]) : 0.0 : True
+ 9.72048 : 0.0 : domegadt[9.72048] - (1.141317750102841*omega[8.0] - 1.9393316098620392*omega[8.114208] + 1.6965759590324723*omega[8.553686] - 2.5941704532035765*omega[9.167181] + 0.2906165262903779*omega[9.72048] + 1.4049918276398599*omega[10.0]) : 0.0 : True
+ 10.0 : 0.0 : domegadt[10.0] - (-2.4999999999999947*omega[8.0] + 4.206212111797173*omega[8.114208] - 3.4851280583284003*omega[8.553686] + 4.388557102075248*omega[9.167181] - 9.109641155544018*omega[9.72048] + 6.49999999999999*omega[10.0]) : 0.0 : True
+ 10.114208 : 0.0 : domegadt[10.114208] - (-5.519339620604476*omega[10.0] + 4.377961988969178*omega[10.114208] + 1.4459713076900629*omega[10.553686] - 0.437593198100135*omega[11.167181] + 0.19985260396998084*omega[11.72048] - 0.06685308192460761*omega[12.0]) : 0.0 : True
+ 10.553686 : 0.0 : domegadt[10.553686] - (1.7915342612505238*omega[10.0] - 3.5806903600726603*omega[10.114208] + 0.9030388620417913*omega[10.553686] + 1.1818985880343118*omega[11.167181] - 0.43295039014156045*omega[11.72048] + 0.137169038887596*omega[12.0]) : 0.0 : True
+ 11.167181 : 0.0 : domegadt[11.167181] - (-1.1720857789519332*omega[10.0] + 2.061082623121699*omega[10.114208] - 2.2480085629067506*omega[10.553686] + 0.4283826226986418*omega[11.167181] + 1.2591604746055074*omega[11.72048] - 0.3285313785671775*omega[12.0]) : 0.0 : True
+ 11.72048 : 0.0 : domegadt[11.72048] - (1.141317750102841*omega[10.0] - 1.9393316098620392*omega[10.114208] + 1.6965759590324723*omega[10.553686] - 2.5941704532035765*omega[11.167181] + 0.2906165262903779*omega[11.72048] + 1.4049918276398599*omega[12.0]) : 0.0 : True
+ 12.0 : 0.0 : domegadt[12.0] - (-2.4999999999999947*omega[10.0] + 4.206212111797173*omega[10.114208] - 3.4851280583284003*omega[10.553686] + 4.388557102075248*omega[11.167181] - 9.109641155544018*omega[11.72048] + 6.49999999999999*omega[12.0]) : 0.0 : True
+ 12.114208 : 0.0 : domegadt[12.114208] - (-5.519339620604476*omega[12.0] + 4.377961988969178*omega[12.114208] + 1.4459713076900629*omega[12.553686] - 0.437593198100135*omega[13.167181] + 0.19985260396998084*omega[13.72048] - 0.06685308192460761*omega[14.0]) : 0.0 : True
+ 12.553686 : 0.0 : domegadt[12.553686] - (1.7915342612505238*omega[12.0] - 3.5806903600726603*omega[12.114208] + 0.9030388620417913*omega[12.553686] + 1.1818985880343118*omega[13.167181] - 0.43295039014156045*omega[13.72048] + 0.137169038887596*omega[14.0]) : 0.0 : True
+ 13.167181 : 0.0 : domegadt[13.167181] - (-1.1720857789519332*omega[12.0] + 2.061082623121699*omega[12.114208] - 2.2480085629067506*omega[12.553686] + 0.4283826226986418*omega[13.167181] + 1.2591604746055074*omega[13.72048] - 0.3285313785671775*omega[14.0]) : 0.0 : True
+ 13.72048 : 0.0 : domegadt[13.72048] - (1.141317750102841*omega[12.0] - 1.9393316098620392*omega[12.114208] + 1.6965759590324723*omega[12.553686] - 2.5941704532035765*omega[13.167181] + 0.2906165262903779*omega[13.72048] + 1.4049918276398599*omega[14.0]) : 0.0 : True
+ 14.0 : 0.0 : domegadt[14.0] - (-2.4999999999999947*omega[12.0] + 4.206212111797173*omega[12.114208] - 3.4851280583284003*omega[12.553686] + 4.388557102075248*omega[13.167181] - 9.109641155544018*omega[13.72048] + 6.49999999999999*omega[14.0]) : 0.0 : True
+ 14.114208 : 0.0 : domegadt[14.114208] - (-5.519339620604476*omega[14.0] + 4.377961988969178*omega[14.114208] + 1.4459713076900629*omega[14.553686] - 0.437593198100135*omega[15.167181] + 0.19985260396998084*omega[15.72048] - 0.06685308192460761*omega[16.0]) : 0.0 : True
+ 14.553686 : 0.0 : domegadt[14.553686] - (1.7915342612505238*omega[14.0] - 3.5806903600726603*omega[14.114208] + 0.9030388620417913*omega[14.553686] + 1.1818985880343118*omega[15.167181] - 0.43295039014156045*omega[15.72048] + 0.137169038887596*omega[16.0]) : 0.0 : True
+ 15.167181 : 0.0 : domegadt[15.167181] - (-1.1720857789519332*omega[14.0] + 2.061082623121699*omega[14.114208] - 2.2480085629067506*omega[14.553686] + 0.4283826226986418*omega[15.167181] + 1.2591604746055074*omega[15.72048] - 0.3285313785671775*omega[16.0]) : 0.0 : True
+ 15.72048 : 0.0 : domegadt[15.72048] - (1.141317750102841*omega[14.0] - 1.9393316098620392*omega[14.114208] + 1.6965759590324723*omega[14.553686] - 2.5941704532035765*omega[15.167181] + 0.2906165262903779*omega[15.72048] + 1.4049918276398599*omega[16.0]) : 0.0 : True
+ 16.0 : 0.0 : domegadt[16.0] - (-2.4999999999999947*omega[14.0] + 4.206212111797173*omega[14.114208] - 3.4851280583284003*omega[14.553686] + 4.388557102075248*omega[15.167181] - 9.109641155544018*omega[15.72048] + 6.49999999999999*omega[16.0]) : 0.0 : True
+ 16.114208 : 0.0 : domegadt[16.114208] - (-5.519339620604476*omega[16.0] + 4.377961988969178*omega[16.114208] + 1.4459713076900629*omega[16.553686] - 0.437593198100135*omega[17.167181] + 0.19985260396998084*omega[17.72048] - 0.06685308192460761*omega[18.0]) : 0.0 : True
+ 16.553686 : 0.0 : domegadt[16.553686] - (1.7915342612505238*omega[16.0] - 3.5806903600726603*omega[16.114208] + 0.9030388620417913*omega[16.553686] + 1.1818985880343118*omega[17.167181] - 0.43295039014156045*omega[17.72048] + 0.137169038887596*omega[18.0]) : 0.0 : True
+ 17.167181 : 0.0 : domegadt[17.167181] - (-1.1720857789519332*omega[16.0] + 2.061082623121699*omega[16.114208] - 2.2480085629067506*omega[16.553686] + 0.4283826226986418*omega[17.167181] + 1.2591604746055074*omega[17.72048] - 0.3285313785671775*omega[18.0]) : 0.0 : True
+ 17.72048 : 0.0 : domegadt[17.72048] - (1.141317750102841*omega[16.0] - 1.9393316098620392*omega[16.114208] + 1.6965759590324723*omega[16.553686] - 2.5941704532035765*omega[17.167181] + 0.2906165262903779*omega[17.72048] + 1.4049918276398599*omega[18.0]) : 0.0 : True
+ 18.0 : 0.0 : domegadt[18.0] - (-2.4999999999999947*omega[16.0] + 4.206212111797173*omega[16.114208] - 3.4851280583284003*omega[16.553686] + 4.388557102075248*omega[17.167181] - 9.109641155544018*omega[17.72048] + 6.49999999999999*omega[18.0]) : 0.0 : True
+ 18.114208 : 0.0 : domegadt[18.114208] - (-5.519339620604476*omega[18.0] + 4.377961988969178*omega[18.114208] + 1.4459713076900629*omega[18.553686] - 0.437593198100135*omega[19.167181] + 0.19985260396998084*omega[19.72048] - 0.06685308192460761*omega[20.0]) : 0.0 : True
+ 18.553686 : 0.0 : domegadt[18.553686] - (1.7915342612505238*omega[18.0] - 3.5806903600726603*omega[18.114208] + 0.9030388620417913*omega[18.553686] + 1.1818985880343118*omega[19.167181] - 0.43295039014156045*omega[19.72048] + 0.137169038887596*omega[20.0]) : 0.0 : True
+ 19.167181 : 0.0 : domegadt[19.167181] - (-1.1720857789519332*omega[18.0] + 2.061082623121699*omega[18.114208] - 2.2480085629067506*omega[18.553686] + 0.4283826226986418*omega[19.167181] + 1.2591604746055074*omega[19.72048] - 0.3285313785671775*omega[20.0]) : 0.0 : True
+ 19.72048 : 0.0 : domegadt[19.72048] - (1.141317750102841*omega[18.0] - 1.9393316098620392*omega[18.114208] + 1.6965759590324723*omega[18.553686] - 2.5941704532035765*omega[19.167181] + 0.2906165262903779*omega[19.72048] + 1.4049918276398599*omega[20.0]) : 0.0 : True
+ 20.0 : 0.0 : domegadt[20.0] - (-2.4999999999999947*omega[18.0] + 4.206212111797173*omega[18.114208] - 3.4851280583284003*omega[18.553686] + 4.388557102075248*omega[19.167181] - 9.109641155544018*omega[19.72048] + 6.49999999999999*omega[20.0]) : 0.0 : True
dthetadt_disc_eq : Size=50, Index=t, Active=True
- Key : Lower : Body : Upper : Active
- 0.114208 : 0.0 : dthetadt[0.114208] + 5.5193396206*theta[0.0] - 4.37796198897*theta[0.114208] - 1.44597130769*theta[0.553686] + 0.4375931981*theta[1.167181] - 0.19985260397*theta[1.72048] + 0.0668530819246*theta[2.0] : 0.0 : True
- 0.553686 : 0.0 : dthetadt[0.553686] - 1.79153426125*theta[0.0] + 3.58069036007*theta[0.114208] - 0.903038862042*theta[0.553686] - 1.18189858803*theta[1.167181] + 0.432950390142*theta[1.72048] - 0.137169038888*theta[2.0] : 0.0 : True
- 1.167181 : 0.0 : dthetadt[1.167181] + 1.17208577895*theta[0.0] - 2.06108262312*theta[0.114208] + 2.24800856291*theta[0.553686] - 0.428382622699*theta[1.167181] - 1.25916047461*theta[1.72048] + 0.328531378567*theta[2.0] : 0.0 : True
- 1.72048 : 0.0 : dthetadt[1.72048] - 1.1413177501*theta[0.0] + 1.93933160986*theta[0.114208] - 1.69657595903*theta[0.553686] + 2.5941704532*theta[1.167181] - 0.29061652629*theta[1.72048] - 1.40499182764*theta[2.0] : 0.0 : True
- 2.0 : 0.0 : dthetadt[2.0] + 2.5*theta[0.0] - 4.2062121118*theta[0.114208] + 3.48512805833*theta[0.553686] - 4.38855710208*theta[1.167181] + 9.10964115554*theta[1.72048] - 6.5*theta[2.0] : 0.0 : True
- 2.114208 : 0.0 : dthetadt[2.114208] + 5.5193396206*theta[2.0] - 4.37796198897*theta[2.114208] - 1.44597130769*theta[2.553686] + 0.4375931981*theta[3.167181] - 0.19985260397*theta[3.72048] + 0.0668530819246*theta[4.0] : 0.0 : True
- 2.553686 : 0.0 : dthetadt[2.553686] - 1.79153426125*theta[2.0] + 3.58069036007*theta[2.114208] - 0.903038862042*theta[2.553686] - 1.18189858803*theta[3.167181] + 0.432950390142*theta[3.72048] - 0.137169038888*theta[4.0] : 0.0 : True
- 3.167181 : 0.0 : dthetadt[3.167181] + 1.17208577895*theta[2.0] - 2.06108262312*theta[2.114208] + 2.24800856291*theta[2.553686] - 0.428382622699*theta[3.167181] - 1.25916047461*theta[3.72048] + 0.328531378567*theta[4.0] : 0.0 : True
- 3.72048 : 0.0 : dthetadt[3.72048] - 1.1413177501*theta[2.0] + 1.93933160986*theta[2.114208] - 1.69657595903*theta[2.553686] + 2.5941704532*theta[3.167181] - 0.29061652629*theta[3.72048] - 1.40499182764*theta[4.0] : 0.0 : True
- 4.0 : 0.0 : dthetadt[4.0] + 2.5*theta[2.0] - 4.2062121118*theta[2.114208] + 3.48512805833*theta[2.553686] - 4.38855710208*theta[3.167181] + 9.10964115554*theta[3.72048] - 6.5*theta[4.0] : 0.0 : True
- 4.114208 : 0.0 : dthetadt[4.114208] + 5.5193396206*theta[4.0] - 4.37796198897*theta[4.114208] - 1.44597130769*theta[4.553686] + 0.4375931981*theta[5.167181] - 0.19985260397*theta[5.72048] + 0.0668530819246*theta[6.0] : 0.0 : True
- 4.553686 : 0.0 : dthetadt[4.553686] - 1.79153426125*theta[4.0] + 3.58069036007*theta[4.114208] - 0.903038862042*theta[4.553686] - 1.18189858803*theta[5.167181] + 0.432950390142*theta[5.72048] - 0.137169038888*theta[6.0] : 0.0 : True
- 5.167181 : 0.0 : dthetadt[5.167181] + 1.17208577895*theta[4.0] - 2.06108262312*theta[4.114208] + 2.24800856291*theta[4.553686] - 0.428382622699*theta[5.167181] - 1.25916047461*theta[5.72048] + 0.328531378567*theta[6.0] : 0.0 : True
- 5.72048 : 0.0 : dthetadt[5.72048] - 1.1413177501*theta[4.0] + 1.93933160986*theta[4.114208] - 1.69657595903*theta[4.553686] + 2.5941704532*theta[5.167181] - 0.29061652629*theta[5.72048] - 1.40499182764*theta[6.0] : 0.0 : True
- 6.0 : 0.0 : dthetadt[6.0] + 2.5*theta[4.0] - 4.2062121118*theta[4.114208] + 3.48512805833*theta[4.553686] - 4.38855710208*theta[5.167181] + 9.10964115554*theta[5.72048] - 6.5*theta[6.0] : 0.0 : True
- 6.114208 : 0.0 : dthetadt[6.114208] + 5.5193396206*theta[6.0] - 4.37796198897*theta[6.114208] - 1.44597130769*theta[6.553686] + 0.4375931981*theta[7.167181] - 0.19985260397*theta[7.72048] + 0.0668530819246*theta[8.0] : 0.0 : True
- 6.553686 : 0.0 : dthetadt[6.553686] - 1.79153426125*theta[6.0] + 3.58069036007*theta[6.114208] - 0.903038862042*theta[6.553686] - 1.18189858803*theta[7.167181] + 0.432950390142*theta[7.72048] - 0.137169038888*theta[8.0] : 0.0 : True
- 7.167181 : 0.0 : dthetadt[7.167181] + 1.17208577895*theta[6.0] - 2.06108262312*theta[6.114208] + 2.24800856291*theta[6.553686] - 0.428382622699*theta[7.167181] - 1.25916047461*theta[7.72048] + 0.328531378567*theta[8.0] : 0.0 : True
- 7.72048 : 0.0 : dthetadt[7.72048] - 1.1413177501*theta[6.0] + 1.93933160986*theta[6.114208] - 1.69657595903*theta[6.553686] + 2.5941704532*theta[7.167181] - 0.29061652629*theta[7.72048] - 1.40499182764*theta[8.0] : 0.0 : True
- 8.0 : 0.0 : dthetadt[8.0] + 2.5*theta[6.0] - 4.2062121118*theta[6.114208] + 3.48512805833*theta[6.553686] - 4.38855710208*theta[7.167181] + 9.10964115554*theta[7.72048] - 6.5*theta[8.0] : 0.0 : True
- 8.114208 : 0.0 : dthetadt[8.114208] + 5.5193396206*theta[8.0] - 4.37796198897*theta[8.114208] - 1.44597130769*theta[8.553686] + 0.4375931981*theta[9.167181] - 0.19985260397*theta[9.72048] + 0.0668530819246*theta[10.0] : 0.0 : True
- 8.553686 : 0.0 : dthetadt[8.553686] - 1.79153426125*theta[8.0] + 3.58069036007*theta[8.114208] - 0.903038862042*theta[8.553686] - 1.18189858803*theta[9.167181] + 0.432950390142*theta[9.72048] - 0.137169038888*theta[10.0] : 0.0 : True
- 9.167181 : 0.0 : dthetadt[9.167181] + 1.17208577895*theta[8.0] - 2.06108262312*theta[8.114208] + 2.24800856291*theta[8.553686] - 0.428382622699*theta[9.167181] - 1.25916047461*theta[9.72048] + 0.328531378567*theta[10.0] : 0.0 : True
- 9.72048 : 0.0 : dthetadt[9.72048] - 1.1413177501*theta[8.0] + 1.93933160986*theta[8.114208] - 1.69657595903*theta[8.553686] + 2.5941704532*theta[9.167181] - 0.29061652629*theta[9.72048] - 1.40499182764*theta[10.0] : 0.0 : True
- 10.0 : 0.0 : dthetadt[10.0] + 2.5*theta[8.0] - 4.2062121118*theta[8.114208] + 3.48512805833*theta[8.553686] - 4.38855710208*theta[9.167181] + 9.10964115554*theta[9.72048] - 6.5*theta[10.0] : 0.0 : True
- 10.114208 : 0.0 : dthetadt[10.114208] + 5.5193396206*theta[10.0] - 4.37796198897*theta[10.114208] - 1.44597130769*theta[10.553686] + 0.4375931981*theta[11.167181] - 0.19985260397*theta[11.72048] + 0.0668530819246*theta[12.0] : 0.0 : True
- 10.553686 : 0.0 : dthetadt[10.553686] - 1.79153426125*theta[10.0] + 3.58069036007*theta[10.114208] - 0.903038862042*theta[10.553686] - 1.18189858803*theta[11.167181] + 0.432950390142*theta[11.72048] - 0.137169038888*theta[12.0] : 0.0 : True
- 11.167181 : 0.0 : dthetadt[11.167181] + 1.17208577895*theta[10.0] - 2.06108262312*theta[10.114208] + 2.24800856291*theta[10.553686] - 0.428382622699*theta[11.167181] - 1.25916047461*theta[11.72048] + 0.328531378567*theta[12.0] : 0.0 : True
- 11.72048 : 0.0 : dthetadt[11.72048] - 1.1413177501*theta[10.0] + 1.93933160986*theta[10.114208] - 1.69657595903*theta[10.553686] + 2.5941704532*theta[11.167181] - 0.29061652629*theta[11.72048] - 1.40499182764*theta[12.0] : 0.0 : True
- 12.0 : 0.0 : dthetadt[12.0] + 2.5*theta[10.0] - 4.2062121118*theta[10.114208] + 3.48512805833*theta[10.553686] - 4.38855710208*theta[11.167181] + 9.10964115554*theta[11.72048] - 6.5*theta[12.0] : 0.0 : True
- 12.114208 : 0.0 : dthetadt[12.114208] + 5.5193396206*theta[12.0] - 4.37796198897*theta[12.114208] - 1.44597130769*theta[12.553686] + 0.4375931981*theta[13.167181] - 0.19985260397*theta[13.72048] + 0.0668530819246*theta[14.0] : 0.0 : True
- 12.553686 : 0.0 : dthetadt[12.553686] - 1.79153426125*theta[12.0] + 3.58069036007*theta[12.114208] - 0.903038862042*theta[12.553686] - 1.18189858803*theta[13.167181] + 0.432950390142*theta[13.72048] - 0.137169038888*theta[14.0] : 0.0 : True
- 13.167181 : 0.0 : dthetadt[13.167181] + 1.17208577895*theta[12.0] - 2.06108262312*theta[12.114208] + 2.24800856291*theta[12.553686] - 0.428382622699*theta[13.167181] - 1.25916047461*theta[13.72048] + 0.328531378567*theta[14.0] : 0.0 : True
- 13.72048 : 0.0 : dthetadt[13.72048] - 1.1413177501*theta[12.0] + 1.93933160986*theta[12.114208] - 1.69657595903*theta[12.553686] + 2.5941704532*theta[13.167181] - 0.29061652629*theta[13.72048] - 1.40499182764*theta[14.0] : 0.0 : True
- 14.0 : 0.0 : dthetadt[14.0] + 2.5*theta[12.0] - 4.2062121118*theta[12.114208] + 3.48512805833*theta[12.553686] - 4.38855710208*theta[13.167181] + 9.10964115554*theta[13.72048] - 6.5*theta[14.0] : 0.0 : True
- 14.114208 : 0.0 : dthetadt[14.114208] + 5.5193396206*theta[14.0] - 4.37796198897*theta[14.114208] - 1.44597130769*theta[14.553686] + 0.4375931981*theta[15.167181] - 0.19985260397*theta[15.72048] + 0.0668530819246*theta[16.0] : 0.0 : True
- 14.553686 : 0.0 : dthetadt[14.553686] - 1.79153426125*theta[14.0] + 3.58069036007*theta[14.114208] - 0.903038862042*theta[14.553686] - 1.18189858803*theta[15.167181] + 0.432950390142*theta[15.72048] - 0.137169038888*theta[16.0] : 0.0 : True
- 15.167181 : 0.0 : dthetadt[15.167181] + 1.17208577895*theta[14.0] - 2.06108262312*theta[14.114208] + 2.24800856291*theta[14.553686] - 0.428382622699*theta[15.167181] - 1.25916047461*theta[15.72048] + 0.328531378567*theta[16.0] : 0.0 : True
- 15.72048 : 0.0 : dthetadt[15.72048] - 1.1413177501*theta[14.0] + 1.93933160986*theta[14.114208] - 1.69657595903*theta[14.553686] + 2.5941704532*theta[15.167181] - 0.29061652629*theta[15.72048] - 1.40499182764*theta[16.0] : 0.0 : True
- 16.0 : 0.0 : dthetadt[16.0] + 2.5*theta[14.0] - 4.2062121118*theta[14.114208] + 3.48512805833*theta[14.553686] - 4.38855710208*theta[15.167181] + 9.10964115554*theta[15.72048] - 6.5*theta[16.0] : 0.0 : True
- 16.114208 : 0.0 : dthetadt[16.114208] + 5.5193396206*theta[16.0] - 4.37796198897*theta[16.114208] - 1.44597130769*theta[16.553686] + 0.4375931981*theta[17.167181] - 0.19985260397*theta[17.72048] + 0.0668530819246*theta[18.0] : 0.0 : True
- 16.553686 : 0.0 : dthetadt[16.553686] - 1.79153426125*theta[16.0] + 3.58069036007*theta[16.114208] - 0.903038862042*theta[16.553686] - 1.18189858803*theta[17.167181] + 0.432950390142*theta[17.72048] - 0.137169038888*theta[18.0] : 0.0 : True
- 17.167181 : 0.0 : dthetadt[17.167181] + 1.17208577895*theta[16.0] - 2.06108262312*theta[16.114208] + 2.24800856291*theta[16.553686] - 0.428382622699*theta[17.167181] - 1.25916047461*theta[17.72048] + 0.328531378567*theta[18.0] : 0.0 : True
- 17.72048 : 0.0 : dthetadt[17.72048] - 1.1413177501*theta[16.0] + 1.93933160986*theta[16.114208] - 1.69657595903*theta[16.553686] + 2.5941704532*theta[17.167181] - 0.29061652629*theta[17.72048] - 1.40499182764*theta[18.0] : 0.0 : True
- 18.0 : 0.0 : dthetadt[18.0] + 2.5*theta[16.0] - 4.2062121118*theta[16.114208] + 3.48512805833*theta[16.553686] - 4.38855710208*theta[17.167181] + 9.10964115554*theta[17.72048] - 6.5*theta[18.0] : 0.0 : True
- 18.114208 : 0.0 : dthetadt[18.114208] + 5.5193396206*theta[18.0] - 4.37796198897*theta[18.114208] - 1.44597130769*theta[18.553686] + 0.4375931981*theta[19.167181] - 0.19985260397*theta[19.72048] + 0.0668530819246*theta[20.0] : 0.0 : True
- 18.553686 : 0.0 : dthetadt[18.553686] - 1.79153426125*theta[18.0] + 3.58069036007*theta[18.114208] - 0.903038862042*theta[18.553686] - 1.18189858803*theta[19.167181] + 0.432950390142*theta[19.72048] - 0.137169038888*theta[20.0] : 0.0 : True
- 19.167181 : 0.0 : dthetadt[19.167181] + 1.17208577895*theta[18.0] - 2.06108262312*theta[18.114208] + 2.24800856291*theta[18.553686] - 0.428382622699*theta[19.167181] - 1.25916047461*theta[19.72048] + 0.328531378567*theta[20.0] : 0.0 : True
- 19.72048 : 0.0 : dthetadt[19.72048] - 1.1413177501*theta[18.0] + 1.93933160986*theta[18.114208] - 1.69657595903*theta[18.553686] + 2.5941704532*theta[19.167181] - 0.29061652629*theta[19.72048] - 1.40499182764*theta[20.0] : 0.0 : True
- 20.0 : 0.0 : dthetadt[20.0] + 2.5*theta[18.0] - 4.2062121118*theta[18.114208] + 3.48512805833*theta[18.553686] - 4.38855710208*theta[19.167181] + 9.10964115554*theta[19.72048] - 6.5*theta[20.0] : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ 0.114208 : 0.0 : dthetadt[0.114208] - (-5.519339620604476*theta[0.0] + 4.377961988969178*theta[0.114208] + 1.4459713076900629*theta[0.553686] - 0.437593198100135*theta[1.167181] + 0.19985260396998084*theta[1.72048] - 0.06685308192460761*theta[2.0]) : 0.0 : True
+ 0.553686 : 0.0 : dthetadt[0.553686] - (1.7915342612505238*theta[0.0] - 3.5806903600726603*theta[0.114208] + 0.9030388620417913*theta[0.553686] + 1.1818985880343118*theta[1.167181] - 0.43295039014156045*theta[1.72048] + 0.137169038887596*theta[2.0]) : 0.0 : True
+ 1.167181 : 0.0 : dthetadt[1.167181] - (-1.1720857789519332*theta[0.0] + 2.061082623121699*theta[0.114208] - 2.2480085629067506*theta[0.553686] + 0.4283826226986418*theta[1.167181] + 1.2591604746055074*theta[1.72048] - 0.3285313785671775*theta[2.0]) : 0.0 : True
+ 1.72048 : 0.0 : dthetadt[1.72048] - (1.141317750102841*theta[0.0] - 1.9393316098620392*theta[0.114208] + 1.6965759590324723*theta[0.553686] - 2.5941704532035765*theta[1.167181] + 0.2906165262903779*theta[1.72048] + 1.4049918276398599*theta[2.0]) : 0.0 : True
+ 2.0 : 0.0 : dthetadt[2.0] - (-2.4999999999999947*theta[0.0] + 4.206212111797173*theta[0.114208] - 3.4851280583284003*theta[0.553686] + 4.388557102075248*theta[1.167181] - 9.109641155544018*theta[1.72048] + 6.49999999999999*theta[2.0]) : 0.0 : True
+ 2.114208 : 0.0 : dthetadt[2.114208] - (-5.519339620604476*theta[2.0] + 4.377961988969178*theta[2.114208] + 1.4459713076900629*theta[2.553686] - 0.437593198100135*theta[3.167181] + 0.19985260396998084*theta[3.72048] - 0.06685308192460761*theta[4.0]) : 0.0 : True
+ 2.553686 : 0.0 : dthetadt[2.553686] - (1.7915342612505238*theta[2.0] - 3.5806903600726603*theta[2.114208] + 0.9030388620417913*theta[2.553686] + 1.1818985880343118*theta[3.167181] - 0.43295039014156045*theta[3.72048] + 0.137169038887596*theta[4.0]) : 0.0 : True
+ 3.167181 : 0.0 : dthetadt[3.167181] - (-1.1720857789519332*theta[2.0] + 2.061082623121699*theta[2.114208] - 2.2480085629067506*theta[2.553686] + 0.4283826226986418*theta[3.167181] + 1.2591604746055074*theta[3.72048] - 0.3285313785671775*theta[4.0]) : 0.0 : True
+ 3.72048 : 0.0 : dthetadt[3.72048] - (1.141317750102841*theta[2.0] - 1.9393316098620392*theta[2.114208] + 1.6965759590324723*theta[2.553686] - 2.5941704532035765*theta[3.167181] + 0.2906165262903779*theta[3.72048] + 1.4049918276398599*theta[4.0]) : 0.0 : True
+ 4.0 : 0.0 : dthetadt[4.0] - (-2.4999999999999947*theta[2.0] + 4.206212111797173*theta[2.114208] - 3.4851280583284003*theta[2.553686] + 4.388557102075248*theta[3.167181] - 9.109641155544018*theta[3.72048] + 6.49999999999999*theta[4.0]) : 0.0 : True
+ 4.114208 : 0.0 : dthetadt[4.114208] - (-5.519339620604476*theta[4.0] + 4.377961988969178*theta[4.114208] + 1.4459713076900629*theta[4.553686] - 0.437593198100135*theta[5.167181] + 0.19985260396998084*theta[5.72048] - 0.06685308192460761*theta[6.0]) : 0.0 : True
+ 4.553686 : 0.0 : dthetadt[4.553686] - (1.7915342612505238*theta[4.0] - 3.5806903600726603*theta[4.114208] + 0.9030388620417913*theta[4.553686] + 1.1818985880343118*theta[5.167181] - 0.43295039014156045*theta[5.72048] + 0.137169038887596*theta[6.0]) : 0.0 : True
+ 5.167181 : 0.0 : dthetadt[5.167181] - (-1.1720857789519332*theta[4.0] + 2.061082623121699*theta[4.114208] - 2.2480085629067506*theta[4.553686] + 0.4283826226986418*theta[5.167181] + 1.2591604746055074*theta[5.72048] - 0.3285313785671775*theta[6.0]) : 0.0 : True
+ 5.72048 : 0.0 : dthetadt[5.72048] - (1.141317750102841*theta[4.0] - 1.9393316098620392*theta[4.114208] + 1.6965759590324723*theta[4.553686] - 2.5941704532035765*theta[5.167181] + 0.2906165262903779*theta[5.72048] + 1.4049918276398599*theta[6.0]) : 0.0 : True
+ 6.0 : 0.0 : dthetadt[6.0] - (-2.4999999999999947*theta[4.0] + 4.206212111797173*theta[4.114208] - 3.4851280583284003*theta[4.553686] + 4.388557102075248*theta[5.167181] - 9.109641155544018*theta[5.72048] + 6.49999999999999*theta[6.0]) : 0.0 : True
+ 6.114208 : 0.0 : dthetadt[6.114208] - (-5.519339620604476*theta[6.0] + 4.377961988969178*theta[6.114208] + 1.4459713076900629*theta[6.553686] - 0.437593198100135*theta[7.167181] + 0.19985260396998084*theta[7.72048] - 0.06685308192460761*theta[8.0]) : 0.0 : True
+ 6.553686 : 0.0 : dthetadt[6.553686] - (1.7915342612505238*theta[6.0] - 3.5806903600726603*theta[6.114208] + 0.9030388620417913*theta[6.553686] + 1.1818985880343118*theta[7.167181] - 0.43295039014156045*theta[7.72048] + 0.137169038887596*theta[8.0]) : 0.0 : True
+ 7.167181 : 0.0 : dthetadt[7.167181] - (-1.1720857789519332*theta[6.0] + 2.061082623121699*theta[6.114208] - 2.2480085629067506*theta[6.553686] + 0.4283826226986418*theta[7.167181] + 1.2591604746055074*theta[7.72048] - 0.3285313785671775*theta[8.0]) : 0.0 : True
+ 7.72048 : 0.0 : dthetadt[7.72048] - (1.141317750102841*theta[6.0] - 1.9393316098620392*theta[6.114208] + 1.6965759590324723*theta[6.553686] - 2.5941704532035765*theta[7.167181] + 0.2906165262903779*theta[7.72048] + 1.4049918276398599*theta[8.0]) : 0.0 : True
+ 8.0 : 0.0 : dthetadt[8.0] - (-2.4999999999999947*theta[6.0] + 4.206212111797173*theta[6.114208] - 3.4851280583284003*theta[6.553686] + 4.388557102075248*theta[7.167181] - 9.109641155544018*theta[7.72048] + 6.49999999999999*theta[8.0]) : 0.0 : True
+ 8.114208 : 0.0 : dthetadt[8.114208] - (-5.519339620604476*theta[8.0] + 4.377961988969178*theta[8.114208] + 1.4459713076900629*theta[8.553686] - 0.437593198100135*theta[9.167181] + 0.19985260396998084*theta[9.72048] - 0.06685308192460761*theta[10.0]) : 0.0 : True
+ 8.553686 : 0.0 : dthetadt[8.553686] - (1.7915342612505238*theta[8.0] - 3.5806903600726603*theta[8.114208] + 0.9030388620417913*theta[8.553686] + 1.1818985880343118*theta[9.167181] - 0.43295039014156045*theta[9.72048] + 0.137169038887596*theta[10.0]) : 0.0 : True
+ 9.167181 : 0.0 : dthetadt[9.167181] - (-1.1720857789519332*theta[8.0] + 2.061082623121699*theta[8.114208] - 2.2480085629067506*theta[8.553686] + 0.4283826226986418*theta[9.167181] + 1.2591604746055074*theta[9.72048] - 0.3285313785671775*theta[10.0]) : 0.0 : True
+ 9.72048 : 0.0 : dthetadt[9.72048] - (1.141317750102841*theta[8.0] - 1.9393316098620392*theta[8.114208] + 1.6965759590324723*theta[8.553686] - 2.5941704532035765*theta[9.167181] + 0.2906165262903779*theta[9.72048] + 1.4049918276398599*theta[10.0]) : 0.0 : True
+ 10.0 : 0.0 : dthetadt[10.0] - (-2.4999999999999947*theta[8.0] + 4.206212111797173*theta[8.114208] - 3.4851280583284003*theta[8.553686] + 4.388557102075248*theta[9.167181] - 9.109641155544018*theta[9.72048] + 6.49999999999999*theta[10.0]) : 0.0 : True
+ 10.114208 : 0.0 : dthetadt[10.114208] - (-5.519339620604476*theta[10.0] + 4.377961988969178*theta[10.114208] + 1.4459713076900629*theta[10.553686] - 0.437593198100135*theta[11.167181] + 0.19985260396998084*theta[11.72048] - 0.06685308192460761*theta[12.0]) : 0.0 : True
+ 10.553686 : 0.0 : dthetadt[10.553686] - (1.7915342612505238*theta[10.0] - 3.5806903600726603*theta[10.114208] + 0.9030388620417913*theta[10.553686] + 1.1818985880343118*theta[11.167181] - 0.43295039014156045*theta[11.72048] + 0.137169038887596*theta[12.0]) : 0.0 : True
+ 11.167181 : 0.0 : dthetadt[11.167181] - (-1.1720857789519332*theta[10.0] + 2.061082623121699*theta[10.114208] - 2.2480085629067506*theta[10.553686] + 0.4283826226986418*theta[11.167181] + 1.2591604746055074*theta[11.72048] - 0.3285313785671775*theta[12.0]) : 0.0 : True
+ 11.72048 : 0.0 : dthetadt[11.72048] - (1.141317750102841*theta[10.0] - 1.9393316098620392*theta[10.114208] + 1.6965759590324723*theta[10.553686] - 2.5941704532035765*theta[11.167181] + 0.2906165262903779*theta[11.72048] + 1.4049918276398599*theta[12.0]) : 0.0 : True
+ 12.0 : 0.0 : dthetadt[12.0] - (-2.4999999999999947*theta[10.0] + 4.206212111797173*theta[10.114208] - 3.4851280583284003*theta[10.553686] + 4.388557102075248*theta[11.167181] - 9.109641155544018*theta[11.72048] + 6.49999999999999*theta[12.0]) : 0.0 : True
+ 12.114208 : 0.0 : dthetadt[12.114208] - (-5.519339620604476*theta[12.0] + 4.377961988969178*theta[12.114208] + 1.4459713076900629*theta[12.553686] - 0.437593198100135*theta[13.167181] + 0.19985260396998084*theta[13.72048] - 0.06685308192460761*theta[14.0]) : 0.0 : True
+ 12.553686 : 0.0 : dthetadt[12.553686] - (1.7915342612505238*theta[12.0] - 3.5806903600726603*theta[12.114208] + 0.9030388620417913*theta[12.553686] + 1.1818985880343118*theta[13.167181] - 0.43295039014156045*theta[13.72048] + 0.137169038887596*theta[14.0]) : 0.0 : True
+ 13.167181 : 0.0 : dthetadt[13.167181] - (-1.1720857789519332*theta[12.0] + 2.061082623121699*theta[12.114208] - 2.2480085629067506*theta[12.553686] + 0.4283826226986418*theta[13.167181] + 1.2591604746055074*theta[13.72048] - 0.3285313785671775*theta[14.0]) : 0.0 : True
+ 13.72048 : 0.0 : dthetadt[13.72048] - (1.141317750102841*theta[12.0] - 1.9393316098620392*theta[12.114208] + 1.6965759590324723*theta[12.553686] - 2.5941704532035765*theta[13.167181] + 0.2906165262903779*theta[13.72048] + 1.4049918276398599*theta[14.0]) : 0.0 : True
+ 14.0 : 0.0 : dthetadt[14.0] - (-2.4999999999999947*theta[12.0] + 4.206212111797173*theta[12.114208] - 3.4851280583284003*theta[12.553686] + 4.388557102075248*theta[13.167181] - 9.109641155544018*theta[13.72048] + 6.49999999999999*theta[14.0]) : 0.0 : True
+ 14.114208 : 0.0 : dthetadt[14.114208] - (-5.519339620604476*theta[14.0] + 4.377961988969178*theta[14.114208] + 1.4459713076900629*theta[14.553686] - 0.437593198100135*theta[15.167181] + 0.19985260396998084*theta[15.72048] - 0.06685308192460761*theta[16.0]) : 0.0 : True
+ 14.553686 : 0.0 : dthetadt[14.553686] - (1.7915342612505238*theta[14.0] - 3.5806903600726603*theta[14.114208] + 0.9030388620417913*theta[14.553686] + 1.1818985880343118*theta[15.167181] - 0.43295039014156045*theta[15.72048] + 0.137169038887596*theta[16.0]) : 0.0 : True
+ 15.167181 : 0.0 : dthetadt[15.167181] - (-1.1720857789519332*theta[14.0] + 2.061082623121699*theta[14.114208] - 2.2480085629067506*theta[14.553686] + 0.4283826226986418*theta[15.167181] + 1.2591604746055074*theta[15.72048] - 0.3285313785671775*theta[16.0]) : 0.0 : True
+ 15.72048 : 0.0 : dthetadt[15.72048] - (1.141317750102841*theta[14.0] - 1.9393316098620392*theta[14.114208] + 1.6965759590324723*theta[14.553686] - 2.5941704532035765*theta[15.167181] + 0.2906165262903779*theta[15.72048] + 1.4049918276398599*theta[16.0]) : 0.0 : True
+ 16.0 : 0.0 : dthetadt[16.0] - (-2.4999999999999947*theta[14.0] + 4.206212111797173*theta[14.114208] - 3.4851280583284003*theta[14.553686] + 4.388557102075248*theta[15.167181] - 9.109641155544018*theta[15.72048] + 6.49999999999999*theta[16.0]) : 0.0 : True
+ 16.114208 : 0.0 : dthetadt[16.114208] - (-5.519339620604476*theta[16.0] + 4.377961988969178*theta[16.114208] + 1.4459713076900629*theta[16.553686] - 0.437593198100135*theta[17.167181] + 0.19985260396998084*theta[17.72048] - 0.06685308192460761*theta[18.0]) : 0.0 : True
+ 16.553686 : 0.0 : dthetadt[16.553686] - (1.7915342612505238*theta[16.0] - 3.5806903600726603*theta[16.114208] + 0.9030388620417913*theta[16.553686] + 1.1818985880343118*theta[17.167181] - 0.43295039014156045*theta[17.72048] + 0.137169038887596*theta[18.0]) : 0.0 : True
+ 17.167181 : 0.0 : dthetadt[17.167181] - (-1.1720857789519332*theta[16.0] + 2.061082623121699*theta[16.114208] - 2.2480085629067506*theta[16.553686] + 0.4283826226986418*theta[17.167181] + 1.2591604746055074*theta[17.72048] - 0.3285313785671775*theta[18.0]) : 0.0 : True
+ 17.72048 : 0.0 : dthetadt[17.72048] - (1.141317750102841*theta[16.0] - 1.9393316098620392*theta[16.114208] + 1.6965759590324723*theta[16.553686] - 2.5941704532035765*theta[17.167181] + 0.2906165262903779*theta[17.72048] + 1.4049918276398599*theta[18.0]) : 0.0 : True
+ 18.0 : 0.0 : dthetadt[18.0] - (-2.4999999999999947*theta[16.0] + 4.206212111797173*theta[16.114208] - 3.4851280583284003*theta[16.553686] + 4.388557102075248*theta[17.167181] - 9.109641155544018*theta[17.72048] + 6.49999999999999*theta[18.0]) : 0.0 : True
+ 18.114208 : 0.0 : dthetadt[18.114208] - (-5.519339620604476*theta[18.0] + 4.377961988969178*theta[18.114208] + 1.4459713076900629*theta[18.553686] - 0.437593198100135*theta[19.167181] + 0.19985260396998084*theta[19.72048] - 0.06685308192460761*theta[20.0]) : 0.0 : True
+ 18.553686 : 0.0 : dthetadt[18.553686] - (1.7915342612505238*theta[18.0] - 3.5806903600726603*theta[18.114208] + 0.9030388620417913*theta[18.553686] + 1.1818985880343118*theta[19.167181] - 0.43295039014156045*theta[19.72048] + 0.137169038887596*theta[20.0]) : 0.0 : True
+ 19.167181 : 0.0 : dthetadt[19.167181] - (-1.1720857789519332*theta[18.0] + 2.061082623121699*theta[18.114208] - 2.2480085629067506*theta[18.553686] + 0.4283826226986418*theta[19.167181] + 1.2591604746055074*theta[19.72048] - 0.3285313785671775*theta[20.0]) : 0.0 : True
+ 19.72048 : 0.0 : dthetadt[19.72048] - (1.141317750102841*theta[18.0] - 1.9393316098620392*theta[18.114208] + 1.6965759590324723*theta[18.553686] - 2.5941704532035765*theta[19.167181] + 0.2906165262903779*theta[19.72048] + 1.4049918276398599*theta[20.0]) : 0.0 : True
+ 20.0 : 0.0 : dthetadt[20.0] - (-2.4999999999999947*theta[18.0] + 4.206212111797173*theta[18.114208] - 3.4851280583284003*theta[18.553686] + 4.388557102075248*theta[19.167181] - 9.109641155544018*theta[19.72048] + 6.49999999999999*theta[20.0]) : 0.0 : True
1 ContinuousSet Declarations
t : Dim=0, Dimen=1, Size=51, Domain=None, Ordered=Sorted, Bounds=(0.0, 20.0)
@@ -487,7 +487,7 @@
[-0.1925 -0.2939]
[ 1.9708 -0.0745]
[ 0.7553 0.2577]
- [-1.6520 0.1458]
+ [-1.6521 0.1458]
[-1.1979 -0.2028]
[ 1.2226 -0.1972]
[ 1.4942 0.1360]
@@ -502,7 +502,7 @@
[ 0.9634 0.1466]
[-0.8766 0.1552]
[-1.1657 -0.0954]
- [ 0.5032 -0.1745]
+ [ 0.5033 -0.1745]
[ 1.2516 0.0412]
[-0.1252 0.1776]
[-1.2256 0.0110]
@@ -522,28 +522,28 @@
[-0.4105 -0.1061]
[ 0.6733 -0.0728]
[ 0.8014 -0.0351]
- [ 0.5995 0.0824]
- [-0.4903 0.0957]
- [-0.7366 -0.0547]
- [ 0.2776 -0.1108]
- [ 0.8123 0.0228]
- [-0.0446 0.1168]
- [-0.8209 0.0106]
- [-0.1896 -0.1131]
- [ 0.7626 -0.0429]
- [ 0.4062 0.1004]
- [-0.6427 0.0713]
- [-0.5875 -0.0795]
- [ 0.4717 -0.0936]
- [ 0.7193 0.0524]
- [-0.2642 0.1081]
- [-0.7912 -0.0213]
- [ 0.0373 -0.1136]
- [ 0.7979 -0.0112]
- [ 0.1902 0.1098]
- [-0.7395 0.0425]
- [-0.4001 -0.0972]
- [ 0.6215 -0.0700]
- [ 0.5754 0.0768]
- [-0.4542 0.0915]
- [-0.7021 -0.0503]]
+ [ 0.5985 0.0822]
+ [-0.4889 0.0955]
+ [-0.7352 -0.0545]
+ [ 0.2766 -0.1106]
+ [ 0.8106 0.0227]
+ [-0.0441 0.1165]
+ [-0.8192 0.0107]
+ [-0.1896 -0.1129]
+ [ 0.7608 -0.0428]
+ [ 0.4057 0.1001]
+ [-0.6411 0.0712]
+ [-0.5866 -0.0793]
+ [ 0.4704 -0.0934]
+ [ 0.7180 0.0523]
+ [-0.2633 0.1079]
+ [-0.7896 -0.0212]
+ [ 0.0369 -0.1134]
+ [ 0.7962 -0.0112]
+ [ 0.1902 0.1096]
+ [-0.7378 0.0424]
+ [-0.3995 -0.0970]
+ [ 0.6200 -0.0698]
+ [ 0.5744 0.0766]
+ [-0.4530 0.0913]
+ [-0.7008 -0.0501]]
diff --git a/pyomo/dae/tests/test_simulator.py b/pyomo/dae/tests/test_simulator.py
index afc6c0a2af1..a5bb4c88bb4 100644
--- a/pyomo/dae/tests/test_simulator.py
+++ b/pyomo/dae/tests/test_simulator.py
@@ -11,6 +11,7 @@
from __future__ import print_function
import pyutilib.th as unittest
+from pyomo.core.expr import current as EXPR
from pyomo.environ import (
ConcreteModel, RangeSet, Param, Var, Set, value, Constraint,
sin, log, sqrt, TransformationFactory)
@@ -20,18 +21,13 @@
Simulator,
_check_getitemexpression,
_check_productexpression,
- _check_sumexpression,
- substitute_getitem_with_casadi_sym,
- substitute_intrinsic_function_with_casadi,
- substitute_intrinsic_function)
-from pyomo.core.base import expr as EXPR
-from pyomo.core.base import expr_common
+ _check_negationexpression,
+ _check_viewsumexpression,
+ substitute_pyomo2casadi,
+)
from pyomo.core.base.template_expr import (
IndexTemplate,
_GetItemIndexer,
- substitute_template_expression,
- substitute_getitem_with_param,
- substitute_template_with_value,
)
import os
@@ -49,6 +45,10 @@
casadi_available = False
try:
+ import platform
+ if platform.python_implementation() == "PyPy":
+ # Scipy is importable into PyPy, but ODE integrators don't work. (2/18)
+ raise ImportError
import scipy
scipy_available = True
except ImportError:
@@ -70,23 +70,6 @@ def setUp(self):
m.dv = DerivativeVar(m.v)
m.s = Set(initialize=[1, 2, 3], ordered=True)
- # Verifying that the correct exception is raised when simulator
- # functions are used on pyomo 4 expressions which are not supported
- def test_unsupported_pyomo4_expressions(self):
-
- EXPR.set_expression_tree_format(expr_common.Mode.pyomo4_trees)
-
- m = self.m
- t = IndexTemplate(m.t)
-
- # Check multiplication by constant
- e = 5 * m.dv[t] == m.v[t]
-
- with self.assertRaises(TypeError):
- _check_productexpression(e, 0)
-
- EXPR.set_expression_tree_format(expr_common._default_mode)
-
# Testing invalid simulator arguments
def test_invalid_argument_values(self):
@@ -110,6 +93,7 @@ def _con(m, i):
m.del_component('y')
# Testing the simulator's handling of inequality constraints
+ @unittest.skipIf(not scipy_available, "Scipy is not available")
def test_inequality_constraints(self):
m = self.m
@@ -126,6 +110,7 @@ def _deq(m, i):
# Testing various cases of separable differential equations to ensure
# the simulator generates the correct RHS expression
+ @unittest.skipIf(not scipy_available, "Scipy is not available")
def test_separable_diffeq_case2(self):
m = self.m
@@ -161,6 +146,7 @@ def _deqw(m, i, j):
# Testing various cases of separable differential equations to ensure
# the simulator generates the correct RHS expression
+ @unittest.skipIf(not scipy_available, "Scipy is not available")
def test_separable_diffeq_case3(self):
m = self.m
@@ -227,6 +213,7 @@ def _deqw(m, i, j):
# Testing various cases of separable differential equations to ensure
# the simulator generates the correct RHS expression
+ @unittest.skipIf(not scipy_available, "Scipy is not available")
def test_separable_diffeq_case4(self):
m = self.m
@@ -293,6 +280,74 @@ def _deqw(m, i, j):
# Testing various cases of separable differential equations to ensure
# the simulator generates the correct RHS expression
+ @unittest.skipIf(not scipy_available, "Scipy is not available")
+ def test_separable_diffeq_case5(self):
+
+ m = self.m
+ m.w = Var(m.t, m.s)
+ m.dw = DerivativeVar(m.w)
+ m.p = Param(initialize=5)
+ m.mp = Param(initialize=5, mutable=True)
+ m.y = Var()
+
+ t = IndexTemplate(m.t)
+
+ def _deqv(m, i):
+ return m.dv[i] + m.y == m.v[i]**2 + m.v[i]
+ m.deqv = Constraint(m.t, rule=_deqv)
+
+ def _deqw(m, i, j):
+ return m.y + m.dw[i, j] == m.w[i, j]**2 + m.w[i, j]
+ m.deqw = Constraint(m.t, m.s, rule=_deqw)
+
+ mysim = Simulator(m)
+
+ self.assertEqual(len(mysim._diffvars), 4)
+ self.assertEqual(mysim._diffvars[0], _GetItemIndexer(m.v[t]))
+ self.assertEqual(mysim._diffvars[1], _GetItemIndexer(m.w[t, 1]))
+ self.assertEqual(mysim._diffvars[2], _GetItemIndexer(m.w[t, 2]))
+ self.assertEqual(len(mysim._derivlist), 4)
+ self.assertEqual(mysim._derivlist[0], _GetItemIndexer(m.dv[t]))
+ self.assertEqual(mysim._derivlist[1], _GetItemIndexer(m.dw[t, 1]))
+ self.assertEqual(mysim._derivlist[2], _GetItemIndexer(m.dw[t, 2]))
+ self.assertEqual(len(mysim._rhsdict), 4)
+ m.del_component('deqv')
+ m.del_component('deqw')
+ m.del_component('deqv_index')
+ m.del_component('deqw_index')
+
+ def _deqv(m, i):
+ return m.mp + m.dv[i] == m.v[i]**2 + m.v[i]
+ m.deqv = Constraint(m.t, rule=_deqv)
+
+ def _deqw(m, i, j):
+ return m.dw[i, j] + m.p == m.w[i, j]**2 + m.w[i, j]
+ m.deqw = Constraint(m.t, m.s, rule=_deqw)
+
+ mysim = Simulator(m)
+
+ self.assertEqual(len(mysim._diffvars), 4)
+ self.assertEqual(mysim._diffvars[0], _GetItemIndexer(m.v[t]))
+ self.assertEqual(mysim._diffvars[1], _GetItemIndexer(m.w[t, 1]))
+ self.assertEqual(mysim._diffvars[2], _GetItemIndexer(m.w[t, 2]))
+ self.assertEqual(len(mysim._derivlist), 4)
+ self.assertEqual(mysim._derivlist[0], _GetItemIndexer(m.dv[t]))
+ self.assertEqual(mysim._derivlist[1], _GetItemIndexer(m.dw[t, 1]))
+ self.assertEqual(mysim._derivlist[2], _GetItemIndexer(m.dw[t, 2]))
+ self.assertEqual(len(mysim._rhsdict), 4)
+ m.del_component('deqv')
+ m.del_component('deqw')
+ m.del_component('deqv_index')
+ m.del_component('deqw_index')
+ m.del_component('w')
+ m.del_component('dw')
+ m.del_component('p')
+ m.del_component('mp')
+ m.del_component('y')
+
+ # Testing various cases of separable differential equations to ensure
+ # the simulator generates the correct RHS expression
+ @unittest.skipIf(not scipy_available, "Scipy is not available")
def test_separable_diffeq_case6(self):
m = self.m
@@ -357,8 +412,85 @@ def _deqw(m, i, j):
m.del_component('mp')
m.del_component('y')
+ # Testing various cases of separable differential equations to ensure
+ # the simulator generates the correct RHS expression
+ @unittest.skipIf(not scipy_available, "Scipy is not available")
+ def test_separable_diffeq_case8(self):
+
+ m = self.m
+ m.w = Var(m.t, m.s)
+ m.dw = DerivativeVar(m.w)
+ m.p = Param(initialize=5)
+ m.mp = Param(initialize=5, mutable=True)
+ m.y = Var()
+
+ t = IndexTemplate(m.t)
+
+ def _deqv(m, i):
+ return -m.dv[i] == m.v[i]**2 + m.v[i]
+ m.deqv = Constraint(m.t, rule=_deqv)
+
+ def _deqw(m, i, j):
+ return -m.dw[i, j] == m.w[i, j]**2 + m.w[i, j]
+ m.deqw = Constraint(m.t, m.s, rule=_deqw)
+
+ mysim = Simulator(m)
+
+ self.assertEqual(len(mysim._diffvars), 4)
+ self.assertEqual(mysim._diffvars[0], _GetItemIndexer(m.v[t]))
+ self.assertEqual(mysim._diffvars[1], _GetItemIndexer(m.w[t, 1]))
+ self.assertEqual(mysim._diffvars[2], _GetItemIndexer(m.w[t, 2]))
+ self.assertEqual(len(mysim._derivlist), 4)
+ self.assertEqual(mysim._derivlist[0], _GetItemIndexer(m.dv[t]))
+ self.assertEqual(mysim._derivlist[1], _GetItemIndexer(m.dw[t, 1]))
+ self.assertEqual(mysim._derivlist[2], _GetItemIndexer(m.dw[t, 2]))
+ self.assertEqual(len(mysim._rhsdict), 4)
+ m.del_component('deqv')
+ m.del_component('deqw')
+ m.del_component('deqv_index')
+ m.del_component('deqw_index')
+
+ # Testing various cases of separable differential equations to ensure
+ # the simulator generates the correct RHS expression
+ @unittest.skipIf(not scipy_available, "Scipy is not available")
+ def test_separable_diffeq_case9(self):
+
+ m = self.m
+ m.w = Var(m.t, m.s)
+ m.dw = DerivativeVar(m.w)
+ m.p = Param(initialize=5)
+ m.mp = Param(initialize=5, mutable=True)
+ m.y = Var()
+
+ t = IndexTemplate(m.t)
+
+ def _deqv(m, i):
+ return m.v[i]**2 + m.v[i] == -m.dv[i]
+ m.deqv = Constraint(m.t, rule=_deqv)
+
+ def _deqw(m, i, j):
+ return m.w[i, j]**2 + m.w[i, j] == -m.dw[i, j]
+ m.deqw = Constraint(m.t, m.s, rule=_deqw)
+
+ mysim = Simulator(m)
+
+ self.assertEqual(len(mysim._diffvars), 4)
+ self.assertEqual(mysim._diffvars[0], _GetItemIndexer(m.v[t]))
+ self.assertEqual(mysim._diffvars[1], _GetItemIndexer(m.w[t, 1]))
+ self.assertEqual(mysim._diffvars[2], _GetItemIndexer(m.w[t, 2]))
+ self.assertEqual(len(mysim._derivlist), 4)
+ self.assertEqual(mysim._derivlist[0], _GetItemIndexer(m.dv[t]))
+ self.assertEqual(mysim._derivlist[1], _GetItemIndexer(m.dw[t, 1]))
+ self.assertEqual(mysim._derivlist[2], _GetItemIndexer(m.dw[t, 2]))
+ self.assertEqual(len(mysim._rhsdict), 4)
+ m.del_component('deqv')
+ m.del_component('deqw')
+ m.del_component('deqv_index')
+ m.del_component('deqw_index')
+
# Testing Simulator construction on differential variables with a
# single index
+ @unittest.skipIf(not scipy_available, "Scipy is not available")
def test_sim_initialization_single_index(self):
m = self.m
@@ -406,6 +538,7 @@ def _deq2(m, i):
# Testing Simulator construction on differential variables with
# two indexing sets
+ @unittest.skipIf(not scipy_available, "Scipy is not available")
def test_sim_initialization_multi_index(self):
m = self.m
@@ -470,10 +603,10 @@ def _deq3(m, i, t, s):
isinstance(mysim._rhsdict[_GetItemIndexer(m.dw2[3, t])], Param))
self.assertTrue(
isinstance(mysim._rhsdict[_GetItemIndexer(m.dw3[0, t, 1])],
- EXPR._SumExpression))
+ EXPR.SumExpression))
self.assertTrue(
isinstance(mysim._rhsdict[_GetItemIndexer(m.dw3[1, t, 3])],
- EXPR._SumExpression))
+ EXPR.SumExpression))
self.assertEqual(
mysim._rhsdict[_GetItemIndexer(m.dw1[t, 1])].name, 'w1[{t},1]')
self.assertEqual(
@@ -496,6 +629,7 @@ def _deq3(m, i, t, s):
# Testing Simulator construction on differential variables with
# multi-dimensional and multiple indexing sets
+ @unittest.skipIf(not scipy_available, "Scipy is not available")
def test_sim_initialization_multi_index2(self):
m = self.m
@@ -563,10 +697,10 @@ def _deq3(m, i, t, j, k):
mysim._rhsdict[_GetItemIndexer(m.dw2[2, 2, t])], Param))
self.assertTrue(isinstance(
mysim._rhsdict[_GetItemIndexer(m.dw3[0, t, 1, 1])],
- EXPR._SumExpression))
+ EXPR.SumExpression))
self.assertTrue(isinstance(
mysim._rhsdict[_GetItemIndexer(m.dw3[1, t, 2, 2])],
- EXPR._SumExpression))
+ EXPR.SumExpression))
self.assertEqual(mysim._rhsdict[_GetItemIndexer(m.dw1[t, 1, 1])].name,
'w1[{t},1,1]')
self.assertEqual(mysim._rhsdict[_GetItemIndexer(m.dw1[t, 2, 2])].name,
@@ -634,6 +768,7 @@ def _diffeq(m, t):
# Testing the Simulator construction on un-supported models and
# components with multiple indexing sets
+ @unittest.skipIf(not scipy_available, "Scipy is not available")
def test_non_supported_multi_index(self):
m = self.m
@@ -700,6 +835,7 @@ def _diffeq(m, t):
# Testing Simulator construction on models with time-indexed algebraic
# variables
+ @unittest.skipIf(not scipy_available, "Scipy is not available")
def test_time_indexed_algebraic(self):
m = self.m
@@ -719,6 +855,7 @@ def _diffeq(m, t):
# Testing Simulator construction on models with algebraic variables
# indexed by time and other indexing sets
+ @unittest.skipIf(not scipy_available, "Scipy is not available")
def test_time_multi_indexed_algebraic(self):
m = self.m
@@ -773,8 +910,8 @@ def test_check_getitemexpression(self):
e = m.dv[t] == m.v[t]
temp = _check_getitemexpression(e, 0)
- self.assertIs(e._args[0], temp[0])
- self.assertIs(e._args[1], temp[1])
+ self.assertIs(e.arg(0), temp[0])
+ self.assertIs(e.arg(1), temp[1])
self.assertIs(m.dv, temp[0]._base)
self.assertIs(m.v, temp[1]._base)
temp = _check_getitemexpression(e, 1)
@@ -782,8 +919,8 @@ def test_check_getitemexpression(self):
e = m.v[t] == m.dv[t]
temp = _check_getitemexpression(e, 1)
- self.assertIs(e._args[0], temp[1])
- self.assertIs(e._args[1], temp[0])
+ self.assertIs(e.arg(0), temp[1])
+ self.assertIs(e.arg(1), temp[0])
self.assertIs(m.dv, temp[0]._base)
self.assertIs(m.v, temp[1]._base)
temp = _check_getitemexpression(e, 0)
@@ -808,68 +945,68 @@ def test_check_productexpression(self):
e = 5 * m.dv[t] == m.v[t]
temp = _check_productexpression(e, 0)
self.assertIs(m.dv, temp[0]._base)
- self.assertIs(type(temp[1]), EXPR._ProductExpression)
+ self.assertIs(type(temp[1]), EXPR.ProductExpression)
e = m.v[t] == 5 * m.dv[t]
temp = _check_productexpression(e, 1)
self.assertIs(m.dv, temp[0]._base)
- self.assertIs(type(temp[1]), EXPR._ProductExpression)
+ self.assertIs(type(temp[1]), EXPR.ProductExpression)
# Check multiplication by fixed param
e = m.p * m.dv[t] == m.v[t]
temp = _check_productexpression(e, 0)
self.assertIs(m.dv, temp[0]._base)
- self.assertIs(type(temp[1]), EXPR._ProductExpression)
+ self.assertIs(type(temp[1]), EXPR.ProductExpression)
e = m.v[t] == m.p * m.dv[t]
temp = _check_productexpression(e, 1)
self.assertIs(m.dv, temp[0]._base)
- self.assertIs(type(temp[1]), EXPR._ProductExpression)
+ self.assertIs(type(temp[1]), EXPR.ProductExpression)
# Check multiplication by mutable param
e = m.mp * m.dv[t] == m.v[t]
temp = _check_productexpression(e, 0)
self.assertIs(m.dv, temp[0]._base)
- self.assertIs(type(temp[1]), EXPR._ProductExpression)
- self.assertIs(m.mp, temp[1]._denominator[0])
+ self.assertIs(type(temp[1]), EXPR.ProductExpression)
+ self.assertIs(m.mp, temp[1].arg(1).arg(0)) # Reciprocal
+ self.assertIs(e.arg(1), temp[1].arg(0))
e = m.v[t] == m.mp * m.dv[t]
temp = _check_productexpression(e, 1)
self.assertIs(m.dv, temp[0]._base)
- self.assertIs(type(temp[1]), EXPR._ProductExpression)
- self.assertIs(m.mp, temp[1]._denominator[0])
+ self.assertIs(type(temp[1]), EXPR.ProductExpression)
+ self.assertIs(m.mp, temp[1].arg(1).arg(0)) # Reciprocal
+ self.assertIs(e.arg(0), temp[1].arg(0))
# Check multiplication by var
e = m.y * m.dv[t] / m.z == m.v[t]
temp = _check_productexpression(e, 0)
self.assertIs(m.dv, temp[0]._base)
- self.assertIs(type(temp[1]), EXPR._ProductExpression)
- self.assertIs(m.y, temp[1]._denominator[0])
- self.assertIs(m.z, temp[1]._numerator[1])
+ self.assertIs(type(temp[1]), EXPR.ProductExpression)
+ self.assertIs(e.arg(1), temp[1].arg(0).arg(0))
+ self.assertIs(m.z, temp[1].arg(0).arg(1))
e = m.v[t] == m.y * m.dv[t] / m.z
temp = _check_productexpression(e, 1)
self.assertIs(m.dv, temp[0]._base)
- self.assertIs(type(temp[1]), EXPR._ProductExpression)
- self.assertIs(m.y, temp[1]._denominator[0])
- self.assertIs(m.z, temp[1]._numerator[1])
+ self.assertIs(type(temp[1]), EXPR.ProductExpression)
+ self.assertIs(e.arg(0), temp[1].arg(0).arg(0))
+ self.assertIs(m.z, temp[1].arg(0).arg(1))
# Check having the DerivativeVar in the denominator
e = m.y / (m.dv[t] * m.z) == m.mp
temp = _check_productexpression(e, 0)
self.assertIs(m.dv, temp[0]._base)
- self.assertIs(type(temp[1]), EXPR._ProductExpression)
- self.assertIs(m.mp, temp[1]._denominator[0])
- self.assertIs(m.y, temp[1]._numerator[0])
- self.assertIs(m.z, temp[1]._denominator[1])
+ self.assertIs(type(temp[1]), EXPR.ProductExpression)
+ self.assertIs(m.y, temp[1].arg(0))
+ self.assertIs(e.arg(1), temp[1].arg(1).arg(0).arg(0))
e = m.mp == m.y / (m.dv[t] * m.z)
temp = _check_productexpression(e, 1)
self.assertIs(m.dv, temp[0]._base)
- self.assertIs(type(temp[1]), EXPR._ProductExpression)
- self.assertIs(m.mp, temp[1]._denominator[0])
- self.assertIs(m.y, temp[1]._numerator[0])
- self.assertIs(m.z, temp[1]._denominator[1])
+ self.assertIs(type(temp[1]), EXPR.ProductExpression)
+ self.assertIs(m.y, temp[1].arg(0))
+ self.assertIs(e.arg(0), temp[1].arg(1).arg(0).arg(0))
# Check expression with no DerivativeVar
e = m.v[t] * m.y / m.z == m.v[t] * m.y / m.z
@@ -878,8 +1015,39 @@ def test_check_productexpression(self):
temp = _check_productexpression(e, 1)
self.assertIsNone(temp)
+ # Testing the checker for NegationExpressions
+ def test_check_negationexpression(self):
+
+ m = self.m
+ t = IndexTemplate(m.t)
+
+ e = -m.dv[t] == m.v[t]
+ temp = _check_negationexpression(e, 0)
+ self.assertIs(e.arg(0).arg(0), temp[0])
+ self.assertIs(e.arg(1), temp[1].arg(0))
+ self.assertIs(m.dv, temp[0]._base)
+ self.assertIs(m.v, temp[1].arg(0)._base)
+ temp = _check_negationexpression(e, 1)
+ self.assertIsNone(temp)
+
+ e = m.v[t] == -m.dv[t]
+ temp = _check_negationexpression(e, 1)
+ self.assertIs(e.arg(0), temp[1].arg(0))
+ self.assertIs(e.arg(1).arg(0), temp[0])
+ self.assertIs(m.dv, temp[0]._base)
+ self.assertIs(m.v, temp[1].arg(0)._base)
+ temp = _check_negationexpression(e, 0)
+ self.assertIsNone(temp)
+
+ e = -m.v[t] == -m.v[t]
+ temp = _check_negationexpression(e, 0)
+ self.assertIsNone(temp)
+ temp = _check_negationexpression(e, 1)
+ self.assertIsNone(temp)
+
+
# Testing the checker for SumExpressions
- def test_check_sumexpression(self):
+ def test_check_viewsumexpression(self):
m = self.m
m.p = Param(initialize=5)
@@ -889,35 +1057,38 @@ def test_check_sumexpression(self):
t = IndexTemplate(m.t)
e = m.dv[t] + m.y + m.z == m.v[t]
- temp = _check_sumexpression(e, 0)
+ temp = _check_viewsumexpression(e, 0)
self.assertIs(m.dv, temp[0]._base)
- self.assertIs(type(temp[1]), EXPR._SumExpression)
- self.assertIs(m.y, temp[1]._args[1])
- self.assertEqual(temp[1]._coef[1], -1)
- self.assertIs(m.z, temp[1]._args[2])
- self.assertEqual(temp[1]._coef[2], -1)
+ self.assertIs(type(temp[1]), EXPR.SumExpression)
+ self.assertIs(type(temp[1].arg(0)), EXPR.GetItemExpression)
+ self.assertIs(type(temp[1].arg(1)), EXPR.MonomialTermExpression)
+ self.assertEqual(-1, temp[1].arg(1).arg(0))
+ self.assertIs(m.y, temp[1].arg(1).arg(1))
+ self.assertIs(type(temp[1].arg(2)), EXPR.MonomialTermExpression)
+ self.assertEqual(-1, temp[1].arg(2).arg(0))
+ self.assertIs(m.z, temp[1].arg(2).arg(1))
e = m.v[t] == m.y + m.dv[t] + m.z
- temp = _check_sumexpression(e, 1)
+ temp = _check_viewsumexpression(e, 1)
self.assertIs(m.dv, temp[0]._base)
- self.assertIs(type(temp[1]), EXPR._SumExpression)
- self.assertIs(m.y, temp[1]._args[1])
- self.assertEqual(temp[1]._coef[1], -1)
- self.assertIs(m.z, temp[1]._args[2])
- self.assertEqual(temp[1]._coef[2], -1)
+ self.assertIs(type(temp[1]), EXPR.SumExpression)
+ self.assertIs(type(temp[1].arg(0)), EXPR.GetItemExpression)
+ self.assertIs(type(temp[1].arg(1)), EXPR.MonomialTermExpression)
+ self.assertIs(m.y, temp[1].arg(1).arg(1))
+ self.assertIs(type(temp[1].arg(2)), EXPR.MonomialTermExpression)
+ self.assertIs(m.z, temp[1].arg(2).arg(1))
e = 5 * m.dv[t] + 5 * m.y - m.z == m.v[t]
- temp = _check_sumexpression(e, 0)
+ temp = _check_viewsumexpression(e, 0)
self.assertIs(m.dv, temp[0]._base)
- self.assertIs(type(temp[1]), EXPR._ProductExpression)
- self.assertEqual(temp[1]._coef, 0.2)
- self.assertIs(m.y, temp[1]._numerator[0]._args[1])
- self.assertEqual(temp[1]._numerator[0]._coef[1], -5)
- self.assertIs(m.z, temp[1]._numerator[0]._args[2])
- self.assertEqual(temp[1]._numerator[0]._coef[2], 1)
+ self.assertIs(type(temp[1]), EXPR.ProductExpression)
+
+ self.assertIs(type(temp[1].arg(0).arg(0)), EXPR.GetItemExpression)
+ self.assertIs(m.y, temp[1].arg(0).arg(1).arg(1))
+ self.assertIs(m.z, temp[1].arg(0).arg(2).arg(1))
e = 2 + 5 * m.y - m.z == m.v[t]
- temp = _check_sumexpression(e, 0)
+ temp = _check_viewsumexpression(e, 0)
self.assertIs(temp, None)
@unittest.skipIf(not casadi_available, "Casadi is not available")
@@ -946,13 +1117,14 @@ def test_substitute_casadi_sym(self):
e = m.dv[t] + m.v[t] + m.y + t
templatemap = {}
- e2 = substitute_template_expression(
- e, substitute_getitem_with_casadi_sym, templatemap)
+ e2 = substitute_pyomo2casadi(e, templatemap)
+ #e2 = substitute_template_expression(
+ # e, substitute_getitem_with_casadi_sym, templatemap)
self.assertEqual(len(templatemap), 2)
- self.assertIs(type(e2._args[0]), casadi.SX)
- self.assertIs(type(e2._args[1]), casadi.SX)
- self.assertIsNot(type(e2._args[2]), casadi.SX)
- self.assertIs(type(e2._args[3]), IndexTemplate)
+ self.assertIs(type(e2.arg(0)), casadi.SX)
+ self.assertIs(type(e2.arg(1)), casadi.SX)
+ self.assertIsNot(type(e2.arg(2)), casadi.SX)
+ self.assertIs(type(e2.arg(3)), IndexTemplate)
m.del_component('y')
@@ -966,10 +1138,11 @@ def test_substitute_casadi_intrinsic1(self):
e = m.v[t]
templatemap = {}
- e2 = substitute_template_expression(
- e, substitute_getitem_with_casadi_sym, templatemap)
- e3 = substitute_intrinsic_function(
- e2, substitute_intrinsic_function_with_casadi)
+ #e2 = substitute_template_expression(
+ # e, substitute_getitem_with_casadi_sym, templatemap)
+ #e3 = substitute_intrinsic_function(
+ # e2, substitute_intrinsic_function_with_casadi)
+ e3 = substitute_pyomo2casadi(e, templatemap)
self.assertIs(type(e3), casadi.SX)
m.del_component('y')
@@ -984,13 +1157,14 @@ def test_substitute_casadi_intrinsic2(self):
e = sin(m.dv[t]) + log(m.v[t]) + sqrt(m.y) + m.v[t] + t
templatemap = {}
- e2 = substitute_template_expression(
- e, substitute_getitem_with_casadi_sym, templatemap)
- e3 = substitute_intrinsic_function(
- e2, substitute_intrinsic_function_with_casadi)
- self.assertIs(e3._args[0]._operator, casadi.sin)
- self.assertIs(e3._args[1]._operator, casadi.log)
- self.assertIs(e3._args[2]._operator, casadi.sqrt)
+ #e2 = substitute_template_expression(
+ # e, substitute_getitem_with_casadi_sym, templatemap)
+ #e3 = substitute_intrinsic_function(
+ # e2, substitute_intrinsic_function_with_casadi)
+ e3 = substitute_pyomo2casadi(e, templatemap)
+ self.assertIs(e3.arg(0)._fcn, casadi.sin)
+ self.assertIs(e3.arg(1)._fcn, casadi.log)
+ self.assertIs(e3.arg(2)._fcn, casadi.sqrt)
m.del_component('y')
@@ -1004,12 +1178,13 @@ def test_substitute_casadi_intrinsic3(self):
e = sin(m.dv[t] + m.v[t]) + log(m.v[t] * m.y + m.dv[t]**2)
templatemap = {}
- e2 = substitute_template_expression(
- e, substitute_getitem_with_casadi_sym, templatemap)
- e3 = substitute_intrinsic_function(
- e2, substitute_intrinsic_function_with_casadi)
- self.assertIs(e3._args[0]._operator, casadi.sin)
- self.assertIs(e3._args[1]._operator, casadi.log)
+ #e2 = substitute_template_expression(
+ # e, substitute_getitem_with_casadi_sym, templatemap)
+ #e3 = substitute_intrinsic_function(
+ # e2, substitute_intrinsic_function_with_casadi)
+ e3 = substitute_pyomo2casadi(e, templatemap)
+ self.assertIs(e3.arg(0)._fcn, casadi.sin)
+ self.assertIs(e3.arg(1)._fcn, casadi.log)
m.del_component('y')
@@ -1023,13 +1198,14 @@ def test_substitute_casadi_intrinsic4(self):
e = m.v[t] * sin(m.dv[t] + m.v[t]) * t
templatemap = {}
- e2 = substitute_template_expression(
- e, substitute_getitem_with_casadi_sym, templatemap)
- e3 = substitute_intrinsic_function(
- e2, substitute_intrinsic_function_with_casadi)
- self.assertIs(type(e3._numerator[0]), casadi.SX)
- self.assertIs(e3._numerator[1]._operator, casadi.sin)
- self.assertIs(type(e3._numerator[2]), IndexTemplate)
+ #e2 = substitute_template_expression(
+ # e, substitute_getitem_with_casadi_sym, templatemap)
+ #e3 = substitute_intrinsic_function(
+ # e2, substitute_intrinsic_function_with_casadi)
+ e3 = substitute_pyomo2casadi(e, templatemap)
+ self.assertIs(type(e3.arg(0).arg(0)), casadi.SX)
+ self.assertIs(e3.arg(0).arg(1)._fcn, casadi.sin)
+ self.assertIs(type(e3.arg(1)), IndexTemplate)
m.del_component('y')
diff --git a/pyomo/environ/__init__.py b/pyomo/environ/__init__.py
index 01d842e0b29..d2ffaeac2a2 100644
--- a/pyomo/environ/__init__.py
+++ b/pyomo/environ/__init__.py
@@ -97,3 +97,9 @@ def _import_packages():
SolverFactory, SolverManagerFactory, UnknownSolver,
TerminationCondition, SolverStatus,
)
+
+#
+# Initialize expression data
+#
+from pyomo.core.expr.expr_pyomo5 import initialize_expression_data
+initialize_expression_data()
diff --git a/pyomo/gdp/disjunct.py b/pyomo/gdp/disjunct.py
index 3df82114809..b3f4cbfb4a5 100644
--- a/pyomo/gdp/disjunct.py
+++ b/pyomo/gdp/disjunct.py
@@ -224,7 +224,7 @@ def set_value(self, expr):
e_iter = [e]
for _tmpe in e_iter:
try:
- isexpr = _tmpe.is_expression()
+ isexpr = _tmpe.is_expression_type()
except AttributeError:
isexpr = False
if not isexpr or not _tmpe.is_relational():
diff --git a/pyomo/gdp/plugins/bigm.py b/pyomo/gdp/plugins/bigm.py
index 9150673dcfb..220696ceb35 100644
--- a/pyomo/gdp/plugins/bigm.py
+++ b/pyomo/gdp/plugins/bigm.py
@@ -23,7 +23,7 @@
from pyomo.gdp import Disjunct, Disjunction, GDP_Error
from pyomo.gdp.util import target_list
from pyomo.gdp.plugins.gdp_var_mover import HACK_GDP_Disjunct_Reclassifier
-from pyomo.repn import LinearCanonicalRepn, generate_canonical_repn
+from pyomo.repn import generate_standard_repn
from pyomo.util.config import ConfigBlock, ConfigValue
from pyomo.util.modeling import unique_component_name
from pyomo.util.plugin import alias
@@ -643,18 +643,18 @@ def _get_M_from_suffixes(self, constraint, suffix_list):
def _estimate_M(self, expr, name):
# Calculate a best guess at M
- repn = generate_canonical_repn(expr)
+ repn = generate_standard_repn(expr)
M = [0, 0]
- if isinstance(repn, LinearCanonicalRepn):
+ if not repn.is_nonlinear():
if repn.constant is not None:
for i in (0, 1):
if M[i] is not None:
M[i] += repn.constant
- for i, coef in enumerate(repn.linear or []):
- var = repn.variables[i]
- coef = repn.linear[i]
+ for i, coef in enumerate(repn.linear_coefs or []):
+ var = repn.linear_vars[i]
+ coef = repn.linear_coefs[i]
bounds = (value(var.lb), value(var.ub))
for i in (0, 1):
# reverse the bounds if the coefficient is negative
diff --git a/pyomo/gdp/plugins/bilinear.py b/pyomo/gdp/plugins/bilinear.py
index a2cb69a671e..d956dc8343a 100644
--- a/pyomo/gdp/plugins/bilinear.py
+++ b/pyomo/gdp/plugins/bilinear.py
@@ -12,16 +12,16 @@
from six import iteritems
from pyomo.util.plugin import alias
+from pyomo.core.expr.current import ProductExpression
from pyomo.core import *
-from pyomo.core.base import expr, Transformation
-from pyomo.core.base.expr import _ProductExpression
from pyomo.core.base.set_types import BooleanSet
from pyomo.core.base.var import _VarData
from pyomo.gdp import *
-from pyomo.repn import generate_canonical_repn
+from pyomo.repn import generate_standard_repn
logger = logging.getLogger('pyomo.gdp')
+
class Bilinear_Transformation(Transformation):
alias('gdp.bilinear', doc="Creates a disjunctive model where bilinear terms are replaced with disjunctive expressions.")
@@ -75,69 +75,61 @@ def _transformExpression(self, expr, instance):
def _replace_bilinear(self, expr, instance):
idMap = {}
- terms = generate_canonical_repn(expr, idMap=idMap)
+ terms = generate_standard_repn(expr, idMap=idMap)
# Constant
- if 0 in terms:
- e = terms[0][None]
- else:
- e = 0
+ e = terms.constant
# Linear terms
- if 1 in terms:
- for key in terms[1]:
- e += terms[1][key] * idMap[key]
+ for var, coef in zip(terms.linear_vars, terms.linear_coefs):
+ e += coef * var
# Quadratic terms
- if 2 in terms:
- for key in terms[2]:
- vars = []
- for v in key:
- vars.append(idMap[v])
- coef = terms[2][key]
+ if len(terms.quadratic_coefs) > 0:
+ for vars_, coef_ in zip(terms.quadratic_vars, terms.quadratic_coefs):
#
- if isinstance(vars[0].domain, BooleanSet):
- instance.bilinear_data_.vlist_boolean.append(vars[0])
+ if isinstance(vars_[0].domain, BooleanSet):
+ instance.bilinear_data_.vlist_boolean.append(vars_[0])
v = instance.bilinear_data_.vlist.add()
- bounds = vars[1].bounds
+ bounds = vars_[1].bounds
v.setlb(bounds[0])
v.setub(bounds[1])
- id = len(instance.bilinear_data_.vlist)
- instance.bilinear_data_.IDX.add(id)
+ id_ = len(instance.bilinear_data_.vlist)
+ instance.bilinear_data_.IDX.add(id_)
# First disjunct
- d0 = instance.bilinear_data_.disjuncts_[id,0]
- d0.c1 = Constraint(expr=vars[0] == 1)
- d0.c2 = Constraint(expr=v == coef*vars[1])
+ d0 = instance.bilinear_data_.disjuncts_[id_,0]
+ d0.c1 = Constraint(expr=vars_[0] == 1)
+ d0.c2 = Constraint(expr=v == coef_*vars_[1])
# Second disjunct
- d1 = instance.bilinear_data_.disjuncts_[id,1]
- d1.c1 = Constraint(expr=vars[0] == 0)
+ d1 = instance.bilinear_data_.disjuncts_[id_,1]
+ d1.c1 = Constraint(expr=vars_[0] == 0)
d1.c2 = Constraint(expr=v == 0)
# Disjunction
- instance.bilinear_data_.disjunction_data[id] = [instance.bilinear_data_.disjuncts_[id,0], instance.bilinear_data_.disjuncts_[id,1]]
- instance.bilinear_data_.disjunction_data[id] = [instance.bilinear_data_.disjuncts_[id,0], instance.bilinear_data_.disjuncts_[id,1]]
+ instance.bilinear_data_.disjunction_data[id_] = [instance.bilinear_data_.disjuncts_[id_,0], instance.bilinear_data_.disjuncts_[id_,1]]
+ instance.bilinear_data_.disjunction_data[id_] = [instance.bilinear_data_.disjuncts_[id_,0], instance.bilinear_data_.disjuncts_[id_,1]]
# The disjunctive variable is the expression
e += v
#
- elif isinstance(vars[1].domain, BooleanSet):
- instance.bilinear_data_.vlist_boolean.append(vars[1])
+ elif isinstance(vars_[1].domain, BooleanSet):
+ instance.bilinear_data_.vlist_boolean.append(vars_[1])
v = instance.bilinear_data_.vlist.add()
- bounds = vars[0].bounds
+ bounds = vars_[0].bounds
v.setlb(bounds[0])
v.setub(bounds[1])
- id = len(instance.bilinear_data_.vlist)
- instance.bilinear_data_.IDX.add(id)
+ id_ = len(instance.bilinear_data_.vlist)
+ instance.bilinear_data_.IDX.add(id_)
# First disjunct
- d0 = instance.bilinear_data_.disjuncts_[id,0]
- d0.c1 = Constraint(expr=vars[1] == 1)
- d0.c2 = Constraint(expr=v == coef*vars[0])
+ d0 = instance.bilinear_data_.disjuncts_[id_,0]
+ d0.c1 = Constraint(expr=vars_[1] == 1)
+ d0.c2 = Constraint(expr=v == coef_*vars_[0])
# Second disjunct
- d1 = instance.bilinear_data_.disjuncts_[id,1]
- d1.c1 = Constraint(expr=vars[1] == 0)
+ d1 = instance.bilinear_data_.disjuncts_[id_,1]
+ d1.c1 = Constraint(expr=vars_[1] == 0)
d1.c2 = Constraint(expr=v == 0)
# Disjunction
- instance.bilinear_data_.disjunction_data[id] = [instance.bilinear_data_.disjuncts_[id,0], instance.bilinear_data_.disjuncts_[id,1]]
+ instance.bilinear_data_.disjunction_data[id_] = [instance.bilinear_data_.disjuncts_[id_,0], instance.bilinear_data_.disjuncts_[id_,1]]
# The disjunctive variable is the expression
e += v
else:
# If neither variable is boolean, just reinsert the original bilinear term
- e += coef*vars[0]*vars[1]
+ e += coef_*vars_[0]*vars_[1]
#
return e
diff --git a/pyomo/gdp/plugins/chull.py b/pyomo/gdp/plugins/chull.py
index 9ff9453a2bb..9d8f81b1c59 100644
--- a/pyomo/gdp/plugins/chull.py
+++ b/pyomo/gdp/plugins/chull.py
@@ -15,17 +15,22 @@
import pyomo.util.config as cfg
from pyomo.util.modeling import unique_component_name
from pyomo.util.plugin import alias
+from pyomo.core.expr.numvalue import native_numeric_types
+from pyomo.core.expr import current as EXPR
+from pyomo.core import *
+from pyomo.core.base.block import SortComponents
+from pyomo.core.base.component import ComponentUID, ActiveComponent
+from pyomo.core.base import _ExpressionData
+from pyomo.core.base.var import _VarData
+from pyomo.repn import generate_standard_repn
+from pyomo.core.kernel import ComponentMap, ComponentSet
+import pyomo.core.expr.current as EXPR
+from pyomo.core.base import Transformation
from pyomo.core import (
Block, Connector, Constraint, Param, Set, Suffix, Var,
Expression, SortComponents, TraversalStrategy,
Any, Reals, NumericConstant, value
)
-from pyomo.core.base import expr as EXPR, Transformation
-from pyomo.core.base.component import ActiveComponent
-from pyomo.core.base.var import _VarData
-from pyomo.core.kernel import ComponentMap, ComponentSet
-from pyomo.core.base.expr import identify_variables
-from pyomo.repn import generate_canonical_repn, LinearCanonicalRepn
from pyomo.gdp import Disjunct, Disjunction, GDP_Error
from pyomo.gdp.util import clone_without_expression_components, target_list
from pyomo.gdp.plugins.gdp_var_mover import HACK_GDP_Disjunct_Reclassifier
@@ -391,7 +396,7 @@ def _transformDisjunctionData(self, obj, transBlock, index):
# we aren't going to disaggregate fixed
# variables. This means there is trouble if they are
# unfixed later...
- for var in identify_variables(
+ for var in EXPR.identify_variables(
cons.body, include_fixed=False):
# Note the use of a list so that we will
# eventually disaggregate the vars in a
@@ -771,7 +776,7 @@ def _xform_constraint(self, obj, disjunct, infodict, var_substitute_map,
if NL:
newConsExpr = expr == c.lower*y
else:
- v = list(identify_variables(expr))
+ v = list(EXPR.identify_variables(expr))
if len(v) == 1 and not c.lower:
# Setting a variable to 0 in a disjunct is
# *very* common. We should recognize that in
diff --git a/pyomo/gdp/plugins/fix_disjuncts.py b/pyomo/gdp/plugins/fix_disjuncts.py
index f6593c80669..55569c95f6c 100644
--- a/pyomo/gdp/plugins/fix_disjuncts.py
+++ b/pyomo/gdp/plugins/fix_disjuncts.py
@@ -16,7 +16,7 @@
from pyomo.core.base import Transformation
from pyomo.core.base.block import Block, _BlockData
from pyomo.core.base.constraint import Constraint
-from pyomo.core.kernel.numvalue import value
+from pyomo.core.expr.numvalue import value
from pyomo.core.kernel.component_set import ComponentSet
from pyomo.gdp import GDP_Error
from pyomo.gdp.disjunct import (Disjunct, Disjunction, _DisjunctData,
diff --git a/pyomo/gdp/tests/jobshop_large_chull.lp b/pyomo/gdp/tests/jobshop_large_chull.lp
index c821c01e380..2b13650e3a4 100644
--- a/pyomo/gdp/tests/jobshop_large_chull.lp
+++ b/pyomo/gdp/tests/jobshop_large_chull.lp
@@ -759,7 +759,6 @@ c_u__pyomo_gdp_chull_relaxation_relaxedDisjuncts(7)_t(A)_bounds(ub)_:
<= 0
c_u__pyomo_gdp_chull_relaxation_relaxedDisjuncts(7)_NoClash(A_D_3_1)_c(ub)_:
-+0 NoClash(A_D_3_1)_indicator_var
+1 _pyomo_gdp_chull_relaxation_relaxedDisjuncts(7)_t(A)
-1 _pyomo_gdp_chull_relaxation_relaxedDisjuncts(7)_t(D)
<= 0
@@ -823,7 +822,6 @@ c_u__pyomo_gdp_chull_relaxation_relaxedDisjuncts(11)_t(A)_bounds(ub)_:
<= 0
c_u__pyomo_gdp_chull_relaxation_relaxedDisjuncts(11)_NoClash(A_E_5_1)_c(ub)_:
-+0 NoClash(A_E_5_1)_indicator_var
+1 _pyomo_gdp_chull_relaxation_relaxedDisjuncts(11)_t(A)
-1 _pyomo_gdp_chull_relaxation_relaxedDisjuncts(11)_t(E)
<= 0
@@ -1111,7 +1109,6 @@ c_u__pyomo_gdp_chull_relaxation_relaxedDisjuncts(29)_t(B)_bounds(ub)_:
<= 0
c_u__pyomo_gdp_chull_relaxation_relaxedDisjuncts(29)_NoClash(B_E_5_1)_c(ub)_:
-+0 NoClash(B_E_5_1)_indicator_var
+1 _pyomo_gdp_chull_relaxation_relaxedDisjuncts(29)_t(B)
-1 _pyomo_gdp_chull_relaxation_relaxedDisjuncts(29)_t(E)
<= 0
@@ -1607,7 +1604,6 @@ c_u__pyomo_gdp_chull_relaxation_relaxedDisjuncts(60)_t(D)_bounds(ub)_:
<= 0
c_u__pyomo_gdp_chull_relaxation_relaxedDisjuncts(60)_NoClash(D_G_4_0)_c(ub)_:
-+0 NoClash(D_G_4_0)_indicator_var
-1 _pyomo_gdp_chull_relaxation_relaxedDisjuncts(60)_t(D)
+1 _pyomo_gdp_chull_relaxation_relaxedDisjuncts(60)_t(G)
<= 0
diff --git a/pyomo/gdp/tests/jobshop_small_chull.lp b/pyomo/gdp/tests/jobshop_small_chull.lp
index 280d6cee912..a217199f5c3 100644
--- a/pyomo/gdp/tests/jobshop_small_chull.lp
+++ b/pyomo/gdp/tests/jobshop_small_chull.lp
@@ -83,7 +83,6 @@ c_u__pyomo_gdp_chull_relaxation_relaxedDisjuncts(0)_t(A)_bounds(ub)_:
<= 0
c_u__pyomo_gdp_chull_relaxation_relaxedDisjuncts(0)_NoClash(A_B_3_0)_c(ub)_:
-+0 NoClash(A_B_3_0)_indicator_var
-1 _pyomo_gdp_chull_relaxation_relaxedDisjuncts(0)_t(A)
+1 _pyomo_gdp_chull_relaxation_relaxedDisjuncts(0)_t(B)
<= 0
diff --git a/pyomo/gdp/tests/models.py b/pyomo/gdp/tests/models.py
index 7e16617b3c4..12f22187be3 100644
--- a/pyomo/gdp/tests/models.py
+++ b/pyomo/gdp/tests/models.py
@@ -151,7 +151,7 @@ def d_rule(disjunct, flag, s):
elif flag==1:
disjunct.c = Constraint(expr=m.a[s] >= 5)
else:
- disjunct.c = Constraint(expr=2<=m.a[s] <= 4)
+ disjunct.c = Constraint(expr=inequality(2, m.a[s], 4))
m.disjunct = Disjunct([0,1,2], m.s, rule=d_rule)
def disj_rule(m, s):
return [m.disjunct[0, s], m.disjunct[1, s], m.disjunct[2,s]]
diff --git a/pyomo/gdp/tests/test_bigm.py b/pyomo/gdp/tests/test_bigm.py
index 7e664d907ae..63060d50fb8 100644
--- a/pyomo/gdp/tests/test_bigm.py
+++ b/pyomo/gdp/tests/test_bigm.py
@@ -12,8 +12,10 @@
from pyomo.environ import *
from pyomo.gdp import *
-from pyomo.core.base import expr_common, constraint, expr as EXPR
+from pyomo.core.base import constraint
import pyomo.gdp.tests.models as models
+import pyomo.core.expr.current as EXPR
+from pyomo.repn import generate_standard_repn
import random
import sys
@@ -37,13 +39,9 @@ def diff_apply_to_and_create_using(self, model):
class TwoTermDisj(unittest.TestCase, CommonTests):
def setUp(self):
- EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
# set seed so we can test name collisions predictably
random.seed(666)
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
-
def test_new_block_created(self):
m = models.makeTwoTermDisj()
TransformationFactory('gdp.bigm').apply_to(m)
@@ -226,10 +224,8 @@ def test_xor_constraints(self):
# block of the disjunction--in this case the model.
xor = m.component("_gdp_bigm_relaxation_disjunction_xor")
self.assertIsInstance(xor, Constraint)
- self.assertIs(m.d[0].indicator_var, xor.body._args[0])
- self.assertIs(m.d[1].indicator_var, xor.body._args[1])
- self.assertEqual(1, xor.body._coef[0])
- self.assertEqual(1, xor.body._coef[1])
+ self.assertIs(m.d[0].indicator_var, xor.body.arg(0))
+ self.assertIs(m.d[1].indicator_var, xor.body.arg(1))
self.assertEqual(xor.lower, 1)
self.assertEqual(xor.upper, 1)
@@ -241,10 +237,8 @@ def test_or_constraints(self):
# check or constraint is an or (upper bound is None)
orcons = m.component("_gdp_bigm_relaxation_disjunction_xor")
self.assertIsInstance(orcons, Constraint)
- self.assertIs(m.d[0].indicator_var, orcons.body._args[0])
- self.assertIs(m.d[1].indicator_var, orcons.body._args[1])
- self.assertEqual(1, orcons.body._coef[0])
- self.assertEqual(1, orcons.body._coef[1])
+ self.assertIs(m.d[0].indicator_var, orcons.body.arg(0))
+ self.assertIs(m.d[1].indicator_var, orcons.body.arg(1))
self.assertEqual(orcons.lower, 1)
self.assertIsNone(orcons.upper)
@@ -265,6 +259,7 @@ def test_deactivated_constraints(self):
self.assertIsInstance(oldc, Constraint)
self.assertFalse(oldc.active)
+ @unittest.category('pyomo5_expr_failures')
def test_transformed_constraints(self):
m = models.makeTwoTermDisj()
TransformationFactory('gdp.bigm').apply_to(m)
@@ -289,19 +284,12 @@ def test_transformed_constraints(self):
self.assertIs(oldc.lower, newc.lower)
self.assertIs(oldc.upper, newc.upper)
# body
- self.assertIs(oldc.body, newc.body._args[0])
- self.assertEqual(newc.body._coef[0], 1)
- self.assertEqual(newc.body._coef[1], 3)
- self.assertIs(m.d[0].indicator_var, newc.body._args[1]._args[0])
- self.assertEqual(newc.body._args[1]._coef[0], -1)
- self.assertEqual(newc.body._args[1]._const, 1)
- # and there isn't any more...
- self.assertEqual(len(newc.body._args), 2)
- self.assertEqual(len(newc.body._coef), 2)
- self.assertEqual(len(newc.body._args[1]._args), 1)
- self.assertEqual(len(newc.body._args[1]._coef), 1)
-
-
+ self.assertEqual(newc.body.nargs(), 2)
+ self.assertIs( newc.body.arg(0), oldc.body)
+ self.assertEqual(newc.body.arg(1).arg(0).arg(0), -3)
+ self.assertIs( newc.body.arg(1).arg(0).arg(1).arg(0), 1)
+ self.assertIs( newc.body.arg(1).arg(0).arg(1).arg(1).__class__, EXPR.NegationExpression)
+ self.assertIs( newc.body.arg(1).arg(0).arg(1).arg(1).arg(0), m.d[0].indicator_var)
# second constraint
oldc = m.d[1].component("c1")
newc = disjBlock[1].component("d[1].c1")
@@ -312,37 +300,28 @@ def test_transformed_constraints(self):
self.assertTrue(newc_lo.active)
self.assertTrue(newc_hi.active)
-
# bounds
self.assertIs(oldc.lower, newc_lo.lower)
self.assertIsNone(newc_lo.upper)
self.assertIsNone(newc_hi.lower)
self.assertIs(oldc.upper, newc_hi.upper)
# body
- self.assertIs(oldc.body, newc_lo.body._args[0])
- self.assertEqual(newc_lo.body._coef[0], 1)
- self.assertEqual(newc_lo.body._coef[1], -2)
- self.assertIs(newc_lo.body._args[1]._args[0], m.d[1].indicator_var)
- self.assertEqual(newc_lo.body._args[1]._coef[0], -1)
- self.assertEqual(newc_lo.body._args[1]._const, 1)
-
- self.assertEqual(len(newc_lo.body._args), 2)
- self.assertEqual(len(newc_lo.body._coef), 2)
- self.assertEqual(len(newc_lo.body._args[1]._args), 1)
- self.assertEqual(len(newc_lo.body._args[1]._coef), 1)
-
- self.assertIs(oldc.body, newc_hi.body._args[0])
- self.assertEqual(newc_hi.body._coef[0], 1)
- self.assertEqual(newc_hi.body._coef[1], -7)
- self.assertIs(m.d[1].indicator_var, newc_hi.body._args[1]._args[0])
- self.assertEqual(newc_hi.body._args[1]._coef[0], -1)
- self.assertEqual(newc_hi.body._args[1]._const, 1)
-
- self.assertEqual(len(newc_hi.body._args), 2)
- self.assertEqual(len(newc_hi.body._coef), 2)
- self.assertEqual(len(newc_hi.body._args[1]._args), 1)
- self.assertEqual(len(newc_hi.body._args[1]._coef), 1)
-
+ self.assertEqual(newc_lo.body.nargs(), 2)
+ self.assertEqual(newc_lo.body.arg(1).nargs(), 1)
+ self.assertIs( newc_lo.body.arg(0), oldc.body)
+ self.assertIs( newc_lo.body.arg(1).__class__, EXPR.NegationExpression)
+ self.assertEqual(newc_lo.body.arg(1).arg(0).arg(0), 2)
+ self.assertEqual(newc_lo.body.arg(1).arg(0).arg(1).arg(0), 1)
+ self.assertIs( newc_lo.body.arg(1).arg(0).arg(1).arg(1).__class__, EXPR.NegationExpression)
+ self.assertIs( newc_lo.body.arg(1).arg(0).arg(1).arg(1).arg(0), m.d[1].indicator_var)
+
+ self.assertEqual(newc_hi.body.nargs(), 2)
+ self.assertEqual(newc_hi.body.arg(1).nargs(), 1)
+ self.assertIs( newc_hi.body.arg(0), oldc.body)
+ self.assertEqual(newc_hi.body.arg(1).arg(0).arg(0), 7)
+ self.assertEqual(newc_hi.body.arg(1).arg(0).arg(1).arg(0), 1)
+ self.assertIs( newc_hi.body.arg(1).arg(0).arg(1).arg(1).__class__, EXPR.NegationExpression)
+ self.assertIs( newc_hi.body.arg(1).arg(0).arg(1).arg(1).arg(0), m.d[1].indicator_var)
# third constraint
oldc = m.d[1].component("c2")
@@ -358,17 +337,14 @@ def test_transformed_constraints(self):
self.assertIs(oldc.lower, newc.lower)
self.assertIs(oldc.upper, newc.upper)
# body
- self.assertIs(oldc.body, newc.body._args[0])
- self.assertEqual(newc.body._coef[0], 1)
- self.assertEqual(newc.body._coef[1], -2)
- self.assertIs(m.d[1].indicator_var, newc.body._args[1]._args[0])
- self.assertEqual(newc.body._args[1]._coef[0], -1)
- self.assertEqual(newc.body._args[1]._const, 1)
- # and there isn't any more...
- self.assertEqual(len(newc.body._args), 2)
- self.assertEqual(len(newc.body._coef), 2)
- self.assertEqual(len(newc.body._args[1]._args), 1)
- self.assertEqual(len(newc.body._args[1]._coef), 1)
+
+ self.assertEqual(newc.body.nargs(), 2)
+ self.assertEqual(newc.body.arg(1).nargs(), 1)
+ self.assertIs( newc.body.arg(0), oldc.body)
+ self.assertEqual(newc.body.arg(1).arg(0).arg(0), 2)
+ self.assertEqual(newc.body.arg(1).arg(0).arg(1).arg(0), 1)
+ self.assertIs( newc.body.arg(1).arg(0).arg(1).arg(1).__class__, EXPR.NegationExpression)
+ self.assertIs( newc.body.arg(1).arg(0).arg(1).arg(1).arg(0), m.d[1].indicator_var)
def test_do_not_transform_userDeactivated_disjuncts(self):
m = models.makeTwoTermDisj()
@@ -390,19 +366,17 @@ def checkMs(self, model, cons1lb, cons2lb, cons2ub, cons3ub):
disjBlock = model._pyomo_gdp_bigm_relaxation.relaxedDisjuncts
# first constraint
- self.assertEqual(disjBlock[0].component("d[0].c")['lb'].body._coef[1],
- cons1lb)
+ self.assertEqual(disjBlock[0].component("d[0].c")['lb'].body.arg(1).arg(0).arg(0), -cons1lb)
# second constraint
newc = disjBlock[1].component("d[1].c1")
newc_lo = newc['lb']
newc_hi = newc['ub']
- self.assertEqual(newc_lo.body._coef[1], cons2lb)
- self.assertEqual(newc_hi.body._coef[1], cons2ub)
+ self.assertEqual(newc_lo.body.arg(1).arg(0).arg(0), -cons2lb)
+ self.assertEqual(newc_hi.body.arg(1).arg(0).arg(0), -cons2ub)
# third constraint
- self.assertEqual(disjBlock[1].component("d[1].c2")['ub'].body._coef[1],
- cons3ub)
+ self.assertEqual(disjBlock[1].component("d[1].c2")['ub'].body.arg(1).arg(0).arg(0), -cons3ub)
def test_suffix_M_None(self):
m = models.makeTwoTermDisj()
@@ -657,7 +631,6 @@ def d_rule(d,j):
class TwoTermIndexedDisj(unittest.TestCase, CommonTests):
def setUp(self):
- EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
# set seed so we can test name collisions predictably
random.seed(666)
# These are the pairs of which disjunct indices map to which
@@ -675,9 +648,6 @@ def setUp(self):
( (1,2,'B'), 7 ),
]
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
-
def test_xor_constraints(self):
m = models.makeTwoTermMultiIndexedDisjunction()
TransformationFactory('gdp.bigm').apply_to(m)
@@ -685,17 +655,11 @@ def test_xor_constraints(self):
xor = m.component("_gdp_bigm_relaxation_disjunction_xor")
self.assertIsInstance(xor, Constraint)
for i in m.disjunction.index_set():
- self.assertEqual(xor[i].body._coef[0], 1)
- self.assertEqual(xor[i].body._coef[1], 1)
- self.assertIs(xor[i].body._args[0],
- m.disjunction[i].disjuncts[0].indicator_var)
- self.assertIs(xor[i].body._args[1],
- m.disjunction[i].disjuncts[1].indicator_var)
- self.assertEqual(xor[i].body._const, 0)
+ self.assertEqual(xor[i].body.nargs(), 2)
+ self.assertIs(xor[i].body.arg(0), m.disjunction[i].disjuncts[0].indicator_var)
+ self.assertIs(xor[i].body.arg(1), m.disjunction[i].disjuncts[1].indicator_var)
self.assertEqual(xor[i].lower, 1)
self.assertEqual(xor[i].upper, 1)
- self.assertEqual(len(xor[i].body._coef), 2)
- self.assertEqual(len(xor[i].body._args), 2)
def test_deactivated_constraints(self):
m = models.makeTwoTermMultiIndexedDisjunction()
@@ -827,27 +791,26 @@ def simpledisj2_rule(disjunct):
def checkFirstDisjMs(self, model, disj1c1lb, disj1c1ub, disj1c2):
c1 = model.b.disjunct[0]._gdp_transformation_info['bigm'][
'relaxationBlock'].component("b.disjunct[0].c")
- self.assertEqual(c1['lb'].body._coef[1], disj1c1lb)
- self.assertEqual(c1['ub'].body._coef[1], disj1c1ub)
- self.assertEqual(
- (model.b.disjunct[1]._gdp_transformation_info['bigm'][
+ repn = generate_standard_repn(c1['lb'].body)
+ self.assertEqual(repn.linear_coefs[1], -disj1c1lb)
+ repn = generate_standard_repn(c1['ub'].body)
+ self.assertEqual(repn.linear_coefs[1], -disj1c1ub)
+ repn = generate_standard_repn(model.b.disjunct[1]._gdp_transformation_info['bigm'][
'relaxationBlock'].component("b.disjunct[1].c")[
- 'ub'].body._coef[1]),
- disj1c2)
+ 'ub'].body)
+ self.assertEqual(repn.linear_coefs[1], -disj1c2)
def checkMs(self, model, disj1c1lb, disj1c1ub, disj1c2, disj2c1, disj2c2):
self.checkFirstDisjMs(model, disj1c1lb, disj1c1ub, disj1c2)
- self.assertEqual(
- (model.simpledisj._gdp_transformation_info['bigm'][
+ repn = generate_standard_repn(model.simpledisj._gdp_transformation_info['bigm'][
'relaxationBlock'].component("simpledisj.c")[
- 'lb'].body._coef[1]),
- disj2c1)
- self.assertEqual(
- (model.simpledisj2._gdp_transformation_info['bigm'][
+ 'lb'].body)
+ self.assertEqual(repn.linear_coefs[1], -disj2c1)
+ repn = generate_standard_repn(model.simpledisj2._gdp_transformation_info['bigm'][
'relaxationBlock'].component("simpledisj2.c")[
- 'ub'].body._coef[1]),
- disj2c2)
+ 'ub'].body)
+ self.assertEqual(repn.linear_coefs[1], -disj2c2)
def test_suffix_M_onBlock(self):
m = models.makeTwoTermDisjOnBlock()
@@ -952,13 +915,9 @@ def test_create_using(self):
class SimpleDisjIndexedConstraints(unittest.TestCase, CommonTests):
def setUp(self):
- EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
# set seed so we can test name collisions predictably
random.seed(666)
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
-
def test_do_not_transform_deactivated_constraintDatas(self):
m = models.makeTwoTermDisj_IndexedConstraints()
m.BigM = Suffix(direction=Suffix.LOCAL)
@@ -973,24 +932,23 @@ def test_do_not_transform_deactivated_constraintDatas(self):
self.assertEqual(len(transformedConstraints), 1)
indexedCons = transformedConstraints[m.b.simpledisj1.c]
self.assertEqual(len(indexedCons), 2)
- self.assertIsInstance(indexedCons[2, 'lb'],
- constraint._GeneralConstraintData)
- self.assertIsInstance(indexedCons[2, 'ub'],
- constraint._GeneralConstraintData)
+ self.assertIsInstance(indexedCons[2, 'lb'], constraint._GeneralConstraintData)
+ self.assertIsInstance(indexedCons[2, 'ub'], constraint._GeneralConstraintData)
def checkMs(self, m, disj1c1lb, disj1c1ub, disj1c2lb, disj1c2ub, disj2c1ub,
disj2c2ub):
cons = m.b.simpledisj1._gdp_transformation_info['bigm'][
'relaxationBlock'].component("b.simpledisj1.c")
- self.assertEqual(cons[1,'lb'].body._coef[1], disj1c1lb)
- self.assertEqual(cons[1,'ub'].body._coef[1], disj1c1ub)
- self.assertEqual(cons[2,'lb'].body._coef[1], disj1c2lb)
- self.assertEqual(cons[2,'ub'].body._coef[1], disj1c2ub)
+ self.assertEqual(cons[1,'lb'].body.arg(1).arg(0).arg(0), -disj1c1lb)
+ self.assertEqual(cons[1,'lb'].body.arg(1).arg(0).arg(0), -disj1c1lb)
+ self.assertEqual(cons[1,'ub'].body.arg(1).arg(0).arg(0), -disj1c1ub)
+ self.assertEqual(cons[2,'lb'].body.arg(1).arg(0).arg(0), -disj1c2lb)
+ self.assertEqual(cons[2,'ub'].body.arg(1).arg(0).arg(0), -disj1c2ub)
cons2 = m.b.simpledisj2._gdp_transformation_info['bigm'][
'relaxationBlock'].component("b.simpledisj2.c")
- self.assertEqual(cons2[1,'ub'].body._coef[1], disj2c1ub)
- self.assertEqual(cons2[2,'ub'].body._coef[1], disj2c2ub)
+ self.assertEqual(cons2[1,'ub'].body.arg(1).arg(0).arg(0), -disj2c1ub)
+ self.assertEqual(cons2[2,'ub'].body.arg(1).arg(0).arg(0), -disj2c2ub)
def test_suffix_M_constraintData_on_block(self):
m = models.makeTwoTermDisj_IndexedConstraints()
@@ -1049,13 +1007,9 @@ def test_create_using(self):
class MultiTermDisj(unittest.TestCase, CommonTests):
def setUp(self):
- EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
# set seed so we can test name collisions predictably
random.seed(666)
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
-
def test_xor_constraint(self):
# check that the xor constraint has all the indicator variables...
m = models.makeThreeTermIndexedDisj()
@@ -1067,26 +1021,16 @@ def test_xor_constraint(self):
self.assertEqual(xor[1].upper, 1)
self.assertEqual(xor[2].lower, 1)
self.assertEqual(xor[2].upper, 1)
- self.assertEqual(len(xor[1].body._args), 3)
- self.assertEqual(len(xor[2].body._args), 3)
- self.assertEqual(len(xor[1].body._coef), 3)
- self.assertEqual(len(xor[1].body._coef), 3)
- self.assertEqual(xor[1].body._const, 0)
- self.assertEqual(xor[2].body._const, 0)
-
- self.assertIs(xor[1].body._args[0], m.disjunct[0,1].indicator_var)
- self.assertEqual(xor[1].body._coef[0], 1)
- self.assertIs(xor[1].body._args[1], m.disjunct[1,1].indicator_var)
- self.assertEqual(xor[1].body._coef[1], 1)
- self.assertIs(xor[1].body._args[2], m.disjunct[2,1].indicator_var)
- self.assertEqual(xor[1].body._coef[2], 1)
-
- self.assertIs(xor[2].body._args[0], m.disjunct[0,2].indicator_var)
- self.assertEqual(xor[2].body._coef[0], 1)
- self.assertIs(xor[2].body._args[1], m.disjunct[1,2].indicator_var)
- self.assertEqual(xor[2].body._coef[1], 1)
- self.assertIs(xor[2].body._args[2], m.disjunct[2,2].indicator_var)
- self.assertEqual(xor[2].body._coef[2], 1)
+ self.assertEqual(xor[1].body.nargs(), 3)
+ self.assertEqual(xor[2].body.nargs(), 3)
+
+ self.assertIs( xor[1].body.arg(0), m.disjunct[0,1].indicator_var)
+ self.assertIs( xor[1].body.arg(1), m.disjunct[1,1].indicator_var)
+ self.assertIs( xor[1].body.arg(2), m.disjunct[2,1].indicator_var)
+
+ self.assertIs( xor[2].body.arg(0), m.disjunct[0,2].indicator_var)
+ self.assertIs( xor[2].body.arg(1), m.disjunct[1,2].indicator_var)
+ self.assertIs( xor[2].body.arg(2), m.disjunct[2,2].indicator_var)
def test_create_using(self):
m = models.makeThreeTermIndexedDisj()
@@ -1095,13 +1039,9 @@ def test_create_using(self):
class IndexedConstraintsInDisj(unittest.TestCase, CommonTests):
def setUp(self):
- EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
# set seed so we can test name collisions predictably
random.seed(666)
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
-
def test_transformed_constraints_on_block(self):
# constraints should still be moved as indexed constraints, and we will
# just add ['lb', 'ub'] as another index (using both for equality and
@@ -1132,14 +1072,14 @@ def test_transformed_constraints_on_block(self):
def checkMs(self, model, c11lb, c12lb, c21lb, c21ub, c22lb, c22ub):
cons1 = model.disjunct[0]._gdp_transformation_info['bigm'][
'relaxationBlock'].component("disjunct[0].c")
- self.assertEqual(cons1[1,'lb'].body._coef[1], c11lb)
- self.assertEqual(cons1[2,'lb'].body._coef[1], c12lb)
+ self.assertEqual(cons1[1,'lb'].body.arg(1).arg(0).arg(0), -c11lb)
+ self.assertEqual(cons1[2,'lb'].body.arg(1).arg(0).arg(0), -c12lb)
cons2 = model.disjunct[1]._gdp_transformation_info['bigm'][
'relaxationBlock'].component("disjunct[1].c")
- self.assertEqual(cons2[1,'lb'].body._coef[1], c21lb)
- self.assertEqual(cons2[1,'ub'].body._coef[1], c21ub)
- self.assertEqual(cons2[2,'lb'].body._coef[1], c22lb)
- self.assertEqual(cons2[2,'ub'].body._coef[1], c22ub)
+ self.assertEqual(cons2[1,'lb'].body.arg(1).arg(0).arg(0), -c21lb)
+ self.assertEqual(cons2[1,'ub'].body.arg(1).arg(0).arg(0), -c21ub)
+ self.assertEqual(cons2[2,'lb'].body.arg(1).arg(0).arg(0), -c22lb)
+ self.assertEqual(cons2[2,'ub'].body.arg(1).arg(0).arg(0), -c22ub)
def test_arg_M_constraintdata(self):
m = models.makeTwoTermDisj_IndexedConstraints_BoundedVars()
@@ -1232,14 +1172,12 @@ def test_disjunction1_xor(self):
self.assertEqual(xor1.lower, 1)
self.assertEqual(xor1.upper, 1)
- self.assertEqual(xor1.body._coef[0], 1)
- self.assertEqual(xor1.body._coef[1], 1)
- self.assertEqual(xor1.body._const, 0)
- self.assertIs(xor1.body._args[0], m.disjunct1[0].indicator_var)
- self.assertIs(xor1.body._args[1], m.disjunct1[1].indicator_var)
-
- self.assertEqual(len(xor1.body._args), 2)
- self.assertEqual(len(xor1.body._coef), 2)
+ repn = generate_standard_repn(xor1.body)
+ self.assertEqual(repn.linear_coefs[0], 1)
+ self.assertEqual(repn.linear_coefs[1], 1)
+ self.assertEqual(repn.constant, 0)
+ self.assertIs(repn.linear_vars[0], m.disjunct1[0].indicator_var)
+ self.assertIs(repn.linear_vars[1], m.disjunct1[1].indicator_var)
def test_disjunction2_xor(self):
# check the xor constraint from the second disjunction
@@ -1252,14 +1190,13 @@ def test_disjunction2_xor(self):
self.assertEqual(xor2.lower, 1)
self.assertEqual(xor2.upper, 1)
- self.assertEqual(xor2.body._coef[0], 1)
- self.assertEqual(xor2.body._coef[1], 1)
- self.assertEqual(xor2.body._const, 0)
- self.assertIs(xor2.body._args[0], m.disjunct2[0].indicator_var)
- self.assertIs(xor2.body._args[1], m.disjunct1[1].indicator_var)
+ repn = generate_standard_repn(xor2.body)
- self.assertEqual(len(xor2.body._args), 2)
- self.assertEqual(len(xor2.body._coef), 2)
+ self.assertEqual(repn.linear_coefs[0], 1)
+ self.assertEqual(repn.linear_coefs[1], 1)
+ self.assertEqual(repn.constant, 0)
+ self.assertIs(repn.linear_vars[0], m.disjunct2[0].indicator_var)
+ self.assertIs(repn.linear_vars[1], m.disjunct1[1].indicator_var)
def test_constraints_deactivated(self):
# all the constraints that are on disjuncts we transformed should be
@@ -1413,17 +1350,12 @@ def test_transformed_constraints(self):
]
for cons, M, ind_var in consinfo:
- self.assertEqual(len(cons.body._args), 2)
- self.assertEqual(len(cons.body._coef), 2)
- self.assertIs(cons.body._args[0], m.a)
- self.assertEqual(cons.body._coef[0], 1)
- self.assertEqual(cons.body._coef[1], M)
- self.assertEqual(len(cons.body._args[1]._args), 1)
- self.assertEqual(len(cons.body._args[1]._coef), 1)
- self.assertIs(cons.body._args[1]._args[0], ind_var)
- self.assertEqual(cons.body._args[1]._coef[0], -1)
- self.assertEqual(cons.body._args[1]._const, 1)
- self.assertEqual(cons.body._const, 0)
+ repn = generate_standard_repn(cons.body)
+ self.assertIs(repn.linear_vars[0], m.a)
+ self.assertIs(repn.linear_vars[1], ind_var)
+ self.assertEqual(repn.linear_coefs[0], 1)
+ self.assertEqual(repn.linear_coefs[1], -M)
+ self.assertEqual(repn.constant, M)
def test_create_using(self):
m = models.makeDisjunctInMultipleDisjunctions()
@@ -1781,13 +1713,9 @@ def test_create_using(self):
class DisjunctionInDisjunct(unittest.TestCase, CommonTests):
def setUp(self):
- EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
# set seed so we can test name collisions predictably
random.seed(666)
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
-
def test_disjuncts_inactive(self):
m = models.makeNestedDisjunctions()
TransformationFactory('gdp.bigm').apply_to(m, targets=(m,))
@@ -1838,42 +1766,32 @@ def test_transformation_block_structure(self):
# many of the transformed constraints look like this, so can call this
# function to test them.
def check_bigM_constraint(self, cons, variable, M, indicator_var):
- self.assertEqual(len(cons.body._args), 2)
- self.assertEqual(len(cons.body._coef), 2)
- self.assertIs(cons.body._args[0], variable)
- self.assertEqual(cons.body._coef[0], 1)
- self.assertEqual(cons.body._coef[1], M)
- self.assertEqual(cons.body._const, 0)
- self.assertEqual(len(cons.body._args[1]._args), 1)
- self.assertEqual(len(cons.body._args[1]._coef), 1)
- self.assertEqual(cons.body._args[1]._const, 1)
- self.assertEqual(cons.body._args[1]._coef[0], -1)
- self.assertIs(cons.body._args[1]._args[0], indicator_var)
+ self.assertEqual(cons.body.nargs(), 2)
+ self.assertIs(cons.body.arg(0), variable)
+ #print(cons.body)
+ self.assertEqual(cons.body.arg(1).arg(0).arg(0), -M)
+ self.assertIs( cons.body.arg(1).arg(0).arg(1).arg(0), 1)
+ self.assertIs( cons.body.arg(1).arg(0).arg(1).arg(1).arg(0), indicator_var)
def check_xor_relaxation(self, cons, indvar1, indvar2, indvar3, lb):
- self.assertEqual(len(cons.body._args), 3)
- self.assertEqual(len(cons.body._coef), 3)
- self.assertIs(cons.body._args[0], indvar1)
- self.assertIs(cons.body._args[1], indvar2)
- self.assertEqual(cons.body._coef[0], 1)
- self.assertEqual(cons.body._coef[1], 1)
+ repn = generate_standard_repn(cons.body)
+ self.assertEqual(len(repn.linear_vars), 3)
+ self.assertIs(repn.linear_vars[0], indvar1)
+ self.assertIs(repn.linear_vars[1], indvar2)
if not lb:
self.assertEqual(cons.upper, 1)
self.assertIsNone(cons.lower)
- self.assertEqual(cons.body._coef[2], 1)
- self.assertIs(cons.body._args[2], indvar3)
- self.assertEqual(cons.body._const, -1)
+ self.assertIs(repn.linear_vars[2], indvar3)
+ self.assertEqual(repn.linear_coefs[2], 1)
+ self.assertEqual(repn.constant, -1)
else:
self.assertEqual(cons.lower, 1)
self.assertIsNone(cons.upper)
- self.assertEqual(cons.body._coef[2], 1)
- self.assertEqual(len(cons.body._args[2]._args), 1)
- self.assertEqual(len(cons.body._args[2]._coef), 1)
- self.assertIs(cons.body._args[2]._args[0], indvar3)
- self.assertEqual(cons.body._args[2]._const, 1)
- self.assertEqual(cons.body._args[2]._coef[0], -1)
- self.assertEqual(cons.body._const, 0)
+ self.assertIs(repn.linear_vars[2], indvar3)
+ self.assertEqual(repn.linear_coefs[2], -1)
+ self.assertEqual(repn.constant, 1)
+ @unittest.category('pyomo5_expr_failures')
def test_transformed_constraints(self):
# We'll check all the transformed constraints to make sure
# that nothing was transformed twice. The real key is that the
@@ -2103,11 +2021,6 @@ class IndexedDisjunction(unittest.TestCase):
# this tests that if the targets are a subset of the
# _DisjunctDatas in an IndexedDisjunction that the xor constraint
# created on the parent block will still be indexed as expected.
- def setUp(self):
- EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
-
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
def test_xor_constraint(self):
m = models.makeTwoTermIndexedDisjunction_BoundedVars()
@@ -2125,24 +2038,16 @@ def test_xor_constraint(self):
for i in [1,3]:
self.assertEqual(xorC[i].lower, 1)
self.assertEqual(xorC[i].upper, 1)
- self.assertEqual(len(xorC[i].body._args), 2)
- self.assertEqual(len(xorC[i].body._coef), 2)
- self.assertIs(xorC[i].body._args[0], m.disjunct[i, 0].indicator_var)
- self.assertIs(xorC[i].body._args[1], m.disjunct[i, 1].indicator_var)
- self.assertEqual(xorC[i].body._coef[0], 1)
- self.assertEqual(xorC[i].body._coef[1], 1)
- self.assertEqual(xorC[i].body._const, 0)
+ self.assertEqual(xorC[i].body.nargs(), 2)
+ self.assertIs(xorC[i].body.arg(0), m.disjunct[i, 0].indicator_var)
+ self.assertIs(xorC[i].body.arg(1), m.disjunct[i, 1].indicator_var)
class BlocksOnDisjuncts(unittest.TestCase):
def setUp(self):
- EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
# set seed so we can test name collisions predictably
random.seed(666)
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
-
def test_transformed_constraint_nameConflicts(self):
m = models.makeTwoTermDisj_BlockOnDisj()
TransformationFactory('gdp.bigm').apply_to(m)
@@ -2219,3 +2124,8 @@ def test_activeInnerDisjunction_err(self):
m,
targets=[ComponentUID(m.outerdisjunct[1].innerdisjunction),
ComponentUID(m.disjunction)])
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/pyomo/gdp/tests/test_chull.py b/pyomo/gdp/tests/test_chull.py
index 52b7fb53650..3aa02936b8b 100644
--- a/pyomo/gdp/tests/test_chull.py
+++ b/pyomo/gdp/tests/test_chull.py
@@ -10,8 +10,9 @@
import pyutilib.th as unittest
+from pyomo.repn import generate_standard_repn
from pyomo.environ import *
-from pyomo.core.base import expr_common, expr as EXPR
+#from pyomo.core.base import expr as EXPR
from pyomo.gdp import *
import pyomo.gdp.tests.models as models
@@ -30,13 +31,9 @@
class TwoTermDisj(unittest.TestCase):
# make sure that we are using coopr3 expressions...
def setUp(self):
- EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
# set seed to test unique namer
random.seed(666)
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
-
def test_transformation_block(self):
m = models.makeTwoTermDisj_Nonlinear()
TransformationFactory('gdp.chull').apply_to(m)
@@ -130,6 +127,8 @@ def check_furman_et_al_denominator(self, expr, ind_var):
self.assertEqual(expr._coef[0], 1 - EPS)
self.assertIs(expr._args[0], ind_var)
+ # TODO: Revise this test
+ @unittest.expectedFailure
def test_transformed_constraint_nonlinear(self):
m = models.makeTwoTermDisj_Nonlinear()
TransformationFactory('gdp.chull').apply_to(m)
@@ -144,9 +143,9 @@ def test_transformed_constraint_nonlinear(self):
cons = disj1c['ub']
self.assertIsNone(cons.lower)
self.assertEqual(cons.upper, 0)
- self.assertEqual(len(cons.body._args), 3)
- self.assertEqual(len(cons.body._coef), 3)
- self.assertEqual(cons.body._coef[0], 1)
+ repn = generate_standard_repn(cons.body)
+ self.assertEqual(len(repn.linear_vars), 1)
+ self.assertEqual(repn.linear_coefs[0], -14)
# first term
firstterm = cons.body._args[0]
self.assertEqual(len(firstterm._numerator), 2)
@@ -207,12 +206,12 @@ def test_transformed_constraints_linear(self):
cons = c1['lb']
self.assertIsNone(cons.lower)
self.assertEqual(cons.upper, 0)
- self.assertEqual(len(cons.body._args), 2)
- self.assertEqual(len(cons.body._coef), 2)
- self.assertEqual(cons.body._coef[0], 2)
- self.assertIs(cons.body._args[0], m.d[1].indicator_var)
- self.assertEqual(cons.body._coef[1], -1)
- self.assertIs(cons.body._args[1], disjBlock[1].x)
+ repn = generate_standard_repn(cons.body)
+ self.assertEqual(len(repn.linear_vars), 2)
+ self.assertIs(repn.linear_vars[0], m.d[1].indicator_var)
+ self.assertIs(repn.linear_vars[1], disjBlock[1].x)
+ self.assertEqual(repn.linear_coefs[0], 2)
+ self.assertEqual(repn.linear_coefs[1], -1)
c2 = disjBlock[1].component("d[1].c2")
# 'eq' is preserved
@@ -220,12 +219,12 @@ def test_transformed_constraints_linear(self):
cons = c2['eq']
self.assertEqual(cons.lower, 0)
self.assertEqual(cons.upper, 0)
- self.assertEqual(len(cons.body._args), 2)
- self.assertEqual(len(cons.body._coef), 2)
- self.assertEqual(cons.body._coef[0], 1)
- self.assertIs(cons.body._args[0], disjBlock[1].w)
- self.assertEqual(cons.body._coef[1], -3)
- self.assertIs(cons.body._args[1], m.d[1].indicator_var)
+ repn = generate_standard_repn(cons.body)
+ self.assertEqual(len(repn.linear_vars), 2)
+ self.assertIs(repn.linear_vars[0], disjBlock[1].w)
+ self.assertIs(repn.linear_vars[1], m.d[1].indicator_var)
+ self.assertEqual(repn.linear_coefs[0], 1)
+ self.assertEqual(repn.linear_coefs[1], -3)
c3 = disjBlock[1].component("d[1].c3")
# bounded inequality is split
@@ -233,21 +232,21 @@ def test_transformed_constraints_linear(self):
cons = c3['lb']
self.assertIsNone(cons.lower)
self.assertEqual(cons.upper, 0)
- self.assertEqual(len(cons.body._args), 2)
- self.assertEqual(len(cons.body._coef), 2)
- self.assertEqual(cons.body._coef[0], 1)
- self.assertIs(cons.body._args[0], m.d[1].indicator_var)
- self.assertEqual(cons.body._coef[1], -1)
- self.assertIs(cons.body._args[1], disjBlock[1].x)
+ repn = generate_standard_repn(cons.body)
+ self.assertEqual(len(repn.linear_vars), 2)
+ self.assertIs(repn.linear_vars[0], m.d[1].indicator_var)
+ self.assertIs(repn.linear_vars[1], disjBlock[1].x)
+ self.assertEqual(repn.linear_coefs[0], 1)
+ self.assertEqual(repn.linear_coefs[1], -1)
cons = c3['ub']
self.assertIsNone(cons.lower)
self.assertEqual(cons.upper, 0)
- self.assertEqual(len(cons.body._args), 2)
- self.assertEqual(len(cons.body._coef), 2)
- self.assertEqual(cons.body._coef[0], 1)
- self.assertIs(cons.body._args[0], disjBlock[1].x)
- self.assertEqual(cons.body._coef[1], -3)
- self.assertIs(cons.body._args[1], m.d[1].indicator_var)
+ repn = generate_standard_repn(cons.body)
+ self.assertEqual(len(repn.linear_vars), 2)
+ self.assertIs(repn.linear_vars[0], disjBlock[1].x)
+ self.assertIs(repn.linear_vars[1], m.d[1].indicator_var)
+ self.assertEqual(repn.linear_coefs[0], 1)
+ self.assertEqual(repn.linear_coefs[1], -3)
def check_bound_constraints(self, cons, disvar, indvar, lb, ub):
self.assertIsInstance(cons, Constraint)
@@ -256,21 +255,21 @@ def check_bound_constraints(self, cons, disvar, indvar, lb, ub):
varlb = cons['lb']
self.assertIsNone(varlb.lower)
self.assertEqual(varlb.upper, 0)
- self.assertEqual(len(varlb.body._args), 2)
- self.assertEqual(len(varlb.body._coef), 2)
- self.assertEqual(varlb.body._coef[0], lb)
- self.assertIs(varlb.body._args[0], indvar)
- self.assertEqual(varlb.body._coef[1], -1)
- self.assertIs(varlb.body._args[1], disvar)
+ repn = generate_standard_repn(varlb.body)
+ self.assertEqual(len(repn.linear_vars), 2)
+ self.assertIs(repn.linear_vars[0], indvar)
+ self.assertIs(repn.linear_vars[1], disvar)
+ self.assertEqual(repn.linear_coefs[0], lb)
+ self.assertEqual(repn.linear_coefs[1], -1)
varub = cons['ub']
self.assertIsNone(varub.lower)
self.assertEqual(varub.upper, 0)
- self.assertEqual(len(varub.body._args), 2)
- self.assertEqual(len(varub.body._coef), 2)
- self.assertEqual(varub.body._coef[0], 1)
- self.assertIs(varub.body._args[0], disvar)
- self.assertEqual(varub.body._coef[1], -1*ub)
- self.assertIs(varub.body._args[1], indvar)
+ repn = generate_standard_repn(varub.body)
+ self.assertEqual(len(repn.linear_vars), 2)
+ self.assertIs(repn.linear_vars[0], disvar)
+ self.assertIs(repn.linear_vars[1], indvar)
+ self.assertEqual(repn.linear_coefs[0], 1)
+ self.assertEqual(repn.linear_coefs[1], -1*ub)
def test_disaggregatedVar_bounds(self):
m = models.makeTwoTermDisj_Nonlinear()
@@ -297,13 +296,13 @@ def test_xor_constraint(self):
self.assertEqual(xorC.lower, 1)
self.assertEqual(xorC.upper, 1)
- self.assertEqual(xorC.body._const, 0)
- self.assertEqual(len(xorC.body._args), 2)
- self.assertEqual(len(xorC.body._coef), 2)
- self.assertIs(xorC.body._args[0], m.d[0].indicator_var)
- self.assertIs(xorC.body._args[1], m.d[1].indicator_var)
- self.assertEqual(xorC.body._coef[0], 1)
- self.assertEqual(xorC.body._coef[1], 1)
+ repn = generate_standard_repn(xorC.body)
+ self.assertEqual(repn.constant, 0)
+ self.assertEqual(len(repn.linear_vars), 2)
+ self.assertIs(repn.linear_vars[0], m.d[0].indicator_var)
+ self.assertIs(repn.linear_vars[1], m.d[1].indicator_var)
+ self.assertEqual(repn.linear_coefs[0], 1)
+ self.assertEqual(repn.linear_coefs[1], 1)
def test_error_for_or(self):
m = models.makeTwoTermDisj_Nonlinear()
@@ -319,14 +318,14 @@ def test_error_for_or(self):
def check_disaggregation_constraint(self, cons, var, disvar1, disvar2):
self.assertEqual(cons.lower, 0)
self.assertEqual(cons.upper, 0)
- self.assertEqual(len(cons.body._args), 3)
- self.assertEqual(len(cons.body._coef), 3)
- self.assertEqual(cons.body._coef[0], 1)
- self.assertIs(cons.body._args[0], var)
- self.assertEqual(cons.body._coef[1], -1)
- self.assertIs(cons.body._args[1], disvar1)
- self.assertEqual(cons.body._coef[2], -1)
- self.assertIs(cons.body._args[2], disvar2)
+ repn = generate_standard_repn(cons.body)
+ self.assertEqual(len(repn.linear_vars), 3)
+ self.assertIs(repn.linear_vars[0], var)
+ self.assertIs(repn.linear_vars[1], disvar1)
+ self.assertIs(repn.linear_vars[2], disvar2)
+ self.assertEqual(repn.linear_coefs[0], 1)
+ self.assertEqual(repn.linear_coefs[1], -1)
+ self.assertEqual(repn.linear_coefs[2], -1)
def test_disaggregation_constraint(self):
m = models.makeTwoTermDisj_Nonlinear()
@@ -569,14 +568,14 @@ def test_disaggregation_constraints(self):
cons = disaggregationCons[i]
self.assertEqual(cons.lower, 0)
self.assertEqual(cons.upper, 0)
- self.assertEqual(len(cons.body._args), 3)
- self.assertEqual(len(cons.body._coef), 3)
- self.assertEqual(cons.body._coef[0], 1)
- self.assertEqual(cons.body._coef[1], -1)
- self.assertEqual(cons.body._coef[2], -1)
- self.assertIs(cons.body._args[0], m.x[i[0]])
- self.assertIs(cons.body._args[1], disVars[0])
- self.assertIs(cons.body._args[2], disVars[1])
+ repn = generate_standard_repn(cons.body)
+ self.assertEqual(len(repn.linear_vars), 3)
+ self.assertIs(repn.linear_vars[0], m.x[i[0]])
+ self.assertIs(repn.linear_vars[1], disVars[0])
+ self.assertIs(repn.linear_vars[2], disVars[1])
+ self.assertEqual(repn.linear_coefs[0], 1)
+ self.assertEqual(repn.linear_coefs[1], -1)
+ self.assertEqual(repn.linear_coefs[2], -1)
# TODO: also test disaggregation constraints for when we have a disjunction
# where the indices are tuples. (This is to test that when we combine the
@@ -678,7 +677,6 @@ def test_relaxation_feasibility(self):
m.d3.indicator_var.fix(case[2])
m.d4.indicator_var.fix(case[3])
results = solver.solve(m)
- print(case, results.solver)
if case[4] is None:
self.assertEqual(results.solver.termination_condition,
pyomo.opt.TerminationCondition.infeasible)
@@ -799,3 +797,8 @@ def test_local_vars(self):
# test targets of all flavors
# test container deactivation
# test something with multiple indices
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/pyomo/gdp/tests/test_cuttingplane.py b/pyomo/gdp/tests/test_cuttingplane.py
index 8ca3292ba42..42bd4c04311 100644
--- a/pyomo/gdp/tests/test_cuttingplane.py
+++ b/pyomo/gdp/tests/test_cuttingplane.py
@@ -12,7 +12,7 @@
from pyomo.environ import *
from pyomo.gdp import *
-from pyomo.core.base import expr_common, expr as EXPR
+#import pyomo.core.expr.current as EXPR
import pyomo.opt
import random
@@ -29,13 +29,9 @@
class TwoTermDisj(unittest.TestCase):
def setUp(self):
- EXPR.set_expression_tree_format(expr_common.Mode.coopr3_trees)
# set seed so we can test name collisions predictably
random.seed(666)
- def tearDown(self):
- EXPR.set_expression_tree_format(expr_common._default_mode)
-
@staticmethod
def makeModel():
m = ConcreteModel()
@@ -44,11 +40,11 @@ def makeModel():
def d_rule(disjunct, flag):
m = disjunct.model()
if flag:
- disjunct.c1 = Constraint(expr=1 <= m.x <= 2)
- disjunct.c2 = Constraint(expr=3 <= m.y <= 4)
+ disjunct.c1 = Constraint(expr=inequality(1, m.x, 2))
+ disjunct.c2 = Constraint(expr=inequality(3, m.y, 4))
else:
- disjunct.c1 = Constraint(expr=3 <= m.x <= 4)
- disjunct.c2 = Constraint(expr=1 <= m.y <= 2)
+ disjunct.c1 = Constraint(expr=inequality(3, m.x, 4))
+ disjunct.c2 = Constraint(expr=inequality(1, m.y, 2))
m.d = Disjunct([0,1], rule=d_rule)
def disj_rule(m):
return [m.d[0], m.d[1]]
@@ -142,3 +138,8 @@ def test_active_objective_err(self):
TransformationFactory('gdp.cuttingplane').apply_to,
m
)
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/pyomo/gdp/tests/test_disjunct.py b/pyomo/gdp/tests/test_disjunct.py
index e8fbec30163..1913527902e 100644
--- a/pyomo/gdp/tests/test_disjunct.py
+++ b/pyomo/gdp/tests/test_disjunct.py
@@ -226,3 +226,8 @@ def test_deactivate_without_fixing_indicator(self):
self.assertFalse(m.d.disjuncts[0].indicator_var.is_fixed())
self.assertFalse(m.d.disjuncts[1].indicator_var.is_fixed())
self.assertFalse(m.d.disjuncts[2].indicator_var.is_fixed())
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/pyomo/gdp/tests/test_util.py b/pyomo/gdp/tests/test_util.py
index f2de085b3d5..dabc96e999e 100644
--- a/pyomo/gdp/tests/test_util.py
+++ b/pyomo/gdp/tests/test_util.py
@@ -11,11 +11,12 @@
import pyutilib.th as unittest
from pyomo.core import ConcreteModel, Var, Expression
-import pyomo.core.base.expr as EXPR
-from pyomo.core.base.expression import _ExpressionData
+import pyomo.core.expr.current as EXPR
+from pyomo.core.base.expression import _ExpressionData, SimpleExpression
from pyomo.gdp.util import clone_without_expression_components
class TestGDPUtils(unittest.TestCase):
+
def test_clone_expr_no_expressions(self):
m = ConcreteModel()
m.x = Var(initialize=5)
@@ -34,7 +35,7 @@ def test_clone_expr_no_expressions(self):
self.assertIsNot(base, test)
self.assertEqual(base(), test())
self.assertIsInstance(base, _ExpressionData)
- self.assertIsInstance(test, EXPR._SumExpression)
+ self.assertIsInstance(test, SimpleExpression)
test = clone_without_expression_components(base, {id(m.x): m.y})
self.assertEqual(3**2+3-1, test())
@@ -42,9 +43,14 @@ def test_clone_expr_no_expressions(self):
test = clone_without_expression_components(base, {})
self.assertIsNot(base, test)
self.assertEqual(base(), test())
- self.assertIsInstance(base, EXPR._SumExpression)
- self.assertIsInstance(test, EXPR._SumExpression)
- self.assertIsInstance(base._args[0], _ExpressionData)
- self.assertIsInstance(test._args[0], EXPR._SumExpression)
+ self.assertIsInstance(base, EXPR.SumExpression)
+ self.assertIsInstance(test, EXPR.SumExpression)
+ self.assertIsInstance(base.arg(0), _ExpressionData)
+ self.assertIsInstance(test.arg(0), SimpleExpression)
test = clone_without_expression_components(base, {id(m.x): m.y})
self.assertEqual(3**2+3-1 + 3, test())
+
+
+if __name__ == '__main__':
+ unittest.main()
+
diff --git a/pyomo/gdp/util.py b/pyomo/gdp/util.py
index 28d539455ab..e8cd5a3d649 100644
--- a/pyomo/gdp/util.py
+++ b/pyomo/gdp/util.py
@@ -10,10 +10,9 @@
from six import string_types
-from pyomo.core.kernel.numvalue import native_types
-
-import pyomo.core.base.expr as EXPR
-import pyomo.core.base.expr_coopr3 as coopr3
+import pyomo.core.expr.current as EXPR
+from pyomo.core.expr.numvalue import nonpyomo_leaf_types, native_numeric_types
+from copy import deepcopy
from pyomo.core.base.component import _ComponentBase, ComponentUID
from pyomo.opt import TerminationCondition, SolverStatus
@@ -45,36 +44,86 @@ def verify_successful_solve(results):
return NONOPTIMAL
-def clone_without_expression_components(expr, substitute):
- ans = [EXPR.clone_expression(expr, substitute=substitute)]
- _stack = [ (ans, 0, 1) ]
- while _stack:
- _argList, _idx, _len = _stack.pop()
- while _idx < _len:
- _sub = _argList[_idx]
- _idx += 1
- if type(_sub) in native_types:
- pass
- elif _sub.is_expression():
- _stack.append(( _argList, _idx, _len ))
- if not isinstance(_sub, EXPR._ExpressionBase):
- _argList[_idx-1] = EXPR.clone_expression(
- _sub._args[0], substitute=substitute )
- elif type(_sub) is coopr3._ProductExpression:
- if _sub._denominator:
- _stack.append(
- (_sub._denominator, 0, len(_sub._denominator)) )
- _argList = _sub._numerator
- else:
- _argList = _sub._args
- # HACK: As we may have to replace arguments, if the
- # _args is a tuple, then we will convert it to a
- # list.
- if type(_argList) is tuple:
- _argList = _sub._args = list(_argList)
- _idx = 0
- _len = len(_argList)
- return ans[0]
+class _CloneVisitor(EXPR.ExpressionValueVisitor):
+
+ def __init__(self, clone_leaves=False, memo=None, substitute=None):
+ self.clone_leaves = clone_leaves
+ self.memo = memo
+ self.substitute = substitute
+
+ def visit(self, node, values):
+ """ Visit nodes that have been expanded """
+ if node.__class__ is EXPR.MonomialTermExpression and not values[1].is_variable_type():
+ #
+ # Turn a MonomialTermExpression whose variable has been replaced by a constant into
+ # a simple constant expression.
+ #
+ return values[0] * values[1]
+ return node.create_node_with_local_data( tuple(values), self.memo )
+
+ def visiting_potential_leaf(self, node):
+ """
+ Visiting a potential leaf.
+
+ Return True if the node is not expanded.
+ """
+ if id(node) in self.substitute:
+ return True, self.substitute[id(node)]
+
+ if node.__class__ in nonpyomo_leaf_types:
+ #
+ # Store a native or numeric object
+ #
+ return True, deepcopy(node, self.memo)
+
+ if not node.is_expression_type():
+ #
+ # Store a leave object that is cloned
+ #
+ if self.clone_leaves:
+ return True, deepcopy(node, self.memo)
+ else:
+ return True, node
+
+ return False, None
+
+
+def clone_without_expression_components(expr, memo=None, clone_leaves=True, substitute=None):
+ """A function that is used to clone an expression.
+
+ Cloning is roughly equivalent to calling ``copy.deepcopy``.
+ However, the :attr:`clone_leaves` argument can be used to
+ clone only interior (i.e. non-leaf) nodes in the expression
+ tree. Note that named expression objects are treated as
+ leaves when :attr:`clone_leaves` is :const:`True`, and hence
+ those subexpressions are not cloned.
+
+ This function uses a non-recursive
+ logic, which makes it more scalable than the logic in
+ ``copy.deepcopy``.
+
+ Args:
+ expr: The expression that will be cloned.
+ memo (dict): A dictionary mapping object ids to
+ objects. This dictionary has the same semantics as
+ the memo object used with ``copy.deepcopy``. Defaults
+ to None, which indicates that no user-defined
+ dictionary is used.
+ clone_leaves (bool): If True, then leaves are
+ cloned along with the rest of the expression.
+ Defaults to :const:`True`.
+
+ Returns:
+ The cloned expression.
+ """
+ if not memo:
+ memo = {'__block_scope__': { id(None): False }}
+ if substitute is None:
+ substitute = {}
+ #
+ visitor = _CloneVisitor(clone_leaves=clone_leaves, memo=memo, substitute=substitute)
+ return visitor.dfs_postorder_stack(expr)
+
def target_list(x):
diff --git a/pyomo/kernel/__init__.py b/pyomo/kernel/__init__.py
index aac277a7ed9..21c1bcaa7fc 100644
--- a/pyomo/kernel/__init__.py
+++ b/pyomo/kernel/__init__.py
@@ -10,6 +10,10 @@
import pyomo.environ
from pyomo.version import version_info, __version__
+import pyomo.opt
+from pyomo.opt import (SolverFactory,
+ SolverStatus,
+ TerminationCondition)
from pyomo.core.kernel import *
@@ -104,8 +108,4 @@
del component_suffix
del component_matrix_constraint
del util
-del expr
-del expr_common
-del expr_coopr3
-del expr_pyomo4
del pyomo
diff --git a/pyomo/mpec/complementarity.py b/pyomo/mpec/complementarity.py
index f7d376e3170..c771125d26d 100644
--- a/pyomo/mpec/complementarity.py
+++ b/pyomo/mpec/complementarity.py
@@ -14,12 +14,13 @@
from collections import namedtuple
from pyomo.util.timing import ConstructionTimer
+from pyomo.core.expr import current as EXPR
+from pyomo.core.expr.numvalue import ZeroConstant, _sub, native_numeric_types
from pyomo.core import *
from pyomo.core.base.plugin import register_component
from pyomo.core.base.numvalue import ZeroConstant, _sub
from pyomo.core.base.misc import apply_indexed_rule
from pyomo.core.base.block import _BlockData
-import pyomo.core.base.expr as EXPR
import logging
logger = logging.getLogger('pyomo.core')
@@ -45,26 +46,23 @@ def _canonical_expression(self, e):
# the original expressions and will result in mind-boggling
# pprint output.
e_ = None
- if e.__class__ is EXPR._EqualityExpression:
- if e._args[1].is_fixed():
- _e = (e._args[1], e._args[0])
+ if e.__class__ is EXPR.EqualityExpression:
+ if e.arg(1).is_fixed():
+ _e = (e.arg(1), e.arg(0))
#
# The first argument of an equality is never fixed
#
- #elif e._args[0].is_fixed():
- # _e = (e._args[0], e._args[1])
else:
- _e = ( ZeroConstant, e._args[0] - e._args[1])
- elif e.__class__ is EXPR._InequalityExpression:
- if len(e._args) == 3:
- _e = (e._args[0], e._args[1], e._args[2])
+ _e = ( ZeroConstant, e.arg(0) - e.arg(1))
+ elif e.__class__ is EXPR.InequalityExpression:
+ if e.arg(1).is_fixed():
+ _e = (None, e.arg(0), e.arg(1))
+ elif e.arg(0).is_fixed():
+ _e = (e.arg(0), e.arg(1), None)
else:
- if e._args[1].is_fixed():
- _e = (None, e._args[0], e._args[1])
- elif e._args[0].is_fixed():
- _e = (e._args[0], e._args[1], None)
- else:
- _e = ( ZeroConstant, e._args[1] - e._args[0], None )
+ _e = ( ZeroConstant, e.arg(1) - e.arg(0), None )
+ elif e.__class__ is EXPR.RangedExpression:
+ _e = (e.arg(0), e.arg(1), e.arg(2))
else:
_e = (None, e, None)
return _e
@@ -91,8 +89,8 @@ def to_standard_form(self):
#
# c: v == expression
#
- _e1 = self._canonical_expression(EXPR.clone_expression(self._args[0]))
- _e2 = self._canonical_expression(EXPR.clone_expression(self._args[1]))
+ _e1 = self._canonical_expression(self._args[0])
+ _e2 = self._canonical_expression(self._args[1])
if len(_e1) == 2:
# Ignore _e2; _e1 is an equality constraint
self.c = Constraint(expr=_e1)
@@ -120,9 +118,9 @@ def to_standard_form(self):
self.c._type = 1
#
if not _e1[0] is None and not _e1[2] is None:
- if not _e1[0].is_constant():
+ if not (_e1[0].__class__ in native_numeric_types or _e1[0].is_constant()):
raise RuntimeError("Cannot express a complementarity problem of the form L < v < U _|_ g(x) where L is not a constant value")
- if not _e1[2].is_constant():
+ if not (_e1[2].__class__ in native_numeric_types or _e1[2].is_constant()):
raise RuntimeError("Cannot express a complementarity problem of the form L < v < U _|_ g(x) where U is not a constant value")
self.v = Var(bounds=(_e1[0], _e1[2]))
self.ve = Constraint(expr=self.v == _e1[1])
diff --git a/pyomo/mpec/plugins/mpec2.py b/pyomo/mpec/plugins/mpec2.py
index 586051cf818..032b266280e 100644
--- a/pyomo/mpec/plugins/mpec2.py
+++ b/pyomo/mpec/plugins/mpec2.py
@@ -12,6 +12,7 @@
from six import iterkeys
from pyomo.util.plugin import alias
+from pyomo.core.expr import inequality
from pyomo.core.base import (Transformation,
Constraint,
Block,
@@ -71,7 +72,7 @@ def _apply_to(self, instance, **kwds):
_data.expr2.c1 = Constraint(expr= _e2[1] <= 0)
#
_data.expr3 = Disjunct()
- _data.expr3.c0 = Constraint(expr= _e1[0] <= _e1[1] <= _e1[2])
+ _data.expr3.c0 = Constraint(expr= inequality(_e1[0], _e1[1], _e1[2]))
_data.expr3.c1 = Constraint(expr= _e2[1] == 0)
_data.complements = Disjunction(expr=(_data.expr1, _data.expr2, _data.expr3))
else:
diff --git a/pyomo/mpec/tests/t11_None.txt b/pyomo/mpec/tests/t11_None.txt
index 689a726f955..e7aa798f41c 100644
--- a/pyomo/mpec/tests/t11_None.txt
+++ b/pyomo/mpec/tests/t11_None.txt
@@ -1,3 +1,3 @@
cc : Size=1, Index=None, Active=True
- Key : Arg0 : Arg1 : Active
- None : 2.0 <= y + x1 <= 3.0 : x1 : True
+ Key : Arg0 : Arg1 : Active
+ None : 2 <= y + x1 <= 3 : x1 : True
diff --git a/pyomo/mpec/tests/t11_mpec.nl.txt b/pyomo/mpec/tests/t11_mpec.nl.txt
index ba2ea9754f0..eff321b1c63 100644
--- a/pyomo/mpec/tests/t11_mpec.nl.txt
+++ b/pyomo/mpec/tests/t11_mpec.nl.txt
@@ -14,8 +14,8 @@
1 Block Declarations
cc : Size=1, Index=None, Active=True
- Key : Arg0 : Arg1 : Active
- None : 2.0 <= y + x1 <= 3.0 : x1 : True
+ Key : Arg0 : Arg1 : Active
+ None : 2 <= y + x1 <= 3 : x1 : True
1 Var Declarations
bv : Size=1, Index=None
Key : Lower : Value : Upper : Fixed : Stale : Domain
@@ -23,8 +23,8 @@
2 Constraint Declarations
bc : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -2.0 + cc.bv + y + x1 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.bv - (2 - (y + x1)) : 0.0 : True
c : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : cc.bv : +Inf : True
diff --git a/pyomo/mpec/tests/t11_mpec.simple_disjunction.txt b/pyomo/mpec/tests/t11_mpec.simple_disjunction.txt
index a4e5331c9d0..1f3894015bd 100644
--- a/pyomo/mpec/tests/t11_mpec.simple_disjunction.txt
+++ b/pyomo/mpec/tests/t11_mpec.simple_disjunction.txt
@@ -1,6 +1,6 @@
cc : Size=1, Index=None, Active=True
- Key : Arg0 : Arg1 : Active
- None : 2.0 <= y + x1 <= 3.0 : x1 : True
+ Key : Arg0 : Arg1 : Active
+ None : 2 <= y + x1 <= 3 : x1 : True
3 Disjunct Declarations
expr1 : Size=1, Index=None, Active=True
1 Var Declarations
@@ -41,7 +41,7 @@ cc : Size=1, Index=None, Active=True
2 Constraint Declarations
c0 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
- None : 2.0 : y + x1 : 3.0 : True
+ None : 2 : y + x1 : 3 : True
c1 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : x1 : 0.0 : True
diff --git a/pyomo/mpec/tests/t11_mpec.simple_nonlinear.txt b/pyomo/mpec/tests/t11_mpec.simple_nonlinear.txt
index b05e688955b..e1487e7f915 100644
--- a/pyomo/mpec/tests/t11_mpec.simple_nonlinear.txt
+++ b/pyomo/mpec/tests/t11_mpec.simple_nonlinear.txt
@@ -1,23 +1,23 @@
cc : Size=1, Index=None, Active=True
- Key : Arg0 : Arg1 : Active
- None : 2.0 <= y + x1 <= 3.0 : x1 : True
+ Key : Arg0 : Arg1 : Active
+ None : 2 <= y + x1 <= 3 : x1 : True
1 Var Declarations
v : Size=1, Index=None
Key : Lower : Value : Upper : Fixed : Stale : Domain
- None : 2.0 : None : 3.0 : False : True : Reals
+ None : 2 : None : 3 : False : True : Reals
4 Constraint Declarations
c : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : -Inf : x1 : +Inf : True
ccon_l : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : ( -2.0 + cc.v ) * x1 : mpec_bound : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : (cc.v - 2)*x1 : mpec_bound : True
ccon_u : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : ( -3.0 + cc.v ) * x1 : mpec_bound : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : (cc.v - 3)*x1 : mpec_bound : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x1 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x1) : 0.0 : True
5 Declarations: c v ve ccon_l ccon_u
diff --git a/pyomo/mpec/tests/t11_mpec.standard_form.txt b/pyomo/mpec/tests/t11_mpec.standard_form.txt
index 516283978c9..608bc69afa4 100644
--- a/pyomo/mpec/tests/t11_mpec.standard_form.txt
+++ b/pyomo/mpec/tests/t11_mpec.standard_form.txt
@@ -1,17 +1,17 @@
cc : Size=1, Index=None, Active=True
- Key : Arg0 : Arg1 : Active
- None : 2.0 <= y + x1 <= 3.0 : x1 : True
+ Key : Arg0 : Arg1 : Active
+ None : 2 <= y + x1 <= 3 : x1 : True
1 Var Declarations
v : Size=1, Index=None
Key : Lower : Value : Upper : Fixed : Stale : Domain
- None : 2.0 : None : 3.0 : False : True : Reals
+ None : 2 : None : 3 : False : True : Reals
2 Constraint Declarations
c : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : -Inf : x1 : +Inf : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x1 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x1) : 0.0 : True
3 Declarations: c v ve
diff --git a/pyomo/mpec/tests/t12_None.txt b/pyomo/mpec/tests/t12_None.txt
index 6edbd287d56..02f91e2ab99 100644
--- a/pyomo/mpec/tests/t12_None.txt
+++ b/pyomo/mpec/tests/t12_None.txt
@@ -1,3 +1,3 @@
cc : Size=1, Index=None, Active=True
Key : Arg0 : Arg1 : Active
- None : x1 : 2.0 <= y + x1 <= 3.0 : True
+ None : x1 : 2 <= y + x1 <= 3 : True
diff --git a/pyomo/mpec/tests/t12_mpec.nl.txt b/pyomo/mpec/tests/t12_mpec.nl.txt
index dce65bdd3ff..d82ed6cabc0 100644
--- a/pyomo/mpec/tests/t12_mpec.nl.txt
+++ b/pyomo/mpec/tests/t12_mpec.nl.txt
@@ -14,8 +14,8 @@
1 Block Declarations
cc : Size=1, Index=None, Active=True
- Key : Arg0 : Arg1 : Active
- None : x1 : 2.0 <= y + x1 <= 3.0 : True
+ Key : Arg0 : Arg1 : Active
+ None : x1 : 2 <= y + x1 <= 3 : True
1 Var Declarations
bv : Size=1, Index=None
Key : Lower : Value : Upper : Fixed : Stale : Domain
@@ -23,8 +23,8 @@
2 Constraint Declarations
bc : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -2.0 + cc.bv + y + x1 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.bv - (2 - (y + x1)) : 0.0 : True
c : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : cc.bv : +Inf : True
diff --git a/pyomo/mpec/tests/t12_mpec.simple_disjunction.txt b/pyomo/mpec/tests/t12_mpec.simple_disjunction.txt
index d6da0e98a5b..044d3916316 100644
--- a/pyomo/mpec/tests/t12_mpec.simple_disjunction.txt
+++ b/pyomo/mpec/tests/t12_mpec.simple_disjunction.txt
@@ -1,6 +1,6 @@
cc : Size=1, Index=None, Active=True
- Key : Arg0 : Arg1 : Active
- None : x1 : 2.0 <= y + x1 <= 3.0 : True
+ Key : Arg0 : Arg1 : Active
+ None : x1 : 2 <= y + x1 <= 3 : True
3 Disjunct Declarations
expr1 : Size=1, Index=None, Active=True
1 Var Declarations
@@ -41,7 +41,7 @@ cc : Size=1, Index=None, Active=True
2 Constraint Declarations
c0 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
- None : 2.0 : y + x1 : 3.0 : True
+ None : 2 : y + x1 : 3 : True
c1 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : x1 : 0.0 : True
diff --git a/pyomo/mpec/tests/t12_mpec.simple_nonlinear.txt b/pyomo/mpec/tests/t12_mpec.simple_nonlinear.txt
index aad46d58115..5d26c2e0ec4 100644
--- a/pyomo/mpec/tests/t12_mpec.simple_nonlinear.txt
+++ b/pyomo/mpec/tests/t12_mpec.simple_nonlinear.txt
@@ -1,23 +1,23 @@
cc : Size=1, Index=None, Active=True
- Key : Arg0 : Arg1 : Active
- None : x1 : 2.0 <= y + x1 <= 3.0 : True
+ Key : Arg0 : Arg1 : Active
+ None : x1 : 2 <= y + x1 <= 3 : True
1 Var Declarations
v : Size=1, Index=None
Key : Lower : Value : Upper : Fixed : Stale : Domain
- None : 2.0 : None : 3.0 : False : True : Reals
+ None : 2 : None : 3 : False : True : Reals
4 Constraint Declarations
c : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : -Inf : x1 : +Inf : True
ccon_l : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : ( -2.0 + cc.v ) * x1 : mpec_bound : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : (cc.v - 2)*x1 : mpec_bound : True
ccon_u : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : ( -3.0 + cc.v ) * x1 : mpec_bound : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : (cc.v - 3)*x1 : mpec_bound : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x1 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x1) : 0.0 : True
5 Declarations: c v ve ccon_l ccon_u
diff --git a/pyomo/mpec/tests/t12_mpec.standard_form.txt b/pyomo/mpec/tests/t12_mpec.standard_form.txt
index 32f27f76e7a..1b66722cc8e 100644
--- a/pyomo/mpec/tests/t12_mpec.standard_form.txt
+++ b/pyomo/mpec/tests/t12_mpec.standard_form.txt
@@ -1,17 +1,17 @@
cc : Size=1, Index=None, Active=True
- Key : Arg0 : Arg1 : Active
- None : x1 : 2.0 <= y + x1 <= 3.0 : True
+ Key : Arg0 : Arg1 : Active
+ None : x1 : 2 <= y + x1 <= 3 : True
1 Var Declarations
v : Size=1, Index=None
Key : Lower : Value : Upper : Fixed : Stale : Domain
- None : 2.0 : None : 3.0 : False : True : Reals
+ None : 2 : None : 3 : False : True : Reals
2 Constraint Declarations
c : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : -Inf : x1 : +Inf : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x1 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x1) : 0.0 : True
3 Declarations: c v ve
diff --git a/pyomo/mpec/tests/t1a_mpec.nl.txt b/pyomo/mpec/tests/t1a_mpec.nl.txt
index 2b8f415d9f9..bdfc264bbd2 100644
--- a/pyomo/mpec/tests/t1a_mpec.nl.txt
+++ b/pyomo/mpec/tests/t1a_mpec.nl.txt
@@ -14,8 +14,8 @@
1 Constraint Declarations
c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : x2 - y - x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : x2 - (y + x3) : 0.0 : True
1 Block Declarations
cc : Size=1, Index=None, Active=True
@@ -31,14 +31,14 @@
3 Constraint Declarations
bc : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.bv - y - x1 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.bv - (y + x1) : 0.0 : True
c : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : cc.bv : +Inf : True
e : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - x1 - 2*x2 - 3*x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (x1 + 2*x2 + 3*x3) : 0.0 : True
5 Declarations: bv c bc v e
diff --git a/pyomo/mpec/tests/t1a_mpec.simple_disjunction.txt b/pyomo/mpec/tests/t1a_mpec.simple_disjunction.txt
index 7f586f9c29c..0e59b4449e0 100644
--- a/pyomo/mpec/tests/t1a_mpec.simple_disjunction.txt
+++ b/pyomo/mpec/tests/t1a_mpec.simple_disjunction.txt
@@ -13,8 +13,8 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x1 : +Inf : True
c1 : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + x1 + 2*x2 + 3*x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : x1 + 2*x2 + 3*x3 - 1.0 : 0.0 : True
3 Declarations: indicator_var c0 c1
expr2 : Size=1, Index=None, Active=True
@@ -28,8 +28,8 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x1 : 0.0 : True
c1 : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + x1 + 2*x2 + 3*x3 : +Inf : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : x1 + 2*x2 + 3*x3 - 1.0 : +Inf : True
3 Declarations: indicator_var c0 c1
diff --git a/pyomo/mpec/tests/t1a_mpec.simple_nonlinear.txt b/pyomo/mpec/tests/t1a_mpec.simple_nonlinear.txt
index 3c1c6580c85..8f44f23abb8 100644
--- a/pyomo/mpec/tests/t1a_mpec.simple_nonlinear.txt
+++ b/pyomo/mpec/tests/t1a_mpec.simple_nonlinear.txt
@@ -11,10 +11,10 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 1.0 : x1 + 2*x2 + 3*x3 : +Inf : True
ccon : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : ( -1.0 + x1 + 2*x2 + 3*x3 ) * cc.v : mpec_bound : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : (x1 + 2*x2 + 3*x3 - 1.0)*cc.v : mpec_bound : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x1 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x1) : 0.0 : True
4 Declarations: c v ve ccon
diff --git a/pyomo/mpec/tests/t1a_mpec.standard_form.txt b/pyomo/mpec/tests/t1a_mpec.standard_form.txt
index 9f576f7f810..407b2b2808d 100644
--- a/pyomo/mpec/tests/t1a_mpec.standard_form.txt
+++ b/pyomo/mpec/tests/t1a_mpec.standard_form.txt
@@ -11,7 +11,7 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 1.0 : x1 + 2*x2 + 3*x3 : +Inf : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x1 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x1) : 0.0 : True
3 Declarations: c v ve
diff --git a/pyomo/mpec/tests/t1b_mpec.nl.txt b/pyomo/mpec/tests/t1b_mpec.nl.txt
index 1620b08821c..3094f99df21 100644
--- a/pyomo/mpec/tests/t1b_mpec.nl.txt
+++ b/pyomo/mpec/tests/t1b_mpec.nl.txt
@@ -26,14 +26,14 @@
3 Constraint Declarations
bc : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : 1.0 + cc.bv - x1 - 2*x2 - 3*x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.bv - (x1 + 2*x2 + 3*x3 - 1.0) : 0.0 : True
c : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : cc.bv : +Inf : True
e : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x1 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x1) : 0.0 : True
5 Declarations: bv c bc v e
diff --git a/pyomo/mpec/tests/t1b_mpec.simple_disjunction.txt b/pyomo/mpec/tests/t1b_mpec.simple_disjunction.txt
index 9d1f9b3d14a..a68952444d5 100644
--- a/pyomo/mpec/tests/t1b_mpec.simple_disjunction.txt
+++ b/pyomo/mpec/tests/t1b_mpec.simple_disjunction.txt
@@ -10,8 +10,8 @@ cc : Size=1, Index=None, Active=True
2 Constraint Declarations
c0 : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + x1 + 2*x2 + 3*x3 : +Inf : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : x1 + 2*x2 + 3*x3 - 1.0 : +Inf : True
c1 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x1 : 0.0 : True
@@ -25,8 +25,8 @@ cc : Size=1, Index=None, Active=True
2 Constraint Declarations
c0 : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + x1 + 2*x2 + 3*x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : x1 + 2*x2 + 3*x3 - 1.0 : 0.0 : True
c1 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x1 : +Inf : True
diff --git a/pyomo/mpec/tests/t1b_mpec.simple_nonlinear.txt b/pyomo/mpec/tests/t1b_mpec.simple_nonlinear.txt
index 882bc4b3b97..bad6b5fc4cb 100644
--- a/pyomo/mpec/tests/t1b_mpec.simple_nonlinear.txt
+++ b/pyomo/mpec/tests/t1b_mpec.simple_nonlinear.txt
@@ -11,10 +11,10 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x1 : +Inf : True
ccon : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : ( y + x1 ) * cc.v : mpec_bound : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : (y + x1)*cc.v : mpec_bound : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : 1.0 + cc.v - x1 - 2*x2 - 3*x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (x1 + 2*x2 + 3*x3 - 1.0) : 0.0 : True
4 Declarations: c v ve ccon
diff --git a/pyomo/mpec/tests/t1b_mpec.standard_form.txt b/pyomo/mpec/tests/t1b_mpec.standard_form.txt
index d4ad7ed444e..ebf9f85c8a2 100644
--- a/pyomo/mpec/tests/t1b_mpec.standard_form.txt
+++ b/pyomo/mpec/tests/t1b_mpec.standard_form.txt
@@ -11,7 +11,7 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x1 : +Inf : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : 1.0 + cc.v - x1 - 2*x2 - 3*x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (x1 + 2*x2 + 3*x3 - 1.0) : 0.0 : True
3 Declarations: c v ve
diff --git a/pyomo/mpec/tests/t1c_None.txt b/pyomo/mpec/tests/t1c_None.txt
index d08442ac052..5f5a7aaf9d9 100644
--- a/pyomo/mpec/tests/t1c_None.txt
+++ b/pyomo/mpec/tests/t1c_None.txt
@@ -1,3 +1,3 @@
cc : Size=1, Index=None, Active=True
- Key : Arg0 : Arg1 : Active
- None : -1 * x1 <= y : 1 - 3*x3 <= x1 + 2*x2 : True
+ Key : Arg0 : Arg1 : Active
+ None : - x1 <= y : 1 - 3*x3 <= x1 + 2*x2 : True
diff --git a/pyomo/mpec/tests/t1c_mpec.nl.txt b/pyomo/mpec/tests/t1c_mpec.nl.txt
index 34e8499cacf..f2eadb7b9fd 100644
--- a/pyomo/mpec/tests/t1c_mpec.nl.txt
+++ b/pyomo/mpec/tests/t1c_mpec.nl.txt
@@ -14,8 +14,8 @@
1 Block Declarations
cc : Size=1, Index=None, Active=True
- Key : Arg0 : Arg1 : Active
- None : -1 * x1 <= y : 1 - 3*x3 <= x1 + 2*x2 : True
+ Key : Arg0 : Arg1 : Active
+ None : - x1 <= y : 1 - 3*x3 <= x1 + 2*x2 : True
2 Var Declarations
bv : Size=1, Index=None
Key : Lower : Value : Upper : Fixed : Stale : Domain
@@ -26,14 +26,14 @@
3 Constraint Declarations
bc : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.bv - y - x1 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.bv - (y + x1) : 0.0 : True
c : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : cc.bv : +Inf : True
e : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : 1 + cc.v - x1 - 2*x2 - 3*x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (x1 + 2*x2 - (1 - 3*x3)) : 0.0 : True
5 Declarations: bv c bc v e
diff --git a/pyomo/mpec/tests/t1c_mpec.simple_disjunction.txt b/pyomo/mpec/tests/t1c_mpec.simple_disjunction.txt
index ffb2123f2b6..0f487aff302 100644
--- a/pyomo/mpec/tests/t1c_mpec.simple_disjunction.txt
+++ b/pyomo/mpec/tests/t1c_mpec.simple_disjunction.txt
@@ -1,6 +1,6 @@
cc : Size=1, Index=None, Active=True
- Key : Arg0 : Arg1 : Active
- None : -1 * x1 <= y : 1 - 3*x3 <= x1 + 2*x2 : True
+ Key : Arg0 : Arg1 : Active
+ None : - x1 <= y : 1 - 3*x3 <= x1 + 2*x2 : True
2 Disjunct Declarations
expr1 : Size=1, Index=None, Active=True
1 Var Declarations
@@ -13,8 +13,8 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x1 : +Inf : True
c1 : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + x1 + 2*x2 + 3*x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : x1 + 2*x2 - (1 - 3*x3) : 0.0 : True
3 Declarations: indicator_var c0 c1
expr2 : Size=1, Index=None, Active=True
@@ -28,8 +28,8 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x1 : 0.0 : True
c1 : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + x1 + 2*x2 + 3*x3 : +Inf : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : x1 + 2*x2 - (1 - 3*x3) : +Inf : True
3 Declarations: indicator_var c0 c1
diff --git a/pyomo/mpec/tests/t1c_mpec.simple_nonlinear.txt b/pyomo/mpec/tests/t1c_mpec.simple_nonlinear.txt
index c5e419886b2..e78f6d3876a 100644
--- a/pyomo/mpec/tests/t1c_mpec.simple_nonlinear.txt
+++ b/pyomo/mpec/tests/t1c_mpec.simple_nonlinear.txt
@@ -1,6 +1,6 @@
cc : Size=1, Index=None, Active=True
- Key : Arg0 : Arg1 : Active
- None : -1 * x1 <= y : 1 - 3*x3 <= x1 + 2*x2 : True
+ Key : Arg0 : Arg1 : Active
+ None : - x1 <= y : 1 - 3*x3 <= x1 + 2*x2 : True
1 Var Declarations
v : Size=1, Index=None
Key : Lower : Value : Upper : Fixed : Stale : Domain
@@ -8,13 +8,13 @@ cc : Size=1, Index=None, Active=True
3 Constraint Declarations
c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1 + x1 + 2*x2 + 3*x3 : +Inf : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : x1 + 2*x2 - (1 - 3*x3) : +Inf : True
ccon : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : ( -1.0 + x1 + 2*x2 + 3*x3 ) * cc.v : mpec_bound : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : (x1 + 2*x2 - (1 - 3*x3))*cc.v : mpec_bound : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x1 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x1) : 0.0 : True
4 Declarations: c v ve ccon
diff --git a/pyomo/mpec/tests/t1c_mpec.standard_form.txt b/pyomo/mpec/tests/t1c_mpec.standard_form.txt
index 1e3d3bc65b9..5f6589daf7e 100644
--- a/pyomo/mpec/tests/t1c_mpec.standard_form.txt
+++ b/pyomo/mpec/tests/t1c_mpec.standard_form.txt
@@ -1,6 +1,6 @@
cc : Size=1, Index=None, Active=True
- Key : Arg0 : Arg1 : Active
- None : -1 * x1 <= y : 1 - 3*x3 <= x1 + 2*x2 : True
+ Key : Arg0 : Arg1 : Active
+ None : - x1 <= y : 1 - 3*x3 <= x1 + 2*x2 : True
1 Var Declarations
v : Size=1, Index=None
Key : Lower : Value : Upper : Fixed : Stale : Domain
@@ -8,10 +8,10 @@ cc : Size=1, Index=None, Active=True
2 Constraint Declarations
c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1 + x1 + 2*x2 + 3*x3 : +Inf : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : x1 + 2*x2 - (1 - 3*x3) : +Inf : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x1 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x1) : 0.0 : True
3 Declarations: c v ve
diff --git a/pyomo/mpec/tests/t2a_mpec.nl.txt b/pyomo/mpec/tests/t2a_mpec.nl.txt
index 8704da4c733..761dfd31665 100644
--- a/pyomo/mpec/tests/t2a_mpec.nl.txt
+++ b/pyomo/mpec/tests/t2a_mpec.nl.txt
@@ -26,14 +26,14 @@
3 Constraint Declarations
bc : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.bv + y + x2 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.bv + (y + x2) : 0.0 : True
c : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : cc.bv : +Inf : True
e : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - x2 + x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (x2 - x3) : 0.0 : True
5 Declarations: bv c bc v e
diff --git a/pyomo/mpec/tests/t2a_mpec.simple_disjunction.txt b/pyomo/mpec/tests/t2a_mpec.simple_disjunction.txt
index ed7af534186..9e8c831c357 100644
--- a/pyomo/mpec/tests/t2a_mpec.simple_disjunction.txt
+++ b/pyomo/mpec/tests/t2a_mpec.simple_disjunction.txt
@@ -13,8 +13,8 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x2 : +Inf : True
c1 : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 - x2 + x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : -1.0 - (x2 - x3) : 0.0 : True
3 Declarations: indicator_var c0 c1
expr2 : Size=1, Index=None, Active=True
@@ -28,8 +28,8 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x2 : 0.0 : True
c1 : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 - x2 + x3 : +Inf : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : -1.0 - (x2 - x3) : +Inf : True
3 Declarations: indicator_var c0 c1
diff --git a/pyomo/mpec/tests/t2a_mpec.simple_nonlinear.txt b/pyomo/mpec/tests/t2a_mpec.simple_nonlinear.txt
index 1afe50ec091..8c80c343248 100644
--- a/pyomo/mpec/tests/t2a_mpec.simple_nonlinear.txt
+++ b/pyomo/mpec/tests/t2a_mpec.simple_nonlinear.txt
@@ -8,13 +8,13 @@ cc : Size=1, Index=None, Active=True
3 Constraint Declarations
c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 1.0 : - x2 + x3 : +Inf : True
+ Key : Lower : Body : Upper : Active
+ None : 1.0 : - (x2 - x3) : +Inf : True
ccon : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : ( -1.0 - x2 + x3 ) * cc.v : mpec_bound : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : (- (x2 - x3) - 1.0)*cc.v : mpec_bound : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x2 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x2) : 0.0 : True
4 Declarations: c v ve ccon
diff --git a/pyomo/mpec/tests/t2a_mpec.standard_form.txt b/pyomo/mpec/tests/t2a_mpec.standard_form.txt
index 6ebd53df365..ae0a89e77e2 100644
--- a/pyomo/mpec/tests/t2a_mpec.standard_form.txt
+++ b/pyomo/mpec/tests/t2a_mpec.standard_form.txt
@@ -8,10 +8,10 @@ cc : Size=1, Index=None, Active=True
2 Constraint Declarations
c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 1.0 : - x2 + x3 : +Inf : True
+ Key : Lower : Body : Upper : Active
+ None : 1.0 : - (x2 - x3) : +Inf : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x2 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x2) : 0.0 : True
3 Declarations: c v ve
diff --git a/pyomo/mpec/tests/t2b_mpec.nl.txt b/pyomo/mpec/tests/t2b_mpec.nl.txt
index 3dfa0c747d6..7271acd5e98 100644
--- a/pyomo/mpec/tests/t2b_mpec.nl.txt
+++ b/pyomo/mpec/tests/t2b_mpec.nl.txt
@@ -26,14 +26,14 @@
3 Constraint Declarations
bc : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : 1.0 + cc.bv + x2 - x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.bv - (-1.0 - (x2 - x3)) : 0.0 : True
c : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : cc.bv : +Inf : True
e : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x2 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x2) : 0.0 : True
5 Declarations: bv c bc v e
diff --git a/pyomo/mpec/tests/t2b_mpec.simple_disjunction.txt b/pyomo/mpec/tests/t2b_mpec.simple_disjunction.txt
index 04a0f97aeff..d107ada470c 100644
--- a/pyomo/mpec/tests/t2b_mpec.simple_disjunction.txt
+++ b/pyomo/mpec/tests/t2b_mpec.simple_disjunction.txt
@@ -10,8 +10,8 @@ cc : Size=1, Index=None, Active=True
2 Constraint Declarations
c0 : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 - x2 + x3 : +Inf : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : -1.0 - (x2 - x3) : +Inf : True
c1 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x2 : 0.0 : True
@@ -25,8 +25,8 @@ cc : Size=1, Index=None, Active=True
2 Constraint Declarations
c0 : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 - x2 + x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : -1.0 - (x2 - x3) : 0.0 : True
c1 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x2 : +Inf : True
diff --git a/pyomo/mpec/tests/t2b_mpec.simple_nonlinear.txt b/pyomo/mpec/tests/t2b_mpec.simple_nonlinear.txt
index a9ff8b30fc9..86daadc11c5 100644
--- a/pyomo/mpec/tests/t2b_mpec.simple_nonlinear.txt
+++ b/pyomo/mpec/tests/t2b_mpec.simple_nonlinear.txt
@@ -11,10 +11,10 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x2 : +Inf : True
ccon : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : ( y + x2 ) * cc.v : mpec_bound : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : (y + x2)*cc.v : mpec_bound : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : 1.0 + cc.v + x2 - x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (-1.0 - (x2 - x3)) : 0.0 : True
4 Declarations: c v ve ccon
diff --git a/pyomo/mpec/tests/t2b_mpec.standard_form.txt b/pyomo/mpec/tests/t2b_mpec.standard_form.txt
index 195aa8be69b..9130ddf562c 100644
--- a/pyomo/mpec/tests/t2b_mpec.standard_form.txt
+++ b/pyomo/mpec/tests/t2b_mpec.standard_form.txt
@@ -11,7 +11,7 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x2 : +Inf : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : 1.0 + cc.v + x2 - x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (-1.0 - (x2 - x3)) : 0.0 : True
3 Declarations: c v ve
diff --git a/pyomo/mpec/tests/t3a_mpec.nl.txt b/pyomo/mpec/tests/t3a_mpec.nl.txt
index 109d6afa067..3efc2c4d796 100644
--- a/pyomo/mpec/tests/t3a_mpec.nl.txt
+++ b/pyomo/mpec/tests/t3a_mpec.nl.txt
@@ -26,14 +26,14 @@
3 Constraint Declarations
bc : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.bv - y - x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.bv - (y + x3) : 0.0 : True
c : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : cc.bv : +Inf : True
e : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - x1 - x2 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (x1 + x2) : 0.0 : True
5 Declarations: bv c bc v e
diff --git a/pyomo/mpec/tests/t3a_mpec.simple_disjunction.txt b/pyomo/mpec/tests/t3a_mpec.simple_disjunction.txt
index 17a6bfac1f5..333862a97c6 100644
--- a/pyomo/mpec/tests/t3a_mpec.simple_disjunction.txt
+++ b/pyomo/mpec/tests/t3a_mpec.simple_disjunction.txt
@@ -14,7 +14,7 @@ cc : Size=1, Index=None, Active=True
None : 0.0 : y + x3 : +Inf : True
c1 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
- None : 0.0 : 1.0 + x1 + x2 : 0.0 : True
+ None : 0.0 : x1 + x2 + 1.0 : 0.0 : True
3 Declarations: indicator_var c0 c1
expr2 : Size=1, Index=None, Active=True
@@ -29,7 +29,7 @@ cc : Size=1, Index=None, Active=True
None : 0.0 : y + x3 : 0.0 : True
c1 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
- None : 0.0 : 1.0 + x1 + x2 : +Inf : True
+ None : 0.0 : x1 + x2 + 1.0 : +Inf : True
3 Declarations: indicator_var c0 c1
diff --git a/pyomo/mpec/tests/t3a_mpec.simple_nonlinear.txt b/pyomo/mpec/tests/t3a_mpec.simple_nonlinear.txt
index e786fb8b508..7e9e4e4506a 100644
--- a/pyomo/mpec/tests/t3a_mpec.simple_nonlinear.txt
+++ b/pyomo/mpec/tests/t3a_mpec.simple_nonlinear.txt
@@ -11,10 +11,10 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : -1.0 : x1 + x2 : +Inf : True
ccon : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : ( 1.0 + x1 + x2 ) * cc.v : mpec_bound : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : (x1 + x2 + 1.0)*cc.v : mpec_bound : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x3) : 0.0 : True
4 Declarations: c v ve ccon
diff --git a/pyomo/mpec/tests/t3a_mpec.standard_form.txt b/pyomo/mpec/tests/t3a_mpec.standard_form.txt
index a03ffac83d4..4575990836d 100644
--- a/pyomo/mpec/tests/t3a_mpec.standard_form.txt
+++ b/pyomo/mpec/tests/t3a_mpec.standard_form.txt
@@ -11,7 +11,7 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : -1.0 : x1 + x2 : +Inf : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x3) : 0.0 : True
3 Declarations: c v ve
diff --git a/pyomo/mpec/tests/t3b_mpec.nl.txt b/pyomo/mpec/tests/t3b_mpec.nl.txt
index 600f21de84c..f3e84387aef 100644
--- a/pyomo/mpec/tests/t3b_mpec.nl.txt
+++ b/pyomo/mpec/tests/t3b_mpec.nl.txt
@@ -26,14 +26,14 @@
3 Constraint Declarations
bc : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + cc.bv - x1 - x2 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.bv - (x1 + x2 + 1.0) : 0.0 : True
c : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : cc.bv : +Inf : True
e : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : cc.v - y - x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (y + x3) : 0.0 : True
5 Declarations: bv c bc v e
diff --git a/pyomo/mpec/tests/t3b_mpec.simple_disjunction.txt b/pyomo/mpec/tests/t3b_mpec.simple_disjunction.txt
index a0f0ffacf5b..154695f5ddb 100644
--- a/pyomo/mpec/tests/t3b_mpec.simple_disjunction.txt
+++ b/pyomo/mpec/tests/t3b_mpec.simple_disjunction.txt
@@ -11,7 +11,7 @@ cc : Size=1, Index=None, Active=True
2 Constraint Declarations
c0 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
- None : 0.0 : 1.0 + x1 + x2 : +Inf : True
+ None : 0.0 : x1 + x2 + 1.0 : +Inf : True
c1 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x3 : 0.0 : True
@@ -26,7 +26,7 @@ cc : Size=1, Index=None, Active=True
2 Constraint Declarations
c0 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
- None : 0.0 : 1.0 + x1 + x2 : 0.0 : True
+ None : 0.0 : x1 + x2 + 1.0 : 0.0 : True
c1 : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x3 : +Inf : True
diff --git a/pyomo/mpec/tests/t3b_mpec.simple_nonlinear.txt b/pyomo/mpec/tests/t3b_mpec.simple_nonlinear.txt
index 3a6dd667cf4..6249b81cb09 100644
--- a/pyomo/mpec/tests/t3b_mpec.simple_nonlinear.txt
+++ b/pyomo/mpec/tests/t3b_mpec.simple_nonlinear.txt
@@ -11,10 +11,10 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x3 : +Inf : True
ccon : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : -Inf : ( y + x3 ) * cc.v : mpec_bound : True
+ Key : Lower : Body : Upper : Active
+ None : -Inf : (y + x3)*cc.v : mpec_bound : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + cc.v - x1 - x2 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (x1 + x2 + 1.0) : 0.0 : True
4 Declarations: c v ve ccon
diff --git a/pyomo/mpec/tests/t3b_mpec.standard_form.txt b/pyomo/mpec/tests/t3b_mpec.standard_form.txt
index 7f7f19cbc03..20b1b797078 100644
--- a/pyomo/mpec/tests/t3b_mpec.standard_form.txt
+++ b/pyomo/mpec/tests/t3b_mpec.standard_form.txt
@@ -11,7 +11,7 @@ cc : Size=1, Index=None, Active=True
Key : Lower : Body : Upper : Active
None : 0.0 : y + x3 : +Inf : True
ve : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1.0 + cc.v - x1 - x2 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : cc.v - (x1 + x2 + 1.0) : 0.0 : True
3 Declarations: c v ve
diff --git a/pyomo/mpec/tests/t4d_mpec.nl.txt b/pyomo/mpec/tests/t4d_mpec.nl.txt
index e89e8090ac5..245f84c274f 100644
--- a/pyomo/mpec/tests/t4d_mpec.nl.txt
+++ b/pyomo/mpec/tests/t4d_mpec.nl.txt
@@ -18,8 +18,8 @@
None : x1 + 2*x2 == 1 - 3*x3 : y + x3 : True
1 Constraint Declarations
c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1 + x1 + 2*x2 + 3*x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : x1 + 2*x2 - (1 - 3*x3) : 0.0 : True
1 Declarations: c
diff --git a/pyomo/mpec/tests/t4d_mpec.simple_disjunction.txt b/pyomo/mpec/tests/t4d_mpec.simple_disjunction.txt
index 3e24fc6568d..e62f19eb480 100644
--- a/pyomo/mpec/tests/t4d_mpec.simple_disjunction.txt
+++ b/pyomo/mpec/tests/t4d_mpec.simple_disjunction.txt
@@ -3,7 +3,7 @@ cc : Size=1, Index=None, Active=True
None : x1 + 2*x2 == 1 - 3*x3 : y + x3 : True
1 Constraint Declarations
c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1 + x1 + 2*x2 + 3*x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : x1 + 2*x2 - (1 - 3*x3) : 0.0 : True
1 Declarations: c
diff --git a/pyomo/mpec/tests/t4d_mpec.simple_nonlinear.txt b/pyomo/mpec/tests/t4d_mpec.simple_nonlinear.txt
index 3e24fc6568d..e62f19eb480 100644
--- a/pyomo/mpec/tests/t4d_mpec.simple_nonlinear.txt
+++ b/pyomo/mpec/tests/t4d_mpec.simple_nonlinear.txt
@@ -3,7 +3,7 @@ cc : Size=1, Index=None, Active=True
None : x1 + 2*x2 == 1 - 3*x3 : y + x3 : True
1 Constraint Declarations
c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1 + x1 + 2*x2 + 3*x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : x1 + 2*x2 - (1 - 3*x3) : 0.0 : True
1 Declarations: c
diff --git a/pyomo/mpec/tests/t4d_mpec.standard_form.txt b/pyomo/mpec/tests/t4d_mpec.standard_form.txt
index 3e24fc6568d..e62f19eb480 100644
--- a/pyomo/mpec/tests/t4d_mpec.standard_form.txt
+++ b/pyomo/mpec/tests/t4d_mpec.standard_form.txt
@@ -3,7 +3,7 @@ cc : Size=1, Index=None, Active=True
None : x1 + 2*x2 == 1 - 3*x3 : y + x3 : True
1 Constraint Declarations
c : Size=1, Index=None, Active=True
- Key : Lower : Body : Upper : Active
- None : 0.0 : -1 + x1 + 2*x2 + 3*x3 : 0.0 : True
+ Key : Lower : Body : Upper : Active
+ None : 0.0 : x1 + 2*x2 - (1 - 3*x3) : 0.0 : True
1 Declarations: c
diff --git a/pyomo/mpec/tests/test_complementarity.py b/pyomo/mpec/tests/test_complementarity.py
index 2892ebd8d3c..5b3f36e695e 100644
--- a/pyomo/mpec/tests/test_complementarity.py
+++ b/pyomo/mpec/tests/test_complementarity.py
@@ -150,13 +150,13 @@ def f(model, i):
def test_t11(self):
# 2 <= y + x1 <= 3 _|_ x1
M = self._setup()
- M.cc = Complementarity(expr=complements(2 <= M.y + M.x1 <= 3, M.x1))
+ M.cc = Complementarity(expr=complements(inequality(2, M.y + M.x1, 3), M.x1))
self._test("t11", M)
def test_t12(self):
# x1 _|_ 2 <= y + x1 <= 3"""
M = self._setup()
- M.cc = Complementarity(expr=complements(M.x1, 2 <= M.y + M.x1 <= 3))
+ M.cc = Complementarity(expr=complements(M.x1, inequality(2, M.y + M.x1, 3)))
self._test("t12", M)
def test_t13(self):
@@ -257,7 +257,7 @@ def f(model):
def test_cov10(self):
# Testing construction with a badly formed expression
M = self._setup()
- M.cc = Complementarity(expr=complements(M.y <= M.x1 <= 1, M.x2))
+ M.cc = Complementarity(expr=complements(inequality(M.y, M.x1, 1), M.x2))
try:
M.cc.to_standard_form()
self.fail("Expected a RuntimeError")
@@ -267,7 +267,7 @@ def test_cov10(self):
def test_cov11(self):
# Testing construction with a badly formed expression
M = self._setup()
- M.cc = Complementarity(expr=complements(1 <= M.x1 <= M.y, M.x2))
+ M.cc = Complementarity(expr=complements(inequality(1, M.x1, M.y), M.x2))
try:
M.cc.to_standard_form()
self.fail("Expected a RuntimeError")
diff --git a/pyomo/pysp/bbph/brancher.py b/pyomo/pysp/bbph/brancher.py
index 33bf60e6942..d553e36ad8d 100644
--- a/pyomo/pysp/bbph/brancher.py
+++ b/pyomo/pysp/bbph/brancher.py
@@ -32,7 +32,7 @@ def collect_node_variable_bounds(tree_node):
var_bounds = {}
for variable_id, vardatas in iteritems(tree_node._variable_datas):
vardata = vardatas[0][0]
- if not vardata.is_expression():
+ if not vardata.is_expression_type():
var_bounds[variable_id] = (vardata.lb, vardata.ub)
else:
# Expression
diff --git a/pyomo/pysp/convert/ddsip.py b/pyomo/pysp/convert/ddsip.py
index 676cfa26bfd..0cdc0f523e7 100644
--- a/pyomo/pysp/convert/ddsip.py
+++ b/pyomo/pysp/convert/ddsip.py
@@ -24,7 +24,6 @@
from pyomo.core.base.constraint import Constraint, _ConstraintData
from pyomo.core.base.suffix import ComponentMap
from pyomo.core.base import TextLabeler, NumericLabeler
-from pyomo.repn import LinearCanonicalRepn
from pyomo.pysp.scenariotree.manager import InvocationType
from pyomo.pysp.annotations import (locate_annotations,
StochasticConstraintBoundsAnnotation,
@@ -33,6 +32,7 @@
StochasticVariableBoundsAnnotation)
from pyomo.pysp.convert.smps import (map_variable_stages,
map_constraint_stages,
+ build_repns,
_safe_remove_file,
_no_negative_zero,
_deterministic_check_value,
@@ -56,7 +56,7 @@
def _convert_external_setup(worker, scenario, *args, **kwds):
reference_model = scenario._instance
#
- # We will be tweaking the canonical_repn objects on objectives
+ # We will be tweaking the standard_repn objects on objectives
# and constraints, so cache anything related to this here so
# that this function does not have any side effects on the
# instance after returning
@@ -66,18 +66,18 @@ def _convert_external_setup(worker, scenario, *args, **kwds):
active=True,
descend_into=True):
block_cached_attrs = {}
- if hasattr(block, "_gen_obj_canonical_repn"):
- block_cached_attrs["_gen_obj_canonical_repn"] = \
- block._gen_obj_canonical_repn
- del block._gen_obj_canonical_repn
- if hasattr(block, "_gen_con_canonical_repn"):
- block_cached_attrs["_gen_con_canonical_repn"] = \
- block._gen_con_canonical_repn
- del block._gen_con_canonical_repn
- if hasattr(block, "_canonical_repn"):
- block_cached_attrs["_canonical_repn"] = \
- block._canonical_repn
- del block._canonical_repn
+ if hasattr(block, "_gen_obj_repn"):
+ block_cached_attrs["_gen_obj_repn"] = \
+ block._gen_obj_repn
+ del block._gen_obj_repn
+ if hasattr(block, "_gen_con_repn"):
+ block_cached_attrs["_gen_con_repn"] = \
+ block._gen_con_repn
+ del block._gen_con_repn
+ if hasattr(block, "_repn"):
+ block_cached_attrs["_repn"] = \
+ block._repn
+ del block._repn
cached_attrs.append((block, block_cached_attrs))
try:
@@ -89,6 +89,12 @@ def _convert_external_setup(worker, scenario, *args, **kwds):
raise
finally:
for block, block_cached_attrs in cached_attrs:
+ if hasattr(block, "_gen_obj_repn"):
+ del block._gen_obj_repn
+ if hasattr(block, "_gen_con_repn"):
+ del block._gen_con_repn
+ if hasattr(block, "_repn"):
+ del block._repn
for name in block_cached_attrs:
setattr(block, name, block_cached_attrs[name])
@@ -212,10 +218,21 @@ def _convert_external_setup_without_cleanup(
StochasticConstraintBodyAnnotation.__name__,
StochasticObjectiveAnnotation.__name__))
+ assert not hasattr(reference_model, "_repn")
+ repn_cache = build_repns(reference_model)
+ assert hasattr(reference_model, "_repn")
+ assert not reference_model._gen_obj_repn
+ assert not reference_model._gen_con_repn
+ # compute values
+ for block_repns in repn_cache.values():
+ for repn in block_repns.values():
+ repn.constant = value(repn.constant)
+ repn.linear_coefs = [value(c) for c in repn.linear_coefs]
+ repn.quadratic_coefs = [value(c) for c in repn.quadratic_coefs]
+
#
# Write the LP file once to obtain the symbol map
#
- assert not hasattr(reference_model, "_canonical_repn")
output_filename = os.path.join(output_directory,
scenario.name+".lp.setup")
with WriterFactory("lp") as writer:
@@ -226,7 +243,6 @@ def _convert_external_setup_without_cleanup(
lambda x: True,
io_options)
assert output_fname == output_filename
- assert hasattr(reference_model, "_canonical_repn")
_safe_remove_file(output_filename)
StageToVariableMap = map_variable_stages(
@@ -257,19 +273,9 @@ def _convert_external_setup_without_cleanup(
firststage = scenario_tree.stages[0]
secondstage = scenario_tree.stages[1]
- # disable these as they do not need to be regenerated and
- # we will be modifiying them
- canonical_repn_cache = {}
- for block in reference_model.block_data_objects(
- active=True,
- descend_into=True):
- canonical_repn_cache[id(block)] = block._canonical_repn
- block._gen_obj_canonical_repn = False
- block._gen_con_canonical_repn = False
-
#
# Make sure the objective references all first stage variables.
- # We do this by directly modifying the canonical_repn of the
+ # We do this by directly modifying the _repn of the
# objective which the LP/MPS writer will reference next time we call
# it. In addition, make sure that the first second-stage variable
# in our column ordering also appears in the objective so that
@@ -280,7 +286,7 @@ def _convert_external_setup_without_cleanup(
objective_object = scenario._instance_objective
assert objective_object is not None
objective_block = objective_object.parent_block()
- objective_repn = canonical_repn_cache[id(objective_block)][objective_object]
+ objective_repn = repn_cache[id(objective_block)][objective_object]
#
# Create column (variable) ordering maps for LP/MPS files
@@ -366,7 +372,7 @@ def _convert_external_setup_without_cleanup(
lines = []
for id_ in sorted(rootnode._variable_ids):
var = st_symbol_map.bySymbol[id_]
- if not var.is_expression():
+ if not var.is_expression_type():
lp_label = symbol_map.byObject[id(var)]
lines.append("%s %s\n" % (lp_label, id_))
f.writelines(lines)
@@ -434,8 +440,8 @@ def _convert_external_setup_without_cleanup(
StochasticConstraintBoundsAnnotation.__name__))
constraint_repn = \
- canonical_repn_cache[id(con.parent_block())][con]
- if not isinstance(constraint_repn, LinearCanonicalRepn):
+ repn_cache[id(con.parent_block())][con]
+ if not constraint_repn.is_linear():
raise RuntimeError("Only linear constraints are "
"accepted for conversion to DDSIP format. "
"Constraint %s is not linear."
@@ -541,28 +547,28 @@ def _convert_external_setup_without_cleanup(
% (con.name,
StochasticConstraintBodyAnnotation.__name__))
constraint_repn = \
- canonical_repn_cache[id(con.parent_block())][con]
- if not isinstance(constraint_repn, LinearCanonicalRepn):
+ repn_cache[id(con.parent_block())][con]
+ if not constraint_repn.is_linear():
raise RuntimeError("Only linear constraints are "
"accepted for conversion to DDSIP format. "
"Constraint %s is not linear."
% (con.name))
- assert len(constraint_repn.variables) > 0
+ assert len(constraint_repn.linear_vars) > 0
if var_list is None:
- var_list = constraint_repn.variables
+ var_list = constraint_repn.linear_vars
assert len(var_list) > 0
symbols = constraint_symbols[con]
# sort the variable list by the column ordering
# so that we have deterministic output
var_list = list(var_list)
var_list.sort(key=lambda _v: column_order[_v])
- new_coefs = list(constraint_repn.linear)
+ new_coefs = list(constraint_repn.linear_coefs)
for var in var_list:
assert isinstance(var, _VarData)
assert not var.fixed
var_coef = None
- for i, (_var, coef) in enumerate(zip(constraint_repn.variables,
- constraint_repn.linear)):
+ for i, (_var, coef) in enumerate(zip(constraint_repn.linear_vars,
+ constraint_repn.linear_coefs)):
if _var is var:
var_coef = coef
# We are going to rewrite with core problem file
@@ -587,7 +593,7 @@ def _convert_external_setup_without_cleanup(
f_mat.write(matrix_template
% (_no_negative_zero(value(var_coef))))
- constraint_repn.linear = tuple(new_coefs)
+ constraint_repn.linear_coefs = tuple(new_coefs)
#
# Stochastic Objective
@@ -617,25 +623,25 @@ def _convert_external_setup_without_cleanup(
objective_variables, include_constant = \
stochastic_objective.default
- if not isinstance(objective_repn, LinearCanonicalRepn):
+ if not objective_repn.is_linear():
raise RuntimeError("Only linear stochastic objectives are "
"accepted for conversion to DDSIP format. "
"Objective %s is not linear."
% (objective_object.name))
if objective_variables is None:
- objective_variables = objective_repn.variables
+ objective_variables = objective_repn.linear_vars
stochastic_objective_label = symbol_map.byObject[id(objective_object)]
# sort the variable list by the column ordering
# so that we have deterministic output
objective_variables = list(objective_variables)
objective_variables.sort(key=lambda _v: column_order[_v])
assert (len(objective_variables) > 0) or include_constant
- new_coefs = list(objective_repn.linear)
+ new_coefs = list(objective_repn.linear_coefs)
for var in objective_variables:
assert isinstance(var, _VarData)
var_coef = None
- for i, (_var, coef) in enumerate(zip(objective_repn.variables,
- objective_repn.linear)):
+ for i, (_var, coef) in enumerate(zip(objective_repn.linear_vars,
+ objective_repn.linear_coefs)):
if _var is var:
var_coef = coef
# We are going to rewrite the core problem file
@@ -658,7 +664,7 @@ def _convert_external_setup_without_cleanup(
f_obj.write(obj_template
% (_no_negative_zero(value(var_coef))))
- objective_repn.linear = tuple(new_coefs)
+ objective_repn.linear_coefs = tuple(new_coefs)
if include_constant:
obj_constant = objective_repn.constant
# We are going to rewrite the core problem file
diff --git a/pyomo/pysp/convert/schuripopt.py b/pyomo/pysp/convert/schuripopt.py
index 562ab74a74d..e07c0588019 100644
--- a/pyomo/pysp/convert/schuripopt.py
+++ b/pyomo/pysp/convert/schuripopt.py
@@ -91,8 +91,8 @@ def _write_bundle_nl(worker,
block_attrs = []
for block in bundle_instance.block_data_objects(active=True):
attrs = []
- for attr_name in ("_gen_obj_ampl_repn",
- "_gen_con_ampl_repn"):
+ for attr_name in ("_gen_obj_repn",
+ "_gen_con_repn"):
if hasattr(block, attr_name):
attrs.append((attr_name, getattr(block, attr_name)))
setattr(block, attr_name, True)
@@ -166,8 +166,8 @@ def _write_scenario_nl(worker,
block_attrs = []
for block in instance.block_data_objects(active=True):
attrs = []
- for attr_name in ("_gen_obj_ampl_repn",
- "_gen_con_ampl_repn"):
+ for attr_name in ("_gen_obj_repn",
+ "_gen_con_repn"):
if hasattr(block, attr_name):
attrs.append((attr_name, getattr(block, attr_name)))
setattr(block, attr_name, True)
diff --git a/pyomo/pysp/convert/smps.py b/pyomo/pysp/convert/smps.py
index ba672ceee3b..f2b4a4ca8eb 100644
--- a/pyomo/pysp/convert/smps.py
+++ b/pyomo/pysp/convert/smps.py
@@ -24,12 +24,12 @@
from pyomo.core.base.block import (Block,
_BlockData,
SortComponents)
+from pyomo.core.base.objective import Objective
from pyomo.core.base.var import Var, _VarData
from pyomo.core.base.constraint import Constraint, _ConstraintData
from pyomo.core.base.sos import SOSConstraint
from pyomo.core.base.suffix import ComponentMap
-from pyomo.repn import LinearCanonicalRepn
-from pyomo.repn import generate_canonical_repn
+from pyomo.repn import generate_standard_repn
from pyomo.pysp.scenariotree.manager import InvocationType
from pyomo.pysp.embeddedsp import (EmbeddedSP,
TableDistribution)
@@ -141,10 +141,10 @@ def map_constraint_stages(scenario,
"Invalid constraint: %s"
% (con.name))
- block_canonical_repn = getattr(block, "_canonical_repn", None)
- if block_canonical_repn is None:
+ block_repn = getattr(block, "_repn", None)
+ if block_repn is None:
raise ValueError(
- "Unable to find _canonical_repn ComponentMap "
+ "Unable to find _repn ComponentMap "
"on block %s" % (block.name))
for con in block.component_data_objects(
@@ -248,10 +248,44 @@ def map_variable_stages(scenario,
return StageToVariableMap
+def build_repns(model):
+ """Compiles expressions in a way that reduces the chance
+ of throwing out 0*var terms. Also activate flags that
+ disable regeneration by a solver plugin."""
+ repn_cache = {}
+ for block in model.block_data_objects(
+ active=True,
+ descend_into=True):
+ block._gen_obj_repn = False
+ block._gen_con_repn = False
+ repn_cache[id(block)] = block._repn = ComponentMap()
+ for objective_object in block.component_data_objects(
+ Objective,
+ active=True,
+ descend_into=False):
+ repn = generate_standard_repn(objective_object.expr,
+ compute_values=False)
+ block._repn[objective_object] = repn
+
+ for constraint_data in block.component_data_objects(
+ Constraint,
+ active=True,
+ descend_into=False):
+
+ if constraint_data._linear_canonical_form:
+ repn = constraint_data.canonical_form(compute_values=False)
+ else:
+ repn = generate_standard_repn(constraint_data.body,
+ compute_values=False)
+
+ block._repn[constraint_data] = repn
+
+ return repn_cache
+
def _convert_external_setup(worker, scenario, *args, **kwds):
reference_model = scenario._instance
#
- # We will be tweaking the canonical_repn objects on objectives
+ # We will be tweaking the repn objects on objectives
# and constraints, so cache anything related to this here so
# that this function does not have any side effects on the
# instance after returning
@@ -261,18 +295,18 @@ def _convert_external_setup(worker, scenario, *args, **kwds):
active=True,
descend_into=True):
block_cached_attrs = {}
- if hasattr(block, "_gen_obj_canonical_repn"):
- block_cached_attrs["_gen_obj_canonical_repn"] = \
- block._gen_obj_canonical_repn
- del block._gen_obj_canonical_repn
- if hasattr(block, "_gen_con_canonical_repn"):
- block_cached_attrs["_gen_con_canonical_repn"] = \
- block._gen_con_canonical_repn
- del block._gen_con_canonical_repn
- if hasattr(block, "_canonical_repn"):
- block_cached_attrs["_canonical_repn"] = \
- block._canonical_repn
- del block._canonical_repn
+ if hasattr(block, "_gen_obj_repn"):
+ block_cached_attrs["_gen_obj_repn"] = \
+ block._gen_obj_repn
+ del block._gen_obj_repn
+ if hasattr(block, "_gen_con_repn"):
+ block_cached_attrs["_gen_con_repn"] = \
+ block._gen_con_repn
+ del block._gen_con_repn
+ if hasattr(block, "_repn"):
+ block_cached_attrs["_repn"] = \
+ block._repn
+ del block._repn
cached_attrs.append((block, block_cached_attrs))
try:
@@ -284,6 +318,12 @@ def _convert_external_setup(worker, scenario, *args, **kwds):
raise
finally:
for block, block_cached_attrs in cached_attrs:
+ if hasattr(block, "_gen_obj_repn"):
+ del block._gen_obj_repn
+ if hasattr(block, "_gen_con_repn"):
+ del block._gen_con_repn
+ if hasattr(block, "_repn"):
+ del block._repn
for name in block_cached_attrs:
setattr(block, name, block_cached_attrs[name])
@@ -409,10 +449,21 @@ def _convert_external_setup_without_cleanup(
StochasticConstraintBodyAnnotation.__name__,
StochasticObjectiveAnnotation.__name__))
+ assert not hasattr(reference_model, "_repn")
+ repn_cache = build_repns(reference_model)
+ assert hasattr(reference_model, "_repn")
+ assert not reference_model._gen_obj_repn
+ assert not reference_model._gen_con_repn
+ # compute values
+ for block_repns in repn_cache.values():
+ for repn in block_repns.values():
+ repn.constant = value(repn.constant)
+ repn.linear_coefs = [value(c) for c in repn.linear_coefs]
+ repn.quadratic_coefs = [value(c) for c in repn.quadratic_coefs]
+
#
# Write the LP/MPS file once to obtain the symbol map
#
- assert not hasattr(reference_model, "_canonical_repn")
with WriterFactory(file_format) as writer:
output_filename = \
os.path.join(output_directory,
@@ -424,7 +475,6 @@ def _convert_external_setup_without_cleanup(
lambda x: True,
io_options)
assert output_fname == output_filename
- assert hasattr(reference_model, "_canonical_repn")
StageToVariableMap = map_variable_stages(
scenario,
@@ -454,19 +504,9 @@ def _convert_external_setup_without_cleanup(
firststage = scenario_tree.stages[0]
secondstage = scenario_tree.stages[1]
- # disable these as they do not need to be regenerated and
- # we will be modifiying them
- canonical_repn_cache = {}
- for block in reference_model.block_data_objects(
- active=True,
- descend_into=True):
- canonical_repn_cache[id(block)] = block._canonical_repn
- block._gen_obj_canonical_repn = False
- block._gen_con_canonical_repn = False
-
#
# Make sure the objective references all first stage variables.
- # We do this by directly modifying the canonical_repn of the
+ # We do this by directly modifying the repn of the
# objective which the LP/MPS writer will reference next time we call
# it. In addition, make sure that the first second-stage variable
# in our column ordering also appears in the objective so that
@@ -477,7 +517,7 @@ def _convert_external_setup_without_cleanup(
objective_object = scenario._instance_objective
assert objective_object is not None
objective_block = objective_object.parent_block()
- objective_repn = canonical_repn_cache[id(objective_block)][objective_object]
+ objective_repn = repn_cache[id(objective_block)][objective_object]
#
# Create column (variable) ordering maps for LP/MPS files
@@ -544,7 +584,7 @@ def _convert_external_setup_without_cleanup(
lines = []
for id_ in sorted(rootnode._variable_ids):
var = st_symbol_map.bySymbol[id_]
- if not var.is_expression():
+ if not var.is_expression_type():
lp_label = symbol_map.byObject[id(var)]
lines.append("%s %s\n" % (lp_label, id_))
f.writelines(lines)
@@ -733,12 +773,13 @@ def _convert_external_setup_without_cleanup(
StochasticConstraintBoundsAnnotation.__name__))
constraint_repn = \
- canonical_repn_cache[id(con.parent_block())][con]
- if not isinstance(constraint_repn, LinearCanonicalRepn):
+ repn_cache[id(con.parent_block())][con]
+
+ if not constraint_repn.is_linear():
raise RuntimeError("Only linear constraints are "
"accepted for conversion to SMPS format. "
"Constraint %s is not linear."
- % (con.name))
+ % (constraint_data.name))
body_constant = constraint_repn.constant
# We are going to rewrite the core problem file
@@ -837,29 +878,30 @@ def _convert_external_setup_without_cleanup(
StochasticConstraintBodyAnnotation.__name__))
constraint_repn = \
- canonical_repn_cache[id(con.parent_block())][con]
- if not isinstance(constraint_repn, LinearCanonicalRepn):
+ repn_cache[id(con.parent_block())][con]
+
+ if not constraint_repn.is_linear():
raise RuntimeError("Only linear constraints are "
"accepted for conversion to SMPS format. "
"Constraint %s is not linear."
- % (con.name))
+ % (constraint_data.name))
- assert len(constraint_repn.variables) > 0
+ assert len(constraint_repn.linear_vars) > 0
if var_list is None:
- var_list = constraint_repn.variables
+ var_list = constraint_repn.linear_vars
assert len(var_list) > 0
symbols = constraint_symbols[con]
# sort the variable list by the column ordering
# so that we have deterministic output
var_list = list(var_list)
var_list.sort(key=lambda _v: column_order[_v])
- new_coefs = list(constraint_repn.linear)
+ new_coefs = list(constraint_repn.linear_coefs)
for var in var_list:
assert isinstance(var, _VarData)
assert not var.fixed
var_coef = None
- for i, (_var, coef) in enumerate(zip(constraint_repn.variables,
- constraint_repn.linear)):
+ for i, (_var, coef) in enumerate(zip(constraint_repn.linear_vars,
+ constraint_repn.linear_coefs)):
if _var is var:
var_coef = coef
# We are going to rewrite with core problem file
@@ -886,7 +928,7 @@ def _convert_external_setup_without_cleanup(
_no_negative_zero(value(var_coef))))
f_coords.write("%s %s\n" % (var_label, con_label))
- constraint_repn.linear = tuple(new_coefs)
+ constraint_repn.linear_coefs = tuple(new_coefs)
#
@@ -910,26 +952,26 @@ def _convert_external_setup_without_cleanup(
objective_variables, include_constant = \
stochastic_objective.default
- if not isinstance(objective_repn, LinearCanonicalRepn):
+ if not objective_repn.is_linear():
raise RuntimeError("Only linear stochastic objectives are "
"accepted for conversion to SMPS format. "
"Objective %s is not linear."
% (objective_object.name))
if objective_variables is None:
- objective_variables = objective_repn.variables
+ objective_variables = objective_repn.linear_vars
stochastic_objective_label = symbol_map.byObject[id(objective_object)]
# sort the variable list by the column ordering
# so that we have deterministic output
objective_variables = list(objective_variables)
objective_variables.sort(key=lambda _v: column_order[_v])
assert (len(objective_variables) > 0) or include_constant
- new_coefs = list(objective_repn.linear)
+ new_coefs = list(objective_repn.linear_coefs)
for var in objective_variables:
assert isinstance(var, _VarData)
var_coef = None
- for i, (_var, coef) in enumerate(zip(objective_repn.variables,
- objective_repn.linear)):
+ for i, (_var, coef) in enumerate(zip(objective_repn.linear_vars,
+ objective_repn.linear_coefs)):
if _var is var:
var_coef = coef
# We are going to rewrite the core problem file
@@ -957,7 +999,7 @@ def _convert_external_setup_without_cleanup(
% (var_label,
stochastic_objective_label))
- objective_repn.linear = tuple(new_coefs)
+ objective_repn.linear_coefs = tuple(new_coefs)
if include_constant:
obj_constant = objective_repn.constant
# We are going to rewrite the core problem file
@@ -1392,6 +1434,7 @@ def convert_external(output_directory,
return input_files
+
def convert_embedded(output_directory,
basename,
sp,
@@ -1420,6 +1463,61 @@ def convert_embedded(output_directory,
"can not be converted into an embedded "
"SMPS representation")
+ #
+ # We will be tweaking the repn objects on objectives
+ # and constraints, so cache anything related to this here so
+ # that this function does not have any side effects on the
+ # instance after returning
+ #
+ reference_model = sp.reference_model
+ cached_attrs = []
+ for block in reference_model.block_data_objects(
+ active=True,
+ descend_into=True):
+ block_cached_attrs = {}
+ if hasattr(block, "_gen_obj_repn"):
+ block_cached_attrs["_gen_obj_repn"] = \
+ block._gen_obj_repn
+ del block._gen_obj_repn
+ if hasattr(block, "_gen_con_repn"):
+ block_cached_attrs["_gen_con_repn"] = \
+ block._gen_con_repn
+ del block._gen_con_repn
+ if hasattr(block, "_repn"):
+ block_cached_attrs["_repn"] = \
+ block._repn
+ del block._repn
+ cached_attrs.append((block, block_cached_attrs))
+
+ try:
+ return _convert_embedded(output_directory,
+ basename,
+ sp,
+ core_format,
+ io_options,
+ enforce_derived_nonanticipativity)
+ except:
+ logger.error("Failed to complete embedded SMPS conversion")
+ raise
+ finally:
+ for block, block_cached_attrs in cached_attrs:
+ if hasattr(block, "_gen_obj_repn"):
+ del block._gen_obj_repn
+ if hasattr(block, "_gen_con_repn"):
+ del block._gen_con_repn
+ if hasattr(block, "_repn"):
+ del block._repn
+ for name in block_cached_attrs:
+ setattr(block, name, block_cached_attrs[name])
+
+def _convert_embedded(output_directory,
+ basename,
+ sp,
+ core_format,
+ io_options,
+ enforce_derived_nonanticipativity):
+
+ reference_model = sp.reference_model
#
# Reinterpret the stage-ness of variables on the sp by
# pushing derived first-stage variables into the second
@@ -1466,7 +1564,7 @@ def convert_embedded(output_directory,
first_stage_constraint_ids = set()
second_stage_constraints = []
second_stage_constraint_ids = set()
- for con in sp.reference_model.component_data_objects(
+ for con in reference_model.component_data_objects(
Constraint,
active=True,
descend_into=True):
@@ -1519,6 +1617,22 @@ def convert_embedded(output_directory,
param_vals_orig[paramdata] = paramdata._value
paramdata.value = 0
+ assert not hasattr(reference_model, "_repn")
+ repn_cache = build_repns(reference_model)
+ assert hasattr(reference_model, "_repn")
+ assert not reference_model._gen_obj_repn
+ assert not reference_model._gen_con_repn
+ symbolic_repn_data = {}
+ # compute values before the write, but cache the original symbolic data
+ for block_repns in repn_cache.values():
+ for repn in block_repns.values():
+ symbolic_repn_data[repn] = (repn.constant,
+ repn.linear_coefs,
+ repn.quadratic_coefs)
+ repn.constant = value(repn.constant)
+ repn.linear_coefs = [value(c) for c in repn.linear_coefs]
+ repn.quadratic_coefs = [value(c) for c in repn.quadratic_coefs]
+
input_files = {}
#
# Write the ordered LP/MPS file
@@ -1535,7 +1649,7 @@ def convert_embedded(output_directory,
io_options['column_order'] = column_order
io_options['row_order'] = row_order
io_options['force_objective_constant'] = True
- output_fname, symbol_map = writer(sp.reference_model,
+ output_fname, symbol_map = writer(reference_model,
output_filename,
lambda x: True,
io_options)
@@ -1550,14 +1664,15 @@ def convert_embedded(output_directory,
lines.append("%s %s\n" % (lp_label, id_))
f.writelines(sorted(lines))
- canonical_repn_cache = {}
- for block in sp.reference_model.block_data_objects(
- active=True,
- descend_into=True):
- canonical_repn_cache[id(block)] = block._canonical_repn
+ # reset repns to symbolic form
+ for repn in symbolic_repn_data:
+ (repn.constant,
+ repn.linear_coefs,
+ repn.quadratic_coefs) = symbolic_repn_data[repn]
+ del symbolic_repn_data
- # Reset stochastic parameter to their
- # original setting values
+ # Reset stochastic parameters to their
+ # original values
for paramdata, orig_val in param_vals_orig.items():
paramdata._value = orig_val
del param_vals_orig
@@ -1687,9 +1802,9 @@ def convert_embedded(output_directory,
# setting compute values to False allows us to
# extract the location of Param objects in the
# constant or variable coefficient
- objective_repn = generate_canonical_repn(sp.objective.expr,
- compute_values=False)
- if not isinstance(objective_repn, LinearCanonicalRepn):
+ objective_repn = generate_standard_repn(sp.objective.expr,
+ compute_values=False)
+ if not objective_repn.is_linear():
raise ValueError(
"Cannot output embedded SP representation for component "
"'%s'. The embedded SMPS writer does not yet handle "
@@ -1698,8 +1813,8 @@ def convert_embedded(output_directory,
# sort the variable list by the column ordering
# so that we have deterministic output
- objective_vars = list(zip(objective_repn.variables,
- objective_repn.linear))
+ objective_vars = list(zip(objective_repn.linear_vars,
+ objective_repn.linear_coefs))
objective_vars.sort(key=lambda x: column_order[x[0]])
if objective_repn.constant is not None:
objective_vars.append(("ONE_VAR_CONSTANT",
@@ -1804,9 +1919,9 @@ def convert_embedded(output_directory,
# setting compute values to False allows us to
# extract the location of Param objects in the
# constant or variable coefficient
- constraint_repn = generate_canonical_repn(con.body,
- compute_values=False)
- if not isinstance(constraint_repn, LinearCanonicalRepn):
+ constraint_repn = generate_standard_repn(con.body,
+ compute_values=False)
+ if not constraint_repn.is_linear():
raise ValueError(
"Cannot output embedded SP representation for component "
"'%s'. The embedded SMPS writer does not yet handle "
@@ -1815,8 +1930,8 @@ def convert_embedded(output_directory,
# sort the variable list by the column ordering
# so that we have deterministic output
- constraint_vars = list(zip(constraint_repn.variables,
- constraint_repn.linear))
+ constraint_vars = list(zip(constraint_repn.linear_vars,
+ constraint_repn.linear_coefs))
constraint_vars.sort(key=lambda x: column_order[x[0]])
constraint_vars = \
[(var, symbol_map.byObject[id(var)], varcoef)
@@ -1829,7 +1944,7 @@ def convert_embedded(output_directory,
# into it right now. It also seems like this is an edge case
# that is hard to reproduce because _ConstraintData moves
# this stuff out of the body when it is build (so it won't
- # show up in the body canonical repn)
+ # show up in the body repn)
for param in sp._collect_mutable_parameters(constraint_repn.constant).values():
if param in sp.stochastic_data:
raise ValueError(
diff --git a/pyomo/pysp/daps/concrete_farmer/ReferenceModel.py b/pyomo/pysp/daps/concrete_farmer/ReferenceModel.py
index fce73d30220..7a284820852 100644
--- a/pyomo/pysp/daps/concrete_farmer/ReferenceModel.py
+++ b/pyomo/pysp/daps/concrete_farmer/ReferenceModel.py
@@ -60,7 +60,7 @@
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=ConstrainTotalAcreage_rule)
@@ -84,13 +84,13 @@ def EnforceQuotas_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return summation(model.PlantingCostPerAcre, model.DevotedAcreage)
+ return sum_product(model.PlantingCostPerAcre, model.DevotedAcreage)
model.FirstStageCost = Expression(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return expr
model.SecondStageCost = Expression(rule=ComputeSecondStageCost_rule)
diff --git a/pyomo/pysp/daps/concrete_farmer/dptest/ReferenceModel.py b/pyomo/pysp/daps/concrete_farmer/dptest/ReferenceModel.py
index 7bc6c1e8c9a..6218fe3a6f2 100644
--- a/pyomo/pysp/daps/concrete_farmer/dptest/ReferenceModel.py
+++ b/pyomo/pysp/daps/concrete_farmer/dptest/ReferenceModel.py
@@ -60,7 +60,7 @@
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=ConstrainTotalAcreage_rule)
@@ -84,13 +84,13 @@ def EnforceQuotas_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return summation(model.PlantingCostPerAcre, model.DevotedAcreage)
+ return sum_product(model.PlantingCostPerAcre, model.DevotedAcreage)
model.FirstStageCost = Expression(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return expr
model.SecondStageCost = Expression(rule=ComputeSecondStageCost_rule)
diff --git a/pyomo/pysp/daps/cref.py b/pyomo/pysp/daps/cref.py
index a55cc9c4b73..bc50bd5f12b 100644
--- a/pyomo/pysp/daps/cref.py
+++ b/pyomo/pysp/daps/cref.py
@@ -65,7 +65,7 @@
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=ConstrainTotalAcreage_rule)
@@ -89,13 +89,13 @@ def EnforceQuotas_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return summation(model.PlantingCostPerAcre, model.DevotedAcreage)
+ return sum_product(model.PlantingCostPerAcre, model.DevotedAcreage)
model.FirstStageCost = Expression(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return expr
model.SecondStageCost = Expression(rule=ComputeSecondStageCost_rule)
diff --git a/pyomo/pysp/daps/cutpoint_set.py b/pyomo/pysp/daps/cutpoint_set.py
index ee8242ba34d..398b38262a1 100644
--- a/pyomo/pysp/daps/cutpoint_set.py
+++ b/pyomo/pysp/daps/cutpoint_set.py
@@ -62,4 +62,4 @@ def validate_fields(self):
# if not increasing
if not all(x1 < x2 for x1, x2 in self.intervals):
- raise RuntimeError("The cutpoints in the set {} are not in order".format(self.name))
\ No newline at end of file
+ raise RuntimeError("The cutpoints in the set {} are not in order".format(self.name))
diff --git a/pyomo/pysp/daps/distrs.py b/pyomo/pysp/daps/distrs.py
index 00b457dc5e4..fffc0d1b636 100644
--- a/pyomo/pysp/daps/distrs.py
+++ b/pyomo/pysp/daps/distrs.py
@@ -315,4 +315,4 @@ def dict_representative_points_scenarios(distrdict,
# we have everything we need
tree = bc.PySP_Tree(treetemp, pyspscenlist, rawnodelist)
- tree.Write_ScenarioStructure_dat_file(os.path.join(OutDir, 'ScenarioStructure.dat'))
\ No newline at end of file
+ tree.Write_ScenarioStructure_dat_file(os.path.join(OutDir, 'ScenarioStructure.dat'))
diff --git a/pyomo/pysp/daps/farmer/ReferenceModel.py b/pyomo/pysp/daps/farmer/ReferenceModel.py
index 55e0f087e1c..dcba9db747d 100644
--- a/pyomo/pysp/daps/farmer/ReferenceModel.py
+++ b/pyomo/pysp/daps/farmer/ReferenceModel.py
@@ -63,7 +63,7 @@ def super_quota_selling_price_validate (model, value, i):
#
def ConstrainTotalAcreage_rule(model):
- return summation(model.DevotedAcreage) <= model.TOTAL_ACREAGE
+ return sum_product(model.DevotedAcreage) <= model.TOTAL_ACREAGE
model.ConstrainTotalAcreage = Constraint(rule=ConstrainTotalAcreage_rule)
@@ -87,14 +87,14 @@ def EnforceQuotas_rule(model, i):
#
def ComputeFirstStageCost_rule(model):
- return summation(model.PlantingCostPerAcre, model.DevotedAcreage)
+ return sum_product(model.PlantingCostPerAcre, model.DevotedAcreage)
model.FirstStageCost = Expression(rule=ComputeFirstStageCost_rule)
def ComputeSecondStageCost_rule(model):
- expr = summation(model.PurchasePrice, model.QuantityPurchased)
- expr -= summation(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
- expr -= summation(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
+ expr = sum_product(model.PurchasePrice, model.QuantityPurchased)
+ expr -= sum_product(model.SubQuotaSellingPrice, model.QuantitySubQuotaSold)
+ expr -= sum_product(model.SuperQuotaSellingPrice, model.QuantitySuperQuotaSold)
return expr
model.SecondStageCost = Expression(rule=ComputeSecondStageCost_rule)
diff --git a/pyomo/pysp/dualphmodel.py b/pyomo/pysp/dualphmodel.py
index cad57d9b607..64dd745b6c0 100644
--- a/pyomo/pysp/dualphmodel.py
+++ b/pyomo/pysp/dualphmodel.py
@@ -12,7 +12,7 @@
from pyomo.core import *
from pyomo.opt import SolverFactory
-from pyomo.core.base.expr import _ExpressionBase
+from pyomo.core.expr.current import ExpressionBase
from pyomo.pysp.phutils import update_all_rhos, find_active_objective
from six import iteritems
@@ -64,7 +64,7 @@ def add_cut(self,first=False):
model.del_component('beta')
model.beta = Var(model.cuts,within=NonNegativeReals)
model.del_component('beta_sum_one')
- model.beta_sum_one = Constraint(expr=summation(model.beta)==1)
+ model.beta_sum_one = Constraint(expr=sum_product(model.beta)==1)
model.del_component('obj')
model.obj = Objective(expr=sum(self._alphas[i]*model.beta[i] for i in model.cuts))
@@ -75,7 +75,7 @@ def add_cut(self,first=False):
block = getattr(model,tree_node._name)
def _c_rule(block,i):
lhs = sum(model.beta[k]*self._wbars[k][tree_node._name][block.id_to_var[i][0]][block.id_to_var[i][1]] for k in model.beta.index_set())
- if not isinstance(lhs,_ExpressionBase):
+ if not isinstance(lhs,ExpressionBase):
return Constraint.Skip
return lhs == 0
block.del_component('con')
diff --git a/pyomo/pysp/embeddedsp.py b/pyomo/pysp/embeddedsp.py
index 56066f11285..ff8f9dddcc8 100644
--- a/pyomo/pysp/embeddedsp.py
+++ b/pyomo/pysp/embeddedsp.py
@@ -14,7 +14,7 @@
import random
import math
-import pyomo.core.base.expr
+from pyomo.core.expr import current as EXPR
import pyomo.core.base.param
from pyomo.core.base import ComponentUID
from pyomo.core.base.numvalue import is_fixed, is_constant
@@ -331,59 +331,17 @@ class EmbeddedSP(object):
@staticmethod
def _collect_mutable_parameters(exp):
- """
- A helper function for querying a pyomo expression for
- mutable parameters.
- """
- if is_constant(exp) or isinstance(exp, _VarData):
- return {}
- elif exp.is_expression():
- ans = {}
- if exp.__class__ is pyomo.core.base.expr._ProductExpression:
- for subexp in exp._numerator:
- ans.update(EmbeddedSP.\
- _collect_mutable_parameters(subexp))
- for subexp in exp._denominator:
- ans.update(EmbeddedSP.\
- _collect_mutable_parameters(subexp))
- else:
- # This is fragile: we assume that all other expression
- # objects "play nice" and just use the _args member.
- for subexp in exp._args:
- ans.update(EmbeddedSP.\
- _collect_mutable_parameters(subexp))
- return ans
- elif isinstance(exp, _ParamData):
- return {id(exp): exp}
- else:
- raise ValueError("Unexpected expression type: "+str(exp))
+ ans = {}
+ for param in EXPR.identify_mutable_parameters(exp):
+ ans[id(param)] = param
+ return ans
@staticmethod
def _collect_variables(exp):
- if is_constant(exp):
- return {}
- elif exp.is_expression():
- ans = {}
- if exp.__class__ is pyomo.core.base.expr._ProductExpression:
- for subexp in exp._numerator:
- ans.update(EmbeddedSP.\
- _collect_variables(subexp))
- for subexp in exp._denominator:
- ans.update(EmbeddedSP.\
- _collect_variables(subexp))
- else:
- # This is fragile: we assume that all other expression
- # objects "play nice" and just use the _args member.
- for subexp in exp._args:
- ans.update(EmbeddedSP.\
- _collect_variables(subexp))
- return ans
- elif isinstance(exp, _VarData):
- return {id(exp): exp}
- elif is_fixed(exp):
- return {}
- else:
- raise ValueError("Unexpected expression type: "+str(exp))
+ ans = {}
+ for var in EXPR.identify_variables(exp):
+ ans[id(var)] = var
+ return ans
def __init__(self, reference_model):
diff --git a/pyomo/pysp/ph.py b/pyomo/pysp/ph.py
index 6bdc41b9d4f..ea683e417f3 100644
--- a/pyomo/pysp/ph.py
+++ b/pyomo/pysp/ph.py
@@ -56,10 +56,8 @@
preprocess_scenario_instance,
preprocess_bundle_instance,
find_active_objective,
- canonical_preprocess_block_objectives,
- canonical_preprocess_block_constraints,
- ampl_preprocess_block_objectives,
- ampl_preprocess_block_constraints,
+ preprocess_block_objectives,
+ preprocess_block_constraints,
extract_solve_times,
_OLD_OUTPUT)
from pyomo.pysp.util.misc import load_external_module
@@ -439,20 +437,18 @@ def _setup_scenario_instances(self):
self._problem_states.objective_updated[scenario._name] = True
self._problem_states.user_constraints_updated[scenario._name] = True
- # IMPT: disable canonical representation construction
+ # IMPT: disable standard representation construction
# for solvers. this is a hack, in that we
# need to address encodings and the like at a
# more general level.
# We will take care of these manually within
# _preprocess_scenario_instance This will also
- # prevent regenerating the ampl_repn/canonical_repn when forming
+ # prevent regenerating the standard_repn when forming
# the bundle_ef's
for block in scenario_instance.block_data_objects(active=True):
- block._gen_obj_ampl_repn = False
- block._gen_con_ampl_repn = False
- block._gen_obj_canonical_repn = False
- block._gen_con_canonical_repn = False
+ block._gen_obj_repn = False
+ block._gen_con_repn = False
self._instances[scenario._name] = scenario_instance
@@ -671,18 +667,11 @@ def _form_bundle_binding_instances(self):
(scenario._probability / scenario_bundle._probability) * \
weight_expression_component
- if self._solver_map[next(iterkeys(self._solver_map))].problem_format == ProblemFormat.nl:
- var_id_map = {}
- ampl_preprocess_block_objectives(bundle_ef_instance,
- var_id_map)
- ampl_preprocess_block_constraints(bundle_ef_instance,
- var_id_map)
- else:
- var_id_map = {}
- canonical_preprocess_block_objectives(bundle_ef_instance,
- var_id_map)
- canonical_preprocess_block_constraints(bundle_ef_instance,
- var_id_map)
+ var_id_map = {}
+ preprocess_block_objectives(bundle_ef_instance,
+ idMap=var_id_map)
+ preprocess_block_constraints(bundle_ef_instance,
+ idMap=var_id_map)
end_time = time.time()
@@ -1022,25 +1011,17 @@ def _preprocess_scenario_instances(self, ignore_bundles=False, subproblems=None)
self._problem_states.clear_freed_variables(scenario_name)
# TBD - much of this can be done in preprocess_bundle_instance
- if bundle_solver.problem_format == ProblemFormat.nl:
- var_id_map = {}
- if preprocess_bundle_objective:
- ampl_preprocess_block_objectives(bundle_ef_instance,
- var_id_map)
- if preprocess_bundle_constraints:
- ampl_preprocess_block_constraints(bundle_ef_instance,
- var_id_map)
- else:
- var_id_map = {}
- if preprocess_bundle_objective:
- canonical_preprocess_block_objectives(bundle_ef_instance,
- var_id_map)
- if preprocess_bundle_constraints:
- canonical_preprocess_block_constraints(bundle_ef_instance,
- var_id_map)
+ var_id_map = {}
+ if preprocess_bundle_objective:
+ preprocess_block_objectives(bundle_ef_instance,
+ idMap=var_id_map)
+ if preprocess_bundle_constraints:
+ preprocess_block_constraints(bundle_ef_instance,
+ idMap=var_id_map)
if preprocess_bundle_objective:
- preprocess_bundle_instance(bundle_ef_instance, bundle_solver)
+ preprocess_bundle_instance(bundle_ef_instance,
+ bundle_solver)
end_time = time.time()
@@ -1621,14 +1602,10 @@ def _cleanup_scenario_instances(self):
self._problem_states.clear_ph_variables(instance_name)
for block in instance.block_data_objects(active=True):
- if hasattr(instance, "_gen_obj_ampl_repn"):
- del instance._gen_obj_ampl_repn
- if hasattr(instance, "_gen_con_ampl_repn"):
- del instance._gen_con_ampl_repn
- if hasattr(instance, "_gen_obj_canonical_repn"):
- del instance._gen_obj_canonical_repn
- if hasattr(instance, "_gen_con_canonical_repn"):
- del instance._gen_con_canonical_repn
+ if hasattr(instance, "_gen_obj_repn"):
+ del instance._gen_obj_repn
+ if hasattr(instance, "_gen_con_repn"):
+ del instance._gen_con_repn
if hasattr(instance, "_PHInstanceSymbolMaps"):
del instance._PHInstanceSymbolMaps
diff --git a/pyomo/pysp/phinit.py b/pyomo/pysp/phinit.py
index 726920b54fd..8f49d2fb094 100644
--- a/pyomo/pysp/phinit.py
+++ b/pyomo/pysp/phinit.py
@@ -1127,10 +1127,8 @@ def run_ph(options, ph):
# ef solve that is about to occur.
for instance in ph._instances.values():
for block in instance.block_data_objects(active=True):
- block._gen_obj_ampl_repn = True
- block._gen_con_ampl_repn = True
- block._gen_obj_canonical_repn = True
- block._gen_con_canonical_repn = True
+ block._gen_obj_repn = True
+ block._gen_con_repn = True
ph_solver_manager = ph._solver_manager
ph._solver_manager = None
diff --git a/pyomo/pysp/phutils.py b/pyomo/pysp/phutils.py
index 738fa7a7b60..aa6fa175884 100644
--- a/pyomo/pysp/phutils.py
+++ b/pyomo/pysp/phutils.py
@@ -13,31 +13,30 @@
from pyomo.core import *
from pyomo.opt import ProblemFormat
-# these are the only two preprocessors currently invoked by the
-# simple_preprocessor, which in turn is invoked by the preprocess()
-# method of PyomoModel.
-from pyomo.repn.compute_canonical_repn import preprocess_block_objectives \
- as canonical_preprocess_block_objectives
-from pyomo.repn.compute_canonical_repn import preprocess_block_constraints \
- as canonical_preprocess_block_constraints
-from pyomo.repn.compute_canonical_repn import preprocess_constraint \
- as canonical_preprocess_constraint
-from pyomo.repn.compute_ampl_repn import preprocess_block_objectives \
- as ampl_preprocess_block_objectives
-from pyomo.repn.compute_ampl_repn import preprocess_block_constraints \
- as ampl_preprocess_block_constraints
-from pyomo.repn.compute_ampl_repn import preprocess_constraint \
- as ampl_preprocess_constraint
+from pyomo.repn.standard_repn import (preprocess_block_objectives,
+ preprocess_block_constraints,
+ preprocess_constraint)
from pyomo.opt import (UndefinedData,
undefined)
from six import iteritems, itervalues, string_types
from six.moves import xrange
-canonical_expression_preprocessor = \
- pyomo.util.PyomoAPIFactory("pyomo.repn.compute_canonical_repn")
-ampl_expression_preprocessor = \
- pyomo.util.PyomoAPIFactory("pyomo.repn.compute_ampl_repn")
+def _preprocess(model, objective=True, constraints=True):
+ objective_found = False
+ if objective:
+ for block in model.block_data_objects(active=True):
+ for obj in block.component_data_objects(Objective,
+ active=True,
+ descend_into=False):
+ objective_found = True
+ preprocess_block_objectives(block)
+ break
+ if objective_found:
+ break
+ if constraints:
+ for block in model.block_data_objects(active=True):
+ preprocess_block_constraints(block)
_OLD_OUTPUT = True
@@ -248,7 +247,7 @@ def reset_stage_cost_variables(scenario_tree, scenario_instances):
for stage in scenario_tree._stages:
for tree_node in stage._tree_nodes:
for cost_var_data, scenario_probability in tree_node._cost_variable_datas:
- if cost_var_data.is_expression() is False:
+ if cost_var_data.is_expression_type() is False:
cost_var_data.value = None
cost_var_data.stale = True
@@ -745,11 +744,9 @@ def preprocess_scenario_instance(scenario_instance,
if instance_objective_modified:
# if only the objective changed, there is minimal work to do.
-
- if solver.problem_format() == ProblemFormat.nl:
- ampl_preprocess_block_objectives(scenario_instance)
- else:
- canonical_preprocess_block_objectives(scenario_instance)
+ _preprocess(scenario_instance,
+ objective=True,
+ constraints=False)
if persistent_solver_in_use:
active_objective_datas = []
@@ -765,10 +762,7 @@ def preprocess_scenario_instance(scenario_instance,
if (instance_variables_fixed or instance_variables_freed) and \
(preprocess_fixed_variables):
- if solver.problem_format() == ProblemFormat.nl:
- ampl_expression_preprocessor({}, model=scenario_instance)
- else:
- canonical_expression_preprocessor({}, model=scenario_instance)
+ _preprocess(scenario_instance)
# We've preprocessed the entire instance, no point in checking
# anything else
@@ -787,37 +781,23 @@ def preprocess_scenario_instance(scenario_instance,
solver.update_var(scenario_instance.find_component(var_name)[var_index])
if instance_user_constraints_modified:
- if solver.problem_format() == ProblemFormat.nl:
- idMap = {}
- for block in scenario_instance.block_data_objects(active=True,
- descend_into=True):
- ampl_preprocess_block_constraints(block,
- idMap=idMap)
- else:
- idMap = {}
- for block in scenario_instance.block_data_objects(active=True,
- descend_into=True):
- canonical_preprocess_block_constraints(block,
- idMap=idMap)
+
+ _preprocess(scenario_instance,
+ objective=False,
+ constraints=True)
+
# TBD: Should this be an an if below - both user and ph constraints
# could be modified at the same time, no?
elif instance_ph_constraints_modified:
# only pre-process the piecewise constraints
- if solver.problem_format() == ProblemFormat.nl:
- idMap = {}
- for constraint_name in instance_ph_constraints:
- ampl_preprocess_constraint(
- scenario_instance,
- getattr(scenario_instance, constraint_name),
- idMap=idMap)
- else:
- idMap = {}
- for constraint_name in instance_ph_constraints:
- canonical_preprocess_constraint(
- scenario_instance,
- getattr(scenario_instance, constraint_name),
- idMap=idMap)
+ idMap = {}
+ for constraint_name in instance_ph_constraints:
+ preprocess_constraint(
+ scenario_instance,
+ getattr(scenario_instance, constraint_name),
+ idMap=idMap)
+
# TBD: doesn't do much now... - SHOULD PROPAGATE FLAGS FROM _preprocess_scenario_instances...
diff --git a/pyomo/pysp/plugins/ddextensionnew.py b/pyomo/pysp/plugins/ddextensionnew.py
index 5b93da10c4c..51936ca4ad2 100755
--- a/pyomo/pysp/plugins/ddextensionnew.py
+++ b/pyomo/pysp/plugins/ddextensionnew.py
@@ -146,7 +146,7 @@ def write(self, ph, global_reference_scenario=False):
scenario_instance = self._reference_scenario_instance
# This is usuall called just prior to solving the instances,
- # however the scenariotree uses CanonicalRepn for determining
+ # however the scenariotree uses StandardRepn for determining
# constraint stage
ph._preprocess_scenario_instances()
@@ -589,7 +589,7 @@ def _Populate_StageVars(self, ph, LP_symbol_map):
for scenario_tree_id, vardata in \
iteritems(self._reference_scenario_instance.\
_ScenarioTreeSymbolMap.bySymbol):
- if vardata.is_expression():
+ if vardata.is_expression_type():
continue
try:
LP_name = LP_byObject[id(vardata)]
@@ -738,9 +738,9 @@ def _Constraints_Stages(self, ph, LP_symbol_map):
for alias, obj_weakref in iteritems(LP_symbol_map.aliases):
LP_reverse_alias[LP_byObject[id(obj_weakref())]].append(alias)
for block in reference_instance.block_data_objects(active=True):
- block_canonical_repn = getattr(block, "_canonical_repn", None)
- if block_canonical_repn is None:
- raise ValueError("Unable to find _canonical_repn ComponentMap "
+ block_repn = getattr(block, "_repn", None)
+ if block_repn is None:
+ raise ValueError("Unable to find _repn ComponentMap "
"on block %s" % (block.name))
isPiecewise = False
if isinstance(block, (Piecewise, _PiecewiseData)):
@@ -764,7 +764,7 @@ def _Constraints_Stages(self, ph, LP_symbol_map):
if not isPiecewise:
constraint_node = reference_scenario.constraintNode(
constraint_data,
- canonical_repn=block_canonical_repn.get(constraint_data),
+ repn=block_repn.get(constraint_data),
instance=reference_instance)
stage_index = reference_scenario.node_stage_index(constraint_node)
else:
diff --git a/pyomo/pysp/plugins/ddextensionold.py b/pyomo/pysp/plugins/ddextensionold.py
index 266ea54d9e7..39beb0b1376 100755
--- a/pyomo/pysp/plugins/ddextensionold.py
+++ b/pyomo/pysp/plugins/ddextensionold.py
@@ -124,7 +124,7 @@ def post_ph_initialization(self, ph):
print("Creating the sip.in file")
# This is usuall called just prior to solving the instances,
- # however the scenariotree uses CanonicalRepn for determining
+ # however the scenariotree uses StandardRepn for determining
# constraint stage
ph._preprocess_scenario_instances()
@@ -360,9 +360,9 @@ def _Constraints_Stages(self, ph, LP_symbol_map):
for alias, obj_weakref in iteritems(LP_symbol_map.aliases):
LP_reverse_alias[LP_byObject[id(obj_weakref())]].append(alias)
for block in reference_instance.block_data_objects(active=True):
- block_canonical_repn = getattr(block, "_canonical_repn",None)
- if block_canonical_repn is None:
- raise ValueError("Unable to find _canonical_repn ComponentMap "
+ block_repn = getattr(block, "_repn",None)
+ if block_repn is None:
+ raise ValueError("Unable to find _repn ComponentMap "
"on block %s" % (block.name))
isPiecewise = False
if isinstance(block, (Piecewise, _PiecewiseData)):
@@ -379,7 +379,7 @@ def _Constraints_Stages(self, ph, LP_symbol_map):
if not isPiecewise:
constraint_node = reference_scenario.constraintNode(
constraint_data,
- canonical_repn=block_canonical_repn.get(constraint_data),
+ repn=block_repn.get(constraint_data),
instance=reference_instance)
stage_index = reference_scenario.node_stage_index(constraint_node)
else:
diff --git a/pyomo/pysp/plugins/interscenario.py b/pyomo/pysp/plugins/interscenario.py
index 5ddb8e1b491..cb8288f8757 100644
--- a/pyomo/pysp/plugins/interscenario.py
+++ b/pyomo/pysp/plugins/interscenario.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
@@ -20,7 +20,7 @@
from pyomo.core import (
minimize, value, TransformationFactory,
ComponentUID, Block, Constraint, ConstraintList,
- Param, Var, VarList, Set, Objective, Suffix,
+ Param, Var, VarList, Set, Objective, Suffix,
Binary, Boolean,
Integers, PositiveIntegers, NonPositiveIntegers,
NegativeIntegers, NonNegativeIntegers, IntegerInterval,
@@ -31,16 +31,10 @@
from pyomo.solvers.plugins.smanager.phpyro import SolverManager_PHPyro
from pyomo.util.plugin import SingletonPlugin, implements
-from pyomo.repn.compute_ampl_repn import (
- preprocess_block_constraints as ampl_preprocess_block_constraints,
- preprocess_block_objectives as ampl_preprocess_block_objectives,
-)
-from pyomo.repn.compute_canonical_repn import (
- preprocess_block_constraints as canonical_preprocess_block_constraints,
- preprocess_block_objectives as canonical_preprocess_block_objectives,
-)
+from pyomo.repn.standard_repn import (preprocess_block_constraints
+ preprocess_block_objectives)
from pyomo.pysp.phsolverserverutils import (
- InvocationType,
+ InvocationType,
transmit_external_function_invocation,
transmit_external_function_invocation_to_worker )
from pyomo.pysp.convergence import NormalizedTermDiffConvergence
@@ -103,7 +97,7 @@ def get_modified_instance( ph, scenario_tree, scenario_or_bundle, **options):
b.abs_int_vars = VarList(within=NonNegativeIntegers)
b.abs_binary_vars = VarList(within=Binary)
- # Note: the var_ids are on the ORIGINAL scenario models
+ # Note: the var_ids are on the ORIGINAL scenario models
rootNode = scenario_tree.findRootNode()
var_ids = list(iterkeys(rootNode._variable_datas))
@@ -173,11 +167,8 @@ def _set_var_value(b, i):
if FALLBACK_ON_BRUTE_FORCE_PREPROCESS:
model.preprocess()
else:
- if ph._solver.problem_format() == ProblemFormat.nl:
- ampl_preprocess_block_constraints(b)
- else:
- _map = {}
- canonical_preprocess_block_constraints(b, _map)
+ _map = {}
+ preprocess_block_constraints(b, idMap=_map)
# Note: we wait to deactivate the objective until after we
# preprocess so that the obective is correctly processed.
@@ -217,16 +208,13 @@ def get_dual_values(solver, model):
if FALLBACK_ON_BRUTE_FORCE_PREPROCESS:
model.preprocess()
else:
- if solver.problem_format() == ProblemFormat.nl:
- ampl_preprocess_block_constraints(model._interscenario_plugin)
- else:
- _map = {}
- canonical_preprocess_block_constraints(
- model._interscenario_plugin, _map )
+ _map = {}
+ preprocess_block_constraints(
+ model._interscenario_plugin, idMap=_map)
#SOLVE
results = solver.solve(model, warmstart=True)
- ss = results.solver.status
+ ss = results.solver.status
tc = results.solver.termination_condition
#self.timeInSolver += results['Solver'][0]['Time']
if ss == SolverStatus.ok and tc in _acceptable_termination_conditions:
@@ -254,14 +242,14 @@ def get_dual_values(solver, model):
xfrm.apply(model, inplace=True, undo=True)
else:
xfrm.apply_to(model, undo=True)
-
+
else:
# return the duals
for varid in model._interscenario_plugin.STAGE1VAR:
duals[varid] = model.dual[_con[varid]]
return duals
-
+
get_dual_values.discrete_stage2_vars = {}
@@ -295,13 +283,9 @@ def solve_separation_problem(solver, model, fallback):
if FALLBACK_ON_BRUTE_FORCE_PREPROCESS:
model.preprocess()
else:
- if solver.problem_format() == ProblemFormat.nl:
- ampl_preprocess_block_objectives(_block)
- ampl_preprocess_block_constraints(_block)
- else:
- _map = {}
- canonical_preprocess_block_objectives(_block,_map)
- canonical_preprocess_block_constraints(_block,_map)
+ _map = {}
+ preprocess_block_objectives(_block, idMap=_map)
+ preprocess_block_constraints(_block, idMap=_map)
#SOLVE
output_buffer = StringIO()
@@ -316,7 +300,7 @@ def solve_separation_problem(solver, model, fallback):
finally:
pyutilib.misc.reset_redirect()
- ss = results.solver.status
+ ss = results.solver.status
tc = results.solver.termination_condition
#self.timeInSolver += results['Solver'][0]['Time']
if ss == SolverStatus.ok and tc in _acceptable_termination_conditions:
@@ -369,11 +353,8 @@ def solve_separation_problem(solver, model, fallback):
if FALLBACK_ON_BRUTE_FORCE_PREPROCESS:
pass
else:
- if solver.problem_format() == ProblemFormat.nl:
- ampl_preprocess_block_objectives(_block)
- else:
- _map = {}
- canonical_preprocess_block_objectives(_block,_map)
+ _map = {}
+ preprocess_block_objectives(_block, idMap=_map)
return ans
@@ -392,7 +373,7 @@ def add_new_cuts( ph, scenario_tree, scenario_or_bundle,
expr = sum(
2 * (_sep*(1-cut_scale))
* (_src[i]() - (_par+_sep*(1-cut_scale)))
- for i, (_sep, _par) in iteritems(cut)
+ for i, (_sep, _par) in iteritems(cut)
if abs(_sep) > epsilon*max(1,_par)
)
if expr is not 0:
@@ -424,15 +405,12 @@ def add_new_cuts( ph, scenario_tree, scenario_or_bundle,
if FALLBACK_ON_BRUTE_FORCE_PREPROCESS:
m.preprocess()
else:
- if ph._solver.problem_format() == ProblemFormat.nl:
- ampl_preprocess_block_constraints(_block)
- else:
- _map = {}
- canonical_preprocess_block_constraints(_block,_map)
+ _map = {}
+ preprocess_block_constraints(_block, idMap=_map)
if resolve:
results = ph._solver.solve(m, warmstart=True)
- ss = results.solver.status
+ ss = results.solver.status
tc = results.solver.termination_condition
#self.timeInSolver += results['Solver'][0]['Time']
if ss == SolverStatus.ok and tc in _acceptable_termination_conditions:
@@ -451,8 +429,8 @@ def add_new_cuts( ph, scenario_tree, scenario_or_bundle,
return None
-def solve_fixed_scenario_solutions(
- ph, scenario_tree, scenario_or_bundle,
+def solve_fixed_scenario_solutions(
+ ph, scenario_tree, scenario_or_bundle,
scenario_solutions, **model_options ):
model = get_modified_instance(
@@ -501,18 +479,15 @@ def solve_fixed_scenario_solutions(
for var_id, var_value in iteritems(var_values):
_param[var_id] = var_value
- # TODO: We only need to update the CanonicalRepn for the binding
+ # TODO: We only need to update the StandardRepn for the binding
# constraints ... so we could save a LOT of time by not
# preprocessing the whole model.
#
if FALLBACK_ON_BRUTE_FORCE_PREPROCESS:
model.preprocess()
else:
- if ph._solver.problem_format() == ProblemFormat.nl:
- ampl_preprocess_block_constraints(_block)
- else:
- var_id_map = {}
- canonical_preprocess_block_constraints(_block, var_id_map)
+ var_id_map = {}
+ preprocess_block_constraints(_block, idMap=var_id_map)
toc("preprocessed scenario %s" % ( scenario_or_bundle._name, ))
output_buffer = StringIO()
@@ -529,7 +504,7 @@ def solve_fixed_scenario_solutions(
toc("solved solution from scenario set %s on scenario %s" %
( scenario_name_list, scenario_or_bundle._name, ))
- ss = results.solver.status
+ ss = results.solver.status
tc = results.solver.termination_condition
#self.timeInSolver += results['Solver'][0]['Time']
if ss == SolverStatus.ok and tc in _acceptable_termination_conditions:
@@ -562,14 +537,14 @@ def solve_fixed_scenario_solutions(
if cut == '????':
if ph._solver.problem_format() != ProblemFormat.nl:
model.preprocess()
- #ampl_preprocess_block_objectives(_block)
- #ampl_preprocess_block_constraints(_block)
+ #preprocess_block_objectives(_block)
+ #preprocess_block_constraints(_block)
cut = solve_separation_problem(ipopt, model, False)
else:
cut = "X "
cutlist.append( cut )
toc("solved separation problem for solution from scenario set "
- "%s on scenario %s" %
+ "%s on scenario %s" %
( scenario_name_list, scenario_or_bundle._name, ))
else:
state = 2 #'NONOPTIMAL'
@@ -595,7 +570,7 @@ def solve_fixed_scenario_solutions(
class InterScenarioPlugin(SingletonPlugin):
- implements(phextension.IPHExtension)
+ implements(phextension.IPHExtension)
def __init__(self):
self.enableRhoUpdates = True
@@ -745,7 +720,7 @@ def post_iteration_k_solves(self, ph):
_min = rootNode._minimums[_id]
if rho < self.epsilon and _max - _min > self.epsilon:
print( "InterScenario plugin: triggered by variable "
- "divergence with rho==0 (%s: %s; [%s, %s])"
+ "divergence with rho==0 (%s: %s; [%s, %s])"
% (_id, rho, _max, _min))
run = True
break
@@ -803,10 +778,10 @@ def _interscenario_plugin(self,ph):
','.join(soln[1])
))
- scenarioCosts = [ ph._scenario_tree.get_scenario(x)._cost
+ scenarioCosts = [ ph._scenario_tree.get_scenario(x)._cost
for s in self.unique_scenario_solutions
for x in s[1] ]
- scenarioProb = [ ph._scenario_tree.get_scenario(x)._probability
+ scenarioProb = [ ph._scenario_tree.get_scenario(x)._probability
for s in self.unique_scenario_solutions
for x in s[1] ]
_avg = sum( scenarioProb[i]*c for i,c in enumerate(scenarioCosts) )
@@ -831,7 +806,7 @@ def _interscenario_plugin(self,ph):
#cutCount = len(self.feasibility_cuts)
if self.enableFeasibilityCuts:
self.feasibility_cuts = cuts
- cutCount = sum( sum( 1 for x in c if type(x) is tuple
+ cutCount = sum( sum( 1 for x in c if type(x) is tuple
and x[0]>self.cutThreshold_minDiff )
for c in cuts )
subProblemCount = sum(len(c) for c in cuts)
@@ -846,7 +821,7 @@ def _interscenario_plugin(self,ph):
# Tell ph that we may have a good opter bound
ph._update_reported_bounds(outer=self.average_solution)
- if ( cutCount > self.recutThreshold*(subProblemCount-len(cuts))
+ if ( cutCount > self.recutThreshold*(subProblemCount-len(cuts))
and ( _del_avg is None or
_del_avg > self.iteration0RecutBoundImprovement )):
# Bypass RHO updates and check for more cuts
@@ -989,7 +964,7 @@ def _solve_interscenario_solutions(self, ph):
def _distribute_cuts(self, ph, resolve=False):
totalCuts = 0
cutObj = sorted( c[0] for x in self.feasibility_cuts for c in x
- if type(c) is tuple
+ if type(c) is tuple
and c[0] > self.cutThreshold_minDiff )
if cutObj:
allCutThreshold = cutObj[
@@ -1087,12 +1062,11 @@ def _distribute_cuts(self, ph, resolve=False):
continue
for scenario in get_scenarios(problem):
scenario._cost = ans[1]
- assert( sorted(ans[0]) ==
+ assert( sorted(ans[0]) ==
sorted(scenario._x[rootNode._name]) )
scenario._x[rootNode._name] = ans[0] #[_vid] = _vval
ph.update_variable_statistics()
-
def _compute_objective(self, partial_obj_values, probability):
obj_values = []
for soln_id in xrange(len( self.unique_scenario_solutions )):
@@ -1221,7 +1195,7 @@ def _process_dual_information(self, ph, dual_values, probability):
self.x_deviation = dict(
( v,
max(s[0][v] for s in self.unique_scenario_solutions)
- - min(s[0][v] for s in self.unique_scenario_solutions) )
+ - min(s[0][v] for s in self.unique_scenario_solutions) )
for v in xbar )
max_dual = dict((v,0.) for v in xbar)
@@ -1323,7 +1297,7 @@ def _process_dual_information(self, ph, dual_values, probability):
loginfo[k] = \
"%4d: %6.1f [%7.1f, %7.1f] %7.1f; " \
"%6.1f [%6.1f, %6.1f] %6.1f; RHO %7.2f : %%7.2f" % (
- k,
+ k,
d_avg, d_min, d_max, d_stdev,
x_avg, x_min, x_max, x_stdev,
weighted_rho[k] )
diff --git a/pyomo/pysp/plugins/wwphextension.py b/pyomo/pysp/plugins/wwphextension.py
index 9990eab38ce..0601c46d3b0 100644
--- a/pyomo/pysp/plugins/wwphextension.py
+++ b/pyomo/pysp/plugins/wwphextension.py
@@ -107,7 +107,7 @@ def collect_node_variable_bounds(tree_node):
var_bounds = {}
for variable_id, vardatas in iteritems(tree_node._variable_datas):
vardata = vardatas[0][0]
- if not vardata.is_expression():
+ if not vardata.is_expression_type():
var_bounds[variable_id] = (vardata.lb, vardata.ub)
else:
# Expression
diff --git a/pyomo/pysp/scenariotree/preprocessor.py b/pyomo/pysp/scenariotree/preprocessor.py
index 2d9705e12c6..4715d068b9e 100644
--- a/pyomo/pysp/scenariotree/preprocessor.py
+++ b/pyomo/pysp/scenariotree/preprocessor.py
@@ -23,33 +23,34 @@
from pyomo.core.base.constraint import Constraint
from pyomo.core.base.sos import SOSConstraint
from pyomo.opt import ProblemFormat
-from pyomo.repn.canonical_repn import LinearCanonicalRepn
-from pyomo.repn.compute_canonical_repn import preprocess_block_objectives \
- as canonical_preprocess_block_objectives
-from pyomo.repn.compute_canonical_repn import preprocess_block_constraints \
- as canonical_preprocess_block_constraints
-from pyomo.repn.compute_canonical_repn import preprocess_constraint \
- as canonical_preprocess_constraint
-from pyomo.repn.compute_ampl_repn import preprocess_block_objectives \
- as ampl_preprocess_block_objectives
-from pyomo.repn.compute_ampl_repn import preprocess_block_constraints \
- as ampl_preprocess_block_constraints
-from pyomo.repn.compute_ampl_repn import preprocess_constraint \
- as ampl_preprocess_constraint
-from pyomo.repn.ampl_repn import generate_ampl_repn
-from pyomo.repn.canonical_repn import generate_canonical_repn
+from pyomo.solvers.plugins.solvers.persistent_solver import PersistentSolver
+from pyomo.repn.standard_repn import (preprocess_block_objectives,
+ preprocess_block_constraints,
+ preprocess_constraint_data)
+
import pyomo.util
from pyomo.pysp.util.config import (PySPConfigBlock,
safe_declare_common_option)
from pyomo.pysp.util.configured_object import PySPConfiguredObject
-from six import iteritems, itervalues
-from six.moves import xrange
+from six import itervalues
+
+def _preprocess(model, objective=True, constraints=True):
+ objective_found = False
+ if objective:
+ for block in model.block_data_objects(active=True):
+ for obj in block.component_data_objects(Objective,
+ active=True,
+ descend_into=False):
+ objective_found = True
+ preprocess_block_objectives(block)
+ break
+ if objective_found:
+ break
+ if constraints:
+ for block in model.block_data_objects(active=True):
+ preprocess_block_constraints(block)
-canonical_expression_preprocessor = \
- pyomo.util.PyomoAPIFactory("pyomo.repn.compute_canonical_repn")
-ampl_expression_preprocessor = \
- pyomo.util.PyomoAPIFactory("pyomo.repn.compute_ampl_repn")
#
# We only want to do the minimal amount of work to get the instance
@@ -126,17 +127,12 @@ def add_scenario(self, scenario, scenario_instance, scenario_solver):
scenario_instance = self._scenario_instances[scenario_name]
assert scenario_instance is not None
for block in scenario_instance.block_data_objects(active=True):
- assert not hasattr(block, "_gen_obj_ampl_repn")
- assert not hasattr(block, "_gen_con_ampl_repn")
- assert not hasattr(block, "_gen_obj_canonical_repn")
- assert not hasattr(block, "_gen_con_canonical_repn")
- block._gen_obj_ampl_repn = False
- block._gen_con_ampl_repn = False
- block._gen_obj_canonical_repn = False
- block._gen_con_canonical_repn = False
+ assert not hasattr(block, "_gen_obj_repn")
+ assert not hasattr(block, "_gen_con_repn")
+ block._gen_obj_repn = False
+ block._gen_con_repn = False
def remove_scenario(self, scenario):
-
scenario_name = scenario.name
assert scenario_name in self._scenario_instances
assert scenario_name not in self._scenario_to_bundle_map
@@ -144,14 +140,10 @@ def remove_scenario(self, scenario):
scenario_instance = self._scenario_instances[scenario_name]
assert scenario_instance is not None
for block in scenario_instance.block_data_objects(active=True):
- assert not block._gen_obj_ampl_repn
- assert not block._gen_con_ampl_repn
- assert not block._gen_obj_canonical_repn
- assert not block._gen_con_canonical_repn
- del block._gen_obj_ampl_repn
- del block._gen_con_ampl_repn
- del block._gen_obj_canonical_repn
- del block._gen_con_canonical_repn
+ assert not block._gen_obj_repn
+ assert not block._gen_con_repn
+ del block._gen_obj_repn
+ del block._gen_con_repn
del self._scenario_instances[scenario_name]
del self._scenario_solvers[scenario_name]
@@ -364,6 +356,7 @@ def preprocess_bundles(self,
if force_preprocess_bundle_objective:
preprocess_bundle |= preprocess_bundle_objective
+
if force_preprocess_bundle_constraints:
preprocess_bundle |= preprocess_bundle_constraints
@@ -393,24 +386,15 @@ def preprocess_bundles(self,
solver.remove_constraint(con)
solver.add_constraint(con)
else:
- if solver.problem_format == ProblemFormat.nl:
- idMap = {}
- if preprocess_bundle & preprocess_bundle_objective:
- ampl_preprocess_block_objectives(bundle_ef_instance,
- idMap=idMap)
- if preprocess_bundle & preprocess_bundle_constraints:
- ampl_preprocess_block_constraints(bundle_ef_instance,
- idMap=idMap)
- else:
- idMap = {}
- if preprocess_bundle & preprocess_bundle_objective:
- canonical_preprocess_block_objectives(
- bundle_ef_instance,
- idMap=idMap)
- if preprocess_bundle & preprocess_bundle_constraints:
- canonical_preprocess_block_constraints(
- bundle_ef_instance,
- idMap=idMap)
+ idMap = {}
+ if preprocess_bundle & preprocess_bundle_objective:
+ preprocess_block_objectives(
+ bundle_ef_instance,
+ idMap=idMap)
+ if preprocess_bundle & preprocess_bundle_constraints:
+ preprocess_block_constraints(
+ bundle_ef_instance,
+ idMap=idMap)
end_time = time.time()
@@ -487,11 +471,7 @@ def _cleanup():
print("Running full preprocessing for scenario %s "
"due to fixing of variables"
% (scenario_name))
-
- if solver.problem_format() == ProblemFormat.nl:
- ampl_expression_preprocessor({}, model=scenario_instance)
- else:
- canonical_expression_preprocessor({}, model=scenario_instance)
+ _preprocess(scenario_instance)
# We've preprocessed the entire instance, no point in checking
# anything else
_cleanup()
@@ -518,10 +498,9 @@ def _cleanup():
solver.set_objective(obj)
else:
# if only the objective changed, there is minimal work to do.
- if solver.problem_format() == ProblemFormat.nl:
- ampl_preprocess_block_objectives(scenario_instance)
- else:
- canonical_preprocess_block_objectives(scenario_instance)
+ _preprocess(scenario_instance,
+ objective=True,
+ constraints=False)
if (not instance_first_preprocess) and \
((len(instance_constraints_updated_list) > 0) or \
@@ -559,26 +538,14 @@ def _cleanup():
"scenario %s" % (len(instance_constraints_updated_list),
scenario_name))
idMap = {}
- repn_name = None
- repn_func = None
- if solver.problem_format() == ProblemFormat.nl:
- repn_name = "_ampl_repn"
- repn_func = generate_ampl_repn
- else:
- repn_name = "_canonical_repn"
- repn_func = generate_canonical_repn
-
for list_ in (instance_constraints_updated_list,
instance_constraints_added_list):
for constraint_data in list_:
- if isinstance(constraint_data, LinearCanonicalRepn):
+ if getattr(constraint_data, "_linear_canonical_form", False):
continue
- block = constraint_data.parent_block()
- # Get/Create the ComponentMap for the repn storage
- if not hasattr(block, repn_name):
- setattr(block, repn_name, ComponentMap())
- getattr(block, repn_name)[constraint_data] = \
- repn_func(constraint_data.body, idMap=idMap)
+ preprocess_constraint_data(scenario_instance,
+ constraint_data,
+ idMap=idMap)
if persistent_solver_in_use:
if not solver.has_instance():
@@ -592,10 +559,7 @@ def _cleanup():
if self.get_option("verbose"):
print("Running initial full preprocessing for scenario %s"
% (scenario_name))
- if solver.problem_format() == ProblemFormat.nl:
- ampl_expression_preprocessor({}, model=scenario_instance)
- else:
- canonical_expression_preprocessor({}, model=scenario_instance)
+ _preprocess(scenario_instance)
_cleanup()
def modify_scenario_solver_keywords(self, scenario_name, kwds):
diff --git a/pyomo/pysp/scenariotree/tree_structure.py b/pyomo/pysp/scenariotree/tree_structure.py
index 586ebe6562a..164624d0878 100644
--- a/pyomo/pysp/scenariotree/tree_structure.py
+++ b/pyomo/pysp/scenariotree/tree_structure.py
@@ -34,8 +34,7 @@
from pyomo.core.base.block import (_BlockData,
generate_cuid_names)
from pyomo.core.base.sos import _SOSConstraintData
-from pyomo.repn import (generate_canonical_repn,
- GeneralCanonicalRepn)
+from pyomo.repn import generate_standard_repn
from pyomo.pysp.phutils import (BasicSymbolMap,
indexToString,
isVariableNameIndexed,
@@ -1063,7 +1062,7 @@ def update_solution_from_instance(self, stages=None):
scenario_stale.clear()
for variable_id in tree_node._variable_ids:
vardata = scenariotree_sm_bySymbol[variable_id]
- if vardata.is_expression():
+ if vardata.is_expression_type():
continue
if vardata.fixed:
scenario_fixed.add(variable_id)
@@ -1086,16 +1085,16 @@ def push_solution_to_instance(self):
stage_cost_component = \
self._instance.find_component(cost_variable_name)[cost_variable_index]
# Some of these might be Expression objects so we check
- # for is_expression before changing.value
- if not stage_cost_component.is_expression():
+ # for is_expression_type before changing.value
+ if not stage_cost_component.is_expression_type():
stage_cost_component.value = self._stage_costs[stage_name]
for tree_node in self._node_list:
# Some of these might be Expression objects so we check
- # for is_expression before changing.value
+ # for is_expression_type before changing.value
for variable_id, var_value in iteritems(self._x[tree_node._name]):
compdata = scenariotree_sm_bySymbol[variable_id]
- if not compdata.is_expression():
+ if not compdata.is_expression_type():
compdata.value = var_value
for variable_id in self._fixed[tree_node._name]:
@@ -1236,7 +1235,7 @@ def variableNode_byNameIndex(self, variable_name, index):
# constraint - which might be None in the case of non-indexed constraints.
# currently doesn't deal with SOS constraints, for no real good reason.
# returns an instance of a ScenarioTreeStage object.
- # IMPT: this method works on the canonical representation ("repn" attribute)
+ # IMPT: this method works on the standard representation ("repn" attribute)
# of a constraint. this implies that pre-processing of the instance
# has been performed.
# NOTE: there is still the issue of whether the contained variables really
@@ -1247,7 +1246,7 @@ def variableNode_byNameIndex(self, variable_name, index):
def constraintNode(self,
constraintdata,
- canonical_repn=None,
+ repn=None,
instance=None,
assume_last_stage_if_missing=False):
@@ -1259,17 +1258,12 @@ def constraintNode(self,
vardata_list = constraintdata.get_variables()
else:
- if canonical_repn is None:
- canonical_repn = generate_canonical_repn(constraintdata.body)
+ if repn is None:
+ repn = generate_standard_repn(constraintdata.body, quadratic=False)
- # TODO: Is this necessary?
- if isinstance(canonical_repn, GeneralCanonicalRepn):
- raise RuntimeError("Method constraintNode in class "
- "ScenarioTree encountered a constraint "
- "with a general canonical encoding - "
- "only linear canonical encodings are expected!")
-
- vardata_list = canonical_repn.variables
+ vardata_list = repn.linear_vars
+ if len(repn.nonlinear_vars):
+ vardata_list += repn.nonlinear_vars
for var_data in vardata_list:
diff --git a/pyomo/pysp/solvers/benders.py b/pyomo/pysp/solvers/benders.py
index c2de3d4b0ac..5b2b9a162cd 100644
--- a/pyomo/pysp/solvers/benders.py
+++ b/pyomo/pysp/solvers/benders.py
@@ -278,7 +278,7 @@ def EXTERNAL_initialize_for_benders(manager,
for variable_id in rootnode._variable_ids:
vardata = scenario_bySymbol[variable_id]
# derived variables might be Expression objects
- if not vardata.is_expression():
+ if not vardata.is_expression_type():
tight_bounds = vardata.bounds
domain = vardata.domain
vardata.domain = Reals
diff --git a/pyomo/pysp/solvers/ef.py b/pyomo/pysp/solvers/ef.py
index 7ff5fc81ba7..79ae547e7c8 100755
--- a/pyomo/pysp/solvers/ef.py
+++ b/pyomo/pysp/solvers/ef.py
@@ -620,7 +620,7 @@ def _solve_impl(self,
# stage._cost_variable
# stage_cost_obj = \
# instance.find_component(cost_variable_name)[cost_variable_index]
- # if not stage_cost_obj.is_expression():
+ # if not stage_cost_obj.is_expression_type():
# refvar = ComponentUID(stage_cost_obj,cuid_buffer=tmp).\
# find_component(reference_model)
# refvar.value = stage_cost_obj.value
diff --git a/pyomo/pysp/solvers/schuripopt.py b/pyomo/pysp/solvers/schuripopt.py
index 79ff9ce230a..eefdc55b9b9 100644
--- a/pyomo/pysp/solvers/schuripopt.py
+++ b/pyomo/pysp/solvers/schuripopt.py
@@ -224,12 +224,12 @@ def EXTERNAL_collect_solution(worker, node_name):
# stage._cost_variable
#stage_cost_obj = instance.find_component(cost_variable_name)\
# [cost_variable_index]
- #if not stage_cost_obj.is_expression():
+ #if not stage_cost_obj.is_expression_type():
# solution[ComponentUID(stage_cost_obj,cuid_buffer=tmp)] = \
# (stage_cost_obj.value, stage_cost_obj.stale)
for variable_id in node._variable_ids:
var = bySymbol[variable_id]
- if var.is_expression():
+ if var.is_expression_type():
continue
solution[ComponentUID(var, cuid_buffer=tmp)] = \
(var.value, var.stale)
diff --git a/pyomo/pysp/solvers/spsolver.py b/pyomo/pysp/solvers/spsolver.py
index 4eca3ba4a60..6dc0c38bad3 100644
--- a/pyomo/pysp/solvers/spsolver.py
+++ b/pyomo/pysp/solvers/spsolver.py
@@ -231,7 +231,7 @@ def solve(self, sp, *args, **kwds):
for id_ in tree_obj_solution:
var = ComponentUID(id_).\
find_component(reference_model)
- if not var.is_expression():
+ if not var.is_expression_type():
var.value = tree_obj_solution[id_]
var.stale = False
results.xhat_loaded = True
diff --git a/pyomo/pysp/tests/convert/model_bad_constraint_rhs.py b/pyomo/pysp/tests/convert/model_bad_constraint_rhs.py
index 24d5e0f6e61..d459ae9f099 100644
--- a/pyomo/pysp/tests/convert/model_bad_constraint_rhs.py
+++ b/pyomo/pysp/tests/convert/model_bad_constraint_rhs.py
@@ -10,9 +10,9 @@
def pysp_instance_creation_callback(scenario_name, node_names):
model = simple_twostage_model()
if scenario_name == "Scenario1":
- model.cc = Constraint(expr=0 <= model.x + model.y <= 1)
+ model.cc = Constraint(expr=inequality(0, model.x + model.y, 1))
elif scenario_name == "Scenario2":
- model.cc = Constraint(expr=0 <= model.x + model.y <= 2)
+ model.cc = Constraint(expr=inequality(0, model.x + model.y, 2))
else:
assert False
model.smat = StochasticConstraintBoundsAnnotation()
diff --git a/pyomo/pysp/tests/convert/piecewise_model.py b/pyomo/pysp/tests/convert/piecewise_model.py
index fbf6cb527ce..a21ad8d7b8a 100644
--- a/pyomo/pysp/tests/convert/piecewise_model.py
+++ b/pyomo/pysp/tests/convert/piecewise_model.py
@@ -26,7 +26,7 @@ def create_instance(scenario_name):
model.StageCost = Expression([1,2])
model.StageCost.add(1, model.fx)
model.StageCost.add(2, -model.fz + model.r - cnt)
- model.o = Objective(expr=summation(model.StageCost))
+ model.o = Objective(expr=sum_product(model.StageCost))
model.ZERO = Param(initialize=0, mutable=True)
if cnt == 0:
@@ -45,7 +45,7 @@ def create_instance(scenario_name):
force_pw=True)
model.c_second_stage = Constraint(expr= model.x + model.r * cnt >= -100)
- model.r_second_stage = Constraint(expr= -cnt <= model.r <= 0)
+ model.r_second_stage = Constraint(expr= inequality(-cnt, model.r, 0))
# exercise more of the code by making this an indexed
# block
model.p_second_stage = Piecewise([1], model.fz, model.z,
diff --git a/pyomo/pysp/tests/convert/piecewise_model_embedded.py b/pyomo/pysp/tests/convert/piecewise_model_embedded.py
index a7b64d201c1..37ad37cb417 100644
--- a/pyomo/pysp/tests/convert/piecewise_model_embedded.py
+++ b/pyomo/pysp/tests/convert/piecewise_model_embedded.py
@@ -27,7 +27,7 @@ def create_embedded():
model.StageCost = aml.Expression([1,2])
model.StageCost.add(1, model.fx)
model.StageCost.add(2, -model.fz + model.r + model.d1)
- model.o = aml.Objective(expr=aml.summation(model.StageCost))
+ model.o = aml.Objective(expr=aml.sum_product(model.StageCost))
model.c_first_stage = aml.Constraint(expr= model.x >= 0)
diff --git a/pyomo/pysp/tests/convert/test_ddsip.py b/pyomo/pysp/tests/convert/test_ddsip.py
index c22029aed83..189e01b9366 100644
--- a/pyomo/pysp/tests/convert/test_ddsip.py
+++ b/pyomo/pysp/tests/convert/test_ddsip.py
@@ -420,14 +420,16 @@ def _setup(self, options, servers=None):
'piecewise',
piecewise_model,
piecewise_scenario_tree,
- ('nightly','expensive'))
+ ('pyomo5_expected_failures'))
+ #('nightly','expensive'))
piecewise_model = join(thisdir, "piecewise_model_alt.py")
create_test_classes('piecewise_alt',
'piecewise',
piecewise_model,
piecewise_scenario_tree,
- ('nightly','expensive'))
+ ('pyomo5_expected_failures'))
+ #('nightly','expensive'))
if __name__ == "__main__":
unittest.main()
diff --git a/pyomo/pysp/tests/convert/test_smps.py b/pyomo/pysp/tests/convert/test_smps.py
index 036ed25960c..a13cf342448 100644
--- a/pyomo/pysp/tests/convert/test_smps.py
+++ b/pyomo/pysp/tests/convert/test_smps.py
@@ -35,7 +35,8 @@
_run_verbose = True
-@unittest.category('nightly','expensive')
+#@unittest.category('nightly','expensive')
+@unittest.category('pyomo5_expected_failures')
class TestConvertSMPSSimple(unittest.TestCase):
@unittest.nottest
@@ -237,7 +238,6 @@ def _setup(self, options):
if _run_verbose:
options['--verbose'] = None
options['--output-times'] = None
- options['--explicit'] = None
options['--traceback'] = None
options['--keep-scenario-files'] = None
options['--keep-auxiliary-files'] = None
@@ -595,7 +595,8 @@ def _setup(self, options, servers=None):
'piecewise',
piecewise_model,
piecewise_scenario_tree,
- ('nightly','expensive'))
+ ('pyomo5_expected_failures'))
+ #('nightly','expensive'))
# uses the same baselines as 'piecewise',
# except annotations are declared differently
@@ -604,7 +605,8 @@ def _setup(self, options, servers=None):
'piecewise',
piecewise_model,
piecewise_scenario_tree,
- ('nightly','expensive'))
+ ('pyomo5_expected_failures'))
+ #('nightly','expensive'))
if __name__ == "__main__":
unittest.main()
diff --git a/pyomo/pysp/tests/convert/test_smps_embedded.py b/pyomo/pysp/tests/convert/test_smps_embedded.py
index 67bcda69bb4..70397fa1aba 100644
--- a/pyomo/pysp/tests/convert/test_smps_embedded.py
+++ b/pyomo/pysp/tests/convert/test_smps_embedded.py
@@ -64,7 +64,8 @@ def tearDownModule():
del sys.modules["piecewise_model_embedded"]
piecewise_model_embedded = None
-@unittest.category('nightly','expensive')
+#@unittest.category('nightly','expensive')
+@unittest.category('pyomo5_expected_failures')
class TestSMPSEmbeddedBad(unittest.TestCase):
@classmethod
@@ -283,7 +284,7 @@ def test_stoch_range_constraint(self):
model.stochdata.declare(
model.q,
distribution=TableDistribution([0.0,1.0]))
- model.c3 = aml.Constraint(expr= model.q <= model.y <= 0)
+ model.c3 = aml.Constraint(expr=aml.inequality(model.q, model.y, 0))
sp = EmbeddedSP(model)
with self.assertRaises(ValueError) as cm:
pyomo.pysp.convert.smps.convert_embedded(self.tmpdir,
@@ -372,7 +373,8 @@ def test_bad_distribution_constraint(self):
"only supports discrete table distributions of type "
"pyomo.pysp.embeddedsp.TableDistribution."))
-@unittest.category('nightly','expensive')
+#@unittest.category('nightly','expensive')
+@unittest.category('pyomo5_expected_failures')
class TestSMPSEmbedded(unittest.TestCase):
def _diff(self, baselinedir, outputdir, dc=None):
diff --git a/pyomo/pysp/tests/convert/utils.py b/pyomo/pysp/tests/convert/utils.py
index 7c86ada70c5..29b38e59aa6 100644
--- a/pyomo/pysp/tests/convert/utils.py
+++ b/pyomo/pysp/tests/convert/utils.py
@@ -32,7 +32,7 @@ def simple_twostage_model():
model.c = ConstraintList()
model.c.add(model.x >= 10)
model.c.add(model.y >= 10)
- model.o = Objective(expr=summation(model.StageCost))
+ model.o = Objective(expr=sum_product(model.StageCost))
return model
def simple_threestage_scenario_tree():
@@ -70,5 +70,5 @@ def simple_threestage_model():
model.c.add(model.x >= 10)
model.c.add(model.y >= 10)
model.c.add(model.z >= 10)
- model.o = Objective(expr=summation(model.StageCost))
+ model.o = Objective(expr=sum_product(model.StageCost))
return model
diff --git a/pyomo/pysp/tests/examples/test_model/feas/ReferenceModel.py b/pyomo/pysp/tests/examples/test_model/feas/ReferenceModel.py
index d5127d42203..ee800411975 100644
--- a/pyomo/pysp/tests/examples/test_model/feas/ReferenceModel.py
+++ b/pyomo/pysp/tests/examples/test_model/feas/ReferenceModel.py
@@ -37,7 +37,7 @@ def y_is_geq_x_rule(model, i):
# you can get y=zero with anything, but for y=one, you need at least one one
# but if you don't have at least one one, you have to have y=0
def y_is_leq_sum_x_rule(model):
- return model.y <= summation(model.x)
+ return model.y <= sum_product(model.x)
model.y_is_leq_sum_x = Constraint(rule=y_is_leq_sum_x_rule)
def slacker_rule(model):
@@ -49,7 +49,7 @@ def FirstStageCost_rule(model):
model.FirstStageCost = Expression(rule=FirstStageCost_rule)
def SecondStageCost_rule(model):
- return model.c * model.y + model.M * model.slackbool + summation(model.x)
+ return model.c * model.y + model.M * model.slackbool + sum_product(model.x)
model.SecondStageCost = Expression(rule=SecondStageCost_rule)
def Obj_rule(model):
diff --git a/pyomo/pysp/tests/examples/test_model/twovarslack/ReferenceModel.py b/pyomo/pysp/tests/examples/test_model/twovarslack/ReferenceModel.py
index 6b75fc252da..261f4e9f273 100644
--- a/pyomo/pysp/tests/examples/test_model/twovarslack/ReferenceModel.py
+++ b/pyomo/pysp/tests/examples/test_model/twovarslack/ReferenceModel.py
@@ -31,7 +31,7 @@ def y_is_geq_x_rule(model, i):
# you can get y=zero with anything, but for y=one, you need at least one one
# but if you don't have at least one one, you have to have y=0
def y_is_leq_sum_x_rule(model):
- return model.y <= summation(model.x)
+ return model.y <= sum_product(model.x)
model.y_is_leq_sum_x = Constraint(rule=y_is_leq_sum_x_rule)
def slacker_rule(model):
diff --git a/pyomo/pysp/tests/scenariotreemanager/dummy_model.py b/pyomo/pysp/tests/scenariotreemanager/dummy_model.py
index 36290853d1e..937db42bf07 100644
--- a/pyomo/pysp/tests/scenariotreemanager/dummy_model.py
+++ b/pyomo/pysp/tests/scenariotreemanager/dummy_model.py
@@ -33,7 +33,7 @@ def pysp_instance_creation_callback(scenario_name, node_names):
model.StageCost = Expression([1,2])
model.StageCost.add(1, model.x)
model.StageCost.add(2, -model.z)
- model.o = Objective(expr=summation(model.StageCost))
+ model.o = Objective(expr=sum_product(model.StageCost))
model.c = ConstraintList()
model.c.add(model.x >= cnt)
model.c.add(model.z <= cnt**2)
diff --git a/pyomo/pysp/tests/scenariotreemanager/test_scenariotreemanager.py b/pyomo/pysp/tests/scenariotreemanager/test_scenariotreemanager.py
index dbaeb966bb3..049b074dd2f 100644
--- a/pyomo/pysp/tests/scenariotreemanager/test_scenariotreemanager.py
+++ b/pyomo/pysp/tests/scenariotreemanager/test_scenariotreemanager.py
@@ -79,7 +79,7 @@ def test_factory(self):
model.stage_cost = Expression([1,2])
model.stage_cost[1].expr = model.x
model.stage_cost[2].expr = 0.0
- model.o = Objective(expr=summation(model.stage_cost))
+ model.o = Objective(expr=sum_product(model.stage_cost))
model.c = Constraint(expr=model.x >= model.y)
scenario_tree_model = CreateConcreteTwoStageScenarioTreeModel(3)
diff --git a/pyomo/pysp/tests/unit/test_instancefactory.py b/pyomo/pysp/tests/unit/test_instancefactory.py
index 06c5939e055..c1a047626ed 100644
--- a/pyomo/pysp/tests/unit/test_instancefactory.py
+++ b/pyomo/pysp/tests/unit/test_instancefactory.py
@@ -45,6 +45,8 @@ def setUpModule():
reference_test_model = load_external_module(
join(testdatadir, "reference_test_model.py"))[0].model
+
+@unittest.category('smoke','nightly','expensive')
class Test(unittest.TestCase):
@classmethod
@@ -293,6 +295,7 @@ def test_init5_default(self):
# model: name of .py file with model
# scenario_tree: Pyomo scenario tree model
+ @unittest.category('pyomo5_expected_failures', '!smoke')
def test_init6(self):
self.assertTrue("reference_test_model" not in sys.modules)
scenario_tree_model = CreateAbstractScenarioTreeModel().\
@@ -702,7 +705,5 @@ def test_init22(self):
self.assertEqual(len(factory._archives), 0)
self.assertTrue("both_callbacks" in sys.modules)
-Test = unittest.category('smoke','nightly','expensive')(Test)
-
if __name__ == "__main__":
unittest.main()
diff --git a/pyomo/repn/__init__.py b/pyomo/repn/__init__.py
index 4b8e70a3393..7ce2c47bdf3 100644
--- a/pyomo/repn/__init__.py
+++ b/pyomo/repn/__init__.py
@@ -11,10 +11,8 @@
from pyomo.util.plugin import PluginGlobals
PluginGlobals.add_env("pyomo")
-from pyomo.repn.canonical_repn import *
-from pyomo.repn.ampl_repn import *
-
-import pyomo.repn.compute_canonical_repn
import pyomo.repn.collect
+from pyomo.repn.standard_repn import *
+from pyomo.repn.standard_aux import *
PluginGlobals.pop_env()
diff --git a/pyomo/repn/beta/matrix.py b/pyomo/repn/beta/matrix.py
index c7f13464963..9b5baa23d33 100644
--- a/pyomo/repn/beta/matrix.py
+++ b/pyomo/repn/beta/matrix.py
@@ -29,8 +29,7 @@
IndexedConstraint,
SimpleConstraint,
_ConstraintData)
-from pyomo.repn.canonical_repn import (generate_canonical_repn,
- LinearCanonicalRepn)
+from pyomo.repn import generate_standard_repn
from six import iteritems
from six.moves import xrange
@@ -138,10 +137,8 @@ def _get_bound(exp):
SparseMat_pRows = [0]
for block in all_blocks:
- if hasattr(block, '_canonical_repn'):
- del block._canonical_repn
- if hasattr(block, '_ampl_repn'):
- del block._ampl_repn
+ if hasattr(block, '_repn'):
+ del block._repn
for constraint in block.component_objects(Constraint,
active=True,
@@ -172,23 +169,23 @@ def _get_bound(exp):
constraint_data_to_remove.append((constraint, index))
constraint_containers_to_check.add((block, constraint))
- canonical_repn = generate_canonical_repn(constraint_data.body)
+ repn = generate_standard_repn(constraint_data.body)
- assert isinstance(canonical_repn, LinearCanonicalRepn)
+ assert repn.nonlinear_expr is None
row_variable_symbols = []
row_coefficients = []
- if canonical_repn.variables is None:
+ if len(repn.linear_vars) == 0:
if skip_trivial_constraints:
continue
else:
row_variable_symbols = \
[VarIDToVarSymbol[id(vardata)]
- for vardata in canonical_repn.variables]
+ for vardata in repn.linear_vars]
referenced_variable_symbols.update(
row_variable_symbols)
- assert canonical_repn.linear is not None
- row_coefficients = canonical_repn.linear
+ assert repn.linear_coefs is not None
+ row_coefficients = repn.linear_coefs
SparseMat_pRows.append(SparseMat_pRows[-1] + \
len(row_variable_symbols))
@@ -200,9 +197,7 @@ def _get_bound(exp):
L = _get_bound(constraint_data.lower)
U = _get_bound(constraint_data.upper)
- constant = value(canonical_repn.constant)
- if constant is None:
- constant = 0
+ constant = value(repn.constant)
Ranges.append(L - constant if (L is not None) else 0)
Ranges.append(U - constant if (U is not None) else 0)
@@ -325,7 +320,12 @@ def _get_bound(exp):
RangeTypes,
ColumnIndexToVarObject))
-class _LinearConstraintData(_ConstraintData, LinearCanonicalRepn):
+#class _LinearConstraintData(_ConstraintData,LinearCanonicalRepn):
+#
+# This change breaks this class, but it's unclear whether this
+# is being used...
+#
+class _LinearConstraintData(_ConstraintData):
"""
This class defines the data for a single linear constraint
in canonical form.
diff --git a/pyomo/repn/collect.py b/pyomo/repn/collect.py
index 2b06fba5c37..156dadfdd36 100644
--- a/pyomo/repn/collect.py
+++ b/pyomo/repn/collect.py
@@ -12,7 +12,7 @@
from pyutilib.misc import Bunch
from pyomo.core.base import Var, Constraint, Objective, maximize, minimize
-from pyomo.repn import generate_canonical_repn
+from pyomo.repn.standard_repn import generate_standard_repn
def collect_linear_terms(block, unfixed):
@@ -39,13 +39,13 @@ def collect_linear_terms(block, unfixed):
for (oname, odata) in block.component_map(Objective, active=True).items():
for ndx in odata:
if odata[ndx].sense == maximize:
- o_terms = generate_canonical_repn(-1*odata[ndx].expr, compute_values=False)
+ o_terms = generate_standard_repn(-1*odata[ndx].expr, compute_values=False)
d_sense = minimize
else:
- o_terms = generate_canonical_repn(odata[ndx].expr, compute_values=False)
+ o_terms = generate_standard_repn(odata[ndx].expr, compute_values=False)
d_sense = maximize
- for i in range(len(o_terms.variables)):
- c_rhs[ o_terms.variables[i].parent_component().local_name, o_terms.variables[i].index() ] = o_terms.linear[i]
+ for var, coef in zip(o_terms.linear_vars, o_terms.linear_coefs):
+ c_rhs[ var.parent_component().local_name, var.index() ] = coef
# Stop after the first objective
break
#
@@ -54,34 +54,32 @@ def collect_linear_terms(block, unfixed):
for (name, data) in block.component_map(Constraint, active=True).items():
for ndx in data:
con = data[ndx]
- body_terms = generate_canonical_repn(con.body, compute_values=False)
- lower_terms = generate_canonical_repn(con.lower, compute_values=False) if not con.lower is None else None
- upper_terms = generate_canonical_repn(con.upper, compute_values=False) if not con.upper is None else None
+ body_terms = generate_standard_repn(con.body, compute_values=False)
+ lower_terms = generate_standard_repn(con.lower, compute_values=False) if not con.lower is None else None
+ upper_terms = generate_standard_repn(con.upper, compute_values=False) if not con.upper is None else None
#
- if body_terms.constant is None:
- body_terms.constant = 0
- if not lower_terms is None and not lower_terms.variables is None:
+ if not lower_terms is None and not lower_terms.is_constant():
raise(RuntimeError, "Error during dualization: Constraint '%s' has a lower bound that is non-constant")
- if not upper_terms is None and not upper_terms.variables is None:
+ if not upper_terms is None and not upper_terms.is_constant():
raise(RuntimeError, "Error during dualization: Constraint '%s' has an upper bound that is non-constant")
#
- for i in range(len(body_terms.variables)):
- varname = body_terms.variables[i].parent_component().local_name
- varndx = body_terms.variables[i].index()
- A.setdefault(body_terms.variables[i].parent_component().local_name, {}).setdefault(varndx,[]).append( Bunch(coef=body_terms.linear[i], var=name, ndx=ndx) )
+ for var, coef in zip(body_terms.linear_vars, body_terms.linear_coefs):
+ varname = var.parent_component().local_name
+ varndx = var.index()
+ A.setdefault(varname, {}).setdefault(varndx,[]).append( Bunch(coef=coef, var=name, ndx=ndx) )
#
if not con.equality:
#
# Inequality constraint
#
- if lower_terms is None or lower_terms.constant is None:
+ if lower_terms is None:
#
# body <= upper
#
v_domain[name, ndx] = -1
b_coef[name,ndx] = upper_terms.constant - body_terms.constant
- elif upper_terms is None or upper_terms.constant is None:
+ elif upper_terms is None:
#
# lower <= body
#
diff --git a/pyomo/repn/compute_ampl_repn.py b/pyomo/repn/compute_ampl_repn.py
deleted file mode 100644
index 048e8a8aea5..00000000000
--- a/pyomo/repn/compute_ampl_repn.py
+++ /dev/null
@@ -1,156 +0,0 @@
-# ___________________________________________________________________________
-#
-# Pyomo: Python Optimization Modeling Objects
-# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
-# rights in this software.
-# This software is distributed under the 3-clause BSD License.
-# ___________________________________________________________________________
-
-import sys
-import logging
-
-import pyomo.util
-from pyomo.core.base import (Constraint,
- Objective,
- ComponentMap)
-from pyomo.repn.canonical_repn import LinearCanonicalRepn
-from pyomo.repn import generate_ampl_repn
-
-from six import iteritems
-
-def preprocess_block_objectives(block, idMap=None):
-
- # Get/Create the ComponentMap for the repn
- if not hasattr(block,'_ampl_repn'):
- block._ampl_repn = ComponentMap()
- block_ampl_repn = block._ampl_repn
-
- for objective_data in block.component_data_objects(Objective,
- active=True,
- descend_into=False):
-
- if objective_data.expr is None:
- raise ValueError("No expression has been defined for objective %s"
- % (objective_data.name))
-
- try:
- ampl_repn = generate_ampl_repn(objective_data.expr,
- idMap=idMap)
- except Exception:
- err = sys.exc_info()[1]
- logging.getLogger('pyomo.core').error\
- ( "exception generating a ampl representation for objective %s: %s" \
- % (objective_data.name, str(err)) )
- raise
-
- block_ampl_repn[objective_data] = ampl_repn
-
-def preprocess_block_constraints(block, idMap=None):
-
- # Get/Create the ComponentMap for the repn
- if not hasattr(block,'_ampl_repn'):
- block._ampl_repn = ComponentMap()
- block_ampl_repn = block._ampl_repn
-
- for constraint in block.component_objects(Constraint,
- active=True,
- descend_into=False):
-
- preprocess_constraint(block,
- constraint,
- idMap=idMap,
- block_ampl_repn=block_ampl_repn)
-
-def preprocess_constraint(block,
- constraint,
- idMap=None,
- block_ampl_repn=None):
-
- from pyomo.repn.beta.matrix import MatrixConstraint
- if isinstance(constraint, MatrixConstraint):
- return
-
- # Get/Create the ComponentMap for the repn
- if not hasattr(block,'_ampl_repn'):
- block._ampl_repn = ComponentMap()
- block_ampl_repn = block._ampl_repn
-
- for index, constraint_data in iteritems(constraint):
-
- if not constraint_data.active:
- continue
-
- if isinstance(constraint_data, LinearCanonicalRepn):
- continue
-
- if constraint_data.body is None:
- raise ValueError(
- "No expression has been defined for the body "
- "of constraint %s" % (constraint_data.name))
-
- try:
- ampl_repn = generate_ampl_repn(constraint_data.body,
- idMap=idMap)
- except Exception:
- err = sys.exc_info()[1]
- logging.getLogger('pyomo.core').error(
- "exception generating a ampl representation for "
- "constraint %s: %s"
- % (constraint_data.name, str(err)))
- raise
-
- block_ampl_repn[constraint_data] = ampl_repn
-
-def preprocess_constraint_data(block,
- constraint_data,
- idMap=None,
- block_ampl_repn=None):
-
- if isinstance(constraint_data, LinearCanonicalRepn):
- return
-
- # Get/Create the ComponentMap for the repn
- if not hasattr(block,'_ampl_repn'):
- block._ampl_repn = ComponentMap()
- block_ampl_repn = block._ampl_repn
-
- if constraint_data.body is None:
- raise ValueError(
- "No expression has been defined for the body "
- "of constraint %s" % (constraint_data.name))
-
- try:
- ampl_repn = generate_ampl_repn(constraint_data.body,
- idMap=idMap)
- except Exception:
- err = sys.exc_info()[1]
- logging.getLogger('pyomo.core').error(
- "exception generating a ampl representation for "
- "constraint %s: %s"
- % (constraint_data.name, str(err)))
- raise
-
- block_ampl_repn[constraint_data] = ampl_repn
-
-@pyomo.util.pyomo_api(namespace='pyomo.repn')
-def compute_ampl_repn(data, model=None):
- """
- This plugin computes the ampl representation for all objectives
- and constraints. All results are stored in a ComponentMap named
- "_ampl_repn" at the block level.
-
- We break out preprocessing of the objectives and constraints
- in order to avoid redundant and unnecessary work, specifically
- in contexts where a model is iteratively solved and modified.
- we don't have finer-grained resolution, but we could easily
- pass in a Constraint and an Objective if warranted.
-
- Required:
- model: A concrete model instance.
- """
- idMap = {}
- for block in model.block_data_objects(active=True):
- preprocess_block_constraints(block, idMap=idMap)
- preprocess_block_objectives(block, idMap=idMap)
diff --git a/pyomo/repn/compute_canonical_repn.py b/pyomo/repn/compute_canonical_repn.py
deleted file mode 100644
index 3ecf784fc9f..00000000000
--- a/pyomo/repn/compute_canonical_repn.py
+++ /dev/null
@@ -1,187 +0,0 @@
-# ___________________________________________________________________________
-#
-# Pyomo: Python Optimization Modeling Objects
-# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
-# rights in this software.
-# This software is distributed under the 3-clause BSD License.
-# ___________________________________________________________________________
-
-import sys
-import logging
-
-from pyomo.core.base import Constraint, Objective, ComponentMap, Block
-import pyomo.repn
-from pyomo.repn.canonical_repn import LinearCanonicalRepn
-from pyomo.repn import generate_canonical_repn
-import pyomo.core.base.connector
-
-from six import iteritems
-
-def preprocess_block_objectives(block, idMap=None):
-
- # Get/Create the ComponentMap for the canonical_repn
- if not hasattr(block, '_canonical_repn'):
- block._canonical_repn = ComponentMap()
- block_canonical_repn = block._canonical_repn
-
- for objective_data in block.component_data_objects(Objective,
- active=True,
- descend_into=False):
-
- if objective_data.expr is None:
- raise ValueError("No expression has been defined for objective %s"
- % (objective_data.name))
-
- try:
- objective_data_repn = generate_canonical_repn(objective_data.expr, idMap=idMap)
- except Exception:
- err = sys.exc_info()[1]
- logging.getLogger('pyomo.core').error(
- "exception generating a canonical representation for objective %s: %s"
- % (objective_data.name, str(err)))
- raise
-
- block_canonical_repn[objective_data] = objective_data_repn
-
-def preprocess_block_constraints(block, idMap=None):
-
- # Get/Create the ComponentMap for the canonical_repn
- if not hasattr(block, '_canonical_repn'):
- block._canonical_repn = ComponentMap()
- block_canonical_repn = block._canonical_repn
-
- for constraint in block.component_objects(Constraint,
- active=True,
- descend_into=False):
-
- preprocess_constraint(block,
- constraint,
- idMap=idMap,
- block_canonical_repn=block_canonical_repn)
-
-def preprocess_constraint(block,
- constraint,
- idMap=None,
- block_canonical_repn=None):
-
- from pyomo.repn.beta.matrix import MatrixConstraint
- if isinstance(constraint, MatrixConstraint):
- return
-
- # Get/Create the ComponentMap for the canonical_repn
- if not hasattr(block,'_canonical_repn'):
- block._canonical_repn = ComponentMap()
- block_canonical_repn = block._canonical_repn
-
- for index, constraint_data in iteritems(constraint):
-
- if not constraint_data.active:
- continue
-
- if isinstance(constraint_data, LinearCanonicalRepn):
- continue
-
- if constraint_data.body is None:
- raise ValueError("No expression has been defined for "
- "the body of constraint %s, index=%s"
- % (str(constraint.name), str(index)))
-
- # FIXME: This is a huge hack to keep canonical_repn from
- # trying to generate representations representations of
- # Constraints with Connectors (which will be
- # deactivated once they have been expanded
- # anyways). This can go away when preprocess is moved
- # out of the model.create() phase and into the future
- # model validation phase. (ZBF)
- ignore_connector = False
- if hasattr(constraint_data.body,"_args") and constraint_data.body._args is not None:
- for arg in constraint_data.body._args:
- if arg.__class__ is pyomo.core.base.connector.SimpleConnector:
- ignore_connector = True
- if ignore_connector:
- #print "Ignoring",constraint.name,index
- continue
-
- try:
- canonical_repn = generate_canonical_repn(constraint_data.body, idMap=idMap)
- except Exception:
- logging.getLogger('pyomo.core').error \
- ( "exception generating a canonical representation for constraint %s (index %s)" \
- % (str(constraint.name), str(index)) )
- raise
-
- block_canonical_repn[constraint_data] = canonical_repn
-
-def preprocess_constraint_data(block,
- constraint_data,
- idMap=None,
- block_canonical_repn=None):
-
- if isinstance(constraint_data, LinearCanonicalRepn):
- return
-
- # Get/Create the ComponentMap for the canonical_repn
- if not hasattr(block,'_canonical_repn'):
- block._canonical_repn = ComponentMap()
- block_canonical_repn = block._canonical_repn
-
- if constraint_data.body is None:
- raise ValueError("No expression has been defined for "
- "the body of constraint %s"
- % (constraint_data.name))
-
- # FIXME: This is a huge hack to keep canonical_repn from trying to generate representations
- # representations of Constraints with Connectors (which will be deactivated once they
- # have been expanded anyways). This can go away when preprocess is moved out of the
- # model.create() phase and into the future model validation phase. (ZBF)
- ignore_connector = False
- if hasattr(constraint_data.body,"_args") and constraint_data.body._args is not None:
- for arg in constraint_data.body._args:
- if arg.__class__ is pyomo.core.base.connector.SimpleConnector:
- ignore_connector = True
- if ignore_connector:
- #print "Ignoring",constraint.name,index
- return
-
- try:
- canonical_repn = generate_canonical_repn(constraint_data.body, idMap=idMap)
- except Exception:
- logging.getLogger('pyomo.core').error \
- ( "exception generating a canonical representation for constraint %s" \
- % (constraint_data.name))
- raise
-
- block_canonical_repn[constraint_data] = canonical_repn
-
-@pyomo.util.pyomo_api(namespace='pyomo.repn')
-def compute_canonical_repn(data, model=None):
- """
- This plugin computes the canonical representation for all
- objectives and constraints linear terms. All results are stored
- in a ComponentMap named "_canonical_repn" at the block level.
-
- We break out preprocessing of the objectives and constraints
- in order to avoid redundant and unnecessary work, specifically
- in contexts where a model is iteratively solved and modified.
- we don't have finer-grained resolution, but we could easily
- pass in a Constraint and an Objective if warranted.
-
- Required:
- model: A concrete model instance.
- """
- idMap = {}
-
- # FIXME: We should revisit the bilevel transformations to see why
- # the test requires "SubModels" to be preprocessed. [JDS 12/31/14]
- if model._type is not Block and model.active:
- preprocess_block_constraints(model, idMap=idMap)
- preprocess_block_objectives(model, idMap=idMap)
-
- # block_data_objects() returns the current block... no need to do special
- # handling of the top (model) block.
- #
- for block in model.block_data_objects(active=True):
- preprocess_block_constraints(block, idMap=idMap)
- preprocess_block_objectives(block, idMap=idMap)
diff --git a/pyomo/repn/plugins/ampl/ampl_.py b/pyomo/repn/plugins/ampl/ampl_.py
index 407590081ea..5106a3cf791 100644
--- a/pyomo/repn/plugins/ampl/ampl_.py
+++ b/pyomo/repn/plugins/ampl/ampl_.py
@@ -25,38 +25,35 @@
import os
import time
+from pyutilib.math.util import isclose
from pyutilib.misc import PauseGC
import pyomo.util.plugin
from pyomo.opt import ProblemFormat
from pyomo.opt.base import *
+from pyomo.core.expr import current as EXPR
+from pyomo.core.expr.numvalue import (NumericConstant,
+ native_numeric_types,
+ value)
from pyomo.core.base import *
-from pyomo.core.base import expr, SymbolMap, Block
-import pyomo.core.base.expr_common
+from pyomo.core.base import SymbolMap, Block
from pyomo.core.base.var import Var
from pyomo.core.base import _ExpressionData, Expression, SortComponents
-from pyomo.core.base.numvalue import (NumericConstant,
- native_numeric_types,
- value)
from pyomo.core.base import var
from pyomo.core.base import param
import pyomo.core.base.suffix
-from pyomo.repn.ampl_repn import (generate_ampl_repn,
- AmplRepn)
+from pyomo.repn.standard_repn import StandardRepn, generate_standard_repn
import pyomo.core.kernel.component_suffix
from pyomo.core.kernel.component_block import IBlockStorage
from pyomo.core.kernel.component_expression import IIdentityExpression
from pyomo.core.kernel.component_variable import IVariable
-from pyomo.repn import LinearCanonicalRepn
from six import itervalues, iteritems
from six.moves import xrange, zip
-_using_pyomo4_trees = False
-if pyomo.core.base.expr_common.mode == \
- pyomo.core.base.expr_common.Mode.pyomo4_trees:
- _using_pyomo4_trees = True
+_using_pyomo4_trees = EXPR.mode == EXPR.Mode.pyomo4_trees
+_using_pyomo5_trees = EXPR.mode == EXPR.Mode.pyomo5_trees
logger = logging.getLogger('pyomo.core')
@@ -78,7 +75,10 @@
'acosh': 'o52',
'atanh': 'o47',
'pow': 'o5',
- 'abs': 'o15'}
+ 'abs': 'o15',
+ 'ceil': 'o13',
+ 'floor': 'o14'
+}
# build string templates
def _build_op_template():
@@ -89,42 +89,47 @@ def _build_op_template():
prod_comment = "\t#*"
div_template = "o3{C}\n"
div_comment = "\t#/"
- if _using_pyomo4_trees:
- _op_template[expr._ProductExpression] = prod_template
- _op_comment[expr._ProductExpression] = prod_comment
- _op_template[expr._DivisionExpression] = div_template
- _op_comment[expr._DivisionExpression] = div_comment
+ if _using_pyomo5_trees:
+ _op_template[EXPR.ProductExpression] = prod_template
+ _op_comment[EXPR.ProductExpression] = prod_comment
+ _op_template[EXPR.ReciprocalExpression] = div_template
+ _op_comment[EXPR.ReciprocalExpression] = div_comment
+ elif _using_pyomo4_trees:
+ _op_template[EXPR._ProductExpression] = prod_template
+ _op_comment[EXPR._ProductExpression] = prod_comment
+ _op_template[EXPR._DivisionExpression] = div_template
+ _op_comment[EXPR._DivisionExpression] = div_comment
else:
- _op_template[expr._ProductExpression] = (prod_template,
+ _op_template[EXPR._ProductExpression] = (prod_template,
div_template)
- _op_comment[expr._ProductExpression] = (prod_comment,
+ _op_comment[EXPR._ProductExpression] = (prod_comment,
div_comment)
del prod_template
del prod_comment
del div_template
del div_comment
- _op_template[expr._ExternalFunctionExpression] = ("f%d %d{C}\n", #function
+ _op_template[EXPR.ExternalFunctionExpression] = ("f%d %d{C}\n", #function
"h%d:%s{C}\n") #string arg
- _op_comment[expr._ExternalFunctionExpression] = ("\t#%s", #function
+ _op_comment[EXPR.ExternalFunctionExpression] = ("\t#%s", #function
"") #string arg
for opname in _intrinsic_function_operators:
_op_template[opname] = _intrinsic_function_operators[opname]+"{C}\n"
_op_comment[opname] = "\t#"+opname
- _op_template[expr.Expr_if] = "o35{C}\n"
- _op_comment[expr.Expr_if] = "\t#if"
+ _op_template[EXPR.Expr_ifExpression] = "o35{C}\n"
+ _op_comment[EXPR.Expr_ifExpression] = "\t#if"
- _op_template[expr._InequalityExpression] = ("o21{C}\n", # and
+ _op_template[EXPR.InequalityExpression] = ("o21{C}\n", # and
"o22{C}\n", # <
"o23{C}\n") # <=
- _op_comment[expr._InequalityExpression] = ("\t#and", # and
+ _op_comment[EXPR.InequalityExpression] = ("\t#and", # and
"\t#lt", # <
"\t#le") # <=
- _op_template[expr._EqualityExpression] = "o24{C}\n"
- _op_comment[expr._EqualityExpression] = "\t#eq"
+ _op_template[EXPR.EqualityExpression] = "o24{C}\n"
+ _op_comment[EXPR.EqualityExpression] = "\t#eq"
_op_template[var._VarData] = "v%d{C}\n"
_op_comment[var._VarData] = "\t#%s"
@@ -135,19 +140,22 @@ def _build_op_template():
_op_template[NumericConstant] = "n%r{C}\n"
_op_comment[NumericConstant] = ""
- _op_template[expr._SumExpression] = (
+ _op_template[EXPR.SumExpressionBase] = (
"o54{C}\n%d\n", # nary +
"o0{C}\n", # +
"o2\n" + _op_template[NumericConstant] ) # * coef
- _op_comment[expr._SumExpression] = ("\t#sumlist", # nary +
+ _op_comment[EXPR.SumExpressionBase] = ("\t#sumlist", # nary +
"\t#+", # +
_op_comment[NumericConstant]) # * coef
- if _using_pyomo4_trees:
- _op_template[expr._LinearExpression] = _op_template[expr._SumExpression]
- _op_comment[expr._LinearExpression] = _op_comment[expr._SumExpression]
+ if _using_pyomo5_trees:
+ _op_template[EXPR.NegationExpression] = "o16{C}\n"
+ _op_comment[EXPR.NegationExpression] = "\t#-"
+ elif _using_pyomo4_trees:
+ _op_template[EXPR._LinearExpression] = _op_template[EXPR.SumExpressionBase]
+ _op_comment[EXPR._LinearExpression] = _op_comment[EXPR.SumExpressionBase]
- _op_template[expr._NegationExpression] = "o16{C}\n"
- _op_comment[expr._NegationExpression] = "\t#-"
+ _op_template[EXPR._NegationExpression] = "o16{C}\n"
+ _op_comment[EXPR._NegationExpression] = "\t#-"
return _op_template, _op_comment
@@ -267,12 +275,12 @@ def count_constraint(self,soscondata):
class RepnWrapper(object):
- __slots__ = ('repn','_linear_vars','_nonlinear_vars')
+ __slots__ = ('repn','linear_vars','nonlinear_vars')
def __init__(self,repn,linear,nonlinear):
self.repn = repn
- self._linear_vars = linear
- self._nonlinear_vars = nonlinear
+ self.linear_vars = linear
+ self.nonlinear_vars = nonlinear
class ProblemWriter_nl(AbstractProblemWriter):
@@ -400,6 +408,57 @@ def __call__(self,
self._op_string = None
return filename, symbol_map
+ def _print_quad_term(self, v1, v2):
+ OUTPUT = self._OUTPUT
+ if v1 is not v2:
+ prod_str = self._op_string[EXPR.ProductExpression]
+ OUTPUT.write(prod_str)
+ self._print_nonlinear_terms_NL(v1)
+ self._print_nonlinear_terms_NL(v2)
+ else:
+ intr_expr_str = self._op_string['pow']
+ OUTPUT.write(intr_expr_str)
+ self._print_nonlinear_terms_NL(v1)
+ OUTPUT.write(self._op_string[NumericConstant] % (2))
+
+ def _print_standard_quadratic_NL(self,
+ quadratic_vars,
+ quadratic_coefs):
+ OUTPUT = self._OUTPUT
+ nary_sum_str, binary_sum_str, coef_term_str = \
+ self._op_string[EXPR.SumExpressionBase]
+ assert len(quadratic_vars) == len(quadratic_coefs)
+ if len(quadratic_vars) == 1:
+ pass
+ else:
+ if len(quadratic_vars) == 2:
+ OUTPUT.write(binary_sum_str)
+ else:
+ assert len(quadratic_vars) > 2
+ OUTPUT.write(nary_sum_str % (len(quadratic_vars)))
+ # now we need to do a sort to ensure deterministic output
+ # as the compiled quadratic representation does not preserve
+ # any ordering
+ old_quadratic_vars = quadratic_vars
+ old_quadratic_coefs = quadratic_coefs
+ self_varID_map = self._varID_map
+ quadratic_vars = []
+ quadratic_coefs = []
+ for (i, (v1, v2)) in sorted(enumerate(old_quadratic_vars),
+ key=lambda x: (self_varID_map[id(x[1][0])],
+ self_varID_map[id(x[1][1])])):
+ quadratic_coefs.append(old_quadratic_coefs[i])
+ if self_varID_map[id(v1)] <= self_varID_map[id(v2)]:
+ quadratic_vars.append((v1,v2))
+ else:
+ quadratic_vars.append((v2,v1))
+ for i in range(len(quadratic_vars)):
+ coef = quadratic_coefs[i]
+ v1, v2 = quadratic_vars[i]
+ if coef != 1:
+ OUTPUT.write(coef_term_str % (coef))
+ self._print_quad_term(v1, v2)
+
def _print_nonlinear_terms_NL(self, exp):
OUTPUT = self._OUTPUT
exp_type = type(exp)
@@ -411,7 +470,7 @@ def _print_nonlinear_terms_NL(self, exp):
# be a list of tuples where [0] is the coeff and [1] is
# the expr to write
nary_sum_str, binary_sum_str, coef_term_str = \
- self._op_string[expr._SumExpression]
+ self._op_string[EXPR.SumExpressionBase]
n = len(exp)
if n > 2:
OUTPUT.write(nary_sum_str % (n))
@@ -437,143 +496,71 @@ def _print_nonlinear_terms_NL(self, exp):
OUTPUT.write(self._op_string[NumericConstant]
% (exp))
- elif exp.is_expression():
- if _using_pyomo4_trees and (exp_type is expr._LinearExpression):
+ elif exp.is_expression_type():
+ #
+ # Identify NPV expressions
+ #
+ if not exp.is_potentially_variable():
+ OUTPUT.write(self._op_string[NumericConstant] % (value(exp)))
+ #
+ # We are assuming that _Constant_* expression objects
+ # have been preprocessed to form constant values.
+ #
+ elif exp.__class__ is EXPR.SumExpression:
nary_sum_str, binary_sum_str, coef_term_str = \
- self._op_string[expr._LinearExpression]
- n = len(exp._args)
- if n > 2:
- OUTPUT.write(nary_sum_str % (n))
- if exp._const != 0:
- OUTPUT.write(binary_sum_str)
- OUTPUT.write(self._op_string[NumericConstant]
- % (exp._const))
- for child_exp in exp._args:
- child_coef = exp._coef[id(child_exp)]
- if child_coef != 1:
- OUTPUT.write(coef_term_str % (value(child_coef)))
- self._print_nonlinear_terms_NL(child_exp)
+ self._op_string[EXPR.SumExpressionBase]
+ n = exp.nargs()
+ const = 0
+ vargs = []
+ for v in exp.args:
+ if v.__class__ in native_numeric_types:
+ const += v
+ else:
+ vargs.append(v)
+ if not isclose(const, 0.0):
+ vargs.append(const)
+ n = len(vargs)
+ if n == 2:
+ OUTPUT.write(binary_sum_str)
+ self._print_nonlinear_terms_NL(vargs[0])
+ self._print_nonlinear_terms_NL(vargs[1])
else:
- assert n > 0
- if exp._const != 0:
- OUTPUT.write(binary_sum_str)
- OUTPUT.write(self._op_string[NumericConstant]
- % (exp._const))
- for i in xrange(n-1):
- OUTPUT.write(binary_sum_str)
- child_exp = exp._args[i]
- child_coef = exp._coef[id(child_exp)]
- if child_coef != 1:
- OUTPUT.write(coef_term_str % (value(child_coef)))
- self._print_nonlinear_terms_NL(child_exp)
- child_exp = exp._args[n-1]
- child_coef = exp._coef[id(child_exp)]
- if child_coef != 1:
- OUTPUT.write(coef_term_str % (value(child_coef)))
- self._print_nonlinear_terms_NL(child_exp)
-
- elif _using_pyomo4_trees and (exp_type is expr._SumExpression):
- nary_sum_str, binary_sum_str, coef_term_str = \
- self._op_string[expr._SumExpression]
- n = len(exp._args)
- if n > 2:
OUTPUT.write(nary_sum_str % (n))
- for child_exp in exp._args:
+ for child_exp in vargs:
self._print_nonlinear_terms_NL(child_exp)
- else:
- for i in xrange(0,n-1):
- OUTPUT.write(binary_sum_str)
- self._print_nonlinear_terms_NL(exp._args[i])
- self._print_nonlinear_terms_NL(exp._args[n-1])
- elif exp_type is expr._SumExpression:
- assert not _using_pyomo4_trees
+ elif exp_type is EXPR.SumExpressionBase:
nary_sum_str, binary_sum_str, coef_term_str = \
- self._op_string[expr._SumExpression]
- n = len(exp._args)
- if n > 2:
- OUTPUT.write(nary_sum_str % (n))
- if exp._const != 0:
- OUTPUT.write(binary_sum_str)
- OUTPUT.write(self._op_string[NumericConstant]
- % (exp._const))
- for i in xrange(0,n):
- if exp._coef[i] != 1:
- OUTPUT.write(coef_term_str % (exp._coef[i]))
- self._print_nonlinear_terms_NL(exp._args[i])
- else:
- if exp._const != 0:
- OUTPUT.write(binary_sum_str)
- OUTPUT.write(self._op_string[NumericConstant]
- % (exp._const))
- for i in xrange(0,n-1):
- OUTPUT.write(binary_sum_str)
- if exp._coef[i] != 1:
- OUTPUT.write(coef_term_str % (exp._coef[i]))
- self._print_nonlinear_terms_NL(exp._args[i])
- if exp._coef[n-1] != 1:
- OUTPUT.write(coef_term_str % (exp._coef[n-1]))
- self._print_nonlinear_terms_NL(exp._args[n-1])
-
- elif (not _using_pyomo4_trees) and \
- (exp_type is expr._ProductExpression):
- denom_exists = False
- prod_str, div_str = self._op_string[expr._ProductExpression]
- if len(exp._denominator) == 0:
- pass
- else:
- OUTPUT.write(div_str)
- denom_exists = True
- if exp._coef != 1:
- OUTPUT.write(prod_str)
- OUTPUT.write(self._op_string[NumericConstant]
- % (exp._coef))
- if len(exp._numerator) == 0:
- OUTPUT.write("n1\n")
- # print out the numerator
- child_counter = 0
- max_count = len(exp._numerator)-1
- for child_exp in exp._numerator:
- if child_counter < max_count:
- OUTPUT.write(prod_str)
- self._print_nonlinear_terms_NL(child_exp)
- child_counter += 1
- if denom_exists:
- # print out the denominator
- child_counter = 0
- max_count = len(exp._denominator)-1
- for child_exp in exp._denominator:
- if child_counter < max_count:
- OUTPUT.write(prod_str)
- self._print_nonlinear_terms_NL(child_exp)
- child_counter += 1
-
- elif _using_pyomo4_trees and (exp_type is expr._ProductExpression):
- prod_str = self._op_string[expr._ProductExpression]
- child_counter = 0
- max_count = len(exp._args)-1
- for child_exp in exp._args:
- if child_counter < max_count:
- OUTPUT.write(prod_str)
- self._print_nonlinear_terms_NL(child_exp)
- child_counter += 1
-
- elif _using_pyomo4_trees and (exp_type is expr._DivisionExpression):
- div_str = self._op_string[expr._DivisionExpression]
- child_counter = 0
- max_count = len(exp._args)-1
- for child_exp in exp._args:
- if child_counter < max_count:
- OUTPUT.write(div_str)
- self._print_nonlinear_terms_NL(child_exp)
- child_counter += 1
-
- elif _using_pyomo4_trees and (exp_type is expr._NegationExpression):
- assert len(exp._args) == 1
- OUTPUT.write(self._op_string[expr._NegationExpression])
- self._print_nonlinear_terms_NL(exp._args[0])
-
- elif exp_type is expr._ExternalFunctionExpression:
+ self._op_string[EXPR.SumExpressionBase]
+ OUTPUT.write(binary_sum_str)
+ self._print_nonlinear_terms_NL(exp.arg(0))
+ self._print_nonlinear_terms_NL(exp.arg(1))
+
+ elif exp_type is EXPR.MonomialTermExpression:
+ prod_str = self._op_string[EXPR.ProductExpression]
+ OUTPUT.write(prod_str)
+ self._print_nonlinear_terms_NL(value(exp.arg(0)))
+ self._print_nonlinear_terms_NL(exp.arg(1))
+
+ elif exp_type is EXPR.ProductExpression:
+ prod_str = self._op_string[EXPR.ProductExpression]
+ OUTPUT.write(prod_str)
+ self._print_nonlinear_terms_NL(exp.arg(0))
+ self._print_nonlinear_terms_NL(exp.arg(1))
+
+ elif exp_type is EXPR.ReciprocalExpression:
+ assert exp.nargs() == 1
+ div_str = self._op_string[EXPR.ReciprocalExpression]
+ OUTPUT.write(div_str)
+ self._print_nonlinear_terms_NL(1.0)
+ self._print_nonlinear_terms_NL(exp.arg(0))
+
+ elif exp_type is EXPR.NegationExpression:
+ assert exp.nargs() == 1
+ OUTPUT.write(self._op_string[EXPR.NegationExpression])
+ self._print_nonlinear_terms_NL(exp.arg(0))
+
+ elif exp_type is EXPR.ExternalFunctionExpression:
# We have found models where external functions with
# strictly fixed/constant arguments causes AMPL to
# SEGFAULT. To be safe, we will collapse fixed
@@ -584,72 +571,88 @@ def _print_nonlinear_terms_NL(self, exp):
self._print_nonlinear_terms_NL(exp())
return
fun_str, string_arg_str = \
- self._op_string[expr._ExternalFunctionExpression]
+ self._op_string[EXPR.ExternalFunctionExpression]
if not self._symbolic_solver_labels:
OUTPUT.write(fun_str
% (self.external_byFcn[exp._fcn._function][1],
- len(exp._args)))
+ exp.nargs()))
else:
# Note: exp.name fails
OUTPUT.write(fun_str
% (self.external_byFcn[exp._fcn._function][1],
- len(exp._args),
+ exp.nargs(),
exp.name))
- for arg in exp._args:
+ for arg in exp.args:
if isinstance(arg, basestring):
OUTPUT.write(string_arg_str % (len(arg), arg))
elif arg.is_fixed():
self._print_nonlinear_terms_NL(arg())
else:
self._print_nonlinear_terms_NL(arg)
- elif (exp_type is expr._PowExpression) or \
- isinstance(exp, expr._IntrinsicFunctionExpression):
+
+ elif exp_type is EXPR.PowExpression:
+ intr_expr_str = self._op_string['pow']
+ OUTPUT.write(intr_expr_str)
+ self._print_nonlinear_terms_NL(exp.arg(0))
+ self._print_nonlinear_terms_NL(exp.arg(1))
+
+ elif isinstance(exp, EXPR.UnaryFunctionExpression):
+ assert exp.nargs() == 1
intr_expr_str = self._op_string.get(exp.name)
if intr_expr_str is not None:
OUTPUT.write(intr_expr_str)
else:
- logger.error("Unsupported intrinsic function ({0})",
- exp.name)
+ logger.error("Unsupported unary function ({0})".format(exp.name))
raise TypeError("ASL writer does not support '%s' expressions"
% (exp.name))
+ self._print_nonlinear_terms_NL(exp.arg(0))
- for child_exp in exp._args:
- self._print_nonlinear_terms_NL(child_exp)
- elif exp_type is expr.Expr_if:
- OUTPUT.write(self._op_string[expr.Expr_if])
+ elif exp_type is EXPR.Expr_ifExpression:
+ OUTPUT.write(self._op_string[EXPR.Expr_ifExpression])
self._print_nonlinear_terms_NL(exp._if)
self._print_nonlinear_terms_NL(exp._then)
self._print_nonlinear_terms_NL(exp._else)
- elif exp_type is expr._InequalityExpression:
+
+ elif exp_type is EXPR.InequalityExpression:
+ and_str, lt_str, le_str = \
+ self._op_string[EXPR.InequalityExpression]
+ left = exp.arg(0)
+ right = exp.arg(1)
+ if exp._strict:
+ OUTPUT.write(lt_str)
+ else:
+ OUTPUT.write(le_str)
+ self._print_nonlinear_terms_NL(left)
+ self._print_nonlinear_terms_NL(right)
+
+ elif exp_type is EXPR.RangedExpression:
and_str, lt_str, le_str = \
- self._op_string[expr._InequalityExpression]
- len_args = len(exp._args)
- assert len_args in [2,3]
- left = exp._args[0]
- middle = exp._args[1]
- right = None
- if len_args == 3:
- right = exp._args[2]
- OUTPUT.write(and_str)
+ self._op_string[EXPR.InequalityExpression]
+ left = exp.arg(0)
+ middle = exp.arg(1)
+ right = exp.arg(2)
+ OUTPUT.write(and_str)
if exp._strict[0]:
OUTPUT.write(lt_str)
else:
OUTPUT.write(le_str)
self._print_nonlinear_terms_NL(left)
self._print_nonlinear_terms_NL(middle)
- if not right is None:
- if exp._strict[1]:
- OUTPUT.write(lt_str)
- else:
- OUTPUT.write(le_str)
- self._print_nonlinear_terms_NL(middle)
- self._print_nonlinear_terms_NL(right)
- elif exp_type is expr._EqualityExpression:
- OUTPUT.write(self._op_string[expr._EqualityExpression])
- self._print_nonlinear_terms_NL(exp._args[0])
- self._print_nonlinear_terms_NL(exp._args[1])
+ if exp._strict[1]:
+ OUTPUT.write(lt_str)
+ else:
+ OUTPUT.write(le_str)
+ self._print_nonlinear_terms_NL(middle)
+ self._print_nonlinear_terms_NL(right)
+
+ elif exp_type is EXPR.EqualityExpression:
+ OUTPUT.write(self._op_string[EXPR.EqualityExpression])
+ self._print_nonlinear_terms_NL(exp.arg(0))
+ self._print_nonlinear_terms_NL(exp.arg(1))
+
elif isinstance(exp, (_ExpressionData, IIdentityExpression)):
self._print_nonlinear_terms_NL(exp.expr)
+
else:
raise ValueError(
"Unsupported expression type (%s) in _print_nonlinear_terms_NL"
@@ -665,12 +668,15 @@ def _print_nonlinear_terms_NL(self, exp):
OUTPUT.write(self._op_string[var._VarData]
% (self.ampl_var_id[self._varID_map[id(exp)]],
self._name_labeler(exp)))
+
elif isinstance(exp,param._ParamData):
OUTPUT.write(self._op_string[param._ParamData]
% (value(exp)))
+
elif isinstance(exp,NumericConstant) or exp.is_fixed():
OUTPUT.write(self._op_string[NumericConstant]
% (value(exp)))
+
else:
raise ValueError(
"Unsupported expression type (%s) in _print_nonlinear_terms_NL"
@@ -824,7 +830,7 @@ def _print_model_NL(self, model,
trivial_labeler = _Counter(cntr)
#
- # Count number of objectives and build the ampl_repns
+ # Count number of objectives and build the repns
#
n_objs = 0
n_nonlinear_objs = 0
@@ -833,13 +839,13 @@ def _print_model_NL(self, model,
ObjNonlinearVarsInt = set()
for block in all_blocks_list:
- gen_obj_ampl_repn = \
- getattr(block, "_gen_obj_ampl_repn", True)
+ gen_obj_repn = \
+ getattr(block, "_gen_obj_repn", True)
# Get/Create the ComponentMap for the repn
- if not hasattr(block,'_ampl_repn'):
- block._ampl_repn = ComponentMap()
- block_ampl_repn = block._ampl_repn
+ if not hasattr(block,'_repn'):
+ block._repn = ComponentMap()
+ block_repn = block._repn
for active_objective in block.component_data_objects(Objective,
active=True,
@@ -850,36 +856,56 @@ def _print_model_NL(self, model,
if len(objname) > max_rowname_len:
max_rowname_len = len(objname)
- if gen_obj_ampl_repn:
- ampl_repn = generate_ampl_repn(active_objective.expr)
- block_ampl_repn[active_objective] = ampl_repn
+ if gen_obj_repn:
+ repn = generate_standard_repn(active_objective.expr,
+ quadratic=False)
+ block_repn[active_objective] = repn
+ linear_vars = repn.linear_vars
+ nonlinear_vars = repn.nonlinear_vars
else:
- ampl_repn = block_ampl_repn[active_objective]
+ repn = block_repn[active_objective]
+ linear_vars = repn.linear_vars
+ # By default, the NL writer generates
+ # StandardRepn objects without the more
+ # expense quadratic processing, but
+ # there is no guarantee of this if we
+ # are using a cached repn object, so we
+ # must check for the quadratic form.
+ if repn.is_nonlinear() and (repn.nonlinear_expr is None):
+ assert repn.is_quadratic()
+ assert len(repn.quadratic_vars) > 0
+ nonlinear_vars = {}
+ for v1, v2 in repn.quadratic_vars:
+ nonlinear_vars[id(v1)] = v1
+ nonlinear_vars[id(v2)] = v2
+ nonlinear_vars = nonlinear_vars.values()
+ else:
+ nonlinear_vars = repn.nonlinear_vars
try:
- wrapped_ampl_repn = RepnWrapper(
- ampl_repn,
- list(self_varID_map[id(var)] for var in ampl_repn._linear_vars),
- list(self_varID_map[id(var)] for var in ampl_repn._nonlinear_vars))
+ wrapped_repn = RepnWrapper(
+ repn,
+ list(self_varID_map[id(var)] for var in linear_vars),
+ list(self_varID_map[id(var)] for var in nonlinear_vars))
except KeyError as err:
self._symbolMapKeyError(err, model, self_varID_map,
- ampl_repn._linear_vars +
- ampl_repn._nonlinear_vars)
+ list(linear_vars) +
+ list(nonlinear_vars))
raise
- LinearVars.update(wrapped_ampl_repn._linear_vars)
- ObjNonlinearVars.update(wrapped_ampl_repn._nonlinear_vars)
+ LinearVars.update(wrapped_repn.linear_vars)
+ ObjNonlinearVars.update(wrapped_repn.nonlinear_vars)
- ObjVars.update(wrapped_ampl_repn._linear_vars)
- ObjVars.update(wrapped_ampl_repn._nonlinear_vars)
+ ObjVars.update(wrapped_repn.linear_vars)
+ ObjVars.update(wrapped_repn.nonlinear_vars)
obj_ID = trivial_labeler(active_objective)
- Objectives_dict[obj_ID] = (active_objective, wrapped_ampl_repn)
+ Objectives_dict[obj_ID] = (active_objective, wrapped_repn)
self_ampl_obj_id[obj_ID] = n_objs
symbol_map.addSymbols([(active_objective, "o%d"%n_objs)])
n_objs += 1
- if ampl_repn.is_nonlinear():
+ if repn.is_nonlinear():
n_nonlinear_objs += 1
# I don't think this is necessarily true for the entire code base,
@@ -898,7 +924,7 @@ def _print_model_NL(self, model,
subsection_timer.reset()
#
- # Count number of constraints and build the ampl_repns
+ # Count number of constraints and build the repns
#
n_ranges = 0
n_single_sided_ineq = 0
@@ -919,13 +945,13 @@ def _print_model_NL(self, model,
for block in all_blocks_list:
all_repns = list()
- gen_con_ampl_repn = \
- getattr(block, "_gen_con_ampl_repn", True)
+ gen_con_repn = \
+ getattr(block, "_gen_con_repn", True)
# Get/Create the ComponentMap for the repn
- if not hasattr(block,'_ampl_repn'):
- block._ampl_repn = ComponentMap()
- block_ampl_repn = block._ampl_repn
+ if not hasattr(block,'_repn'):
+ block._repn = ComponentMap()
+ block_repn = block._repn
# Initializing the constraint dictionary
for constraint_data in block.component_data_objects(Constraint,
@@ -933,71 +959,81 @@ def _print_model_NL(self, model,
sort=sorter,
descend_into=False):
+ if (not constraint_data.has_lb()) and \
+ (not constraint_data.has_ub()):
+ assert not constraint_data.equality
+ continue # non-binding, so skip
+
if symbolic_solver_labels:
conname = name_labeler(constraint_data)
if len(conname) > max_rowname_len:
max_rowname_len = len(conname)
if constraint_data._linear_canonical_form:
- canonical_repn = constraint_data.canonical_form()
- ampl_repn = AmplRepn()
- ampl_repn._nonlinear_vars = tuple()
- ampl_repn._linear_vars = canonical_repn.variables
- ampl_repn._linear_terms_coef = canonical_repn.linear
- ampl_repn._constant = canonical_repn.constant
- elif isinstance(constraint_data, LinearCanonicalRepn):
- canonical_repn = constraint_data
- ampl_repn = AmplRepn()
- ampl_repn._nonlinear_vars = tuple()
- ampl_repn._linear_vars = canonical_repn.variables
- ampl_repn._linear_terms_coef = canonical_repn.linear
- ampl_repn._constant = canonical_repn.constant
+ repn = constraint_data.canonical_form()
+ linear_vars = repn.linear_vars
+ nonlinear_vars = repn.nonlinear_vars
else:
- if gen_con_ampl_repn:
- ampl_repn = generate_ampl_repn(constraint_data.body)
- block_ampl_repn[constraint_data] = ampl_repn
+ if gen_con_repn:
+ repn = generate_standard_repn(constraint_data.body,
+ quadratic=False)
+ block_repn[constraint_data] = repn
+ linear_vars = repn.linear_vars
+ nonlinear_vars = repn.nonlinear_vars
else:
- ampl_repn = block_ampl_repn[constraint_data]
-
- if (not constraint_data.has_lb()) and \
- (not constraint_data.has_ub()):
- assert not constraint_data.equality
- continue # non-binding, so skip
+ repn = block_repn[constraint_data]
+ linear_vars = repn.linear_vars
+ # By default, the NL writer generates
+ # StandardRepn objects without the more
+ # expense quadratic processing, but
+ # there is no guarantee of this if we
+ # are using a cached repn object, so we
+ # must check for the quadratic form.
+ if repn.is_nonlinear() and (repn.nonlinear_expr is None):
+ assert repn.is_quadratic()
+ assert len(repn.quadratic_vars) > 0
+ nonlinear_vars = {}
+ for v1, v2 in repn.quadratic_vars:
+ nonlinear_vars[id(v1)] = v1
+ nonlinear_vars[id(v2)] = v2
+ nonlinear_vars = nonlinear_vars.values()
+ else:
+ nonlinear_vars = repn.nonlinear_vars
### GAH: Even if this is fixed, it is still useful to
### write out these types of constraints
### (trivial) as a feasibility check for fixed
### variables, in which case the solver will pick
### up on the model infeasibility.
- if skip_trivial_constraints and ampl_repn.is_fixed():
+ if skip_trivial_constraints and repn.is_fixed():
continue
con_ID = trivial_labeler(constraint_data)
try:
- wrapped_ampl_repn = RepnWrapper(
- ampl_repn,
- list(self_varID_map[id(var)] for var in ampl_repn._linear_vars),
- list(self_varID_map[id(var)] for var in ampl_repn._nonlinear_vars))
+ wrapped_repn = RepnWrapper(
+ repn,
+ list(self_varID_map[id(var)] for var in linear_vars),
+ list(self_varID_map[id(var)] for var in nonlinear_vars))
except KeyError as err:
self._symbolMapKeyError(err, model, self_varID_map,
- ampl_repn._linear_vars +
- ampl_repn._nonlinear_vars)
+ list(linear_vars) +
+ list(nonlinear_vars))
raise
- if ampl_repn.is_nonlinear():
+ if repn.is_nonlinear():
nonlin_con_order_list.append(con_ID)
n_nonlinear_constraints += 1
else:
lin_con_order_list.append(con_ID)
- Constraints_dict[con_ID] = (constraint_data, wrapped_ampl_repn)
+ Constraints_dict[con_ID] = (constraint_data, wrapped_repn)
- LinearVars.update(wrapped_ampl_repn._linear_vars)
- ConNonlinearVars.update(wrapped_ampl_repn._nonlinear_vars)
+ LinearVars.update(wrapped_repn.linear_vars)
+ ConNonlinearVars.update(wrapped_repn.nonlinear_vars)
nnz_grad_constraints += \
- len(set(wrapped_ampl_repn._linear_vars).union(
- wrapped_ampl_repn._nonlinear_vars))
+ len(set(wrapped_repn.linear_vars).union(
+ wrapped_repn.nonlinear_vars))
L = None
U = None
@@ -1012,7 +1048,7 @@ def _print_model_NL(self, model,
if constraint_data.equality:
assert L == U
- offset = ampl_repn._constant
+ offset = repn.constant
_type = getattr(constraint_data, '_complementarity', None)
_vid = getattr(constraint_data, '_vid', None)
if not _type is None:
@@ -1025,7 +1061,7 @@ def _print_model_NL(self, model,
n_ranges += 1
elif _type == 4:
n_unbounded += 1
- if ampl_repn.is_nonlinear():
+ if repn.is_nonlinear():
ccons_nonlin += 1
else:
ccons_lin += 1
@@ -1545,7 +1581,7 @@ def _print_model_NL(self, model,
cu = [0 for i in xrange(len(full_var_list))]
for con_ID in nonlin_con_order_list:
- con_data, wrapped_ampl_repn = Constraints_dict[con_ID]
+ con_data, wrapped_repn = Constraints_dict[con_ID]
row_id = self_ampl_con_id[con_ID]
OUTPUT.write("C%d" % (row_id))
if symbolic_solver_labels:
@@ -1553,16 +1589,25 @@ def _print_model_NL(self, model,
OUTPUT.write("\t#%s" % (lbl))
rowf.write(lbl+"\n")
OUTPUT.write("\n")
- self._print_nonlinear_terms_NL(wrapped_ampl_repn.repn._nonlinear_expr)
- for var_ID in set(wrapped_ampl_repn._linear_vars).union(
- wrapped_ampl_repn._nonlinear_vars):
+ if wrapped_repn.repn.nonlinear_expr is not None:
+ assert not wrapped_repn.repn.is_quadratic()
+ self._print_nonlinear_terms_NL(
+ wrapped_repn.repn.nonlinear_expr)
+ else:
+ assert wrapped_repn.repn.is_quadratic()
+ self._print_standard_quadratic_NL(
+ wrapped_repn.repn.quadratic_vars,
+ wrapped_repn.repn.quadratic_coefs)
+
+ for var_ID in set(wrapped_repn.linear_vars).union(
+ wrapped_repn.nonlinear_vars):
cu[self_ampl_var_id[var_ID]] += 1
for con_ID in lin_con_order_list:
- con_data, wrapped_ampl_repn = Constraints_dict[con_ID]
+ con_data, wrapped_repn = Constraints_dict[con_ID]
row_id = self_ampl_con_id[con_ID]
- con_vars = set(wrapped_ampl_repn._linear_vars)
+ con_vars = set(wrapped_repn.linear_vars)
for var_ID in con_vars:
cu[self_ampl_var_id[var_ID]] += 1
OUTPUT.write("C%d" % (row_id))
@@ -1580,7 +1625,7 @@ def _print_model_NL(self, model,
#
# "O" lines
#
- for obj_ID, (obj, wrapped_ampl_repn) in iteritems(Objectives_dict):
+ for obj_ID, (obj, wrapped_repn) in iteritems(Objectives_dict):
k = 0
if not obj.is_minimizing():
@@ -1593,16 +1638,24 @@ def _print_model_NL(self, model,
rowf.write(lbl+"\n")
OUTPUT.write("\n")
- if wrapped_ampl_repn.repn.is_linear():
+ if wrapped_repn.repn.is_linear():
OUTPUT.write(self._op_string[NumericConstant]
- % (wrapped_ampl_repn.repn._constant))
+ % (wrapped_repn.repn.constant))
else:
- if wrapped_ampl_repn.repn._constant != 0:
- _, binary_sum_str, _ = self._op_string[expr._SumExpression]
+ if wrapped_repn.repn.constant != 0:
+ _, binary_sum_str, _ = self._op_string[EXPR.SumExpressionBase]
OUTPUT.write(binary_sum_str)
OUTPUT.write(self._op_string[NumericConstant]
- % (wrapped_ampl_repn.repn._constant))
- self._print_nonlinear_terms_NL(wrapped_ampl_repn.repn._nonlinear_expr)
+ % (wrapped_repn.repn.constant))
+ if wrapped_repn.repn.nonlinear_expr is not None:
+ assert not wrapped_repn.repn.is_quadratic()
+ self._print_nonlinear_terms_NL(
+ wrapped_repn.repn.nonlinear_expr)
+ else:
+ assert wrapped_repn.repn.is_quadratic()
+ self._print_standard_quadratic_NL(
+ wrapped_repn.repn.quadratic_vars,
+ wrapped_repn.repn.quadratic_coefs)
if symbolic_solver_labels:
rowf.close()
@@ -1750,37 +1803,37 @@ def _print_model_NL(self, model,
#
for nc, con_ID in enumerate(itertools.chain(nonlin_con_order_list,
lin_con_order_list)):
- con_data, wrapped_ampl_repn = Constraints_dict[con_ID]
- num_nonlinear_vars = len(wrapped_ampl_repn._nonlinear_vars)
- num_linear_vars = len(wrapped_ampl_repn._linear_vars)
- if num_nonlinear_vars == 0:
- if num_linear_vars > 0:
+ con_data, wrapped_repn = Constraints_dict[con_ID]
+ numnonlinear_vars = len(wrapped_repn.nonlinear_vars)
+ numlinear_vars = len(wrapped_repn.linear_vars)
+ if numnonlinear_vars == 0:
+ if numlinear_vars > 0:
linear_dict = dict((var_ID, coef)
for var_ID, coef in
- zip(wrapped_ampl_repn._linear_vars,
- wrapped_ampl_repn.repn._linear_terms_coef))
- OUTPUT.write("J%d %d\n"%(nc, num_linear_vars))
+ zip(wrapped_repn.linear_vars,
+ wrapped_repn.repn.linear_coefs))
+ OUTPUT.write("J%d %d\n"%(nc, numlinear_vars))
OUTPUT.writelines(
"%d %r\n" % (self_ampl_var_id[con_var],
linear_dict[con_var])
for con_var in sorted(linear_dict.keys()))
- elif num_linear_vars == 0:
+ elif numlinear_vars == 0:
nl_con_vars = \
- sorted(wrapped_ampl_repn._nonlinear_vars)
- OUTPUT.write("J%d %d\n"%(nc, num_nonlinear_vars))
+ sorted(wrapped_repn.nonlinear_vars)
+ OUTPUT.write("J%d %d\n"%(nc, numnonlinear_vars))
OUTPUT.writelines(
"%d 0\n"%(self_ampl_var_id[con_var])
for con_var in nl_con_vars)
else:
- con_vars = set(wrapped_ampl_repn._nonlinear_vars)
+ con_vars = set(wrapped_repn.nonlinear_vars)
nl_con_vars = sorted(
con_vars.difference(
- wrapped_ampl_repn._linear_vars))
- con_vars.update(wrapped_ampl_repn._linear_vars)
+ wrapped_repn.linear_vars))
+ con_vars.update(wrapped_repn.linear_vars)
linear_dict = dict(
(var_ID, coef) for var_ID, coef in
- zip(wrapped_ampl_repn._linear_vars,
- wrapped_ampl_repn.repn._linear_terms_coef))
+ zip(wrapped_repn.linear_vars,
+ wrapped_repn.repn.linear_coefs))
OUTPUT.write("J%d %d\n"%(nc, len(con_vars)))
OUTPUT.writelines(
"%d %r\n" % (self_ampl_var_id[con_var],
@@ -1798,16 +1851,16 @@ def _print_model_NL(self, model,
#
# "G" lines
#
- for obj_ID, (obj, wrapped_ampl_repn) in \
+ for obj_ID, (obj, wrapped_repn) in \
iteritems(Objectives_dict):
grad_entries = {}
for idx, obj_var in enumerate(
- wrapped_ampl_repn._linear_vars):
+ wrapped_repn.linear_vars):
grad_entries[self_ampl_var_id[obj_var]] = \
- wrapped_ampl_repn.repn._linear_terms_coef[idx]
- for obj_var in wrapped_ampl_repn._nonlinear_vars:
- if obj_var not in wrapped_ampl_repn._linear_vars:
+ wrapped_repn.repn.linear_coefs[idx]
+ for obj_var in wrapped_repn.nonlinear_vars:
+ if obj_var not in wrapped_repn.linear_vars:
grad_entries[self_ampl_var_id[obj_var]] = 0
len_ge = len(grad_entries)
if len_ge > 0:
@@ -1861,15 +1914,3 @@ def _symbolMapKeyError(self, err, model, map, vars):
for e in _errors:
logger.error(e)
err.args = err.args + tuple(_errors)
-
-
-# Switch from Python to C generate_ampl_repn function when possible
-#try:
-# py_generate_ampl_repn = generate_ampl_repn
-# from cAmpl import generate_ampl_repn
-#except ImportError:
-# del py_generate_ampl_repn
-
-# Alternative: import C implementation under another name for testing
-#from cAmpl import generate_ampl_repn as cgar
-#__all__.append('cgar')
diff --git a/pyomo/repn/plugins/ampl/cAmpl/Doxyfile b/pyomo/repn/plugins/ampl/cAmpl/Doxyfile
deleted file mode 100644
index fcaba283c52..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/Doxyfile
+++ /dev/null
@@ -1,1519 +0,0 @@
-# Doxyfile 1.6.1
-
-# This file describes the settings to be used by the documentation system
-# doxygen (www.doxygen.org) for a project
-#
-# All text after a hash (#) is considered a comment and will be ignored
-# The format is:
-# TAG = value [value, ...]
-# For lists items can also be appended using:
-# TAG += value [value, ...]
-# Values that contain spaces should be placed between quotes (" ")
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-
-# This tag specifies the encoding used for all characters in the config file
-# that follow. The default is UTF-8 which is also the encoding used for all
-# text before the first occurrence of this tag. Doxygen uses libiconv (or the
-# iconv built into libc) for the transcoding. See
-# http://www.gnu.org/software/libiconv for the list of possible encodings.
-
-DOXYFILE_ENCODING = UTF-8
-
-# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
-# by quotes) that should identify the project.
-
-PROJECT_NAME = cAmpl
-
-# The PROJECT_NUMBER tag can be used to enter a project or revision number.
-# This could be handy for archiving the generated documentation or
-# if some version control system is used.
-
-PROJECT_NUMBER =
-
-# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
-# base path where the generated documentation will be put.
-# If a relative path is entered, it will be relative to the location
-# where doxygen was started. If left blank the current directory will be used.
-
-OUTPUT_DIRECTORY =
-
-# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
-# 4096 sub-directories (in 2 levels) under the output directory of each output
-# format and will distribute the generated files over these directories.
-# Enabling this option can be useful when feeding doxygen a huge amount of
-# source files, where putting all generated files in the same directory would
-# otherwise cause performance problems for the file system.
-
-CREATE_SUBDIRS = NO
-
-# The OUTPUT_LANGUAGE tag is used to specify the language in which all
-# documentation generated by doxygen is written. Doxygen will use this
-# information to generate all constant output in the proper language.
-# The default language is English, other supported languages are:
-# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
-# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
-# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
-# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
-# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
-# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
-
-OUTPUT_LANGUAGE = English
-
-# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
-# include brief member descriptions after the members that are listed in
-# the file and class documentation (similar to JavaDoc).
-# Set to NO to disable this.
-
-BRIEF_MEMBER_DESC = YES
-
-# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
-# the brief description of a member or function before the detailed description.
-# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
-# brief descriptions will be completely suppressed.
-
-REPEAT_BRIEF = YES
-
-# This tag implements a quasi-intelligent brief description abbreviator
-# that is used to form the text in various listings. Each string
-# in this list, if found as the leading text of the brief description, will be
-# stripped from the text and the result after processing the whole list, is
-# used as the annotated text. Otherwise, the brief description is used as-is.
-# If left blank, the following values are used ("$name" is automatically
-# replaced with the name of the entity): "The $name class" "The $name widget"
-# "The $name file" "is" "provides" "specifies" "contains"
-# "represents" "a" "an" "the"
-
-ABBREVIATE_BRIEF =
-
-# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
-# Doxygen will generate a detailed section even if there is only a brief
-# description.
-
-ALWAYS_DETAILED_SEC = NO
-
-# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
-# inherited members of a class in the documentation of that class as if those
-# members were ordinary class members. Constructors, destructors and assignment
-# operators of the base classes will not be shown.
-
-INLINE_INHERITED_MEMB = NO
-
-# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
-# path before files name in the file list and in the header files. If set
-# to NO the shortest path that makes the file name unique will be used.
-
-FULL_PATH_NAMES = YES
-
-# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
-# can be used to strip a user-defined part of the path. Stripping is
-# only done if one of the specified strings matches the left-hand part of
-# the path. The tag can be used to show relative paths in the file list.
-# If left blank the directory from which doxygen is run is used as the
-# path to strip.
-
-STRIP_FROM_PATH =
-
-# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
-# the path mentioned in the documentation of a class, which tells
-# the reader which header file to include in order to use a class.
-# If left blank only the name of the header file containing the class
-# definition is used. Otherwise one should specify the include paths that
-# are normally passed to the compiler using the -I flag.
-
-STRIP_FROM_INC_PATH =
-
-# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
-# (but less readable) file names. This can be useful is your file systems
-# doesn't support long names like on DOS, Mac, or CD-ROM.
-
-SHORT_NAMES = NO
-
-# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
-# will interpret the first line (until the first dot) of a JavaDoc-style
-# comment as the brief description. If set to NO, the JavaDoc
-# comments will behave just like regular Qt-style comments
-# (thus requiring an explicit @brief command for a brief description.)
-
-JAVADOC_AUTOBRIEF = YES
-
-# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
-# interpret the first line (until the first dot) of a Qt-style
-# comment as the brief description. If set to NO, the comments
-# will behave just like regular Qt-style comments (thus requiring
-# an explicit \brief command for a brief description.)
-
-QT_AUTOBRIEF = NO
-
-# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
-# treat a multi-line C++ special comment block (i.e. a block of //! or ///
-# comments) as a brief description. This used to be the default behaviour.
-# The new default is to treat a multi-line C++ comment block as a detailed
-# description. Set this tag to YES if you prefer the old behaviour instead.
-
-MULTILINE_CPP_IS_BRIEF = NO
-
-# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
-# member inherits the documentation from any documented member that it
-# re-implements.
-
-INHERIT_DOCS = YES
-
-# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
-# a new page for each member. If set to NO, the documentation of a member will
-# be part of the file/class/namespace that contains it.
-
-SEPARATE_MEMBER_PAGES = NO
-
-# The TAB_SIZE tag can be used to set the number of spaces in a tab.
-# Doxygen uses this value to replace tabs by spaces in code fragments.
-
-TAB_SIZE = 8
-
-# This tag can be used to specify a number of aliases that acts
-# as commands in the documentation. An alias has the form "name=value".
-# For example adding "sideeffect=\par Side Effects:\n" will allow you to
-# put the command \sideeffect (or @sideeffect) in the documentation, which
-# will result in a user-defined paragraph with heading "Side Effects:".
-# You can put \n's in the value part of an alias to insert newlines.
-
-ALIASES =
-
-# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
-# sources only. Doxygen will then generate output that is more tailored for C.
-# For instance, some of the names that are used will be different. The list
-# of all members will be omitted, etc.
-
-OPTIMIZE_OUTPUT_FOR_C = YES
-
-# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
-# sources only. Doxygen will then generate output that is more tailored for
-# Java. For instance, namespaces will be presented as packages, qualified
-# scopes will look different, etc.
-
-OPTIMIZE_OUTPUT_JAVA = NO
-
-# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
-# sources only. Doxygen will then generate output that is more tailored for
-# Fortran.
-
-OPTIMIZE_FOR_FORTRAN = NO
-
-# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
-# sources. Doxygen will then generate output that is tailored for
-# VHDL.
-
-OPTIMIZE_OUTPUT_VHDL = NO
-
-# Doxygen selects the parser to use depending on the extension of the files it parses.
-# With this tag you can assign which parser to use for a given extension.
-# Doxygen has a built-in mapping, but you can override or extend it using this tag.
-# The format is ext=language, where ext is a file extension, and language is one of
-# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
-# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
-# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
-# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
-
-EXTENSION_MAPPING =
-
-# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
-# to include (a tag file for) the STL sources as input, then you should
-# set this tag to YES in order to let doxygen match functions declarations and
-# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
-# func(std::string) {}). This also make the inheritance and collaboration
-# diagrams that involve STL classes more complete and accurate.
-
-BUILTIN_STL_SUPPORT = NO
-
-# If you use Microsoft's C++/CLI language, you should set this option to YES to
-# enable parsing support.
-
-CPP_CLI_SUPPORT = NO
-
-# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
-# Doxygen will parse them like normal C++ but will assume all classes use public
-# instead of private inheritance when no explicit protection keyword is present.
-
-SIP_SUPPORT = NO
-
-# For Microsoft's IDL there are propget and propput attributes to indicate getter
-# and setter methods for a property. Setting this option to YES (the default)
-# will make doxygen to replace the get and set methods by a property in the
-# documentation. This will only work if the methods are indeed getting or
-# setting a simple type. If this is not the case, or you want to show the
-# methods anyway, you should set this option to NO.
-
-IDL_PROPERTY_SUPPORT = YES
-
-# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
-# tag is set to YES, then doxygen will reuse the documentation of the first
-# member in the group (if any) for the other members of the group. By default
-# all members of a group must be documented explicitly.
-
-DISTRIBUTE_GROUP_DOC = NO
-
-# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
-# the same type (for instance a group of public functions) to be put as a
-# subgroup of that type (e.g. under the Public Functions section). Set it to
-# NO to prevent subgrouping. Alternatively, this can be done per class using
-# the \nosubgrouping command.
-
-SUBGROUPING = YES
-
-# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
-# is documented as struct, union, or enum with the name of the typedef. So
-# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
-# with name TypeT. When disabled the typedef will appear as a member of a file,
-# namespace, or class. And the struct will be named TypeS. This can typically
-# be useful for C code in case the coding convention dictates that all compound
-# types are typedef'ed and only the typedef is referenced, never the tag name.
-
-TYPEDEF_HIDES_STRUCT = NO
-
-# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
-# determine which symbols to keep in memory and which to flush to disk.
-# When the cache is full, less often used symbols will be written to disk.
-# For small to medium size projects (<1000 input files) the default value is
-# probably good enough. For larger projects a too small cache size can cause
-# doxygen to be busy swapping symbols to and from disk most of the time
-# causing a significant performance penality.
-# If the system has enough physical memory increasing the cache will improve the
-# performance by keeping more symbols in memory. Note that the value works on
-# a logarithmic scale so increasing the size by one will rougly double the
-# memory usage. The cache size is given by this formula:
-# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
-# corresponding to a cache size of 2^16 = 65536 symbols
-
-SYMBOL_CACHE_SIZE = 0
-
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-
-# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
-# documentation are documented, even if no documentation was available.
-# Private class members and static file members will be hidden unless
-# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
-
-EXTRACT_ALL = YES
-
-# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
-# will be included in the documentation.
-
-EXTRACT_PRIVATE = NO
-
-# If the EXTRACT_STATIC tag is set to YES all static members of a file
-# will be included in the documentation.
-
-EXTRACT_STATIC = YES
-
-# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
-# defined locally in source files will be included in the documentation.
-# If set to NO only classes defined in header files are included.
-
-EXTRACT_LOCAL_CLASSES = YES
-
-# This flag is only useful for Objective-C code. When set to YES local
-# methods, which are defined in the implementation section but not in
-# the interface are included in the documentation.
-# If set to NO (the default) only methods in the interface are included.
-
-EXTRACT_LOCAL_METHODS = NO
-
-# If this flag is set to YES, the members of anonymous namespaces will be
-# extracted and appear in the documentation as a namespace called
-# 'anonymous_namespace{file}', where file will be replaced with the base
-# name of the file that contains the anonymous namespace. By default
-# anonymous namespace are hidden.
-
-EXTRACT_ANON_NSPACES = NO
-
-# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
-# undocumented members of documented classes, files or namespaces.
-# If set to NO (the default) these members will be included in the
-# various overviews, but no documentation section is generated.
-# This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_MEMBERS = NO
-
-# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
-# undocumented classes that are normally visible in the class hierarchy.
-# If set to NO (the default) these classes will be included in the various
-# overviews. This option has no effect if EXTRACT_ALL is enabled.
-
-HIDE_UNDOC_CLASSES = NO
-
-# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
-# friend (class|struct|union) declarations.
-# If set to NO (the default) these declarations will be included in the
-# documentation.
-
-HIDE_FRIEND_COMPOUNDS = NO
-
-# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
-# documentation blocks found inside the body of a function.
-# If set to NO (the default) these blocks will be appended to the
-# function's detailed documentation block.
-
-HIDE_IN_BODY_DOCS = NO
-
-# The INTERNAL_DOCS tag determines if documentation
-# that is typed after a \internal command is included. If the tag is set
-# to NO (the default) then the documentation will be excluded.
-# Set it to YES to include the internal documentation.
-
-INTERNAL_DOCS = NO
-
-# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
-# file names in lower-case letters. If set to YES upper-case letters are also
-# allowed. This is useful if you have classes or files whose names only differ
-# in case and if your file system supports case sensitive file names. Windows
-# and Mac users are advised to set this option to NO.
-
-CASE_SENSE_NAMES = YES
-
-# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
-# will show members with their full class and namespace scopes in the
-# documentation. If set to YES the scope will be hidden.
-
-HIDE_SCOPE_NAMES = NO
-
-# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
-# will put a list of the files that are included by a file in the documentation
-# of that file.
-
-SHOW_INCLUDE_FILES = YES
-
-# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
-# is inserted in the documentation for inline members.
-
-INLINE_INFO = YES
-
-# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
-# will sort the (detailed) documentation of file and class members
-# alphabetically by member name. If set to NO the members will appear in
-# declaration order.
-
-SORT_MEMBER_DOCS = YES
-
-# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
-# brief documentation of file, namespace and class members alphabetically
-# by member name. If set to NO (the default) the members will appear in
-# declaration order.
-
-SORT_BRIEF_DOCS = NO
-
-# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
-
-SORT_MEMBERS_CTORS_1ST = NO
-
-# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
-# hierarchy of group names into alphabetical order. If set to NO (the default)
-# the group names will appear in their defined order.
-
-SORT_GROUP_NAMES = NO
-
-# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
-# sorted by fully-qualified names, including namespaces. If set to
-# NO (the default), the class list will be sorted only by class name,
-# not including the namespace part.
-# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
-# Note: This option applies only to the class list, not to the
-# alphabetical list.
-
-SORT_BY_SCOPE_NAME = NO
-
-# The GENERATE_TODOLIST tag can be used to enable (YES) or
-# disable (NO) the todo list. This list is created by putting \todo
-# commands in the documentation.
-
-GENERATE_TODOLIST = YES
-
-# The GENERATE_TESTLIST tag can be used to enable (YES) or
-# disable (NO) the test list. This list is created by putting \test
-# commands in the documentation.
-
-GENERATE_TESTLIST = YES
-
-# The GENERATE_BUGLIST tag can be used to enable (YES) or
-# disable (NO) the bug list. This list is created by putting \bug
-# commands in the documentation.
-
-GENERATE_BUGLIST = YES
-
-# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
-# disable (NO) the deprecated list. This list is created by putting
-# \deprecated commands in the documentation.
-
-GENERATE_DEPRECATEDLIST= YES
-
-# The ENABLED_SECTIONS tag can be used to enable conditional
-# documentation sections, marked by \if sectionname ... \endif.
-
-ENABLED_SECTIONS =
-
-# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
-# the initial value of a variable or define consists of for it to appear in
-# the documentation. If the initializer consists of more lines than specified
-# here it will be hidden. Use a value of 0 to hide initializers completely.
-# The appearance of the initializer of individual variables and defines in the
-# documentation can be controlled using \showinitializer or \hideinitializer
-# command in the documentation regardless of this setting.
-
-MAX_INITIALIZER_LINES = 30
-
-# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
-# at the bottom of the documentation of classes and structs. If set to YES the
-# list will mention the files that were used to generate the documentation.
-
-SHOW_USED_FILES = YES
-
-# If the sources in your project are distributed over multiple directories
-# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
-# in the documentation. The default is NO.
-
-SHOW_DIRECTORIES = NO
-
-# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
-# This will remove the Files entry from the Quick Index and from the
-# Folder Tree View (if specified). The default is YES.
-
-SHOW_FILES = YES
-
-# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
-# Namespaces page.
-# This will remove the Namespaces entry from the Quick Index
-# and from the Folder Tree View (if specified). The default is YES.
-
-SHOW_NAMESPACES = YES
-
-# The FILE_VERSION_FILTER tag can be used to specify a program or script that
-# doxygen should invoke to get the current version for each file (typically from
-# the version control system). Doxygen will invoke the program by executing (via
-# popen()) the command , where is the value of
-# the FILE_VERSION_FILTER tag, and is the name of an input file
-# provided by doxygen. Whatever the program writes to standard output
-# is used as the file version. See the manual for examples.
-
-FILE_VERSION_FILTER =
-
-# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
-# doxygen. The layout file controls the global structure of the generated output files
-# in an output format independent way. The create the layout file that represents
-# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
-# file name after the option, if omitted DoxygenLayout.xml will be used as the name
-# of the layout file.
-
-LAYOUT_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-
-# The QUIET tag can be used to turn on/off the messages that are generated
-# by doxygen. Possible values are YES and NO. If left blank NO is used.
-
-QUIET = NO
-
-# The WARNINGS tag can be used to turn on/off the warning messages that are
-# generated by doxygen. Possible values are YES and NO. If left blank
-# NO is used.
-
-WARNINGS = YES
-
-# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
-# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
-# automatically be disabled.
-
-WARN_IF_UNDOCUMENTED = YES
-
-# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
-# potential errors in the documentation, such as not documenting some
-# parameters in a documented function, or documenting parameters that
-# don't exist or using markup commands wrongly.
-
-WARN_IF_DOC_ERROR = YES
-
-# This WARN_NO_PARAMDOC option can be abled to get warnings for
-# functions that are documented, but have no documentation for their parameters
-# or return value. If set to NO (the default) doxygen will only warn about
-# wrong or incomplete parameter documentation, but not about the absence of
-# documentation.
-
-WARN_NO_PARAMDOC = YES
-
-# The WARN_FORMAT tag determines the format of the warning messages that
-# doxygen can produce. The string should contain the $file, $line, and $text
-# tags, which will be replaced by the file and line number from which the
-# warning originated and the warning text. Optionally the format may contain
-# $version, which will be replaced by the version of the file (if it could
-# be obtained via FILE_VERSION_FILTER)
-
-WARN_FORMAT = "$file:$line: $text"
-
-# The WARN_LOGFILE tag can be used to specify a file to which warning
-# and error messages should be written. If left blank the output is written
-# to stderr.
-
-WARN_LOGFILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-
-# The INPUT tag can be used to specify the files and/or directories that contain
-# documented source files. You may enter file names like "myfile.cpp" or
-# directories like "/usr/src/myproject". Separate the files or directories
-# with spaces.
-
-INPUT = .
-
-# This tag can be used to specify the character encoding of the source files
-# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
-# also the default input encoding. Doxygen uses libiconv (or the iconv built
-# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
-# the list of possible encodings.
-
-INPUT_ENCODING = UTF-8
-
-# If the value of the INPUT tag contains directories, you can use the
-# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank the following patterns are tested:
-# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
-# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
-
-FILE_PATTERNS = *.c *.h *.doxygen
-
-# The RECURSIVE tag can be used to turn specify whether or not subdirectories
-# should be searched for input files as well. Possible values are YES and NO.
-# If left blank NO is used.
-
-RECURSIVE = YES
-
-# The EXCLUDE tag can be used to specify files and/or directories that should
-# excluded from the INPUT source files. This way you can easily exclude a
-# subdirectory from a directory tree whose root is specified with the INPUT tag.
-
-EXCLUDE =
-
-# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
-# directories that are symbolic links (a Unix filesystem feature) are excluded
-# from the input.
-
-EXCLUDE_SYMLINKS = NO
-
-# If the value of the INPUT tag contains directories, you can use the
-# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
-# certain files from those directories. Note that the wildcards are matched
-# against the file with absolute path, so to exclude all test directories
-# for example use the pattern */test/*
-
-EXCLUDE_PATTERNS = *.svn*
-
-# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
-# (namespaces, classes, functions, etc.) that should be excluded from the
-# output. The symbol name can be a fully qualified name, a word, or if the
-# wildcard * is used, a substring. Examples: ANamespace, AClass,
-# AClass::ANamespace, ANamespace::*Test
-
-EXCLUDE_SYMBOLS =
-
-# The EXAMPLE_PATH tag can be used to specify one or more files or
-# directories that contain example code fragments that are included (see
-# the \include command).
-
-EXAMPLE_PATH =
-
-# If the value of the EXAMPLE_PATH tag contains directories, you can use the
-# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
-# and *.h) to filter out the source-files in the directories. If left
-# blank all files are included.
-
-EXAMPLE_PATTERNS =
-
-# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
-# searched for input files to be used with the \include or \dontinclude
-# commands irrespective of the value of the RECURSIVE tag.
-# Possible values are YES and NO. If left blank NO is used.
-
-EXAMPLE_RECURSIVE = NO
-
-# The IMAGE_PATH tag can be used to specify one or more files or
-# directories that contain image that are included in the documentation (see
-# the \image command).
-
-IMAGE_PATH =
-
-# The INPUT_FILTER tag can be used to specify a program that doxygen should
-# invoke to filter for each input file. Doxygen will invoke the filter program
-# by executing (via popen()) the command , where
-# is the value of the INPUT_FILTER tag, and is the name of an
-# input file. Doxygen will then use the output that the filter program writes
-# to standard output.
-# If FILTER_PATTERNS is specified, this tag will be
-# ignored.
-
-INPUT_FILTER =
-
-# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
-# basis.
-# Doxygen will compare the file name with each pattern and apply the
-# filter if there is a match.
-# The filters are a list of the form:
-# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
-# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
-# is applied to all files.
-
-FILTER_PATTERNS =
-
-# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
-# INPUT_FILTER) will be used to filter the input files when producing source
-# files to browse (i.e. when SOURCE_BROWSER is set to YES).
-
-FILTER_SOURCE_FILES = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-
-# If the SOURCE_BROWSER tag is set to YES then a list of source files will
-# be generated. Documented entities will be cross-referenced with these sources.
-# Note: To get rid of all source code in the generated output, make sure also
-# VERBATIM_HEADERS is set to NO.
-
-SOURCE_BROWSER = YES
-
-# Setting the INLINE_SOURCES tag to YES will include the body
-# of functions and classes directly in the documentation.
-
-INLINE_SOURCES = NO
-
-# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
-# doxygen to hide any special comment blocks from generated source code
-# fragments. Normal C and C++ comments will always remain visible.
-
-STRIP_CODE_COMMENTS = YES
-
-# If the REFERENCED_BY_RELATION tag is set to YES
-# then for each documented function all documented
-# functions referencing it will be listed.
-
-REFERENCED_BY_RELATION = NO
-
-# If the REFERENCES_RELATION tag is set to YES
-# then for each documented function all documented entities
-# called/used by that function will be listed.
-
-REFERENCES_RELATION = NO
-
-# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
-# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
-# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
-# link to the source code.
-# Otherwise they will link to the documentation.
-
-REFERENCES_LINK_SOURCE = YES
-
-# If the USE_HTAGS tag is set to YES then the references to source code
-# will point to the HTML generated by the htags(1) tool instead of doxygen
-# built-in source browser. The htags tool is part of GNU's global source
-# tagging system (see http://www.gnu.org/software/global/global.html). You
-# will need version 4.8.6 or higher.
-
-USE_HTAGS = NO
-
-# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
-# will generate a verbatim copy of the header file for each class for
-# which an include is specified. Set to NO to disable this.
-
-VERBATIM_HEADERS = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-
-# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
-# of all compounds will be generated. Enable this if the project
-# contains a lot of classes, structs, unions or interfaces.
-
-ALPHABETICAL_INDEX = NO
-
-# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
-# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
-# in which this list will be split (can be a number in the range [1..20])
-
-COLS_IN_ALPHA_INDEX = 5
-
-# In case all classes in a project start with a common prefix, all
-# classes will be put under the same header in the alphabetical index.
-# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
-# should be ignored while generating the index headers.
-
-IGNORE_PREFIX =
-
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
-# generate HTML output.
-
-GENERATE_HTML = YES
-
-# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `html' will be used as the default path.
-
-HTML_OUTPUT = html
-
-# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
-# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
-# doxygen will generate files with .html extension.
-
-HTML_FILE_EXTENSION = .html
-
-# The HTML_HEADER tag can be used to specify a personal HTML header for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard header.
-
-HTML_HEADER =
-
-# The HTML_FOOTER tag can be used to specify a personal HTML footer for
-# each generated HTML page. If it is left blank doxygen will generate a
-# standard footer.
-
-HTML_FOOTER =
-
-# If the HTML_TIMESTAMP tag is set to YES then the generated HTML
-# documentation will contain the timesstamp.
-
-HTML_TIMESTAMP = NO
-
-# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
-# style sheet that is used by each HTML page. It can be used to
-# fine-tune the look of the HTML output. If the tag is left blank doxygen
-# will generate a default style sheet. Note that doxygen will try to copy
-# the style sheet file to the HTML output directory, so don't put your own
-# stylesheet in the HTML output directory as well, or it will be erased!
-
-HTML_STYLESHEET =
-
-# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
-# files or namespaces will be aligned in HTML using tables. If set to
-# NO a bullet list will be used.
-
-HTML_ALIGN_MEMBERS = YES
-
-# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
-# documentation will contain sections that can be hidden and shown after the
-# page has loaded. For this to work a browser that supports
-# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
-# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
-
-HTML_DYNAMIC_SECTIONS = NO
-
-# If the GENERATE_DOCSET tag is set to YES, additional index files
-# will be generated that can be used as input for Apple's Xcode 3
-# integrated development environment, introduced with OSX 10.5 (Leopard).
-# To create a documentation set, doxygen will generate a Makefile in the
-# HTML output directory. Running make will produce the docset in that
-# directory and running "make install" will install the docset in
-# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
-# it at startup.
-# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
-
-GENERATE_DOCSET = NO
-
-# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
-# feed. A documentation feed provides an umbrella under which multiple
-# documentation sets from a single provider (such as a company or product suite)
-# can be grouped.
-
-DOCSET_FEEDNAME = "Doxygen generated docs"
-
-# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
-# should uniquely identify the documentation set bundle. This should be a
-# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
-# will append .docset to the name.
-
-DOCSET_BUNDLE_ID = org.doxygen.Project
-
-# If the GENERATE_HTMLHELP tag is set to YES, additional index files
-# will be generated that can be used as input for tools like the
-# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
-# of the generated HTML documentation.
-
-GENERATE_HTMLHELP = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
-# be used to specify the file name of the resulting .chm file. You
-# can add a path in front of the file if the result should not be
-# written to the html output directory.
-
-CHM_FILE =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
-# be used to specify the location (absolute path including file name) of
-# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
-# the HTML help compiler on the generated index.hhp.
-
-HHC_LOCATION =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
-# controls if a separate .chi index file is generated (YES) or that
-# it should be included in the master .chm file (NO).
-
-GENERATE_CHI = NO
-
-# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
-# is used to encode HtmlHelp index (hhk), content (hhc) and project file
-# content.
-
-CHM_INDEX_ENCODING =
-
-# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
-# controls whether a binary table of contents is generated (YES) or a
-# normal table of contents (NO) in the .chm file.
-
-BINARY_TOC = NO
-
-# The TOC_EXPAND flag can be set to YES to add extra items for group members
-# to the contents of the HTML help documentation and to the tree view.
-
-TOC_EXPAND = NO
-
-# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
-# are set, an additional index file will be generated that can be used as input for
-# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
-# HTML documentation.
-
-GENERATE_QHP = NO
-
-# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
-# be used to specify the file name of the resulting .qch file.
-# The path specified is relative to the HTML output folder.
-
-QCH_FILE =
-
-# The QHP_NAMESPACE tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#namespace
-
-QHP_NAMESPACE =
-
-# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
-# Qt Help Project output. For more information please see
-# http://doc.trolltech.com/qthelpproject.html#virtual-folders
-
-QHP_VIRTUAL_FOLDER = doc
-
-# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
-# For more information please see
-# http://doc.trolltech.com/qthelpproject.html#custom-filters
-
-QHP_CUST_FILTER_NAME =
-
-# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
-# Qt Help Project / Custom Filters.
-
-QHP_CUST_FILTER_ATTRS =
-
-# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
-# filter section matches.
-# Qt Help Project / Filter Attributes.
-
-QHP_SECT_FILTER_ATTRS =
-
-# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
-# be used to specify the location of Qt's qhelpgenerator.
-# If non-empty doxygen will try to run qhelpgenerator on the generated
-# .qhp file.
-
-QHG_LOCATION =
-
-# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
-# top of each HTML page. The value NO (the default) enables the index and
-# the value YES disables it.
-
-DISABLE_INDEX = NO
-
-# This tag can be used to set the number of enum values (range [1..20])
-# that doxygen will group on one line in the generated HTML documentation.
-
-ENUM_VALUES_PER_LINE = 4
-
-# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
-# structure should be generated to display hierarchical information.
-# If the tag value is set to YES, a side panel will be generated
-# containing a tree-like index structure (just like the one that
-# is generated for HTML Help). For this to work a browser that supports
-# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
-# Windows users are probably better off using the HTML help feature.
-
-GENERATE_TREEVIEW = NO
-
-# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
-# and Class Hierarchy pages using a tree view instead of an ordered list.
-
-USE_INLINE_TREES = NO
-
-# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
-# used to set the initial width (in pixels) of the frame in which the tree
-# is shown.
-
-TREEVIEW_WIDTH = 250
-
-# Use this tag to change the font size of Latex formulas included
-# as images in the HTML documentation. The default is 10. Note that
-# when you change the font size after a successful doxygen run you need
-# to manually remove any form_*.png images from the HTML output directory
-# to force them to be regenerated.
-
-FORMULA_FONTSIZE = 10
-
-# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript
-# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP)
-# there is already a search function so this one should typically
-# be disabled.
-
-SEARCHENGINE = YES
-
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
-# generate Latex output.
-
-GENERATE_LATEX = NO
-
-# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `latex' will be used as the default path.
-
-LATEX_OUTPUT = latex
-
-# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
-# invoked. If left blank `latex' will be used as the default command name.
-
-LATEX_CMD_NAME = latex
-
-# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
-# generate index for LaTeX. If left blank `makeindex' will be used as the
-# default command name.
-
-MAKEINDEX_CMD_NAME = makeindex
-
-# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
-# LaTeX documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_LATEX = NO
-
-# The PAPER_TYPE tag can be used to set the paper type that is used
-# by the printer. Possible values are: a4, a4wide, letter, legal and
-# executive. If left blank a4wide will be used.
-
-PAPER_TYPE = a4wide
-
-# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
-# packages that should be included in the LaTeX output.
-
-EXTRA_PACKAGES =
-
-# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
-# the generated latex document. The header should contain everything until
-# the first chapter. If it is left blank doxygen will generate a
-# standard header. Notice: only use this tag if you know what you are doing!
-
-LATEX_HEADER =
-
-# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
-# is prepared for conversion to pdf (using ps2pdf). The pdf file will
-# contain links (just like the HTML output) instead of page references
-# This makes the output suitable for online browsing using a pdf viewer.
-
-PDF_HYPERLINKS = YES
-
-# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
-# plain latex in the generated Makefile. Set this option to YES to get a
-# higher quality PDF documentation.
-
-USE_PDFLATEX = YES
-
-# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
-# command to the generated LaTeX files. This will instruct LaTeX to keep
-# running if errors occur, instead of asking the user for help.
-# This option is also used when generating formulas in HTML.
-
-LATEX_BATCHMODE = NO
-
-# If LATEX_HIDE_INDICES is set to YES then doxygen will not
-# include the index chapters (such as File Index, Compound Index, etc.)
-# in the output.
-
-LATEX_HIDE_INDICES = NO
-
-# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER.
-
-LATEX_SOURCE_CODE = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
-# The RTF output is optimized for Word 97 and may not look very pretty with
-# other RTF readers or editors.
-
-GENERATE_RTF = NO
-
-# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `rtf' will be used as the default path.
-
-RTF_OUTPUT = rtf
-
-# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
-# RTF documents. This may be useful for small projects and may help to
-# save some trees in general.
-
-COMPACT_RTF = NO
-
-# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
-# will contain hyperlink fields. The RTF file will
-# contain links (just like the HTML output) instead of page references.
-# This makes the output suitable for online browsing using WORD or other
-# programs which support those fields.
-# Note: wordpad (write) and others do not support links.
-
-RTF_HYPERLINKS = NO
-
-# Load stylesheet definitions from file. Syntax is similar to doxygen's
-# config file, i.e. a series of assignments. You only have to provide
-# replacements, missing definitions are set to their default value.
-
-RTF_STYLESHEET_FILE =
-
-# Set optional variables used in the generation of an rtf document.
-# Syntax is similar to doxygen's config file.
-
-RTF_EXTENSIONS_FILE =
-
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
-# generate man pages
-
-GENERATE_MAN = NO
-
-# The MAN_OUTPUT tag is used to specify where the man pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `man' will be used as the default path.
-
-MAN_OUTPUT = man
-
-# The MAN_EXTENSION tag determines the extension that is added to
-# the generated man pages (default is the subroutine's section .3)
-
-MAN_EXTENSION = .3
-
-# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
-# then it will generate one additional man file for each entity
-# documented in the real man page(s). These additional files
-# only source the real man page, but without them the man command
-# would be unable to find the correct page. The default is NO.
-
-MAN_LINKS = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_XML tag is set to YES Doxygen will
-# generate an XML file that captures the structure of
-# the code including all documentation.
-
-GENERATE_XML = NO
-
-# The XML_OUTPUT tag is used to specify where the XML pages will be put.
-# If a relative path is entered the value of OUTPUT_DIRECTORY will be
-# put in front of it. If left blank `xml' will be used as the default path.
-
-XML_OUTPUT = xml
-
-# The XML_SCHEMA tag can be used to specify an XML schema,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_SCHEMA =
-
-# The XML_DTD tag can be used to specify an XML DTD,
-# which can be used by a validating XML parser to check the
-# syntax of the XML files.
-
-XML_DTD =
-
-# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
-# dump the program listings (including syntax highlighting
-# and cross-referencing information) to the XML output. Note that
-# enabling this will significantly increase the size of the XML output.
-
-XML_PROGRAMLISTING = YES
-
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
-# generate an AutoGen Definitions (see autogen.sf.net) file
-# that captures the structure of the code including all
-# documentation. Note that this feature is still experimental
-# and incomplete at the moment.
-
-GENERATE_AUTOGEN_DEF = NO
-
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-
-# If the GENERATE_PERLMOD tag is set to YES Doxygen will
-# generate a Perl module file that captures the structure of
-# the code including all documentation. Note that this
-# feature is still experimental and incomplete at the
-# moment.
-
-GENERATE_PERLMOD = NO
-
-# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
-# the necessary Makefile rules, Perl scripts and LaTeX code to be able
-# to generate PDF and DVI output from the Perl module output.
-
-PERLMOD_LATEX = NO
-
-# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
-# nicely formatted so it can be parsed by a human reader.
-# This is useful
-# if you want to understand what is going on.
-# On the other hand, if this
-# tag is set to NO the size of the Perl module output will be much smaller
-# and Perl will parse it just the same.
-
-PERLMOD_PRETTY = YES
-
-# The names of the make variables in the generated doxyrules.make file
-# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
-# This is useful so different doxyrules.make files included by the same
-# Makefile don't overwrite each other's variables.
-
-PERLMOD_MAKEVAR_PREFIX =
-
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor
-#---------------------------------------------------------------------------
-
-# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
-# evaluate all C-preprocessor directives found in the sources and include
-# files.
-
-ENABLE_PREPROCESSING = YES
-
-# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
-# names in the source code. If set to NO (the default) only conditional
-# compilation will be performed. Macro expansion can be done in a controlled
-# way by setting EXPAND_ONLY_PREDEF to YES.
-
-MACRO_EXPANSION = NO
-
-# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
-# then the macro expansion is limited to the macros specified with the
-# PREDEFINED and EXPAND_AS_DEFINED tags.
-
-EXPAND_ONLY_PREDEF = NO
-
-# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
-# in the INCLUDE_PATH (see below) will be search if a #include is found.
-
-SEARCH_INCLUDES = YES
-
-# The INCLUDE_PATH tag can be used to specify one or more directories that
-# contain include files that are not input files but should be processed by
-# the preprocessor.
-
-INCLUDE_PATH =
-
-# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
-# patterns (like *.h and *.hpp) to filter out the header-files in the
-# directories. If left blank, the patterns specified with FILE_PATTERNS will
-# be used.
-
-INCLUDE_FILE_PATTERNS =
-
-# The PREDEFINED tag can be used to specify one or more macro names that
-# are defined before the preprocessor is started (similar to the -D option of
-# gcc). The argument of the tag is a list of macros of the form: name
-# or name=definition (no spaces). If the definition and the = are
-# omitted =1 is assumed. To prevent a macro definition from being
-# undefined via #undef or recursively expanded use the := operator
-# instead of the = operator.
-
-PREDEFINED =
-
-# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
-# this tag can be used to specify a list of macro names that should be expanded.
-# The macro definition that is found in the sources will be used.
-# Use the PREDEFINED tag if you want to use a different macro definition.
-
-EXPAND_AS_DEFINED =
-
-# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
-# doxygen's preprocessor will remove all function-like macros that are alone
-# on a line, have an all uppercase name, and do not end with a semicolon. Such
-# function macros are typically used for boiler-plate code, and will confuse
-# the parser if not removed.
-
-SKIP_FUNCTION_MACROS = YES
-
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references
-#---------------------------------------------------------------------------
-
-# The TAGFILES option can be used to specify one or more tagfiles.
-# Optionally an initial location of the external documentation
-# can be added for each tagfile. The format of a tag file without
-# this location is as follows:
-#
-# TAGFILES = file1 file2 ...
-# Adding location for the tag files is done as follows:
-#
-# TAGFILES = file1=loc1 "file2 = loc2" ...
-# where "loc1" and "loc2" can be relative or absolute paths or
-# URLs. If a location is present for each tag, the installdox tool
-# does not have to be run to correct the links.
-# Note that each tag file must have a unique name
-# (where the name does NOT include the path)
-# If a tag file is not located in the directory in which doxygen
-# is run, you must also specify the path to the tagfile here.
-
-TAGFILES =
-
-# When a file name is specified after GENERATE_TAGFILE, doxygen will create
-# a tag file that is based on the input files it reads.
-
-GENERATE_TAGFILE =
-
-# If the ALLEXTERNALS tag is set to YES all external classes will be listed
-# in the class index. If set to NO only the inherited external classes
-# will be listed.
-
-ALLEXTERNALS = NO
-
-# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
-# in the modules index. If set to NO, only the current project's groups will
-# be listed.
-
-EXTERNAL_GROUPS = YES
-
-# The PERL_PATH should be the absolute path and name of the perl script
-# interpreter (i.e. the result of `which perl').
-
-PERL_PATH = /usr/bin/perl
-
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool
-#---------------------------------------------------------------------------
-
-# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
-# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
-# or super classes. Setting the tag to NO turns the diagrams off. Note that
-# this option is superseded by the HAVE_DOT option below. This is only a
-# fallback. It is recommended to install and use dot, since it yields more
-# powerful graphs.
-
-CLASS_DIAGRAMS = YES
-
-# You can define message sequence charts within doxygen comments using the \msc
-# command. Doxygen will then run the mscgen tool (see
-# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
-# documentation. The MSCGEN_PATH tag allows you to specify the directory where
-# the mscgen tool resides. If left empty the tool is assumed to be found in the
-# default search path.
-
-MSCGEN_PATH =
-
-# If set to YES, the inheritance and collaboration graphs will hide
-# inheritance and usage relations if the target is undocumented
-# or is not a class.
-
-HIDE_UNDOC_RELATIONS = YES
-
-# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
-# available from the path. This tool is part of Graphviz, a graph visualization
-# toolkit from AT&T and Lucent Bell Labs. The other options in this section
-# have no effect if this option is set to NO (the default)
-
-HAVE_DOT = NO
-
-# By default doxygen will write a font called FreeSans.ttf to the output
-# directory and reference it in all dot files that doxygen generates. This
-# font does not include all possible unicode characters however, so when you need
-# these (or just want a differently looking font) you can specify the font name
-# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
-# which can be done by putting it in a standard location or by setting the
-# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
-# containing the font.
-
-DOT_FONTNAME = FreeSans
-
-# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
-# The default size is 10pt.
-
-DOT_FONTSIZE = 10
-
-# By default doxygen will tell dot to use the output directory to look for the
-# FreeSans.ttf font (which doxygen will put there itself). If you specify a
-# different font using DOT_FONTNAME you can set the path where dot
-# can find it using this tag.
-
-DOT_FONTPATH =
-
-# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect inheritance relations. Setting this tag to YES will force the
-# the CLASS_DIAGRAMS tag to NO.
-
-CLASS_GRAPH = YES
-
-# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for each documented class showing the direct and
-# indirect implementation dependencies (inheritance, containment, and
-# class references variables) of the class with other documented classes.
-
-COLLABORATION_GRAPH = YES
-
-# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
-# will generate a graph for groups, showing the direct groups dependencies
-
-GROUP_GRAPHS = YES
-
-# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
-# collaboration diagrams in a style similar to the OMG's Unified Modeling
-# Language.
-
-UML_LOOK = NO
-
-# If set to YES, the inheritance and collaboration graphs will show the
-# relations between templates and their instances.
-
-TEMPLATE_RELATIONS = NO
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
-# tags are set to YES then doxygen will generate a graph for each documented
-# file showing the direct and indirect include dependencies of the file with
-# other documented files.
-
-INCLUDE_GRAPH = YES
-
-# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
-# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
-# documented header file showing the documented files that directly or
-# indirectly include this file.
-
-INCLUDED_BY_GRAPH = YES
-
-# If the CALL_GRAPH and HAVE_DOT options are set to YES then
-# doxygen will generate a call dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable call graphs
-# for selected functions only using the \callgraph command.
-
-CALL_GRAPH = NO
-
-# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
-# doxygen will generate a caller dependency graph for every global function
-# or class method. Note that enabling this option will significantly increase
-# the time of a run. So in most cases it will be better to enable caller
-# graphs for selected functions only using the \callergraph command.
-
-CALLER_GRAPH = NO
-
-# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
-# will graphical hierarchy of all classes instead of a textual one.
-
-GRAPHICAL_HIERARCHY = YES
-
-# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
-# then doxygen will show the dependencies a directory has on other directories
-# in a graphical way. The dependency relations are determined by the #include
-# relations between the files in the directories.
-
-DIRECTORY_GRAPH = YES
-
-# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
-# generated by dot. Possible values are png, jpg, or gif
-# If left blank png will be used.
-
-DOT_IMAGE_FORMAT = png
-
-# The tag DOT_PATH can be used to specify the path where the dot tool can be
-# found. If left blank, it is assumed the dot tool can be found in the path.
-
-DOT_PATH =
-
-# The DOTFILE_DIRS tag can be used to specify one or more directories that
-# contain dot files that are included in the documentation (see the
-# \dotfile command).
-
-DOTFILE_DIRS =
-
-# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
-# nodes that will be shown in the graph. If the number of nodes in a graph
-# becomes larger than this value, doxygen will truncate the graph, which is
-# visualized by representing a node as a red box. Note that doxygen if the
-# number of direct children of the root node in a graph is already larger than
-# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
-# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
-
-DOT_GRAPH_MAX_NODES = 50
-
-# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
-# graphs generated by dot. A depth value of 3 means that only nodes reachable
-# from the root by following a path via at most 3 edges will be shown. Nodes
-# that lay further from the root node will be omitted. Note that setting this
-# option to 1 or 2 may greatly reduce the computation time needed for large
-# code bases. Also note that the size of a graph can be further restricted by
-# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
-
-MAX_DOT_GRAPH_DEPTH = 0
-
-# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
-# background. This is disabled by default, because dot on Windows does not
-# seem to support this out of the box. Warning: Depending on the platform used,
-# enabling this option may lead to badly anti-aliased labels on the edges of
-# a graph (i.e. they become hard to read).
-
-DOT_TRANSPARENT = NO
-
-# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
-# files in one run (i.e. multiple -o and -T options on the command line). This
-# makes dot run faster, but since only newer versions of dot (>1.8.10)
-# support this, this feature is disabled by default.
-
-DOT_MULTI_TARGETS = NO
-
-# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
-# generate a legend page explaining the meaning of the various boxes and
-# arrows in the dot generated graphs.
-
-GENERATE_LEGEND = YES
-
-# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
-# remove the intermediate dot files that are used to generate
-# the various graphs.
-
-DOT_CLEANUP = YES
diff --git a/pyomo/repn/plugins/ampl/cAmpl/cAmpl.c b/pyomo/repn/plugins/ampl/cAmpl/cAmpl.c
deleted file mode 100644
index 33eb775c2a2..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/cAmpl.c
+++ /dev/null
@@ -1,228 +0,0 @@
-#include
-#include "cAmpl.h"
-#include "util.h"
-#include "handlers.h"
-
-static PyMethodDef cAmplMethods[] = {
- {"generate_ampl_repn", cAmpl_generate_ampl_repn, METH_VARARGS, "Generate an AMPL representation."},
- {NULL, NULL, 0, NULL}
-};
-
-static PyObject * pyomo_MOD = NULL;
-
-PyMODINIT_FUNC initcAmpl(void) {
- (void) Py_InitModule("cAmpl", cAmplMethods);
-}
-
-/**
- * Python interface function for getting an AMPL representation.
- * Roughly equivalent to calling cAmpl.generate_ampl_repn(exp).
- * Internally, extracts arguments and passes control to
- * internal_generate_ampl_repn().
- *
- * @see internal_generate_ampl_repn()
- * @return A new reference to the generated instance of
- * ampl_representation.
- */
-PyObject * cAmpl_generate_ampl_repn(PyObject * self, PyObject * args) {
- PyObject * exp;
-
- if(!PyArg_ParseTuple(args, "O", &exp)) {
- return NULL;
- }
-
- return internal_generate_ampl_repn(self, exp);
-}
-
-/**
- * Generate an AMPL representation from the given Python expression object.
- *
- * This function is responsible for establishing the framework within which
- * the rest of the cAmpl implementation operates. It covers the highest level
- * of if-then-else control flow from the Python implementation and
- * deals with the basic type checking that goes on at that level.
- *
- * This function does not actually manipulate the returned AMPL representation
- * much at all; instead, it performs type checks on the exp argument,
- * then passes control to one of several "handlers" which can further modify
- * the representation to return. In this case, the function checks:
- *
- * - If the exp is a variable value (instance of _VarValue)
- * - If the exp is a complex expression (instance of _Expression)
- * - If the exp is a fixed value (has a fixed_value() method)
- *
- * If none of these are true and the function cannot pass control to the
- * associated handler, it raises a Python ValueError to alert the
- * user. If the call succeeds, however, the function returns a new AMPL
- * representation (an instance of ampl_representation) as a Python
- * object.
- *
- * @param context The Python context within which to operate
- * @param exp The expression to parse. Should be one of _VarValue,
- * _Expression, or an object with the fixed_value
- * function defined.
- * @return A new reference to an instance of ampl_representation for
- * the given expression.
- * @see handlers.h
- */
-PyObject * internal_generate_ampl_repn(PyObject * context, PyObject * exp) {
- PyObject * ampl_repn = new_ampl_representation();
- PyObject * pyomo_MOD = get_pyomo_module();
-
- // Find pyomo.core.base for later use
- // Don't decref until end of function!
- PyObject * pyomo_base_MOD = PyObject_GetAttrString(pyomo_MOD, "base");
- Py_DECREF(pyomo_MOD);
-
- // Flag for when to return parsed expression
- int should_return = FALSE;
-
- // Variable
- PyObject * pyomo_var_MOD = PyObject_GetAttrString(pyomo_base_MOD, "var");
- PyObject * _VarValue_CLS = PyObject_GetAttrString(pyomo_var_MOD, "_VarValue");
-
- if(PyObject_IsInstance(exp, _VarValue_CLS)) {
- should_return = _handle_variable(context, exp, &l_repn);
- }
-
- Py_DECREF(pyomo_var_MOD);
- Py_DECREF(_VarValue_CLS);
-
- if(should_return) {
- Py_DECREF(pyomo_base_MOD);
- return ampl_repn;
- }
-
- // Expression
- PyObject * pyomo_expr_MOD = PyObject_GetAttrString(pyomo_base_MOD, "expr");
- PyObject * Expression_CLS = PyObject_GetAttrString(pyomo_expr_MOD, "Expression");
-
- if(PyObject_IsInstance(exp, Expression_CLS)) {
- should_return = _handle_expression(context, exp, &l_repn);
- }
-
- Py_DECREF(pyomo_expr_MOD);
- Py_DECREF(Expression_CLS);
-
- if(should_return == TRUE) {
- Py_DECREF(pyomo_base_MOD);
- return ampl_repn;
- } else if(should_return == ERROR) {
- Py_DECREF(pyomo_base_MOD);
- return NULL;
- }
-
- // Constant
- // Function call may return null - be careful with decref, etc.
- PyObject * fixed_value = PyObject_CallMethod(exp, "fixed_value", NULL);
-
- if(fixed_value && PyObject_IsTrue(fixed_value)) {
- should_return = _handle_fixedval(context, exp, &l_repn);
- }
-
- Py_XDECREF(fixed_value);
-
- if(should_return == TRUE) {
- Py_DECREF(pyomo_base_MOD);
- return ampl_repn;
- } else if(should_return == ERROR) {
- Py_DECREF(pyomo_base_MOD);
- return NULL;
- }
-
- // Unrecognized type; raise ValueError
- Py_DECREF(pyomo_base_MOD);
- PyErr_SetString(PyExc_ValueError, "Unexpected expression type");
-
- return NULL;
-}
-
-/**
- * Convenience function to recursively call the primary
- * generate_ampl_repn function with a single argument object.
- * Handles the generation of the argument tuple and various
- * error checks. Analogous to having Python recursively call
- * cAmpl.generate_ampl_repn(exp) from a running execution
- * of the same function.
- *
- * @param context The Python context within which to execute
- * @param exp The expression for which to generate a representation
- * @return An instance of ampl_representation for the given expression
- */
-PyObject * recursive_generate_ampl_repn(PyObject * context, PyObject * exp) {
- if(Py_EnterRecursiveCall(" in AMPL expression generation")) {
- // C NOTE: Will set its own exception
- return NULL;
- }
-
- PyObject * result_repn = internal_generate_ampl_repn(context, exp);
-
- Py_LeaveRecursiveCall();
-
- assert(result_repn == NULL || result_repn->ob_refcnt == 1);
- return result_repn; // C NOTE: NULL on error; exception will be set
-}
-
-/**
- * Create and return a new instance of the class
- * pyomo.core.io.ampl.ampl_representation.
- * Imports the pyomo.core module as necessary.
- *
- * @see get_pyomo_module()
- * @return A new reference to an ampl_representation instance.
- */
-PyObject * new_ampl_representation() {
- PyObject * pyomo_MOD = get_pyomo_module();
-
- // Find the 'ampl' module
- PyObject * io_MOD = PyObject_GetAttrString(pyomo_MOD, "io");
- PyObject * ampl_MOD = PyObject_GetAttrString(io_MOD, "ampl");
-
- // Get the ampl_representation class and instantiate it
- PyObject * ampl_representation_CLS = PyObject_GetAttrString(ampl_MOD, "ampl_representation");
- PyObject * tuple = Py_BuildValue("()");
- PyObject * ampl_repn = PyInstance_New(ampl_representation_CLS, tuple, NULL);
- Py_DECREF(tuple);
-
- // Free modules on the import chain
- Py_DECREF(io_MOD);
- Py_DECREF(ampl_MOD);
- Py_DECREF(ampl_representation_CLS);
-
- // Check reference count
- assert(ampl_repn->ob_refcnt == 1);
-
- // cleanup
- Py_DECREF(pyomo_MOD);
-
- // Return the new ampl_representation()
- return ampl_repn;
-}
-
-/**
- * Get the pyomo.core module. Stores the result in a static
- * variable and only performs an actual Python import if necessary; either way,
- * increments the reference count of the module before returning.
- *
- * @return a new reference to pyomo.core.
- */
-PyObject * get_pyomo_module() {
- // Import the 'pyomo.core' module
- if(pyomo_MOD == NULL) {
- if(!(pyomo_MOD = PyImport_ImportModule("pyomo.core"))) {
- printf("import pyomo.core failed!\n");
-
- PyObject * exc_type, * exc_value, * exc_traceback;
- PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
-
- dump_env();
-
- PyErr_Restore(exc_type, exc_value, exc_traceback);
-
- return NULL;
- }
- }
-
- Py_INCREF(pyomo_MOD);
- return pyomo_MOD;
-}
diff --git a/pyomo/repn/plugins/ampl/cAmpl/cAmpl.h b/pyomo/repn/plugins/ampl/cAmpl/cAmpl.h
deleted file mode 100644
index 30d780f0f47..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/cAmpl.h
+++ /dev/null
@@ -1,14 +0,0 @@
-//#undef NDEBUG
-#include
-
-#ifndef _CAMPL_CAMPL_H
-#define _CAMPL_CAMPL_H
-
-PyObject * cAmpl_generate_ampl_repn(PyObject * self, PyObject * args);
-PyObject * internal_generate_ampl_repn(PyObject * context, PyObject * exp);
-
-PyObject * recursive_generate_ampl_repn(PyObject * context, PyObject * exp);
-PyObject * new_ampl_representation();
-PyObject * get_pyomo_module();
-
-#endif
diff --git a/pyomo/repn/plugins/ampl/cAmpl/doxygen/HACKING.doxygen b/pyomo/repn/plugins/ampl/cAmpl/doxygen/HACKING.doxygen
deleted file mode 100644
index efd34872778..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/doxygen/HACKING.doxygen
+++ /dev/null
@@ -1,223 +0,0 @@
-/*! @page Developers Developing for cAmpl
-
-This document serves as a brief introduction to the cAmpl module and its
-development process. It seeks to provide pointers for future developers
-working on the C NL writer implementation.
-
-Functionality
-
-At present, the cAmpl module implements precisely one Python function:
-generate_ampl_repn, defined in pyomo.core/io/ampl/ampl.py. The
-cAmpl implementation is a clone of the Python version, not the other
-way around; any changes in the Python version should be reflected in
-cAmpl, but changes in cAmpl that alter functionality must also appear
-in ampl.py.
-
-The pyomo.data.cute package contains a number of unit tests for the NL
-writer. These are the standard by which NL writer implementations are
-measured; ampl.py is the reference implementation for these tests, and
-if any tests are failing with the pure Python implementation, there is a
-problem beyond cAmpl's scope.
-
-Structure
-
-The primary definition of the cAmpl module exists in the cAmpl.c file;
-this file defines the master cAmpl_generate_ampl_repn function, as well
-as a few helper functions for recursion and package imports.
-
-The util.c file implements some debugging utility functions for developer
-use.
-
-The remainder of the files appear in the handlers subdirectory, which
-breaks down the generate_ampl_repn Python function into manageable C
-chunks to be developed individually. The reference Python function is
-roughly subdivided by a series of if checks on the type of its argument
-exp. This functional type hierarchy is as follows:
-
-
- - Variable
-
- Expression
-
- - Sum expression
-
- Product expression
-
- Power expression
-
- Intrinsic function expression
-
- - Fixed value
-
-
-Each of the top-level types receives their own C "handler;" in addition,
-the "expression" handler is further subdivided into four smaller handlers,
-contained in the handlers/expression subdirectory.
-
-Handlers
-
-A C expression handler in the context of cAmpl has the following signature:
-
-int _handle_XYZ(PyObject * context, PyObject * exp, PyObject ** ampl_repn);
-
-Each handler is responsible for populating ampl_repn with the appropriate
-contents, then returning an integer code that represents success, failure,
-or error. The context variable holds information about the calling frame
-and parent instance of the currently executing method; exp is the Python
-object being parsed into an AMPL representation.
-
-Handlers may execute each other, as is the case in the expression handler,
-or they may recurse back to the C implementation of generate_ampl_repn,
-in which case it is recommended to use the recursive_generate_ampl_repn
-function provided in cAmpl.c.
-
-Conventions
-
-Being effectively a straight port of Python code into C, the cAmpl project
-has its own unique coding conventions that are recommended for future
-developers.
-
-Variables
-
-Variables are named the same as their Python counterparts, if they exist
-in the local scope:
-
-
- one = 1.0 # Python
- PyObject * one = Py_BuildValue("f", 1.0); // C
-
-
-Attributes of variables are named as their full expression, with delimiters
-replaced by underscores:
-
-
- myobj.myattr # Python
- PyObject * myobj.myattr = PyObject_GetAttrString(myobj, "myattr"); // C
-
-
-This may sometimes require a double-underscore, when the attribute itself
-begins with an underscore:
-
-
- myobj._secret # Python
- PyObject * myobj__secret = PyObject_GetAttrString(myobj, "_secret"); // C
-
-
-A similar convention is followed for items pulled out of a dictionary:
-
-
- mydict["key"] # Python
- PyObject * mydict_key = PyDict_GetItemString(mydict, "key"); // C
-
-
-Packages, modules, and classes are named with Hungarian three-character types
-appended to their variable name (PKG, MOD, and CLS, respectively):
-
-
- import pyomo.core # Python
- PyObject * pyomo.core_MOD = PyImport_ImportModule("pyomo.core"); // C
-
-
-Python objects declared in C with no direct counterpart in the reference
-Python function are prefixed with an underscore:
-
-
- a = b * c * d # Python
- PyObject * _tmp = PyNumber_Multiply(b, c); // C
- PyObject * a = PyNumber_Multiply(_tmp, d); // C
-
-
-Memory use
-
-Being a C implementation, cAmpl must concern itself with the Python
-reference
-count of its objects. Generally, cAmpl decrements the reference
-count of a local object as soon as possible in a code block:
-
-
- PyObject * _tmp = PyNumber_Multiply(b, c);
- PyObject * a = PyNumber_Multiply(_tmp, d);
- Py_DECREF(_tmp);
-
-
-In addition, temporary objects (such as that shown above) and C-local result
-objects are generally set to NULL immediately after use, to avoid potential
-access of a garbage-collected object:
-
-
- _tmp = NULL;
-
-
-In certain cases, however, it is desirable to retain an object reference for
-multiple statements or code blocks. In this case, the call to Py_DECREF is
-deferred until immediately after the last access of the object in question:
-
-
- PyObject * myobj_mydict = PyObject_GetAttrString(myobj, "mydict");
- PyDict_DelItemString(myobj_mydict, "a"); // Do not decref yet
- PyDict_DelItemString(myobj_mydict, "b");
- Py_DECREF(myobj_mydict);
-
-
-This technique is occasionally extended to retain a single object reference
-through a loop that accesses the object repeatedly, or to keep an object
-reference outside multiple sequential local scope blocks that access it.
-
-Comments
-
-Comments in cAmpl tend to follow one of a few basic templates throughout the
-module. Most frequently, since cAmpl is a direct translation of its Python
-counterpart, a comment will have a single line of Python code that represents
-the operation performed by the following block of C:
-
-
- // myobj.mydict["a"] = None
- PyObject * myobj_mydict = PyObject_GetAttrString(myobj, "mydict");
- PyDict_SetItemString(myobj_mydict, "a", Py_None);
- Py_DECREF(myobj_mydict);
-
-
-C comments may also include comments from the corresponding Python code in
-the appropriate place within the C translation. These comments match those
-existing in the Python implementation as closely as possible, and generally
-immediately precede a Python code listing comment:
-
-
- // clear the object
- // myobj = None
- Py_INCREF(Py_None);
- myobj = Py_None;
-
-
-Comments in cAmpl sometimes refer directly to a C implementation detail,
-rather than any information or code drawn from the Python reference function.
-In that case, the comment is preceded with the string "C NOTE:"
-
-
- // C NOTE: use plain int counter rather than Python integer
- // mycounter = 0
- int mycounter = 0;
-
-
-Comments in cAmpl can also indicate that the code is not a direct translation,
-but instead applies some optimization strategy or C-specific cleanup with the
-comments // opt and // cleanup, respectively:
-
-
- // opt
- PyObject * myobj = NULL;
-
- // some loop that sets myobj repeatedly...
-
- // cleanup
- Py_DECREF(myobj);
-
-
-Finally, certain functions receive Javadoc-style, Doxygen-compatible comments
-above their definitions in the cAmpl .c files. These are not cAmpl-specific;
-for more information, see the
-Doxygen documentation.
-
-
- /**
- Frobnicate.
- */
- void frob();
-
- */
diff --git a/pyomo/repn/plugins/ampl/cAmpl/doxygen/README.doxygen b/pyomo/repn/plugins/ampl/cAmpl/doxygen/README.doxygen
deleted file mode 100644
index 6930330a19f..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/doxygen/README.doxygen
+++ /dev/null
@@ -1,41 +0,0 @@
-/*!
- * @mainpage
- *
- * This project contains the C implementation of parts of the Pyomo NL writer.
- * Implemented as a Python module, the C implementation (colloquially named
- * cAmpl) aims to improve performance in this processor-bound part of Pyomo.
- *
- * Building
- *
- * A basic distutils setup script is included; to build, simply run:
- *
- * $ python setup.py build
- *
- * After building, Pyomo will attempt to autodetect the appropriate cAmpl
- * module and load it in place of the pure Python implementation used by
- * default. To do so, however, it must recognize a module named cAmpl in
- * the pyomo.core/io/ampl subdirectory. On Linux and other UNIX-based
- * systems, the module can be registered by running (in the appropriate
- * ampl directory):
- *
- * $ ln -s cAmpl/build/lib.<ARCH>/cAmpl.so .
- *
- * Substitute ARCH for your architecture; for example, this could
- * be linux-x86_64-2.6 for a 64-bit Linux platform on Python 2.6.
- *
- * If done properly, the cAmpl.so file will be linked inside the
- * ampl directory, allowing Pyomo to load the C-based functions it
- * provides.
- *
- * Windows
- *
- * cAmpl is completely untested on Windows-based platforms, so YMMV. However,
- * in theory it is possible to perform similar steps as above to achieve
- * the performance boosts of the cAmpl module. You must have Visual Studio or
- * a similar development platform installed. Run the setup.py script as
- * above, then copy the generated .dll file to the appropriate
- * ampl folder.
- *
- * Cygwin users should attempt the UNIX-based system instructions, and will
- * need gcc and/or mingw32 for their installations.
- */
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers.h b/pyomo/repn/plugins/ampl/cAmpl/handlers.h
deleted file mode 100644
index 4b5fe2963cc..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#include "util.h"
-#include "handlers/variable.h"
-#include "handlers/expression.h"
-#include "handlers/fixedval.h"
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression.c b/pyomo/repn/plugins/ampl/cAmpl/handlers/expression.c
deleted file mode 100644
index 57a7f8288be..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression.c
+++ /dev/null
@@ -1,65 +0,0 @@
-#include "expression.h"
-
-int _handle_expression(PyObject * context, PyObject * exp, PyObject ** ampl_repn) {
- // exp_type = type(exp)
- PyObject * exp_type = PyObject_Type(exp);
-
- // Get various expression types
- PyObject * pyomo_MOD = PyImport_ImportModule("pyomo.core");
- PyObject * base_MOD = PyObject_GetAttrString(pyomo_MOD, "base");
- PyObject * expr_MOD = PyObject_GetAttrString(base_MOD, "expr");
- Py_XDECREF(pyomo_MOD);
- Py_XDECREF(base_MOD);
-
- // if expr_type is expr._SumExpression:
- PyObject * _SumExpression_CLS = PyObject_GetAttrString(expr_MOD, "_SumExpression");
- if(exp_type == _SumExpression_CLS) {
- Py_XDECREF(_SumExpression_CLS);
- Py_XDECREF(expr_MOD);
- return _handle_sumexp(context, exp, ampl_repn);
- }
- Py_XDECREF(_SumExpression_CLS);
-
- // elif exp_type is expr._ProductExpression:
- PyObject * _ProductExpression_CLS = PyObject_GetAttrString(expr_MOD, "_ProductExpression");
- if(exp_type == _ProductExpression_CLS) {
- Py_XDECREF(_ProductExpression_CLS);
- Py_XDECREF(expr_MOD);
- return _handle_prodexp(context, exp, ampl_repn);
- }
- Py_XDECREF(_ProductExpression_CLS);
-
- // elif exp_type is expr._PowExpression:
- PyObject * _PowExpression_CLS = PyObject_GetAttrString(expr_MOD, "_PowExpression");
- if(exp_type == _PowExpression_CLS) {
- Py_XDECREF(_PowExpression_CLS);
- Py_XDECREF(expr_MOD);
- return _handle_powexp(context, exp, ampl_repn);
- }
- Py_XDECREF(_PowExpression_CLS);
-
- // elif exp_type is expr._IntrinsicFunctionExpression:
- PyObject * _IntrinsicFunctionExpression_CLS = PyObject_GetAttrString(expr_MOD, "_IntrinsicFunctionExpression");
- if(exp_type == _IntrinsicFunctionExpression_CLS) {
- Py_XDECREF(_IntrinsicFunctionExpression_CLS);
- Py_XDECREF(expr_MOD);
- return _handle_ifexp(context, exp, ampl_repn);
- }
- Py_XDECREF(_IntrinsicFunctionExpression_CLS);
-
- // else:
- // raise ValueError, "Unsupported expression type: "+str(exp)
- PyObject * error_msg = PyString_FromString("Unsupported expression type: ");
- PyObject * exp_str = PyObject_Str(exp);
- if(exp_str == NULL) {
- exp_str = PyString_FromString("");
- }
- PyString_ConcatAndDel(&error_msg, exp_str);
- PyErr_SetObject(PyExc_ValueError, error_msg);
-
- // Free types
- Py_XDECREF(expr_MOD);
-
- // Raise the error
- return ERROR;
-}
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression.h b/pyomo/repn/plugins/ampl/cAmpl/handlers/expression.h
deleted file mode 100644
index baf1d501932..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#include
-#include "../util.h"
-#include "../cAmpl.h"
-
-#include "expression/sumexp.h"
-#include "expression/prodexp.h"
-#include "expression/powexp.h"
-#include "expression/ifexp.h"
-
-int _handle_expression(PyObject * context, PyObject * exp, PyObject ** ampl_repn);
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/ifexp.c b/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/ifexp.c
deleted file mode 100644
index 6912584133d..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/ifexp.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include "ifexp.h"
-#include "../../cAmpl.h"
-
-int _handle_ifexp(PyObject * context, PyObject * exp, PyObject ** ampl_repn) {
- // assert(len(exp._args) == 1)
- PyObject * exp__args = PyObject_GetAttrString(exp, "_args");
- Py_ssize_t len_exp__args = PySequence_Length(exp__args);
- if(len_exp__args != 1) {
- PyErr_SetString(PyExc_AssertionError, "");
- return ERROR;
- }
-
- // child_repn = generate_ampl_repn(exp._args[0])
- PyObject * exp__args_0 = PySequence_GetItem(exp__args, 0);
- PyObject * child_repn = recursive_generate_ampl_repn(context, exp__args_0);
- if(child_repn == NULL) return ERROR;
- Py_DECREF(exp__args_0);
- Py_DECREF(exp__args);
-
- // ampl_repn._nonlinear_expr = exp
- PyObject_SetAttrString(*ampl_repn, "_nonlinear_expr", exp);
-
- // ampl_repn._nonlinear_vars = child_repn._nonlinear_vars
- PyObject * child_repn__nlv = PyObject_GetAttrString(child_repn, "_nonlinear_vars");
- PyObject_SetAttrString(*ampl_repn, "_nonlinear_vars", child_repn__nlv);
- Py_DECREF(child_repn__nlv);
-
- // ampl_repn._nonlinear_vars.update(child_repn._linear_terms_var)
- PyObject * ampl_repn__nlv = PyObject_GetAttrString(*ampl_repn, "_nonlinear_vars");
- PyObject * child_repn__ltv = PyObject_GetAttrString(child_repn, "_linear_terms_var");
- PyObject_CallMethod(ampl_repn__nlv, "update", "(O)", child_repn__ltv);
- Py_DECREF(child_repn__ltv);
- Py_DECREF(ampl_repn__nlv);
-
- Py_DECREF(child_repn);
-
- assert((*ampl_repn)->ob_refcnt == 1);
- return TRUE;
-}
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/ifexp.h b/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/ifexp.h
deleted file mode 100644
index 4803e2cd6e7..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/ifexp.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#include
-#include "../../util.h"
-
-int _handle_ifexp(PyObject * context, PyObject * exp, PyObject ** ampl_repn);
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/powexp.c b/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/powexp.c
deleted file mode 100644
index 88eba90c3da..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/powexp.c
+++ /dev/null
@@ -1,105 +0,0 @@
-#include "powexp.h"
-
-int _handle_powexp(PyObject * context, PyObject * exp, PyObject ** ampl_repn) {
- // result object
- PyObject * _result = NULL;
-
- // assert(len(exp._args) == 2)
- PyObject * exp__args = PyObject_GetAttrString(exp, "_args");
- Py_ssize_t len_exp__args = PySequence_Length(exp__args);
- if(len_exp__args != 2) {
- PyErr_SetString(PyExc_AssertionError, "");
- return ERROR;
- }
-
- // base_repn = generate_ampl_repn(exp._args[0])
- PyObject * exp__args_0 = PySequence_GetItem(exp__args, 0);
- PyObject * base_repn = recursive_generate_ampl_repn(context, exp__args_0);
- if(base_repn == NULL) return ERROR;
- Py_DECREF(exp__args_0);
-
- // exponent_repn = generate_ampl_repn(exp._args[1])
- PyObject * exp__args_1 = PySequence_GetItem(exp__args, 1);
- PyObject * exponent_repn = recursive_generate_ampl_repn(context, exp__args_1);
- if(exponent_repn == NULL) return ERROR;
- Py_DECREF(exp__args_1);
-
- Py_DECREF(exp__args);
-
- // if base_repn.is_constant() and exponent_repn.is_constant():
-
- // opt
- PyObject * br_ic = PyObject_CallMethod(base_repn, "is_constant", "()");
- PyObject * er_ic = PyObject_CallMethod(exponent_repn, "is_constant", "()");
- PyObject * br__constant = PyObject_GetAttrString(base_repn, "_constant");
- PyObject * er__constant = PyObject_GetAttrString(exponent_repn, "_constant");
-
- if(PyObject_IsTrue(br_ic) && PyObject_IsTrue(er_ic)) {
- // ampl_repn._constant = base_repn._constant**exponent_repn._constant
- _result = PyNumber_Power(br__constant, er__constant, Py_None);
- PyObject_SetAttrString(*ampl_repn, "_constant", _result);
- Py_DECREF(_result); _result = NULL;
-
- // elif exponent_repn.is_constant() and exponent_repn._constant == 1.0:
- } else if(PyObject_IsTrue(er_ic) && PyFloat_AS_DOUBLE(er__constant) == 1.0) {
- // ampl_repn = base_repn
- Py_DECREF(*ampl_repn);
- *ampl_repn = base_repn;
- Py_INCREF(*ampl_repn);
-
- // elif exponent_repn.is_constant() and exponent_repn._constant == 0.0:
- } else if(PyObject_IsTrue(er_ic) && PyFloat_AS_DOUBLE(er__constant) == 0.0) {
- // ampl_repn._constant = 1.0
- PyObject * _one = Py_BuildValue("f", 1.0);
- PyObject_SetAttrString(*ampl_repn, "_constant", _one);
- Py_DECREF(_one);
-
- // else:
- } else {
- // instead, let's just return the expression we are given and only
- // use the ampl_repn for the vars
- // ampl_repn._nonlinear_expr = exp
- PyObject_SetAttrString(*ampl_repn, "_nonlinear_expr", exp);
-
- // ampl_repn._nonlinear_vars = base_repn._nonlinear_vars
- PyObject * base_repn__nlv = PyObject_GetAttrString(base_repn, "_nonlinear_vars");
- PyObject_SetAttrString(*ampl_repn, "_nonlinear_vars", base_repn__nlv);
- Py_DECREF(base_repn__nlv);
-
- // opt
- PyObject * ampl_repn__nlv = PyObject_GetAttrString(*ampl_repn, "_nonlinear_vars");
- PyObject * _update = PyString_FromString("update");
-
- // ampl_repn._nonlinear_vars.update(exponent_repn._nonlinear_vars)
- PyObject * exponent_repn__nlv = PyObject_GetAttrString(exponent_repn, "_nonlinear_vars");
- PyObject_CallMethodObjArgs(ampl_repn__nlv, _update, exponent_repn__nlv, NULL);
- Py_DECREF(exponent_repn__nlv);
-
- // ampl_repn._nonlinear_vars.update(base_repn._linear_terms_var)
- PyObject * base_repn__ltv = PyObject_GetAttrString(base_repn, "_linear_terms_var");
- PyObject_CallMethodObjArgs(ampl_repn__nlv, _update, base_repn__ltv, NULL);
- Py_DECREF(base_repn__ltv);
-
- // ampl_repn._nonlinear_vars.update(exponent_repn._linear_terms_var)
- PyObject * exponent_repn__ltv = PyObject_GetAttrString(exponent_repn, "_linear_terms_var");
- PyObject_CallMethodObjArgs(ampl_repn__nlv, _update, exponent_repn__ltv, NULL);
- Py_DECREF(exponent_repn__ltv);
-
- // cleanup
- Py_DECREF(_update);
- Py_DECREF(ampl_repn__nlv);
- }
-
- // cleanup
- Py_DECREF(br_ic);
- Py_DECREF(er_ic);
- Py_DECREF(br__constant);
- Py_DECREF(er__constant);
-
- // cleanup
- Py_DECREF(base_repn);
- Py_DECREF(exponent_repn);
-
- assert((*ampl_repn)->ob_refcnt == 1);
- return TRUE;
-}
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/powexp.h b/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/powexp.h
deleted file mode 100644
index 7f7126e43a7..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/powexp.h
+++ /dev/null
@@ -1,5 +0,0 @@
-#include
-#include "../../util.h"
-#include "../../cAmpl.h"
-
-int _handle_powexp(PyObject * context, PyObject * exp, PyObject ** ampl_repn);
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/prodexp.c b/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/prodexp.c
deleted file mode 100644
index 440859a597c..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/prodexp.c
+++ /dev/null
@@ -1,389 +0,0 @@
-#include "prodexp.h"
-#include "../../cAmpl.h"
-
-// C NOTE: this function is potentially dangerous, since in some cases it
-// uses the PyFloat_AS_DOUBLE function instead of a safer downcast
-// or a PyObject_RichCompareBool call. In testing, this saved up
-// to 90% of the function call time, but it has implicit limitations
-// when the represented PyFloat object is outside the range of a C
-// double. Users experiencing crashes should use the pure Python
-// implementation instead.
-
-int _handle_prodexp(PyObject * context, PyObject * exp, PyObject ** ampl_repn) {
- // tmp
- PyObject * _result = NULL;
- PyObject * _result2 = NULL;
- Py_ssize_t i;
-
- // denom=1.0
- PyObject * denom = Py_BuildValue("f", 1.0);
-
- // for e in exp._denominator:
- PyObject * exp__denominator = PyObject_GetAttrString(exp, "_denominator");
- Py_ssize_t len_exp__denominator = PySequence_Length(exp__denominator);
- for(i = 0; i < len_exp__denominator; i++) {
- PyObject * e = PySequence_GetItem(exp__denominator, i);
-
- // if e.fixed_value():
- PyObject * e_fixed_value = PyObject_CallMethod(e, "fixed_value", NULL);
- if(PyObject_IsTrue(e_fixed_value) == TRUE) {
- // denom *= e.value
- PyObject * e_value = PyObject_GetAttrString(e, "value");
- _result = PyNumber_Multiply(denom, e_value);
- Py_DECREF(denom);
- denom = _result;
- _result = NULL;
- Py_DECREF(e_value);
-
- // elif e.is_constant():
- } else {
- PyObject * e_is_constant = PyObject_CallMethod(e, "is_constant", "()");
- if(PyObject_IsTrue(e_is_constant) == TRUE) {
- // denom *= e()
- PyObject * e_ = PyObject_CallObject(e, NULL);
- _result = PyNumber_Multiply(denom, e_);
- Py_DECREF(denom);
- denom = _result;
- _result = NULL;
- Py_DECREF(e_);
-
- // else:
- } else {
- // ampl_repn._nonlinear_expr = exp
- PyObject_SetAttrString(*ampl_repn, "_nonlinear_expr", exp);
-
- // break
- Py_DECREF(e_is_constant);
- Py_DECREF(e_fixed_value);
- Py_DECREF(e);
- break;
- }
- Py_DECREF(e_is_constant);
- }
- Py_DECREF(e_fixed_value);
-
- // if denom == 0.0:
- if(PyFloat_AS_DOUBLE(denom) == 0.0) {
- // print "Divide-by-zero error - offending sub-expression:"
- PySys_WriteStdout("Divide-by-zero error - offending sub-expression:\n");
-
- // e.pprint()
- PyObject_CallMethod(e, "pprint", NULL);
-
- // raise ZeroDivisionError
- PyErr_SetString(PyExc_ZeroDivisionError, "");
- Py_DECREF(e);
- return ERROR;
- }
-
- Py_DECREF(e);
- }
- Py_DECREF(exp__denominator);
-
- // if not ampl_repn._nonlinear_expr is None:
- PyObject * ampl_repn__nle = PyObject_GetAttrString(*ampl_repn, "_nonlinear_expr");
- if(ampl_repn__nle != Py_None) {
- // opt
- PyObject * _update = PyString_FromString("update");
-
- // we have a nonlinear expression ... build up all the vars
- // for e in exp._denominator:
- PyObject * exp__denominator = PyObject_GetAttrString(exp, "_denominator");
- Py_ssize_t len_exp__denominator = PySequence_Length(exp__denominator);
- for(i = 0; i < len_exp__denominator; i++) {
- PyObject * e = PySequence_GetItem(exp__denominator, i);
-
- // arg_repn = generate_ampl_repn(e)
- PyObject * arg_repn = recursive_generate_ampl_repn(context, e);
- Py_DECREF(e);
- if(arg_repn == NULL) return ERROR;
-
- // opt
- PyObject * ampl_repn__nlv = PyObject_GetAttrString(*ampl_repn, "_nonlinear_vars");
-
- // ampl_repn._nonlinear_vars.update(arg_repn._linear_terms_var)
- PyObject * arg_repn__ltv = PyObject_GetAttrString(arg_repn, "_linear_terms_var");
- PyObject_CallMethodObjArgs(ampl_repn__nlv, _update, arg_repn__ltv, NULL);
- Py_DECREF(arg_repn__ltv);
-
- // ampl_repn._nonlinear_vars.update(arg_repn._nonlinear_vars)
- PyObject * arg_repn__nlv = PyObject_GetAttrString(arg_repn, "_nonlinear_vars");
- PyObject_CallMethodObjArgs(ampl_repn__nlv, _update, arg_repn__nlv, NULL);
- Py_DECREF(arg_repn__nlv);
-
- Py_DECREF(ampl_repn__nlv);
- Py_DECREF(arg_repn);
- }
- Py_DECREF(exp__denominator);
-
- // for e in exp._numerator;
- PyObject * exp__numerator = PyObject_GetAttrString(exp, "_numerator");
- Py_ssize_t len_exp__numerator = PySequence_Length(exp__numerator);
- for(i = 0; i < len_exp__numerator; i++) {
- PyObject * e = PySequence_GetItem(exp__numerator, i);
-
- // arg_repn = generate_ampl_repn(e)
- PyObject * arg_repn = recursive_generate_ampl_repn(context, e);
- if(arg_repn == NULL) return ERROR;
- Py_DECREF(e);
-
- // opt
- PyObject * ampl_repn__nlv = PyObject_GetAttrString(*ampl_repn, "_nonlinear_vars");
-
- // ampl_repn._nonlinear_vars.update(arg_repn._linear_terms_var)
- PyObject * arg_repn__ltv = PyObject_GetAttrString(arg_repn, "_linear_terms_var");
- PyObject_CallMethodObjArgs(ampl_repn__nlv, _update, arg_repn__ltv, NULL);
- Py_DECREF(arg_repn__ltv);
-
- // ampl_repn._nonlinear_vars.update(arg_repn._nonlinear_vars)
- PyObject * arg_repn__nlv = PyObject_GetAttrString(arg_repn, "_nonlinear_vars");
- PyObject_CallMethodObjArgs(ampl_repn__nlv, _update, arg_repn__nlv, NULL);
- Py_DECREF(arg_repn__nlv);
-
- Py_DECREF(ampl_repn__nlv);
- Py_DECREF(arg_repn);
- }
- Py_DECREF(exp__numerator);
-
- Py_DECREF(_update);
- return TRUE;
- }
- Py_DECREF(ampl_repn__nle);
-
- // OK, the denominator is a constant
- // build up the ampl_repns for the numerator
- // C NOTE: we break from Python objects a bit here for the counters
- // n_linear_args = 0
- int n_linear_args = 0;
-
- // n_nonlinear_args = 0
- int n_nonlinear_args = 0;
-
- // arg_repns = list();
- PyObject * arg_repns = Py_BuildValue("[]");
-
- // for i in xrange(len(exp._numerator)):
- // C NOTE: don't actually care about the xrange
- PyObject * exp__numerator = PyObject_GetAttrString(exp, "_numerator");
- Py_ssize_t len_exp__numerator = PySequence_Length(exp__numerator);
- for(i = 0; i < len_exp__numerator; i++) {
- // e = exp._numerator[i]
- PyObject * e = PySequence_GetItem(exp__numerator, i);
-
- // e_repn = generate_ampl_repn(e)
- PyObject * e_repn = recursive_generate_ampl_repn(context, e);
- Py_DECREF(e);
- if(e_repn == NULL) return ERROR;
-
- // arg_repns.append(e_repn)
- PyList_Append(arg_repns, e_repn);
-
- // check if the expression is not nonlinear else it is nonlinear
- // if not e_repn._nonlinear_expr is None:
- PyObject * e_repn__nle = PyObject_GetAttrString(e_repn, "_nonlinear_expr");
- if(e_repn__nle != Py_None) {
- // n_nonlinear_args += 1
- n_nonlinear_args += 1;
-
- // check whether the expression is constant or else it is linear
- // elif not ((len(e_repn._linear_terms_var) == 0) and (e_repn._nonlinear_expr is None)):
- } else {
- PyObject * e_repn__ltv = PyObject_GetAttrString(e_repn, "_linear_terms_var");
- Py_ssize_t len_e_repn__ltv = PyDict_Size(e_repn__ltv);
- if(!(len_e_repn__ltv == 0 && e_repn__nle == Py_None)) {
- // n_linear_args += 1
- n_linear_args += 1;
- }
- Py_DECREF(e_repn__ltv);
- }
- Py_DECREF(e_repn__nle);
- Py_DECREF(e_repn);
- }
- Py_DECREF(exp__numerator);
-
- // is_nonlinear = False;
- // C NOTE: more trickery to avoid extraneous PyObjects
- int is_nonlinear = FALSE;
-
- // if n_linear_args > 1 or n_nonlinear_args > 0:
- if(n_linear_args > 1 || n_nonlinear_args > 0) {
- is_nonlinear = TRUE;
- }
-
- // if is_nonlinear is True:
- if(is_nonlinear == TRUE) {
- // do like AMPL and simply return the expression
- // without extracting the potentially linear part
- // ampl_repn = ampl_representation()
- *ampl_repn = new_ampl_representation();
-
- // ampl_repn._nonlinear_expr = exp
- PyObject_SetAttrString(*ampl_repn, "_nonlinear_expr", exp);
-
- // for repn in arg_repns:
- Py_ssize_t len_arg_repns = PySequence_Length(arg_repns);
- for(i = 0; i < len_arg_repns; i++) {
- PyObject * repn = PySequence_GetItem(arg_repns, i);
-
- // opt
- PyObject * ampl_repn__nlv = PyObject_GetAttrString(*ampl_repn, "_nonlinear_vars");
-
- // ampl_repn._nonlinear_vars.update(repn._linear_terms_var)
- PyObject * repn__ltv = PyObject_GetAttrString(repn, "_linear_terms_var");
- PyObject_CallMethod(ampl_repn__nlv, "update", "(O)", repn__ltv);
- Py_DECREF(repn__ltv);
-
- // ampl_repn._nonlinear_vars.update(repn._nonlinear_vars)
- PyObject * repn__nlv = PyObject_GetAttrString(repn, "_nonlinear_vars");
- PyObject_CallMethod(ampl_repn__nlv, "update", "(O)", repn__nlv);
- Py_DECREF(repn__nlv);
-
- // cleanup
- Py_DECREF(ampl_repn__nlv);
- Py_DECREF(repn);
- }
-
- // return ampl_repn
- Py_DECREF(arg_repns);
- return TRUE;
-
- // else:
- } else {
- // is linear or constant
- // ampl_repn = current_repn = arg_repns[0]
- PyObject * current_repn = PySequence_GetItem(arg_repns, 0);
- Py_DECREF(*ampl_repn); // C NOTE: decref current repn so we don't leak on next line
- *ampl_repn = current_repn;
-
- // for i in xrange(1, len(arg_repns)):
- // C NOTE: don't care about the xrange
- Py_ssize_t len_arg_repns = PySequence_Length(arg_repns);
- for(i = 1; i < len_arg_repns; i++) {
- // e_repn = arg_repns[i]
- PyObject * e_repn = PySequence_GetItem(arg_repns, i);
-
- // ampl_repn = ampl_representation()
- Py_DECREF(*ampl_repn);
- *ampl_repn = new_ampl_representation();
-
- // const_c * const_e
- // ampl_repn._constant = current_repn._constant * e_repn._constant
- PyObject * current_repn__constant = PyObject_GetAttrString(current_repn, "_constant");
- PyObject * e_repn__constant = PyObject_GetAttrString(e_repn, "_constant");
- _result = PyNumber_Multiply(current_repn__constant, e_repn__constant);
- PyObject_SetAttrString(*ampl_repn, "_constant", _result);
- Py_DECREF(_result); _result = NULL;
-
- // const_e * L_c
- // if e_repn._constant != 0.0:
- if(PyFloat_AS_DOUBLE(e_repn__constant) != 0.0) {
- // opt
- PyObject * current_repn__ltv = PyObject_GetAttrString(current_repn, "_linear_terms_var");
- PyObject * current_repn__ltc = PyObject_GetAttrString(current_repn, "_linear_terms_coef");
- PyObject * ampl_repn__ltv = PyObject_GetAttrString(*ampl_repn, "_linear_terms_var");
- PyObject * ampl_repn__ltc = PyObject_GetAttrString(*ampl_repn, "_linear_terms_coef");
-
- // for(var_name, var) in current_repn._linear_terms_var.iteritems():
- PyObject * var_name, * var;
- i = 0;
- while(PyDict_Next(current_repn__ltv, &i, &var_name, &var)) {
- // ampl_repn._linear_terms_coef[var_name] = current_repn._linear_terms_coef[var_name] * e_repn._constant
- PyObject * cr__ltc_vn = PyDict_GetItem(current_repn__ltc, var_name);
- _result = PyNumber_Multiply(cr__ltc_vn, e_repn__constant);
- Py_DECREF(cr__ltc_vn);
- PyDict_SetItem(ampl_repn__ltc, var_name, _result);
- Py_DECREF(_result); _result = NULL;
-
- // ampl_repn._linear_terms_var[var_name] = var
- PyDict_SetItem(ampl_repn__ltv, var_name, var);
- }
-
- Py_DECREF(current_repn__ltv);
- Py_DECREF(current_repn__ltc);
- Py_DECREF(ampl_repn__ltv);
- Py_DECREF(ampl_repn__ltc);
- }
-
- // const_c * L_e
- // if current_repn._constant != 0.0:
- if(PyFloat_AS_DOUBLE(current_repn__constant) != 0) {
- // opt
- PyObject * e_repn__ltv = PyObject_GetAttrString(e_repn, "_linear_terms_var");
- PyObject * e_repn__ltc = PyObject_GetAttrString(e_repn, "_linear_terms_coef");
- PyObject * ampl_repn__ltv = PyObject_GetAttrString(*ampl_repn, "_linear_terms_var");
- PyObject * ampl_repn__ltc = PyObject_GetAttrString(*ampl_repn, "_linear_terms_coef");
-
- // for (e_var_name,e_var) in e_repn._linear_terms_var.iteritems():
- PyObject * e_var_name, * e_var;
- i = 0;
- while(PyDict_Next(e_repn__ltv, &i, &e_var_name, &e_var)) {
- // opt
- PyObject * er__ltc_evn = PyDict_GetItem(e_repn__ltc, e_var_name);
- _result = PyNumber_Multiply(current_repn__constant, er__ltc_evn);
- Py_DECREF(er__ltc_evn);
-
- // if e_var_name in ampl_repn._linear_terms_var:
- if(PyMapping_HasKey(ampl_repn__ltv, e_var_name) == TRUE) {
- // ampl_repn._linear_terms_coef[e_var_name] += current_repn._constant * e_repn._linear_terms_coef[e_var_name]
- PyObject * _tmp = PyDict_GetItem(ampl_repn__ltc, e_var_name);
- _result2 = PyNumber_Add(_tmp, _result);
- PyDict_SetItem(ampl_repn__ltc, e_var_name, _result2);
- Py_DECREF(_tmp);
- Py_DECREF(_result2); _result2 = NULL;
-
- // else:
- } else {
- // ampl_repn._linear_terms_coef[e_var_name] = current_repn._constant * e_repn._linear_terms_coef[e_var_name]
- PyDict_SetItem(ampl_repn__ltc, e_var_name, _result);
- }
- Py_DECREF(_result); _result = NULL;
- }
-
- // cleanup
- Py_DECREF(e_repn__ltv);
- Py_DECREF(e_repn__ltc);
- Py_DECREF(ampl_repn__ltv);
- Py_DECREF(ampl_repn__ltc);
- }
-
- Py_DECREF(e_repn__constant);
- Py_DECREF(current_repn__constant);
- Py_DECREF(e_repn);
-
- // current_repn = ampl_repn
- Py_DECREF(current_repn);
- current_repn = *ampl_repn;
- }
- }
-
- // now deal with the product expression's coefficient that needs
- // to be applied to all parts of the ampl_repn
- // opt
- PyObject * exp_coef = PyObject_GetAttrString(exp, "coef");
- PyObject * quotient = PyNumber_Divide(exp_coef, denom);
- Py_DECREF(exp_coef);
-
- // ampl_repn._constant *= exp._coef/denom
- PyObject * ampl_repn__constant = PyObject_GetAttrString(*ampl_repn, "_constant");
- _result = PyNumber_Multiply(ampl_repn__constant, quotient);
- Py_DECREF(ampl_repn__constant);
- PyObject_SetAttrString(*ampl_repn, "_constant", _result);
- Py_DECREF(_result); _result = NULL;
-
- // for var_name in ampl_repn._linear_terms_coef:
- PyObject * ampl_repn__ltc = PyObject_GetAttrString(*ampl_repn, "_linear_terms_coef");
- PyObject * var_name, * _var;
- i = 0;
- // C NOTE: TODO this is scary. is this mutation allowed?
- while(PyDict_Next(ampl_repn__ltc, &i, &var_name, &_var)) {
- _result = PyNumber_Multiply(_var, quotient);
- PyDict_SetItem(ampl_repn__ltc, var_name, _result);
- Py_DECREF(_result); _result = NULL;
- }
- Py_DECREF(ampl_repn__ltc);
- Py_DECREF(quotient);
-
- // return ampl_repn
- assert((*ampl_repn)->ob_refcnt == 1);
- return TRUE;
-}
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/prodexp.h b/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/prodexp.h
deleted file mode 100644
index beae3d54002..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/prodexp.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#include
-#include "../../util.h"
-
-int _handle_prodexp(PyObject * context, PyObject * exp, PyObject ** ampl_repn);
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/sumexp.c b/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/sumexp.c
deleted file mode 100644
index 84c4b2f731d..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/sumexp.c
+++ /dev/null
@@ -1,136 +0,0 @@
-#include "sumexp.h"
-#include "../../cAmpl.h"
-
-int _handle_sumexp(PyObject * context, PyObject * exp, PyObject ** ampl_repn) {
- // Objects usable for temp calculations
- PyObject * _result, * _result2;
-
- // ampl_repn._constant = exp._const
- PyObject * exp__const = PyObject_GetAttrString(exp, "_const");
- PyObject_SetAttrString(*ampl_repn, "_constant", exp__const);
- Py_DECREF(exp__const);
-
- // ampl_repn._nonlinear_expr = None
- PyObject_SetAttrString(*ampl_repn, "_nonlinear_expr", Py_None);
-
- // for i in xrange(len(exp._args)):
- PyObject * exp__args = PyObject_GetAttrString(exp, "_args");
- Py_ssize_t len_exp__args = PySequence_Length(exp__args);
- Py_ssize_t i;
- PyObject * exp__coef = PyObject_GetAttrString(exp, "_coef"); // opt
- for(i = 0; i < len_exp__args; i++) {
- // exp_coef = exp._coef[i]
- PyObject * exp_coef = PySequence_GetItem(exp__coef, i);
-
- // child_repn = generate_ampl_repn(exp._args[i])
- PyObject * exp__args_i = PySequence_GetItem(exp__args, i);
- PyObject * child_repn = recursive_generate_ampl_repn(context, exp__args_i);
- if(child_repn == NULL) {
- Py_DECREF(exp__args_i);
- Py_DECREF(child_repn);
- Py_DECREF(exp_coef);
- Py_DECREF(exp__coef);
- Py_DECREF(exp__args);
- return ERROR;
- }
- Py_DECREF(exp__args_i);
-
- // adjust the constant
- // ampl_repn._constant += exp_coef * child_repn._constant
- PyObject * child_repn__constant = PyObject_GetAttrString(child_repn, "_constant");
- _result = PyNumber_Multiply(exp_coef, child_repn__constant);
- PyObject * ampl_repn__constant = PyObject_GetAttrString(*ampl_repn, "_constant");
- _result2 = PyNumber_Add(ampl_repn__constant, _result);
- PyObject_SetAttrString(*ampl_repn, "_constant", _result2);
- Py_DECREF(_result2); _result2 = NULL;
- Py_DECREF(ampl_repn__constant);
- Py_DECREF(_result); _result = NULL;
- Py_DECREF(child_repn__constant);
-
- // adjust the linear terms
- // for (var_name,var) in child_repn._linear_terms_var.iteritems():
- PyObject * child_repn__ltv = PyObject_GetAttrString(child_repn, "_linear_terms_var");
- PyObject * child_repn__ltc = PyObject_GetAttrString(child_repn, "_linear_terms_coef");
- PyObject * var_name, * var;
- Py_ssize_t pos = 0;
- while(PyDict_Next(child_repn__ltv, &pos, &var_name, &var)) {
- // if var_name in ampl_repn._linear_terms_var:
- PyObject * ampl_repn__ltv = PyObject_GetAttrString(*ampl_repn, "_linear_terms_var");
- PyObject * ampl_repn__ltc = PyObject_GetAttrString(*ampl_repn, "_linear_terms_coef");
-
- // opt
- PyObject * child_repn__ltc_vn = PyDict_GetItem(child_repn__ltc, var_name);
- _result = PyNumber_Multiply(exp_coef, child_repn__ltc_vn);
-
- if(PyMapping_HasKey(ampl_repn__ltv, var_name)) {
- // ampl_repn._linear_terms_coef[var_name] += exp_coef * child_repn._linear_terms_coef[var_name]
- PyObject * ampl_repn__ltc_vn = PyDict_GetItem(ampl_repn__ltc, var_name);
- _result2 = PyNumber_Add(ampl_repn__ltc_vn, _result);
-
- PyDict_SetItem(ampl_repn__ltc, var_name, _result2);
-
- Py_DECREF(ampl_repn__ltc_vn);
- Py_DECREF(_result2); _result2 = NULL;
- // else:
- } else {
- // ampl_repn._linear_terms_var[var_name] = var
- PyDict_SetItem(ampl_repn__ltv, var_name, var);
-
- // ampl_repn._linear_terms_coef[var_name] = exp_coef*child_repn._linear_terms_coef[var_name]
- PyDict_SetItem(ampl_repn__ltc, var_name, _result);
- }
-
- Py_DECREF(child_repn__ltc_vn);
- Py_DECREF(_result); _result = NULL;
-
- Py_DECREF(ampl_repn__ltv);
- Py_DECREF(ampl_repn__ltc);
- }
-
- Py_DECREF(child_repn__ltv);
- Py_DECREF(child_repn__ltc);
-
- // adjust the nonlinear terms
- // if not child_repn._nonlinear_expr is None:
- PyObject * child_repn__nle = PyObject_GetAttrString(child_repn, "_nonlinear_expr");
- if(child_repn__nle != Py_None) {
- // if ampl_repn._nonlinear_expr is None:
- PyObject * ampl_repn__nle = PyObject_GetAttrString(*ampl_repn, "_nonlinear_expr");
-
- // opt
- _result = Py_BuildValue("(OO)", exp_coef, child_repn__nle);
-
- if(ampl_repn__nle == Py_None) {
- // ampl_repn._nonlinear_expr = [(exp_coef, child_repn._nonlinear_expr)]
- _result2 = Py_BuildValue("[O]", _result);
- PyObject_SetAttrString(*ampl_repn, "_nonlinear_expr", _result2);
- Py_DECREF(_result2); _result2 = NULL;
- // else:
- } else {
- // ampl_repn._nonlinear_expr.append((exp_coef, child_repn._nonlinear_expr))
- PyList_Append(ampl_repn__nle, _result);
- }
- Py_DECREF(_result); _result = NULL;
- Py_DECREF(ampl_repn__nle);
- }
- Py_DECREF(child_repn__nle);
-
- // adjust the nonlinear vars
- // ampl_repn._nonlinear_vars.update(child_repn._nonlinear_vars)
- PyObject * ampl_repn__nlv = PyObject_GetAttrString(*ampl_repn, "_nonlinear_vars");
- PyObject * child_repn__nlv = PyObject_GetAttrString(child_repn, "_nonlinear_vars");
- PyObject_CallMethod(ampl_repn__nlv, "update", "(O)", child_repn__nlv);
- Py_DECREF(child_repn__nlv);
- Py_DECREF(ampl_repn__nlv);
-
- // cleanup
- Py_DECREF(exp_coef);
- Py_DECREF(child_repn);
- }
-
- Py_DECREF(exp__coef);
- Py_DECREF(exp__args);
-
- assert((*ampl_repn)->ob_refcnt == 1);
- return TRUE;
-}
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/sumexp.h b/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/sumexp.h
deleted file mode 100644
index 209f44a9a4e..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers/expression/sumexp.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#include
-#include "../../util.h"
-
-int _handle_sumexp(PyObject * context, PyObject * exp, PyObject ** ampl_repn);
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers/fixedval.c b/pyomo/repn/plugins/ampl/cAmpl/handlers/fixedval.c
deleted file mode 100644
index e785b2a5365..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers/fixedval.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include "fixedval.h"
-
-int _handle_fixedval(PyObject * context, PyObject * exp, PyObject ** ampl_repn) {
- // ampl_repn._constant = exp.value
- PyObject * exp_value = PyObject_GetAttrString(exp, "value");
- PyObject_SetAttrString(*ampl_repn, "_constant", exp_value);
- Py_DECREF(exp_value);
-
- return TRUE;
-}
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers/fixedval.h b/pyomo/repn/plugins/ampl/cAmpl/handlers/fixedval.h
deleted file mode 100644
index f11b809f1cc..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers/fixedval.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#include
-#include "../util.h"
-
-int _handle_fixedval(PyObject * context, PyObject * exp, PyObject ** ampl_repn);
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers/variable.c b/pyomo/repn/plugins/ampl/cAmpl/handlers/variable.c
deleted file mode 100644
index e8cca0c5ce5..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers/variable.c
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "variable.h"
-
-int _handle_variable(PyObject * context, PyObject * exp, PyObject ** ampl_repn) {
- // if exp.fixed:
- PyObject * exp_fixed = PyObject_GetAttrString(exp, "fixed");
- if(exp_fixed != NULL && PyObject_IsTrue(exp_fixed)) {
- // ampl_repn._constant = exp.value
- PyObject * exp_value = PyObject_GetAttrString(exp, "value");
- PyObject_SetAttrString(*ampl_repn, "_constant", exp_value);
-
- // return ampl_repn
- Py_DECREF(exp_value);
- Py_DECREF(exp_fixed);
- return TRUE;
- }
-
- PyObject * exp_name = PyObject_GetAttrString(exp, "name");
-
- // ampl_repn._linear_terms_coef[exp.name] = 1.0
- PyObject * _linear_terms_coef = PyObject_GetAttrString(*ampl_repn, "_linear_terms_coef");
- PyObject * one = Py_BuildValue("f", 1.0);
- PyDict_SetItem(_linear_terms_coef, exp_name, one);
- Py_DECREF(_linear_terms_coef);
-
- // ampl_repn._linear_terms_var[exp.name] = exp
- PyObject * _linear_terms_var = PyObject_GetAttrString(*ampl_repn, "_linear_terms_var");
- PyDict_SetItem(_linear_terms_var, exp_name, exp);
- Py_DECREF(_linear_terms_var);
-
- // Should return generated ampl_repn
- Py_DECREF(exp_name);
- return TRUE;
-}
diff --git a/pyomo/repn/plugins/ampl/cAmpl/handlers/variable.h b/pyomo/repn/plugins/ampl/cAmpl/handlers/variable.h
deleted file mode 100644
index 8a3e53699e1..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/handlers/variable.h
+++ /dev/null
@@ -1,4 +0,0 @@
-#include
-#include "../util.h"
-
-int _handle_variable(PyObject * context, PyObject * exp, PyObject ** ampl_repn);
diff --git a/pyomo/repn/plugins/ampl/cAmpl/setup.py b/pyomo/repn/plugins/ampl/cAmpl/setup.py
deleted file mode 100644
index f6a6c319217..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/setup.py
+++ /dev/null
@@ -1,18 +0,0 @@
-from distutils.core import setup, Extension
-
-import os
-import fnmatch
-
-sourceFiles = []
-for root, dirnames, filenames in os.walk('.'):
- for filename in fnmatch.filter(filenames, "*.c"):
- sourceFiles.append(os.path.join(root, filename))
-
-# Enable for debug only
-eca = ['-Werror', '-O3']
-cAmpl = Extension('cAmpl', sources = sourceFiles, extra_compile_args = eca)
-
-setup( name = 'cAmpl',
- version = '0.1',
- description = 'C AMPL representation generator',
- ext_modules = [cAmpl] )
diff --git a/pyomo/repn/plugins/ampl/cAmpl/util.c b/pyomo/repn/plugins/ampl/cAmpl/util.c
deleted file mode 100644
index 0340656958a..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/util.c
+++ /dev/null
@@ -1,173 +0,0 @@
-#include
-#include "util.h"
-
-/**
- * Print the current Python environment within which the calling C code
- * is executing, including:
- *
- * - The list of builtins available in the current scope
- * - The list of global variables available
- * - The list of local variables defined in the current scope
- *
- * Flushes standard output before returning.
- */
-void dump_env() {
- printf("Builtins: ");
- PyObject_Print(PyEval_GetBuiltins(), stdout, Py_PRINT_RAW);
- printf("\n\n");
-
- printf("Globals: ");
- PyObject_Print(PyEval_GetGlobals(), stdout, Py_PRINT_RAW);
- printf("\n\n");
-
- printf("Locals: ");
- PyObject_Print(PyEval_GetLocals(), stdout, Py_PRINT_RAW);
- printf("\n\n");
- fflush(stdout);
-}
-
-/**
- * Print the type of the Python object arg. Properly handles
- * NULL arguments (so any PyObject * pointer may be
- * passed), and if the argument is an instance of a class, will also
- * print the class itself.
- *
- * Flushes standard output before returning.
- *
- * @param arg The Python object whose type to print.
- */
-void dump_type(PyObject * arg) {
- if(arg == NULL) {
- printf("null\n");
- return;
- }
-
- PyObject * arg_type = PyObject_Type(arg);
- PyObject_Print(arg_type, stdout, 0);
- if(PyInstance_Check(arg)) {
- printf(": ");
- PyObject * arg_cls = PyObject_GetAttrString(arg, "__class__");
- PyObject_Print(arg_cls, stdout, 0);
- Py_DECREF(arg_cls);
- }
- printf("\n");
- Py_DECREF(arg_type);
- fflush(stdout);
-}
-
-/**
- * Print the list of attributes currently defined on the Python object
- * arg. Equivalent to calling print(dir(arg)) in pure
- * Python.
- *
- * Flushes standard output before returning.
- *
- * @param arg The Python object whose attributes to print.
- */
-void dump_dir(PyObject * arg) {
- if(arg == NULL) {
- printf("null\n");
- return;
- }
- PyObject * dir_arg = PyObject_Dir(arg);
- PyObject_Print(dir_arg, stdout, 0); printf("\n\n");
- Py_XDECREF(dir_arg);
- fflush(stdout);
-}
-
-/**
- * Print the current reference count of the Python object arg.
- * Properly handles NULL arguments (so any PyObject *
- * pointer may be passed).
- *
- * Flushes standard output before returning.
- *
- * @param arg The Python object whose reference count to print.
- * @see dump_refcnt_l()
- * @see dump_refcnt_lw()
- */
-void dump_refcnt(PyObject * arg) {
- if(arg == NULL) {
- printf("Null object has no refcount\n");
- } else {
- printf("Object has refcount %ld\n", Py_SAFE_DOWNCAST(arg->ob_refcnt, Py_ssize_t, long));
- }
- fflush(stdout);
-}
-
-/**
- * Prints the reference count of the Python object arg as named
- * by the string label. Useful for debugging when distinguishing
- * between reference counts on multiple objects.
- *
- * Flushes standard output before returning.
- *
- * @param arg The Python object whose reference count to print.
- * @param label The name of the Python object arg.
- * @see dump_refcnt()
- * @see dump_refcnt_lw()
- */
-void dump_refcnt_l(PyObject * arg, const char * label) {
- if(arg == NULL) {
- printf("Null %s object has no refcount\n", label);
- } else {
- printf("%s object has refcount %ld\n", label, Py_SAFE_DOWNCAST(arg->ob_refcnt, Py_ssize_t, long));
- }
- fflush(stdout);
-}
-
-/**
- * Prints the reference count of the Python object arg as named
- * by the string label. Takes an additional "temporal" label
- * when, which specifies (as a human-readable string) the point in
- * program execution when the reference count is printed. Useful for debugging
- * when distinguishing reference counts on the same object across function
- * calls or other code blocks.
- *
- * Flushes standard output before returning.
- *
- * @param arg The Python object whose reference count to print.
- * @param label The name of the Python object arg.
- * @param when The label of the time within program execution when the
- * reference count is printed.
- * @see dump_refcnt()
- * @see dump_refcnt_l()
- */
-void dump_refcnt_lw(PyObject * arg, const char * label, const char * when) {
- if(arg == NULL) {
- printf("%s, null %s object has no refcount\n", when, label);
- } else {
- printf("%s, %s object has refcount %ld\n", when, label, Py_SAFE_DOWNCAST(arg->ob_refcnt, Py_ssize_t, long));
- }
- fflush(stdout);
-}
-
-/**
- * Print the given message. Flushes standard output before returning.
- * Useful as a faster-to-code alternative to printf() and
- * fflush().
- *
- * @param msg The message to print
- * @see dump_msg_va()
- */
-void dump_msg(const char * msg) {
- printf(msg);
- fflush(stdout);
-}
-
-/**
- * Print the given message, formatted with the given arguments in standard
- * printf() style. Flushes standard output before returning. Useful
- * as a faster-to-code alternative to printf() and fflush().
- *
- * @param fmt The format string to print
- * @param ... Additional arguments to apply to the format string
- * @see dump_msg()
- */
-void dump_msg_va(const char * fmt, ...) {
- va_list args;
- va_start(args, fmt);
- vprintf(fmt, args);
- va_end(args);
- fflush(stdout);
-}
diff --git a/pyomo/repn/plugins/ampl/cAmpl/util.h b/pyomo/repn/plugins/ampl/cAmpl/util.h
deleted file mode 100644
index 6a5b096f80e..00000000000
--- a/pyomo/repn/plugins/ampl/cAmpl/util.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef _CAMPL_UTIL_H
-#define _CAMPL_UTIL_H
-
-void dump_env();
-void dump_type(PyObject * arg);
-void dump_dir(PyObject * arg);
-
-void dump_refcnt(PyObject * arg);
-void dump_refcnt_l(PyObject * arg, const char * label);
-void dump_refcnt_lw(PyObject * arg, const char * label, const char * when);
-
-void dump_msg(const char * msg);
-void dump_msg_va(const char * fmt, ...);
-
-#define ERROR (-1)
-#define FALSE (0)
-#define TRUE (1)
-
-#endif
diff --git a/pyomo/repn/plugins/baron_writer.py b/pyomo/repn/plugins/baron_writer.py
index a2067b2ac05..f74fabd1f3d 100644
--- a/pyomo/repn/plugins/baron_writer.py
+++ b/pyomo/repn/plugins/baron_writer.py
@@ -14,10 +14,15 @@
import logging
import itertools
+from six import iteritems, StringIO, iterkeys
+from six.moves import xrange
+from pyutilib.math import isclose
import pyomo.util.plugin
from pyomo.opt import ProblemFormat
from pyomo.opt.base import AbstractProblemWriter
+from pyomo.core.expr.numvalue import is_fixed, value, as_numeric, native_numeric_types, native_types
+from pyomo.core.expr import current as EXPR
from pyomo.core.base import (SortComponents,
SymbolMap,
AlphaNumericTextLabeler,
@@ -25,20 +30,100 @@
BooleanSet, Constraint,
IntegerSet, Objective,
Var, Param)
-from pyomo.core.base.numvalue import is_fixed, value, as_numeric
from pyomo.core.base.set_types import *
#CLH: EXPORT suffixes "constraint_types" and "branching_priorities"
# pass their respective information to the .bar file
import pyomo.core.base.suffix
-from pyomo.repn import LinearCanonicalRepn
import pyomo.core.kernel.component_suffix
from pyomo.core.kernel.component_block import IBlockStorage
+logger = logging.getLogger('pyomo.core')
+
+
+#
+# A visitor pattern that creates a string for an expression
+# that is compatible with the BARON syntax.
+#
+class ToBaronVisitor(EXPR.ExpressionValueVisitor):
+
+ def __init__(self, variables, smap):
+ super(ToBaronVisitor, self).__init__()
+ self.variables = variables
+ self.smap = smap
+
+ def visit(self, node, values):
+ """ Visit nodes that have been expanded """
+ tmp = []
+ for i,val in enumerate(values):
+ arg = node._args_[i]
+
+ if arg is None:
+ tmp.append('Undefined')
+ elif arg.__class__ in native_numeric_types:
+ tmp.append(val)
+ elif arg.__class__ in native_types:
+ tmp.append("'{0}'".format(val))
+ elif arg.is_variable_type():
+ tmp.append(val)
+ elif arg.is_expression_type() and node._precedence() < arg._precedence():
+ tmp.append("({0})".format(val))
+ else:
+ tmp.append(val)
+
+ if node.__class__ is EXPR.LinearExpression:
+ for v in node.linear_vars:
+ self.variables.add(id(v))
+
+ if node.__class__ is EXPR.ProductExpression:
+ return "{0} * {1}".format(tmp[0], tmp[1])
+ elif node.__class__ is EXPR.MonomialTermExpression:
+ if tmp[0] == '-1':
+ # It seems dumb to construct a temporary NegationExpression object
+ # Should we copy the logic from that function here?
+ return EXPR.NegationExpression._to_string(EXPR.NegationExpression((None,)), [tmp[1]], None, self.smap, True)
+ else:
+ return "{0} * {1}".format(tmp[0], tmp[1])
+ elif node.__class__ is EXPR.PowExpression:
+ return "{0} ^ {1}".format(tmp[0], tmp[1])
+ else:
+ return node._to_string(tmp, None, self.smap, True)
+
+ def visiting_potential_leaf(self, node):
+ """
+ Visiting a potential leaf.
+
+ Return True if the node is not expanded.
+ """
+ #print("ISLEAF")
+ #print(node.__class__)
+ if node is None:
+ return True, None
+
+ if node.__class__ in native_types:
+ return True, str(node)
+
+ if node.is_variable_type():
+ if node.fixed:
+ return True, str(value(node))
+ self.variables.add(id(node))
+ label = self.smap.getSymbol(node)
+ return True, label
+
+ if not node.is_expression_type():
+ return True, str(value(node))
+
+ return False, None
+
+
+def expression_to_string(expr, variables, labeler=None, smap=None):
+ if labeler is not None:
+ if smap is None:
+ smap = SymbolMap()
+ smap.default_labeler = labeler
+ visitor = ToBaronVisitor(variables, smap)
+ return visitor.dfs_postorder_stack(expr)
-from six import iteritems, StringIO, iterkeys
-from six.moves import xrange
-logger = logging.getLogger('pyomo.core')
# TODO: The to_string function is handy, but the fact that
# it calls .name under the hood for all components
@@ -91,11 +176,7 @@ def _write_equations_section(self,
all_blocks_list,
active_components_data_var,
symbol_map,
- labeler,
- create_symbol_func,
- create_symbols_func,
- alias_symbol_func,
- object_symbol_dictionary,
+ c_labeler,
output_fixed_variable_bounds,
skip_trivial_constraints,
sorter):
@@ -109,14 +190,8 @@ def _skip_trivial(constraint_data):
if (repn.variables is None) or \
(len(repn.variables) == 0):
return True
- elif isinstance(constraint_data, LinearCanonicalRepn):
- repn = constraint_data
- if (repn.variables is None) or \
- (len(repn.variables) == 0):
- return True
- else:
- if constraint_data.body.polynomial_degree() == 0:
- return True
+ elif constraint_data.body.polynomial_degree() == 0:
+ return True
return False
#
@@ -161,20 +236,6 @@ def _skip_trivial(constraint_data):
non_standard_eqns = r_o_eqns + c_eqns + l_eqns
- # GAH 1/5/15: Substituting all non-alphanumeric characters for underscore
- # in labeler so this manual update should no longer be needed
- #
- # If the text labeler is used, correct the labels to be
- # baron-allowed variable names
- # Change '(' and ')' to '__'
- # This way, for simple variable names like 'x(1_2)' --> 'x__1_2__'
- # FIXME: 7/21/14 This may break if users give variable names
- # with two or more underscores together
- #if symbolic_solver_labels:
- # for key,label in iteritems(object_symbol_dictionary):
- # label = label.replace('(','___')
- # object_symbol_dictionary[key] = label.replace(')','__')
-
#
# EQUATIONS
#
@@ -203,7 +264,6 @@ def _skip_trivial(constraint_data):
sort=sorter,
descend_into=False):
-
if (not constraint_data.has_lb()) and \
(not constraint_data.has_ub()):
assert not constraint_data.equality
@@ -214,13 +274,11 @@ def _skip_trivial(constraint_data):
eqns.append(constraint_data)
- con_symbol = \
- create_symbol_func(symbol_map, constraint_data, labeler)
+ con_symbol = symbol_map.createSymbol(constraint_data, c_labeler)
assert not con_symbol.startswith('.')
assert con_symbol != "c_e_FIX_ONE_VAR_CONST__"
- alias_symbol_func(symbol_map,
- constraint_data,
+ symbol_map.alias(constraint_data,
alias_template % order_counter)
output_file.write(", "+str(con_symbol))
order_counter += 1
@@ -230,11 +288,10 @@ def _skip_trivial(constraint_data):
if n_roeqns > 0:
output_file.write('RELAXATION_ONLY_EQUATIONS ')
for i, constraint_data in enumerate(r_o_eqns):
- con_symbol = create_symbol_func(symbol_map, constraint_data, labeler)
+ con_symbol = symbol_map.createSymbol(constraint_data, c_labeler)
assert not con_symbol.startswith('.')
assert con_symbol != "c_e_FIX_ONE_VAR_CONST__"
- alias_symbol_func(symbol_map,
- constraint_data,
+ symbol_map.alias(constraint_data,
alias_template % order_counter)
if i == n_roeqns-1:
output_file.write(str(con_symbol)+';\n\n')
@@ -245,11 +302,10 @@ def _skip_trivial(constraint_data):
if n_ceqns > 0:
output_file.write('CONVEX_EQUATIONS ')
for i, constraint_data in enumerate(c_eqns):
- con_symbol = create_symbol_func(symbol_map, constraint_data, labeler)
+ con_symbol = symbol_map.createSymbol(constraint_data, c_labeler)
assert not con_symbol.startswith('.')
assert con_symbol != "c_e_FIX_ONE_VAR_CONST__"
- alias_symbol_func(symbol_map,
- constraint_data,
+ symbol_map.alias(constraint_data,
alias_template % order_counter)
if i == n_ceqns-1:
output_file.write(str(con_symbol)+';\n\n')
@@ -260,11 +316,10 @@ def _skip_trivial(constraint_data):
if n_leqns > 0:
output_file.write('LOCAL_EQUATIONS ')
for i, constraint_data in enumerate(l_eqns):
- con_symbol = create_symbol_func(symbol_map, constraint_data, labeler)
+ con_symbol = symbol_map.createSymbol(constraint_data, c_labeler)
assert not con_symbol.startswith('.')
assert con_symbol != "c_e_FIX_ONE_VAR_CONST__"
- alias_symbol_func(symbol_map,
- constraint_data,
+ symbol_map.alias(constraint_data,
alias_template % order_counter)
if i == n_leqns-1:
output_file.write(str(con_symbol)+';\n\n')
@@ -299,33 +354,38 @@ def mutable_param_gen(b):
for param_data in param_data_iter:
yield param_data
- vstring_to_var_dict = {}
- vstring_to_bar_dict = {}
- pstring_to_bar_dict = {}
- _val_template = ' %'+self._precision_string+' '
- for block in all_blocks_list:
- for var_data in active_components_data_var[id(block)]:
- variable_stream = StringIO()
- var_data.to_string(ostream=variable_stream, verbose=False)
- variable_string = variable_stream.getvalue()
- variable_string = ' '+variable_string+' '
- vstring_to_var_dict[variable_string] = var_data
- if output_fixed_variable_bounds or (not var_data.fixed):
- vstring_to_bar_dict[variable_string] = \
- ' '+object_symbol_dictionary[id(var_data)]+' '
- else:
- assert var_data.value is not None
- vstring_to_bar_dict[variable_string] = \
- (_val_template % (var_data.value,))
+ if False:
+ #
+ # This was part of a merge from master that caused
+ # test failures. But commenting this out didn't cause additional failures!?!
+ #
+ vstring_to_var_dict = {}
+ vstring_to_bar_dict = {}
+ pstring_to_bar_dict = {}
+ _val_template = ' %'+self._precision_string+' '
+ for block in all_blocks_list:
+ for var_data in active_components_data_var[id(block)]:
+ variable_stream = StringIO()
+ var_data.to_string(ostream=variable_stream, verbose=False)
+ variable_string = variable_stream.getvalue()
+ variable_string = ' '+variable_string+' '
+ vstring_to_var_dict[variable_string] = var_data
+ if output_fixed_variable_bounds or (not var_data.fixed):
+ vstring_to_bar_dict[variable_string] = \
+ ' '+object_symbol_dictionary[id(var_data)]+' '
+ else:
+ assert var_data.value is not None
+ vstring_to_bar_dict[variable_string] = \
+ (_val_template % (var_data.value,))
- for param_data in mutable_param_gen(block):
- param_stream = StringIO()
- param_data.to_string(ostream=param_stream, verbose=False)
- param_string = param_stream.getvalue()
+ for param_data in mutable_param_gen(block):
+ param_stream = StringIO()
+ param_data.to_string(ostream=param_stream, verbose=False)
+ param_string = param_stream.getvalue()
- param_string = ' '+param_string+' '
- pstring_to_bar_dict[param_string] = \
- (_val_template % (param_data(),))
+ param_string = ' '+param_string+' '
+ pstring_to_bar_dict[param_string] = \
+ (_val_template % (param_data(),))
# Equation Definition
string_template = '%'+self._precision_string
@@ -335,62 +395,15 @@ def mutable_param_gen(b):
c_eqns,
l_eqns):
- #########################
- #CLH: The section below is kind of a hack-y way to use
- # the expr.to_string function to print
- # expressions. A stream is created, writen to, and
- # then the string is recovered and stored in
- # eqn_body. Then the variable names are converted
- # to match the variable names that are used in the
- # bar file.
-
- # Fill in the body of the equation
- body_string_buffer = StringIO()
-
- if constraint_data.body is None:
- continue
- as_numeric(constraint_data.body).to_string(
- ostream=body_string_buffer,
- verbose=False)
- eqn_body = body_string_buffer.getvalue()
-
- # First, pad the equation so that if there is a
- # variable name at the start or end of the equation,
- # it can still be identified as padded with spaces.
-
- # Second, change pyomo's ** to baron's ^, also with
- # padding so that variable can always be found with
- # space around them
-
- # Third, add more padding around multiplication. Pyomo
- # already has spaces between variable on variable
- # multiplication, but not for constants on variables
- eqn_body = ' '+eqn_body+' '
- eqn_body = eqn_body.replace('**',' ^ ')
- eqn_body = eqn_body.replace('*', ' * ')
-
+ variables = set()
+ #print(symbol_map.byObject.keys())
+ eqn_body = expression_to_string(constraint_data.body, variables, smap=symbol_map)
+ #print(symbol_map.byObject.keys())
+ referenced_variable_ids.update(variables)
- #
- # FIXME: The following block of code is extremely inefficient.
- # We are looping through every parameter and variable in
- # the model each time we write a constraint expression.
- #
- ################################################
- vnames = [(variable_string, bar_string)
- for variable_string, bar_string in iteritems(vstring_to_bar_dict)
- if variable_string in eqn_body]
- for variable_string, bar_string in vnames:
- var_data = vstring_to_var_dict[variable_string]
- if output_fixed_variable_bounds or (not var_data.fixed):
- referenced_variable_ids.add(id(var_data))
- eqn_body = eqn_body.replace(variable_string, bar_string)
- for param_string, bar_string in iteritems(pstring_to_bar_dict):
- eqn_body = eqn_body.replace(param_string, bar_string)
- ################################################
-
- if len(vnames) == 0:
+ if len(variables) == 0:
assert not skip_trivial_constraints
- eqn_body += "+ 0 * ONE_VAR_CONST__ "
+ eqn_body += " + 0 * ONE_VAR_CONST__ "
# 7/29/14 CLH:
#FIXME: Baron doesn't handle many of the
@@ -402,7 +415,7 @@ def mutable_param_gen(b):
# useful.
##########################
- con_symbol = object_symbol_dictionary[id(constraint_data)]
+ con_symbol = symbol_map.byObject[id(constraint_data)]
output_file.write(str(con_symbol) + ': ')
# Fill in the left and right hand side (constants) of
@@ -464,46 +477,23 @@ def mutable_param_gen(b):
% (model.name))
# create symbol
- create_symbol_func(symbol_map, objective_data, labeler)
- alias_symbol_func(symbol_map, objective_data, "__default_objective__")
+ symbol_map.createSymbol(objective_data, c_labeler)
+ symbol_map.alias(objective_data, "__default_objective__")
if objective_data.is_minimizing():
output_file.write("minimize ")
else:
output_file.write("maximize ")
- #FIXME 7/18/14 See above, constraint writing
- # section. Will cause problems if there
- # are spaces in variables
- # Similar to the constraints section above, the
- # objective is generated from the expr.to_string
- # function.
- obj_stream = StringIO()
- objective_data.expr.to_string(ostream=obj_stream, verbose=False)
-
- obj_string = ' '+obj_stream.getvalue()+' '
- obj_string = obj_string.replace('**',' ^ ')
- obj_string = obj_string.replace('*', ' * ')
-
- #
- # FIXME: The following block of code is extremely inefficient.
- # We are looping through every parameter and variable in
- # the model each time we write an expression.
- #
- ################################################
- vnames = [(variable_string, bar_string)
- for variable_string, bar_string in iteritems(vstring_to_bar_dict)
- if variable_string in obj_string]
- for variable_string, bar_string in vnames:
- var_data = var_data = vstring_to_var_dict[variable_string]
- if output_fixed_variable_bounds or (not var_data.fixed):
- referenced_variable_ids.add(id(var_data))
- obj_string = obj_string.replace(variable_string, bar_string)
- for param_string, bar_string in iteritems(pstring_to_bar_dict):
- obj_string = obj_string.replace(param_string, bar_string)
- ################################################
+ variables = set()
+ #print(symbol_map.byObject.keys())
+ obj_string = expression_to_string(objective_data.expr, variables, smap=symbol_map)
+ #print(symbol_map.byObject.keys())
+ referenced_variable_ids.update(variables)
+
output_file.write(obj_string+";\n\n")
+ #referenced_variable_ids.update(symbol_map.byObject.keys())
return referenced_variable_ids, branching_priorities_suffixes
@@ -585,17 +575,15 @@ def __call__(self,
output_file.write("}\n\n")
if symbolic_solver_labels:
- labeler = AlphaNumericTextLabeler()
+ v_labeler = AlphaNumericTextLabeler()
+ c_labeler = AlphaNumericTextLabeler()
elif labeler is None:
- labeler = NumericLabeler('x')
+ v_labeler = NumericLabeler('x')
+ c_labeler = NumericLabeler('c')
symbol_map = SymbolMap()
- sm_bySymbol = symbol_map.bySymbol
-
- #cache frequently called functions
- create_symbol_func = SymbolMap.createSymbol
- create_symbols_func = SymbolMap.createSymbols
- alias_symbol_func = SymbolMap.alias
+ symbol_map.default_labeler = v_labeler
+ #sm_bySymbol = symbol_map.bySymbol
# Cache the list of model blocks so we don't have to call
# model.block_data_objects() many many times, which is slow
@@ -604,12 +592,12 @@ def __call__(self,
sort=sorter,
descend_into=True))
active_components_data_var = {}
- for block in all_blocks_list:
- tmp = active_components_data_var[id(block)] = \
- list(obj for obj in block.component_data_objects(Var,
- sort=sorter,
- descend_into=False))
- create_symbols_func(symbol_map, tmp, labeler)
+ #for block in all_blocks_list:
+ # tmp = active_components_data_var[id(block)] = \
+ # list(obj for obj in block.component_data_objects(Var,
+ # sort=sorter,
+ # descend_into=False))
+ # create_symbols_func(symbol_map, tmp, labeler)
# GAH: Not sure this is necessary, and also it would break for
# non-mutable indexed params so I am commenting out for now.
@@ -618,8 +606,8 @@ def __call__(self,
#if not param_data.is_constant():
# create_symbol_func(symbol_map, param_data, labeler)
- symbol_map_variable_ids = set(symbol_map.byObject.keys())
- object_symbol_dictionary = symbol_map.byObject
+ #symbol_map_variable_ids = set(symbol_map.byObject.keys())
+ #object_symbol_dictionary = symbol_map.byObject
#
# Go through the objectives and constraints and generate
@@ -634,11 +622,7 @@ def __call__(self,
all_blocks_list,
active_components_data_var,
symbol_map,
- labeler,
- create_symbol_func,
- create_symbols_func,
- alias_symbol_func,
- object_symbol_dictionary,
+ c_labeler,
output_fixed_variable_bounds,
skip_trivial_constraints,
sorter)
@@ -651,128 +635,113 @@ def __call__(self,
IntVars = []
PosVars = []
Vars = []
- for block in all_blocks_list:
- for var_data in active_components_data_var[id(block)]:
-
- if id(var_data) not in referenced_variable_ids:
- continue
-
- if var_data.is_continuous():
- if var_data.has_lb() and \
- (self._get_bound(var_data.lb) >= 0):
- TypeList = PosVars
- else:
- TypeList = Vars
- elif var_data.is_binary():
- TypeList = BinVars
- elif var_data.is_integer():
- TypeList = IntVars
+ for vid in referenced_variable_ids:
+ name = symbol_map.byObject[vid]
+ var_data = symbol_map.bySymbol[name]()
+
+ if var_data.is_continuous():
+ if var_data.has_lb() and \
+ (self._get_bound(var_data.lb) >= 0):
+ TypeList = PosVars
else:
- assert False
-
- var_name = object_symbol_dictionary[id(var_data)]
- #if len(var_name) > 15:
- # logger.warning(
- # "Variable symbol '%s' for variable %s exceeds maximum "
- # "character limit for BARON. Solver may fail"
- # % (var_name, var_data.name))
-
- TypeList.append(var_name)
+ TypeList = Vars
+ elif var_data.is_binary():
+ TypeList = BinVars
+ elif var_data.is_integer():
+ TypeList = IntVars
+ else:
+ assert False
+ TypeList.append(name)
if len(BinVars) > 0:
+ BinVars.sort()
output_file.write('BINARY_VARIABLES ')
- for var_name in BinVars[:-1]:
- output_file.write(str(var_name)+', ')
- output_file.write(str(BinVars[-1])+';\n\n')
+ output_file.write(", ".join(BinVars))
+ output_file.write(';\n\n')
+
if len(IntVars) > 0:
+ IntVars.sort()
output_file.write('INTEGER_VARIABLES ')
- for var_name in IntVars[:-1]:
- output_file.write(str(var_name)+', ')
- output_file.write(str(IntVars[-1])+';\n\n')
+ output_file.write(", ".join(IntVars))
+ output_file.write(';\n\n')
+ PosVars.append('ONE_VAR_CONST__')
+ PosVars.sort()
output_file.write('POSITIVE_VARIABLES ')
- output_file.write('ONE_VAR_CONST__')
- for var_name in PosVars:
- output_file.write(', '+str(var_name))
+ output_file.write(", ".join(PosVars))
output_file.write(';\n\n')
if len(Vars) > 0:
+ Vars.sort()
output_file.write('VARIABLES ')
- for var_name in Vars[:-1]:
- output_file.write(str(var_name)+', ')
- output_file.write(str(Vars[-1])+';\n\n')
+ output_file.write(", ".join(Vars))
+ output_file.write(';\n\n')
#
# LOWER_BOUNDS
#
- LowerBoundHeader = False
- for block in all_blocks_list:
- for var_data in active_components_data_var[id(block)]:
-
- if id(var_data) not in referenced_variable_ids:
- continue
+ lbounds = {}
+ for vid in referenced_variable_ids:
+ name = symbol_map.byObject[vid]
+ var_data = symbol_map.bySymbol[name]()
- if var_data.fixed:
- if output_fixed_variable_bounds:
- var_data_lb = var_data.value
- else:
- var_data_lb = None
+ if var_data.fixed:
+ if output_fixed_variable_bounds:
+ var_data_lb = var_data.value
else:
var_data_lb = None
- if var_data.has_lb():
- var_data_lb = self._get_bound(var_data.lb)
-
- if var_data_lb is not None:
- if LowerBoundHeader is False:
- output_file.write("LOWER_BOUNDS{\n")
- LowerBoundHeader = True
- name_to_output = object_symbol_dictionary[id(var_data)]
- lb_string_template = '%s: %'+self._precision_string+';\n'
- output_file.write(lb_string_template
- % (name_to_output, var_data_lb))
-
- if LowerBoundHeader:
+ else:
+ var_data_lb = None
+ if var_data.has_lb():
+ var_data_lb = self._get_bound(var_data.lb)
+
+ if var_data_lb is not None:
+ name_to_output = symbol_map.getSymbol(var_data)
+ lb_string_template = '%s: %'+self._precision_string+';\n'
+ lbounds[name_to_output] = lb_string_template % (name_to_output, var_data_lb)
+
+ if len(lbounds) > 0:
+ output_file.write("LOWER_BOUNDS{\n")
+ output_file.write("".join( lbounds[key] for key in sorted(lbounds.keys()) ) )
output_file.write("}\n\n")
+ lbounds = None
#
# UPPER_BOUNDS
#
- UpperBoundHeader = False
- for block in all_blocks_list:
- for var_data in active_components_data_var[id(block)]:
-
- if id(var_data) not in referenced_variable_ids:
- continue
+ ubounds = {}
+ for vid in referenced_variable_ids:
+ name = symbol_map.byObject[vid]
+ var_data = symbol_map.bySymbol[name]()
- if var_data.fixed:
- if output_fixed_variable_bounds:
- var_data_ub = var_data.value
- else:
- var_data_ub = None
+ if var_data.fixed:
+ if output_fixed_variable_bounds:
+ var_data_ub = var_data.value
else:
var_data_ub = None
- if var_data.has_ub():
- var_data_ub = self._get_bound(var_data.ub)
-
- if var_data_ub is not None:
- if UpperBoundHeader is False:
- output_file.write("UPPER_BOUNDS{\n")
- UpperBoundHeader = True
- name_to_output = object_symbol_dictionary[id(var_data)]
- ub_string_template = '%s: %'+self._precision_string+';\n'
- output_file.write(ub_string_template
- % (name_to_output, var_data_ub))
-
- if UpperBoundHeader:
+ else:
+ var_data_ub = None
+ if var_data.has_ub():
+ var_data_ub = self._get_bound(var_data.ub)
+
+ if var_data_ub is not None:
+ name_to_output = symbol_map.getSymbol(var_data)
+ ub_string_template = '%s: %'+self._precision_string+';\n'
+ ubounds[name_to_output] = ub_string_template % (name_to_output, var_data_ub)
+
+ if len(ubounds) > 0:
+ output_file.write("UPPER_BOUNDS{\n")
+ output_file.write("".join( ubounds[key] for key in sorted(ubounds.keys()) ) )
output_file.write("}\n\n")
+ ubounds = None
#
# BRANCHING_PRIORITIES
#
- # Specifyig priorities requires that the pyomo model has established an
+ # Specifying priorities requires that the pyomo model has established an
# EXTERNAL, float suffix called 'branching_priorities' on the model
# object, indexed by the relevant variable
BranchingPriorityHeader = False
@@ -784,7 +753,7 @@ def __call__(self,
if not BranchingPriorityHeader:
output_file.write('BRANCHING_PRIORITIES{\n')
BranchingPriorityHeader = True
- name_to_output = object_symbol_dictionary[id(var_data)]
+ name_to_output = symbol_map.getSymbol(var_data)
output_file.write(name_to_output+': '+str(priority)+';\n')
if BranchingPriorityHeader:
@@ -799,33 +768,21 @@ def __call__(self,
# STARTING_POINT
#
output_file.write('STARTING_POINT{\nONE_VAR_CONST__: 1;\n')
+ tmp = {}
string_template = '%s: %'+self._precision_string+';\n'
- for block in all_blocks_list:
- for var_data in active_components_data_var[id(block)]:
+ for vid in referenced_variable_ids:
+ name = symbol_map.byObject[vid]
+ var_data = symbol_map.bySymbol[name]()
- if id(var_data) not in referenced_variable_ids:
- continue
-
- starting_point = var_data.value
- if starting_point is not None:
- var_name = object_symbol_dictionary[id(var_data)]
- output_file.write(string_template % (var_name, starting_point))
+ starting_point = var_data.value
+ if starting_point is not None:
+ var_name = symbol_map.getSymbol(var_data)
+ tmp[var_name] = string_template % (var_name, starting_point)
+ output_file.write("".join( tmp[key] for key in sorted(tmp.keys()) ))
output_file.write('}\n\n')
output_file.close()
- # Clean up the symbol map to only contain variables referenced
- # in the active constraints
- vars_to_delete = symbol_map_variable_ids - referenced_variable_ids
- sm_byObject = symbol_map.byObject
- for varid in vars_to_delete:
- symbol = sm_byObject[varid]
- del sm_byObject[varid]
- del sm_bySymbol[symbol]
-
- del symbol_map_variable_ids
- del referenced_variable_ids
-
return output_filename, symbol_map
diff --git a/pyomo/repn/plugins/cpxlp.py b/pyomo/repn/plugins/cpxlp.py
index 4acab4bc2a4..7a67a8a1581 100644
--- a/pyomo/repn/plugins/cpxlp.py
+++ b/pyomo/repn/plugins/cpxlp.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
@@ -29,21 +29,16 @@
Var, value,
SOSConstraint, Objective,
ComponentMap, is_fixed)
-from pyomo.repn import (generate_canonical_repn,
- canonical_degree,
- GeneralCanonicalRepn,
- LinearCanonicalRepn)
+from pyomo.repn import generate_standard_repn
logger = logging.getLogger('pyomo.core')
-
def _no_negative_zero(val):
"""Make sure -0 is never output. Makes diff tests easier."""
if val == 0:
return 0
return val
-
def _get_bound(exp):
if exp is None:
return None
@@ -53,10 +48,8 @@ def _get_bound(exp):
class ProblemWriter_cpxlp(AbstractProblemWriter):
- """Generate the corresponding CPLEX LP file."""
- pyomo.util.plugin.alias('cpxlp',
- 'Generate the corresponding CPLEX LP file')
+ pyomo.util.plugin.alias('cpxlp', 'Generate the corresponding CPLEX LP file')
pyomo.util.plugin.alias('lp', 'Generate the corresponding CPLEX LP file')
def __init__(self):
@@ -135,8 +128,7 @@ def __call__(self,
if len(io_options):
raise ValueError(
"ProblemWriter_cpxlp passed unrecognized io_options:\n\t" +
- "\n\t".join("%s = %s" % (k, v)
- for k, v in iteritems(io_options)))
+ "\n\t".join("%s = %s" % (k,v) for k,v in iteritems(io_options)))
if symbolic_solver_labels and (labeler is not None):
raise ValueError("ProblemWriter_cpxlp: Using both the "
@@ -180,7 +172,6 @@ def __call__(self,
return output_filename, symbol_map
def _print_expr_canonical(self,
- model,
x,
output_file,
object_symbol_dictionary,
@@ -188,6 +179,7 @@ def _print_expr_canonical(self,
is_objective,
column_order,
force_objective_constant=False):
+
"""
Return a expression as a string in LP format.
@@ -200,237 +192,143 @@ def _print_expr_canonical(self,
"""
assert (not force_objective_constant) or (is_objective)
- # cache - this is referenced numerous times.
- if not isinstance(x, GeneralCanonicalRepn):
- var_hashes = None # not needed
- linear_canonical = True
- else:
- var_hashes = x[-1]
- linear_canonical = False
-
+ constant=True
+ linear_coef_string_template = '%+'+self._precision_string+' %s\n'
+ quad_coef_string_template = '%+'+self._precision_string+' '
#
# Linear
#
- linear_coef_string_template = '%+' + self._precision_string + ' %s\n'
- if linear_canonical:
-
- #
- # optimization (these might be generated on the fly)
- #
- coefficients = x.linear
- if (coefficients is not None) and \
- (len(coefficients) > 0):
- variables = x.variables
-
- # the 99% case is when the input instance is a linear
- # canonical expression, so the exception should be rare.
- for vardata in variables:
- self._referenced_variable_ids[id(vardata)] = vardata
-
- try:
- if column_order is None:
- sorted_names = [
- (variable_symbol_dictionary[id(variables[i])],
- coefficients[i])
- for i in xrange(0, len(coefficients))]
- sorted_names.sort()
- else:
- sorted_names = [(variables[i], coefficients[i])
- for i in xrange(0, len(coefficients))]
- sorted_names.sort(key=lambda _x: column_order[_x[0]])
- sorted_names = [
- (variable_symbol_dictionary[id(var)], coef)
- for var, coef in sorted_names]
- except KeyError as err:
- _errors = []
- for v in variables:
- if id(v) in variable_symbol_dictionary:
- continue
- if v.model() is not model.model():
- _errors.append(
- "Variable '%s' is not part of the model "
- "being written out, but appears in an "
- "expression used on this model." % (v.name,))
- else:
- _parent = v.parent_block()
- while _parent is not None and _parent is not model:
- if _parent.type() is not model.type():
- _errors.append(
- "Variable '%s' exists within %s '%s', "
- "but is used by an active "
- "expression. Currently variables "
- "must be reachable through a tree "
- "of active Blocks."
- % (v.name, _parent.type().__name__,
- _parent.name))
- if not _parent.active:
- _errors.append(
- "Variable '%s' exists within "
- "deactivated %s '%s', but is used by "
- "an active expression. Currently "
- "variables must be reachable through "
- "a tree of active Blocks."
- % (v.name, _parent.type().__name__,
- _parent.name))
- _parent = _parent.parent_block()
-
- if _errors:
- for e in _errors:
- logger.error(e)
- err.args = err.args + tuple(_errors)
- raise
-
- for name, coef in sorted_names:
- output_file.write(linear_coef_string_template % (coef, name))
-
- elif not is_objective:
- # If we made it to here we are outputing
- # trivial constraints place 0 *
- # ONE_VAR_CONSTANT on this side of the
- # constraint for the benefit of solvers like
- # Glpk that cannot parse an LP file without
- # a variable on the left hand side.
- output_file.write(linear_coef_string_template
- % (0, 'ONE_VAR_CONSTANT'))
-
- elif 1 in x:
-
- for var_hash in x[1]:
- vardata = var_hashes[var_hash]
+ if len(x.linear_vars) > 0:
+ constant=False
+ for vardata in x.linear_vars:
self._referenced_variable_ids[id(vardata)] = vardata
if column_order is None:
- sorted_names = [(variable_symbol_dictionary[id(var_hashes[var_hash])],
- var_coefficient)
- for var_hash, var_coefficient in iteritems(x[1])]
- sorted_names.sort()
+ #
+ # Order columns by dictionary names
+ #
+ names = [variable_symbol_dictionary[id(var)] for var in x.linear_vars]
+ for i, name in sorted(enumerate(names), key=lambda x: x[1]):
+ output_file.write(linear_coef_string_template % (x.linear_coefs[i], name))
else:
- sorted_names = [(var_hashes[var_hash], var_coefficient)
- for var_hash, var_coefficient in iteritems(x[1])]
- sorted_names.sort(key=lambda _x: column_order[_x[0]])
- sorted_names = [(variable_symbol_dictionary[id(var)], coef)
- for var, coef in sorted_names]
-
- for name, coef in sorted_names:
- output_file.write(linear_coef_string_template % (coef, name))
-
+ #
+ # Order columns by the value of column_order[]
+ #
+ for i, var in sorted(enumerate(x.linear_vars), key=lambda x: column_order[x[1]]):
+ name = variable_symbol_dictionary[id(var)]
+ output_file.write(linear_coef_string_template % (x.linear_coefs[i], name))
#
# Quadratic
#
- quad_coef_string_template = '%+' + self._precision_string + ' '
- if canonical_degree(x) == 2:
-
- # first, make sure there is something to output
- # - it is possible for all terms to have
- # coefficients equal to 0.0, in which case you
- # don't want to get into the bracket notation at
- # all.
- # NOTE: if the coefficient is really 0.0, it
- # should be preprocessed out by the
- # canonial expression generator!
- found_nonzero_term = False # until proven otherwise
- for var_hash, var_coefficient in iteritems(x[2]):
- for var in var_hash:
- vardata = var_hashes[var]
-
- if math.fabs(var_coefficient) != 0.0:
- found_nonzero_term = True
- break
-
- if found_nonzero_term:
-
- output_file.write("+ [\n")
-
- num_output = 0
-
- var_hashes_order = list(iterkeys(x[2]))
- # sort by the sorted tuple of symbols (or column assignments)
- # for the variables appearing in the term
- if column_order is None:
- var_hashes_order.sort(
- key=lambda term:
- sorted(variable_symbol_dictionary[id(var_hashes[vh])]
- for vh in term))
- else:
- var_hashes_order.sort(
- key=lambda term: sorted(column_order[var_hashes[vh]]
- for vh in term))
+ if len(x.quadratic_vars) > 0:
+ constant=False
+ for var1, var2 in x.quadratic_vars:
+ self._referenced_variable_ids[id(var1)] = var1
+ self._referenced_variable_ids[id(var2)] = var2
- for var_hash in var_hashes_order:
-
- coefficient = x[2][var_hash]
+ output_file.write("+ [\n")
+ if column_order is None:
+ #
+ # Order columns by dictionary names
+ #
+ quad = set()
+ names = []
+ i = 0
+ for var1, var2 in x.quadratic_vars:
+ name1 = variable_symbol_dictionary[id(var1)]
+ name2 = variable_symbol_dictionary[id(var2)]
+ if name1 < name2:
+ names.append( (name1,name2) )
+ elif name1 > name2:
+ names.append( (name2,name1) )
+ else:
+ quad.add(i)
+ names.append( (name1,name1) )
+ i += 1
+ for i, names_ in sorted(enumerate(names), key=lambda x: x[1]):
+ #
+ # Times 2 because LP format requires /2 for all the quadratic
+ # terms /of the objective only/. Discovered the last bit thru
+ # trial and error. Obnoxious.
+ # Ref: ILog CPlex 8.0 User's Manual, p197.
+ #
if is_objective:
- coefficient *= 2
-
- # times 2 because LP format requires /2 for all the quadratic
+ tmp = 2*x.quadratic_coefs[i]
+ output_file.write(quad_coef_string_template % tmp)
+ else:
+ output_file.write(quad_coef_string_template % x.quadratic_coefs[i])
+ if i in quad:
+ output_file.write("%s ^ 2\n" % (names_[0]))
+ else:
+ output_file.write("%s * %s\n" % (names_[0], names_[1]))
+ else:
+ #
+ # Order columns by the value of column_order[]
+ #
+ quad = set()
+ cols = []
+ i = 0
+ for var1, var2 in x.quadratic_vars:
+ col1 = column_order[var1]
+ col2 = column_order[var2]
+ if col1 < col2:
+ cols.append( (((col1,col2) , variable_symbol_dictionary[id(var1)], variable_symbol_dictionary[id(var2)])) )
+ elif col1 > col2:
+ cols.append( (((col2,col1) , variable_symbol_dictionary[id(var2)], variable_symbol_dictionary[id(var1)])) )
+ else:
+ quad.add(i)
+ cols.append( ((col1,col1), variable_symbol_dictionary[id(var1)]) )
+ i += 1
+ for i, cols_ in sorted(enumerate(cols), key=lambda x: x[1][0]):
+ #
+ # Times 2 because LP format requires /2 for all the quadratic
# terms /of the objective only/. Discovered the last bit thru
# trial and error. Obnoxious.
# Ref: ILog CPlex 8.0 User's Manual, p197.
-
- output_file.write(quad_coef_string_template % coefficient)
- term_variables = []
-
- var_hash_order = list(iterkeys(var_hash))
- # sort by symbols (or column assignments)
- if column_order is None:
- var_hash_order.sort(
- key=lambda vh:
- variable_symbol_dictionary[id(var_hashes[vh])])
+ #
+ if is_objective:
+ output_file.write(quad_coef_string_template % 2*x.quadratic_coefs[i])
else:
- var_hash_order.sort(
- key=lambda vh: column_order[var_hashes[vh]])
-
- # sort the term for consistent output
- for var in var_hash_order:
- vardata = var_hashes[var]
- self._referenced_variable_ids[id(vardata)] = vardata
- name = variable_symbol_dictionary[id(vardata)]
- term_variables.append(name)
-
- if len(term_variables) == 2:
- output_file.write("%s * %s"
- % (term_variables[0], term_variables[1]))
+ output_file.write(quad_coef_string_template % x.quadratic_coefs[i])
+ if i in quad:
+ output_file.write("%s ^ 2\n" % cols_[1])
else:
- output_file.write("%s ^ 2" % (term_variables[0]))
- output_file.write("\n")
+ output_file.write("%s * %s\n" % (cols_[1], cols_[2]))
- output_file.write("]")
+ output_file.write("]")
- if is_objective:
- output_file.write(' / 2\n')
- # divide by 2 because LP format requires /2 for all the quadratic
- # terms. Weird. Ref: ILog CPlex 8.0 User's Manual, p197
- else:
- output_file.write("\n")
+ if is_objective:
+ output_file.write(' / 2\n')
+ # divide by 2 because LP format requires /2 for all the quadratic
+ # terms. Weird. Ref: ILog CPlex 8.0 User's Manual, p197
+ else:
+ output_file.write("\n")
+
+ if constant and not is_objective:
+ # If we made it to here we are outputing
+ # trivial constraints place 0 *
+ # ONE_VAR_CONSTANT on this side of the
+ # constraint for the benefit of solvers like
+ # Glpk that cannot parse an LP file without
+ # a variable on the left hand side.
+ output_file.write(linear_coef_string_template % (0, 'ONE_VAR_CONSTANT'))
#
# Constant offset
#
- if linear_canonical:
- constant = x.constant
- else:
- if 0 in x:
- constant = x[0][None]
- else:
- constant = None
-
- if constant is not None:
- offset = constant
- else:
- offset = 0.0
-
# Currently, it appears that we only need to print
# the constant offset term for objectives.
- obj_string_template = '%+' + self._precision_string + ' %s\n'
- if is_objective and (force_objective_constant or (offset != 0.0)):
+ #
+ obj_string_template = '%+'+self._precision_string+' %s\n'
+ if is_objective and (force_objective_constant or (x.constant != 0.0)):
output_file.write(obj_string_template
- % (offset, 'ONE_VAR_CONSTANT'))
+ % (x.constant, 'ONE_VAR_CONSTANT'))
#
# Return constant offset
#
- return offset
+ return x.constant
def printSOS(self,
symbol_map,
@@ -453,9 +351,9 @@ def printSOS(self,
level = soscondata.level
output_file.write('%s: S%s::\n'
- % (symbol_map.getSymbol(soscondata, labeler), level))
+ % (symbol_map.getSymbol(soscondata,labeler), level))
- sos_template_string = "%s:%" + self._precision_string + "\n"
+ sos_template_string = "%s:%"+self._precision_string+"\n"
for vardata, weight in sos_items:
weight = _get_bound(weight)
if weight < 0:
@@ -513,13 +411,34 @@ def _print_model_LP(self,
#
# Create variable symbols (and cache the block list)
#
- all_blocks = list( model.block_data_objects(
- active=True, sort=sortOrder) )
- variable_list = list( model.component_data_objects(
- Var, sort=sortOrder) )
- variable_label_pairs = list(
- (vardata, create_symbol_func(symbol_map, vardata, labeler))
- for vardata in variable_list )
+ all_blocks = []
+ variable_list = []
+ for block in model.block_data_objects(active=True,
+ sort=sortOrder):
+
+ all_blocks.append(block)
+
+ for vardata in block.component_data_objects(
+ Var,
+ active=True,
+ sort=sortOrder,
+ descend_into=False):
+
+ variable_list.append(vardata)
+ variable_label_pairs.append(
+ (vardata,create_symbol_func(symbol_map,
+ vardata,
+ labeler)))
+ #
+ # WEH - TODO: See if this is faster
+ #
+ #all_blocks = list( model.block_data_objects(
+ # active=True, sort=sortOrder) )
+ #variable_list = list( model.component_data_objects(
+ # Var, sort=sortOrder) )
+ #variable_label_pairs = list(
+ # (vardata, create_symbol_func(symbol_map, vardata, labeler))
+ # for vardata in variable_list )
variable_symbol_map.addSymbols(variable_label_pairs)
@@ -536,26 +455,24 @@ def _print_model_LP(self,
# NOTE: this *must* use the "\* ... *\" comment format: the GLPK
# LP parser does not correctly handle other formats (notably, "%").
output_file.write(
- "\\* Source Pyomo model name=%s *\\\n\n" % (model.name,))
+ "\\* Source Pyomo model name=%s *\\\n\n" % (model.name,) )
#
# Objective
#
- supports_quadratic_objective = \
- solver_capability('quadratic_objective')
+ supports_quadratic_objective = solver_capability('quadratic_objective')
numObj = 0
onames = []
for block in all_blocks:
- gen_obj_canonical_repn = \
- getattr(block, "_gen_obj_canonical_repn", True)
+ gen_obj_repn = getattr(block, "_gen_obj_repn", True)
# Get/Create the ComponentMap for the repn
- if not hasattr(block, '_canonical_repn'):
- block._canonical_repn = ComponentMap()
- block_canonical_repn = block._canonical_repn
+ if not hasattr(block,'_repn'):
+ block._repn = ComponentMap()
+ block_repn = block._repn
for objective_data in block.component_data_objects(
Objective,
@@ -581,18 +498,17 @@ def _print_model_LP(self,
else:
output_file.write("max \n")
- if gen_obj_canonical_repn:
- canonical_repn = \
- generate_canonical_repn(objective_data.expr)
- block_canonical_repn[objective_data] = canonical_repn
+ if gen_obj_repn:
+ repn = generate_standard_repn(objective_data.expr)
+ block_repn[objective_data] = repn
else:
- canonical_repn = block_canonical_repn[objective_data]
+ repn = block_repn[objective_data]
- degree = canonical_degree(canonical_repn)
+ degree = repn.polynomial_degree()
if degree == 0:
logger.warning("Constant objective detected, replacing "
- "with a placeholder to prevent solver failure.")
+ "with a placeholder to prevent solver failure.")
force_objective_constant = True
elif degree == 2:
if not supports_quadratic_objective:
@@ -601,18 +517,17 @@ def _print_model_LP(self,
"objective functions with quadratic terms. "
"Objective at issue: %s."
% objective_data.name)
- elif degree != 1:
+ elif degree is None:
raise RuntimeError(
"Cannot write legal LP file. Objective '%s' "
"has nonlinear terms that are not quadratic."
% objective_data.name)
output_file.write(
- object_symbol_dictionary[id(objective_data)] + ':\n')
+ object_symbol_dictionary[id(objective_data)]+':\n')
offset = print_expr_canonical(
- model,
- canonical_repn,
+ repn,
output_file,
object_symbol_dictionary,
variable_symbol_dictionary,
@@ -644,13 +559,12 @@ def _print_model_LP(self,
def constraint_generator():
for block in all_blocks:
- gen_con_canonical_repn = \
- getattr(block, "_gen_con_canonical_repn", True)
+ gen_con_repn = getattr(block, "_gen_con_repn", True)
# Get/Create the ComponentMap for the repn
- if not hasattr(block, '_canonical_repn'):
- block._canonical_repn = ComponentMap()
- block_canonical_repn = block._canonical_repn
+ if not hasattr(block,'_repn'):
+ block._repn = ComponentMap()
+ block_repn = block._repn
for constraint_data in block.component_data_objects(
Constraint,
@@ -661,39 +575,35 @@ def constraint_generator():
if (not constraint_data.has_lb()) and \
(not constraint_data.has_ub()):
assert not constraint_data.equality
- continue # non-binding, so skip
+ continue # non-binding, so skip
if constraint_data._linear_canonical_form:
- canonical_repn = constraint_data.canonical_form()
- elif isinstance(constraint_data, LinearCanonicalRepn):
- canonical_repn = constraint_data
+ repn = constraint_data.canonical_form()
+ elif gen_con_repn:
+ repn = generate_standard_repn(constraint_data.body)
+ block_repn[constraint_data] = repn
else:
- if gen_con_canonical_repn:
- canonical_repn = generate_canonical_repn(constraint_data.body)
- block_canonical_repn[constraint_data] = canonical_repn
- else:
- canonical_repn = block_canonical_repn[constraint_data]
+ repn = block_repn[constraint_data]
- yield constraint_data, canonical_repn
+ yield constraint_data, repn
if row_order is not None:
sorted_constraint_list = list(constraint_generator())
sorted_constraint_list.sort(key=lambda x: row_order[x[0]])
-
def yield_all_constraints():
- for constraint_data, canonical_repn in sorted_constraint_list:
- yield constraint_data, canonical_repn
+ for data, repn in sorted_constraint_list:
+ yield data, repn
else:
yield_all_constraints = constraint_generator
# FIXME: This is a hack to get nested blocks working...
- eq_string_template = "= %" + self._precision_string + '\n'
- geq_string_template = ">= %" + self._precision_string + '\n\n'
- leq_string_template = "<= %" + self._precision_string + '\n\n'
- for constraint_data, canonical_repn in yield_all_constraints():
+ eq_string_template = "= %"+self._precision_string+'\n'
+ geq_string_template = ">= %"+self._precision_string+'\n\n'
+ leq_string_template = "<= %"+self._precision_string+'\n\n'
+ for constraint_data, repn in yield_all_constraints():
have_nontrivial = True
- degree = canonical_degree(canonical_repn)
+ degree = repn.polynomial_degree()
#
# Write constraint
@@ -713,7 +623,7 @@ def yield_all_constraints():
raise ValueError(
"Solver unable to handle quadratic expressions. Constraint"
" at issue: '%s'" % (constraint_data.name))
- elif degree != 1:
+ elif degree is None:
raise ValueError(
"Cannot write legal LP file. Constraint '%s' has a body "
"with nonlinear terms." % (constraint_data.name))
@@ -726,9 +636,8 @@ def yield_all_constraints():
value(constraint_data.upper)
label = 'c_e_' + con_symbol + '_'
alias_symbol_func(symbol_map, constraint_data, label)
- output_file.write(label + ':\n')
- offset = print_expr_canonical(model,
- canonical_repn,
+ output_file.write(label+':\n')
+ offset = print_expr_canonical(repn,
output_file,
object_symbol_dictionary,
variable_symbol_dictionary,
@@ -746,9 +655,8 @@ def yield_all_constraints():
else:
label = 'c_l_' + con_symbol + '_'
alias_symbol_func(symbol_map, constraint_data, label)
- output_file.write(label + ':\n')
- offset = print_expr_canonical(model,
- canonical_repn,
+ output_file.write(label+':\n')
+ offset = print_expr_canonical(repn,
output_file,
object_symbol_dictionary,
variable_symbol_dictionary,
@@ -767,9 +675,8 @@ def yield_all_constraints():
else:
label = 'c_u_' + con_symbol + '_'
alias_symbol_func(symbol_map, constraint_data, label)
- output_file.write(label + ':\n')
- offset = print_expr_canonical(model,
- canonical_repn,
+ output_file.write(label+':\n')
+ offset = print_expr_canonical(repn,
output_file,
object_symbol_dictionary,
variable_symbol_dictionary,
@@ -783,8 +690,8 @@ def yield_all_constraints():
assert constraint_data.has_lb()
if not have_nontrivial:
- logger.warning('Empty constraint block written in LP format '
- '- solver may error')
+ logger.warning('Empty constraint block written in LP format ' \
+ '- solver may error')
# the CPLEX LP format doesn't allow constants in the objective (or
# constraint body), which is a bit silly. To avoid painful
@@ -854,8 +761,8 @@ def yield_all_constraints():
# required because we don't store maps by variable type currently.
# FIXME: This is a hack to get nested blocks working...
- lb_string_template = "%" + self._precision_string + " <= "
- ub_string_template = " <= %" + self._precision_string + "\n"
+ lb_string_template = "%"+self._precision_string+" <= "
+ ub_string_template = " <= %"+self._precision_string+"\n"
# Track the number of integer and binary variables, so you can
# output their status later.
integer_vars = []
@@ -936,6 +843,7 @@ def yield_all_constraints():
for var_name in binary_vars:
output_file.write(' %s\n' % var_name)
+
# Write the SOS section
output_file.write(SOSlines.getvalue())
@@ -949,7 +857,7 @@ def yield_all_constraints():
# rely on this for choosing the set of potential warm start
# variables
vars_to_delete = set(variable_symbol_map.byObject.keys()) - \
- set(self._referenced_variable_ids.keys())
+ set(self._referenced_variable_ids.keys())
sm_byObject = symbol_map.byObject
sm_bySymbol = symbol_map.bySymbol
var_sm_byObject = variable_symbol_map.byObject
diff --git a/pyomo/repn/plugins/gams_writer.py b/pyomo/repn/plugins/gams_writer.py
index 237c3d2f0c0..7b5a8153fbf 100644
--- a/pyomo/repn/plugins/gams_writer.py
+++ b/pyomo/repn/plugins/gams_writer.py
@@ -17,6 +17,8 @@
from pyutilib.misc import PauseGC
+from pyomo.core.expr import current as EXPR
+from pyomo.core.expr.numvalue import is_fixed, value, as_numeric, native_types, native_numeric_types
from pyomo.core.base import (
SymbolMap, AlphaNumericTextLabeler, NumericLabeler,
Block, Constraint, Expression, Objective, Var, Set, RangeSet, Param,
@@ -29,12 +31,78 @@
from pyomo.core.kernel.component_block import IBlockStorage
from pyomo.core.kernel.component_interface import ICategorizedObject
-from pyomo.core.kernel.numvalue import is_fixed, value, as_numeric
import logging
logger = logging.getLogger('pyomo.core')
+#
+# A visitor pattern that creates a string for an expression
+# that is compatible with the GAMS syntax.
+#
+class ToGamsVisitor(EXPR.ExpressionValueVisitor):
+
+ def __init__(self, smap):
+ super(ToGamsVisitor, self).__init__()
+ self.smap = smap
+
+ def visit(self, node, values):
+ """ Visit nodes that have been expanded """
+ tmp = []
+ for i,val in enumerate(values):
+ arg = node._args_[i]
+
+ if arg is None:
+ tmp.append('Undefined')
+ elif arg.__class__ in native_numeric_types:
+ tmp.append(val)
+ elif arg.__class__ in native_types:
+ tmp.append("'{0}'".format(val))
+ elif arg.is_variable_type():
+ tmp.append(val)
+ elif arg.is_expression_type() and node._precedence() < arg._precedence():
+ tmp.append("({0})".format(val))
+ else:
+ tmp.append(val)
+
+ if node.__class__ is EXPR.PowExpression:
+ return "power({0}, {1})".format(tmp[0], tmp[1])
+ else:
+ return node._to_string(tmp, None, self.smap, True)
+
+ def visiting_potential_leaf(self, node):
+ """
+ Visiting a potential leaf.
+
+ Return True if the node is not expanded.
+ """
+ if node is None:
+ return True, None
+
+ if node.__class__ in native_types:
+ return True, str(node)
+
+ if node.is_variable_type():
+ if node.fixed:
+ return True, str(value(node))
+ label = self.smap.getSymbol(node)
+ return True, label
+
+ if not node.is_expression_type():
+ return True, str(value(node))
+
+ return False, None
+
+
+def expression_to_string(expr, labeler=None, smap=None):
+ if labeler is not None:
+ if smap is None:
+ smap = SymbolMap()
+ smap.default_labeler = labeler
+ visitor = ToGamsVisitor(smap)
+ return visitor.dfs_postorder_stack(expr)
+
+
def _get_bound(exp):
if exp is None:
return None
@@ -43,39 +111,6 @@ def _get_bound(exp):
raise ValueError("non-fixed bound or weight: " + str(exp))
-# HACK: Temporary check for Connectors in active constriants.
-# This should be removed after the writer is moved to an
-# explicit GAMS-specific expression walker for generating the
-# constraint strings.
-import pyomo.core.base.expr_coopr3 as coopr3
-from pyomo.core.kernel.numvalue import native_types
-from pyomo.core.base.connector import _ConnectorData
-def _check_for_connectors(con):
- _stack = [ ([con.body], 0, 1) ]
- while _stack:
- _argList, _idx, _len = _stack.pop()
- while _idx < _len:
- _sub = _argList[_idx]
- _idx += 1
- if type(_sub) in native_types:
- pass
- elif _sub.is_expression():
- _stack.append(( _argList, _idx, _len ))
- if type(_sub) is coopr3._ProductExpression:
- if _sub._denominator:
- _stack.append(
- (_sub._denominator, 0, len(_sub._denominator)) )
- _argList = _sub._numerator
- else:
- _argList = _sub._args
- _idx = 0
- _len = len(_argList)
- elif isinstance(_sub, _ConnectorData):
- raise TypeError(
- "Constraint '%s' body contains unexpanded connectors"
- % (con.name,))
-
-
class ProblemWriter_gams(AbstractProblemWriter):
pyomo.util.plugin.alias('gams', 'Generate the corresponding GAMS file')
@@ -92,7 +127,7 @@ def __call__(self,
Name of file to write GAMS model to. Optionally pass a file-like
stream and the model will be written to that instead.
io_options:
- warmstart=False:
+ warmstart=True:
Warmstart by initializing model's variables to their values.
symbolic_solver_labels=False:
Use full Pyomo component names rather than
@@ -158,7 +193,7 @@ def __call__(self,
sort = sorter_map[file_determinism]
# Warmstart by initializing model's variables to their values.
- warmstart = io_options.pop("warmstart", False)
+ warmstart = io_options.pop("warmstart", True)
# Filename for optionally writing solution values and marginals
# Set to True by GAMSSolver
@@ -205,18 +240,23 @@ def __call__(self,
var_labeler = con_labeler = labeler
var_list = []
- symbolMap = SymbolMap()
def var_recorder(obj):
ans = var_labeler(obj)
- var_list.append(ans)
+ try:
+ if obj.is_variable_type():
+ var_list.append(ans)
+ except:
+ pass
return ans
def var_label(obj):
- if obj.is_fixed():
- return str(value(obj))
+ #if obj.is_fixed():
+ # return str(value(obj))
return symbolMap.getSymbol(obj, var_recorder)
+ symbolMap = SymbolMap(var_label)
+
# when sorting, there are a non-trivial number of
# temporary objects created. these all yield
# non-circular references, so disable GC - the
@@ -273,18 +313,23 @@ def _write_model(self,
linear = True
linear_degree = set([0,1])
- # Sanity check: all active components better be things we know
- # how to deal with, plus Suffix if solving
- valid_ctypes = set([
- Block, Constraint, Expression, Objective, Param,
- Set, RangeSet, Var, Suffix, Connector ])
model_ctypes = model.collect_ctypes(active=True)
- if not model_ctypes.issubset(valid_ctypes):
- invalids = [t.__name__ for t in (model_ctypes - valid_ctypes)]
- raise RuntimeError(
- "Unallowable component(s) %s.\nThe GAMS writer cannot "
- "export models with this component type" %
- ", ".join(invalids))
+ if False:
+ #
+ # WEH - Disabling this check. For now, we're allowing
+ # variables defined on non-block objects.
+ #
+ # Sanity check: all active components better be things we know
+ # how to deal with, plus Suffix if solving
+ valid_ctypes = set([
+ Block, Constraint, Expression, Objective, Param,
+ Set, RangeSet, Var, Suffix, Connector ])
+ if not model_ctypes.issubset(valid_ctypes):
+ invalids = [t.__name__ for t in (model_ctypes - valid_ctypes)]
+ raise RuntimeError(
+ "Unallowable component(s) %s.\nThe GAMS writer cannot "
+ "export models with this component type" %
+ ", ".join(invalids))
# HACK: Temporary check for Connectors in active constriants.
# This should be removed after the writer is moved to an
@@ -307,7 +352,8 @@ def _write_model(self,
# HACK: Temporary check for Connectors in active constriants.
if has_Connectors:
- _check_for_connectors(con)
+ raise RuntimeError("Cannot handle connectors right now.")
+ #_check_for_connectors(con)
con_body = as_numeric(con.body)
if skip_trivial_constraints and con_body.is_fixed():
@@ -316,14 +362,12 @@ def _write_model(self,
if con_body.polynomial_degree() not in linear_degree:
linear = False
- body = StringIO()
- con_body.to_string(body, labeler=var_label)
cName = symbolMap.getSymbol(con, con_labeler)
if con.equality:
constraint_names.append('%s' % cName)
ConstraintIO.write('%s.. %s =e= %s ;\n' % (
constraint_names[-1],
- body.getvalue(),
+ expression_to_string(con_body, smap=symbolMap),
_get_bound(con.upper)
))
else:
@@ -332,13 +376,13 @@ def _write_model(self,
ConstraintIO.write('%s.. %s =l= %s ;\n' % (
constraint_names[-1],
_get_bound(con.lower),
- body.getvalue()
+ expression_to_string(con_body, smap=symbolMap)
))
if con.has_ub():
constraint_names.append('%s_hi' % cName)
ConstraintIO.write('%s.. %s =l= %s ;\n' % (
constraint_names[-1],
- body.getvalue(),
+ expression_to_string(con_body, smap=symbolMap),
_get_bound(con.upper)
))
@@ -354,12 +398,10 @@ def _write_model(self,
if obj.expr.polynomial_degree() not in linear_degree:
linear = False
oName = symbolMap.getSymbol(obj, con_labeler)
- body = StringIO()
- obj.expr.to_string(body, labeler=var_label)
constraint_names.append(oName)
ConstraintIO.write('%s.. GAMS_OBJECTIVE =e= %s ;\n' % (
oName,
- body.getvalue()
+ expression_to_string(obj.expr, smap=symbolMap)
))
# Categorize the variables that we found
@@ -385,11 +427,11 @@ def _write_model(self,
output_file.write(";\n\n")
for line in ConstraintIO.getvalue().splitlines():
- if '**' in line:
- # Investigate power functions for an integer exponent, in which
- # case replace with power(x, int) function to improve domain
- # issues.
- line = replace_power(line)
+ #if '**' in line:
+ # # Investigate power functions for an integer exponent, in which
+ # # case replace with power(x, int) function to improve domain
+ # # issues. Skip first term since it's always "con_name.."
+ # line = replace_power(line) + ';'
if len(line) > 80000:
line = split_long_line(line)
output_file.write(line + "\n")
diff --git a/pyomo/repn/plugins/mps.py b/pyomo/repn/plugins/mps.py
index 30eba2f27ee..c78e57efed5 100644
--- a/pyomo/repn/plugins/mps.py
+++ b/pyomo/repn/plugins/mps.py
@@ -29,9 +29,7 @@
Var, value,
SOSConstraint, Objective,
ComponentMap, is_fixed)
-from pyomo.repn import (generate_canonical_repn,
- canonical_degree,
- LinearCanonicalRepn)
+from pyomo.repn import generate_standard_repn
logger = logging.getLogger('pyomo.core')
@@ -182,63 +180,34 @@ def __call__(self,
def _extract_variable_coefficients(
self,
row_label,
- canonical_repn,
+ repn,
column_data,
quadratic_data,
variable_to_column):
- # cache - this is referenced numerous times.
- if isinstance(canonical_repn, LinearCanonicalRepn):
- var_hashes = None # not needed
- else:
- var_hashes = canonical_repn[-1]
-
- constant = None
#
# Linear
#
- if isinstance(canonical_repn, LinearCanonicalRepn):
- constant = canonical_repn.constant
- coefficients = canonical_repn.linear
- if (coefficients is not None) and \
- (len(coefficients) > 0):
- variables = canonical_repn.variables
-
- # the 99% case is when the input instance is a linear
- # canonical expression, so the exception should be rare.
- for vardata, coef in zip(variables, coefficients):
- self._referenced_variable_ids[id(vardata)] = vardata
- column_data[variable_to_column[vardata]].append(
- (row_label, coef))
- else:
- if 0 in canonical_repn:
- constant = canonical_repn[0][None]
- if 1 in canonical_repn:
- for var_hash, coef in iteritems(canonical_repn[1]):
- vardata = var_hashes[var_hash]
- self._referenced_variable_ids[id(vardata)] = vardata
- column_data[variable_to_column[vardata]].append(
- (row_label, coef))
- #
- # Quadratic
- #
- if 2 in canonical_repn:
- quad_terms = []
- for var_hash, coef in iteritems(canonical_repn[2]):
- varlist = [var_hashes[var] for var in var_hash]
- if len(varlist) == 1:
- quad_terms.append(((varlist[0], varlist[0]), coef))
- else:
- quad_terms.append((tuple(varlist), coef))
- quadratic_data.append((row_label, quad_terms))
+ if len(repn.linear_coefs) > 0:
+ for vardata, coef in zip(repn.linear_vars, repn.linear_coefs):
+ self._referenced_variable_ids[id(vardata)] = vardata
+ column_data[variable_to_column[vardata]].append((row_label, coef))
#
- # Return the constant
+ # Quadratic
#
- if constant is None:
- constant = 0.0
+ if len(repn.quadratic_coefs) > 0:
+ quad_terms = []
+ for vardata, coef in zip(repn.quadratic_vars, repn.quadratic_coefs):
+ self._referenced_variable_ids[id(vardata[0])] = vardata[0]
+ self._referenced_variable_ids[id(vardata[1])] = vardata[1]
+ quad_terms.append( (vardata, coef) )
+ quadratic_data.append((row_label, quad_terms))
- return constant
+ #
+ # Return the constant
+ #
+ return repn.constant
def _printSOS(self,
symbol_map,
@@ -375,13 +344,13 @@ def _print_model_MPS(self,
onames = []
for block in all_blocks:
- gen_obj_canonical_repn = \
- getattr(block, "_gen_obj_canonical_repn", True)
+ gen_obj_repn = \
+ getattr(block, "_gen_obj_repn", True)
# Get/Create the ComponentMap for the repn
- if not hasattr(block,'_canonical_repn'):
- block._canonical_repn = ComponentMap()
- block_canonical_repn = block._canonical_repn
+ if not hasattr(block,'_repn'):
+ block._repn = ComponentMap()
+ block_repn = block._repn
for objective_data in block.component_data_objects(
Objective,
active=True,
@@ -414,19 +383,19 @@ def _print_model_MPS(self,
output_file.write("ROWS\n")
output_file.write(" N %s\n" % (objective_label))
- if gen_obj_canonical_repn:
- canonical_repn = \
- generate_canonical_repn(objective_data.expr)
- block_canonical_repn[objective_data] = canonical_repn
+ if gen_obj_repn:
+ repn = \
+ generate_standard_repn(objective_data.expr)
+ block_repn[objective_data] = repn
else:
- canonical_repn = block_canonical_repn[objective_data]
+ repn = block_repn[objective_data]
- degree = canonical_degree(canonical_repn)
+ degree = repn.polynomial_degree()
if degree == 0:
logger.warning("Constant objective detected, replacing "
"with a placeholder to prevent solver failure.")
force_objective_constant = True
- elif (degree != 1) and (degree != 2):
+ elif degree is None:
raise RuntimeError(
"Cannot write legal MPS file. Objective '%s' "
"has nonlinear terms that are not quadratic."
@@ -434,7 +403,7 @@ def _print_model_MPS(self,
constant = extract_variable_coefficients(
objective_label,
- canonical_repn,
+ repn,
column_data,
quadobj_data,
variable_to_column)
@@ -452,13 +421,13 @@ def _print_model_MPS(self,
def constraint_generator():
for block in all_blocks:
- gen_con_canonical_repn = \
- getattr(block, "_gen_con_canonical_repn", True)
+ gen_con_repn = \
+ getattr(block, "_gen_con_repn", True)
# Get/Create the ComponentMap for the repn
- if not hasattr(block,'_canonical_repn'):
- block._canonical_repn = ComponentMap()
- block_canonical_repn = block._canonical_repn
+ if not hasattr(block,'_repn'):
+ block._repn = ComponentMap()
+ block_repn = block._repn
for constraint_data in block.component_data_objects(
Constraint,
@@ -472,36 +441,33 @@ def constraint_generator():
continue # non-binding, so skip
if constraint_data._linear_canonical_form:
- canonical_repn = constraint_data.canonical_form()
- elif isinstance(constraint_data, LinearCanonicalRepn):
- canonical_repn = constraint_data
+ repn = constraint_data.canonical_form()
+ elif gen_con_repn:
+ repn = generate_standard_repn(constraint_data.body)
+ block_repn[constraint_data] = repn
else:
- if gen_con_canonical_repn:
- canonical_repn = generate_canonical_repn(constraint_data.body)
- block_canonical_repn[constraint_data] = canonical_repn
- else:
- canonical_repn = block_canonical_repn[constraint_data]
+ repn = block_repn[constraint_data]
- yield constraint_data, canonical_repn
+ yield constraint_data, repn
if row_order is not None:
sorted_constraint_list = list(constraint_generator())
sorted_constraint_list.sort(key=lambda x: row_order[x[0]])
def yield_all_constraints():
- for constraint_data, canonical_repn in sorted_constraint_list:
- yield constraint_data, canonical_repn
+ for constraint_data, repn in sorted_constraint_list:
+ yield constraint_data, repn
else:
yield_all_constraints = constraint_generator
- for constraint_data, canonical_repn in yield_all_constraints():
+ for constraint_data, repn in yield_all_constraints():
- degree = canonical_degree(canonical_repn)
+ degree = repn.polynomial_degree()
# Write constraint
if degree == 0:
if skip_trivial_constraints:
continue
- elif (degree != 1) and (degree != 2):
+ elif degree is None:
raise RuntimeError(
"Cannot write legal MPS file. Constraint '%s' "
"has nonlinear terms that are not quadratic."
@@ -520,7 +486,7 @@ def yield_all_constraints():
output_file.write(" E %s\n" % (label))
offset = extract_variable_coefficients(
label,
- canonical_repn,
+ repn,
column_data,
quadmatrix_data,
variable_to_column)
@@ -537,7 +503,7 @@ def yield_all_constraints():
output_file.write(" G %s\n" % (label))
offset = extract_variable_coefficients(
label,
- canonical_repn,
+ repn,
column_data,
quadmatrix_data,
variable_to_column)
@@ -556,7 +522,7 @@ def yield_all_constraints():
output_file.write(" L %s\n" % (label))
offset = extract_variable_coefficients(
label,
- canonical_repn,
+ repn,
column_data,
quadmatrix_data,
variable_to_column)
diff --git a/pyomo/repn/plugins/problem_utils.py b/pyomo/repn/plugins/problem_utils.py
index 7d003142249..41db0b03290 100644
--- a/pyomo/repn/plugins/problem_utils.py
+++ b/pyomo/repn/plugins/problem_utils.py
@@ -8,12 +8,13 @@
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
+# TODO: Remove this file. This doesn't seem be used anywhere.
import pyomo.opt
from pyomo.core.base import expr, Var, Constraint, Objective
from pyomo.core.base.var import _VarData
from pyomo.core.base.param import _ParamData
-from pyomo.core.base.expr import *
+from pyomo.core.expr import current as EXPR
from pyomo.core.base.numvalue import *
from pyomo.core.base import _ExpressionData
@@ -55,13 +56,13 @@ def _Collect1(self,exp):
#
# Expression
#
- if isinstance(exp,expr._ExpressionBase):
+ if isinstance(exp,EXPR.ExpressionBase):
#
- # SumExpression
+ # Sum
#
- if isinstance(exp,expr._SumExpression):
- for i in xrange(len(exp._args)):
- self._Collect1(exp._args[i])
+ if isinstance(exp,expr.SumExpressionBase):
+ self._Collect1(exp._args[0])
+ self._Collect1(exp._args[1])
#
# Identity
#
@@ -122,11 +123,11 @@ def _Collect2(self, exp, x, scale=1.0):
#
# Expression
#
- if isinstance(exp,expr._ExpressionBase):
+ if isinstance(exp,EXPR.ExpressionBase):
#
# Sum
#
- if isinstance(exp,expr._SumExpression):
+ if isinstance(exp,expr.SumExpressionBase):
for i in xrange(len(exp._args)):
x = self._Collect2(exp._args[i], x, scale)
#
diff --git a/pyomo/repn/standard_aux.py b/pyomo/repn/standard_aux.py
new file mode 100644
index 00000000000..b6155e69306
--- /dev/null
+++ b/pyomo/repn/standard_aux.py
@@ -0,0 +1,39 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+
+from __future__ import division
+
+__all__ = ['compute_standard_repn']
+
+
+import pyomo.util
+from pyomo.repn.standard_repn import preprocess_block_constraints, preprocess_block_objectives
+
+
+@pyomo.util.pyomo_api(namespace='pyomo.repn')
+def compute_standard_repn(data, model=None):
+ """
+ This plugin computes the standard representation for all objectives
+ and constraints. All results are stored in a ComponentMap named
+ "_repn" at the block level.
+
+ We break out preprocessing of the objectives and constraints
+ in order to avoid redundant and unnecessary work, specifically
+ in contexts where a model is iteratively solved and modified.
+ we don't have finer-grained resolution, but we could easily
+ pass in a Constraint and an Objective if warranted.
+
+ Required:
+ model: A concrete model instance.
+ """
+ idMap = {}
+ for block in model.block_data_objects(active=True):
+ preprocess_block_constraints(block, idMap=idMap)
+ preprocess_block_objectives(block, idMap=idMap)
diff --git a/pyomo/repn/standard_repn.c b/pyomo/repn/standard_repn.c
new file mode 100644
index 00000000000..650572a11f6
--- /dev/null
+++ b/pyomo/repn/standard_repn.c
@@ -0,0 +1,37009 @@
+/* Generated by Cython 0.27.3 */
+
+/* BEGIN: Cython Metadata
+{
+ "distutils": {
+ "name": "pyomo.repn.standard_repn",
+ "sources": [
+ "pyomo/repn/standard_repn.pyx"
+ ]
+ },
+ "module_name": "pyomo.repn.standard_repn"
+}
+END: Cython Metadata */
+
+#define PY_SSIZE_T_CLEAN
+#include "Python.h"
+#ifndef Py_PYTHON_H
+ #error Python headers needed to compile C extensions, please install development version of Python.
+#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
+ #error Cython requires Python 2.6+ or Python 3.3+.
+#else
+#define CYTHON_ABI "0_27_3"
+#define CYTHON_FUTURE_DIVISION 1
+#include
+#ifndef offsetof
+ #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
+#endif
+#if !defined(WIN32) && !defined(MS_WINDOWS)
+ #ifndef __stdcall
+ #define __stdcall
+ #endif
+ #ifndef __cdecl
+ #define __cdecl
+ #endif
+ #ifndef __fastcall
+ #define __fastcall
+ #endif
+#endif
+#ifndef DL_IMPORT
+ #define DL_IMPORT(t) t
+#endif
+#ifndef DL_EXPORT
+ #define DL_EXPORT(t) t
+#endif
+#define __PYX_COMMA ,
+#ifndef HAVE_LONG_LONG
+ #if PY_VERSION_HEX >= 0x02070000
+ #define HAVE_LONG_LONG
+ #endif
+#endif
+#ifndef PY_LONG_LONG
+ #define PY_LONG_LONG LONG_LONG
+#endif
+#ifndef Py_HUGE_VAL
+ #define Py_HUGE_VAL HUGE_VAL
+#endif
+#ifdef PYPY_VERSION
+ #define CYTHON_COMPILING_IN_PYPY 1
+ #define CYTHON_COMPILING_IN_PYSTON 0
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #undef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 0
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #if PY_VERSION_HEX < 0x03050000
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #elif !defined(CYTHON_USE_ASYNC_SLOTS)
+ #define CYTHON_USE_ASYNC_SLOTS 1
+ #endif
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #undef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 1
+ #undef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 0
+ #undef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 0
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
+ #undef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT 0
+ #undef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE 0
+#elif defined(PYSTON_VERSION)
+ #define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 1
+ #define CYTHON_COMPILING_IN_CPYTHON 0
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #undef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 0
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #undef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 0
+ #undef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 0
+ #undef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT 0
+ #undef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE 0
+#else
+ #define CYTHON_COMPILING_IN_PYPY 0
+ #define CYTHON_COMPILING_IN_PYSTON 0
+ #define CYTHON_COMPILING_IN_CPYTHON 1
+ #ifndef CYTHON_USE_TYPE_SLOTS
+ #define CYTHON_USE_TYPE_SLOTS 1
+ #endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYTYPE_LOOKUP
+ #define CYTHON_USE_PYTYPE_LOOKUP 0
+ #elif !defined(CYTHON_USE_PYTYPE_LOOKUP)
+ #define CYTHON_USE_PYTYPE_LOOKUP 1
+ #endif
+ #if PY_MAJOR_VERSION < 3
+ #undef CYTHON_USE_ASYNC_SLOTS
+ #define CYTHON_USE_ASYNC_SLOTS 0
+ #elif !defined(CYTHON_USE_ASYNC_SLOTS)
+ #define CYTHON_USE_ASYNC_SLOTS 1
+ #endif
+ #if PY_VERSION_HEX < 0x02070000
+ #undef CYTHON_USE_PYLONG_INTERNALS
+ #define CYTHON_USE_PYLONG_INTERNALS 0
+ #elif !defined(CYTHON_USE_PYLONG_INTERNALS)
+ #define CYTHON_USE_PYLONG_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_PYLIST_INTERNALS
+ #define CYTHON_USE_PYLIST_INTERNALS 1
+ #endif
+ #ifndef CYTHON_USE_UNICODE_INTERNALS
+ #define CYTHON_USE_UNICODE_INTERNALS 1
+ #endif
+ #if PY_VERSION_HEX < 0x030300F0
+ #undef CYTHON_USE_UNICODE_WRITER
+ #define CYTHON_USE_UNICODE_WRITER 0
+ #elif !defined(CYTHON_USE_UNICODE_WRITER)
+ #define CYTHON_USE_UNICODE_WRITER 1
+ #endif
+ #ifndef CYTHON_AVOID_BORROWED_REFS
+ #define CYTHON_AVOID_BORROWED_REFS 0
+ #endif
+ #ifndef CYTHON_ASSUME_SAFE_MACROS
+ #define CYTHON_ASSUME_SAFE_MACROS 1
+ #endif
+ #ifndef CYTHON_UNPACK_METHODS
+ #define CYTHON_UNPACK_METHODS 1
+ #endif
+ #ifndef CYTHON_FAST_THREAD_STATE
+ #define CYTHON_FAST_THREAD_STATE 1
+ #endif
+ #ifndef CYTHON_FAST_PYCALL
+ #define CYTHON_FAST_PYCALL 1
+ #endif
+ #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
+ #define CYTHON_PEP489_MULTI_PHASE_INIT (0 && PY_VERSION_HEX >= 0x03050000)
+ #endif
+ #ifndef CYTHON_USE_TP_FINALIZE
+ #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1)
+ #endif
+#endif
+#if !defined(CYTHON_FAST_PYCCALL)
+#define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
+#endif
+#if CYTHON_USE_PYLONG_INTERNALS
+ #include "longintrepr.h"
+ #undef SHIFT
+ #undef BASE
+ #undef MASK
+#endif
+#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
+ #define Py_OptimizeFlag 0
+#endif
+#define __PYX_BUILD_PY_SSIZE_T "n"
+#define CYTHON_FORMAT_SSIZE_T "z"
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyClass_Type
+#else
+ #define __Pyx_BUILTIN_MODULE_NAME "builtins"
+ #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
+ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
+ #define __Pyx_DefaultClassType PyType_Type
+#endif
+#ifndef Py_TPFLAGS_CHECKTYPES
+ #define Py_TPFLAGS_CHECKTYPES 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_INDEX
+ #define Py_TPFLAGS_HAVE_INDEX 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
+ #define Py_TPFLAGS_HAVE_NEWBUFFER 0
+#endif
+#ifndef Py_TPFLAGS_HAVE_FINALIZE
+ #define Py_TPFLAGS_HAVE_FINALIZE 0
+#endif
+#if PY_VERSION_HEX < 0x030700A0 || !defined(METH_FASTCALL)
+ #ifndef METH_FASTCALL
+ #define METH_FASTCALL 0x80
+ #endif
+ typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject **args, Py_ssize_t nargs);
+ typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject **args,
+ Py_ssize_t nargs, PyObject *kwnames);
+#else
+ #define __Pyx_PyCFunctionFast _PyCFunctionFast
+ #define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
+#endif
+#if CYTHON_FAST_PYCCALL
+#define __Pyx_PyFastCFunction_Check(func)\
+ ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)))))
+#else
+#define __Pyx_PyFastCFunction_Check(func) 0
+#endif
+#if !CYTHON_FAST_THREAD_STATE || PY_VERSION_HEX < 0x02070000
+ #define __Pyx_PyThreadState_Current PyThreadState_GET()
+#elif PY_VERSION_HEX >= 0x03060000
+ #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
+#elif PY_VERSION_HEX >= 0x03000000
+ #define __Pyx_PyThreadState_Current PyThreadState_GET()
+#else
+ #define __Pyx_PyThreadState_Current _PyThreadState_Current
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON || defined(_PyDict_NewPresized)
+#define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
+#else
+#define __Pyx_PyDict_NewPresized(n) PyDict_New()
+#endif
+#if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
+#else
+ #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
+ #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
+#endif
+#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
+ #define CYTHON_PEP393_ENABLED 1
+ #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
+ 0 : _PyUnicode_Ready((PyObject *)(op)))
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
+ #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u)
+ #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
+ #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, ch)
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
+#else
+ #define CYTHON_PEP393_ENABLED 0
+ #define PyUnicode_1BYTE_KIND 1
+ #define PyUnicode_2BYTE_KIND 2
+ #define PyUnicode_4BYTE_KIND 4
+ #define __Pyx_PyUnicode_READY(op) (0)
+ #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
+ #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
+ #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535 : 1114111)
+ #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE))
+ #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
+ #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
+ #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = ch)
+ #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
+#endif
+#if CYTHON_COMPILING_IN_PYPY
+ #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
+#else
+ #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
+ #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
+ PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
+ #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyByteArray_Check)
+ #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Format)
+ #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
+#endif
+#if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
+ #define PyObject_Malloc(s) PyMem_Malloc(s)
+ #define PyObject_Free(p) PyMem_Free(p)
+ #define PyObject_Realloc(p) PyMem_Realloc(p)
+#endif
+#if CYTHON_COMPILING_IN_PYSTON
+ #define __Pyx_PyCode_HasFreeVars(co) PyCode_HasFreeVars(co)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) PyFrame_SetLineNumber(frame, lineno)
+#else
+ #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
+ #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
+#endif
+#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
+#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
+#else
+ #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
+#endif
+#if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
+ #define PyObject_ASCII(o) PyObject_Repr(o)
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBaseString_Type PyUnicode_Type
+ #define PyStringObject PyUnicodeObject
+ #define PyString_Type PyUnicode_Type
+ #define PyString_Check PyUnicode_Check
+ #define PyString_CheckExact PyUnicode_CheckExact
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
+ #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
+#else
+ #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
+ #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
+#endif
+#ifndef PySet_CheckExact
+ #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
+#endif
+#define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
+#if PY_MAJOR_VERSION >= 3
+ #define PyIntObject PyLongObject
+ #define PyInt_Type PyLong_Type
+ #define PyInt_Check(op) PyLong_Check(op)
+ #define PyInt_CheckExact(op) PyLong_CheckExact(op)
+ #define PyInt_FromString PyLong_FromString
+ #define PyInt_FromUnicode PyLong_FromUnicode
+ #define PyInt_FromLong PyLong_FromLong
+ #define PyInt_FromSize_t PyLong_FromSize_t
+ #define PyInt_FromSsize_t PyLong_FromSsize_t
+ #define PyInt_AsLong PyLong_AsLong
+ #define PyInt_AS_LONG PyLong_AS_LONG
+ #define PyInt_AsSsize_t PyLong_AsSsize_t
+ #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
+ #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
+ #define PyNumber_Int PyNumber_Long
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define PyBoolObject PyLongObject
+#endif
+#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
+ #ifndef PyUnicode_InternFromString
+ #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
+ #endif
+#endif
+#if PY_VERSION_HEX < 0x030200A4
+ typedef long Py_hash_t;
+ #define __Pyx_PyInt_FromHash_t PyInt_FromLong
+ #define __Pyx_PyInt_AsHash_t PyInt_AsLong
+#else
+ #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
+ #define __Pyx_PyInt_AsHash_t PyInt_AsSsize_t
+#endif
+#if PY_MAJOR_VERSION >= 3
+ #define __Pyx_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
+#else
+ #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
+#endif
+#ifndef __has_attribute
+ #define __has_attribute(x) 0
+#endif
+#ifndef __has_cpp_attribute
+ #define __has_cpp_attribute(x) 0
+#endif
+#if CYTHON_USE_ASYNC_SLOTS
+ #if PY_VERSION_HEX >= 0x030500B1
+ #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
+ #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
+ #else
+ #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
+ #endif
+#else
+ #define __Pyx_PyType_AsAsync(obj) NULL
+#endif
+#ifndef __Pyx_PyAsyncMethodsStruct
+ typedef struct {
+ unaryfunc am_await;
+ unaryfunc am_aiter;
+ unaryfunc am_anext;
+ } __Pyx_PyAsyncMethodsStruct;
+#endif
+#ifndef CYTHON_RESTRICT
+ #if defined(__GNUC__)
+ #define CYTHON_RESTRICT __restrict__
+ #elif defined(_MSC_VER) && _MSC_VER >= 1400
+ #define CYTHON_RESTRICT __restrict
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_RESTRICT restrict
+ #else
+ #define CYTHON_RESTRICT
+ #endif
+#endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+# define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+# define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+# if defined(__cplusplus)
+ template void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+# else
+# define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+# endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+# define CYTHON_NCP_UNUSED
+# else
+# define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
+#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
+#ifdef _MSC_VER
+ #ifndef _MSC_STDINT_H_
+ #if _MSC_VER < 1300
+ typedef unsigned char uint8_t;
+ typedef unsigned int uint32_t;
+ #else
+ typedef unsigned __int8 uint8_t;
+ typedef unsigned __int32 uint32_t;
+ #endif
+ #endif
+#else
+ #include
+#endif
+#ifndef CYTHON_FALLTHROUGH
+ #if defined(__cplusplus) && __cplusplus >= 201103L
+ #if __has_cpp_attribute(fallthrough)
+ #define CYTHON_FALLTHROUGH [[fallthrough]]
+ #elif __has_cpp_attribute(clang::fallthrough)
+ #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
+ #elif __has_cpp_attribute(gnu::fallthrough)
+ #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
+ #endif
+ #endif
+ #ifndef CYTHON_FALLTHROUGH
+ #if __has_attribute(fallthrough)
+ #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
+ #else
+ #define CYTHON_FALLTHROUGH
+ #endif
+ #endif
+ #if defined(__clang__ ) && defined(__apple_build_version__)
+ #if __apple_build_version__ < 7000000
+ #undef CYTHON_FALLTHROUGH
+ #define CYTHON_FALLTHROUGH
+ #endif
+ #endif
+#endif
+
+#ifndef CYTHON_INLINE
+ #if defined(__clang__)
+ #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+ #elif defined(__GNUC__)
+ #define CYTHON_INLINE __inline__
+ #elif defined(_MSC_VER)
+ #define CYTHON_INLINE __inline
+ #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define CYTHON_INLINE inline
+ #else
+ #define CYTHON_INLINE
+ #endif
+#endif
+
+#if defined(WIN32) || defined(MS_WINDOWS)
+ #define _USE_MATH_DEFINES
+#endif
+#include
+#ifdef NAN
+#define __PYX_NAN() ((float) NAN)
+#else
+static CYTHON_INLINE float __PYX_NAN() {
+ float value;
+ memset(&value, 0xFF, sizeof(value));
+ return value;
+}
+#endif
+#if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
+#define __Pyx_truncl trunc
+#else
+#define __Pyx_truncl truncl
+#endif
+
+
+#define __PYX_ERR(f_index, lineno, Ln_error) \
+{ \
+ __pyx_filename = __pyx_f[f_index]; __pyx_lineno = lineno; __pyx_clineno = __LINE__; goto Ln_error; \
+}
+
+#ifndef __PYX_EXTERN_C
+ #ifdef __cplusplus
+ #define __PYX_EXTERN_C extern "C"
+ #else
+ #define __PYX_EXTERN_C extern
+ #endif
+#endif
+
+#define __PYX_HAVE__pyomo__repn__standard_repn
+#define __PYX_HAVE_API__pyomo__repn__standard_repn
+#ifdef _OPENMP
+#include
+#endif /* _OPENMP */
+
+#if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
+#define CYTHON_WITHOUT_ASSERTIONS
+#endif
+
+typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
+ const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
+
+#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
+#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
+#define __PYX_DEFAULT_STRING_ENCODING ""
+#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
+#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#define __Pyx_uchar_cast(c) ((unsigned char)c)
+#define __Pyx_long_cast(x) ((long)x)
+#define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
+ (sizeof(type) < sizeof(Py_ssize_t)) ||\
+ (sizeof(type) > sizeof(Py_ssize_t) &&\
+ likely(v < (type)PY_SSIZE_T_MAX ||\
+ v == (type)PY_SSIZE_T_MAX) &&\
+ (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
+ v == (type)PY_SSIZE_T_MIN))) ||\
+ (sizeof(type) == sizeof(Py_ssize_t) &&\
+ (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
+ v == (type)PY_SSIZE_T_MAX))) )
+#if defined (__cplusplus) && __cplusplus >= 201103L
+ #include
+ #define __Pyx_sst_abs(value) std::abs(value)
+#elif SIZEOF_INT >= SIZEOF_SIZE_T
+ #define __Pyx_sst_abs(value) abs(value)
+#elif SIZEOF_LONG >= SIZEOF_SIZE_T
+ #define __Pyx_sst_abs(value) labs(value)
+#elif defined (_MSC_VER)
+ #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
+#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+ #define __Pyx_sst_abs(value) llabs(value)
+#elif defined (__GNUC__)
+ #define __Pyx_sst_abs(value) __builtin_llabs(value)
+#else
+ #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
+#endif
+static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
+static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
+#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
+#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
+#define __Pyx_PyBytes_FromString PyBytes_FromString
+#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
+#if PY_MAJOR_VERSION < 3
+ #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
+#else
+ #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
+ #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
+#endif
+#define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
+#define __Pyx_PyObject_AsWritableString(s) ((char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsWritableSString(s) ((signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
+#define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
+#define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
+#define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
+#define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
+#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
+static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) {
+ const Py_UNICODE *u_end = u;
+ while (*u_end++) ;
+ return (size_t)(u_end - u - 1);
+}
+#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
+#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
+#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
+#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
+#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
+#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False))
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
+#define __Pyx_PySequence_Tuple(obj)\
+ (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
+#if CYTHON_ASSUME_SAFE_MACROS
+#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
+#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
+#if PY_MAJOR_VERSION >= 3
+#define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
+#else
+#define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
+#endif
+#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Float(x))
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+static int __Pyx_sys_getdefaultencoding_not_ascii;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ PyObject* ascii_chars_u = NULL;
+ PyObject* ascii_chars_b = NULL;
+ const char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ if (strcmp(default_encoding_c, "ascii") == 0) {
+ __Pyx_sys_getdefaultencoding_not_ascii = 0;
+ } else {
+ char ascii_chars[128];
+ int c;
+ for (c = 0; c < 128; c++) {
+ ascii_chars[c] = c;
+ }
+ __Pyx_sys_getdefaultencoding_not_ascii = 1;
+ ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
+ if (!ascii_chars_u) goto bad;
+ ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
+ if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
+ PyErr_Format(
+ PyExc_ValueError,
+ "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
+ default_encoding_c);
+ goto bad;
+ }
+ Py_DECREF(ascii_chars_u);
+ Py_DECREF(ascii_chars_b);
+ }
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ Py_XDECREF(ascii_chars_u);
+ Py_XDECREF(ascii_chars_b);
+ return -1;
+}
+#endif
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
+#else
+#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
+#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+static char* __PYX_DEFAULT_STRING_ENCODING;
+static int __Pyx_init_sys_getdefaultencoding_params(void) {
+ PyObject* sys;
+ PyObject* default_encoding = NULL;
+ char* default_encoding_c;
+ sys = PyImport_ImportModule("sys");
+ if (!sys) goto bad;
+ default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
+ Py_DECREF(sys);
+ if (!default_encoding) goto bad;
+ default_encoding_c = PyBytes_AsString(default_encoding);
+ if (!default_encoding_c) goto bad;
+ __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
+ if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
+ strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
+ Py_DECREF(default_encoding);
+ return 0;
+bad:
+ Py_XDECREF(default_encoding);
+ return -1;
+}
+#endif
+#endif
+
+
+/* Test for GCC > 2.95 */
+#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
+ #define likely(x) __builtin_expect(!!(x), 1)
+ #define unlikely(x) __builtin_expect(!!(x), 0)
+#else /* !__GNUC__ or GCC < 2.95 */
+ #define likely(x) (x)
+ #define unlikely(x) (x)
+#endif /* __GNUC__ */
+static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
+
+static PyObject *__pyx_m = NULL;
+static PyObject *__pyx_d;
+static PyObject *__pyx_b;
+static PyObject *__pyx_cython_runtime;
+static PyObject *__pyx_empty_tuple;
+static PyObject *__pyx_empty_bytes;
+static PyObject *__pyx_empty_unicode;
+static int __pyx_lineno;
+static int __pyx_clineno = 0;
+static const char * __pyx_cfilenm= __FILE__;
+static const char *__pyx_filename;
+
+
+static const char *__pyx_f[] = {
+ "pyomo/repn/standard_repn.pyx",
+};
+
+/*--- Type declarations ---*/
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr;
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr;
+
+/* "pyomo/repn/standard_repn.pyx":267
+ * """
+ * #@profile
+ * def generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None): # <<<<<<<<<<<<<<
+ * #
+ * # Use a custom isclose function
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn {
+ PyObject_HEAD
+ PyObject *__pyx_v_idMap;
+ PyObject *__pyx_v_keys;
+ PyObject *__pyx_v_linear_coefs;
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":350
+ * linear_coefs[key] = c
+ * keys = list(linear_coefs.keys())
+ * repn.linear_vars = tuple(idMap[key] for key in keys) # <<<<<<<<<<<<<<
+ * repn.linear_coefs = tuple(linear_coefs[key] for key in keys)
+ * repn.constant = C_
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *__pyx_outer_scope;
+ PyObject *__pyx_v_key;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":351
+ * keys = list(linear_coefs.keys())
+ * repn.linear_vars = tuple(idMap[key] for key in keys)
+ * repn.linear_coefs = tuple(linear_coefs[key] for key in keys) # <<<<<<<<<<<<<<
+ * repn.constant = C_
+ * return repn
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *__pyx_outer_scope;
+ PyObject *__pyx_v_key;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":457
+ *
+ * #@profile
+ * def _collect_prod(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * #
+ * # LHS is a numeric value
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod {
+ PyObject_HEAD
+ PyObject *__pyx_v_idMap;
+ PyObject *__pyx_v_lhs;
+ PyObject *__pyx_v_rhs;
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":545
+ * else:
+ * ans.quadratic[rkey,lkey] = multiplier*lcoef*rcoef
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear)) # <<<<<<<<<<<<<<
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ * el_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(lhs.quadratic))
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *__pyx_outer_scope;
+ PyObject *__pyx_v_coef;
+ PyObject *__pyx_v_key;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":546
+ * ans.quadratic[rkey,lkey] = multiplier*lcoef*rcoef
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear)) # <<<<<<<<<<<<<<
+ * el_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(lhs.quadratic))
+ * er_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(rhs.quadratic))
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *__pyx_outer_scope;
+ PyObject *__pyx_v_coef;
+ PyObject *__pyx_v_key;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":547
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ * el_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(lhs.quadratic)) # <<<<<<<<<<<<<<
+ * er_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(rhs.quadratic))
+ * ans.nonl += el_linear*er_quadratic + el_quadratic*er_linear
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *__pyx_outer_scope;
+ PyObject *__pyx_v_coef;
+ PyObject *__pyx_v_key;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":548
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ * el_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(lhs.quadratic))
+ * er_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(rhs.quadratic)) # <<<<<<<<<<<<<<
+ * ans.nonl += el_linear*er_quadratic + el_quadratic*er_linear
+ * elif len(lhs.linear) + len(rhs.linear) > 1:
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *__pyx_outer_scope;
+ PyObject *__pyx_v_coef;
+ PyObject *__pyx_v_key;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":551
+ * ans.nonl += el_linear*er_quadratic + el_quadratic*er_linear
+ * elif len(lhs.linear) + len(rhs.linear) > 1:
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear)) # <<<<<<<<<<<<<<
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ * ans.nonl += el_linear*er_linear
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *__pyx_outer_scope;
+ PyObject *__pyx_v_coef;
+ PyObject *__pyx_v_key;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":552
+ * elif len(lhs.linear) + len(rhs.linear) > 1:
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear)) # <<<<<<<<<<<<<<
+ * ans.nonl += el_linear*er_linear
+ *
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *__pyx_outer_scope;
+ PyObject *__pyx_v_coef;
+ PyObject *__pyx_v_key;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+ PyObject *(*__pyx_t_2)(PyObject *);
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":802
+ * raise ValueError( "Unexpected expression (type %s)" % type(exp).__name__)
+ *
+ * def _generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None): # <<<<<<<<<<<<<<
+ * #
+ * # Call recursive logic
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn {
+ PyObject_HEAD
+ PyObject *__pyx_v_ans;
+ PyObject *__pyx_v_idMap;
+ PyObject *__pyx_v_keys;
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":819
+ * #
+ * if compute_values:
+ * keys = list(key for key in ans.linear if not isclose(ans.linear[key],0)) # <<<<<<<<<<<<<<
+ * else:
+ * keys = list(ans.linear.keys())
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *__pyx_outer_scope;
+ PyObject *__pyx_v_key;
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":822
+ * else:
+ * keys = list(ans.linear.keys())
+ * repn.linear_vars = tuple(idMap[key] for key in keys) # <<<<<<<<<<<<<<
+ * repn.linear_coefs = tuple(ans.linear[key] for key in keys)
+ *
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *__pyx_outer_scope;
+ PyObject *__pyx_v_key;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":823
+ * keys = list(ans.linear.keys())
+ * repn.linear_vars = tuple(idMap[key] for key in keys)
+ * repn.linear_coefs = tuple(ans.linear[key] for key in keys) # <<<<<<<<<<<<<<
+ *
+ * if quadratic:
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *__pyx_outer_scope;
+ PyObject *__pyx_v_key;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":826
+ *
+ * if quadratic:
+ * keys = list(key for key in ans.quadratic if not isclose(ans.quadratic[key],0)) # <<<<<<<<<<<<<<
+ * repn.quadratic_vars = tuple((idMap[key[0]],idMap[key[1]]) for key in keys)
+ * repn.quadratic_coefs = tuple(ans.quadratic[key] for key in keys)
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *__pyx_outer_scope;
+ PyObject *__pyx_v_key;
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":827
+ * if quadratic:
+ * keys = list(key for key in ans.quadratic if not isclose(ans.quadratic[key],0))
+ * repn.quadratic_vars = tuple((idMap[key[0]],idMap[key[1]]) for key in keys) # <<<<<<<<<<<<<<
+ * repn.quadratic_coefs = tuple(ans.quadratic[key] for key in keys)
+ *
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *__pyx_outer_scope;
+ PyObject *__pyx_v_key;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+};
+
+
+/* "pyomo/repn/standard_repn.pyx":828
+ * keys = list(key for key in ans.quadratic if not isclose(ans.quadratic[key],0))
+ * repn.quadratic_vars = tuple((idMap[key[0]],idMap[key[1]]) for key in keys)
+ * repn.quadratic_coefs = tuple(ans.quadratic[key] for key in keys) # <<<<<<<<<<<<<<
+ *
+ * if not isclose_const(ans.nonl,0):
+ */
+struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr {
+ PyObject_HEAD
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *__pyx_outer_scope;
+ PyObject *__pyx_v_key;
+ PyObject *__pyx_t_0;
+ Py_ssize_t __pyx_t_1;
+};
+
+
+/* --- Runtime support code (head) --- */
+/* Refnanny.proto */
+#ifndef CYTHON_REFNANNY
+ #define CYTHON_REFNANNY 0
+#endif
+#if CYTHON_REFNANNY
+ typedef struct {
+ void (*INCREF)(void*, PyObject*, int);
+ void (*DECREF)(void*, PyObject*, int);
+ void (*GOTREF)(void*, PyObject*, int);
+ void (*GIVEREF)(void*, PyObject*, int);
+ void* (*SetupContext)(const char*, int, const char*);
+ void (*FinishContext)(void**);
+ } __Pyx_RefNannyAPIStruct;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
+ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
+ #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
+#ifdef WITH_THREAD
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ if (acquire_gil) {\
+ PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ PyGILState_Release(__pyx_gilstate_save);\
+ } else {\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
+ }
+#else
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)\
+ __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
+#endif
+ #define __Pyx_RefNannyFinishContext()\
+ __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
+ #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
+ #define __Pyx_XINCREF(r) do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
+ #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
+ #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
+ #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
+#else
+ #define __Pyx_RefNannyDeclarations
+ #define __Pyx_RefNannySetupContext(name, acquire_gil)
+ #define __Pyx_RefNannyFinishContext()
+ #define __Pyx_INCREF(r) Py_INCREF(r)
+ #define __Pyx_DECREF(r) Py_DECREF(r)
+ #define __Pyx_GOTREF(r)
+ #define __Pyx_GIVEREF(r)
+ #define __Pyx_XINCREF(r) Py_XINCREF(r)
+ #define __Pyx_XDECREF(r) Py_XDECREF(r)
+ #define __Pyx_XGOTREF(r)
+ #define __Pyx_XGIVEREF(r)
+#endif
+#define __Pyx_XDECREF_SET(r, v) do {\
+ PyObject *tmp = (PyObject *) r;\
+ r = v; __Pyx_XDECREF(tmp);\
+ } while (0)
+#define __Pyx_DECREF_SET(r, v) do {\
+ PyObject *tmp = (PyObject *) r;\
+ r = v; __Pyx_DECREF(tmp);\
+ } while (0)
+#define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
+#define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
+
+/* PyObjectGetAttrStr.proto */
+#if CYTHON_USE_TYPE_SLOTS
+static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_getattro))
+ return tp->tp_getattro(obj, attr_name);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_getattr))
+ return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
+#endif
+ return PyObject_GetAttr(obj, attr_name);
+}
+#else
+#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
+#endif
+
+/* GetBuiltinName.proto */
+static PyObject *__Pyx_GetBuiltinName(PyObject *name);
+
+/* RaiseArgTupleInvalid.proto */
+static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
+ Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
+
+/* RaiseDoubleKeywords.proto */
+static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
+
+/* ParseKeywords.proto */
+static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],\
+ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,\
+ const char* function_name);
+
+/* GetModuleGlobalName.proto */
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name);
+
+/* PySequenceContains.proto */
+static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
+ int result = PySequence_Contains(seq, item);
+ return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+/* PyCFunctionFastCall.proto */
+#if CYTHON_FAST_PYCCALL
+static CYTHON_INLINE PyObject *__Pyx_PyCFunction_FastCall(PyObject *func, PyObject **args, Py_ssize_t nargs);
+#else
+#define __Pyx_PyCFunction_FastCall(func, args, nargs) (assert(0), NULL)
+#endif
+
+/* PyFunctionFastCall.proto */
+#if CYTHON_FAST_PYCALL
+#define __Pyx_PyFunction_FastCall(func, args, nargs)\
+ __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs);
+#else
+#define __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs) _PyFunction_FastCallDict(func, args, nargs, kwargs)
+#endif
+#endif
+
+/* PyObjectCall.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
+#else
+#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
+#endif
+
+/* PyObjectCallMethO.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
+#endif
+
+/* PyObjectCallOneArg.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
+
+/* PyObjectCallNoArg.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
+#else
+#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
+#endif
+
+/* PyObjectSetAttrStr.proto */
+#if CYTHON_USE_TYPE_SLOTS
+#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
+static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
+ PyTypeObject* tp = Py_TYPE(obj);
+ if (likely(tp->tp_setattro))
+ return tp->tp_setattro(obj, attr_name, value);
+#if PY_MAJOR_VERSION < 3
+ if (likely(tp->tp_setattr))
+ return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
+#endif
+ return PyObject_SetAttr(obj, attr_name, value);
+}
+#else
+#define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
+#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
+#endif
+
+/* RaiseTooManyValuesToUnpack.proto */
+static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
+
+/* RaiseNeedMoreValuesToUnpack.proto */
+static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
+
+/* IterFinish.proto */
+static CYTHON_INLINE int __Pyx_IterFinish(void);
+
+/* UnpackItemEndCheck.proto */
+static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
+
+/* ListCompAppend.proto */
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) {
+ PyListObject* L = (PyListObject*) list;
+ Py_ssize_t len = Py_SIZE(list);
+ if (likely(L->allocated > len)) {
+ Py_INCREF(x);
+ PyList_SET_ITEM(list, len, x);
+ Py_SIZE(list) = len+1;
+ return 0;
+ }
+ return PyList_Append(list, x);
+}
+#else
+#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x)
+#endif
+
+/* GetItemInt.proto */
+#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
+ (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
+ __Pyx_GetItemInt_Generic(o, to_py_func(i))))
+#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
+ (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
+ __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
+ (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ int wraparound, int boundscheck);
+static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
+ int is_list, int wraparound, int boundscheck);
+
+/* PyThreadStateGet.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
+#define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
+#define __Pyx_PyErr_Occurred() __pyx_tstate->curexc_type
+#else
+#define __Pyx_PyThreadState_declare
+#define __Pyx_PyThreadState_assign
+#define __Pyx_PyErr_Occurred() PyErr_Occurred()
+#endif
+
+/* SaveResetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
+#else
+#define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
+#define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
+#endif
+
+/* PyErrExceptionMatches.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
+static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
+#else
+#define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
+#endif
+
+/* GetException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#else
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
+#endif
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace)\
+ (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
+#endif
+
+/* None.proto */
+static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname);
+
+/* DictGetItem.proto */
+#if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
+static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
+ PyObject *value;
+ value = PyDict_GetItemWithError(d, key);
+ if (unlikely(!value)) {
+ if (!PyErr_Occurred()) {
+ PyObject* args = PyTuple_Pack(1, key);
+ if (likely(args))
+ PyErr_SetObject(PyExc_KeyError, args);
+ Py_XDECREF(args);
+ }
+ return NULL;
+ }
+ Py_INCREF(value);
+ return value;
+}
+#else
+ #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
+#endif
+
+/* PyObjectLookupSpecial.proto */
+#if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
+static CYTHON_INLINE PyObject* __Pyx_PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name) {
+ PyObject *res;
+ PyTypeObject *tp = Py_TYPE(obj);
+#if PY_MAJOR_VERSION < 3
+ if (unlikely(PyInstance_Check(obj)))
+ return __Pyx_PyObject_GetAttrStr(obj, attr_name);
+#endif
+ res = _PyType_Lookup(tp, attr_name);
+ if (likely(res)) {
+ descrgetfunc f = Py_TYPE(res)->tp_descr_get;
+ if (!f) {
+ Py_INCREF(res);
+ } else {
+ res = f(res, obj, (PyObject *)tp);
+ }
+ } else {
+ PyErr_SetObject(PyExc_AttributeError, attr_name);
+ }
+ return res;
+}
+#else
+#define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
+#endif
+
+/* ListAppend.proto */
+#if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
+static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
+ PyListObject* L = (PyListObject*) list;
+ Py_ssize_t len = Py_SIZE(list);
+ if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
+ Py_INCREF(x);
+ PyList_SET_ITEM(list, len, x);
+ Py_SIZE(list) = len+1;
+ return 0;
+ }
+ return PyList_Append(list, x);
+}
+#else
+#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
+#endif
+
+/* PyDictContains.proto */
+static CYTHON_INLINE int __Pyx_PyDict_ContainsTF(PyObject* item, PyObject* dict, int eq) {
+ int result = PyDict_Contains(dict, item);
+ return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
+}
+
+/* py_dict_keys.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d);
+
+/* UnpackUnboundCMethod.proto */
+typedef struct {
+ PyObject *type;
+ PyObject **method_name;
+ PyCFunction func;
+ PyObject *method;
+ int flag;
+} __Pyx_CachedCFunction;
+
+/* CallUnboundCMethod0.proto */
+static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_CallUnboundCMethod0(cfunc, self)\
+ ((likely((cfunc)->func)) ?\
+ (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\
+ (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
+ ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\
+ (PY_VERSION_HEX >= 0x030600B1 && (cfunc)->flag == METH_FASTCALL ?\
+ (PY_VERSION_HEX >= 0x030700A0 ?\
+ (*(__Pyx_PyCFunctionFast)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0) :\
+ (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL)) :\
+ (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
+ (*(__Pyx_PyCFunctionFastWithKeywords)(cfunc)->func)(self, &PyTuple_GET_ITEM(__pyx_empty_tuple, 0), 0, NULL) :\
+ __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
+ __Pyx__CallUnboundCMethod0(cfunc, self))
+#else
+#define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
+#endif
+
+/* PyErrFetchRestore.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
+#define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
+#define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
+#define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
+#define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
+static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
+#else
+#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
+#endif
+#else
+#define __Pyx_PyErr_Clear() PyErr_Clear()
+#define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
+#define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
+#define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
+#define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
+#define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
+#endif
+
+/* RaiseException.proto */
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
+
+/* PyIntBinop.proto */
+#if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, long intval, int inplace);
+#else
+#define __Pyx_PyInt_EqObjC(op1, op2, intval, inplace)\
+ PyObject_RichCompare(op1, op2, Py_EQ)
+ #endif
+
+/* PyObjectCallMethod1.proto */
+static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
+static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg);
+
+/* append.proto */
+static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
+
+/* GetAttr.proto */
+static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
+
+/* HasAttr.proto */
+static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
+
+/* Import.proto */
+static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
+
+/* ImportFrom.proto */
+static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
+
+/* IncludeStringH.proto */
+#include
+
+/* CalculateMetaclass.proto */
+static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
+
+/* FetchCommonType.proto */
+static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
+
+/* CythonFunction.proto */
+#define __Pyx_CyFunction_USED 1
+#include
+#define __Pyx_CYFUNCTION_STATICMETHOD 0x01
+#define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
+#define __Pyx_CYFUNCTION_CCLASS 0x04
+#define __Pyx_CyFunction_GetClosure(f)\
+ (((__pyx_CyFunctionObject *) (f))->func_closure)
+#define __Pyx_CyFunction_GetClassObj(f)\
+ (((__pyx_CyFunctionObject *) (f))->func_classobj)
+#define __Pyx_CyFunction_Defaults(type, f)\
+ ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
+#define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
+ ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
+typedef struct {
+ PyCFunctionObject func;
+#if PY_VERSION_HEX < 0x030500A0
+ PyObject *func_weakreflist;
+#endif
+ PyObject *func_dict;
+ PyObject *func_name;
+ PyObject *func_qualname;
+ PyObject *func_doc;
+ PyObject *func_globals;
+ PyObject *func_code;
+ PyObject *func_closure;
+ PyObject *func_classobj;
+ void *defaults;
+ int defaults_pyobjects;
+ int flags;
+ PyObject *defaults_tuple;
+ PyObject *defaults_kwdict;
+ PyObject *(*defaults_getter)(PyObject *);
+ PyObject *func_annotations;
+} __pyx_CyFunctionObject;
+static PyTypeObject *__pyx_CyFunctionType = 0;
+#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code)\
+ __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code)
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml,
+ int flags, PyObject* qualname,
+ PyObject *self,
+ PyObject *module, PyObject *globals,
+ PyObject* code);
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
+ size_t size,
+ int pyobjects);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
+ PyObject *tuple);
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
+ PyObject *dict);
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
+ PyObject *dict);
+static int __pyx_CyFunction_init(void);
+
+/* Py3ClassCreate.proto */
+static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
+ PyObject *mkw, PyObject *modname, PyObject *doc);
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
+ PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
+
+/* CLineInTraceback.proto */
+#ifdef CYTHON_CLINE_IN_TRACEBACK
+#define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
+#else
+static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
+#endif
+
+/* CodeObjectCache.proto */
+typedef struct {
+ PyCodeObject* code_object;
+ int code_line;
+} __Pyx_CodeObjectCacheEntry;
+struct __Pyx_CodeObjectCache {
+ int count;
+ int max_count;
+ __Pyx_CodeObjectCacheEntry* entries;
+};
+static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
+static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
+static PyCodeObject *__pyx_find_code_object(int code_line);
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
+
+/* AddTraceback.proto */
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename);
+
+/* CIntToPy.proto */
+static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
+
+/* CIntFromPy.proto */
+static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
+
+/* FastTypeChecks.proto */
+#if CYTHON_COMPILING_IN_CPYTHON
+#define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
+static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
+#else
+#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
+#define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
+#define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
+#endif
+
+/* SwapException.proto */
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
+static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
+#else
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
+#endif
+
+/* CoroutineBase.proto */
+typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyThreadState *, PyObject *);
+typedef struct {
+ PyObject_HEAD
+ __pyx_coroutine_body_t body;
+ PyObject *closure;
+ PyObject *exc_type;
+ PyObject *exc_value;
+ PyObject *exc_traceback;
+ PyObject *gi_weakreflist;
+ PyObject *classobj;
+ PyObject *yieldfrom;
+ PyObject *gi_name;
+ PyObject *gi_qualname;
+ PyObject *gi_modulename;
+ int resume_label;
+ char is_running;
+} __pyx_CoroutineObject;
+static __pyx_CoroutineObject *__Pyx__Coroutine_New(
+ PyTypeObject *type, __pyx_coroutine_body_t body, PyObject *closure,
+ PyObject *name, PyObject *qualname, PyObject *module_name);
+static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
+ __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *closure,
+ PyObject *name, PyObject *qualname, PyObject *module_name);
+static int __Pyx_Coroutine_clear(PyObject *self);
+static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
+static PyObject *__Pyx_Coroutine_Close(PyObject *self);
+static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
+#define __Pyx_Coroutine_SwapException(self) {\
+ __Pyx_ExceptionSwap(&(self)->exc_type, &(self)->exc_value, &(self)->exc_traceback);\
+ __Pyx_Coroutine_ResetFrameBackpointer(self);\
+ }
+#define __Pyx_Coroutine_ResetAndClearException(self) {\
+ __Pyx_ExceptionReset((self)->exc_type, (self)->exc_value, (self)->exc_traceback);\
+ (self)->exc_type = (self)->exc_value = (self)->exc_traceback = NULL;\
+ }
+#if CYTHON_FAST_THREAD_STATE
+#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
+ __Pyx_PyGen__FetchStopIterationValue(__pyx_tstate, pvalue)
+#else
+#define __Pyx_PyGen_FetchStopIterationValue(pvalue)\
+ __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, pvalue)
+#endif
+static int __Pyx_PyGen__FetchStopIterationValue(PyThreadState *tstate, PyObject **pvalue);
+static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self);
+
+/* PatchModuleWithCoroutine.proto */
+static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);
+
+/* PatchGeneratorABC.proto */
+static int __Pyx_patch_abc(void);
+
+/* Generator.proto */
+#define __Pyx_Generator_USED
+static PyTypeObject *__pyx_GeneratorType = 0;
+#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
+#define __Pyx_Generator_New(body, closure, name, qualname, module_name)\
+ __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname, module_name)
+static PyObject *__Pyx_Generator_Next(PyObject *self);
+static int __pyx_Generator_init(void);
+
+/* CheckBinaryVersion.proto */
+static int __Pyx_check_binary_version(void);
+
+/* InitStrings.proto */
+static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
+
+
+/* Module declarations from 'pyomo.repn.standard_repn' */
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr = 0;
+static PyTypeObject *__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr = 0;
+#define __Pyx_MODULE_NAME "pyomo.repn.standard_repn"
+extern int __pyx_module_is_main_pyomo__repn__standard_repn;
+int __pyx_module_is_main_pyomo__repn__standard_repn = 0;
+
+/* Implementation of 'pyomo.repn.standard_repn' */
+static PyObject *__pyx_builtin_object;
+static PyObject *__pyx_builtin_id;
+static PyObject *__pyx_builtin_AttributeError;
+static PyObject *__pyx_builtin_enumerate;
+static PyObject *__pyx_builtin_ValueError;
+static PyObject *__pyx_builtin_sum;
+static PyObject *__pyx_builtin_ZeroDivisionError;
+static PyObject *__pyx_builtin_KeyError;
+static const char __pyx_k_[] = "\n";
+static const char __pyx_k_C[] = "C_";
+static const char __pyx_k_a[] = "a";
+static const char __pyx_k_b[] = "b";
+static const char __pyx_k_c[] = "c_";
+static const char __pyx_k_e[] = "e_";
+static const char __pyx_k_i[] = "i";
+static const char __pyx_k_v[] = "v_";
+static const char __pyx_k_id[] = "id";
+static const char __pyx_k_if[] = "_if";
+static const char __pyx_k_PY3[] = "PY3";
+static const char __pyx_k_Sum[] = "Sum";
+static const char __pyx_k_Var[] = "Var";
+static const char __pyx_k_all[] = "__all__";
+static const char __pyx_k_ans[] = "ans";
+static const char __pyx_k_c_2[] = "c";
+static const char __pyx_k_doc[] = "__doc__";
+static const char __pyx_k_err[] = "err";
+static const char __pyx_k_exp[] = "exp";
+static const char __pyx_k_get[] = "get";
+static const char __pyx_k_key[] = "key";
+static const char __pyx_k_lhs[] = "lhs";
+static const char __pyx_k_res[] = "res_";
+static const char __pyx_k_rhs[] = "rhs";
+static const char __pyx_k_six[] = "six";
+static const char __pyx_k_str[] = "__str__";
+static const char __pyx_k_sum[] = "sum";
+static const char __pyx_k_sys[] = "sys";
+static const char __pyx_k_v_2[] = "v";
+static const char __pyx_k_val[] = "val";
+static const char __pyx_k_zip[] = "zip";
+static const char __pyx_k_EXPR[] = "EXPR";
+static const char __pyx_k_args[] = "_args_";
+static const char __pyx_k_body[] = "body";
+static const char __pyx_k_coef[] = "coef";
+static const char __pyx_k_diff[] = "diff";
+static const char __pyx_k_else[] = "_else";
+static const char __pyx_k_exit[] = "__exit__";
+static const char __pyx_k_expr[] = "expr";
+static const char __pyx_k_fabs[] = "fabs";
+static const char __pyx_k_id_2[] = "id_";
+static const char __pyx_k_init[] = "__init__";
+static const char __pyx_k_keys[] = "keys";
+static const char __pyx_k_lkey[] = "lkey";
+static const char __pyx_k_main[] = "__main__";
+static const char __pyx_k_math[] = "math";
+static const char __pyx_k_name[] = "name";
+static const char __pyx_k_nonl[] = "nonl";
+static const char __pyx_k_repn[] = "repn";
+static const char __pyx_k_rkey[] = "rkey";
+static const char __pyx_k_self[] = "self";
+static const char __pyx_k_send[] = "send";
+static const char __pyx_k_slot[] = "__slot__";
+static const char __pyx_k_term[] = "term";
+static const char __pyx_k_test[] = "__test__";
+static const char __pyx_k_then[] = "_then";
+static const char __pyx_k_Bunch[] = "Bunch";
+static const char __pyx_k_block[] = "block";
+static const char __pyx_k_class[] = "__class__";
+static const char __pyx_k_close[] = "close";
+static const char __pyx_k_const[] = "const";
+static const char __pyx_k_denom[] = "denom";
+static const char __pyx_k_enter[] = "__enter__";
+static const char __pyx_k_error[] = "error";
+static const char __pyx_k_fixed[] = "fixed";
+static const char __pyx_k_idMap[] = "idMap";
+static const char __pyx_k_index[] = "index";
+static const char __pyx_k_lcoef[] = "lcoef";
+static const char __pyx_k_nargs[] = "nargs";
+static const char __pyx_k_pyomo[] = "pyomo";
+static const char __pyx_k_rcoef[] = "rcoef";
+static const char __pyx_k_res_2[] = "res";
+static const char __pyx_k_slots[] = "__slots__";
+static const char __pyx_k_state[] = "state";
+static const char __pyx_k_throw[] = "throw";
+static const char __pyx_k_value[] = "value";
+static const char __pyx_k_write[] = "write";
+static const char __pyx_k_active[] = "active";
+static const char __pyx_k_append[] = "append";
+static const char __pyx_k_args_2[] = "args";
+static const char __pyx_k_if_val[] = "if_val";
+static const char __pyx_k_import[] = "__import__";
+static const char __pyx_k_islice[] = "islice";
+static const char __pyx_k_linear[] = "linear";
+static const char __pyx_k_logger[] = "logger";
+static const char __pyx_k_module[] = "__module__";
+static const char __pyx_k_name_2[] = "__name__";
+static const char __pyx_k_object[] = "object";
+static const char __pyx_k_output[] = "output";
+static const char __pyx_k_repn_2[] = "_repn";
+static const char __pyx_k_xrange[] = "xrange";
+static const char __pyx_k_Expr_if[] = "Expr_if";
+static const char __pyx_k_Results[] = "Results";
+static const char __pyx_k_VarData[] = "_VarData";
+static const char __pyx_k_abs_tol[] = "abs_tol";
+static const char __pyx_k_current[] = "current";
+static const char __pyx_k_genexpr[] = "genexpr";
+static const char __pyx_k_isclose[] = "isclose";
+static const char __pyx_k_logging[] = "logging";
+static const char __pyx_k_noclone[] = "noclone";
+static const char __pyx_k_prepare[] = "__prepare__";
+static const char __pyx_k_rel_tol[] = "rel_tol";
+static const char __pyx_k_ret_str[] = "ret_str";
+static const char __pyx_k_varkeys[] = "varkeys";
+static const char __pyx_k_verbose[] = "verbose";
+static const char __pyx_k_KeyError[] = "KeyError";
+static const char __pyx_k_StringIO[] = "StringIO";
+static const char __pyx_k_constant[] = "constant";
+static const char __pyx_k_exc_info[] = "exc_info";
+static const char __pyx_k_exponent[] = "exponent";
+static const char __pyx_k_getstate[] = "__getstate__";
+static const char __pyx_k_getvalue[] = "getvalue";
+static const char __pyx_k_is_fixed[] = "is_fixed";
+static const char __pyx_k_qualname[] = "__qualname__";
+static const char __pyx_k_setstate[] = "__setstate__";
+static const char __pyx_k_variable[] = "variable";
+static const char __pyx_k_IVariable[] = "IVariable";
+static const char __pyx_k_Objective[] = "Objective";
+static const char __pyx_k_ParamData[] = "_ParamData";
+static const char __pyx_k_SimpleVar[] = "SimpleVar";
+static const char __pyx_k_el_linear[] = "el_linear";
+static const char __pyx_k_enumerate[] = "enumerate";
+static const char __pyx_k_er_linear[] = "er_linear";
+static const char __pyx_k_getLogger[] = "getLogger";
+static const char __pyx_k_is_linear[] = "is_linear";
+static const char __pyx_k_iteritems[] = "iteritems";
+static const char __pyx_k_itertools[] = "itertools";
+static const char __pyx_k_metaclass[] = "__metaclass__";
+static const char __pyx_k_objective[] = "objective";
+static const char __pyx_k_quadratic[] = "quadratic";
+static const char __pyx_k_six_moves[] = "six.moves";
+static const char __pyx_k_to_string[] = "to_string";
+static const char __pyx_k_using_py3[] = "using_py3";
+static const char __pyx_k_Constraint[] = "Constraint";
+static const char __pyx_k_Expression[] = "Expression";
+static const char __pyx_k_ValueError[] = "ValueError";
+static const char __pyx_k_basestring[] = "basestring";
+static const char __pyx_k_block_repn[] = "block_repn";
+static const char __pyx_k_constant_2[] = "constant: ";
+static const char __pyx_k_constraint[] = "constraint";
+static const char __pyx_k_expression[] = "expression";
+static const char __pyx_k_itervalues[] = "itervalues";
+static const char __pyx_k_multiplier[] = "multiplier";
+static const char __pyx_k_pyomo_core[] = "pyomo.core";
+static const char __pyx_k_pyomo_util[] = "pyomo.util";
+static const char __pyx_k_setdefault[] = "setdefault";
+static const char __pyx_k_collect_pow[] = "_collect_pow";
+static const char __pyx_k_collect_sum[] = "_collect_sum";
+static const char __pyx_k_collect_var[] = "_collect_var";
+static const char __pyx_k_is_constant[] = "is_constant";
+static const char __pyx_k_linear_coef[] = "linear coef: ";
+static const char __pyx_k_linear_vars[] = "linear_vars";
+static const char __pyx_k_ComponentMap[] = "ComponentMap";
+static const char __pyx_k_StandardRepn[] = "StandardRepn";
+static const char __pyx_k_collect_nonl[] = "_collect_nonl";
+static const char __pyx_k_collect_prod[] = "_collect_prod";
+static const char __pyx_k_descend_into[] = "descend_into";
+static const char __pyx_k_el_quadratic[] = "el_quadratic";
+static const char __pyx_k_er_quadratic[] = "er_quadratic";
+static const char __pyx_k_is_nonlinear[] = "is_nonlinear";
+static const char __pyx_k_is_quadratic[] = "is_quadratic";
+static const char __pyx_k_linear_coefs[] = "linear_coefs";
+static const char __pyx_k_AbsExpression[] = "AbsExpression";
+static const char __pyx_k_PowExpression[] = "PowExpression";
+static const char __pyx_k_Results___str[] = "Results.__str__";
+static const char __pyx_k_include_fixed[] = "include_fixed";
+static const char __pyx_k_isclose_const[] = "isclose_const";
+static const char __pyx_k_lhs_nonl_None[] = "lhs_nonl_None";
+static const char __pyx_k_linear_vars_2[] = "linear vars: ";
+static const char __pyx_k_pyutilib_misc[] = "pyutilib.misc";
+static const char __pyx_k_rhs_nonl_None[] = "rhs_nonl_None";
+static const char __pyx_k_to_expression[] = "to_expression";
+static const char __pyx_k_AttributeError[] = "AttributeError";
+static const char __pyx_k_ExpressionData[] = "_ExpressionData";
+static const char __pyx_k_GeneralVarData[] = "_GeneralVarData";
+static const char __pyx_k_Results___init[] = "Results.__init__";
+static const char __pyx_k_collect_linear[] = "_collect_linear";
+static const char __pyx_k_compute_values[] = "compute_values";
+static const char __pyx_k_linear_var_ids[] = "linear var ids: ";
+static const char __pyx_k_nonlinear_expr[] = "nonlinear_expr";
+static const char __pyx_k_nonlinear_vars[] = "nonlinear_vars";
+static const char __pyx_k_objective_data[] = "objective_data";
+static const char __pyx_k_quadratic_coef[] = "quadratic coef: ";
+static const char __pyx_k_quadratic_vars[] = "quadratic_vars";
+static const char __pyx_k_NumericConstant[] = "NumericConstant";
+static const char __pyx_k_SimpleObjective[] = "SimpleObjective";
+static const char __pyx_k_apply_operation[] = "_apply_operation";
+static const char __pyx_k_constraint_data[] = "constraint_data";
+static const char __pyx_k_isclose_context[] = "isclose_context";
+static const char __pyx_k_isclose_default[] = "isclose_default";
+static const char __pyx_k_pyomo_core_base[] = "pyomo.core.base";
+static const char __pyx_k_pyomo_core_expr[] = "pyomo.core.expr";
+static const char __pyx_k_pyomo_core_util[] = "pyomo.core.util";
+static const char __pyx_k_quadratic_coefs[] = "quadratic_coefs";
+static const char __pyx_k_repn_collectors[] = "_repn_collectors";
+static const char __pyx_k_LinearExpression[] = "LinearExpression";
+static const char __pyx_k_MatrixConstraint[] = "MatrixConstraint";
+static const char __pyx_k_RangedExpression[] = "RangedExpression";
+static const char __pyx_k_SimpleExpression[] = "SimpleExpression";
+static const char __pyx_k_collect_identity[] = "_collect_identity";
+static const char __pyx_k_collect_negation[] = "_collect_negation";
+static const char __pyx_k_is_variable_type[] = "is_variable_type";
+static const char __pyx_k_nonlinear_expr_2[] = "nonlinear expr:\n";
+static const char __pyx_k_nonlinear_vars_2[] = "nonlinear vars: ";
+static const char __pyx_k_quadratic_vars_2[] = "quadratic vars: ";
+static const char __pyx_k_ProductExpression[] = "ProductExpression";
+static const char __pyx_k_ViewSumExpression[] = "ViewSumExpression";
+static const char __pyx_k_ZeroDivisionError[] = "ZeroDivisionError";
+static const char __pyx_k_component_objects[] = "component_objects";
+static const char __pyx_k_polynomial_degree[] = "polynomial_degree";
+static const char __pyx_k_quadratic_var_ids[] = "quadratic var ids: ";
+static const char __pyx_k_EqualityExpression[] = "EqualityExpression";
+static const char __pyx_k_NegationExpression[] = "NegationExpression";
+static const char __pyx_k_StandardRepn___str[] = "StandardRepn.__str__";
+static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
+static const char __pyx_k_collect_comparison[] = "_collect_comparison";
+static const char __pyx_k_collect_linear_sum[] = "_collect_linear_sum";
+static const char __pyx_k_collect_reciprocal[] = "_collect_reciprocal";
+static const char __pyx_k_identify_variables[] = "identify_variables";
+static const char __pyx_k_is_expression_type[] = "is_expression_type";
+static const char __pyx_k_pyutilib_math_util[] = "pyutilib.math.util";
+static const char __pyx_k_IIdentityExpression[] = "IIdentityExpression";
+static const char __pyx_k_StandardRepn___init[] = "StandardRepn.__init__";
+static const char __pyx_k_collect_external_fn[] = "_collect_external_fn";
+static const char __pyx_k_evaluate_expression[] = "evaluate_expression";
+static const char __pyx_k_nonlinear_expr_None[] = "nonlinear expr: None\n";
+static const char __pyx_k_pyomo_core_base_var[] = "pyomo.core.base.var";
+static const char __pyx_k_GeneralObjectiveData[] = "_GeneralObjectiveData";
+static const char __pyx_k_InequalityExpression[] = "InequalityExpression";
+static const char __pyx_k_ReciprocalExpression[] = "ReciprocalExpression";
+static const char __pyx_k_native_numeric_types[] = "native_numeric_types";
+static const char __pyx_k_GeneralExpressionData[] = "_GeneralExpressionData";
+static const char __pyx_k_StandardRepn_is_fixed[] = "StandardRepn.is_fixed";
+static const char __pyx_k_collect_standard_repn[] = "_collect_standard_repn";
+static const char __pyx_k_preprocess_constraint[] = "preprocess_constraint";
+static const char __pyx_k_pyomo_core_base_param[] = "pyomo.core.base.param";
+static const char __pyx_k_StandardRepn_is_linear[] = "StandardRepn.is_linear";
+static const char __pyx_k_collect_branching_expr[] = "_collect_branching_expr";
+static const char __pyx_k_component_data_objects[] = "component_data_objects";
+static const char __pyx_k_generate_standard_repn[] = "generate_standard_repn";
+static const char __pyx_k_isclose_context___exit[] = "isclose_context.__exit__";
+static const char __pyx_k_isclose_context___init[] = "isclose_context.__init__";
+static const char __pyx_k_pyomo_repn_beta_matrix[] = "pyomo.repn.beta.matrix";
+static const char __pyx_k_StandardRepn___getstate[] = "StandardRepn.__getstate__";
+static const char __pyx_k_StandardRepn___setstate[] = "StandardRepn.__setstate__";
+static const char __pyx_k_UnaryFunctionExpression[] = "UnaryFunctionExpression";
+static const char __pyx_k_is_potentially_variable[] = "is_potentially_variable";
+static const char __pyx_k_isclose_context___enter[] = "isclose_context.__enter__";
+static const char __pyx_k_StandardRepn_is_constant[] = "StandardRepn.is_constant";
+static const char __pyx_k_generate_standard_repn_2[] = "_generate_standard_repn";
+static const char __pyx_k_is_named_expression_type[] = "is_named_expression_type";
+static const char __pyx_k_pyomo_core_base_numvalue[] = "pyomo.core.base.numvalue";
+static const char __pyx_k_pyomo_repn_standard_repn[] = "pyomo.repn.standard_repn";
+static const char __pyx_k_StandardRepn_is_nonlinear[] = "StandardRepn.is_nonlinear";
+static const char __pyx_k_StandardRepn_is_quadratic[] = "StandardRepn.is_quadratic";
+static const char __pyx_k_pyomo_core_base_objective[] = "pyomo.core.base.objective";
+static const char __pyx_k_ExternalFunctionExpression[] = "ExternalFunctionExpression";
+static const char __pyx_k_StandardRepn_to_expression[] = "StandardRepn.to_expression";
+static const char __pyx_k_Unexpected_expression_type[] = "Unexpected expression type: ";
+static const char __pyx_k_preprocess_constraint_data[] = "preprocess_constraint_data";
+static const char __pyx_k_pyomo_core_base_expression[] = "pyomo.core.base.expression";
+static const char __pyx_k_collect_prod_locals_genexpr[] = "_collect_prod..genexpr";
+static const char __pyx_k_preprocess_block_objectives[] = "preprocess_block_objectives";
+static const char __pyx_k_Unexpected_expression_type_s[] = "Unexpected expression (type %s)";
+static const char __pyx_k_preprocess_block_constraints[] = "preprocess_block_constraints";
+static const char __pyx_k_pyomo_repn_standard_repn_pyx[] = "pyomo/repn/standard_repn.pyx";
+static const char __pyx_k_StandardRepn_polynomial_degree[] = "StandardRepn.polynomial_degree";
+static const char __pyx_k_This_class_defines_a_standard_c[] = "\n This class defines a standard/common representation for Pyomo expressions\n that provides an efficient interface for writing all models.\n\n TODO: define what \"efficient\" means to us.\n ";
+static const char __pyx_k_exception_generating_a_standard[] = "exception generating a standard representation for objective %s: %s";
+static const char __pyx_k_generate_standard_repn_locals_g[] = "_generate_standard_repn..genexpr";
+static const char __pyx_k_Const_f_Linear_s_Quadratic_s_Non[] = "Const:\t%f\nLinear:\t%s\nQuadratic:\t%s\nNonlinear:\t%s";
+static const char __pyx_k_No_expression_has_been_defined_f[] = "No expression has been defined for objective %s";
+static const char __pyx_k_generate_standard_repn_locals_ge[] = "generate_standard_repn..genexpr";
+static const char __pyx_k_pyomo_core_kernel_component_expr[] = "pyomo.core.kernel.component_expression";
+static const char __pyx_k_pyomo_core_kernel_component_obje[] = "pyomo.core.kernel.component_objective";
+static const char __pyx_k_pyomo_core_kernel_component_vari[] = "pyomo.core.kernel.component_variable";
+static const char __pyx_k_exception_generating_a_standard_2[] = "exception generating a standard representation for constraint %s: %s";
+static const char __pyx_k_No_expression_has_been_defined_f_2[] = "No expression has been defined for the body of constraint %s";
+static PyObject *__pyx_kp_s_;
+static PyObject *__pyx_n_s_AbsExpression;
+static PyObject *__pyx_n_s_AttributeError;
+static PyObject *__pyx_n_s_Bunch;
+static PyObject *__pyx_n_s_C;
+static PyObject *__pyx_n_s_ComponentMap;
+static PyObject *__pyx_kp_s_Const_f_Linear_s_Quadratic_s_Non;
+static PyObject *__pyx_n_s_Constraint;
+static PyObject *__pyx_n_s_EXPR;
+static PyObject *__pyx_n_s_EqualityExpression;
+static PyObject *__pyx_n_s_Expr_if;
+static PyObject *__pyx_n_s_Expression;
+static PyObject *__pyx_n_s_ExpressionData;
+static PyObject *__pyx_n_s_ExternalFunctionExpression;
+static PyObject *__pyx_n_s_GeneralExpressionData;
+static PyObject *__pyx_n_s_GeneralObjectiveData;
+static PyObject *__pyx_n_s_GeneralVarData;
+static PyObject *__pyx_n_s_IIdentityExpression;
+static PyObject *__pyx_n_s_IVariable;
+static PyObject *__pyx_n_s_InequalityExpression;
+static PyObject *__pyx_n_s_KeyError;
+static PyObject *__pyx_n_s_LinearExpression;
+static PyObject *__pyx_n_s_MatrixConstraint;
+static PyObject *__pyx_n_s_NegationExpression;
+static PyObject *__pyx_kp_s_No_expression_has_been_defined_f;
+static PyObject *__pyx_kp_s_No_expression_has_been_defined_f_2;
+static PyObject *__pyx_n_s_NumericConstant;
+static PyObject *__pyx_n_s_Objective;
+static PyObject *__pyx_n_s_PY3;
+static PyObject *__pyx_n_s_ParamData;
+static PyObject *__pyx_n_s_PowExpression;
+static PyObject *__pyx_n_s_ProductExpression;
+static PyObject *__pyx_n_s_RangedExpression;
+static PyObject *__pyx_n_s_ReciprocalExpression;
+static PyObject *__pyx_n_s_Results;
+static PyObject *__pyx_n_s_Results___init;
+static PyObject *__pyx_n_s_Results___str;
+static PyObject *__pyx_n_s_SimpleExpression;
+static PyObject *__pyx_n_s_SimpleObjective;
+static PyObject *__pyx_n_s_SimpleVar;
+static PyObject *__pyx_n_s_StandardRepn;
+static PyObject *__pyx_n_s_StandardRepn___getstate;
+static PyObject *__pyx_n_s_StandardRepn___init;
+static PyObject *__pyx_n_s_StandardRepn___setstate;
+static PyObject *__pyx_n_s_StandardRepn___str;
+static PyObject *__pyx_n_s_StandardRepn_is_constant;
+static PyObject *__pyx_n_s_StandardRepn_is_fixed;
+static PyObject *__pyx_n_s_StandardRepn_is_linear;
+static PyObject *__pyx_n_s_StandardRepn_is_nonlinear;
+static PyObject *__pyx_n_s_StandardRepn_is_quadratic;
+static PyObject *__pyx_n_s_StandardRepn_polynomial_degree;
+static PyObject *__pyx_n_s_StandardRepn_to_expression;
+static PyObject *__pyx_n_s_StringIO;
+static PyObject *__pyx_n_s_Sum;
+static PyObject *__pyx_kp_s_This_class_defines_a_standard_c;
+static PyObject *__pyx_n_s_UnaryFunctionExpression;
+static PyObject *__pyx_kp_s_Unexpected_expression_type;
+static PyObject *__pyx_kp_s_Unexpected_expression_type_s;
+static PyObject *__pyx_n_s_ValueError;
+static PyObject *__pyx_n_s_Var;
+static PyObject *__pyx_n_s_VarData;
+static PyObject *__pyx_n_s_ViewSumExpression;
+static PyObject *__pyx_n_s_ZeroDivisionError;
+static PyObject *__pyx_n_s_a;
+static PyObject *__pyx_n_s_abs_tol;
+static PyObject *__pyx_n_s_active;
+static PyObject *__pyx_n_s_all;
+static PyObject *__pyx_n_s_ans;
+static PyObject *__pyx_n_s_append;
+static PyObject *__pyx_n_s_apply_operation;
+static PyObject *__pyx_n_s_args;
+static PyObject *__pyx_n_s_args_2;
+static PyObject *__pyx_n_s_b;
+static PyObject *__pyx_n_s_basestring;
+static PyObject *__pyx_n_s_block;
+static PyObject *__pyx_n_s_block_repn;
+static PyObject *__pyx_n_s_body;
+static PyObject *__pyx_n_s_c;
+static PyObject *__pyx_n_s_c_2;
+static PyObject *__pyx_n_s_class;
+static PyObject *__pyx_n_s_cline_in_traceback;
+static PyObject *__pyx_n_s_close;
+static PyObject *__pyx_n_s_coef;
+static PyObject *__pyx_n_s_collect_branching_expr;
+static PyObject *__pyx_n_s_collect_comparison;
+static PyObject *__pyx_n_s_collect_external_fn;
+static PyObject *__pyx_n_s_collect_identity;
+static PyObject *__pyx_n_s_collect_linear;
+static PyObject *__pyx_n_s_collect_linear_sum;
+static PyObject *__pyx_n_s_collect_negation;
+static PyObject *__pyx_n_s_collect_nonl;
+static PyObject *__pyx_n_s_collect_pow;
+static PyObject *__pyx_n_s_collect_prod;
+static PyObject *__pyx_n_s_collect_prod_locals_genexpr;
+static PyObject *__pyx_n_s_collect_reciprocal;
+static PyObject *__pyx_n_s_collect_standard_repn;
+static PyObject *__pyx_n_s_collect_sum;
+static PyObject *__pyx_n_s_collect_var;
+static PyObject *__pyx_n_s_component_data_objects;
+static PyObject *__pyx_n_s_component_objects;
+static PyObject *__pyx_n_s_compute_values;
+static PyObject *__pyx_n_s_const;
+static PyObject *__pyx_n_s_constant;
+static PyObject *__pyx_kp_s_constant_2;
+static PyObject *__pyx_n_s_constraint;
+static PyObject *__pyx_n_s_constraint_data;
+static PyObject *__pyx_n_s_current;
+static PyObject *__pyx_n_s_denom;
+static PyObject *__pyx_n_s_descend_into;
+static PyObject *__pyx_n_s_diff;
+static PyObject *__pyx_n_s_doc;
+static PyObject *__pyx_n_s_e;
+static PyObject *__pyx_n_s_el_linear;
+static PyObject *__pyx_n_s_el_quadratic;
+static PyObject *__pyx_n_s_else;
+static PyObject *__pyx_n_s_enter;
+static PyObject *__pyx_n_s_enumerate;
+static PyObject *__pyx_n_s_er_linear;
+static PyObject *__pyx_n_s_er_quadratic;
+static PyObject *__pyx_n_s_err;
+static PyObject *__pyx_n_s_error;
+static PyObject *__pyx_n_s_evaluate_expression;
+static PyObject *__pyx_n_s_exc_info;
+static PyObject *__pyx_kp_s_exception_generating_a_standard;
+static PyObject *__pyx_kp_s_exception_generating_a_standard_2;
+static PyObject *__pyx_n_s_exit;
+static PyObject *__pyx_n_s_exp;
+static PyObject *__pyx_n_s_exponent;
+static PyObject *__pyx_n_s_expr;
+static PyObject *__pyx_n_s_expression;
+static PyObject *__pyx_n_s_fabs;
+static PyObject *__pyx_n_s_fixed;
+static PyObject *__pyx_n_s_generate_standard_repn;
+static PyObject *__pyx_n_s_generate_standard_repn_2;
+static PyObject *__pyx_n_s_generate_standard_repn_locals_g;
+static PyObject *__pyx_n_s_generate_standard_repn_locals_ge;
+static PyObject *__pyx_n_s_genexpr;
+static PyObject *__pyx_n_s_get;
+static PyObject *__pyx_n_s_getLogger;
+static PyObject *__pyx_n_s_getstate;
+static PyObject *__pyx_n_s_getvalue;
+static PyObject *__pyx_n_s_i;
+static PyObject *__pyx_n_s_id;
+static PyObject *__pyx_n_s_idMap;
+static PyObject *__pyx_n_s_id_2;
+static PyObject *__pyx_n_s_identify_variables;
+static PyObject *__pyx_n_s_if;
+static PyObject *__pyx_n_s_if_val;
+static PyObject *__pyx_n_s_import;
+static PyObject *__pyx_n_s_include_fixed;
+static PyObject *__pyx_n_s_index;
+static PyObject *__pyx_n_s_init;
+static PyObject *__pyx_n_s_is_constant;
+static PyObject *__pyx_n_s_is_expression_type;
+static PyObject *__pyx_n_s_is_fixed;
+static PyObject *__pyx_n_s_is_linear;
+static PyObject *__pyx_n_s_is_named_expression_type;
+static PyObject *__pyx_n_s_is_nonlinear;
+static PyObject *__pyx_n_s_is_potentially_variable;
+static PyObject *__pyx_n_s_is_quadratic;
+static PyObject *__pyx_n_s_is_variable_type;
+static PyObject *__pyx_n_s_isclose;
+static PyObject *__pyx_n_s_isclose_const;
+static PyObject *__pyx_n_s_isclose_context;
+static PyObject *__pyx_n_s_isclose_context___enter;
+static PyObject *__pyx_n_s_isclose_context___exit;
+static PyObject *__pyx_n_s_isclose_context___init;
+static PyObject *__pyx_n_s_isclose_default;
+static PyObject *__pyx_n_s_islice;
+static PyObject *__pyx_n_s_iteritems;
+static PyObject *__pyx_n_s_itertools;
+static PyObject *__pyx_n_s_itervalues;
+static PyObject *__pyx_n_s_key;
+static PyObject *__pyx_n_s_keys;
+static PyObject *__pyx_n_s_lcoef;
+static PyObject *__pyx_n_s_lhs;
+static PyObject *__pyx_n_s_lhs_nonl_None;
+static PyObject *__pyx_n_s_linear;
+static PyObject *__pyx_kp_s_linear_coef;
+static PyObject *__pyx_n_s_linear_coefs;
+static PyObject *__pyx_kp_s_linear_var_ids;
+static PyObject *__pyx_n_s_linear_vars;
+static PyObject *__pyx_kp_s_linear_vars_2;
+static PyObject *__pyx_n_s_lkey;
+static PyObject *__pyx_n_s_logger;
+static PyObject *__pyx_n_s_logging;
+static PyObject *__pyx_n_s_main;
+static PyObject *__pyx_n_s_math;
+static PyObject *__pyx_n_s_metaclass;
+static PyObject *__pyx_n_s_module;
+static PyObject *__pyx_n_s_multiplier;
+static PyObject *__pyx_n_s_name;
+static PyObject *__pyx_n_s_name_2;
+static PyObject *__pyx_n_s_nargs;
+static PyObject *__pyx_n_s_native_numeric_types;
+static PyObject *__pyx_n_s_noclone;
+static PyObject *__pyx_n_s_nonl;
+static PyObject *__pyx_n_s_nonlinear_expr;
+static PyObject *__pyx_kp_s_nonlinear_expr_2;
+static PyObject *__pyx_kp_s_nonlinear_expr_None;
+static PyObject *__pyx_n_s_nonlinear_vars;
+static PyObject *__pyx_kp_s_nonlinear_vars_2;
+static PyObject *__pyx_n_s_object;
+static PyObject *__pyx_n_s_objective;
+static PyObject *__pyx_n_s_objective_data;
+static PyObject *__pyx_n_s_output;
+static PyObject *__pyx_n_s_polynomial_degree;
+static PyObject *__pyx_n_s_prepare;
+static PyObject *__pyx_n_s_preprocess_block_constraints;
+static PyObject *__pyx_n_s_preprocess_block_objectives;
+static PyObject *__pyx_n_s_preprocess_constraint;
+static PyObject *__pyx_n_s_preprocess_constraint_data;
+static PyObject *__pyx_n_s_pyomo;
+static PyObject *__pyx_kp_s_pyomo_core;
+static PyObject *__pyx_n_s_pyomo_core_base;
+static PyObject *__pyx_n_s_pyomo_core_base_expression;
+static PyObject *__pyx_n_s_pyomo_core_base_numvalue;
+static PyObject *__pyx_n_s_pyomo_core_base_objective;
+static PyObject *__pyx_n_s_pyomo_core_base_param;
+static PyObject *__pyx_n_s_pyomo_core_base_var;
+static PyObject *__pyx_n_s_pyomo_core_expr;
+static PyObject *__pyx_n_s_pyomo_core_kernel_component_expr;
+static PyObject *__pyx_n_s_pyomo_core_kernel_component_obje;
+static PyObject *__pyx_n_s_pyomo_core_kernel_component_vari;
+static PyObject *__pyx_n_s_pyomo_core_util;
+static PyObject *__pyx_n_s_pyomo_repn_beta_matrix;
+static PyObject *__pyx_n_s_pyomo_repn_standard_repn;
+static PyObject *__pyx_kp_s_pyomo_repn_standard_repn_pyx;
+static PyObject *__pyx_n_s_pyomo_util;
+static PyObject *__pyx_n_s_pyutilib_math_util;
+static PyObject *__pyx_n_s_pyutilib_misc;
+static PyObject *__pyx_n_s_quadratic;
+static PyObject *__pyx_kp_s_quadratic_coef;
+static PyObject *__pyx_n_s_quadratic_coefs;
+static PyObject *__pyx_kp_s_quadratic_var_ids;
+static PyObject *__pyx_n_s_quadratic_vars;
+static PyObject *__pyx_kp_s_quadratic_vars_2;
+static PyObject *__pyx_n_s_qualname;
+static PyObject *__pyx_n_s_rcoef;
+static PyObject *__pyx_n_s_rel_tol;
+static PyObject *__pyx_n_s_repn;
+static PyObject *__pyx_n_s_repn_2;
+static PyObject *__pyx_n_s_repn_collectors;
+static PyObject *__pyx_n_s_res;
+static PyObject *__pyx_n_s_res_2;
+static PyObject *__pyx_n_s_ret_str;
+static PyObject *__pyx_n_s_rhs;
+static PyObject *__pyx_n_s_rhs_nonl_None;
+static PyObject *__pyx_n_s_rkey;
+static PyObject *__pyx_n_s_self;
+static PyObject *__pyx_n_s_send;
+static PyObject *__pyx_n_s_setdefault;
+static PyObject *__pyx_n_s_setstate;
+static PyObject *__pyx_n_s_six;
+static PyObject *__pyx_n_s_six_moves;
+static PyObject *__pyx_n_s_slot;
+static PyObject *__pyx_n_s_slots;
+static PyObject *__pyx_n_s_state;
+static PyObject *__pyx_n_s_str;
+static PyObject *__pyx_n_s_sum;
+static PyObject *__pyx_n_s_sys;
+static PyObject *__pyx_n_s_term;
+static PyObject *__pyx_n_s_test;
+static PyObject *__pyx_n_s_then;
+static PyObject *__pyx_n_s_throw;
+static PyObject *__pyx_n_s_to_expression;
+static PyObject *__pyx_n_s_to_string;
+static PyObject *__pyx_n_s_using_py3;
+static PyObject *__pyx_n_s_v;
+static PyObject *__pyx_n_s_v_2;
+static PyObject *__pyx_n_s_val;
+static PyObject *__pyx_n_s_value;
+static PyObject *__pyx_n_s_variable;
+static PyObject *__pyx_n_s_varkeys;
+static PyObject *__pyx_n_s_verbose;
+static PyObject *__pyx_n_s_write;
+static PyObject *__pyx_n_s_xrange;
+static PyObject *__pyx_n_s_zip;
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_isclose_const(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_rel_tol, PyObject *__pyx_v_abs_tol); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_15isclose_context___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_compute_values); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_15isclose_context_2__enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_15isclose_context_4__exit__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_expr); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_2__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_4__setstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_state); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_6__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_8is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_10polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_12is_constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_14is_linear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_16is_quadratic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_18is_nonlinear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_20to_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_22generate_standard_repn_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_22generate_standard_repn_3genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_2generate_standard_repn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic, PyObject *__pyx_v_repn); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_7Results___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_constant, PyObject *__pyx_v_nonl, PyObject *__pyx_v_linear, PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_7Results_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_4_collect_sum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_3genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_6genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_9genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_12genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_15genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_6_collect_prod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_8_collect_var(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_10_collect_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12_collect_reciprocal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_14_collect_branching_expr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_16_collect_nonl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_18_collect_negation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_20_collect_identity(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_22_collect_linear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_24_collect_comparison(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, CYTHON_UNUSED PyObject *__pyx_v_idMap, CYTHON_UNUSED PyObject *__pyx_v_compute_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_26_collect_external_fn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, CYTHON_UNUSED PyObject *__pyx_v_idMap, CYTHON_UNUSED PyObject *__pyx_v_compute_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_28_collect_linear_sum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_30_collect_standard_repn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_3genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_6genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_9genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_12genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_15genexpr(PyObject *__pyx_self); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_32_generate_standard_repn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic, PyObject *__pyx_v_repn); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_34preprocess_block_objectives(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_block, PyObject *__pyx_v_idMap); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_36preprocess_block_constraints(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_block, PyObject *__pyx_v_idMap); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_38preprocess_constraint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_block, PyObject *__pyx_v_constraint, PyObject *__pyx_v_idMap, PyObject *__pyx_v_block_repn); /* proto */
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_40preprocess_constraint_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_block, PyObject *__pyx_v_constraint_data, PyObject *__pyx_v_idMap, PyObject *__pyx_v_block_repn); /* proto */
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
+static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_keys = {0, &__pyx_n_s_keys, 0, 0, 0};
+static PyObject *__pyx_float_0_0;
+static PyObject *__pyx_float_1_0;
+static PyObject *__pyx_float_1eneg_9;
+static PyObject *__pyx_float_neg_1_0;
+static PyObject *__pyx_int_0;
+static PyObject *__pyx_int_1;
+static PyObject *__pyx_int_2;
+static PyObject *__pyx_int_neg_1;
+static PyObject *__pyx_tuple__2;
+static PyObject *__pyx_tuple__3;
+static PyObject *__pyx_tuple__4;
+static PyObject *__pyx_tuple__5;
+static PyObject *__pyx_tuple__6;
+static PyObject *__pyx_tuple__7;
+static PyObject *__pyx_tuple__8;
+static PyObject *__pyx_tuple__9;
+static PyObject *__pyx_tuple__10;
+static PyObject *__pyx_tuple__11;
+static PyObject *__pyx_tuple__12;
+static PyObject *__pyx_tuple__13;
+static PyObject *__pyx_tuple__14;
+static PyObject *__pyx_tuple__15;
+static PyObject *__pyx_tuple__17;
+static PyObject *__pyx_tuple__18;
+static PyObject *__pyx_tuple__20;
+static PyObject *__pyx_tuple__22;
+static PyObject *__pyx_tuple__24;
+static PyObject *__pyx_tuple__25;
+static PyObject *__pyx_tuple__26;
+static PyObject *__pyx_tuple__28;
+static PyObject *__pyx_tuple__29;
+static PyObject *__pyx_tuple__31;
+static PyObject *__pyx_tuple__33;
+static PyObject *__pyx_tuple__35;
+static PyObject *__pyx_tuple__37;
+static PyObject *__pyx_tuple__39;
+static PyObject *__pyx_tuple__41;
+static PyObject *__pyx_tuple__43;
+static PyObject *__pyx_tuple__45;
+static PyObject *__pyx_tuple__47;
+static PyObject *__pyx_tuple__49;
+static PyObject *__pyx_tuple__51;
+static PyObject *__pyx_tuple__52;
+static PyObject *__pyx_tuple__53;
+static PyObject *__pyx_tuple__55;
+static PyObject *__pyx_tuple__56;
+static PyObject *__pyx_tuple__58;
+static PyObject *__pyx_tuple__60;
+static PyObject *__pyx_tuple__62;
+static PyObject *__pyx_tuple__64;
+static PyObject *__pyx_tuple__66;
+static PyObject *__pyx_tuple__68;
+static PyObject *__pyx_tuple__70;
+static PyObject *__pyx_tuple__72;
+static PyObject *__pyx_tuple__74;
+static PyObject *__pyx_tuple__76;
+static PyObject *__pyx_tuple__78;
+static PyObject *__pyx_tuple__80;
+static PyObject *__pyx_tuple__82;
+static PyObject *__pyx_tuple__84;
+static PyObject *__pyx_tuple__86;
+static PyObject *__pyx_tuple__88;
+static PyObject *__pyx_tuple__90;
+static PyObject *__pyx_tuple__92;
+static PyObject *__pyx_tuple__94;
+static PyObject *__pyx_codeobj__16;
+static PyObject *__pyx_codeobj__19;
+static PyObject *__pyx_codeobj__21;
+static PyObject *__pyx_codeobj__23;
+static PyObject *__pyx_codeobj__27;
+static PyObject *__pyx_codeobj__30;
+static PyObject *__pyx_codeobj__32;
+static PyObject *__pyx_codeobj__34;
+static PyObject *__pyx_codeobj__36;
+static PyObject *__pyx_codeobj__38;
+static PyObject *__pyx_codeobj__40;
+static PyObject *__pyx_codeobj__42;
+static PyObject *__pyx_codeobj__44;
+static PyObject *__pyx_codeobj__46;
+static PyObject *__pyx_codeobj__48;
+static PyObject *__pyx_codeobj__50;
+static PyObject *__pyx_codeobj__54;
+static PyObject *__pyx_codeobj__57;
+static PyObject *__pyx_codeobj__59;
+static PyObject *__pyx_codeobj__61;
+static PyObject *__pyx_codeobj__63;
+static PyObject *__pyx_codeobj__65;
+static PyObject *__pyx_codeobj__67;
+static PyObject *__pyx_codeobj__69;
+static PyObject *__pyx_codeobj__71;
+static PyObject *__pyx_codeobj__73;
+static PyObject *__pyx_codeobj__75;
+static PyObject *__pyx_codeobj__77;
+static PyObject *__pyx_codeobj__79;
+static PyObject *__pyx_codeobj__81;
+static PyObject *__pyx_codeobj__83;
+static PyObject *__pyx_codeobj__85;
+static PyObject *__pyx_codeobj__87;
+static PyObject *__pyx_codeobj__89;
+static PyObject *__pyx_codeobj__91;
+static PyObject *__pyx_codeobj__93;
+static PyObject *__pyx_codeobj__95;
+
+/* "pyomo/repn/standard_repn.pyx":70
+ * # close to 'b' when it is constant.
+ * #
+ * def isclose_const(a, b, rel_tol=1e-9, abs_tol=0.0): # <<<<<<<<<<<<<<
+ * if not a.__class__ in native_numeric_types:
+ * if a.is_constant():
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_1isclose_const(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_1isclose_const = {"isclose_const", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_1isclose_const, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_1isclose_const(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_a = 0;
+ PyObject *__pyx_v_b = 0;
+ PyObject *__pyx_v_rel_tol = 0;
+ PyObject *__pyx_v_abs_tol = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("isclose_const (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_a,&__pyx_n_s_b,&__pyx_n_s_rel_tol,&__pyx_n_s_abs_tol,0};
+ PyObject* values[4] = {0,0,0,0};
+ values[2] = ((PyObject *)__pyx_float_1eneg_9);
+ values[3] = ((PyObject *)__pyx_float_0_0);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_a)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_b)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("isclose_const", 0, 2, 4, 1); __PYX_ERR(0, 70, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rel_tol);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_abs_tol);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "isclose_const") < 0)) __PYX_ERR(0, 70, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_a = values[0];
+ __pyx_v_b = values[1];
+ __pyx_v_rel_tol = values[2];
+ __pyx_v_abs_tol = values[3];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("isclose_const", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 70, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.isclose_const", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_isclose_const(__pyx_self, __pyx_v_a, __pyx_v_b, __pyx_v_rel_tol, __pyx_v_abs_tol);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_isclose_const(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_a, PyObject *__pyx_v_b, PyObject *__pyx_v_rel_tol, PyObject *__pyx_v_abs_tol) {
+ PyObject *__pyx_v_diff = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("isclose_const", 0);
+ __Pyx_INCREF(__pyx_v_a);
+
+ /* "pyomo/repn/standard_repn.pyx":71
+ * #
+ * def isclose_const(a, b, rel_tol=1e-9, abs_tol=0.0):
+ * if not a.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if a.is_constant():
+ * a = value(a)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 71, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 71, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_NE)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 71, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":72
+ * def isclose_const(a, b, rel_tol=1e-9, abs_tol=0.0):
+ * if not a.__class__ in native_numeric_types:
+ * if a.is_constant(): # <<<<<<<<<<<<<<
+ * a = value(a)
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_a, __pyx_n_s_is_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 72, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 72, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 72, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":73
+ * if not a.__class__ in native_numeric_types:
+ * if a.is_constant():
+ * a = value(a) # <<<<<<<<<<<<<<
+ * else:
+ * return False
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 73, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_a); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_a};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_a};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 73, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_a);
+ __Pyx_GIVEREF(__pyx_v_a);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_a);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 73, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_a, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":72
+ * def isclose_const(a, b, rel_tol=1e-9, abs_tol=0.0):
+ * if not a.__class__ in native_numeric_types:
+ * if a.is_constant(): # <<<<<<<<<<<<<<
+ * a = value(a)
+ * else:
+ */
+ goto __pyx_L4;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":75
+ * a = value(a)
+ * else:
+ * return False # <<<<<<<<<<<<<<
+ * # Copied from pyutilib.math after here
+ * diff = math.fabs(a-b)
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+ }
+ __pyx_L4:;
+
+ /* "pyomo/repn/standard_repn.pyx":71
+ * #
+ * def isclose_const(a, b, rel_tol=1e-9, abs_tol=0.0):
+ * if not a.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if a.is_constant():
+ * a = value(a)
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":77
+ * return False
+ * # Copied from pyutilib.math after here
+ * diff = math.fabs(a-b) # <<<<<<<<<<<<<<
+ * if diff <= rel_tol*max(math.fabs(a),math.fabs(b)):
+ * return True
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fabs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 77, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Subtract(__pyx_v_a, __pyx_v_b); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 77, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_1};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 77, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 77, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_v_diff = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":78
+ * # Copied from pyutilib.math after here
+ * diff = math.fabs(a-b)
+ * if diff <= rel_tol*max(math.fabs(a),math.fabs(b)): # <<<<<<<<<<<<<<
+ * return True
+ * if diff <= abs_tol:
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_fabs); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_v_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_b};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_b};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_v_b);
+ __Pyx_GIVEREF(__pyx_v_b);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_b);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_math); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_fabs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_v_a); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_a};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_a};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_INCREF(__pyx_v_a);
+ __Pyx_GIVEREF(__pyx_v_a);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_a);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_5 = PyObject_RichCompare(__pyx_t_2, __pyx_t_7, Py_GT); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__pyx_t_4) {
+ __Pyx_INCREF(__pyx_t_2);
+ __pyx_t_6 = __pyx_t_2;
+ } else {
+ __Pyx_INCREF(__pyx_t_7);
+ __pyx_t_6 = __pyx_t_7;
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_rel_tol, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyObject_RichCompare(__pyx_v_diff, __pyx_t_2, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 78, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":79
+ * diff = math.fabs(a-b)
+ * if diff <= rel_tol*max(math.fabs(a),math.fabs(b)):
+ * return True # <<<<<<<<<<<<<<
+ * if diff <= abs_tol:
+ * return True
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":78
+ * # Copied from pyutilib.math after here
+ * diff = math.fabs(a-b)
+ * if diff <= rel_tol*max(math.fabs(a),math.fabs(b)): # <<<<<<<<<<<<<<
+ * return True
+ * if diff <= abs_tol:
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":80
+ * if diff <= rel_tol*max(math.fabs(a),math.fabs(b)):
+ * return True
+ * if diff <= abs_tol: # <<<<<<<<<<<<<<
+ * return True
+ * return False
+ */
+ __pyx_t_6 = PyObject_RichCompare(__pyx_v_diff, __pyx_v_abs_tol, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 80, __pyx_L1_error)
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 80, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":81
+ * return True
+ * if diff <= abs_tol:
+ * return True # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":80
+ * if diff <= rel_tol*max(math.fabs(a),math.fabs(b)):
+ * return True
+ * if diff <= abs_tol: # <<<<<<<<<<<<<<
+ * return True
+ * return False
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":82
+ * if diff <= abs_tol:
+ * return True
+ * return False # <<<<<<<<<<<<<<
+ *
+ * #
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":70
+ * # close to 'b' when it is constant.
+ * #
+ * def isclose_const(a, b, rel_tol=1e-9, abs_tol=0.0): # <<<<<<<<<<<<<<
+ * if not a.__class__ in native_numeric_types:
+ * if a.is_constant():
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.isclose_const", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_diff);
+ __Pyx_XDECREF(__pyx_v_a);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":96
+ * class isclose_context(object):
+ *
+ * def __init__(self, compute_values): # <<<<<<<<<<<<<<
+ * self.compute_values = compute_values
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_15isclose_context_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_15isclose_context_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_15isclose_context_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_15isclose_context_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_compute_values,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); __PYX_ERR(0, 96, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 96, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_compute_values = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 96, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.isclose_context.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_15isclose_context___init__(__pyx_self, __pyx_v_self, __pyx_v_compute_values);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_15isclose_context___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_compute_values) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":97
+ *
+ * def __init__(self, compute_values):
+ * self.compute_values = compute_values # <<<<<<<<<<<<<<
+ *
+ * def __enter__(self):
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_compute_values, __pyx_v_compute_values) < 0) __PYX_ERR(0, 97, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":96
+ * class isclose_context(object):
+ *
+ * def __init__(self, compute_values): # <<<<<<<<<<<<<<
+ * self.compute_values = compute_values
+ *
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.isclose_context.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":99
+ * self.compute_values = compute_values
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * if not self.compute_values:
+ * global isclose
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_15isclose_context_3__enter__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_15isclose_context_3__enter__ = {"__enter__", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_15isclose_context_3__enter__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_15isclose_context_3__enter__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_15isclose_context_2__enter__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_15isclose_context_2__enter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ __Pyx_RefNannySetupContext("__enter__", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":100
+ *
+ * def __enter__(self):
+ * if not self.compute_values: # <<<<<<<<<<<<<<
+ * global isclose
+ * isclose = isclose_const
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_compute_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 100, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) __PYX_ERR(0, 100, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((!__pyx_t_2) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":102
+ * if not self.compute_values:
+ * global isclose
+ * isclose = isclose_const # <<<<<<<<<<<<<<
+ *
+ * def __exit__(self, *args):
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_const); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 102, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_isclose, __pyx_t_1) < 0) __PYX_ERR(0, 102, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":100
+ *
+ * def __enter__(self):
+ * if not self.compute_values: # <<<<<<<<<<<<<<
+ * global isclose
+ * isclose = isclose_const
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":99
+ * self.compute_values = compute_values
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * if not self.compute_values:
+ * global isclose
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.isclose_context.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":104
+ * isclose = isclose_const
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * global isclose
+ * isclose = isclose_default
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_15isclose_context_5__exit__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_15isclose_context_5__exit__ = {"__exit__", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_15isclose_context_5__exit__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_15isclose_context_5__exit__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ CYTHON_UNUSED PyObject *__pyx_v_self = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_args = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
+ if (PyTuple_GET_SIZE(__pyx_args) > 1) {
+ __pyx_v_args = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
+ if (unlikely(!__pyx_v_args)) {
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __Pyx_GOTREF(__pyx_v_args);
+ } else {
+ __pyx_v_args = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
+ }
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
+ PyObject* values[1] = {0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ default:
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ }
+ if (unlikely(kw_args > 0)) {
+ const Py_ssize_t used_pos_args = (pos_args < 1) ? pos_args : 1;
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__exit__") < 0)) __PYX_ERR(0, 104, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ }
+ __pyx_v_self = values[0];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__exit__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 104, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.isclose_context.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_15isclose_context_4__exit__(__pyx_self, __pyx_v_self, __pyx_v_args);
+
+ /* function exit code */
+ __Pyx_XDECREF(__pyx_v_args);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_15isclose_context_4__exit__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_args) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ __Pyx_RefNannySetupContext("__exit__", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":106
+ * def __exit__(self, *args):
+ * global isclose
+ * isclose = isclose_default # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 106, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_isclose, __pyx_t_1) < 0) __PYX_ERR(0, 106, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":104
+ * isclose = isclose_const
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * global isclose
+ * isclose = isclose_default
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.isclose_context.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":125
+ * 'nonlinear_vars') # Variables that appear in the nonlinear expression
+ *
+ * def __init__(self, expr=None): # <<<<<<<<<<<<<<
+ * self.constant = 0
+ * self.linear_vars = tuple()
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_expr = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_expr,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)((PyObject *)Py_None));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_expr);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 125, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_expr = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 125, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.StandardRepn.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn___init__(__pyx_self, __pyx_v_self, __pyx_v_expr);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_expr) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":126
+ *
+ * def __init__(self, expr=None):
+ * self.constant = 0 # <<<<<<<<<<<<<<
+ * self.linear_vars = tuple()
+ * self.linear_coefs = tuple()
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constant, __pyx_int_0) < 0) __PYX_ERR(0, 126, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":127
+ * def __init__(self, expr=None):
+ * self.constant = 0
+ * self.linear_vars = tuple() # <<<<<<<<<<<<<<
+ * self.linear_coefs = tuple()
+ * self.quadratic_vars = tuple()
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars, __pyx_t_1) < 0) __PYX_ERR(0, 127, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":128
+ * self.constant = 0
+ * self.linear_vars = tuple()
+ * self.linear_coefs = tuple() # <<<<<<<<<<<<<<
+ * self.quadratic_vars = tuple()
+ * self.quadratic_coefs = tuple()
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs, __pyx_t_1) < 0) __PYX_ERR(0, 128, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":129
+ * self.linear_vars = tuple()
+ * self.linear_coefs = tuple()
+ * self.quadratic_vars = tuple() # <<<<<<<<<<<<<<
+ * self.quadratic_coefs = tuple()
+ * self.nonlinear_expr = None
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 129, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_vars, __pyx_t_1) < 0) __PYX_ERR(0, 129, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":130
+ * self.linear_coefs = tuple()
+ * self.quadratic_vars = tuple()
+ * self.quadratic_coefs = tuple() # <<<<<<<<<<<<<<
+ * self.nonlinear_expr = None
+ * self.nonlinear_vars = tuple()
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_coefs, __pyx_t_1) < 0) __PYX_ERR(0, 130, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":131
+ * self.quadratic_vars = tuple()
+ * self.quadratic_coefs = tuple()
+ * self.nonlinear_expr = None # <<<<<<<<<<<<<<
+ * self.nonlinear_vars = tuple()
+ * if not expr is None:
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_expr, Py_None) < 0) __PYX_ERR(0, 131, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":132
+ * self.quadratic_coefs = tuple()
+ * self.nonlinear_expr = None
+ * self.nonlinear_vars = tuple() # <<<<<<<<<<<<<<
+ * if not expr is None:
+ * generate_standard_repn(expr, repn=self)
+ */
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyTuple_Type)), __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_vars, __pyx_t_1) < 0) __PYX_ERR(0, 132, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":133
+ * self.nonlinear_expr = None
+ * self.nonlinear_vars = tuple()
+ * if not expr is None: # <<<<<<<<<<<<<<
+ * generate_standard_repn(expr, repn=self)
+ *
+ */
+ __pyx_t_2 = (__pyx_v_expr != Py_None);
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":134
+ * self.nonlinear_vars = tuple()
+ * if not expr is None:
+ * generate_standard_repn(expr, repn=self) # <<<<<<<<<<<<<<
+ *
+ * def __getstate__(self):
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_expr);
+ __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_repn, __pyx_v_self) < 0) __PYX_ERR(0, 134, __pyx_L1_error)
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 134, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":133
+ * self.nonlinear_expr = None
+ * self.nonlinear_vars = tuple()
+ * if not expr is None: # <<<<<<<<<<<<<<
+ * generate_standard_repn(expr, repn=self)
+ *
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":125
+ * 'nonlinear_vars') # Variables that appear in the nonlinear expression
+ *
+ * def __init__(self, expr=None): # <<<<<<<<<<<<<<
+ * self.constant = 0
+ * self.linear_vars = tuple()
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.StandardRepn.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":136
+ * generate_standard_repn(expr, repn=self)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * """
+ * This method is required because this class uses slots.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_3__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static char __pyx_doc_5pyomo_4repn_13standard_repn_12StandardRepn_2__getstate__[] = "\n This method is required because this class uses slots.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_3__getstate__ = {"__getstate__", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_3__getstate__, METH_O, __pyx_doc_5pyomo_4repn_13standard_repn_12StandardRepn_2__getstate__};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_3__getstate__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__getstate__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_2__getstate__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_2__getstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ __Pyx_RefNannySetupContext("__getstate__", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":140
+ * This method is required because this class uses slots.
+ * """
+ * return (self.constant, # <<<<<<<<<<<<<<
+ * self.linear_coefs,
+ * self.linear_vars,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+
+ /* "pyomo/repn/standard_repn.pyx":141
+ * """
+ * return (self.constant,
+ * self.linear_coefs, # <<<<<<<<<<<<<<
+ * self.linear_vars,
+ * self.quadratic_coefs,
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+
+ /* "pyomo/repn/standard_repn.pyx":142
+ * return (self.constant,
+ * self.linear_coefs,
+ * self.linear_vars, # <<<<<<<<<<<<<<
+ * self.quadratic_coefs,
+ * self.quadratic_vars,
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 142, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+
+ /* "pyomo/repn/standard_repn.pyx":143
+ * self.linear_coefs,
+ * self.linear_vars,
+ * self.quadratic_coefs, # <<<<<<<<<<<<<<
+ * self.quadratic_vars,
+ * self.nonlinear_expr,
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_coefs); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 143, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/repn/standard_repn.pyx":144
+ * self.linear_vars,
+ * self.quadratic_coefs,
+ * self.quadratic_vars, # <<<<<<<<<<<<<<
+ * self.nonlinear_expr,
+ * self.nonlinear_vars)
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_vars); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 144, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+
+ /* "pyomo/repn/standard_repn.pyx":145
+ * self.quadratic_coefs,
+ * self.quadratic_vars,
+ * self.nonlinear_expr, # <<<<<<<<<<<<<<
+ * self.nonlinear_vars)
+ *
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_expr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 145, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+ /* "pyomo/repn/standard_repn.pyx":146
+ * self.quadratic_vars,
+ * self.nonlinear_expr,
+ * self.nonlinear_vars) # <<<<<<<<<<<<<<
+ *
+ * def __setstate__(self, state):
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_vars); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 146, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+
+ /* "pyomo/repn/standard_repn.pyx":140
+ * This method is required because this class uses slots.
+ * """
+ * return (self.constant, # <<<<<<<<<<<<<<
+ * self.linear_coefs,
+ * self.linear_vars,
+ */
+ __pyx_t_8 = PyTuple_New(7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 140, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_8, 6, __pyx_t_7);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_6 = 0;
+ __pyx_t_7 = 0;
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":136
+ * generate_standard_repn(expr, repn=self)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * """
+ * This method is required because this class uses slots.
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.StandardRepn.__getstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":148
+ * self.nonlinear_vars)
+ *
+ * def __setstate__(self, state): # <<<<<<<<<<<<<<
+ * """
+ * This method is required because this class uses slots.
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_5__setstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static char __pyx_doc_5pyomo_4repn_13standard_repn_12StandardRepn_4__setstate__[] = "\n This method is required because this class uses slots.\n ";
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_5__setstate__ = {"__setstate__", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_5__setstate__, METH_VARARGS|METH_KEYWORDS, __pyx_doc_5pyomo_4repn_13standard_repn_12StandardRepn_4__setstate__};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_5__setstate__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_state = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__setstate__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_state,0};
+ PyObject* values[2] = {0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_state)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("__setstate__", 1, 2, 2, 1); __PYX_ERR(0, 148, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__setstate__") < 0)) __PYX_ERR(0, 148, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_state = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__setstate__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 148, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.StandardRepn.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_4__setstate__(__pyx_self, __pyx_v_self, __pyx_v_state);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_4__setstate__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_state) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *(*__pyx_t_9)(PyObject *);
+ __Pyx_RefNannySetupContext("__setstate__", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":158
+ * self.quadratic_vars, \
+ * self.nonlinear_expr, \
+ * self.nonlinear_vars = state # <<<<<<<<<<<<<<
+ *
+ * #
+ */
+ if ((likely(PyTuple_CheckExact(__pyx_v_state))) || (PyList_CheckExact(__pyx_v_state))) {
+ PyObject* sequence = __pyx_v_state;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 7)) {
+ if (size > 7) __Pyx_RaiseTooManyValuesError(7);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 152, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2);
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 3);
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 4);
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 5);
+ __pyx_t_7 = PyTuple_GET_ITEM(sequence, 6);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 2);
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 3);
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 4);
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 5);
+ __pyx_t_7 = PyList_GET_ITEM(sequence, 6);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_7);
+ #else
+ {
+ Py_ssize_t i;
+ PyObject** temps[7] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7};
+ for (i=0; i < 7; i++) {
+ PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 152, __pyx_L1_error)
+ __Pyx_GOTREF(item);
+ *(temps[i]) = item;
+ }
+ }
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+ PyObject** temps[7] = {&__pyx_t_1,&__pyx_t_2,&__pyx_t_3,&__pyx_t_4,&__pyx_t_5,&__pyx_t_6,&__pyx_t_7};
+ __pyx_t_8 = PyObject_GetIter(__pyx_v_state); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 152, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
+ for (index=0; index < 7; index++) {
+ PyObject* item = __pyx_t_9(__pyx_t_8); if (unlikely(!item)) goto __pyx_L3_unpacking_failed;
+ __Pyx_GOTREF(item);
+ *(temps[index]) = item;
+ }
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 7) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
+ __pyx_t_9 = NULL;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ goto __pyx_L4_unpacking_done;
+ __pyx_L3_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_9 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 152, __pyx_L1_error)
+ __pyx_L4_unpacking_done:;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":152
+ * This method is required because this class uses slots.
+ * """
+ * self.constant, \ # <<<<<<<<<<<<<<
+ * self.linear_coefs, \
+ * self.linear_vars, \
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constant, __pyx_t_1) < 0) __PYX_ERR(0, 152, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":153
+ * """
+ * self.constant, \
+ * self.linear_coefs, \ # <<<<<<<<<<<<<<
+ * self.linear_vars, \
+ * self.quadratic_coefs, \
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs, __pyx_t_2) < 0) __PYX_ERR(0, 153, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":154
+ * self.constant, \
+ * self.linear_coefs, \
+ * self.linear_vars, \ # <<<<<<<<<<<<<<
+ * self.quadratic_coefs, \
+ * self.quadratic_vars, \
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars, __pyx_t_3) < 0) __PYX_ERR(0, 154, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":155
+ * self.linear_coefs, \
+ * self.linear_vars, \
+ * self.quadratic_coefs, \ # <<<<<<<<<<<<<<
+ * self.quadratic_vars, \
+ * self.nonlinear_expr, \
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_coefs, __pyx_t_4) < 0) __PYX_ERR(0, 155, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":156
+ * self.linear_vars, \
+ * self.quadratic_coefs, \
+ * self.quadratic_vars, \ # <<<<<<<<<<<<<<
+ * self.nonlinear_expr, \
+ * self.nonlinear_vars = state
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_vars, __pyx_t_5) < 0) __PYX_ERR(0, 156, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":157
+ * self.quadratic_coefs, \
+ * self.quadratic_vars, \
+ * self.nonlinear_expr, \ # <<<<<<<<<<<<<<
+ * self.nonlinear_vars = state
+ *
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_expr, __pyx_t_6) < 0) __PYX_ERR(0, 157, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":158
+ * self.quadratic_vars, \
+ * self.nonlinear_expr, \
+ * self.nonlinear_vars = state # <<<<<<<<<<<<<<
+ *
+ * #
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_vars, __pyx_t_7) < 0) __PYX_ERR(0, 158, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":148
+ * self.nonlinear_vars)
+ *
+ * def __setstate__(self, state): # <<<<<<<<<<<<<<
+ * """
+ * This method is required because this class uses slots.
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.StandardRepn.__setstate__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":163
+ * # Generate a string representation of the expression
+ * #
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * output = StringIO()
+ * output.write("\n")
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_7__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_7__str__ = {"__str__", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_7__str__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_7__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_6__str__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_6__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_output = NULL;
+ PyObject *__pyx_v_ret_str = NULL;
+ PyObject *__pyx_v_v_ = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ Py_ssize_t __pyx_t_6;
+ PyObject *(*__pyx_t_7)(PyObject *);
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ int __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ int __pyx_t_15;
+ PyObject *__pyx_t_16 = NULL;
+ __Pyx_RefNannySetupContext("__str__", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":164
+ * #
+ * def __str__(self):
+ * output = StringIO() # <<<<<<<<<<<<<<
+ * output.write("\n")
+ * output.write("constant: "+str(self.constant)+"\n")
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StringIO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 164, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_output = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":165
+ * def __str__(self):
+ * output = StringIO()
+ * output.write("\n") # <<<<<<<<<<<<<<
+ * output.write("constant: "+str(self.constant)+"\n")
+ * output.write("linear vars: "+str([v_.name for v_ in self.linear_vars])+"\n")
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 165, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":166
+ * output = StringIO()
+ * output.write("\n")
+ * output.write("constant: "+str(self.constant)+"\n") # <<<<<<<<<<<<<<
+ * output.write("linear vars: "+str([v_.name for v_ in self.linear_vars])+"\n")
+ * output.write("linear var ids: "+str([id(v_) for v_ in self.linear_vars])+"\n")
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Add(__pyx_kp_s_constant_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 166, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":167
+ * output.write("\n")
+ * output.write("constant: "+str(self.constant)+"\n")
+ * output.write("linear vars: "+str([v_.name for v_ in self.linear_vars])+"\n") # <<<<<<<<<<<<<<
+ * output.write("linear var ids: "+str([id(v_) for v_ in self.linear_vars])+"\n")
+ * output.write("linear coef: "+str(list(self.linear_coefs))+"\n")
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 167, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_4))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 167, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 167, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_7(__pyx_t_4);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 167, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_v_, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_v_, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Add(__pyx_kp_s_linear_vars_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 167, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":168
+ * output.write("constant: "+str(self.constant)+"\n")
+ * output.write("linear vars: "+str([v_.name for v_ in self.linear_vars])+"\n")
+ * output.write("linear var ids: "+str([id(v_) for v_ in self.linear_vars])+"\n") # <<<<<<<<<<<<<<
+ * output.write("linear coef: "+str(list(self.linear_coefs))+"\n")
+ * output.write("quadratic vars: "+str([(v_[0].name,v_[1].name) for v_ in self.quadratic_vars])+"\n")
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
+ __pyx_t_4 = __pyx_t_5; __Pyx_INCREF(__pyx_t_4); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_7 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 168, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_4))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 168, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 168, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ }
+ } else {
+ __pyx_t_5 = __pyx_t_7(__pyx_t_4);
+ if (unlikely(!__pyx_t_5)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 168, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_v_, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_v_);
+ __Pyx_GIVEREF(__pyx_v_v_);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_v_);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_8))) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Add(__pyx_kp_s_linear_var_ids, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(__pyx_t_4, __pyx_kp_s_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_3};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":169
+ * output.write("linear vars: "+str([v_.name for v_ in self.linear_vars])+"\n")
+ * output.write("linear var ids: "+str([id(v_) for v_ in self.linear_vars])+"\n")
+ * output.write("linear coef: "+str(list(self.linear_coefs))+"\n") # <<<<<<<<<<<<<<
+ * output.write("quadratic vars: "+str([(v_[0].name,v_[1].name) for v_ in self.quadratic_vars])+"\n")
+ * output.write("quadratic var ids: "+str([(id(v_[0]), id(v_[1])) for v_ in self.quadratic_vars])+"\n")
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_3 = PySequence_List(__pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyNumber_Add(__pyx_kp_s_linear_coef, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(__pyx_t_8, __pyx_kp_s_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_3};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_3};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":170
+ * output.write("linear var ids: "+str([id(v_) for v_ in self.linear_vars])+"\n")
+ * output.write("linear coef: "+str(list(self.linear_coefs))+"\n")
+ * output.write("quadratic vars: "+str([(v_[0].name,v_[1].name) for v_ in self.quadratic_vars])+"\n") # <<<<<<<<<<<<<<
+ * output.write("quadratic var ids: "+str([(id(v_[0]), id(v_[1])) for v_ in self.quadratic_vars])+"\n")
+ * output.write("quadratic coef: "+str(list(self.quadratic_coefs))+"\n")
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_8 = __pyx_t_3; __Pyx_INCREF(__pyx_t_8); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_7 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 170, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_8))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_8)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 170, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_3); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 170, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_7(__pyx_t_8);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 170, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_v_, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_v_, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_v_, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_name); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_9);
+ __pyx_t_5 = 0;
+ __pyx_t_9 = 0;
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_3))) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyNumber_Add(__pyx_kp_s_quadratic_vars_2, __pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Add(__pyx_t_8, __pyx_kp_s_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_4};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 170, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":171
+ * output.write("linear coef: "+str(list(self.linear_coefs))+"\n")
+ * output.write("quadratic vars: "+str([(v_[0].name,v_[1].name) for v_ in self.quadratic_vars])+"\n")
+ * output.write("quadratic var ids: "+str([(id(v_[0]), id(v_[1])) for v_ in self.quadratic_vars])+"\n") # <<<<<<<<<<<<<<
+ * output.write("quadratic coef: "+str(list(self.quadratic_coefs))+"\n")
+ * if self.nonlinear_expr is None:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_vars); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
+ __pyx_t_8 = __pyx_t_4; __Pyx_INCREF(__pyx_t_8); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_7 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 171, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_8))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_8)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 171, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_7(__pyx_t_8);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 171, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_v_, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_v_v_, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_9, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_v_v_, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_5, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_9);
+ __pyx_t_4 = 0;
+ __pyx_t_9 = 0;
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_3, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyNumber_Add(__pyx_kp_s_quadratic_var_ids, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(__pyx_t_8, __pyx_kp_s_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_3};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_3};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 171, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":172
+ * output.write("quadratic vars: "+str([(v_[0].name,v_[1].name) for v_ in self.quadratic_vars])+"\n")
+ * output.write("quadratic var ids: "+str([(id(v_[0]), id(v_[1])) for v_ in self.quadratic_vars])+"\n")
+ * output.write("quadratic coef: "+str(list(self.quadratic_coefs))+"\n") # <<<<<<<<<<<<<<
+ * if self.nonlinear_expr is None:
+ * output.write("nonlinear expr: None\n")
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_coefs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_3 = PySequence_List(__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyNumber_Add(__pyx_kp_s_quadratic_coef, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(__pyx_t_5, __pyx_kp_s_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 172, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":173
+ * output.write("quadratic var ids: "+str([(id(v_[0]), id(v_[1])) for v_ in self.quadratic_vars])+"\n")
+ * output.write("quadratic coef: "+str(list(self.quadratic_coefs))+"\n")
+ * if self.nonlinear_expr is None: # <<<<<<<<<<<<<<
+ * output.write("nonlinear expr: None\n")
+ * else:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 173, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = (__pyx_t_2 == Py_None);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_11 = (__pyx_t_10 != 0);
+ if (__pyx_t_11) {
+
+ /* "pyomo/repn/standard_repn.pyx":174
+ * output.write("quadratic coef: "+str(list(self.quadratic_coefs))+"\n")
+ * if self.nonlinear_expr is None:
+ * output.write("nonlinear expr: None\n") # <<<<<<<<<<<<<<
+ * else:
+ * output.write("nonlinear expr:\n")
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 174, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 174, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":173
+ * output.write("quadratic var ids: "+str([(id(v_[0]), id(v_[1])) for v_ in self.quadratic_vars])+"\n")
+ * output.write("quadratic coef: "+str(list(self.quadratic_coefs))+"\n")
+ * if self.nonlinear_expr is None: # <<<<<<<<<<<<<<
+ * output.write("nonlinear expr: None\n")
+ * else:
+ */
+ goto __pyx_L11;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":176
+ * output.write("nonlinear expr: None\n")
+ * else:
+ * output.write("nonlinear expr:\n") # <<<<<<<<<<<<<<
+ * try:
+ * output.write(self.nonlinear_expr.to_string())
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 176, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 176, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":177
+ * else:
+ * output.write("nonlinear expr:\n")
+ * try: # <<<<<<<<<<<<<<
+ * output.write(self.nonlinear_expr.to_string())
+ * output.write("\n")
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_12, &__pyx_t_13, &__pyx_t_14);
+ __Pyx_XGOTREF(__pyx_t_12);
+ __Pyx_XGOTREF(__pyx_t_13);
+ __Pyx_XGOTREF(__pyx_t_14);
+ /*try:*/ {
+
+ /* "pyomo/repn/standard_repn.pyx":178
+ * output.write("nonlinear expr:\n")
+ * try:
+ * output.write(self.nonlinear_expr.to_string()) # <<<<<<<<<<<<<<
+ * output.write("\n")
+ * except AttributeError:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 178, __pyx_L12_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_expr); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L12_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_to_string); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 178, __pyx_L12_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 178, __pyx_L12_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 178, __pyx_L12_error)
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L12_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L12_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L12_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 178, __pyx_L12_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 178, __pyx_L12_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":179
+ * try:
+ * output.write(self.nonlinear_expr.to_string())
+ * output.write("\n") # <<<<<<<<<<<<<<
+ * except AttributeError:
+ * output.write(str(self.nonlinear_expr))
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 179, __pyx_L12_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 179, __pyx_L12_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":177
+ * else:
+ * output.write("nonlinear expr:\n")
+ * try: # <<<<<<<<<<<<<<
+ * output.write(self.nonlinear_expr.to_string())
+ * output.write("\n")
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ goto __pyx_L17_try_end;
+ __pyx_L12_error:;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":180
+ * output.write(self.nonlinear_expr.to_string())
+ * output.write("\n")
+ * except AttributeError: # <<<<<<<<<<<<<<
+ * output.write(str(self.nonlinear_expr))
+ * output.write("\n")
+ */
+ __pyx_t_15 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_AttributeError);
+ if (__pyx_t_15) {
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.StandardRepn.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3) < 0) __PYX_ERR(0, 180, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GOTREF(__pyx_t_3);
+
+ /* "pyomo/repn/standard_repn.pyx":181
+ * output.write("\n")
+ * except AttributeError:
+ * output.write(str(self.nonlinear_expr)) # <<<<<<<<<<<<<<
+ * output.write("\n")
+ * output.write("nonlinear vars: "+str([v_.name for v_ in self.nonlinear_vars])+"\n")
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 181, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_expr); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 181, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 181, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 181, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 181, __pyx_L14_except_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_9};
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 181, __pyx_L14_except_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_9};
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 181, __pyx_L14_except_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_16 = PyTuple_New(1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 181, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_16, 0+1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_16, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 181, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":182
+ * except AttributeError:
+ * output.write(str(self.nonlinear_expr))
+ * output.write("\n") # <<<<<<<<<<<<<<
+ * output.write("nonlinear vars: "+str([v_.name for v_ in self.nonlinear_vars])+"\n")
+ * output.write("\n")
+ */
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 182, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 182, __pyx_L14_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L13_exception_handled;
+ }
+ goto __pyx_L14_except_error;
+ __pyx_L14_except_error:;
+
+ /* "pyomo/repn/standard_repn.pyx":177
+ * else:
+ * output.write("nonlinear expr:\n")
+ * try: # <<<<<<<<<<<<<<
+ * output.write(self.nonlinear_expr.to_string())
+ * output.write("\n")
+ */
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+ goto __pyx_L1_error;
+ __pyx_L13_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_XGIVEREF(__pyx_t_14);
+ __Pyx_ExceptionReset(__pyx_t_12, __pyx_t_13, __pyx_t_14);
+ __pyx_L17_try_end:;
+ }
+ }
+ __pyx_L11:;
+
+ /* "pyomo/repn/standard_repn.pyx":183
+ * output.write(str(self.nonlinear_expr))
+ * output.write("\n")
+ * output.write("nonlinear vars: "+str([v_.name for v_ in self.nonlinear_vars])+"\n") # <<<<<<<<<<<<<<
+ * output.write("\n")
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_vars); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
+ __pyx_t_8 = __pyx_t_5; __Pyx_INCREF(__pyx_t_8); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_8 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_7 = Py_TYPE(__pyx_t_8)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 183, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_8))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_8)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 183, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_8)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_8, __pyx_t_6); __Pyx_INCREF(__pyx_t_5); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 183, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_8, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ }
+ } else {
+ __pyx_t_5 = __pyx_t_7(__pyx_t_8);
+ if (unlikely(!__pyx_t_5)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 183, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_v_, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_v_, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyNumber_Add(__pyx_kp_s_nonlinear_vars_2, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Add(__pyx_t_8, __pyx_kp_s_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_8) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_1};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_8, __pyx_t_1};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 183, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":184
+ * output.write("\n")
+ * output.write("nonlinear vars: "+str([v_.name for v_ in self.nonlinear_vars])+"\n")
+ * output.write("\n") # <<<<<<<<<<<<<<
+ *
+ * ret_str = output.getvalue()
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_write); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 184, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":186
+ * output.write("\n")
+ *
+ * ret_str = output.getvalue() # <<<<<<<<<<<<<<
+ * output.close()
+ * return ret_str
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_getvalue); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_ret_str = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":187
+ *
+ * ret_str = output.getvalue()
+ * output.close() # <<<<<<<<<<<<<<
+ * return ret_str
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_output, __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 187, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":188
+ * ret_str = output.getvalue()
+ * output.close()
+ * return ret_str # <<<<<<<<<<<<<<
+ *
+ * def is_fixed(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_ret_str);
+ __pyx_r = __pyx_v_ret_str;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":163
+ * # Generate a string representation of the expression
+ * #
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * output = StringIO()
+ * output.write("\n")
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.StandardRepn.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_output);
+ __Pyx_XDECREF(__pyx_v_ret_str);
+ __Pyx_XDECREF(__pyx_v_v_);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":190
+ * return ret_str
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * if len(self.linear_vars) == 0 and len(self.nonlinear_vars) == 0 and len(self.quadratic_vars) == 0:
+ * return True
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_9is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_9is_fixed = {"is_fixed", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_9is_fixed, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_9is_fixed(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_fixed (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_8is_fixed(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_8is_fixed(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ int __pyx_t_4;
+ __Pyx_RefNannySetupContext("is_fixed", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":191
+ *
+ * def is_fixed(self):
+ * if len(self.linear_vars) == 0 and len(self.nonlinear_vars) == 0 and len(self.quadratic_vars) == 0: # <<<<<<<<<<<<<<
+ * return True
+ * return False
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 191, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = ((__pyx_t_3 == 0) != 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_1 = __pyx_t_4;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 191, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = ((__pyx_t_3 == 0) != 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_1 = __pyx_t_4;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 191, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 191, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = ((__pyx_t_3 == 0) != 0);
+ __pyx_t_1 = __pyx_t_4;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/repn/standard_repn.pyx":192
+ * def is_fixed(self):
+ * if len(self.linear_vars) == 0 and len(self.nonlinear_vars) == 0 and len(self.quadratic_vars) == 0:
+ * return True # <<<<<<<<<<<<<<
+ * return False
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_True);
+ __pyx_r = Py_True;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":191
+ *
+ * def is_fixed(self):
+ * if len(self.linear_vars) == 0 and len(self.nonlinear_vars) == 0 and len(self.quadratic_vars) == 0: # <<<<<<<<<<<<<<
+ * return True
+ * return False
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":193
+ * if len(self.linear_vars) == 0 and len(self.nonlinear_vars) == 0 and len(self.quadratic_vars) == 0:
+ * return True
+ * return False # <<<<<<<<<<<<<<
+ *
+ * def polynomial_degree(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_False);
+ __pyx_r = Py_False;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":190
+ * return ret_str
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * if len(self.linear_vars) == 0 and len(self.nonlinear_vars) == 0 and len(self.quadratic_vars) == 0:
+ * return True
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.StandardRepn.is_fixed", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":195
+ * return False
+ *
+ * def polynomial_degree(self): # <<<<<<<<<<<<<<
+ * if not self.nonlinear_expr is None:
+ * return None
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_11polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_11polynomial_degree = {"polynomial_degree", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_11polynomial_degree, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_11polynomial_degree(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("polynomial_degree (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_10polynomial_degree(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_10polynomial_degree(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ int __pyx_t_2;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ __Pyx_RefNannySetupContext("polynomial_degree", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":196
+ *
+ * def polynomial_degree(self):
+ * if not self.nonlinear_expr is None: # <<<<<<<<<<<<<<
+ * return None
+ * if len(self.quadratic_coefs) > 0:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 196, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = (__pyx_t_1 != Py_None);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = (__pyx_t_2 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":197
+ * def polynomial_degree(self):
+ * if not self.nonlinear_expr is None:
+ * return None # <<<<<<<<<<<<<<
+ * if len(self.quadratic_coefs) > 0:
+ * return 2
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(Py_None);
+ __pyx_r = Py_None;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":196
+ *
+ * def polynomial_degree(self):
+ * if not self.nonlinear_expr is None: # <<<<<<<<<<<<<<
+ * return None
+ * if len(self.quadratic_coefs) > 0:
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":198
+ * if not self.nonlinear_expr is None:
+ * return None
+ * if len(self.quadratic_coefs) > 0: # <<<<<<<<<<<<<<
+ * return 2
+ * if len(self.linear_coefs) > 0:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_coefs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 198, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 198, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((__pyx_t_4 > 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":199
+ * return None
+ * if len(self.quadratic_coefs) > 0:
+ * return 2 # <<<<<<<<<<<<<<
+ * if len(self.linear_coefs) > 0:
+ * return 1
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_2);
+ __pyx_r = __pyx_int_2;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":198
+ * if not self.nonlinear_expr is None:
+ * return None
+ * if len(self.quadratic_coefs) > 0: # <<<<<<<<<<<<<<
+ * return 2
+ * if len(self.linear_coefs) > 0:
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":200
+ * if len(self.quadratic_coefs) > 0:
+ * return 2
+ * if len(self.linear_coefs) > 0: # <<<<<<<<<<<<<<
+ * return 1
+ * return 0
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 200, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((__pyx_t_4 > 0) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":201
+ * return 2
+ * if len(self.linear_coefs) > 0:
+ * return 1 # <<<<<<<<<<<<<<
+ * return 0
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_1);
+ __pyx_r = __pyx_int_1;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":200
+ * if len(self.quadratic_coefs) > 0:
+ * return 2
+ * if len(self.linear_coefs) > 0: # <<<<<<<<<<<<<<
+ * return 1
+ * return 0
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":202
+ * if len(self.linear_coefs) > 0:
+ * return 1
+ * return 0 # <<<<<<<<<<<<<<
+ *
+ * def is_constant(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_r = __pyx_int_0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":195
+ * return False
+ *
+ * def polynomial_degree(self): # <<<<<<<<<<<<<<
+ * if not self.nonlinear_expr is None:
+ * return None
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.StandardRepn.polynomial_degree", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":204
+ * return 0
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0 and len(self.linear_coefs) == 0
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_13is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_13is_constant = {"is_constant", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_13is_constant, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_13is_constant(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_constant (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_12is_constant(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_12is_constant(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ __Pyx_RefNannySetupContext("is_constant", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":205
+ *
+ * def is_constant(self):
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0 and len(self.linear_coefs) == 0 # <<<<<<<<<<<<<<
+ *
+ * def is_linear(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__pyx_t_2 == Py_None);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_coefs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_4 == 0);
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_4 == 0);
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 205, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __pyx_L3_bool_binop_done:;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":204
+ * return 0
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0 and len(self.linear_coefs) == 0
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.StandardRepn.is_constant", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":207
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0 and len(self.linear_coefs) == 0
+ *
+ * def is_linear(self): # <<<<<<<<<<<<<<
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_15is_linear(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_15is_linear = {"is_linear", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_15is_linear, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_15is_linear(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_linear (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_14is_linear(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_14is_linear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ Py_ssize_t __pyx_t_4;
+ __Pyx_RefNannySetupContext("is_linear", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":208
+ *
+ * def is_linear(self):
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0 # <<<<<<<<<<<<<<
+ *
+ * def is_quadratic(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__pyx_t_2 == Py_None);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+ } else {
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_coefs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 208, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_4 == 0);
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 208, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __pyx_L3_bool_binop_done:;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":207
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0 and len(self.linear_coefs) == 0
+ *
+ * def is_linear(self): # <<<<<<<<<<<<<<
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.StandardRepn.is_linear", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":210
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0
+ *
+ * def is_quadratic(self): # <<<<<<<<<<<<<<
+ * return len(self.quadratic_coefs) > 0 and self.nonlinear_expr is None
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_17is_quadratic(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_17is_quadratic = {"is_quadratic", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_17is_quadratic, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_17is_quadratic(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_quadratic (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_16is_quadratic(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_16is_quadratic(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ int __pyx_t_4;
+ __Pyx_RefNannySetupContext("is_quadratic", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":211
+ *
+ * def is_quadratic(self):
+ * return len(self.quadratic_coefs) > 0 and self.nonlinear_expr is None # <<<<<<<<<<<<<<
+ *
+ * def is_nonlinear(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_coefs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 211, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 > 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__pyx_t_2 == Py_None);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __pyx_L3_bool_binop_done:;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":210
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0
+ *
+ * def is_quadratic(self): # <<<<<<<<<<<<<<
+ * return len(self.quadratic_coefs) > 0 and self.nonlinear_expr is None
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.StandardRepn.is_quadratic", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":213
+ * return len(self.quadratic_coefs) > 0 and self.nonlinear_expr is None
+ *
+ * def is_nonlinear(self): # <<<<<<<<<<<<<<
+ * return not (self.nonlinear_expr is None and len(self.quadratic_coefs) == 0)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_19is_nonlinear(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_19is_nonlinear = {"is_nonlinear", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_19is_nonlinear, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_19is_nonlinear(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("is_nonlinear (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_18is_nonlinear(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_18is_nonlinear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ Py_ssize_t __pyx_t_5;
+ __Pyx_RefNannySetupContext("is_nonlinear", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":214
+ *
+ * def is_nonlinear(self):
+ * return not (self.nonlinear_expr is None and len(self.quadratic_coefs) == 0) # <<<<<<<<<<<<<<
+ *
+ * def to_expression(self):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__pyx_t_2 == Py_None);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_1 = __pyx_t_4;
+ goto __pyx_L3_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_coefs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_5 == ((Py_ssize_t)-1))) __PYX_ERR(0, 214, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = ((__pyx_t_5 == 0) != 0);
+ __pyx_t_1 = __pyx_t_4;
+ __pyx_L3_bool_binop_done:;
+ __pyx_t_2 = __Pyx_PyBool_FromLong((!__pyx_t_1)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 214, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":213
+ * return len(self.quadratic_coefs) > 0 and self.nonlinear_expr is None
+ *
+ * def is_nonlinear(self): # <<<<<<<<<<<<<<
+ * return not (self.nonlinear_expr is None and len(self.quadratic_coefs) == 0)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.StandardRepn.is_nonlinear", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":216
+ * return not (self.nonlinear_expr is None and len(self.quadratic_coefs) == 0)
+ *
+ * def to_expression(self): # <<<<<<<<<<<<<<
+ * #
+ * # TODO: Should this replace non-mutable parameters with constants?
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_21to_expression(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_21to_expression = {"to_expression", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_21to_expression, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_12StandardRepn_21to_expression(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("to_expression (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_20to_expression(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12StandardRepn_20to_expression(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_v_expr = NULL;
+ PyObject *__pyx_v_i = NULL;
+ CYTHON_UNUSED PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_v_val = NULL;
+ PyObject *__pyx_v_term = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ Py_ssize_t __pyx_t_4;
+ PyObject *(*__pyx_t_5)(PyObject *);
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ int __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ __Pyx_RefNannySetupContext("to_expression", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":220
+ * # TODO: Should this replace non-mutable parameters with constants?
+ * #
+ * expr = self.constant # <<<<<<<<<<<<<<
+ * for i,v in enumerate(self.linear_vars):
+ * if self.linear_coefs[i].__class__ in native_numeric_types:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 220, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_expr = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":221
+ * #
+ * expr = self.constant
+ * for i,v in enumerate(self.linear_vars): # <<<<<<<<<<<<<<
+ * if self.linear_coefs[i].__class__ in native_numeric_types:
+ * val = self.linear_coefs[i]
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_1 = __pyx_int_0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 221, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 221, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 221, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 221, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_3, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_5(__pyx_t_3);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 221, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+ __pyx_t_2 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 221, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1);
+ __pyx_t_1 = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":222
+ * expr = self.constant
+ * for i,v in enumerate(self.linear_vars):
+ * if self.linear_coefs[i].__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * val = self.linear_coefs[i]
+ * if isclose_const(val, 1.0):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 222, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 222, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 222, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 222, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_8 = (__pyx_t_7 != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/repn/standard_repn.pyx":223
+ * for i,v in enumerate(self.linear_vars):
+ * if self.linear_coefs[i].__class__ in native_numeric_types:
+ * val = self.linear_coefs[i] # <<<<<<<<<<<<<<
+ * if isclose_const(val, 1.0):
+ * expr += self.linear_vars[i]
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 223, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_6, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 223, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":224
+ * if self.linear_coefs[i].__class__ in native_numeric_types:
+ * val = self.linear_coefs[i]
+ * if isclose_const(val, 1.0): # <<<<<<<<<<<<<<
+ * expr += self.linear_vars[i]
+ * elif isclose_const(val, -1.0):
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_const); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 224, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_val, __pyx_float_1_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_9, __pyx_v_val, __pyx_float_1_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 224, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_val);
+ __Pyx_GIVEREF(__pyx_v_val);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_val);
+ __Pyx_INCREF(__pyx_float_1_0);
+ __Pyx_GIVEREF(__pyx_float_1_0);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_float_1_0);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 224, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 224, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/repn/standard_repn.pyx":225
+ * val = self.linear_coefs[i]
+ * if isclose_const(val, 1.0):
+ * expr += self.linear_vars[i] # <<<<<<<<<<<<<<
+ * elif isclose_const(val, -1.0):
+ * expr -= self.linear_vars[i]
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 225, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 225, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":224
+ * if self.linear_coefs[i].__class__ in native_numeric_types:
+ * val = self.linear_coefs[i]
+ * if isclose_const(val, 1.0): # <<<<<<<<<<<<<<
+ * expr += self.linear_vars[i]
+ * elif isclose_const(val, -1.0):
+ */
+ goto __pyx_L6;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":226
+ * if isclose_const(val, 1.0):
+ * expr += self.linear_vars[i]
+ * elif isclose_const(val, -1.0): # <<<<<<<<<<<<<<
+ * expr -= self.linear_vars[i]
+ * elif val < 0.0:
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_const); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_11 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_val, __pyx_float_neg_1_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_val, __pyx_float_neg_1_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_11) {
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_val);
+ __Pyx_GIVEREF(__pyx_v_val);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_v_val);
+ __Pyx_INCREF(__pyx_float_neg_1_0);
+ __Pyx_GIVEREF(__pyx_float_neg_1_0);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_float_neg_1_0);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 226, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 226, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/repn/standard_repn.pyx":227
+ * expr += self.linear_vars[i]
+ * elif isclose_const(val, -1.0):
+ * expr -= self.linear_vars[i] # <<<<<<<<<<<<<<
+ * elif val < 0.0:
+ * expr -= - self.linear_coefs[i]*self.linear_vars[i]
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 227, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_InPlaceSubtract(__pyx_v_expr, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 227, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":226
+ * if isclose_const(val, 1.0):
+ * expr += self.linear_vars[i]
+ * elif isclose_const(val, -1.0): # <<<<<<<<<<<<<<
+ * expr -= self.linear_vars[i]
+ * elif val < 0.0:
+ */
+ goto __pyx_L6;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":228
+ * elif isclose_const(val, -1.0):
+ * expr -= self.linear_vars[i]
+ * elif val < 0.0: # <<<<<<<<<<<<<<
+ * expr -= - self.linear_coefs[i]*self.linear_vars[i]
+ * else:
+ */
+ __pyx_t_2 = PyObject_RichCompare(__pyx_v_val, __pyx_float_0_0, Py_LT); __Pyx_XGOTREF(__pyx_t_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 228, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/repn/standard_repn.pyx":229
+ * expr -= self.linear_vars[i]
+ * elif val < 0.0:
+ * expr -= - self.linear_coefs[i]*self.linear_vars[i] # <<<<<<<<<<<<<<
+ * else:
+ * expr += self.linear_coefs[i]*self.linear_vars[i]
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Negative(__pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = PyObject_GetItem(__pyx_t_6, __pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Multiply(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyNumber_InPlaceSubtract(__pyx_v_expr, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 229, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_9);
+ __pyx_t_9 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":228
+ * elif isclose_const(val, -1.0):
+ * expr -= self.linear_vars[i]
+ * elif val < 0.0: # <<<<<<<<<<<<<<
+ * expr -= - self.linear_coefs[i]*self.linear_vars[i]
+ * else:
+ */
+ goto __pyx_L6;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":231
+ * expr -= - self.linear_coefs[i]*self.linear_vars[i]
+ * else:
+ * expr += self.linear_coefs[i]*self.linear_vars[i] # <<<<<<<<<<<<<<
+ * else:
+ * expr += self.linear_coefs[i]*self.linear_vars[i]
+ */
+ /*else*/ {
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_6 = PyObject_GetItem(__pyx_t_9, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_9, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyNumber_Multiply(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 231, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_2);
+ __pyx_t_2 = 0;
+ }
+ __pyx_L6:;
+
+ /* "pyomo/repn/standard_repn.pyx":222
+ * expr = self.constant
+ * for i,v in enumerate(self.linear_vars):
+ * if self.linear_coefs[i].__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * val = self.linear_coefs[i]
+ * if isclose_const(val, 1.0):
+ */
+ goto __pyx_L5;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":233
+ * expr += self.linear_coefs[i]*self.linear_vars[i]
+ * else:
+ * expr += self.linear_coefs[i]*self.linear_vars[i] # <<<<<<<<<<<<<<
+ * for i,v in enumerate(self.quadratic_vars):
+ * if id(self.quadratic_vars[i][0]) == id(self.quadratic_vars[i][1]):
+ */
+ /*else*/ {
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = PyObject_GetItem(__pyx_t_2, __pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 233, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyObject_GetItem(__pyx_t_2, __pyx_v_i); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Multiply(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 233, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 233, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_6);
+ __pyx_t_6 = 0;
+ }
+ __pyx_L5:;
+
+ /* "pyomo/repn/standard_repn.pyx":221
+ * #
+ * expr = self.constant
+ * for i,v in enumerate(self.linear_vars): # <<<<<<<<<<<<<<
+ * if self.linear_coefs[i].__class__ in native_numeric_types:
+ * val = self.linear_coefs[i]
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":234
+ * else:
+ * expr += self.linear_coefs[i]*self.linear_vars[i]
+ * for i,v in enumerate(self.quadratic_vars): # <<<<<<<<<<<<<<
+ * if id(self.quadratic_vars[i][0]) == id(self.quadratic_vars[i][1]):
+ * term = self.quadratic_vars[i][0]**2
+ */
+ __Pyx_INCREF(__pyx_int_0);
+ __pyx_t_1 = __pyx_int_0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (likely(PyList_CheckExact(__pyx_t_3)) || PyTuple_CheckExact(__pyx_t_3)) {
+ __pyx_t_6 = __pyx_t_3; __Pyx_INCREF(__pyx_t_6); __pyx_t_4 = 0;
+ __pyx_t_5 = NULL;
+ } else {
+ __pyx_t_4 = -1; __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 234, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = Py_TYPE(__pyx_t_6)->tp_iternext; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 234, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_5)) {
+ if (likely(PyList_CheckExact(__pyx_t_6))) {
+ if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 234, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ } else {
+ if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_6)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_6, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) __PYX_ERR(0, 234, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_6, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ }
+ } else {
+ __pyx_t_3 = __pyx_t_5(__pyx_t_6);
+ if (unlikely(!__pyx_t_3)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 234, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_1);
+ __pyx_t_3 = __Pyx_PyInt_AddObjC(__pyx_t_1, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 234, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1);
+ __pyx_t_1 = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":235
+ * expr += self.linear_coefs[i]*self.linear_vars[i]
+ * for i,v in enumerate(self.quadratic_vars):
+ * if id(self.quadratic_vars[i][0]) == id(self.quadratic_vars[i][1]): # <<<<<<<<<<<<<<
+ * term = self.quadratic_vars[i][0]**2
+ * else:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_3, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = PyObject_GetItem(__pyx_t_2, __pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_9, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyObject_RichCompare(__pyx_t_3, __pyx_t_2, Py_EQ); __Pyx_XGOTREF(__pyx_t_9); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 235, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ if (__pyx_t_8) {
+
+ /* "pyomo/repn/standard_repn.pyx":236
+ * for i,v in enumerate(self.quadratic_vars):
+ * if id(self.quadratic_vars[i][0]) == id(self.quadratic_vars[i][1]):
+ * term = self.quadratic_vars[i][0]**2 # <<<<<<<<<<<<<<
+ * else:
+ * term = self.quadratic_vars[i][0]*self.quadratic_vars[i][1]
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_vars); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 236, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_9, __pyx_v_i); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 236, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Power(__pyx_t_9, __pyx_int_2, Py_None); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 236, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_term, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":235
+ * expr += self.linear_coefs[i]*self.linear_vars[i]
+ * for i,v in enumerate(self.quadratic_vars):
+ * if id(self.quadratic_vars[i][0]) == id(self.quadratic_vars[i][1]): # <<<<<<<<<<<<<<
+ * term = self.quadratic_vars[i][0]**2
+ * else:
+ */
+ goto __pyx_L9;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":238
+ * term = self.quadratic_vars[i][0]**2
+ * else:
+ * term = self.quadratic_vars[i][0]*self.quadratic_vars[i][1] # <<<<<<<<<<<<<<
+ * if self.quadratic_coefs[i].__class__ in native_numeric_types:
+ * val = self.quadratic_coefs[i]
+ */
+ /*else*/ {
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = PyObject_GetItem(__pyx_t_2, __pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_vars); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_9, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_3, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 238, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_term, __pyx_t_3);
+ __pyx_t_3 = 0;
+ }
+ __pyx_L9:;
+
+ /* "pyomo/repn/standard_repn.pyx":239
+ * else:
+ * term = self.quadratic_vars[i][0]*self.quadratic_vars[i][1]
+ * if self.quadratic_coefs[i].__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * val = self.quadratic_coefs[i]
+ * if isclose_const(val, 1.0):
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_coefs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = PyObject_GetItem(__pyx_t_3, __pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 239, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_9, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 239, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_7 = (__pyx_t_8 != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/repn/standard_repn.pyx":240
+ * term = self.quadratic_vars[i][0]*self.quadratic_vars[i][1]
+ * if self.quadratic_coefs[i].__class__ in native_numeric_types:
+ * val = self.quadratic_coefs[i] # <<<<<<<<<<<<<<
+ * if isclose_const(val, 1.0):
+ * expr += term
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_coefs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 240, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_9, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 240, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":241
+ * if self.quadratic_coefs[i].__class__ in native_numeric_types:
+ * val = self.quadratic_coefs[i]
+ * if isclose_const(val, 1.0): # <<<<<<<<<<<<<<
+ * expr += term
+ * elif isclose_const(val, -1.0):
+ */
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_const); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_2 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_val, __pyx_float_1_0};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_val, __pyx_float_1_0};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_2) {
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_val);
+ __Pyx_GIVEREF(__pyx_v_val);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_10, __pyx_v_val);
+ __Pyx_INCREF(__pyx_float_1_0);
+ __Pyx_GIVEREF(__pyx_float_1_0);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_10, __pyx_float_1_0);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 241, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_7) {
+
+ /* "pyomo/repn/standard_repn.pyx":242
+ * val = self.quadratic_coefs[i]
+ * if isclose_const(val, 1.0):
+ * expr += term # <<<<<<<<<<<<<<
+ * elif isclose_const(val, -1.0):
+ * expr -= term
+ */
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_v_term); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 242, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":241
+ * if self.quadratic_coefs[i].__class__ in native_numeric_types:
+ * val = self.quadratic_coefs[i]
+ * if isclose_const(val, 1.0): # <<<<<<<<<<<<<<
+ * expr += term
+ * elif isclose_const(val, -1.0):
+ */
+ goto __pyx_L11;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":243
+ * if isclose_const(val, 1.0):
+ * expr += term
+ * elif isclose_const(val, -1.0): # <<<<<<<<<<<<<<
+ * expr -= term
+ * else:
+ */
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_const); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 243, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_11 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_val, __pyx_float_neg_1_0};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_v_val, __pyx_float_neg_1_0};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_10, 2+__pyx_t_10); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 243, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__pyx_t_11) {
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_val);
+ __Pyx_GIVEREF(__pyx_v_val);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_10, __pyx_v_val);
+ __Pyx_INCREF(__pyx_float_neg_1_0);
+ __Pyx_GIVEREF(__pyx_float_neg_1_0);
+ PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_10, __pyx_float_neg_1_0);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 243, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 243, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_7) {
+
+ /* "pyomo/repn/standard_repn.pyx":244
+ * expr += term
+ * elif isclose_const(val, -1.0):
+ * expr -= term # <<<<<<<<<<<<<<
+ * else:
+ * expr += self.quadratic_coefs[i]*term
+ */
+ __pyx_t_3 = PyNumber_InPlaceSubtract(__pyx_v_expr, __pyx_v_term); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 244, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":243
+ * if isclose_const(val, 1.0):
+ * expr += term
+ * elif isclose_const(val, -1.0): # <<<<<<<<<<<<<<
+ * expr -= term
+ * else:
+ */
+ goto __pyx_L11;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":246
+ * expr -= term
+ * else:
+ * expr += self.quadratic_coefs[i]*term # <<<<<<<<<<<<<<
+ * else:
+ * expr += self.quadratic_coefs[i]*term
+ */
+ /*else*/ {
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_coefs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = PyObject_GetItem(__pyx_t_3, __pyx_v_i); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Multiply(__pyx_t_9, __pyx_v_term); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 246, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_9);
+ __pyx_t_9 = 0;
+ }
+ __pyx_L11:;
+
+ /* "pyomo/repn/standard_repn.pyx":239
+ * else:
+ * term = self.quadratic_vars[i][0]*self.quadratic_vars[i][1]
+ * if self.quadratic_coefs[i].__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * val = self.quadratic_coefs[i]
+ * if isclose_const(val, 1.0):
+ */
+ goto __pyx_L10;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":248
+ * expr += self.quadratic_coefs[i]*term
+ * else:
+ * expr += self.quadratic_coefs[i]*term # <<<<<<<<<<<<<<
+ * if not self.nonlinear_expr is None:
+ * expr += self.nonlinear_expr
+ */
+ /*else*/ {
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic_coefs); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 248, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_9, __pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyNumber_Multiply(__pyx_t_3, __pyx_v_term); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 248, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 248, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_3);
+ __pyx_t_3 = 0;
+ }
+ __pyx_L10:;
+
+ /* "pyomo/repn/standard_repn.pyx":234
+ * else:
+ * expr += self.linear_coefs[i]*self.linear_vars[i]
+ * for i,v in enumerate(self.quadratic_vars): # <<<<<<<<<<<<<<
+ * if id(self.quadratic_vars[i][0]) == id(self.quadratic_vars[i][1]):
+ * term = self.quadratic_vars[i][0]**2
+ */
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":249
+ * else:
+ * expr += self.quadratic_coefs[i]*term
+ * if not self.nonlinear_expr is None: # <<<<<<<<<<<<<<
+ * expr += self.nonlinear_expr
+ * return expr
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 249, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = (__pyx_t_1 != Py_None);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = (__pyx_t_7 != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/repn/standard_repn.pyx":250
+ * expr += self.quadratic_coefs[i]*term
+ * if not self.nonlinear_expr is None:
+ * expr += self.nonlinear_expr # <<<<<<<<<<<<<<
+ * return expr
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonlinear_expr); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_v_expr, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 250, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_expr, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":249
+ * else:
+ * expr += self.quadratic_coefs[i]*term
+ * if not self.nonlinear_expr is None: # <<<<<<<<<<<<<<
+ * expr += self.nonlinear_expr
+ * return expr
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":251
+ * if not self.nonlinear_expr is None:
+ * expr += self.nonlinear_expr
+ * return expr # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_expr);
+ __pyx_r = __pyx_v_expr;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":216
+ * return not (self.nonlinear_expr is None and len(self.quadratic_coefs) == 0)
+ *
+ * def to_expression(self): # <<<<<<<<<<<<<<
+ * #
+ * # TODO: Should this replace non-mutable parameters with constants?
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.StandardRepn.to_expression", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_expr);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XDECREF(__pyx_v_val);
+ __Pyx_XDECREF(__pyx_v_term);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":267
+ * """
+ * #@profile
+ * def generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None): # <<<<<<<<<<<<<<
+ * #
+ * # Use a custom isclose function
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_3generate_standard_repn(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_3generate_standard_repn = {"generate_standard_repn", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_3generate_standard_repn, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_3generate_standard_repn(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_expr = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_v_repn = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("generate_standard_repn (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_expr,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,&__pyx_n_s_repn,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ values[1] = ((PyObject *)Py_None);
+ values[2] = ((PyObject *)Py_True);
+ values[3] = ((PyObject *)Py_False);
+ values[4] = ((PyObject *)Py_True);
+ values[5] = ((PyObject *)Py_None);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_expr)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic);
+ if (value) { values[4] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_repn);
+ if (value) { values[5] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "generate_standard_repn") < 0)) __PYX_ERR(0, 267, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_expr = values[0];
+ __pyx_v_idMap = values[1];
+ __pyx_v_compute_values = values[2];
+ __pyx_v_verbose = values[3];
+ __pyx_v_quadratic = values[4];
+ __pyx_v_repn = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("generate_standard_repn", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 267, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.generate_standard_repn", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_2generate_standard_repn(__pyx_self, __pyx_v_expr, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic, __pyx_v_repn);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_22generate_standard_repn_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/repn/standard_repn.pyx":350
+ * linear_coefs[key] = c
+ * keys = list(linear_coefs.keys())
+ * repn.linear_vars = tuple(idMap[key] for key in keys) # <<<<<<<<<<<<<<
+ * repn.linear_coefs = tuple(linear_coefs[key] for key in keys)
+ * repn.constant = C_
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_22generate_standard_repn_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 350, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4repn_13standard_repn_22generate_standard_repn_2generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_generate_standard_repn_locals_ge, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!gen)) __PYX_ERR(0, 350, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.generate_standard_repn.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_22generate_standard_repn_2generator(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 350, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys)) { __Pyx_RaiseClosureNameError("keys"); __PYX_ERR(0, 350, __pyx_L1_error) }
+ if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 350, __pyx_L1_error)
+ }
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ for (;;) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 350, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap)) { __Pyx_RaiseClosureNameError("idMap"); __PYX_ERR(0, 350, __pyx_L1_error) }
+ __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 350, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_22generate_standard_repn_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/repn/standard_repn.pyx":351
+ * keys = list(linear_coefs.keys())
+ * repn.linear_vars = tuple(idMap[key] for key in keys)
+ * repn.linear_coefs = tuple(linear_coefs[key] for key in keys) # <<<<<<<<<<<<<<
+ * repn.constant = C_
+ * return repn
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_22generate_standard_repn_3genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 351, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4repn_13standard_repn_22generate_standard_repn_5generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_generate_standard_repn_locals_ge, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!gen)) __PYX_ERR(0, 351, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.generate_standard_repn.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_22generate_standard_repn_5generator1(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 351, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys)) { __Pyx_RaiseClosureNameError("keys"); __PYX_ERR(0, 351, __pyx_L1_error) }
+ if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 351, __pyx_L1_error)
+ }
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ for (;;) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 351, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 351, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_linear_coefs)) { __Pyx_RaiseClosureNameError("linear_coefs"); __PYX_ERR(0, 351, __pyx_L1_error) }
+ if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_linear_coefs == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
+ __PYX_ERR(0, 351, __pyx_L1_error)
+ }
+ __pyx_t_3 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_linear_coefs, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 351, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 351, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":267
+ * """
+ * #@profile
+ * def generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None): # <<<<<<<<<<<<<<
+ * #
+ * # Use a custom isclose function
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_2generate_standard_repn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic, PyObject *__pyx_v_repn) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *__pyx_cur_scope;
+ PyObject *__pyx_v_C_ = NULL;
+ PyObject *__pyx_v_v_ = NULL;
+ PyObject *__pyx_v_c_ = NULL;
+ PyObject *__pyx_v_c = NULL;
+ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_v_id_ = NULL;
+ PyObject *__pyx_v_key = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ int __pyx_t_10;
+ int __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
+ int __pyx_t_13;
+ PyObject *__pyx_t_14 = NULL;
+ Py_ssize_t __pyx_t_15;
+ PyObject *(*__pyx_t_16)(PyObject *);
+ PyObject *(*__pyx_t_17)(PyObject *);
+ int __pyx_t_18;
+ Py_ssize_t __pyx_t_19;
+ PyObject *__pyx_t_20 = NULL;
+ __Pyx_RefNannySetupContext("generate_standard_repn", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 267, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_v_idMap = __pyx_v_idMap;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_repn);
+
+ /* "pyomo/repn/standard_repn.pyx":271
+ * # Use a custom isclose function
+ * #
+ * with isclose_context(compute_values): # <<<<<<<<<<<<<<
+ * #
+ * # Setup
+ */
+ /*with:*/ {
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_context); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_compute_values); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_compute_values};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_compute_values};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_compute_values);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_exit); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_LookupSpecial(__pyx_t_1, __pyx_n_s_enter); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 271, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L3_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 271, __pyx_L3_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ /*try:*/ {
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_8);
+ /*try:*/ {
+
+ /* "pyomo/repn/standard_repn.pyx":275
+ * # Setup
+ * #
+ * if idMap is None: # <<<<<<<<<<<<<<
+ * idMap = {}
+ * idMap.setdefault(None, {})
+ */
+ __pyx_t_9 = (__pyx_cur_scope->__pyx_v_idMap == Py_None);
+ __pyx_t_10 = (__pyx_t_9 != 0);
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":276
+ * #
+ * if idMap is None:
+ * idMap = {} # <<<<<<<<<<<<<<
+ * idMap.setdefault(None, {})
+ * if repn is None:
+ */
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 276, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_idMap, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":275
+ * # Setup
+ * #
+ * if idMap is None: # <<<<<<<<<<<<<<
+ * idMap = {}
+ * idMap.setdefault(None, {})
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":277
+ * if idMap is None:
+ * idMap = {}
+ * idMap.setdefault(None, {}) # <<<<<<<<<<<<<<
+ * if repn is None:
+ * repn = StandardRepn()
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_idMap, __pyx_n_s_setdefault); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 277, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 277, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, Py_None, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, Py_None, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 277, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (__pyx_t_3) {
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ }
+ __Pyx_INCREF(Py_None);
+ __Pyx_GIVEREF(Py_None);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_11, Py_None);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_11, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 277, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":278
+ * idMap = {}
+ * idMap.setdefault(None, {})
+ * if repn is None: # <<<<<<<<<<<<<<
+ * repn = StandardRepn()
+ * #
+ */
+ __pyx_t_10 = (__pyx_v_repn == Py_None);
+ __pyx_t_9 = (__pyx_t_10 != 0);
+ if (__pyx_t_9) {
+
+ /* "pyomo/repn/standard_repn.pyx":279
+ * idMap.setdefault(None, {})
+ * if repn is None:
+ * repn = StandardRepn() # <<<<<<<<<<<<<<
+ * #
+ * # The expression is a number or a non-variable constant
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_StandardRepn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 279, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 279, __pyx_L7_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF_SET(__pyx_v_repn, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":278
+ * idMap = {}
+ * idMap.setdefault(None, {})
+ * if repn is None: # <<<<<<<<<<<<<<
+ * repn = StandardRepn()
+ * #
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":284
+ * # expression.
+ * #
+ * if expr.__class__ in native_numeric_types or not expr.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * repn.constant = EXPR.evaluate_expression(expr)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 284, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_13 = (__pyx_t_10 != 0);
+ if (!__pyx_t_13) {
+ } else {
+ __pyx_t_9 = __pyx_t_13;
+ goto __pyx_L16_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 284, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 284, __pyx_L7_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 284, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_10 = ((!__pyx_t_13) != 0);
+ __pyx_t_9 = __pyx_t_10;
+ __pyx_L16_bool_binop_done:;
+ if (__pyx_t_9) {
+
+ /* "pyomo/repn/standard_repn.pyx":285
+ * #
+ * if expr.__class__ in native_numeric_types or not expr.is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * repn.constant = EXPR.evaluate_expression(expr)
+ * else:
+ */
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 285, __pyx_L7_error)
+ if (__pyx_t_9) {
+
+ /* "pyomo/repn/standard_repn.pyx":286
+ * if expr.__class__ in native_numeric_types or not expr.is_potentially_variable():
+ * if compute_values:
+ * repn.constant = EXPR.evaluate_expression(expr) # <<<<<<<<<<<<<<
+ * else:
+ * repn.constant = expr
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 286, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_evaluate_expression); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 286, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_expr};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_expr};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 286, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_expr);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 286, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_constant, __pyx_t_2) < 0) __PYX_ERR(0, 286, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":285
+ * #
+ * if expr.__class__ in native_numeric_types or not expr.is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * repn.constant = EXPR.evaluate_expression(expr)
+ * else:
+ */
+ goto __pyx_L18;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":288
+ * repn.constant = EXPR.evaluate_expression(expr)
+ * else:
+ * repn.constant = expr # <<<<<<<<<<<<<<
+ * return repn
+ * #
+ */
+ /*else*/ {
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_constant, __pyx_v_expr) < 0) __PYX_ERR(0, 288, __pyx_L7_error)
+ }
+ __pyx_L18:;
+
+ /* "pyomo/repn/standard_repn.pyx":289
+ * else:
+ * repn.constant = expr
+ * return repn # <<<<<<<<<<<<<<
+ * #
+ * # The expression is a variable
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_repn);
+ __pyx_r = __pyx_v_repn;
+ goto __pyx_L11_try_return;
+
+ /* "pyomo/repn/standard_repn.pyx":284
+ * # expression.
+ * #
+ * if expr.__class__ in native_numeric_types or not expr.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * repn.constant = EXPR.evaluate_expression(expr)
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":293
+ * # The expression is a variable
+ * #
+ * elif expr.is_variable_type(): # <<<<<<<<<<<<<<
+ * if expr.fixed:
+ * if compute_values:
+ */
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_is_variable_type); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 293, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 293, __pyx_L7_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 293, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_9) {
+
+ /* "pyomo/repn/standard_repn.pyx":294
+ * #
+ * elif expr.is_variable_type():
+ * if expr.fixed: # <<<<<<<<<<<<<<
+ * if compute_values:
+ * repn.constant = value(expr)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_fixed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 294, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 294, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_9) {
+
+ /* "pyomo/repn/standard_repn.pyx":295
+ * elif expr.is_variable_type():
+ * if expr.fixed:
+ * if compute_values: # <<<<<<<<<<<<<<
+ * repn.constant = value(expr)
+ * else:
+ */
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 295, __pyx_L7_error)
+ if (__pyx_t_9) {
+
+ /* "pyomo/repn/standard_repn.pyx":296
+ * if expr.fixed:
+ * if compute_values:
+ * repn.constant = value(expr) # <<<<<<<<<<<<<<
+ * else:
+ * repn.constant = expr
+ */
+ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 296, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_v_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_expr};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_v_expr};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_expr);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_constant, __pyx_t_2) < 0) __PYX_ERR(0, 296, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":295
+ * elif expr.is_variable_type():
+ * if expr.fixed:
+ * if compute_values: # <<<<<<<<<<<<<<
+ * repn.constant = value(expr)
+ * else:
+ */
+ goto __pyx_L20;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":298
+ * repn.constant = value(expr)
+ * else:
+ * repn.constant = expr # <<<<<<<<<<<<<<
+ * return repn
+ * repn.linear_coefs = (1,)
+ */
+ /*else*/ {
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_constant, __pyx_v_expr) < 0) __PYX_ERR(0, 298, __pyx_L7_error)
+ }
+ __pyx_L20:;
+
+ /* "pyomo/repn/standard_repn.pyx":299
+ * else:
+ * repn.constant = expr
+ * return repn # <<<<<<<<<<<<<<
+ * repn.linear_coefs = (1,)
+ * repn.linear_vars = (expr,)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_repn);
+ __pyx_r = __pyx_v_repn;
+ goto __pyx_L11_try_return;
+
+ /* "pyomo/repn/standard_repn.pyx":294
+ * #
+ * elif expr.is_variable_type():
+ * if expr.fixed: # <<<<<<<<<<<<<<
+ * if compute_values:
+ * repn.constant = value(expr)
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":300
+ * repn.constant = expr
+ * return repn
+ * repn.linear_coefs = (1,) # <<<<<<<<<<<<<<
+ * repn.linear_vars = (expr,)
+ * return repn
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_linear_coefs, __pyx_tuple__8) < 0) __PYX_ERR(0, 300, __pyx_L7_error)
+
+ /* "pyomo/repn/standard_repn.pyx":301
+ * return repn
+ * repn.linear_coefs = (1,)
+ * repn.linear_vars = (expr,) # <<<<<<<<<<<<<<
+ * return repn
+ * #
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 301, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_expr);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_linear_vars, __pyx_t_2) < 0) __PYX_ERR(0, 301, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":302
+ * repn.linear_coefs = (1,)
+ * repn.linear_vars = (expr,)
+ * return repn # <<<<<<<<<<<<<<
+ * #
+ * # The expression is linear
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_repn);
+ __pyx_r = __pyx_v_repn;
+ goto __pyx_L11_try_return;
+
+ /* "pyomo/repn/standard_repn.pyx":293
+ * # The expression is a variable
+ * #
+ * elif expr.is_variable_type(): # <<<<<<<<<<<<<<
+ * if expr.fixed:
+ * if compute_values:
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":306
+ * # The expression is linear
+ * #
+ * elif expr.__class__ is EXPR.LinearExpression: # <<<<<<<<<<<<<<
+ * if compute_values:
+ * C_ = EXPR.evaluate_expression(expr.constant)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 306, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 306, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_12, __pyx_n_s_LinearExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 306, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_9 = (__pyx_t_2 == __pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_10 = (__pyx_t_9 != 0);
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":307
+ * #
+ * elif expr.__class__ is EXPR.LinearExpression:
+ * if compute_values: # <<<<<<<<<<<<<<
+ * C_ = EXPR.evaluate_expression(expr.constant)
+ * else:
+ */
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 307, __pyx_L7_error)
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":308
+ * elif expr.__class__ is EXPR.LinearExpression:
+ * if compute_values:
+ * C_ = EXPR.evaluate_expression(expr.constant) # <<<<<<<<<<<<<<
+ * else:
+ * C_ = expr.constant
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_evaluate_expression); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 308, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 308, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 308, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 308, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_v_C_ = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":307
+ * #
+ * elif expr.__class__ is EXPR.LinearExpression:
+ * if compute_values: # <<<<<<<<<<<<<<
+ * C_ = EXPR.evaluate_expression(expr.constant)
+ * else:
+ */
+ goto __pyx_L21;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":310
+ * C_ = EXPR.evaluate_expression(expr.constant)
+ * else:
+ * C_ = expr.constant # <<<<<<<<<<<<<<
+ * if compute_values:
+ * v_ = []
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 310, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_C_ = __pyx_t_1;
+ __pyx_t_1 = 0;
+ }
+ __pyx_L21:;
+
+ /* "pyomo/repn/standard_repn.pyx":311
+ * else:
+ * C_ = expr.constant
+ * if compute_values: # <<<<<<<<<<<<<<
+ * v_ = []
+ * c_ = []
+ */
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 311, __pyx_L7_error)
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":312
+ * C_ = expr.constant
+ * if compute_values:
+ * v_ = [] # <<<<<<<<<<<<<<
+ * c_ = []
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 312, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_v_ = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":313
+ * if compute_values:
+ * v_ = []
+ * c_ = [] # <<<<<<<<<<<<<<
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ * if v.fixed:
+ */
+ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 313, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_c_ = ((PyObject*)__pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":314
+ * v_ = []
+ * c_ = []
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars): # <<<<<<<<<<<<<<
+ * if v.fixed:
+ * if c.__class__ in native_numeric_types:
+ */
+ __pyx_t_12 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 314, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_12)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_3, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_12, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_14 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 314, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_14, 0+__pyx_t_11, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_14, 1+__pyx_t_11, __pyx_t_2);
+ __pyx_t_3 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_12, __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_12 = __pyx_t_1; __Pyx_INCREF(__pyx_t_12); __pyx_t_15 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_15 = -1; __pyx_t_12 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 314, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_16 = Py_TYPE(__pyx_t_12)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 314, __pyx_L7_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_12))) {
+ if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_12)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_12, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 314, __pyx_L7_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_12, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_12)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_12, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 314, __pyx_L7_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_12, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 314, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_16(__pyx_t_12);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 314, __pyx_L7_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 314, __pyx_L7_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_14 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_14 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_14);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_14 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 314, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 314, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 314, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_17 = Py_TYPE(__pyx_t_3)->tp_iternext;
+ index = 0; __pyx_t_14 = __pyx_t_17(__pyx_t_3); if (unlikely(!__pyx_t_14)) goto __pyx_L25_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_14);
+ index = 1; __pyx_t_2 = __pyx_t_17(__pyx_t_3); if (unlikely(!__pyx_t_2)) goto __pyx_L25_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_3), 2) < 0) __PYX_ERR(0, 314, __pyx_L7_error)
+ __pyx_t_17 = NULL;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ goto __pyx_L26_unpacking_done;
+ __pyx_L25_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_17 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 314, __pyx_L7_error)
+ __pyx_L26_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_14);
+ __pyx_t_14 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":315
+ * c_ = []
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ * if v.fixed: # <<<<<<<<<<<<<<
+ * if c.__class__ in native_numeric_types:
+ * C_ += c*v.value
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_fixed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 315, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":316
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ * if v.fixed:
+ * if c.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * C_ += c*v.value
+ * elif c.is_expression_type():
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 316, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 316, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 316, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_9 = (__pyx_t_10 != 0);
+ if (__pyx_t_9) {
+
+ /* "pyomo/repn/standard_repn.pyx":317
+ * if v.fixed:
+ * if c.__class__ in native_numeric_types:
+ * C_ += c*v.value # <<<<<<<<<<<<<<
+ * elif c.is_expression_type():
+ * C_ += EXPR.evaluate_expression(c)*v.value
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_c, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_v_C_, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 317, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_C_, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":316
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ * if v.fixed:
+ * if c.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * C_ += c*v.value
+ * elif c.is_expression_type():
+ */
+ goto __pyx_L28;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":318
+ * if c.__class__ in native_numeric_types:
+ * C_ += c*v.value
+ * elif c.is_expression_type(): # <<<<<<<<<<<<<<
+ * C_ += EXPR.evaluate_expression(c)*v.value
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 318, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_14 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_14)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_14);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_14) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_14); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 318, __pyx_L7_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 318, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_9) {
+
+ /* "pyomo/repn/standard_repn.pyx":319
+ * C_ += c*v.value
+ * elif c.is_expression_type():
+ * C_ += EXPR.evaluate_expression(c)*v.value # <<<<<<<<<<<<<<
+ * else:
+ * C_ += value(c)*v.value
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 319, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_evaluate_expression); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 319, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_14);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_14, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_c); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_c};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_c};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_INCREF(__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_c);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 319, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_value); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 319, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_t_2, __pyx_t_14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 319, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __pyx_t_14 = PyNumber_InPlaceAdd(__pyx_v_C_, __pyx_t_3); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 319, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF_SET(__pyx_v_C_, __pyx_t_14);
+ __pyx_t_14 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":318
+ * if c.__class__ in native_numeric_types:
+ * C_ += c*v.value
+ * elif c.is_expression_type(): # <<<<<<<<<<<<<<
+ * C_ += EXPR.evaluate_expression(c)*v.value
+ * else:
+ */
+ goto __pyx_L28;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":321
+ * C_ += EXPR.evaluate_expression(c)*v.value
+ * else:
+ * C_ += value(c)*v.value # <<<<<<<<<<<<<<
+ * else:
+ * if c.__class__ in native_numeric_types:
+ */
+ /*else*/ {
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_14 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_c); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 321, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_c};
+ __pyx_t_14 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 321, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_14);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_c};
+ __pyx_t_14 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 321, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_14);
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_v_c);
+ __pyx_t_14 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 321, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = PyNumber_Multiply(__pyx_t_14, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 321, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_C_, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 321, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF_SET(__pyx_v_C_, __pyx_t_3);
+ __pyx_t_3 = 0;
+ }
+ __pyx_L28:;
+
+ /* "pyomo/repn/standard_repn.pyx":315
+ * c_ = []
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ * if v.fixed: # <<<<<<<<<<<<<<
+ * if c.__class__ in native_numeric_types:
+ * C_ += c*v.value
+ */
+ goto __pyx_L27;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":323
+ * C_ += value(c)*v.value
+ * else:
+ * if c.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * c_.append( c )
+ * elif c.is_expression_type():
+ */
+ /*else*/ {
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_class); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 323, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 323, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = (__Pyx_PySequence_ContainsTF(__pyx_t_3, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 323, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_10 = (__pyx_t_9 != 0);
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":324
+ * else:
+ * if c.__class__ in native_numeric_types:
+ * c_.append( c ) # <<<<<<<<<<<<<<
+ * elif c.is_expression_type():
+ * c_.append( EXPR.evaluate_expression(c) )
+ */
+ __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_c_, __pyx_v_c); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 324, __pyx_L7_error)
+
+ /* "pyomo/repn/standard_repn.pyx":323
+ * C_ += value(c)*v.value
+ * else:
+ * if c.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * c_.append( c )
+ * elif c.is_expression_type():
+ */
+ goto __pyx_L29;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":325
+ * if c.__class__ in native_numeric_types:
+ * c_.append( c )
+ * elif c.is_expression_type(): # <<<<<<<<<<<<<<
+ * c_.append( EXPR.evaluate_expression(c) )
+ * else:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 325, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_14 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_14)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_14);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (__pyx_t_14) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 325, __pyx_L7_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 325, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":326
+ * c_.append( c )
+ * elif c.is_expression_type():
+ * c_.append( EXPR.evaluate_expression(c) ) # <<<<<<<<<<<<<<
+ * else:
+ * c_.append( value(c) )
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 326, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_evaluate_expression); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 326, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_14);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_14, function);
+ }
+ }
+ if (!__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_c); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_c};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_3, __pyx_v_c};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 326, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ __Pyx_INCREF(__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_v_c);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 326, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_c_, __pyx_t_1); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 326, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":325
+ * if c.__class__ in native_numeric_types:
+ * c_.append( c )
+ * elif c.is_expression_type(): # <<<<<<<<<<<<<<
+ * c_.append( EXPR.evaluate_expression(c) )
+ * else:
+ */
+ goto __pyx_L29;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":328
+ * c_.append( EXPR.evaluate_expression(c) )
+ * else:
+ * c_.append( value(c) ) # <<<<<<<<<<<<<<
+ * v_.append( v )
+ * repn.linear_coefs = tuple(c_)
+ */
+ /*else*/ {
+ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 328, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_14))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_14);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_14, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_v_c); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_c};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_v_c};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 328, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_INCREF(__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+1, __pyx_v_c);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 328, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_c_, __pyx_t_1); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 328, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __pyx_L29:;
+
+ /* "pyomo/repn/standard_repn.pyx":329
+ * else:
+ * c_.append( value(c) )
+ * v_.append( v ) # <<<<<<<<<<<<<<
+ * repn.linear_coefs = tuple(c_)
+ * repn.linear_vars = tuple(v_)
+ */
+ __pyx_t_18 = __Pyx_PyList_Append(__pyx_v_v_, __pyx_v_v); if (unlikely(__pyx_t_18 == ((int)-1))) __PYX_ERR(0, 329, __pyx_L7_error)
+ }
+ __pyx_L27:;
+
+ /* "pyomo/repn/standard_repn.pyx":314
+ * v_ = []
+ * c_ = []
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars): # <<<<<<<<<<<<<<
+ * if v.fixed:
+ * if c.__class__ in native_numeric_types:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":330
+ * c_.append( value(c) )
+ * v_.append( v )
+ * repn.linear_coefs = tuple(c_) # <<<<<<<<<<<<<<
+ * repn.linear_vars = tuple(v_)
+ * else:
+ */
+ __pyx_t_12 = PyList_AsTuple(__pyx_v_c_); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 330, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_linear_coefs, __pyx_t_12) < 0) __PYX_ERR(0, 330, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":331
+ * v_.append( v )
+ * repn.linear_coefs = tuple(c_)
+ * repn.linear_vars = tuple(v_) # <<<<<<<<<<<<<<
+ * else:
+ * linear_coefs = {}
+ */
+ __pyx_t_12 = PyList_AsTuple(__pyx_v_v_); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 331, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_linear_vars, __pyx_t_12) < 0) __PYX_ERR(0, 331, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":311
+ * else:
+ * C_ = expr.constant
+ * if compute_values: # <<<<<<<<<<<<<<
+ * v_ = []
+ * c_ = []
+ */
+ goto __pyx_L22;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":333
+ * repn.linear_vars = tuple(v_)
+ * else:
+ * linear_coefs = {} # <<<<<<<<<<<<<<
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ * if v.fixed:
+ */
+ /*else*/ {
+ __pyx_t_12 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 333, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_12);
+ __pyx_cur_scope->__pyx_v_linear_coefs = ((PyObject*)__pyx_t_12);
+ __pyx_t_12 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":334
+ * else:
+ * linear_coefs = {}
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars): # <<<<<<<<<<<<<<
+ * if v.fixed:
+ * C_ += c*v
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 334, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 334, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = NULL;
+ __pyx_t_11 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_11 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_14, __pyx_t_3};
+ __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 334, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_14, __pyx_t_3};
+ __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_11, 2+__pyx_t_11); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 334, __pyx_L7_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(2+__pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 334, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (__pyx_t_2) {
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+__pyx_t_11, __pyx_t_14);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_4, 1+__pyx_t_11, __pyx_t_3);
+ __pyx_t_14 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_4, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 334, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_12)) || PyTuple_CheckExact(__pyx_t_12)) {
+ __pyx_t_1 = __pyx_t_12; __Pyx_INCREF(__pyx_t_1); __pyx_t_15 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_15 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 334, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_16 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 334, __pyx_L7_error)
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_12 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 334, __pyx_L7_error)
+ #else
+ __pyx_t_12 = PySequence_ITEM(__pyx_t_1, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 334, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ #endif
+ } else {
+ if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_12 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_15); __Pyx_INCREF(__pyx_t_12); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 334, __pyx_L7_error)
+ #else
+ __pyx_t_12 = PySequence_ITEM(__pyx_t_1, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 334, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ #endif
+ }
+ } else {
+ __pyx_t_12 = __pyx_t_16(__pyx_t_1);
+ if (unlikely(!__pyx_t_12)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 334, __pyx_L7_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_12);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_12))) || (PyList_CheckExact(__pyx_t_12))) {
+ PyObject* sequence = __pyx_t_12;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 334, __pyx_L7_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_4 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_3);
+ #else
+ __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 334, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 334, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_14 = PyObject_GetIter(__pyx_t_12); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 334, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_17 = Py_TYPE(__pyx_t_14)->tp_iternext;
+ index = 0; __pyx_t_4 = __pyx_t_17(__pyx_t_14); if (unlikely(!__pyx_t_4)) goto __pyx_L32_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_4);
+ index = 1; __pyx_t_3 = __pyx_t_17(__pyx_t_14); if (unlikely(!__pyx_t_3)) goto __pyx_L32_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_17(__pyx_t_14), 2) < 0) __PYX_ERR(0, 334, __pyx_L7_error)
+ __pyx_t_17 = NULL;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ goto __pyx_L33_unpacking_done;
+ __pyx_L32_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __pyx_t_17 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 334, __pyx_L7_error)
+ __pyx_L33_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":335
+ * linear_coefs = {}
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ * if v.fixed: # <<<<<<<<<<<<<<
+ * C_ += c*v
+ * else:
+ */
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_fixed); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 335, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_12); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 335, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":336
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ * if v.fixed:
+ * C_ += c*v # <<<<<<<<<<<<<<
+ * else:
+ * id_ = id(v)
+ */
+ __pyx_t_12 = PyNumber_Multiply(__pyx_v_c, __pyx_v_v); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 336, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_C_, __pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 336, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF_SET(__pyx_v_C_, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":335
+ * linear_coefs = {}
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ * if v.fixed: # <<<<<<<<<<<<<<
+ * C_ += c*v
+ * else:
+ */
+ goto __pyx_L34;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":338
+ * C_ += c*v
+ * else:
+ * id_ = id(v) # <<<<<<<<<<<<<<
+ * if not id_ in idMap[None]:
+ * key = len(idMap) - 1
+ */
+ /*else*/ {
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 338, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_v);
+ __Pyx_GIVEREF(__pyx_v_v);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_v);
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_3, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 338, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_id_, __pyx_t_12);
+ __pyx_t_12 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":339
+ * else:
+ * id_ = id(v)
+ * if not id_ in idMap[None]: # <<<<<<<<<<<<<<
+ * key = len(idMap) - 1
+ * idMap[None][id_] = key
+ */
+ __pyx_t_12 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_idMap, Py_None); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 339, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_id_, __pyx_t_12, Py_NE)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 339, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_9 = (__pyx_t_10 != 0);
+ if (__pyx_t_9) {
+
+ /* "pyomo/repn/standard_repn.pyx":340
+ * id_ = id(v)
+ * if not id_ in idMap[None]:
+ * key = len(idMap) - 1 # <<<<<<<<<<<<<<
+ * idMap[None][id_] = key
+ * idMap[key] = v
+ */
+ __pyx_t_12 = __pyx_cur_scope->__pyx_v_idMap;
+ __Pyx_INCREF(__pyx_t_12);
+ __pyx_t_19 = PyObject_Length(__pyx_t_12); if (unlikely(__pyx_t_19 == ((Py_ssize_t)-1))) __PYX_ERR(0, 340, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = PyInt_FromSsize_t((__pyx_t_19 - 1)); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 340, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_12);
+ __pyx_t_12 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":341
+ * if not id_ in idMap[None]:
+ * key = len(idMap) - 1
+ * idMap[None][id_] = key # <<<<<<<<<<<<<<
+ * idMap[key] = v
+ * else:
+ */
+ __pyx_t_12 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_idMap, Py_None); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 341, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (unlikely(PyObject_SetItem(__pyx_t_12, __pyx_v_id_, __pyx_v_key) < 0)) __PYX_ERR(0, 341, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":342
+ * key = len(idMap) - 1
+ * idMap[None][id_] = key
+ * idMap[key] = v # <<<<<<<<<<<<<<
+ * else:
+ * key = idMap[None][id_]
+ */
+ if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_idMap, __pyx_v_key, __pyx_v_v) < 0)) __PYX_ERR(0, 342, __pyx_L7_error)
+
+ /* "pyomo/repn/standard_repn.pyx":339
+ * else:
+ * id_ = id(v)
+ * if not id_ in idMap[None]: # <<<<<<<<<<<<<<
+ * key = len(idMap) - 1
+ * idMap[None][id_] = key
+ */
+ goto __pyx_L35;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":344
+ * idMap[key] = v
+ * else:
+ * key = idMap[None][id_] # <<<<<<<<<<<<<<
+ * if key in linear_coefs:
+ * linear_coefs[key] += c
+ */
+ /*else*/ {
+ __pyx_t_12 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_idMap, Py_None); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 344, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_12, __pyx_v_id_); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 344, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_3);
+ __pyx_t_3 = 0;
+ }
+ __pyx_L35:;
+
+ /* "pyomo/repn/standard_repn.pyx":345
+ * else:
+ * key = idMap[None][id_]
+ * if key in linear_coefs: # <<<<<<<<<<<<<<
+ * linear_coefs[key] += c
+ * else:
+ */
+ __pyx_t_9 = (__Pyx_PyDict_ContainsTF(__pyx_v_key, __pyx_cur_scope->__pyx_v_linear_coefs, Py_EQ)); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 345, __pyx_L7_error)
+ __pyx_t_10 = (__pyx_t_9 != 0);
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":346
+ * key = idMap[None][id_]
+ * if key in linear_coefs:
+ * linear_coefs[key] += c # <<<<<<<<<<<<<<
+ * else:
+ * linear_coefs[key] = c
+ */
+ __Pyx_INCREF(__pyx_v_key);
+ __pyx_t_3 = __pyx_v_key;
+ __pyx_t_12 = __Pyx_PyDict_GetItem(__pyx_cur_scope->__pyx_v_linear_coefs, __pyx_t_3); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 346, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_12, __pyx_v_c); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 346, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_linear_coefs, __pyx_t_3, __pyx_t_4) < 0)) __PYX_ERR(0, 346, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":345
+ * else:
+ * key = idMap[None][id_]
+ * if key in linear_coefs: # <<<<<<<<<<<<<<
+ * linear_coefs[key] += c
+ * else:
+ */
+ goto __pyx_L36;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":348
+ * linear_coefs[key] += c
+ * else:
+ * linear_coefs[key] = c # <<<<<<<<<<<<<<
+ * keys = list(linear_coefs.keys())
+ * repn.linear_vars = tuple(idMap[key] for key in keys)
+ */
+ /*else*/ {
+ if (unlikely(PyDict_SetItem(__pyx_cur_scope->__pyx_v_linear_coefs, __pyx_v_key, __pyx_v_c) < 0)) __PYX_ERR(0, 348, __pyx_L7_error)
+ }
+ __pyx_L36:;
+ }
+ __pyx_L34:;
+
+ /* "pyomo/repn/standard_repn.pyx":334
+ * else:
+ * linear_coefs = {}
+ * for c,v in zip(expr.linear_coefs, expr.linear_vars): # <<<<<<<<<<<<<<
+ * if v.fixed:
+ * C_ += c*v
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":349
+ * else:
+ * linear_coefs[key] = c
+ * keys = list(linear_coefs.keys()) # <<<<<<<<<<<<<<
+ * repn.linear_vars = tuple(idMap[key] for key in keys)
+ * repn.linear_coefs = tuple(linear_coefs[key] for key in keys)
+ */
+ __pyx_t_1 = __Pyx_PyDict_Keys(__pyx_cur_scope->__pyx_v_linear_coefs); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 349, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PySequence_List(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 349, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_v_keys = ((PyObject*)__pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":350
+ * linear_coefs[key] = c
+ * keys = list(linear_coefs.keys())
+ * repn.linear_vars = tuple(idMap[key] for key in keys) # <<<<<<<<<<<<<<
+ * repn.linear_coefs = tuple(linear_coefs[key] for key in keys)
+ * repn.constant = C_
+ */
+ __pyx_t_3 = __pyx_pf_5pyomo_4repn_13standard_repn_22generate_standard_repn_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 350, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 350, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_linear_vars, __pyx_t_1) < 0) __PYX_ERR(0, 350, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":351
+ * keys = list(linear_coefs.keys())
+ * repn.linear_vars = tuple(idMap[key] for key in keys)
+ * repn.linear_coefs = tuple(linear_coefs[key] for key in keys) # <<<<<<<<<<<<<<
+ * repn.constant = C_
+ * return repn
+ */
+ __pyx_t_1 = __pyx_pf_5pyomo_4repn_13standard_repn_22generate_standard_repn_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 351, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PySequence_Tuple(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 351, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_linear_coefs, __pyx_t_3) < 0) __PYX_ERR(0, 351, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __pyx_L22:;
+
+ /* "pyomo/repn/standard_repn.pyx":352
+ * repn.linear_vars = tuple(idMap[key] for key in keys)
+ * repn.linear_coefs = tuple(linear_coefs[key] for key in keys)
+ * repn.constant = C_ # <<<<<<<<<<<<<<
+ * return repn
+ *
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_constant, __pyx_v_C_) < 0) __PYX_ERR(0, 352, __pyx_L7_error)
+
+ /* "pyomo/repn/standard_repn.pyx":353
+ * repn.linear_coefs = tuple(linear_coefs[key] for key in keys)
+ * repn.constant = C_
+ * return repn # <<<<<<<<<<<<<<
+ *
+ * #
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_repn);
+ __pyx_r = __pyx_v_repn;
+ goto __pyx_L11_try_return;
+
+ /* "pyomo/repn/standard_repn.pyx":306
+ * # The expression is linear
+ * #
+ * elif expr.__class__ is EXPR.LinearExpression: # <<<<<<<<<<<<<<
+ * if compute_values:
+ * C_ = EXPR.evaluate_expression(expr.constant)
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":358
+ * # Unknown expression object
+ * #
+ * elif not expr.is_expression_type(): # <<<<<<<<<<<<<<
+ * raise ValueError("Unexpected expression type: "+str(expr))
+ *
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_expr, __pyx_n_s_is_expression_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_4) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 358, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 358, __pyx_L7_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 358, __pyx_L7_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_9 = ((!__pyx_t_10) != 0);
+ if (__pyx_t_9) {
+
+ /* "pyomo/repn/standard_repn.pyx":359
+ * #
+ * elif not expr.is_expression_type():
+ * raise ValueError("Unexpected expression type: "+str(expr)) # <<<<<<<<<<<<<<
+ *
+ * return _generate_standard_repn(expr,
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_expr);
+ __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Add(__pyx_kp_s_Unexpected_expression_type, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 359, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 359, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(0, 359, __pyx_L7_error)
+
+ /* "pyomo/repn/standard_repn.pyx":358
+ * # Unknown expression object
+ * #
+ * elif not expr.is_expression_type(): # <<<<<<<<<<<<<<
+ * raise ValueError("Unexpected expression type: "+str(expr))
+ *
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":361
+ * raise ValueError("Unexpected expression type: "+str(expr))
+ *
+ * return _generate_standard_repn(expr, # <<<<<<<<<<<<<<
+ * idMap=idMap,
+ * compute_values=compute_values,
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_standard_repn_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 361, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 361, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_expr);
+
+ /* "pyomo/repn/standard_repn.pyx":362
+ *
+ * return _generate_standard_repn(expr,
+ * idMap=idMap, # <<<<<<<<<<<<<<
+ * compute_values=compute_values,
+ * verbose=verbose,
+ */
+ __pyx_t_4 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 362, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_idMap, __pyx_cur_scope->__pyx_v_idMap) < 0) __PYX_ERR(0, 362, __pyx_L7_error)
+
+ /* "pyomo/repn/standard_repn.pyx":363
+ * return _generate_standard_repn(expr,
+ * idMap=idMap,
+ * compute_values=compute_values, # <<<<<<<<<<<<<<
+ * verbose=verbose,
+ * quadratic=quadratic,
+ */
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_compute_values, __pyx_v_compute_values) < 0) __PYX_ERR(0, 362, __pyx_L7_error)
+
+ /* "pyomo/repn/standard_repn.pyx":364
+ * idMap=idMap,
+ * compute_values=compute_values,
+ * verbose=verbose, # <<<<<<<<<<<<<<
+ * quadratic=quadratic,
+ * repn=repn)
+ */
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_verbose, __pyx_v_verbose) < 0) __PYX_ERR(0, 362, __pyx_L7_error)
+
+ /* "pyomo/repn/standard_repn.pyx":365
+ * compute_values=compute_values,
+ * verbose=verbose,
+ * quadratic=quadratic, # <<<<<<<<<<<<<<
+ * repn=repn)
+ *
+ */
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_quadratic, __pyx_v_quadratic) < 0) __PYX_ERR(0, 362, __pyx_L7_error)
+
+ /* "pyomo/repn/standard_repn.pyx":366
+ * verbose=verbose,
+ * quadratic=quadratic,
+ * repn=repn) # <<<<<<<<<<<<<<
+ *
+ * class Results(object):
+ */
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_repn, __pyx_v_repn) < 0) __PYX_ERR(0, 362, __pyx_L7_error)
+
+ /* "pyomo/repn/standard_repn.pyx":361
+ * raise ValueError("Unexpected expression type: "+str(expr))
+ *
+ * return _generate_standard_repn(expr, # <<<<<<<<<<<<<<
+ * idMap=idMap,
+ * compute_values=compute_values,
+ */
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 361, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_r = __pyx_t_12;
+ __pyx_t_12 = 0;
+ goto __pyx_L11_try_return;
+
+ /* "pyomo/repn/standard_repn.pyx":271
+ * # Use a custom isclose function
+ * #
+ * with isclose_context(compute_values): # <<<<<<<<<<<<<<
+ * #
+ * # Setup
+ */
+ }
+ __pyx_L7_error:;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ /*except:*/ {
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.generate_standard_repn", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_4, &__pyx_t_1) < 0) __PYX_ERR(0, 271, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = PyTuple_Pack(3, __pyx_t_12, __pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 271, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_20 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, NULL);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (unlikely(!__pyx_t_20)) __PYX_ERR(0, 271, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_20);
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_20);
+ __Pyx_DECREF(__pyx_t_20); __pyx_t_20 = 0;
+ if (__pyx_t_9 < 0) __PYX_ERR(0, 271, __pyx_L9_except_error)
+ __pyx_t_10 = ((!(__pyx_t_9 != 0)) != 0);
+ if (__pyx_t_10) {
+ __Pyx_GIVEREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_4);
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_ErrRestoreWithState(__pyx_t_12, __pyx_t_4, __pyx_t_1);
+ __pyx_t_12 = 0; __pyx_t_4 = 0; __pyx_t_1 = 0;
+ __PYX_ERR(0, 271, __pyx_L9_except_error)
+ }
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L8_exception_handled;
+ }
+ __pyx_L9_except_error:;
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+ goto __pyx_L1_error;
+ __pyx_L11_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+ goto __pyx_L4_return;
+ __pyx_L8_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+ }
+ }
+ /*finally:*/ {
+ /*normal exit:*/{
+ if (__pyx_t_5) {
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__9, NULL);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ goto __pyx_L6;
+ }
+ __pyx_L4_return: {
+ __pyx_t_8 = __pyx_r;
+ __pyx_r = 0;
+ if (__pyx_t_5) {
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__10, NULL);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L0;
+ }
+ __pyx_L6:;
+ }
+ goto __pyx_L40;
+ __pyx_L3_error:;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L1_error;
+ __pyx_L40:;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":267
+ * """
+ * #@profile
+ * def generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None): # <<<<<<<<<<<<<<
+ * #
+ * # Use a custom isclose function
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.generate_standard_repn", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_C_);
+ __Pyx_XDECREF(__pyx_v_v_);
+ __Pyx_XDECREF(__pyx_v_c_);
+ __Pyx_XDECREF(__pyx_v_c);
+ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XDECREF(__pyx_v_id_);
+ __Pyx_XDECREF(__pyx_v_key);
+ __Pyx_XDECREF(__pyx_v_repn);
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":371
+ * __slot__ = ('const', 'nonl', 'linear', 'quadratic')
+ *
+ * def __init__(self, constant=0, nonl=0, linear=None, quadratic=None): # <<<<<<<<<<<<<<
+ * self.constant = constant
+ * self.nonl = nonl
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_7Results_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_7Results_1__init__ = {"__init__", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_7Results_1__init__, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_7Results_1__init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_self = 0;
+ PyObject *__pyx_v_constant = 0;
+ PyObject *__pyx_v_nonl = 0;
+ PyObject *__pyx_v_linear = 0;
+ PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_constant,&__pyx_n_s_nonl,&__pyx_n_s_linear,&__pyx_n_s_quadratic,0};
+ PyObject* values[5] = {0,0,0,0,0};
+ values[1] = ((PyObject *)((PyObject *)__pyx_int_0));
+ values[2] = ((PyObject *)((PyObject *)__pyx_int_0));
+ values[3] = ((PyObject *)((PyObject *)Py_None));
+ values[4] = ((PyObject *)((PyObject *)Py_None));
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_self)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_constant);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nonl);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_linear);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic);
+ if (value) { values[4] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) __PYX_ERR(0, 371, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_self = values[0];
+ __pyx_v_constant = values[1];
+ __pyx_v_nonl = values[2];
+ __pyx_v_linear = values[3];
+ __pyx_v_quadratic = values[4];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 5, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 371, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.Results.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_7Results___init__(__pyx_self, __pyx_v_self, __pyx_v_constant, __pyx_v_nonl, __pyx_v_linear, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_7Results___init__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self, PyObject *__pyx_v_constant, PyObject *__pyx_v_nonl, PyObject *__pyx_v_linear, PyObject *__pyx_v_quadratic) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("__init__", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":372
+ *
+ * def __init__(self, constant=0, nonl=0, linear=None, quadratic=None):
+ * self.constant = constant # <<<<<<<<<<<<<<
+ * self.nonl = nonl
+ * if linear is None:
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_constant, __pyx_v_constant) < 0) __PYX_ERR(0, 372, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":373
+ * def __init__(self, constant=0, nonl=0, linear=None, quadratic=None):
+ * self.constant = constant
+ * self.nonl = nonl # <<<<<<<<<<<<<<
+ * if linear is None:
+ * self.linear = {}
+ */
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_nonl, __pyx_v_nonl) < 0) __PYX_ERR(0, 373, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":374
+ * self.constant = constant
+ * self.nonl = nonl
+ * if linear is None: # <<<<<<<<<<<<<<
+ * self.linear = {}
+ * else:
+ */
+ __pyx_t_1 = (__pyx_v_linear == Py_None);
+ __pyx_t_2 = (__pyx_t_1 != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/repn/standard_repn.pyx":375
+ * self.nonl = nonl
+ * if linear is None:
+ * self.linear = {} # <<<<<<<<<<<<<<
+ * else:
+ * self.linear = linear
+ */
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_linear, __pyx_t_3) < 0) __PYX_ERR(0, 375, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":374
+ * self.constant = constant
+ * self.nonl = nonl
+ * if linear is None: # <<<<<<<<<<<<<<
+ * self.linear = {}
+ * else:
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":377
+ * self.linear = {}
+ * else:
+ * self.linear = linear # <<<<<<<<<<<<<<
+ * if quadratic is None:
+ * self.quadratic = {}
+ */
+ /*else*/ {
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_linear, __pyx_v_linear) < 0) __PYX_ERR(0, 377, __pyx_L1_error)
+ }
+ __pyx_L3:;
+
+ /* "pyomo/repn/standard_repn.pyx":378
+ * else:
+ * self.linear = linear
+ * if quadratic is None: # <<<<<<<<<<<<<<
+ * self.quadratic = {}
+ * else:
+ */
+ __pyx_t_2 = (__pyx_v_quadratic == Py_None);
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "pyomo/repn/standard_repn.pyx":379
+ * self.linear = linear
+ * if quadratic is None:
+ * self.quadratic = {} # <<<<<<<<<<<<<<
+ * else:
+ * self.quadratic = quadratic
+ */
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 379, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_quadratic, __pyx_t_3) < 0) __PYX_ERR(0, 379, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":378
+ * else:
+ * self.linear = linear
+ * if quadratic is None: # <<<<<<<<<<<<<<
+ * self.quadratic = {}
+ * else:
+ */
+ goto __pyx_L4;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":381
+ * self.quadratic = {}
+ * else:
+ * self.quadratic = quadratic # <<<<<<<<<<<<<<
+ *
+ * def __str__(self):
+ */
+ /*else*/ {
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_quadratic, __pyx_v_quadratic) < 0) __PYX_ERR(0, 381, __pyx_L1_error)
+ }
+ __pyx_L4:;
+
+ /* "pyomo/repn/standard_repn.pyx":371
+ * __slot__ = ('const', 'nonl', 'linear', 'quadratic')
+ *
+ * def __init__(self, constant=0, nonl=0, linear=None, quadratic=None): # <<<<<<<<<<<<<<
+ * self.constant = constant
+ * self.nonl = nonl
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.Results.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":383
+ * self.quadratic = quadratic
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return "Const:\t%f\nLinear:\t%s\nQuadratic:\t%s\nNonlinear:\t%s" % (self.constant, str(self.linear), str(self.quadratic), str(self.nonl))
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_7Results_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_7Results_3__str__ = {"__str__", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_7Results_3__str__, METH_O, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_7Results_3__str__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_7Results_2__str__(__pyx_self, ((PyObject *)__pyx_v_self));
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_7Results_2__str__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannySetupContext("__str__", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":384
+ *
+ * def __str__(self):
+ * return "Const:\t%f\nLinear:\t%s\nQuadratic:\t%s\nNonlinear:\t%s" % (self.constant, str(self.linear), str(self.quadratic), str(self.nonl)) # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_linear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_nonl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_4);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Const_f_Linear_s_Quadratic_s_Non, __pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 384, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":383
+ * self.quadratic = quadratic
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return "Const:\t%f\nLinear:\t%s\nQuadratic:\t%s\nNonlinear:\t%s" % (self.constant, str(self.linear), str(self.quadratic), str(self.nonl))
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.Results.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":388
+ *
+ * #@profile
+ * def _collect_sum(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ * varkeys = idMap[None]
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_5_collect_sum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_5_collect_sum = {"_collect_sum", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_5_collect_sum, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_5_collect_sum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_collect_sum (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_multiplier,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_sum", 1, 6, 6, 1); __PYX_ERR(0, 388, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_sum", 1, 6, 6, 2); __PYX_ERR(0, 388, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_sum", 1, 6, 6, 3); __PYX_ERR(0, 388, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_sum", 1, 6, 6, 4); __PYX_ERR(0, 388, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_sum", 1, 6, 6, 5); __PYX_ERR(0, 388, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_collect_sum") < 0)) __PYX_ERR(0, 388, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_multiplier = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_compute_values = values[3];
+ __pyx_v_verbose = values[4];
+ __pyx_v_quadratic = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_collect_sum", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 388, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_4_collect_sum(__pyx_self, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_4_collect_sum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic) {
+ PyObject *__pyx_v_ans = NULL;
+ PyObject *__pyx_v_varkeys = NULL;
+ PyObject *__pyx_v_e_ = NULL;
+ PyObject *__pyx_v_id_ = NULL;
+ PyObject *__pyx_v_key = NULL;
+ PyObject *__pyx_v_lhs = NULL;
+ PyObject *__pyx_v_res_ = NULL;
+ PyObject *__pyx_v_i = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ Py_ssize_t __pyx_t_8;
+ PyObject *(*__pyx_t_9)(PyObject *);
+ int __pyx_t_10;
+ int __pyx_t_11;
+ Py_ssize_t __pyx_t_12;
+ int __pyx_t_13;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *(*__pyx_t_16)(PyObject *);
+ __Pyx_RefNannySetupContext("_collect_sum", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":389
+ * #@profile
+ * def _collect_sum(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * ans = Results() # <<<<<<<<<<<<<<
+ * varkeys = idMap[None]
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 389, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_ans = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":390
+ * def _collect_sum(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * ans = Results()
+ * varkeys = idMap[None] # <<<<<<<<<<<<<<
+ *
+ * for e_ in itertools.islice(exp._args_, exp.nargs()):
+ */
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_idMap, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 390, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_varkeys = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":392
+ * varkeys = idMap[None]
+ *
+ * for e_ in itertools.islice(exp._args_, exp.nargs()): # <<<<<<<<<<<<<<
+ * if e_.__class__ in native_numeric_types:
+ * ans.constant += multiplier*e_
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_itertools); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_islice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_nargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 392, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 392, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_4);
+ __pyx_t_2 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0;
+ __pyx_t_9 = NULL;
+ } else {
+ __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 392, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_9)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 392, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 392, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_9(__pyx_t_3);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 392, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_e_, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":393
+ *
+ * for e_ in itertools.islice(exp._args_, exp.nargs()):
+ * if e_.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier*e_
+ * elif e_.is_variable_type():
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 393, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 393, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 393, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_11 = (__pyx_t_10 != 0);
+ if (__pyx_t_11) {
+
+ /* "pyomo/repn/standard_repn.pyx":394
+ * for e_ in itertools.islice(exp._args_, exp.nargs()):
+ * if e_.__class__ in native_numeric_types:
+ * ans.constant += multiplier*e_ # <<<<<<<<<<<<<<
+ * elif e_.is_variable_type():
+ * if e_.fixed:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_e_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 394, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_4) < 0) __PYX_ERR(0, 394, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":393
+ *
+ * for e_ in itertools.islice(exp._args_, exp.nargs()):
+ * if e_.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier*e_
+ * elif e_.is_variable_type():
+ */
+ goto __pyx_L5;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":395
+ * if e_.__class__ in native_numeric_types:
+ * ans.constant += multiplier*e_
+ * elif e_.is_variable_type(): # <<<<<<<<<<<<<<
+ * if e_.fixed:
+ * if compute_values:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_is_variable_type); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 395, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 395, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_11) {
+
+ /* "pyomo/repn/standard_repn.pyx":396
+ * ans.constant += multiplier*e_
+ * elif e_.is_variable_type():
+ * if e_.fixed: # <<<<<<<<<<<<<<
+ * if compute_values:
+ * ans.constant += multiplier*e_.value
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_fixed); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 396, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 396, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_11) {
+
+ /* "pyomo/repn/standard_repn.pyx":397
+ * elif e_.is_variable_type():
+ * if e_.fixed:
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier*e_.value
+ * else:
+ */
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 397, __pyx_L1_error)
+ if (__pyx_t_11) {
+
+ /* "pyomo/repn/standard_repn.pyx":398
+ * if e_.fixed:
+ * if compute_values:
+ * ans.constant += multiplier*e_.value # <<<<<<<<<<<<<<
+ * else:
+ * ans.constant += multiplier*e_
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 398, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 398, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 398, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_1) < 0) __PYX_ERR(0, 398, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":397
+ * elif e_.is_variable_type():
+ * if e_.fixed:
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier*e_.value
+ * else:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":400
+ * ans.constant += multiplier*e_.value
+ * else:
+ * ans.constant += multiplier*e_ # <<<<<<<<<<<<<<
+ * else:
+ * id_ = id(e_)
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 400, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_e_); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 400, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 400, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_4) < 0) __PYX_ERR(0, 400, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ __pyx_L7:;
+
+ /* "pyomo/repn/standard_repn.pyx":396
+ * ans.constant += multiplier*e_
+ * elif e_.is_variable_type():
+ * if e_.fixed: # <<<<<<<<<<<<<<
+ * if compute_values:
+ * ans.constant += multiplier*e_.value
+ */
+ goto __pyx_L6;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":402
+ * ans.constant += multiplier*e_
+ * else:
+ * id_ = id(e_) # <<<<<<<<<<<<<<
+ * if id_ in varkeys:
+ * key = varkeys[id_]
+ */
+ /*else*/ {
+ __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 402, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_INCREF(__pyx_v_e_);
+ __Pyx_GIVEREF(__pyx_v_e_);
+ PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_e_);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 402, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_id_, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":403
+ * else:
+ * id_ = id(e_)
+ * if id_ in varkeys: # <<<<<<<<<<<<<<
+ * key = varkeys[id_]
+ * else:
+ */
+ __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_v_id_, __pyx_v_varkeys, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 403, __pyx_L1_error)
+ __pyx_t_10 = (__pyx_t_11 != 0);
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":404
+ * id_ = id(e_)
+ * if id_ in varkeys:
+ * key = varkeys[id_] # <<<<<<<<<<<<<<
+ * else:
+ * key = len(idMap) - 1
+ */
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_varkeys, __pyx_v_id_); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 404, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":403
+ * else:
+ * id_ = id(e_)
+ * if id_ in varkeys: # <<<<<<<<<<<<<<
+ * key = varkeys[id_]
+ * else:
+ */
+ goto __pyx_L8;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":406
+ * key = varkeys[id_]
+ * else:
+ * key = len(idMap) - 1 # <<<<<<<<<<<<<<
+ * varkeys[id_] = key
+ * idMap[key] = e_
+ */
+ /*else*/ {
+ __pyx_t_12 = PyObject_Length(__pyx_v_idMap); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 406, __pyx_L1_error)
+ __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_12 - 1)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 406, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":407
+ * else:
+ * key = len(idMap) - 1
+ * varkeys[id_] = key # <<<<<<<<<<<<<<
+ * idMap[key] = e_
+ * if key in ans.linear:
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_varkeys, __pyx_v_id_, __pyx_v_key) < 0)) __PYX_ERR(0, 407, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":408
+ * key = len(idMap) - 1
+ * varkeys[id_] = key
+ * idMap[key] = e_ # <<<<<<<<<<<<<<
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_idMap, __pyx_v_key, __pyx_v_e_) < 0)) __PYX_ERR(0, 408, __pyx_L1_error)
+ }
+ __pyx_L8:;
+
+ /* "pyomo/repn/standard_repn.pyx":409
+ * varkeys[id_] = key
+ * idMap[key] = e_
+ * if key in ans.linear: # <<<<<<<<<<<<<<
+ * ans.linear[key] += multiplier
+ * else:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 409, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 409, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_11 = (__pyx_t_10 != 0);
+ if (__pyx_t_11) {
+
+ /* "pyomo/repn/standard_repn.pyx":410
+ * idMap[key] = e_
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier # <<<<<<<<<<<<<<
+ * else:
+ * ans.linear[key] = multiplier
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v_key);
+ __pyx_t_4 = __pyx_v_key;
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_v_multiplier); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_t_4, __pyx_t_2) < 0)) __PYX_ERR(0, 410, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":409
+ * varkeys[id_] = key
+ * idMap[key] = e_
+ * if key in ans.linear: # <<<<<<<<<<<<<<
+ * ans.linear[key] += multiplier
+ * else:
+ */
+ goto __pyx_L9;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":412
+ * ans.linear[key] += multiplier
+ * else:
+ * ans.linear[key] = multiplier # <<<<<<<<<<<<<<
+ * elif not e_.is_potentially_variable():
+ * if compute_values:
+ */
+ /*else*/ {
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 412, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_key, __pyx_v_multiplier) < 0)) __PYX_ERR(0, 412, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __pyx_L9:;
+ }
+ __pyx_L6:;
+
+ /* "pyomo/repn/standard_repn.pyx":395
+ * if e_.__class__ in native_numeric_types:
+ * ans.constant += multiplier*e_
+ * elif e_.is_variable_type(): # <<<<<<<<<<<<<<
+ * if e_.fixed:
+ * if compute_values:
+ */
+ goto __pyx_L5;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":413
+ * else:
+ * ans.linear[key] = multiplier
+ * elif not e_.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * ans.constant += multiplier * value(e_)
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 413, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 413, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 413, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_10 = ((!__pyx_t_11) != 0);
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":414
+ * ans.linear[key] = multiplier
+ * elif not e_.is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier * value(e_)
+ * else:
+ */
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 414, __pyx_L1_error)
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":415
+ * elif not e_.is_potentially_variable():
+ * if compute_values:
+ * ans.constant += multiplier * value(e_) # <<<<<<<<<<<<<<
+ * else:
+ * ans.constant += multiplier * e_
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_e_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_e_};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_e_};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_INCREF(__pyx_v_e_);
+ __Pyx_GIVEREF(__pyx_v_e_);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_e_);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_4) < 0) __PYX_ERR(0, 415, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":414
+ * ans.linear[key] = multiplier
+ * elif not e_.is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier * value(e_)
+ * else:
+ */
+ goto __pyx_L10;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":417
+ * ans.constant += multiplier * value(e_)
+ * else:
+ * ans.constant += multiplier * e_ # <<<<<<<<<<<<<<
+ * elif e_.__class__ is EXPR.ProductExpression and e_._args_[1].is_variable_type() and (e_._args_[0].__class__ in native_numeric_types or not e_._args_[0].is_potentially_variable()):
+ * if compute_values:
+ */
+ /*else*/ {
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 417, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_e_); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 417, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 417, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_6) < 0) __PYX_ERR(0, 417, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __pyx_L10:;
+
+ /* "pyomo/repn/standard_repn.pyx":413
+ * else:
+ * ans.linear[key] = multiplier
+ * elif not e_.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * ans.constant += multiplier * value(e_)
+ */
+ goto __pyx_L5;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":418
+ * else:
+ * ans.constant += multiplier * e_
+ * elif e_.__class__ is EXPR.ProductExpression and e_._args_[1].is_variable_type() and (e_._args_[0].__class__ in native_numeric_types or not e_._args_[0].is_potentially_variable()): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * lhs = value(e_._args_[0])
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_ProductExpression); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_11 = (__pyx_t_6 == __pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_13 = (__pyx_t_11 != 0);
+ if (__pyx_t_13) {
+ } else {
+ __pyx_t_10 = __pyx_t_13;
+ goto __pyx_L11_bool_binop_done;
+ }
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_is_variable_type); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_13 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_13) {
+ } else {
+ __pyx_t_10 = __pyx_t_13;
+ goto __pyx_L11_bool_binop_done;
+ }
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_class); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_t_4, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_11 = (__pyx_t_13 != 0);
+ if (!__pyx_t_11) {
+ } else {
+ __pyx_t_10 = __pyx_t_11;
+ goto __pyx_L11_bool_binop_done;
+ }
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_4, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 418, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 418, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_13 = ((!__pyx_t_11) != 0);
+ __pyx_t_10 = __pyx_t_13;
+ __pyx_L11_bool_binop_done:;
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":419
+ * ans.constant += multiplier * e_
+ * elif e_.__class__ is EXPR.ProductExpression and e_._args_[1].is_variable_type() and (e_._args_[0].__class__ in native_numeric_types or not e_._args_[0].is_potentially_variable()):
+ * if compute_values: # <<<<<<<<<<<<<<
+ * lhs = value(e_._args_[0])
+ * else:
+ */
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 419, __pyx_L1_error)
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":420
+ * elif e_.__class__ is EXPR.ProductExpression and e_._args_[1].is_variable_type() and (e_._args_[0].__class__ in native_numeric_types or not e_._args_[0].is_potentially_variable()):
+ * if compute_values:
+ * lhs = value(e_._args_[0]) # <<<<<<<<<<<<<<
+ * else:
+ * lhs = e_._args_[0]
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 420, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 420, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 420, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 420, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 420, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_5};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 420, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 420, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 420, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_lhs, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":419
+ * ans.constant += multiplier * e_
+ * elif e_.__class__ is EXPR.ProductExpression and e_._args_[1].is_variable_type() and (e_._args_[0].__class__ in native_numeric_types or not e_._args_[0].is_potentially_variable()):
+ * if compute_values: # <<<<<<<<<<<<<<
+ * lhs = value(e_._args_[0])
+ * else:
+ */
+ goto __pyx_L15;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":422
+ * lhs = value(e_._args_[0])
+ * else:
+ * lhs = e_._args_[0] # <<<<<<<<<<<<<<
+ * if e_._args_[1].fixed:
+ * if compute_values:
+ */
+ /*else*/ {
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 422, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 422, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_lhs, __pyx_t_4);
+ __pyx_t_4 = 0;
+ }
+ __pyx_L15:;
+
+ /* "pyomo/repn/standard_repn.pyx":423
+ * else:
+ * lhs = e_._args_[0]
+ * if e_._args_[1].fixed: # <<<<<<<<<<<<<<
+ * if compute_values:
+ * ans.constant += multiplier*lhs*value(e_._args_[1])
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 423, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_fixed); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 423, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 423, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":424
+ * lhs = e_._args_[0]
+ * if e_._args_[1].fixed:
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier*lhs*value(e_._args_[1])
+ * else:
+ */
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 424, __pyx_L1_error)
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":425
+ * if e_._args_[1].fixed:
+ * if compute_values:
+ * ans.constant += multiplier*lhs*value(e_._args_[1]) # <<<<<<<<<<<<<<
+ * else:
+ * ans.constant += multiplier*lhs*e_._args_[1]
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_lhs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_14 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_14); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_14};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_14};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_t_14);
+ __pyx_t_14 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyNumber_Multiply(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_1) < 0) __PYX_ERR(0, 425, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":424
+ * lhs = e_._args_[0]
+ * if e_._args_[1].fixed:
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier*lhs*value(e_._args_[1])
+ * else:
+ */
+ goto __pyx_L17;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":427
+ * ans.constant += multiplier*lhs*value(e_._args_[1])
+ * else:
+ * ans.constant += multiplier*lhs*e_._args_[1] # <<<<<<<<<<<<<<
+ * else:
+ * id_ = id(e_._args_[1])
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 427, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_lhs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 427, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 427, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_Multiply(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 427, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 427, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_6) < 0) __PYX_ERR(0, 427, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __pyx_L17:;
+
+ /* "pyomo/repn/standard_repn.pyx":423
+ * else:
+ * lhs = e_._args_[0]
+ * if e_._args_[1].fixed: # <<<<<<<<<<<<<<
+ * if compute_values:
+ * ans.constant += multiplier*lhs*value(e_._args_[1])
+ */
+ goto __pyx_L16;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":429
+ * ans.constant += multiplier*lhs*e_._args_[1]
+ * else:
+ * id_ = id(e_._args_[1]) # <<<<<<<<<<<<<<
+ * if id_ in varkeys:
+ * key = varkeys[id_]
+ */
+ /*else*/ {
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 429, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_id_, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":430
+ * else:
+ * id_ = id(e_._args_[1])
+ * if id_ in varkeys: # <<<<<<<<<<<<<<
+ * key = varkeys[id_]
+ * else:
+ */
+ __pyx_t_10 = (__Pyx_PySequence_ContainsTF(__pyx_v_id_, __pyx_v_varkeys, Py_EQ)); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 430, __pyx_L1_error)
+ __pyx_t_13 = (__pyx_t_10 != 0);
+ if (__pyx_t_13) {
+
+ /* "pyomo/repn/standard_repn.pyx":431
+ * id_ = id(e_._args_[1])
+ * if id_ in varkeys:
+ * key = varkeys[id_] # <<<<<<<<<<<<<<
+ * else:
+ * key = len(idMap) - 1
+ */
+ __pyx_t_4 = PyObject_GetItem(__pyx_v_varkeys, __pyx_v_id_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 431, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":430
+ * else:
+ * id_ = id(e_._args_[1])
+ * if id_ in varkeys: # <<<<<<<<<<<<<<
+ * key = varkeys[id_]
+ * else:
+ */
+ goto __pyx_L18;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":433
+ * key = varkeys[id_]
+ * else:
+ * key = len(idMap) - 1 # <<<<<<<<<<<<<<
+ * varkeys[id_] = key
+ * idMap[key] = e_._args_[1]
+ */
+ /*else*/ {
+ __pyx_t_12 = PyObject_Length(__pyx_v_idMap); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 433, __pyx_L1_error)
+ __pyx_t_4 = PyInt_FromSsize_t((__pyx_t_12 - 1)); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 433, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":434
+ * else:
+ * key = len(idMap) - 1
+ * varkeys[id_] = key # <<<<<<<<<<<<<<
+ * idMap[key] = e_._args_[1]
+ * if key in ans.linear:
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_varkeys, __pyx_v_id_, __pyx_v_key) < 0)) __PYX_ERR(0, 434, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":435
+ * key = len(idMap) - 1
+ * varkeys[id_] = key
+ * idMap[key] = e_._args_[1] # <<<<<<<<<<<<<<
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier*lhs
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_e_, __pyx_n_s_args); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 435, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 435, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_v_idMap, __pyx_v_key, __pyx_t_6) < 0)) __PYX_ERR(0, 435, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __pyx_L18:;
+
+ /* "pyomo/repn/standard_repn.pyx":436
+ * varkeys[id_] = key
+ * idMap[key] = e_._args_[1]
+ * if key in ans.linear: # <<<<<<<<<<<<<<
+ * ans.linear[key] += multiplier*lhs
+ * else:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 436, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_13 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_13 < 0)) __PYX_ERR(0, 436, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_10 = (__pyx_t_13 != 0);
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":437
+ * idMap[key] = e_._args_[1]
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier*lhs # <<<<<<<<<<<<<<
+ * else:
+ * ans.linear[key] = multiplier*lhs
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 437, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v_key);
+ __pyx_t_4 = __pyx_v_key;
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 437, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_lhs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 437, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_15 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 437, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_t_4, __pyx_t_15) < 0)) __PYX_ERR(0, 437, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":436
+ * varkeys[id_] = key
+ * idMap[key] = e_._args_[1]
+ * if key in ans.linear: # <<<<<<<<<<<<<<
+ * ans.linear[key] += multiplier*lhs
+ * else:
+ */
+ goto __pyx_L19;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":439
+ * ans.linear[key] += multiplier*lhs
+ * else:
+ * ans.linear[key] = multiplier*lhs # <<<<<<<<<<<<<<
+ * else:
+ * res_ = _collect_standard_repn(e_, multiplier, idMap,
+ */
+ /*else*/ {
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_lhs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 439, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 439, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (unlikely(PyObject_SetItem(__pyx_t_4, __pyx_v_key, __pyx_t_6) < 0)) __PYX_ERR(0, 439, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __pyx_L19:;
+ }
+ __pyx_L16:;
+
+ /* "pyomo/repn/standard_repn.pyx":418
+ * else:
+ * ans.constant += multiplier * e_
+ * elif e_.__class__ is EXPR.ProductExpression and e_._args_[1].is_variable_type() and (e_._args_[0].__class__ in native_numeric_types or not e_._args_[0].is_potentially_variable()): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * lhs = value(e_._args_[0])
+ */
+ goto __pyx_L5;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":441
+ * ans.linear[key] = multiplier*lhs
+ * else:
+ * res_ = _collect_standard_repn(e_, multiplier, idMap, # <<<<<<<<<<<<<<
+ * compute_values, verbose, quadratic)
+ * #
+ */
+ /*else*/ {
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 441, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+
+ /* "pyomo/repn/standard_repn.pyx":442
+ * else:
+ * res_ = _collect_standard_repn(e_, multiplier, idMap,
+ * compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * #
+ * # Add returned from recursion
+ */
+ __pyx_t_15 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_15)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_15);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_15, __pyx_v_e_, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_4)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_15, __pyx_v_e_, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_4, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 441, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_15) {
+ __Pyx_GIVEREF(__pyx_t_15); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_15); __pyx_t_15 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_e_);
+ __Pyx_GIVEREF(__pyx_v_e_);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_v_e_);
+ __Pyx_INCREF(__pyx_v_multiplier);
+ __Pyx_GIVEREF(__pyx_v_multiplier);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_v_multiplier);
+ __Pyx_INCREF(__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_7, __pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_7, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_7, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_5, 5+__pyx_t_7, __pyx_v_quadratic);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 441, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_res_, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":446
+ * # Add returned from recursion
+ * #
+ * ans.constant += res_.constant # <<<<<<<<<<<<<<
+ * ans.nonl += res_.nonl
+ * for i in res_.linear:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 446, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_res_, __pyx_n_s_constant); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 446, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_5) < 0) __PYX_ERR(0, 446, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":447
+ * #
+ * ans.constant += res_.constant
+ * ans.nonl += res_.nonl # <<<<<<<<<<<<<<
+ * for i in res_.linear:
+ * ans.linear[i] = ans.linear.get(i,0) + res_.linear[i]
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_nonl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_res_, __pyx_n_s_nonl); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 447, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 447, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_nonl, __pyx_t_6) < 0) __PYX_ERR(0, 447, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":448
+ * ans.constant += res_.constant
+ * ans.nonl += res_.nonl
+ * for i in res_.linear: # <<<<<<<<<<<<<<
+ * ans.linear[i] = ans.linear.get(i,0) + res_.linear[i]
+ * if quadratic:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_res_, __pyx_n_s_linear); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 448, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
+ __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4); __pyx_t_12 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_12 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 448, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_16 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 448, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_4))) {
+ if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_6); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 448, __pyx_L1_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 448, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ } else {
+ if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_12); __Pyx_INCREF(__pyx_t_6); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 448, __pyx_L1_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 448, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ }
+ } else {
+ __pyx_t_6 = __pyx_t_16(__pyx_t_4);
+ if (unlikely(!__pyx_t_6)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 448, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":449
+ * ans.nonl += res_.nonl
+ * for i in res_.linear:
+ * ans.linear[i] = ans.linear.get(i,0) + res_.linear[i] # <<<<<<<<<<<<<<
+ * if quadratic:
+ * for i in res_.quadratic:
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_get); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_15);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_15, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_15)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_i, __pyx_int_0};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 449, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_v_i, __pyx_int_0};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 449, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_i);
+ __Pyx_GIVEREF(__pyx_v_i);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_v_i);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_1, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_v_res_, __pyx_n_s_linear); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_15, __pyx_v_i); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = PyNumber_Add(__pyx_t_6, __pyx_t_1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 449, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_i, __pyx_t_15) < 0)) __PYX_ERR(0, 449, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":448
+ * ans.constant += res_.constant
+ * ans.nonl += res_.nonl
+ * for i in res_.linear: # <<<<<<<<<<<<<<
+ * ans.linear[i] = ans.linear.get(i,0) + res_.linear[i]
+ * if quadratic:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":450
+ * for i in res_.linear:
+ * ans.linear[i] = ans.linear.get(i,0) + res_.linear[i]
+ * if quadratic: # <<<<<<<<<<<<<<
+ * for i in res_.quadratic:
+ * ans.quadratic[i] = ans.quadratic.get(i, 0) + res_.quadratic[i]
+ */
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_quadratic); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 450, __pyx_L1_error)
+ if (__pyx_t_10) {
+
+ /* "pyomo/repn/standard_repn.pyx":451
+ * ans.linear[i] = ans.linear.get(i,0) + res_.linear[i]
+ * if quadratic:
+ * for i in res_.quadratic: # <<<<<<<<<<<<<<
+ * ans.quadratic[i] = ans.quadratic.get(i, 0) + res_.quadratic[i]
+ *
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_res_, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (likely(PyList_CheckExact(__pyx_t_4)) || PyTuple_CheckExact(__pyx_t_4)) {
+ __pyx_t_15 = __pyx_t_4; __Pyx_INCREF(__pyx_t_15); __pyx_t_12 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_12 = -1; __pyx_t_15 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 451, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = Py_TYPE(__pyx_t_15)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 451, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_15))) {
+ if (__pyx_t_12 >= PyList_GET_SIZE(__pyx_t_15)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyList_GET_ITEM(__pyx_t_15, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 451, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_15, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ } else {
+ if (__pyx_t_12 >= PyTuple_GET_SIZE(__pyx_t_15)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_15, __pyx_t_12); __Pyx_INCREF(__pyx_t_4); __pyx_t_12++; if (unlikely(0 < 0)) __PYX_ERR(0, 451, __pyx_L1_error)
+ #else
+ __pyx_t_4 = PySequence_ITEM(__pyx_t_15, __pyx_t_12); __pyx_t_12++; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 451, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ #endif
+ }
+ } else {
+ __pyx_t_4 = __pyx_t_16(__pyx_t_15);
+ if (unlikely(!__pyx_t_4)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 451, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_i, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":452
+ * if quadratic:
+ * for i in res_.quadratic:
+ * ans.quadratic[i] = ans.quadratic.get(i, 0) + res_.quadratic[i] # <<<<<<<<<<<<<<
+ *
+ * return ans
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 452, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_get); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 452, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_i, __pyx_int_0};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 452, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_v_i, __pyx_int_0};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 452, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 452, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_1) {
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_i);
+ __Pyx_GIVEREF(__pyx_v_i);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_v_i);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 452, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_res_, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 452, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = PyObject_GetItem(__pyx_t_6, __pyx_v_i); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 452, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Add(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 452, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 452, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_i, __pyx_t_6) < 0)) __PYX_ERR(0, 452, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":451
+ * ans.linear[i] = ans.linear.get(i,0) + res_.linear[i]
+ * if quadratic:
+ * for i in res_.quadratic: # <<<<<<<<<<<<<<
+ * ans.quadratic[i] = ans.quadratic.get(i, 0) + res_.quadratic[i]
+ *
+ */
+ }
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":450
+ * for i in res_.linear:
+ * ans.linear[i] = ans.linear.get(i,0) + res_.linear[i]
+ * if quadratic: # <<<<<<<<<<<<<<
+ * for i in res_.quadratic:
+ * ans.quadratic[i] = ans.quadratic.get(i, 0) + res_.quadratic[i]
+ */
+ }
+ }
+ __pyx_L5:;
+
+ /* "pyomo/repn/standard_repn.pyx":392
+ * varkeys = idMap[None]
+ *
+ * for e_ in itertools.islice(exp._args_, exp.nargs()): # <<<<<<<<<<<<<<
+ * if e_.__class__ in native_numeric_types:
+ * ans.constant += multiplier*e_
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":454
+ * ans.quadratic[i] = ans.quadratic.get(i, 0) + res_.quadratic[i]
+ *
+ * return ans # <<<<<<<<<<<<<<
+ *
+ * #@profile
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_ans);
+ __pyx_r = __pyx_v_ans;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":388
+ *
+ * #@profile
+ * def _collect_sum(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ * varkeys = idMap[None]
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_ans);
+ __Pyx_XDECREF(__pyx_v_varkeys);
+ __Pyx_XDECREF(__pyx_v_e_);
+ __Pyx_XDECREF(__pyx_v_id_);
+ __Pyx_XDECREF(__pyx_v_key);
+ __Pyx_XDECREF(__pyx_v_lhs);
+ __Pyx_XDECREF(__pyx_v_res_);
+ __Pyx_XDECREF(__pyx_v_i);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":457
+ *
+ * #@profile
+ * def _collect_prod(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * #
+ * # LHS is a numeric value
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_7_collect_prod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_7_collect_prod = {"_collect_prod", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_7_collect_prod, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_7_collect_prod(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_collect_prod (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_multiplier,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_prod", 1, 6, 6, 1); __PYX_ERR(0, 457, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_prod", 1, 6, 6, 2); __PYX_ERR(0, 457, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_prod", 1, 6, 6, 3); __PYX_ERR(0, 457, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_prod", 1, 6, 6, 4); __PYX_ERR(0, 457, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_prod", 1, 6, 6, 5); __PYX_ERR(0, 457, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_collect_prod") < 0)) __PYX_ERR(0, 457, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_multiplier = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_compute_values = values[3];
+ __pyx_v_verbose = values[4];
+ __pyx_v_quadratic = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_collect_prod", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 457, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_prod", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_6_collect_prod(__pyx_self, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/repn/standard_repn.pyx":545
+ * else:
+ * ans.quadratic[rkey,lkey] = multiplier*lcoef*rcoef
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear)) # <<<<<<<<<<<<<<
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ * el_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(lhs.quadratic))
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 545, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_2generator2, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_collect_prod_locals_genexpr, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!gen)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_prod.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_2generator2(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ Py_ssize_t __pyx_t_6;
+ PyObject *(*__pyx_t_7)(PyObject *);
+ PyObject *(*__pyx_t_8)(PyObject *);
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L8_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_lhs)) { __Pyx_RaiseClosureNameError("lhs"); __PYX_ERR(0, 545, __pyx_L1_error) }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_lhs, __pyx_n_s_linear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 545, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 545, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 545, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_7(__pyx_t_3);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 545, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 545, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 2) < 0) __PYX_ERR(0, 545, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L7_unpacking_done;
+ __pyx_L6_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 545, __pyx_L1_error)
+ __pyx_L7_unpacking_done:;
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_coef);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_coef, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap)) { __Pyx_RaiseClosureNameError("idMap"); __PYX_ERR(0, 545, __pyx_L1_error) }
+ __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_coef, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_6;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_7;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L8_resume_from_yield:;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_3);
+ __pyx_t_6 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_7 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 545, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_5generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/repn/standard_repn.pyx":546
+ * ans.quadratic[rkey,lkey] = multiplier*lcoef*rcoef
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear)) # <<<<<<<<<<<<<<
+ * el_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(lhs.quadratic))
+ * er_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(rhs.quadratic))
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_3genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 546, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_5generator3, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_collect_prod_locals_genexpr, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!gen)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_prod.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_5generator3(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ Py_ssize_t __pyx_t_6;
+ PyObject *(*__pyx_t_7)(PyObject *);
+ PyObject *(*__pyx_t_8)(PyObject *);
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L8_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_rhs)) { __Pyx_RaiseClosureNameError("rhs"); __PYX_ERR(0, 546, __pyx_L1_error) }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_rhs, __pyx_n_s_linear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 546, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 546, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 546, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_7(__pyx_t_3);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 546, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 546, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 2) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L7_unpacking_done;
+ __pyx_L6_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 546, __pyx_L1_error)
+ __pyx_L7_unpacking_done:;
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_coef);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_coef, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap)) { __Pyx_RaiseClosureNameError("idMap"); __PYX_ERR(0, 546, __pyx_L1_error) }
+ __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_coef, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_6;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_7;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L8_resume_from_yield:;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_3);
+ __pyx_t_6 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_7 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 546, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_8generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/repn/standard_repn.pyx":547
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ * el_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(lhs.quadratic)) # <<<<<<<<<<<<<<
+ * er_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(rhs.quadratic))
+ * ans.nonl += el_linear*er_quadratic + el_quadratic*er_linear
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_6genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 547, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_8generator4, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_collect_prod_locals_genexpr, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!gen)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_prod.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_8generator4(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ Py_ssize_t __pyx_t_6;
+ PyObject *(*__pyx_t_7)(PyObject *);
+ PyObject *(*__pyx_t_8)(PyObject *);
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L8_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_lhs)) { __Pyx_RaiseClosureNameError("lhs"); __PYX_ERR(0, 547, __pyx_L1_error) }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_lhs, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 547, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 547, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 547, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_7(__pyx_t_3);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 547, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 547, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 2) < 0) __PYX_ERR(0, 547, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L7_unpacking_done;
+ __pyx_L6_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 547, __pyx_L1_error)
+ __pyx_L7_unpacking_done:;
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_coef);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_coef, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap)) { __Pyx_RaiseClosureNameError("idMap"); __PYX_ERR(0, 547, __pyx_L1_error) }
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_key, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_coef, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap)) { __Pyx_RaiseClosureNameError("idMap"); __PYX_ERR(0, 547, __pyx_L1_error) }
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_key, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_6;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_7;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L8_resume_from_yield:;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_3);
+ __pyx_t_6 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_7 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 547, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_11generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/repn/standard_repn.pyx":548
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ * el_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(lhs.quadratic))
+ * er_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(rhs.quadratic)) # <<<<<<<<<<<<<<
+ * ans.nonl += el_linear*er_quadratic + el_quadratic*er_linear
+ * elif len(lhs.linear) + len(rhs.linear) > 1:
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_9genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 548, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_11generator5, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_collect_prod_locals_genexpr, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!gen)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_prod.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_11generator5(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ Py_ssize_t __pyx_t_6;
+ PyObject *(*__pyx_t_7)(PyObject *);
+ PyObject *(*__pyx_t_8)(PyObject *);
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L8_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_rhs)) { __Pyx_RaiseClosureNameError("rhs"); __PYX_ERR(0, 548, __pyx_L1_error) }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_rhs, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 548, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 548, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 548, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_7(__pyx_t_3);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 548, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 548, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 2) < 0) __PYX_ERR(0, 548, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L7_unpacking_done;
+ __pyx_L6_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 548, __pyx_L1_error)
+ __pyx_L7_unpacking_done:;
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_coef);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_coef, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap)) { __Pyx_RaiseClosureNameError("idMap"); __PYX_ERR(0, 548, __pyx_L1_error) }
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_key, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_coef, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap)) { __Pyx_RaiseClosureNameError("idMap"); __PYX_ERR(0, 548, __pyx_L1_error) }
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_key, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_6;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_7;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L8_resume_from_yield:;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_3);
+ __pyx_t_6 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_7 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 548, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_14generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/repn/standard_repn.pyx":551
+ * ans.nonl += el_linear*er_quadratic + el_quadratic*er_linear
+ * elif len(lhs.linear) + len(rhs.linear) > 1:
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear)) # <<<<<<<<<<<<<<
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ * ans.nonl += el_linear*er_linear
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_12genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 551, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_14generator6, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_collect_prod_locals_genexpr, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!gen)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_prod.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_14generator6(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ Py_ssize_t __pyx_t_6;
+ PyObject *(*__pyx_t_7)(PyObject *);
+ PyObject *(*__pyx_t_8)(PyObject *);
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L8_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_lhs)) { __Pyx_RaiseClosureNameError("lhs"); __PYX_ERR(0, 551, __pyx_L1_error) }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_lhs, __pyx_n_s_linear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 551, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 551, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 551, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_7(__pyx_t_3);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 551, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 551, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 2) < 0) __PYX_ERR(0, 551, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L7_unpacking_done;
+ __pyx_L6_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 551, __pyx_L1_error)
+ __pyx_L7_unpacking_done:;
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_coef);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_coef, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap)) { __Pyx_RaiseClosureNameError("idMap"); __PYX_ERR(0, 551, __pyx_L1_error) }
+ __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_coef, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_6;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_7;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L8_resume_from_yield:;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_3);
+ __pyx_t_6 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_7 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 551, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_17generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/repn/standard_repn.pyx":552
+ * elif len(lhs.linear) + len(rhs.linear) > 1:
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear)) # <<<<<<<<<<<<<<
+ * ans.nonl += el_linear*er_linear
+ *
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_15genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 552, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_17generator7, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_collect_prod_locals_genexpr, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!gen)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_prod.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_13_collect_prod_17generator7(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ Py_ssize_t __pyx_t_6;
+ PyObject *(*__pyx_t_7)(PyObject *);
+ PyObject *(*__pyx_t_8)(PyObject *);
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L8_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_rhs)) { __Pyx_RaiseClosureNameError("rhs"); __PYX_ERR(0, 552, __pyx_L1_error) }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_rhs, __pyx_n_s_linear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
+ __pyx_t_7 = NULL;
+ } else {
+ __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 552, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_7)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 552, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++; if (unlikely(0 < 0)) __PYX_ERR(0, 552, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_6); __pyx_t_6++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_7(__pyx_t_3);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 552, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 552, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_2);
+ #else
+ __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_4 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_5 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_5)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ index = 1; __pyx_t_2 = __pyx_t_8(__pyx_t_4); if (unlikely(!__pyx_t_2)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_4), 2) < 0) __PYX_ERR(0, 552, __pyx_L1_error)
+ __pyx_t_8 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L7_unpacking_done;
+ __pyx_L6_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_8 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 552, __pyx_L1_error)
+ __pyx_L7_unpacking_done:;
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_t_5 = 0;
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_coef);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_coef, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap)) { __Pyx_RaiseClosureNameError("idMap"); __PYX_ERR(0, 552, __pyx_L1_error) }
+ __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_cur_scope->__pyx_v_coef, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_3;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_6;
+ __pyx_cur_scope->__pyx_t_2 = __pyx_t_7;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L8_resume_from_yield:;
+ __pyx_t_3 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_3);
+ __pyx_t_6 = __pyx_cur_scope->__pyx_t_1;
+ __pyx_t_7 = __pyx_cur_scope->__pyx_t_2;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 552, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":457
+ *
+ * #@profile
+ * def _collect_prod(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * #
+ * # LHS is a numeric value
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_6_collect_prod(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *__pyx_cur_scope;
+ PyObject *__pyx_v_val = NULL;
+ PyObject *__pyx_v_lhs_nonl_None = NULL;
+ PyObject *__pyx_v_rhs_nonl_None = NULL;
+ PyObject *__pyx_v_ans = NULL;
+ PyObject *__pyx_v_key = NULL;
+ PyObject *__pyx_v_coef = NULL;
+ PyObject *__pyx_v_lkey = NULL;
+ PyObject *__pyx_v_lcoef = NULL;
+ PyObject *__pyx_v_rkey = NULL;
+ PyObject *__pyx_v_rcoef = NULL;
+ PyObject *__pyx_v_el_linear = NULL;
+ PyObject *__pyx_v_er_linear = NULL;
+ PyObject *__pyx_v_el_quadratic = NULL;
+ PyObject *__pyx_v_er_quadratic = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ Py_ssize_t __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ int __pyx_t_12;
+ PyObject *(*__pyx_t_13)(PyObject *);
+ PyObject *(*__pyx_t_14)(PyObject *);
+ Py_ssize_t __pyx_t_15;
+ PyObject *(*__pyx_t_16)(PyObject *);
+ __Pyx_RefNannySetupContext("_collect_prod", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 457, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_v_idMap = __pyx_v_idMap;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_idMap);
+
+ /* "pyomo/repn/standard_repn.pyx":461
+ * # LHS is a numeric value
+ * #
+ * if exp._args_[0].__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if isclose_default(exp._args_[0],0):
+ * return Results()
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 461, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 461, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":462
+ * #
+ * if exp._args_[0].__class__ in native_numeric_types:
+ * if isclose_default(exp._args_[0],0): # <<<<<<<<<<<<<<
+ * return Results()
+ * return _collect_standard_repn(exp._args_[1], multiplier * exp._args_[0], idMap,
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 462, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 462, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 462, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_6);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 462, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":463
+ * if exp._args_[0].__class__ in native_numeric_types:
+ * if isclose_default(exp._args_[0],0):
+ * return Results() # <<<<<<<<<<<<<<
+ * return _collect_standard_repn(exp._args_[1], multiplier * exp._args_[0], idMap,
+ * compute_values, verbose, quadratic)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 463, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":462
+ * #
+ * if exp._args_[0].__class__ in native_numeric_types:
+ * if isclose_default(exp._args_[0],0): # <<<<<<<<<<<<<<
+ * return Results()
+ * return _collect_standard_repn(exp._args_[1], multiplier * exp._args_[0], idMap,
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":464
+ * if isclose_default(exp._args_[0],0):
+ * return Results()
+ * return _collect_standard_repn(exp._args_[1], multiplier * exp._args_[0], idMap, # <<<<<<<<<<<<<<
+ * compute_values, verbose, quadratic)
+ * #
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 464, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 464, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 464, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 464, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 464, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_5); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 464, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":465
+ * return Results()
+ * return _collect_standard_repn(exp._args_[1], multiplier * exp._args_[0], idMap,
+ * compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * #
+ * # LHS is a non-variable expression
+ */
+ __pyx_t_5 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_5, __pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_5, __pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 464, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_t_8);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_7, __pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_7, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_9, 4+__pyx_t_7, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_9, 5+__pyx_t_7, __pyx_v_quadratic);
+ __pyx_t_6 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 464, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":461
+ * # LHS is a numeric value
+ * #
+ * if exp._args_[0].__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if isclose_default(exp._args_[0],0):
+ * return Results()
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":469
+ * # LHS is a non-variable expression
+ * #
+ * elif not exp._args_[0].is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * val = value(exp._args_[0])
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 469, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 469, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 469, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":470
+ * #
+ * elif not exp._args_[0].is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * val = value(exp._args_[0])
+ * if isclose_default(val,0):
+ */
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 470, __pyx_L1_error)
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":471
+ * elif not exp._args_[0].is_potentially_variable():
+ * if compute_values:
+ * val = value(exp._args_[0]) # <<<<<<<<<<<<<<
+ * if isclose_default(val,0):
+ * return Results()
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_val = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":472
+ * if compute_values:
+ * val = value(exp._args_[0])
+ * if isclose_default(val,0): # <<<<<<<<<<<<<<
+ * return Results()
+ * return _collect_standard_repn(exp._args_[1], multiplier * val, idMap,
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 472, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_val, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_v_val, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 472, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_val);
+ __Pyx_GIVEREF(__pyx_v_val);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_v_val);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 472, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 472, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":473
+ * val = value(exp._args_[0])
+ * if isclose_default(val,0):
+ * return Results() # <<<<<<<<<<<<<<
+ * return _collect_standard_repn(exp._args_[1], multiplier * val, idMap,
+ * compute_values, verbose, quadratic)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 473, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 473, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":472
+ * if compute_values:
+ * val = value(exp._args_[0])
+ * if isclose_default(val,0): # <<<<<<<<<<<<<<
+ * return Results()
+ * return _collect_standard_repn(exp._args_[1], multiplier * val, idMap,
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":474
+ * if isclose_default(val,0):
+ * return Results()
+ * return _collect_standard_repn(exp._args_[1], multiplier * val, idMap, # <<<<<<<<<<<<<<
+ * compute_values, verbose, quadratic)
+ * else:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 474, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 474, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 474, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_val); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 474, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+
+ /* "pyomo/repn/standard_repn.pyx":475
+ * return Results()
+ * return _collect_standard_repn(exp._args_[1], multiplier * val, idMap,
+ * compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * else:
+ * return _collect_standard_repn(exp._args_[1], multiplier*exp._args_[0], idMap,
+ */
+ __pyx_t_9 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_9, __pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_9, __pyx_t_6, __pyx_t_8, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 474, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_t_8);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_7, __pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_7, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_7, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_5, 5+__pyx_t_7, __pyx_v_quadratic);
+ __pyx_t_6 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 474, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":470
+ * #
+ * elif not exp._args_[0].is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * val = value(exp._args_[0])
+ * if isclose_default(val,0):
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":477
+ * compute_values, verbose, quadratic)
+ * else:
+ * return _collect_standard_repn(exp._args_[1], multiplier*exp._args_[0], idMap, # <<<<<<<<<<<<<<
+ * compute_values, verbose, quadratic)
+ *
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":478
+ * else:
+ * return _collect_standard_repn(exp._args_[1], multiplier*exp._args_[0], idMap,
+ * compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ *
+ * lhs = _collect_standard_repn(exp._args_[0], 1, idMap,
+ */
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_t_8, __pyx_t_5, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_t_8, __pyx_t_5, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_t_5);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_7, __pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_7, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_9, 4+__pyx_t_7, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_9, 5+__pyx_t_7, __pyx_v_quadratic);
+ __pyx_t_8 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":469
+ * # LHS is a non-variable expression
+ * #
+ * elif not exp._args_[0].is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * val = value(exp._args_[0])
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":480
+ * compute_values, verbose, quadratic)
+ *
+ * lhs = _collect_standard_repn(exp._args_[0], 1, idMap, # <<<<<<<<<<<<<<
+ * compute_values, verbose, quadratic)
+ * lhs_nonl_None = isclose_const(lhs.nonl,0)
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 480, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 480, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_9, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 480, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":481
+ *
+ * lhs = _collect_standard_repn(exp._args_[0], 1, idMap,
+ * compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * lhs_nonl_None = isclose_const(lhs.nonl,0)
+ *
+ */
+ __pyx_t_9 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_9, __pyx_t_5, __pyx_int_1, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_9, __pyx_t_5, __pyx_int_1, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 480, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_5);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_int_1);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_8, 3+__pyx_t_7, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_8, 4+__pyx_t_7, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_8, 5+__pyx_t_7, __pyx_v_quadratic);
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 480, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_cur_scope->__pyx_v_lhs = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":482
+ * lhs = _collect_standard_repn(exp._args_[0], 1, idMap,
+ * compute_values, verbose, quadratic)
+ * lhs_nonl_None = isclose_const(lhs.nonl,0) # <<<<<<<<<<<<<<
+ *
+ * if lhs_nonl_None and len(lhs.linear) == 0 and len(lhs.quadratic) == 0:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_const); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 482, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_nonl); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 482, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_8, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_8, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 482, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_t_8);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 482, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_lhs_nonl_None = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":484
+ * lhs_nonl_None = isclose_const(lhs.nonl,0)
+ *
+ * if lhs_nonl_None and len(lhs.linear) == 0 and len(lhs.quadratic) == 0: # <<<<<<<<<<<<<<
+ * if isclose(lhs.constant,0):
+ * return Results()
+ */
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_lhs_nonl_None); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 484, __pyx_L1_error)
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __pyx_t_4;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_linear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 484, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = ((__pyx_t_10 == 0) != 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __pyx_t_4;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 484, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 484, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = ((__pyx_t_10 == 0) != 0);
+ __pyx_t_3 = __pyx_t_4;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":485
+ *
+ * if lhs_nonl_None and len(lhs.linear) == 0 and len(lhs.quadratic) == 0:
+ * if isclose(lhs.constant,0): # <<<<<<<<<<<<<<
+ * return Results()
+ * if compute_values:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_8 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_9, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_9, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_t_9);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_9 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 485, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":486
+ * if lhs_nonl_None and len(lhs.linear) == 0 and len(lhs.quadratic) == 0:
+ * if isclose(lhs.constant,0):
+ * return Results() # <<<<<<<<<<<<<<
+ * if compute_values:
+ * val = value(lhs.constant)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 486, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":485
+ *
+ * if lhs_nonl_None and len(lhs.linear) == 0 and len(lhs.quadratic) == 0:
+ * if isclose(lhs.constant,0): # <<<<<<<<<<<<<<
+ * return Results()
+ * if compute_values:
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":487
+ * if isclose(lhs.constant,0):
+ * return Results()
+ * if compute_values: # <<<<<<<<<<<<<<
+ * val = value(lhs.constant)
+ * if isclose_default(val,0):
+ */
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 487, __pyx_L1_error)
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":488
+ * return Results()
+ * if compute_values:
+ * val = value(lhs.constant) # <<<<<<<<<<<<<<
+ * if isclose_default(val,0):
+ * return Results()
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_5};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_val = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":489
+ * if compute_values:
+ * val = value(lhs.constant)
+ * if isclose_default(val,0): # <<<<<<<<<<<<<<
+ * return Results()
+ * return _collect_standard_repn(exp._args_[1], multiplier*val, idMap,
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 489, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_val, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_v_val, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 489, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_val);
+ __Pyx_GIVEREF(__pyx_v_val);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_v_val);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 489, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 489, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":490
+ * val = value(lhs.constant)
+ * if isclose_default(val,0):
+ * return Results() # <<<<<<<<<<<<<<
+ * return _collect_standard_repn(exp._args_[1], multiplier*val, idMap,
+ * compute_values, verbose, quadratic)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 490, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 490, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 490, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":489
+ * if compute_values:
+ * val = value(lhs.constant)
+ * if isclose_default(val,0): # <<<<<<<<<<<<<<
+ * return Results()
+ * return _collect_standard_repn(exp._args_[1], multiplier*val, idMap,
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":491
+ * if isclose_default(val,0):
+ * return Results()
+ * return _collect_standard_repn(exp._args_[1], multiplier*val, idMap, # <<<<<<<<<<<<<<
+ * compute_values, verbose, quadratic)
+ * else:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_val); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+
+ /* "pyomo/repn/standard_repn.pyx":492
+ * return Results()
+ * return _collect_standard_repn(exp._args_[1], multiplier*val, idMap,
+ * compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * else:
+ * return _collect_standard_repn(exp._args_[1], multiplier*lhs.constant, idMap,
+ */
+ __pyx_t_9 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_9, __pyx_t_8, __pyx_t_5, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_9, __pyx_t_8, __pyx_t_5, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_9) {
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_5);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_7, __pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_7, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_7, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_6, 5+__pyx_t_7, __pyx_v_quadratic);
+ __pyx_t_8 = 0;
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 491, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":487
+ * if isclose(lhs.constant,0):
+ * return Results()
+ * if compute_values: # <<<<<<<<<<<<<<
+ * val = value(lhs.constant)
+ * if isclose_default(val,0):
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":494
+ * compute_values, verbose, quadratic)
+ * else:
+ * return _collect_standard_repn(exp._args_[1], multiplier*lhs.constant, idMap, # <<<<<<<<<<<<<<
+ * compute_values, verbose, quadratic)
+ *
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":495
+ * else:
+ * return _collect_standard_repn(exp._args_[1], multiplier*lhs.constant, idMap,
+ * compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ *
+ * if exp._args_[1].__class__ in native_numeric_types:
+ */
+ __pyx_t_6 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_t_5, __pyx_t_8, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_t_5, __pyx_t_8, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_7, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_7, __pyx_t_8);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_7, __pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_7, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_9, 4+__pyx_t_7, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_9, 5+__pyx_t_7, __pyx_v_quadratic);
+ __pyx_t_5 = 0;
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 494, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":484
+ * lhs_nonl_None = isclose_const(lhs.nonl,0)
+ *
+ * if lhs_nonl_None and len(lhs.linear) == 0 and len(lhs.quadratic) == 0: # <<<<<<<<<<<<<<
+ * if isclose(lhs.constant,0):
+ * return Results()
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":497
+ * compute_values, verbose, quadratic)
+ *
+ * if exp._args_[1].__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * rhs = Results(constant=exp._args_[1])
+ * elif not exp._args_[1].is_potentially_variable():
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 497, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 497, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":498
+ *
+ * if exp._args_[1].__class__ in native_numeric_types:
+ * rhs = Results(constant=exp._args_[1]) # <<<<<<<<<<<<<<
+ * elif not exp._args_[1].is_potentially_variable():
+ * if compute_values:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 498, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 498, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 498, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_9, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 498, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_constant, __pyx_t_8) < 0) __PYX_ERR(0, 498, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 498, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_8);
+ __pyx_cur_scope->__pyx_v_rhs = __pyx_t_8;
+ __pyx_t_8 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":497
+ * compute_values, verbose, quadratic)
+ *
+ * if exp._args_[1].__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * rhs = Results(constant=exp._args_[1])
+ * elif not exp._args_[1].is_potentially_variable():
+ */
+ goto __pyx_L14;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":499
+ * if exp._args_[1].__class__ in native_numeric_types:
+ * rhs = Results(constant=exp._args_[1])
+ * elif not exp._args_[1].is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * rhs = Results(constant=value(exp._args_[1]))
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 499, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 499, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 499, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 499, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 499, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_3 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":500
+ * rhs = Results(constant=exp._args_[1])
+ * elif not exp._args_[1].is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * rhs = Results(constant=value(exp._args_[1]))
+ * else:
+ */
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 500, __pyx_L1_error)
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":501
+ * elif not exp._args_[1].is_potentially_variable():
+ * if compute_values:
+ * rhs = Results(constant=value(exp._args_[1])) # <<<<<<<<<<<<<<
+ * else:
+ * rhs = Results(constant=exp._args_[1])
+ */
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_constant, __pyx_t_1) < 0) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 501, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_v_rhs = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":500
+ * rhs = Results(constant=exp._args_[1])
+ * elif not exp._args_[1].is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * rhs = Results(constant=value(exp._args_[1]))
+ * else:
+ */
+ goto __pyx_L15;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":503
+ * rhs = Results(constant=value(exp._args_[1]))
+ * else:
+ * rhs = Results(constant=exp._args_[1]) # <<<<<<<<<<<<<<
+ * else:
+ * rhs = _collect_standard_repn(exp._args_[1], 1, idMap,
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 503, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 503, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 503, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = __Pyx_GetItemInt(__pyx_t_8, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 503, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_constant, __pyx_t_9) < 0) __PYX_ERR(0, 503, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 503, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_9);
+ __pyx_cur_scope->__pyx_v_rhs = __pyx_t_9;
+ __pyx_t_9 = 0;
+ }
+ __pyx_L15:;
+
+ /* "pyomo/repn/standard_repn.pyx":499
+ * if exp._args_[1].__class__ in native_numeric_types:
+ * rhs = Results(constant=exp._args_[1])
+ * elif not exp._args_[1].is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * rhs = Results(constant=value(exp._args_[1]))
+ */
+ goto __pyx_L14;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":505
+ * rhs = Results(constant=exp._args_[1])
+ * else:
+ * rhs = _collect_standard_repn(exp._args_[1], 1, idMap, # <<<<<<<<<<<<<<
+ * compute_values, verbose, quadratic)
+ * rhs_nonl_None = isclose_const(rhs.nonl,0)
+ */
+ /*else*/ {
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":506
+ * else:
+ * rhs = _collect_standard_repn(exp._args_[1], 1, idMap,
+ * compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * rhs_nonl_None = isclose_const(rhs.nonl,0)
+ * if rhs_nonl_None and len(rhs.linear) == 0 and len(rhs.quadratic) == 0 and isclose(rhs.constant,0):
+ */
+ __pyx_t_1 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_1, __pyx_t_8, __pyx_int_1, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_1, __pyx_t_8, __pyx_int_1, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 6+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(6+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_1) {
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_7, __pyx_t_8);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_7, __pyx_int_1);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_11, 2+__pyx_t_7, __pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_11, 3+__pyx_t_7, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_11, 4+__pyx_t_7, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_11, 5+__pyx_t_7, __pyx_v_quadratic);
+ __pyx_t_8 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 505, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_9);
+ __pyx_cur_scope->__pyx_v_rhs = __pyx_t_9;
+ __pyx_t_9 = 0;
+ }
+ __pyx_L14:;
+
+ /* "pyomo/repn/standard_repn.pyx":507
+ * rhs = _collect_standard_repn(exp._args_[1], 1, idMap,
+ * compute_values, verbose, quadratic)
+ * rhs_nonl_None = isclose_const(rhs.nonl,0) # <<<<<<<<<<<<<<
+ * if rhs_nonl_None and len(rhs.linear) == 0 and len(rhs.quadratic) == 0 and isclose(rhs.constant,0):
+ * return Results()
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_const); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_nonl); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_8 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_11, __pyx_int_0};
+ __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_11, __pyx_int_0};
+ __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_t_11);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_11 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_1, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 507, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_rhs_nonl_None = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":508
+ * compute_values, verbose, quadratic)
+ * rhs_nonl_None = isclose_const(rhs.nonl,0)
+ * if rhs_nonl_None and len(rhs.linear) == 0 and len(rhs.quadratic) == 0 and isclose(rhs.constant,0): # <<<<<<<<<<<<<<
+ * return Results()
+ *
+ */
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_rhs_nonl_None); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 508, __pyx_L1_error)
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __pyx_t_4;
+ goto __pyx_L17_bool_binop_done;
+ }
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_linear); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_4 = ((__pyx_t_10 == 0) != 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __pyx_t_4;
+ goto __pyx_L17_bool_binop_done;
+ }
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = PyObject_Length(__pyx_t_9); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_4 = ((__pyx_t_10 == 0) != 0);
+ if (__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __pyx_t_4;
+ goto __pyx_L17_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_1, __pyx_int_0};
+ __pyx_t_9 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_1, __pyx_int_0};
+ __pyx_t_9 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_11) {
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_1);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_1 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_9); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 508, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_3 = __pyx_t_4;
+ __pyx_L17_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":509
+ * rhs_nonl_None = isclose_const(rhs.nonl,0)
+ * if rhs_nonl_None and len(rhs.linear) == 0 and len(rhs.quadratic) == 0 and isclose(rhs.constant,0):
+ * return Results() # <<<<<<<<<<<<<<
+ *
+ * if not lhs_nonl_None or not rhs_nonl_None:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 509, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 509, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_9;
+ __pyx_t_9 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":508
+ * compute_values, verbose, quadratic)
+ * rhs_nonl_None = isclose_const(rhs.nonl,0)
+ * if rhs_nonl_None and len(rhs.linear) == 0 and len(rhs.quadratic) == 0 and isclose(rhs.constant,0): # <<<<<<<<<<<<<<
+ * return Results()
+ *
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":511
+ * return Results()
+ *
+ * if not lhs_nonl_None or not rhs_nonl_None: # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ * if not quadratic and len(lhs.linear) > 0 and len(rhs.linear) > 0:
+ */
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_lhs_nonl_None); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __pyx_t_12 = ((!__pyx_t_4) != 0);
+ if (!__pyx_t_12) {
+ } else {
+ __pyx_t_3 = __pyx_t_12;
+ goto __pyx_L22_bool_binop_done;
+ }
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_rhs_nonl_None); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 511, __pyx_L1_error)
+ __pyx_t_4 = ((!__pyx_t_12) != 0);
+ __pyx_t_3 = __pyx_t_4;
+ __pyx_L22_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":512
+ *
+ * if not lhs_nonl_None or not rhs_nonl_None:
+ * return Results(nonl=multiplier*exp) # <<<<<<<<<<<<<<
+ * if not quadratic and len(lhs.linear) > 0 and len(rhs.linear) > 0:
+ * # NOTE: We treat a product of linear terms as nonlinear unless quadratic==2
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 512, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 512, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_exp); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 512, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nonl, __pyx_t_8) < 0) __PYX_ERR(0, 512, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 512, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":511
+ * return Results()
+ *
+ * if not lhs_nonl_None or not rhs_nonl_None: # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ * if not quadratic and len(lhs.linear) > 0 and len(rhs.linear) > 0:
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":513
+ * if not lhs_nonl_None or not rhs_nonl_None:
+ * return Results(nonl=multiplier*exp)
+ * if not quadratic and len(lhs.linear) > 0 and len(rhs.linear) > 0: # <<<<<<<<<<<<<<
+ * # NOTE: We treat a product of linear terms as nonlinear unless quadratic==2
+ * return Results(nonl=multiplier*exp)
+ */
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_quadratic); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 513, __pyx_L1_error)
+ __pyx_t_12 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_12) {
+ } else {
+ __pyx_t_3 = __pyx_t_12;
+ goto __pyx_L25_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_linear); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 513, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 513, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_12 = ((__pyx_t_10 > 0) != 0);
+ if (__pyx_t_12) {
+ } else {
+ __pyx_t_3 = __pyx_t_12;
+ goto __pyx_L25_bool_binop_done;
+ }
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_linear); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 513, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_10 = PyObject_Length(__pyx_t_8); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 513, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_12 = ((__pyx_t_10 > 0) != 0);
+ __pyx_t_3 = __pyx_t_12;
+ __pyx_L25_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":515
+ * if not quadratic and len(lhs.linear) > 0 and len(rhs.linear) > 0:
+ * # NOTE: We treat a product of linear terms as nonlinear unless quadratic==2
+ * return Results(nonl=multiplier*exp) # <<<<<<<<<<<<<<
+ *
+ * ans = Results()
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 515, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_exp); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 515, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nonl, __pyx_t_9) < 0) __PYX_ERR(0, 515, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 515, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_9;
+ __pyx_t_9 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":513
+ * if not lhs_nonl_None or not rhs_nonl_None:
+ * return Results(nonl=multiplier*exp)
+ * if not quadratic and len(lhs.linear) > 0 and len(rhs.linear) > 0: # <<<<<<<<<<<<<<
+ * # NOTE: We treat a product of linear terms as nonlinear unless quadratic==2
+ * return Results(nonl=multiplier*exp)
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":517
+ * return Results(nonl=multiplier*exp)
+ *
+ * ans = Results() # <<<<<<<<<<<<<<
+ * ans.constant = multiplier*lhs.constant * rhs.constant
+ * if not isclose(lhs.constant,0):
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_8) {
+ __pyx_t_9 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 517, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ __pyx_t_9 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 517, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_ans = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":518
+ *
+ * ans = Results()
+ * ans.constant = multiplier*lhs.constant * rhs.constant # <<<<<<<<<<<<<<
+ * if not isclose(lhs.constant,0):
+ * for key, coef in six.iteritems(rhs.linear):
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 518, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 518, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 518, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_8 = PyNumber_Multiply(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 518, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_8) < 0) __PYX_ERR(0, 518, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":519
+ * ans = Results()
+ * ans.constant = multiplier*lhs.constant * rhs.constant
+ * if not isclose(lhs.constant,0): # <<<<<<<<<<<<<<
+ * for key, coef in six.iteritems(rhs.linear):
+ * ans.linear[key] = multiplier*coef*lhs.constant
+ */
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 519, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_2, __pyx_int_0};
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 519, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_2, __pyx_int_0};
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 519, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 519, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__pyx_t_1) {
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+__pyx_t_7, __pyx_t_2);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_11, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_2 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_11, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 519, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 519, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_12 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_12) {
+
+ /* "pyomo/repn/standard_repn.pyx":520
+ * ans.constant = multiplier*lhs.constant * rhs.constant
+ * if not isclose(lhs.constant,0):
+ * for key, coef in six.iteritems(rhs.linear): # <<<<<<<<<<<<<<
+ * ans.linear[key] = multiplier*coef*lhs.constant
+ * if not isclose(rhs.constant,0):
+ */
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_9, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_linear); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_9};
+ __pyx_t_8 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_9};
+ __pyx_t_8 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+1, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_8)) || PyTuple_CheckExact(__pyx_t_8)) {
+ __pyx_t_11 = __pyx_t_8; __Pyx_INCREF(__pyx_t_11); __pyx_t_10 = 0;
+ __pyx_t_13 = NULL;
+ } else {
+ __pyx_t_10 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_13 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 520, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_13)) {
+ if (likely(PyList_CheckExact(__pyx_t_11))) {
+ if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_11)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_8 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 520, __pyx_L1_error)
+ #else
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_11, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ } else {
+ if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_8 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_10); __Pyx_INCREF(__pyx_t_8); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 520, __pyx_L1_error)
+ #else
+ __pyx_t_8 = PySequence_ITEM(__pyx_t_11, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ }
+ } else {
+ __pyx_t_8 = __pyx_t_13(__pyx_t_11);
+ if (unlikely(!__pyx_t_8)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 520, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_8);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_8))) || (PyList_CheckExact(__pyx_t_8))) {
+ PyObject* sequence = __pyx_t_8;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 520, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_9 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_9);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ #endif
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_2 = PyObject_GetIter(__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 520, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_14 = Py_TYPE(__pyx_t_2)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_14(__pyx_t_2); if (unlikely(!__pyx_t_1)) goto __pyx_L31_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_9 = __pyx_t_14(__pyx_t_2); if (unlikely(!__pyx_t_9)) goto __pyx_L31_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_2), 2) < 0) __PYX_ERR(0, 520, __pyx_L1_error)
+ __pyx_t_14 = NULL;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L32_unpacking_done;
+ __pyx_L31_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_14 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 520, __pyx_L1_error)
+ __pyx_L32_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_coef, __pyx_t_9);
+ __pyx_t_9 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":521
+ * if not isclose(lhs.constant,0):
+ * for key, coef in six.iteritems(rhs.linear):
+ * ans.linear[key] = multiplier*coef*lhs.constant # <<<<<<<<<<<<<<
+ * if not isclose(rhs.constant,0):
+ * for key, coef in six.iteritems(lhs.linear):
+ */
+ __pyx_t_8 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_coef); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 521, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 521, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_1 = PyNumber_Multiply(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 521, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 521, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (unlikely(PyObject_SetItem(__pyx_t_9, __pyx_v_key, __pyx_t_1) < 0)) __PYX_ERR(0, 521, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":520
+ * ans.constant = multiplier*lhs.constant * rhs.constant
+ * if not isclose(lhs.constant,0):
+ * for key, coef in six.iteritems(rhs.linear): # <<<<<<<<<<<<<<
+ * ans.linear[key] = multiplier*coef*lhs.constant
+ * if not isclose(rhs.constant,0):
+ */
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":519
+ * ans = Results()
+ * ans.constant = multiplier*lhs.constant * rhs.constant
+ * if not isclose(lhs.constant,0): # <<<<<<<<<<<<<<
+ * for key, coef in six.iteritems(rhs.linear):
+ * ans.linear[key] = multiplier*coef*lhs.constant
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":522
+ * for key, coef in six.iteritems(rhs.linear):
+ * ans.linear[key] = multiplier*coef*lhs.constant
+ * if not isclose(rhs.constant,0): # <<<<<<<<<<<<<<
+ * for key, coef in six.iteritems(lhs.linear):
+ * if key in ans.linear:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_8 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_9, __pyx_int_0};
+ __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_8, __pyx_t_9, __pyx_int_0};
+ __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_7, __pyx_t_9);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_9 = 0;
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_11); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 522, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_3 = ((!__pyx_t_12) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":523
+ * ans.linear[key] = multiplier*coef*lhs.constant
+ * if not isclose(rhs.constant,0):
+ * for key, coef in six.iteritems(lhs.linear): # <<<<<<<<<<<<<<
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier*coef*rhs.constant
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_linear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_9 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_9)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_9) {
+ __pyx_t_11 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 523, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_1};
+ __pyx_t_11 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 523, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_9, __pyx_t_1};
+ __pyx_t_11 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 523, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 523, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_9); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_9); __pyx_t_9 = NULL;
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 523, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_11)) || PyTuple_CheckExact(__pyx_t_11)) {
+ __pyx_t_2 = __pyx_t_11; __Pyx_INCREF(__pyx_t_2); __pyx_t_10 = 0;
+ __pyx_t_13 = NULL;
+ } else {
+ __pyx_t_10 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 523, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_13 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 523, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_13)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_11 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_11); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 523, __pyx_L1_error)
+ #else
+ __pyx_t_11 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 523, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ #endif
+ } else {
+ if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_11 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_10); __Pyx_INCREF(__pyx_t_11); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 523, __pyx_L1_error)
+ #else
+ __pyx_t_11 = PySequence_ITEM(__pyx_t_2, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 523, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ #endif
+ }
+ } else {
+ __pyx_t_11 = __pyx_t_13(__pyx_t_2);
+ if (unlikely(!__pyx_t_11)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 523, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_11);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_11))) || (PyList_CheckExact(__pyx_t_11))) {
+ PyObject* sequence = __pyx_t_11;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 523, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_1);
+ #else
+ __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 523, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 523, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_9 = PyObject_GetIter(__pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 523, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_14 = Py_TYPE(__pyx_t_9)->tp_iternext;
+ index = 0; __pyx_t_8 = __pyx_t_14(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L36_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_8);
+ index = 1; __pyx_t_1 = __pyx_t_14(__pyx_t_9); if (unlikely(!__pyx_t_1)) goto __pyx_L36_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_9), 2) < 0) __PYX_ERR(0, 523, __pyx_L1_error)
+ __pyx_t_14 = NULL;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ goto __pyx_L37_unpacking_done;
+ __pyx_L36_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_14 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 523, __pyx_L1_error)
+ __pyx_L37_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_coef, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":524
+ * if not isclose(rhs.constant,0):
+ * for key, coef in six.iteritems(lhs.linear):
+ * if key in ans.linear: # <<<<<<<<<<<<<<
+ * ans.linear[key] += multiplier*coef*rhs.constant
+ * else:
+ */
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 524, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_t_11, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 524, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_12 = (__pyx_t_3 != 0);
+ if (__pyx_t_12) {
+
+ /* "pyomo/repn/standard_repn.pyx":525
+ * for key, coef in six.iteritems(lhs.linear):
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier*coef*rhs.constant # <<<<<<<<<<<<<<
+ * else:
+ * ans.linear[key] = multiplier*coef*rhs.constant
+ */
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 525, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_INCREF(__pyx_v_key);
+ __pyx_t_1 = __pyx_v_key;
+ __pyx_t_8 = PyObject_GetItem(__pyx_t_11, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 525, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_coef); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 525, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 525, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = PyNumber_Multiply(__pyx_t_9, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 525, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_8, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 525, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_t_1, __pyx_t_6) < 0)) __PYX_ERR(0, 525, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":524
+ * if not isclose(rhs.constant,0):
+ * for key, coef in six.iteritems(lhs.linear):
+ * if key in ans.linear: # <<<<<<<<<<<<<<
+ * ans.linear[key] += multiplier*coef*rhs.constant
+ * else:
+ */
+ goto __pyx_L38;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":527
+ * ans.linear[key] += multiplier*coef*rhs.constant
+ * else:
+ * ans.linear[key] = multiplier*coef*rhs.constant # <<<<<<<<<<<<<<
+ *
+ * if quadratic:
+ */
+ /*else*/ {
+ __pyx_t_11 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_coef); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 527, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PyNumber_Multiply(__pyx_t_11, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 527, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 527, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_key, __pyx_t_6) < 0)) __PYX_ERR(0, 527, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __pyx_L38:;
+
+ /* "pyomo/repn/standard_repn.pyx":523
+ * ans.linear[key] = multiplier*coef*lhs.constant
+ * if not isclose(rhs.constant,0):
+ * for key, coef in six.iteritems(lhs.linear): # <<<<<<<<<<<<<<
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier*coef*rhs.constant
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":522
+ * for key, coef in six.iteritems(rhs.linear):
+ * ans.linear[key] = multiplier*coef*lhs.constant
+ * if not isclose(rhs.constant,0): # <<<<<<<<<<<<<<
+ * for key, coef in six.iteritems(lhs.linear):
+ * if key in ans.linear:
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":529
+ * ans.linear[key] = multiplier*coef*rhs.constant
+ *
+ * if quadratic: # <<<<<<<<<<<<<<
+ * if not isclose(lhs.constant,0):
+ * for key, coef in six.iteritems(rhs.quadratic):
+ */
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_quadratic); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 529, __pyx_L1_error)
+ if (__pyx_t_12) {
+
+ /* "pyomo/repn/standard_repn.pyx":530
+ *
+ * if quadratic:
+ * if not isclose(lhs.constant,0): # <<<<<<<<<<<<<<
+ * for key, coef in six.iteritems(rhs.quadratic):
+ * ans.quadratic[key] = multiplier*coef*lhs.constant
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 530, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 530, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_1, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_11, __pyx_t_1, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 530, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_11) {
+ __Pyx_GIVEREF(__pyx_t_11); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_11); __pyx_t_11 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_7, __pyx_t_1);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 530, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 530, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = ((!__pyx_t_12) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":531
+ * if quadratic:
+ * if not isclose(lhs.constant,0):
+ * for key, coef in six.iteritems(rhs.quadratic): # <<<<<<<<<<<<<<
+ * ans.quadratic[key] = multiplier*coef*lhs.constant
+ * if not isclose(rhs.constant,0):
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_t_6};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_11 = PyTuple_New(1+1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_11, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_11, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_5 = __pyx_t_2; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0;
+ __pyx_t_13 = NULL;
+ } else {
+ __pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_13 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 531, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_13)) {
+ if (likely(PyList_CheckExact(__pyx_t_5))) {
+ if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 531, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_2); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 531, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_13(__pyx_t_5);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 531, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+ PyObject* sequence = __pyx_t_2;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 531, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_11 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_11 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_6);
+ #else
+ __pyx_t_11 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 531, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_14 = Py_TYPE(__pyx_t_1)->tp_iternext;
+ index = 0; __pyx_t_11 = __pyx_t_14(__pyx_t_1); if (unlikely(!__pyx_t_11)) goto __pyx_L43_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_11);
+ index = 1; __pyx_t_6 = __pyx_t_14(__pyx_t_1); if (unlikely(!__pyx_t_6)) goto __pyx_L43_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_1), 2) < 0) __PYX_ERR(0, 531, __pyx_L1_error)
+ __pyx_t_14 = NULL;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ goto __pyx_L44_unpacking_done;
+ __pyx_L43_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_14 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 531, __pyx_L1_error)
+ __pyx_L44_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_11);
+ __pyx_t_11 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_coef, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":532
+ * if not isclose(lhs.constant,0):
+ * for key, coef in six.iteritems(rhs.quadratic):
+ * ans.quadratic[key] = multiplier*coef*lhs.constant # <<<<<<<<<<<<<<
+ * if not isclose(rhs.constant,0):
+ * for key, coef in six.iteritems(lhs.quadratic):
+ */
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_coef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 532, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 532, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_11 = PyNumber_Multiply(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 532, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 532, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_v_key, __pyx_t_11) < 0)) __PYX_ERR(0, 532, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":531
+ * if quadratic:
+ * if not isclose(lhs.constant,0):
+ * for key, coef in six.iteritems(rhs.quadratic): # <<<<<<<<<<<<<<
+ * ans.quadratic[key] = multiplier*coef*lhs.constant
+ * if not isclose(rhs.constant,0):
+ */
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":530
+ *
+ * if quadratic:
+ * if not isclose(lhs.constant,0): # <<<<<<<<<<<<<<
+ * for key, coef in six.iteritems(rhs.quadratic):
+ * ans.quadratic[key] = multiplier*coef*lhs.constant
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":533
+ * for key, coef in six.iteritems(rhs.quadratic):
+ * ans.quadratic[key] = multiplier*coef*lhs.constant
+ * if not isclose(rhs.constant,0): # <<<<<<<<<<<<<<
+ * for key, coef in six.iteritems(lhs.quadratic):
+ * if key in ans.quadratic:
+ */
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_6, __pyx_int_0};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_t_6, __pyx_int_0};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__pyx_t_2) {
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_7, __pyx_t_6);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_7, __pyx_int_0);
+ __pyx_t_6 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 533, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_12 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_12) {
+
+ /* "pyomo/repn/standard_repn.pyx":534
+ * ans.quadratic[key] = multiplier*coef*lhs.constant
+ * if not isclose(rhs.constant,0):
+ * for key, coef in six.iteritems(lhs.quadratic): # <<<<<<<<<<<<<<
+ * if key in ans.quadratic:
+ * ans.quadratic[key] += multiplier*coef*rhs.constant
+ */
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_11); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_11};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_11};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_11);
+ __pyx_t_11 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
+ __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
+ __pyx_t_13 = NULL;
+ } else {
+ __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_13 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 534, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_13)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 534, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ } else {
+ if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 534, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ }
+ } else {
+ __pyx_t_5 = __pyx_t_13(__pyx_t_1);
+ if (unlikely(!__pyx_t_5)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 534, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
+ PyObject* sequence = __pyx_t_5;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 534, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_11 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_11 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_11);
+ #else
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_11 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ #endif
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 534, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_14 = Py_TYPE(__pyx_t_6)->tp_iternext;
+ index = 0; __pyx_t_2 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L48_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ index = 1; __pyx_t_11 = __pyx_t_14(__pyx_t_6); if (unlikely(!__pyx_t_11)) goto __pyx_L48_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_11);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_6), 2) < 0) __PYX_ERR(0, 534, __pyx_L1_error)
+ __pyx_t_14 = NULL;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L49_unpacking_done;
+ __pyx_L48_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_14 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 534, __pyx_L1_error)
+ __pyx_L49_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_coef, __pyx_t_11);
+ __pyx_t_11 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":535
+ * if not isclose(rhs.constant,0):
+ * for key, coef in six.iteritems(lhs.quadratic):
+ * if key in ans.quadratic: # <<<<<<<<<<<<<<
+ * ans.quadratic[key] += multiplier*coef*rhs.constant
+ * else:
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 535, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_12 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_t_5, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 535, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_3 = (__pyx_t_12 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":536
+ * for key, coef in six.iteritems(lhs.quadratic):
+ * if key in ans.quadratic:
+ * ans.quadratic[key] += multiplier*coef*rhs.constant # <<<<<<<<<<<<<<
+ * else:
+ * ans.quadratic[key] = multiplier*coef*rhs.constant
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 536, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_key);
+ __pyx_t_11 = __pyx_v_key;
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 536, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_coef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 536, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = PyNumber_Multiply(__pyx_t_6, __pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 536, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 536, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_t_11, __pyx_t_8) < 0)) __PYX_ERR(0, 536, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":535
+ * if not isclose(rhs.constant,0):
+ * for key, coef in six.iteritems(lhs.quadratic):
+ * if key in ans.quadratic: # <<<<<<<<<<<<<<
+ * ans.quadratic[key] += multiplier*coef*rhs.constant
+ * else:
+ */
+ goto __pyx_L50;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":538
+ * ans.quadratic[key] += multiplier*coef*rhs.constant
+ * else:
+ * ans.quadratic[key] = multiplier*coef*rhs.constant # <<<<<<<<<<<<<<
+ * for lkey, lcoef in six.iteritems(lhs.linear):
+ * for rkey, rcoef in six.iteritems(rhs.linear):
+ */
+ /*else*/ {
+ __pyx_t_5 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_coef); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 538, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_constant); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 538, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_8 = PyNumber_Multiply(__pyx_t_5, __pyx_t_11); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 538, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 538, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ if (unlikely(PyObject_SetItem(__pyx_t_11, __pyx_v_key, __pyx_t_8) < 0)) __PYX_ERR(0, 538, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __pyx_L50:;
+
+ /* "pyomo/repn/standard_repn.pyx":534
+ * ans.quadratic[key] = multiplier*coef*lhs.constant
+ * if not isclose(rhs.constant,0):
+ * for key, coef in six.iteritems(lhs.quadratic): # <<<<<<<<<<<<<<
+ * if key in ans.quadratic:
+ * ans.quadratic[key] += multiplier*coef*rhs.constant
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":533
+ * for key, coef in six.iteritems(rhs.quadratic):
+ * ans.quadratic[key] = multiplier*coef*lhs.constant
+ * if not isclose(rhs.constant,0): # <<<<<<<<<<<<<<
+ * for key, coef in six.iteritems(lhs.quadratic):
+ * if key in ans.quadratic:
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":539
+ * else:
+ * ans.quadratic[key] = multiplier*coef*rhs.constant
+ * for lkey, lcoef in six.iteritems(lhs.linear): # <<<<<<<<<<<<<<
+ * for rkey, rcoef in six.iteritems(rhs.linear):
+ * if lkey <= rkey:
+ */
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_linear); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_11 = __pyx_t_1; __Pyx_INCREF(__pyx_t_11); __pyx_t_10 = 0;
+ __pyx_t_13 = NULL;
+ } else {
+ __pyx_t_10 = -1; __pyx_t_11 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_13 = Py_TYPE(__pyx_t_11)->tp_iternext; if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 539, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_13)) {
+ if (likely(PyList_CheckExact(__pyx_t_11))) {
+ if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_11)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_11, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 539, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_11)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_11, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 539, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_11, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_13(__pyx_t_11);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 539, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 539, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_9 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_9 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_8);
+ #else
+ __pyx_t_9 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 539, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_14 = Py_TYPE(__pyx_t_5)->tp_iternext;
+ index = 0; __pyx_t_9 = __pyx_t_14(__pyx_t_5); if (unlikely(!__pyx_t_9)) goto __pyx_L53_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_9);
+ index = 1; __pyx_t_8 = __pyx_t_14(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L53_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_5), 2) < 0) __PYX_ERR(0, 539, __pyx_L1_error)
+ __pyx_t_14 = NULL;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L54_unpacking_done;
+ __pyx_L53_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_14 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 539, __pyx_L1_error)
+ __pyx_L54_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_lkey, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_lcoef, __pyx_t_8);
+ __pyx_t_8 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":540
+ * ans.quadratic[key] = multiplier*coef*rhs.constant
+ * for lkey, lcoef in six.iteritems(lhs.linear):
+ * for rkey, rcoef in six.iteritems(rhs.linear): # <<<<<<<<<<<<<<
+ * if lkey <= rkey:
+ * ans.quadratic[lkey,rkey] = multiplier*lcoef*rcoef
+ */
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_linear); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_8};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_9 = __pyx_t_1; __Pyx_INCREF(__pyx_t_9); __pyx_t_15 = 0;
+ __pyx_t_16 = NULL;
+ } else {
+ __pyx_t_15 = -1; __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_16 = Py_TYPE(__pyx_t_9)->tp_iternext; if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 540, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_16)) {
+ if (likely(PyList_CheckExact(__pyx_t_9))) {
+ if (__pyx_t_15 >= PyList_GET_SIZE(__pyx_t_9)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_9, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 540, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_15 >= PyTuple_GET_SIZE(__pyx_t_9)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_9, __pyx_t_15); __Pyx_INCREF(__pyx_t_1); __pyx_t_15++; if (unlikely(0 < 0)) __PYX_ERR(0, 540, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_9, __pyx_t_15); __pyx_t_15++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_16(__pyx_t_9);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 540, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 540, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_8);
+ #else
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 540, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_14 = Py_TYPE(__pyx_t_5)->tp_iternext;
+ index = 0; __pyx_t_2 = __pyx_t_14(__pyx_t_5); if (unlikely(!__pyx_t_2)) goto __pyx_L57_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ index = 1; __pyx_t_8 = __pyx_t_14(__pyx_t_5); if (unlikely(!__pyx_t_8)) goto __pyx_L57_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_14(__pyx_t_5), 2) < 0) __PYX_ERR(0, 540, __pyx_L1_error)
+ __pyx_t_14 = NULL;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L58_unpacking_done;
+ __pyx_L57_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_14 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 540, __pyx_L1_error)
+ __pyx_L58_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_rkey, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_rcoef, __pyx_t_8);
+ __pyx_t_8 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":541
+ * for lkey, lcoef in six.iteritems(lhs.linear):
+ * for rkey, rcoef in six.iteritems(rhs.linear):
+ * if lkey <= rkey: # <<<<<<<<<<<<<<
+ * ans.quadratic[lkey,rkey] = multiplier*lcoef*rcoef
+ * else:
+ */
+ __pyx_t_1 = PyObject_RichCompare(__pyx_v_lkey, __pyx_v_rkey, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 541, __pyx_L1_error)
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 541, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":542
+ * for rkey, rcoef in six.iteritems(rhs.linear):
+ * if lkey <= rkey:
+ * ans.quadratic[lkey,rkey] = multiplier*lcoef*rcoef # <<<<<<<<<<<<<<
+ * else:
+ * ans.quadratic[rkey,lkey] = multiplier*lcoef*rcoef
+ */
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_lcoef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = PyNumber_Multiply(__pyx_t_1, __pyx_v_rcoef); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 542, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 542, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 542, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_lkey);
+ __Pyx_GIVEREF(__pyx_v_lkey);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_lkey);
+ __Pyx_INCREF(__pyx_v_rkey);
+ __Pyx_GIVEREF(__pyx_v_rkey);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_rkey);
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_8) < 0)) __PYX_ERR(0, 542, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":541
+ * for lkey, lcoef in six.iteritems(lhs.linear):
+ * for rkey, rcoef in six.iteritems(rhs.linear):
+ * if lkey <= rkey: # <<<<<<<<<<<<<<
+ * ans.quadratic[lkey,rkey] = multiplier*lcoef*rcoef
+ * else:
+ */
+ goto __pyx_L59;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":544
+ * ans.quadratic[lkey,rkey] = multiplier*lcoef*rcoef
+ * else:
+ * ans.quadratic[rkey,lkey] = multiplier*lcoef*rcoef # <<<<<<<<<<<<<<
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ */
+ /*else*/ {
+ __pyx_t_8 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_lcoef); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_t_8, __pyx_v_rcoef); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_rkey);
+ __Pyx_GIVEREF(__pyx_v_rkey);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_rkey);
+ __Pyx_INCREF(__pyx_v_lkey);
+ __Pyx_GIVEREF(__pyx_v_lkey);
+ PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_lkey);
+ if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_t_1, __pyx_t_2) < 0)) __PYX_ERR(0, 544, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __pyx_L59:;
+
+ /* "pyomo/repn/standard_repn.pyx":540
+ * ans.quadratic[key] = multiplier*coef*rhs.constant
+ * for lkey, lcoef in six.iteritems(lhs.linear):
+ * for rkey, rcoef in six.iteritems(rhs.linear): # <<<<<<<<<<<<<<
+ * if lkey <= rkey:
+ * ans.quadratic[lkey,rkey] = multiplier*lcoef*rcoef
+ */
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":539
+ * else:
+ * ans.quadratic[key] = multiplier*coef*rhs.constant
+ * for lkey, lcoef in six.iteritems(lhs.linear): # <<<<<<<<<<<<<<
+ * for rkey, rcoef in six.iteritems(rhs.linear):
+ * if lkey <= rkey:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":545
+ * else:
+ * ans.quadratic[rkey,lkey] = multiplier*lcoef*rcoef
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear)) # <<<<<<<<<<<<<<
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ * el_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(lhs.quadratic))
+ */
+ __pyx_t_11 = __pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_11);
+ __pyx_t_11 = 0;
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_9, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 545, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_v_el_linear = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":546
+ * ans.quadratic[rkey,lkey] = multiplier*lcoef*rcoef
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear)) # <<<<<<<<<<<<<<
+ * el_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(lhs.quadratic))
+ * er_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(rhs.quadratic))
+ */
+ __pyx_t_9 = __pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 546, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_v_er_linear = __pyx_t_11;
+ __pyx_t_11 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":547
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ * el_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(lhs.quadratic)) # <<<<<<<<<<<<<<
+ * er_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(rhs.quadratic))
+ * ans.nonl += el_linear*er_quadratic + el_quadratic*er_linear
+ */
+ __pyx_t_11 = __pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_6genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_11);
+ __pyx_t_11 = 0;
+ __pyx_t_11 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_9, NULL); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_9 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_11); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 547, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_v_el_quadratic = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":548
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ * el_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(lhs.quadratic))
+ * er_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(rhs.quadratic)) # <<<<<<<<<<<<<<
+ * ans.nonl += el_linear*er_quadratic + el_quadratic*er_linear
+ * elif len(lhs.linear) + len(rhs.linear) > 1:
+ */
+ __pyx_t_9 = __pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_9genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_11, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_9); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 548, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_v_er_quadratic = __pyx_t_11;
+ __pyx_t_11 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":549
+ * el_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(lhs.quadratic))
+ * er_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(rhs.quadratic))
+ * ans.nonl += el_linear*er_quadratic + el_quadratic*er_linear # <<<<<<<<<<<<<<
+ * elif len(lhs.linear) + len(rhs.linear) > 1:
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ */
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_nonl); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 549, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_9 = PyNumber_Multiply(__pyx_v_el_linear, __pyx_v_er_quadratic); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 549, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_el_quadratic, __pyx_v_er_linear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyNumber_Add(__pyx_t_9, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_11, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_nonl, __pyx_t_2) < 0) __PYX_ERR(0, 549, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":529
+ * ans.linear[key] = multiplier*coef*rhs.constant
+ *
+ * if quadratic: # <<<<<<<<<<<<<<
+ * if not isclose(lhs.constant,0):
+ * for key, coef in six.iteritems(rhs.quadratic):
+ */
+ goto __pyx_L39;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":550
+ * er_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(rhs.quadratic))
+ * ans.nonl += el_linear*er_quadratic + el_quadratic*er_linear
+ * elif len(lhs.linear) + len(rhs.linear) > 1: # <<<<<<<<<<<<<<
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_lhs, __pyx_n_s_linear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 550, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_rhs, __pyx_n_s_linear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 550, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_15 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_15 == ((Py_ssize_t)-1))) __PYX_ERR(0, 550, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (((__pyx_t_10 + __pyx_t_15) > 1) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":551
+ * ans.nonl += el_linear*er_quadratic + el_quadratic*er_linear
+ * elif len(lhs.linear) + len(rhs.linear) > 1:
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear)) # <<<<<<<<<<<<<<
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ * ans.nonl += el_linear*er_linear
+ */
+ __pyx_t_2 = __pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_12genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 551, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_el_linear = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":552
+ * elif len(lhs.linear) + len(rhs.linear) > 1:
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear)) # <<<<<<<<<<<<<<
+ * ans.nonl += el_linear*er_linear
+ *
+ */
+ __pyx_t_1 = __pyx_pf_5pyomo_4repn_13standard_repn_13_collect_prod_15genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_sum, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 552, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_er_linear = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":553
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ * ans.nonl += el_linear*er_linear # <<<<<<<<<<<<<<
+ *
+ * return ans
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_nonl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 553, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_el_linear, __pyx_v_er_linear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 553, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_nonl, __pyx_t_11) < 0) __PYX_ERR(0, 553, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":550
+ * er_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(rhs.quadratic))
+ * ans.nonl += el_linear*er_quadratic + el_quadratic*er_linear
+ * elif len(lhs.linear) + len(rhs.linear) > 1: # <<<<<<<<<<<<<<
+ * el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ * er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ */
+ }
+ __pyx_L39:;
+
+ /* "pyomo/repn/standard_repn.pyx":555
+ * ans.nonl += el_linear*er_linear
+ *
+ * return ans # <<<<<<<<<<<<<<
+ *
+ * #@profile
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_ans);
+ __pyx_r = __pyx_v_ans;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":457
+ *
+ * #@profile
+ * def _collect_prod(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * #
+ * # LHS is a numeric value
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_prod", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_val);
+ __Pyx_XDECREF(__pyx_v_lhs_nonl_None);
+ __Pyx_XDECREF(__pyx_v_rhs_nonl_None);
+ __Pyx_XDECREF(__pyx_v_ans);
+ __Pyx_XDECREF(__pyx_v_key);
+ __Pyx_XDECREF(__pyx_v_coef);
+ __Pyx_XDECREF(__pyx_v_lkey);
+ __Pyx_XDECREF(__pyx_v_lcoef);
+ __Pyx_XDECREF(__pyx_v_rkey);
+ __Pyx_XDECREF(__pyx_v_rcoef);
+ __Pyx_XDECREF(__pyx_v_el_linear);
+ __Pyx_XDECREF(__pyx_v_er_linear);
+ __Pyx_XDECREF(__pyx_v_el_quadratic);
+ __Pyx_XDECREF(__pyx_v_er_quadratic);
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":558
+ *
+ * #@profile
+ * def _collect_var(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_9_collect_var(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_9_collect_var = {"_collect_var", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_9_collect_var, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_9_collect_var(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_collect_var (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_multiplier,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_var", 1, 6, 6, 1); __PYX_ERR(0, 558, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_var", 1, 6, 6, 2); __PYX_ERR(0, 558, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_var", 1, 6, 6, 3); __PYX_ERR(0, 558, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_var", 1, 6, 6, 4); __PYX_ERR(0, 558, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_var", 1, 6, 6, 5); __PYX_ERR(0, 558, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_collect_var") < 0)) __PYX_ERR(0, 558, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_multiplier = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_compute_values = values[3];
+ __pyx_v_verbose = values[4];
+ __pyx_v_quadratic = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_collect_var", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 558, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_var", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_8_collect_var(__pyx_self, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_8_collect_var(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_quadratic) {
+ PyObject *__pyx_v_ans = NULL;
+ PyObject *__pyx_v_id_ = NULL;
+ PyObject *__pyx_v_key = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ Py_ssize_t __pyx_t_8;
+ __Pyx_RefNannySetupContext("_collect_var", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":559
+ * #@profile
+ * def _collect_var(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * ans = Results() # <<<<<<<<<<<<<<
+ *
+ * if exp.fixed:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 559, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 559, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_ans = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":561
+ * ans = Results()
+ *
+ * if exp.fixed: # <<<<<<<<<<<<<<
+ * if compute_values:
+ * ans.constant += multiplier*value(exp)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_fixed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 561, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 561, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":562
+ *
+ * if exp.fixed:
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier*value(exp)
+ * else:
+ */
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 562, __pyx_L1_error)
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":563
+ * if exp.fixed:
+ * if compute_values:
+ * ans.constant += multiplier*value(exp) # <<<<<<<<<<<<<<
+ * else:
+ * ans.constant += multiplier*exp
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 563, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_v_exp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_exp};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_exp};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 563, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_exp);
+ __Pyx_GIVEREF(__pyx_v_exp);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_exp);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 563, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 563, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_2) < 0) __PYX_ERR(0, 563, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":562
+ *
+ * if exp.fixed:
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier*value(exp)
+ * else:
+ */
+ goto __pyx_L4;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":565
+ * ans.constant += multiplier*value(exp)
+ * else:
+ * ans.constant += multiplier*exp # <<<<<<<<<<<<<<
+ * else:
+ * id_ = id(exp)
+ */
+ /*else*/ {
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_exp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 565, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_1) < 0) __PYX_ERR(0, 565, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __pyx_L4:;
+
+ /* "pyomo/repn/standard_repn.pyx":561
+ * ans = Results()
+ *
+ * if exp.fixed: # <<<<<<<<<<<<<<
+ * if compute_values:
+ * ans.constant += multiplier*value(exp)
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":567
+ * ans.constant += multiplier*exp
+ * else:
+ * id_ = id(exp) # <<<<<<<<<<<<<<
+ * if id_ in idMap[None]:
+ * key = idMap[None][id_]
+ */
+ /*else*/ {
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 567, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_exp);
+ __Pyx_GIVEREF(__pyx_v_exp);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_exp);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 567, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_id_ = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":568
+ * else:
+ * id_ = id(exp)
+ * if id_ in idMap[None]: # <<<<<<<<<<<<<<
+ * key = idMap[None][id_]
+ * else:
+ */
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_idMap, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 568, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_id_, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 568, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_7 = (__pyx_t_4 != 0);
+ if (__pyx_t_7) {
+
+ /* "pyomo/repn/standard_repn.pyx":569
+ * id_ = id(exp)
+ * if id_ in idMap[None]:
+ * key = idMap[None][id_] # <<<<<<<<<<<<<<
+ * else:
+ * key = len(idMap) - 1
+ */
+ __pyx_t_3 = PyObject_GetItem(__pyx_v_idMap, Py_None); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 569, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_3, __pyx_v_id_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 569, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_key = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":568
+ * else:
+ * id_ = id(exp)
+ * if id_ in idMap[None]: # <<<<<<<<<<<<<<
+ * key = idMap[None][id_]
+ * else:
+ */
+ goto __pyx_L5;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":571
+ * key = idMap[None][id_]
+ * else:
+ * key = len(idMap) - 1 # <<<<<<<<<<<<<<
+ * idMap[None][id_] = key
+ * idMap[key] = exp
+ */
+ /*else*/ {
+ __pyx_t_8 = PyObject_Length(__pyx_v_idMap); if (unlikely(__pyx_t_8 == ((Py_ssize_t)-1))) __PYX_ERR(0, 571, __pyx_L1_error)
+ __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_8 - 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 571, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_key = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":572
+ * else:
+ * key = len(idMap) - 1
+ * idMap[None][id_] = key # <<<<<<<<<<<<<<
+ * idMap[key] = exp
+ * if key in ans.linear:
+ */
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_idMap, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 572, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_id_, __pyx_v_key) < 0)) __PYX_ERR(0, 572, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":573
+ * key = len(idMap) - 1
+ * idMap[None][id_] = key
+ * idMap[key] = exp # <<<<<<<<<<<<<<
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_idMap, __pyx_v_key, __pyx_v_exp) < 0)) __PYX_ERR(0, 573, __pyx_L1_error)
+ }
+ __pyx_L5:;
+
+ /* "pyomo/repn/standard_repn.pyx":574
+ * idMap[None][id_] = key
+ * idMap[key] = exp
+ * if key in ans.linear: # <<<<<<<<<<<<<<
+ * ans.linear[key] += multiplier
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 574, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_7 < 0)) __PYX_ERR(0, 574, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = (__pyx_t_7 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":575
+ * idMap[key] = exp
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier # <<<<<<<<<<<<<<
+ * else:
+ * ans.linear[key] = multiplier
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 575, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_key);
+ __pyx_t_3 = __pyx_v_key;
+ __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 575, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_v_multiplier); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 575, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_3, __pyx_t_6) < 0)) __PYX_ERR(0, 575, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":574
+ * idMap[None][id_] = key
+ * idMap[key] = exp
+ * if key in ans.linear: # <<<<<<<<<<<<<<
+ * ans.linear[key] += multiplier
+ * else:
+ */
+ goto __pyx_L6;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":577
+ * ans.linear[key] += multiplier
+ * else:
+ * ans.linear[key] = multiplier # <<<<<<<<<<<<<<
+ *
+ * return ans
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 577, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_key, __pyx_v_multiplier) < 0)) __PYX_ERR(0, 577, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __pyx_L6:;
+ }
+ __pyx_L3:;
+
+ /* "pyomo/repn/standard_repn.pyx":579
+ * ans.linear[key] = multiplier
+ *
+ * return ans # <<<<<<<<<<<<<<
+ *
+ * def _collect_pow(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_ans);
+ __pyx_r = __pyx_v_ans;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":558
+ *
+ * #@profile
+ * def _collect_var(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_var", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_ans);
+ __Pyx_XDECREF(__pyx_v_id_);
+ __Pyx_XDECREF(__pyx_v_key);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":581
+ * return ans
+ *
+ * def _collect_pow(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._args_[1].__class__ in native_numeric_types:
+ * exponent = exp._args_[1]
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_11_collect_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_11_collect_pow = {"_collect_pow", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_11_collect_pow, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_11_collect_pow(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_collect_pow (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_multiplier,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_pow", 1, 6, 6, 1); __PYX_ERR(0, 581, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_pow", 1, 6, 6, 2); __PYX_ERR(0, 581, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_pow", 1, 6, 6, 3); __PYX_ERR(0, 581, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_pow", 1, 6, 6, 4); __PYX_ERR(0, 581, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_pow", 1, 6, 6, 5); __PYX_ERR(0, 581, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_collect_pow") < 0)) __PYX_ERR(0, 581, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_multiplier = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_compute_values = values[3];
+ __pyx_v_verbose = values[4];
+ __pyx_v_quadratic = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_collect_pow", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 581, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_10_collect_pow(__pyx_self, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_10_collect_pow(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic) {
+ PyObject *__pyx_v_exponent = NULL;
+ PyObject *__pyx_v_res = NULL;
+ PyObject *__pyx_v_ans = NULL;
+ PyObject *__pyx_v_key = NULL;
+ PyObject *__pyx_v_coef = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ int __pyx_t_9;
+ Py_ssize_t __pyx_t_10;
+ PyObject *(*__pyx_t_11)(PyObject *);
+ PyObject *(*__pyx_t_12)(PyObject *);
+ __Pyx_RefNannySetupContext("_collect_pow", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":582
+ *
+ * def _collect_pow(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * if exp._args_[1].__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * exponent = exp._args_[1]
+ * elif not exp._args_[1].is_potentially_variable():
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 582, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 582, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 582, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":583
+ * def _collect_pow(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * if exp._args_[1].__class__ in native_numeric_types:
+ * exponent = exp._args_[1] # <<<<<<<<<<<<<<
+ * elif not exp._args_[1].is_potentially_variable():
+ * if compute_values:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 583, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 583, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_exponent = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":582
+ *
+ * def _collect_pow(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * if exp._args_[1].__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * exponent = exp._args_[1]
+ * elif not exp._args_[1].is_potentially_variable():
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":584
+ * if exp._args_[1].__class__ in native_numeric_types:
+ * exponent = exp._args_[1]
+ * elif not exp._args_[1].is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * exponent = value(exp._args_[1])
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_2, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 584, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 584, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 584, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 584, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":585
+ * exponent = exp._args_[1]
+ * elif not exp._args_[1].is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * exponent = value(exp._args_[1])
+ * else:
+ */
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 585, __pyx_L1_error)
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":586
+ * elif not exp._args_[1].is_potentially_variable():
+ * if compute_values:
+ * exponent = value(exp._args_[1]) # <<<<<<<<<<<<<<
+ * else:
+ * exponent = exp._args_[1]
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_6};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 586, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_exponent = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":585
+ * exponent = exp._args_[1]
+ * elif not exp._args_[1].is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * exponent = value(exp._args_[1])
+ * else:
+ */
+ goto __pyx_L4;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":588
+ * exponent = value(exp._args_[1])
+ * else:
+ * exponent = exp._args_[1] # <<<<<<<<<<<<<<
+ * else:
+ * res = _collect_standard_repn(exp._args_[1], 1, idMap, compute_values, verbose, quadratic)
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_exponent = __pyx_t_2;
+ __pyx_t_2 = 0;
+ }
+ __pyx_L4:;
+
+ /* "pyomo/repn/standard_repn.pyx":584
+ * if exp._args_[1].__class__ in native_numeric_types:
+ * exponent = exp._args_[1]
+ * elif not exp._args_[1].is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * exponent = value(exp._args_[1])
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":590
+ * exponent = exp._args_[1]
+ * else:
+ * res = _collect_standard_repn(exp._args_[1], 1, idMap, compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0:
+ * # The exponent is variable, so this is a nonlinear expression
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 590, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 590, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_7, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 590, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_t_6, __pyx_int_1, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_t_6, __pyx_int_1, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 590, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_t_6);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_int_1);
+ __Pyx_INCREF(__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_8, __pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_8, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_8, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_5, 5+__pyx_t_8, __pyx_v_quadratic);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 590, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_res = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":591
+ * else:
+ * res = _collect_standard_repn(exp._args_[1], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0: # <<<<<<<<<<<<<<
+ * # The exponent is variable, so this is a nonlinear expression
+ * return Results(nonl=multiplier*exp)
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_const); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_nonl); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_5, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_t_5);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_int_0);
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_9 = ((!__pyx_t_4) != 0);
+ if (!__pyx_t_9) {
+ } else {
+ __pyx_t_3 = __pyx_t_9;
+ goto __pyx_L6_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_linear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_9 = ((__pyx_t_10 > 0) != 0);
+ if (!__pyx_t_9) {
+ } else {
+ __pyx_t_3 = __pyx_t_9;
+ goto __pyx_L6_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 591, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_9 = ((__pyx_t_10 > 0) != 0);
+ __pyx_t_3 = __pyx_t_9;
+ __pyx_L6_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":593
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0:
+ * # The exponent is variable, so this is a nonlinear expression
+ * return Results(nonl=multiplier*exp) # <<<<<<<<<<<<<<
+ * exponent = res.constant
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 593, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 593, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_exp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 593, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nonl, __pyx_t_7) < 0) __PYX_ERR(0, 593, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 593, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_7;
+ __pyx_t_7 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":591
+ * else:
+ * res = _collect_standard_repn(exp._args_[1], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0: # <<<<<<<<<<<<<<
+ * # The exponent is variable, so this is a nonlinear expression
+ * return Results(nonl=multiplier*exp)
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":594
+ * # The exponent is variable, so this is a nonlinear expression
+ * return Results(nonl=multiplier*exp)
+ * exponent = res.constant # <<<<<<<<<<<<<<
+ *
+ * if exponent == 0:
+ */
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_constant); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 594, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_v_exponent = __pyx_t_7;
+ __pyx_t_7 = 0;
+ }
+ __pyx_L3:;
+
+ /* "pyomo/repn/standard_repn.pyx":596
+ * exponent = res.constant
+ *
+ * if exponent == 0: # <<<<<<<<<<<<<<
+ * return Results(constant=multiplier)
+ * elif exponent == 1:
+ */
+ __pyx_t_7 = __Pyx_PyInt_EqObjC(__pyx_v_exponent, __pyx_int_0, 0, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 596, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 596, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":597
+ *
+ * if exponent == 0:
+ * return Results(constant=multiplier) # <<<<<<<<<<<<<<
+ * elif exponent == 1:
+ * return _collect_standard_repn(exp._args_[0], multiplier, idMap, compute_values, verbose, quadratic)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 597, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 597, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_constant, __pyx_v_multiplier) < 0) __PYX_ERR(0, 597, __pyx_L1_error)
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 597, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":596
+ * exponent = res.constant
+ *
+ * if exponent == 0: # <<<<<<<<<<<<<<
+ * return Results(constant=multiplier)
+ * elif exponent == 1:
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":598
+ * if exponent == 0:
+ * return Results(constant=multiplier)
+ * elif exponent == 1: # <<<<<<<<<<<<<<
+ * return _collect_standard_repn(exp._args_[0], multiplier, idMap, compute_values, verbose, quadratic)
+ * # If the exponent is >= 2, then this is a nonlinear expression
+ */
+ __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_exponent, __pyx_int_1, 1, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 598, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 598, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":599
+ * return Results(constant=multiplier)
+ * elif exponent == 1:
+ * return _collect_standard_repn(exp._args_[0], multiplier, idMap, compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * # If the exponent is >= 2, then this is a nonlinear expression
+ * if exponent == 2 and quadratic:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 599, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 599, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 599, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_t_5, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_t_5, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 599, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_t_5);
+ __Pyx_INCREF(__pyx_v_multiplier);
+ __Pyx_GIVEREF(__pyx_v_multiplier);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_v_multiplier);
+ __Pyx_INCREF(__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_8, __pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_8, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_8, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_6, 5+__pyx_t_8, __pyx_v_quadratic);
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 599, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":598
+ * if exponent == 0:
+ * return Results(constant=multiplier)
+ * elif exponent == 1: # <<<<<<<<<<<<<<
+ * return _collect_standard_repn(exp._args_[0], multiplier, idMap, compute_values, verbose, quadratic)
+ * # If the exponent is >= 2, then this is a nonlinear expression
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":601
+ * return _collect_standard_repn(exp._args_[0], multiplier, idMap, compute_values, verbose, quadratic)
+ * # If the exponent is >= 2, then this is a nonlinear expression
+ * if exponent == 2 and quadratic: # <<<<<<<<<<<<<<
+ * # NOTE: We treat a product of linear terms as nonlinear unless quadratic==2
+ * res =_collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ */
+ __pyx_t_2 = __Pyx_PyInt_EqObjC(__pyx_v_exponent, __pyx_int_2, 2, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 601, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 601, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__pyx_t_9) {
+ } else {
+ __pyx_t_3 = __pyx_t_9;
+ goto __pyx_L11_bool_binop_done;
+ }
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_v_quadratic); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 601, __pyx_L1_error)
+ __pyx_t_3 = __pyx_t_9;
+ __pyx_L11_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":603
+ * if exponent == 2 and quadratic:
+ * # NOTE: We treat a product of linear terms as nonlinear unless quadratic==2
+ * res =_collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * if not isclose_const(res.nonl,0) or len(res.quadratic) > 0:
+ * return Results(nonl=multiplier*exp)
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 603, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 603, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 603, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_t_5, __pyx_int_1, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_t_5, __pyx_int_1, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 603, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_8, __pyx_t_5);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_8, __pyx_int_1);
+ __Pyx_INCREF(__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_8, __pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_8, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_7, 4+__pyx_t_8, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_7, 5+__pyx_t_8, __pyx_v_quadratic);
+ __pyx_t_5 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 603, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_res, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":604
+ * # NOTE: We treat a product of linear terms as nonlinear unless quadratic==2
+ * res =_collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.quadratic) > 0: # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ * ans = Results()
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_const); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 604, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_nonl); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 604, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_5 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_7, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 604, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_t_7);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_int_0);
+ __pyx_t_7 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_9 < 0)) __PYX_ERR(0, 604, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = ((!__pyx_t_9) != 0);
+ if (!__pyx_t_4) {
+ } else {
+ __pyx_t_3 = __pyx_t_4;
+ goto __pyx_L14_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 604, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = ((__pyx_t_10 > 0) != 0);
+ __pyx_t_3 = __pyx_t_4;
+ __pyx_L14_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":605
+ * res =_collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.quadratic) > 0:
+ * return Results(nonl=multiplier*exp) # <<<<<<<<<<<<<<
+ * ans = Results()
+ * if not isclose(res.constant,0):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 605, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 605, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_exp); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 605, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nonl, __pyx_t_6) < 0) __PYX_ERR(0, 605, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 605, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":604
+ * # NOTE: We treat a product of linear terms as nonlinear unless quadratic==2
+ * res =_collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.quadratic) > 0: # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ * ans = Results()
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":606
+ * if not isclose_const(res.nonl,0) or len(res.quadratic) > 0:
+ * return Results(nonl=multiplier*exp)
+ * ans = Results() # <<<<<<<<<<<<<<
+ * if not isclose(res.constant,0):
+ * ans.constant = multiplier*res.constant*res.constant
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 606, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 606, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 606, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_v_ans = __pyx_t_6;
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":607
+ * return Results(nonl=multiplier*exp)
+ * ans = Results()
+ * if not isclose(res.constant,0): # <<<<<<<<<<<<<<
+ * ans.constant = multiplier*res.constant*res.constant
+ * for key, coef in six.iteritems(res.linear):
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_2, __pyx_int_0};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_2, __pyx_int_0};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_t_2);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_int_0);
+ __pyx_t_2 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 607, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 607, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_4 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":608
+ * ans = Results()
+ * if not isclose(res.constant,0):
+ * ans.constant = multiplier*res.constant*res.constant # <<<<<<<<<<<<<<
+ * for key, coef in six.iteritems(res.linear):
+ * ans.linear[key] = 2*multiplier*coef*res.constant
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 608, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 608, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = PyNumber_Multiply(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 608, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_5) < 0) __PYX_ERR(0, 608, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":609
+ * if not isclose(res.constant,0):
+ * ans.constant = multiplier*res.constant*res.constant
+ * for key, coef in six.iteritems(res.linear): # <<<<<<<<<<<<<<
+ * ans.linear[key] = 2*multiplier*coef*res.constant
+ * for key, coef in six.iteritems(res.linear):
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_linear); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_2) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_6};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_2, __pyx_t_6};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_5)) || PyTuple_CheckExact(__pyx_t_5)) {
+ __pyx_t_1 = __pyx_t_5; __Pyx_INCREF(__pyx_t_1); __pyx_t_10 = 0;
+ __pyx_t_11 = NULL;
+ } else {
+ __pyx_t_10 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 609, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_11)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 609, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ } else {
+ if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_10); __Pyx_INCREF(__pyx_t_5); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 609, __pyx_L1_error)
+ #else
+ __pyx_t_5 = PySequence_ITEM(__pyx_t_1, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ }
+ } else {
+ __pyx_t_5 = __pyx_t_11(__pyx_t_1);
+ if (unlikely(!__pyx_t_5)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 609, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_5))) || (PyList_CheckExact(__pyx_t_5))) {
+ PyObject* sequence = __pyx_t_5;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 609, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_7 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_6);
+ #else
+ __pyx_t_7 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_2 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 609, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_12 = Py_TYPE(__pyx_t_2)->tp_iternext;
+ index = 0; __pyx_t_7 = __pyx_t_12(__pyx_t_2); if (unlikely(!__pyx_t_7)) goto __pyx_L19_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_7);
+ index = 1; __pyx_t_6 = __pyx_t_12(__pyx_t_2); if (unlikely(!__pyx_t_6)) goto __pyx_L19_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_2), 2) < 0) __PYX_ERR(0, 609, __pyx_L1_error)
+ __pyx_t_12 = NULL;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ goto __pyx_L20_unpacking_done;
+ __pyx_L19_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_12 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 609, __pyx_L1_error)
+ __pyx_L20_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_coef, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":610
+ * ans.constant = multiplier*res.constant*res.constant
+ * for key, coef in six.iteritems(res.linear):
+ * ans.linear[key] = 2*multiplier*coef*res.constant # <<<<<<<<<<<<<<
+ * for key, coef in six.iteritems(res.linear):
+ * ans.quadratic[key,key] = multiplier*coef
+ */
+ __pyx_t_5 = PyNumber_Multiply(__pyx_int_2, __pyx_v_multiplier); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 610, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = PyNumber_Multiply(__pyx_t_5, __pyx_v_coef); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 610, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_constant); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 610, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = PyNumber_Multiply(__pyx_t_6, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 610, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 610, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (unlikely(PyObject_SetItem(__pyx_t_5, __pyx_v_key, __pyx_t_7) < 0)) __PYX_ERR(0, 610, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":609
+ * if not isclose(res.constant,0):
+ * ans.constant = multiplier*res.constant*res.constant
+ * for key, coef in six.iteritems(res.linear): # <<<<<<<<<<<<<<
+ * ans.linear[key] = 2*multiplier*coef*res.constant
+ * for key, coef in six.iteritems(res.linear):
+ */
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":607
+ * return Results(nonl=multiplier*exp)
+ * ans = Results()
+ * if not isclose(res.constant,0): # <<<<<<<<<<<<<<
+ * ans.constant = multiplier*res.constant*res.constant
+ * for key, coef in six.iteritems(res.linear):
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":611
+ * for key, coef in six.iteritems(res.linear):
+ * ans.linear[key] = 2*multiplier*coef*res.constant
+ * for key, coef in six.iteritems(res.linear): # <<<<<<<<<<<<<<
+ * ans.quadratic[key,key] = multiplier*coef
+ * return ans
+ */
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_linear); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_5 = __pyx_t_1; __Pyx_INCREF(__pyx_t_5); __pyx_t_10 = 0;
+ __pyx_t_11 = NULL;
+ } else {
+ __pyx_t_10 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_11 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 611, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_11)) {
+ if (likely(PyList_CheckExact(__pyx_t_5))) {
+ if (__pyx_t_10 >= PyList_GET_SIZE(__pyx_t_5)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 611, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_10 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_10); __Pyx_INCREF(__pyx_t_1); __pyx_t_10++; if (unlikely(0 < 0)) __PYX_ERR(0, 611, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_5, __pyx_t_10); __pyx_t_10++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_11(__pyx_t_5);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 611, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 611, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_7 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_7);
+ #else
+ __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 611, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_12 = Py_TYPE(__pyx_t_6)->tp_iternext;
+ index = 0; __pyx_t_2 = __pyx_t_12(__pyx_t_6); if (unlikely(!__pyx_t_2)) goto __pyx_L23_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_2);
+ index = 1; __pyx_t_7 = __pyx_t_12(__pyx_t_6); if (unlikely(!__pyx_t_7)) goto __pyx_L23_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_12(__pyx_t_6), 2) < 0) __PYX_ERR(0, 611, __pyx_L1_error)
+ __pyx_t_12 = NULL;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L24_unpacking_done;
+ __pyx_L23_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_12 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 611, __pyx_L1_error)
+ __pyx_L24_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_coef, __pyx_t_7);
+ __pyx_t_7 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":612
+ * ans.linear[key] = 2*multiplier*coef*res.constant
+ * for key, coef in six.iteritems(res.linear):
+ * ans.quadratic[key,key] = multiplier*coef # <<<<<<<<<<<<<<
+ * return ans
+ *
+ */
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_coef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 612, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 612, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 612, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_key);
+ __Pyx_GIVEREF(__pyx_v_key);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
+ __Pyx_INCREF(__pyx_v_key);
+ __Pyx_GIVEREF(__pyx_v_key);
+ PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_key);
+ if (unlikely(PyObject_SetItem(__pyx_t_7, __pyx_t_2, __pyx_t_1) < 0)) __PYX_ERR(0, 612, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":611
+ * for key, coef in six.iteritems(res.linear):
+ * ans.linear[key] = 2*multiplier*coef*res.constant
+ * for key, coef in six.iteritems(res.linear): # <<<<<<<<<<<<<<
+ * ans.quadratic[key,key] = multiplier*coef
+ * return ans
+ */
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":613
+ * for key, coef in six.iteritems(res.linear):
+ * ans.quadratic[key,key] = multiplier*coef
+ * return ans # <<<<<<<<<<<<<<
+ *
+ * return Results(nonl=multiplier*exp)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_ans);
+ __pyx_r = __pyx_v_ans;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":601
+ * return _collect_standard_repn(exp._args_[0], multiplier, idMap, compute_values, verbose, quadratic)
+ * # If the exponent is >= 2, then this is a nonlinear expression
+ * if exponent == 2 and quadratic: # <<<<<<<<<<<<<<
+ * # NOTE: We treat a product of linear terms as nonlinear unless quadratic==2
+ * res =_collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":615
+ * return ans
+ *
+ * return Results(nonl=multiplier*exp) # <<<<<<<<<<<<<<
+ *
+ * def _collect_reciprocal(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 615, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 615, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_exp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_nonl, __pyx_t_2) < 0) __PYX_ERR(0, 615, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 615, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":581
+ * return ans
+ *
+ * def _collect_pow(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._args_[1].__class__ in native_numeric_types:
+ * exponent = exp._args_[1]
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_pow", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_exponent);
+ __Pyx_XDECREF(__pyx_v_res);
+ __Pyx_XDECREF(__pyx_v_ans);
+ __Pyx_XDECREF(__pyx_v_key);
+ __Pyx_XDECREF(__pyx_v_coef);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":617
+ * return Results(nonl=multiplier*exp)
+ *
+ * def _collect_reciprocal(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._args_[0].__class__ in native_numeric_types or not exp._args_[0].is_potentially_variable():
+ * if compute_values:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_13_collect_reciprocal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_13_collect_reciprocal = {"_collect_reciprocal", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_13_collect_reciprocal, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_13_collect_reciprocal(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_collect_reciprocal (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_multiplier,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_reciprocal", 1, 6, 6, 1); __PYX_ERR(0, 617, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_reciprocal", 1, 6, 6, 2); __PYX_ERR(0, 617, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_reciprocal", 1, 6, 6, 3); __PYX_ERR(0, 617, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_reciprocal", 1, 6, 6, 4); __PYX_ERR(0, 617, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_reciprocal", 1, 6, 6, 5); __PYX_ERR(0, 617, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_collect_reciprocal") < 0)) __PYX_ERR(0, 617, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_multiplier = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_compute_values = values[3];
+ __pyx_v_verbose = values[4];
+ __pyx_v_quadratic = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_collect_reciprocal", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 617, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_reciprocal", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_12_collect_reciprocal(__pyx_self, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_12_collect_reciprocal(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic) {
+ PyObject *__pyx_v_denom = NULL;
+ PyObject *__pyx_v_res = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ int __pyx_t_9;
+ Py_ssize_t __pyx_t_10;
+ __Pyx_RefNannySetupContext("_collect_reciprocal", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":618
+ *
+ * def _collect_reciprocal(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * if exp._args_[0].__class__ in native_numeric_types or not exp._args_[0].is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * denom = 1.0 * value(exp._args_[0])
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_3, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 618, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_5 = (__pyx_t_4 != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_1 = __pyx_t_5;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 618, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 618, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 618, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_5 < 0)) __PYX_ERR(0, 618, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = ((!__pyx_t_5) != 0);
+ __pyx_t_1 = __pyx_t_4;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/repn/standard_repn.pyx":619
+ * def _collect_reciprocal(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * if exp._args_[0].__class__ in native_numeric_types or not exp._args_[0].is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * denom = 1.0 * value(exp._args_[0])
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 619, __pyx_L1_error)
+ if (__pyx_t_1) {
+
+ /* "pyomo/repn/standard_repn.pyx":620
+ * if exp._args_[0].__class__ in native_numeric_types or not exp._args_[0].is_potentially_variable():
+ * if compute_values:
+ * denom = 1.0 * value(exp._args_[0]) # <<<<<<<<<<<<<<
+ * else:
+ * denom = 1.0 * exp._args_[0]
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 620, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 620, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_7); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_7};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(1+1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 620, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+1, __pyx_t_7);
+ __pyx_t_7 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 620, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Multiply(__pyx_float_1_0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 620, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_denom = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":619
+ * def _collect_reciprocal(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * if exp._args_[0].__class__ in native_numeric_types or not exp._args_[0].is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * denom = 1.0 * value(exp._args_[0])
+ * else:
+ */
+ goto __pyx_L6;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":622
+ * denom = 1.0 * value(exp._args_[0])
+ * else:
+ * denom = 1.0 * exp._args_[0] # <<<<<<<<<<<<<<
+ * else:
+ * res =_collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ */
+ /*else*/ {
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_2, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 622, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Multiply(__pyx_float_1_0, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 622, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_denom = __pyx_t_2;
+ __pyx_t_2 = 0;
+ }
+ __pyx_L6:;
+
+ /* "pyomo/repn/standard_repn.pyx":618
+ *
+ * def _collect_reciprocal(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * if exp._args_[0].__class__ in native_numeric_types or not exp._args_[0].is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * denom = 1.0 * value(exp._args_[0])
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":624
+ * denom = 1.0 * exp._args_[0]
+ * else:
+ * res =_collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0:
+ * return Results(nonl=multiplier*exp)
+ */
+ /*else*/ {
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 624, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 624, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_7 = __Pyx_GetItemInt(__pyx_t_8, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 624, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_8)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_8, __pyx_t_7, __pyx_int_1, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 6+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_8, __pyx_t_7, __pyx_int_1, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 6+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(6+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 624, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_8) {
+ __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_t_7);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_int_1);
+ __Pyx_INCREF(__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_9, __pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_9, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_9, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_6, 5+__pyx_t_9, __pyx_v_quadratic);
+ __pyx_t_7 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_res = __pyx_t_2;
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":625
+ * else:
+ * res =_collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0: # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ * else:
+ */
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_const); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_nonl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_7, __pyx_t_6, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_9, __pyx_t_6);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_9, __pyx_int_0);
+ __pyx_t_6 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = ((!__pyx_t_4) != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_1 = __pyx_t_5;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_linear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = ((__pyx_t_10 > 0) != 0);
+ if (!__pyx_t_5) {
+ } else {
+ __pyx_t_1 = __pyx_t_5;
+ goto __pyx_L8_bool_binop_done;
+ }
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 625, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_5 = ((__pyx_t_10 > 0) != 0);
+ __pyx_t_1 = __pyx_t_5;
+ __pyx_L8_bool_binop_done:;
+ if (__pyx_t_1) {
+
+ /* "pyomo/repn/standard_repn.pyx":626
+ * res =_collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0:
+ * return Results(nonl=multiplier*exp) # <<<<<<<<<<<<<<
+ * else:
+ * denom = 1.0*res.constant
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 626, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 626, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_exp); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 626, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_nonl, __pyx_t_8) < 0) __PYX_ERR(0, 626, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 626, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_8;
+ __pyx_t_8 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":625
+ * else:
+ * res =_collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0: # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ * else:
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":628
+ * return Results(nonl=multiplier*exp)
+ * else:
+ * denom = 1.0*res.constant # <<<<<<<<<<<<<<
+ * if isclose_const(denom, 0):
+ * raise ZeroDivisionError()
+ */
+ /*else*/ {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_constant); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 628, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_float_1_0, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 628, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_v_denom = __pyx_t_3;
+ __pyx_t_3 = 0;
+ }
+ }
+ __pyx_L3:;
+
+ /* "pyomo/repn/standard_repn.pyx":629
+ * else:
+ * denom = 1.0*res.constant
+ * if isclose_const(denom, 0): # <<<<<<<<<<<<<<
+ * raise ZeroDivisionError()
+ * return Results(constant=multiplier/denom)
+ */
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_const); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 629, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_2 = NULL;
+ __pyx_t_9 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ __pyx_t_9 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_denom, __pyx_int_0};
+ __pyx_t_3 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_2, __pyx_v_denom, __pyx_int_0};
+ __pyx_t_3 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-__pyx_t_9, 2+__pyx_t_9); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_3);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 629, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_2) {
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_denom);
+ __Pyx_GIVEREF(__pyx_v_denom);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_9, __pyx_v_denom);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_9, __pyx_int_0);
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 629, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) __PYX_ERR(0, 629, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (__pyx_t_1) {
+
+ /* "pyomo/repn/standard_repn.pyx":630
+ * denom = 1.0*res.constant
+ * if isclose_const(denom, 0):
+ * raise ZeroDivisionError() # <<<<<<<<<<<<<<
+ * return Results(constant=multiplier/denom)
+ *
+ */
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_builtin_ZeroDivisionError); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 630, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_Raise(__pyx_t_3, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __PYX_ERR(0, 630, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":629
+ * else:
+ * denom = 1.0*res.constant
+ * if isclose_const(denom, 0): # <<<<<<<<<<<<<<
+ * raise ZeroDivisionError()
+ * return Results(constant=multiplier/denom)
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":631
+ * if isclose_const(denom, 0):
+ * raise ZeroDivisionError()
+ * return Results(constant=multiplier/denom) # <<<<<<<<<<<<<<
+ *
+ * def _collect_branching_expr(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 631, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 631, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = __Pyx_PyNumber_Divide(__pyx_v_multiplier, __pyx_v_denom); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 631, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_8, __pyx_n_s_constant, __pyx_t_6) < 0) __PYX_ERR(0, 631, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 631, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":617
+ * return Results(nonl=multiplier*exp)
+ *
+ * def _collect_reciprocal(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._args_[0].__class__ in native_numeric_types or not exp._args_[0].is_potentially_variable():
+ * if compute_values:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_reciprocal", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_denom);
+ __Pyx_XDECREF(__pyx_v_res);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":633
+ * return Results(constant=multiplier/denom)
+ *
+ * def _collect_branching_expr(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._if.__class__ in native_numeric_types:
+ * if_val = exp._if
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_15_collect_branching_expr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_15_collect_branching_expr = {"_collect_branching_expr", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_15_collect_branching_expr, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_15_collect_branching_expr(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_collect_branching_expr (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_multiplier,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_branching_expr", 1, 6, 6, 1); __PYX_ERR(0, 633, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_branching_expr", 1, 6, 6, 2); __PYX_ERR(0, 633, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_branching_expr", 1, 6, 6, 3); __PYX_ERR(0, 633, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_branching_expr", 1, 6, 6, 4); __PYX_ERR(0, 633, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_branching_expr", 1, 6, 6, 5); __PYX_ERR(0, 633, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_collect_branching_expr") < 0)) __PYX_ERR(0, 633, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_multiplier = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_compute_values = values[3];
+ __pyx_v_verbose = values[4];
+ __pyx_v_quadratic = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_collect_branching_expr", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 633, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_branching_expr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_14_collect_branching_expr(__pyx_self, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_14_collect_branching_expr(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic) {
+ PyObject *__pyx_v_if_val = NULL;
+ PyObject *__pyx_v_res = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ int __pyx_t_9;
+ Py_ssize_t __pyx_t_10;
+ __Pyx_RefNannySetupContext("_collect_branching_expr", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":634
+ *
+ * def _collect_branching_expr(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * if exp._if.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if_val = exp._if
+ * elif not exp._if.is_potentially_variable():
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_if); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_class); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 634, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 634, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_2, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 634, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":635
+ * def _collect_branching_expr(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * if exp._if.__class__ in native_numeric_types:
+ * if_val = exp._if # <<<<<<<<<<<<<<
+ * elif not exp._if.is_potentially_variable():
+ * if compute_values:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_if); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 635, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_if_val = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":634
+ *
+ * def _collect_branching_expr(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * if exp._if.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * if_val = exp._if
+ * elif not exp._if.is_potentially_variable():
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":636
+ * if exp._if.__class__ in native_numeric_types:
+ * if_val = exp._if
+ * elif not exp._if.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * if_val = value(exp._if)
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_if); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 636, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 636, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 636, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 636, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_3 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":637
+ * if_val = exp._if
+ * elif not exp._if.is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * if_val = value(exp._if)
+ * else:
+ */
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 637, __pyx_L1_error)
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":638
+ * elif not exp._if.is_potentially_variable():
+ * if compute_values:
+ * if_val = value(exp._if) # <<<<<<<<<<<<<<
+ * else:
+ * return Results(nonl=multiplier*exp)
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_if); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_t_2};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(1+1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+1, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 638, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_v_if_val = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":637
+ * if_val = exp._if
+ * elif not exp._if.is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * if_val = value(exp._if)
+ * else:
+ */
+ goto __pyx_L4;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":640
+ * if_val = value(exp._if)
+ * else:
+ * return Results(nonl=multiplier*exp) # <<<<<<<<<<<<<<
+ * else:
+ * res = _collect_standard_repn(exp._if, 1, idMap, compute_values, verbose, quadratic)
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 640, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 640, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_exp); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 640, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_nonl, __pyx_t_7) < 0) __PYX_ERR(0, 640, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 640, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_7;
+ __pyx_t_7 = 0;
+ goto __pyx_L0;
+ }
+ __pyx_L4:;
+
+ /* "pyomo/repn/standard_repn.pyx":636
+ * if exp._if.__class__ in native_numeric_types:
+ * if_val = exp._if
+ * elif not exp._if.is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * if_val = value(exp._if)
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":642
+ * return Results(nonl=multiplier*exp)
+ * else:
+ * res = _collect_standard_repn(exp._if, 1, idMap, compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0:
+ * return Results(nonl=multiplier*exp)
+ */
+ /*else*/ {
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 642, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_if); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 642, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_2, __pyx_t_1, __pyx_int_1, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 642, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_2, __pyx_t_1, __pyx_int_1, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 642, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 642, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_2) {
+ __Pyx_GIVEREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2); __pyx_t_2 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_t_1);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_int_1);
+ __Pyx_INCREF(__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_8, __pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_8, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_8, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_6, 5+__pyx_t_8, __pyx_v_quadratic);
+ __pyx_t_1 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 642, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_v_res = __pyx_t_7;
+ __pyx_t_7 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":643
+ * else:
+ * res = _collect_standard_repn(exp._if, 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0: # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ * else:
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_const); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_nonl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_6, __pyx_int_0};
+ __pyx_t_7 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 643, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_1, __pyx_t_6, __pyx_int_0};
+ __pyx_t_7 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 643, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_2 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__pyx_t_1) {
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_2, 0+__pyx_t_8, __pyx_t_6);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_2, 1+__pyx_t_8, __pyx_int_0);
+ __pyx_t_6 = 0;
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_2, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 643, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_9 = ((!__pyx_t_4) != 0);
+ if (!__pyx_t_9) {
+ } else {
+ __pyx_t_3 = __pyx_t_9;
+ goto __pyx_L6_bool_binop_done;
+ }
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_linear); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_10 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 643, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_9 = ((__pyx_t_10 > 0) != 0);
+ if (!__pyx_t_9) {
+ } else {
+ __pyx_t_3 = __pyx_t_9;
+ goto __pyx_L6_bool_binop_done;
+ }
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 643, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_10 = PyObject_Length(__pyx_t_7); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 643, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_9 = ((__pyx_t_10 > 0) != 0);
+ __pyx_t_3 = __pyx_t_9;
+ __pyx_L6_bool_binop_done:;
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":644
+ * res = _collect_standard_repn(exp._if, 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0:
+ * return Results(nonl=multiplier*exp) # <<<<<<<<<<<<<<
+ * else:
+ * if_val = res.constant
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 644, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_5 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 644, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_exp); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_nonl, __pyx_t_2) < 0) __PYX_ERR(0, 644, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 644, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":643
+ * else:
+ * res = _collect_standard_repn(exp._if, 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0: # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ * else:
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":646
+ * return Results(nonl=multiplier*exp)
+ * else:
+ * if_val = res.constant # <<<<<<<<<<<<<<
+ * if if_val:
+ * return _collect_standard_repn(exp._then, multiplier, idMap, compute_values, verbose, quadratic)
+ */
+ /*else*/ {
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_v_if_val = __pyx_t_2;
+ __pyx_t_2 = 0;
+ }
+ }
+ __pyx_L3:;
+
+ /* "pyomo/repn/standard_repn.pyx":647
+ * else:
+ * if_val = res.constant
+ * if if_val: # <<<<<<<<<<<<<<
+ * return _collect_standard_repn(exp._then, multiplier, idMap, compute_values, verbose, quadratic)
+ * else:
+ */
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_if_val); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 647, __pyx_L1_error)
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":648
+ * if_val = res.constant
+ * if if_val:
+ * return _collect_standard_repn(exp._then, multiplier, idMap, compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * else:
+ * return _collect_standard_repn(exp._else, multiplier, idMap, compute_values, verbose, quadratic)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 648, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_then); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 648, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_6 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_t_7, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_t_7, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_1 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 648, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_1, 0+__pyx_t_8, __pyx_t_7);
+ __Pyx_INCREF(__pyx_v_multiplier);
+ __Pyx_GIVEREF(__pyx_v_multiplier);
+ PyTuple_SET_ITEM(__pyx_t_1, 1+__pyx_t_8, __pyx_v_multiplier);
+ __Pyx_INCREF(__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_1, 2+__pyx_t_8, __pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_1, 3+__pyx_t_8, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_1, 4+__pyx_t_8, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_1, 5+__pyx_t_8, __pyx_v_quadratic);
+ __pyx_t_7 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 648, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":647
+ * else:
+ * if_val = res.constant
+ * if if_val: # <<<<<<<<<<<<<<
+ * return _collect_standard_repn(exp._then, multiplier, idMap, compute_values, verbose, quadratic)
+ * else:
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":650
+ * return _collect_standard_repn(exp._then, multiplier, idMap, compute_values, verbose, quadratic)
+ * else:
+ * return _collect_standard_repn(exp._else, multiplier, idMap, compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ *
+ * def _collect_nonl(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 650, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_else); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 650, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_7 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_t_1, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_7, __pyx_t_1, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 650, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_7) {
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_8, __pyx_t_1);
+ __Pyx_INCREF(__pyx_v_multiplier);
+ __Pyx_GIVEREF(__pyx_v_multiplier);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_8, __pyx_v_multiplier);
+ __Pyx_INCREF(__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_8, __pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_8, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_8, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_6, 5+__pyx_t_8, __pyx_v_quadratic);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 650, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":633
+ * return Results(constant=multiplier/denom)
+ *
+ * def _collect_branching_expr(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._if.__class__ in native_numeric_types:
+ * if_val = exp._if
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_branching_expr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_if_val);
+ __Pyx_XDECREF(__pyx_v_res);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":652
+ * return _collect_standard_repn(exp._else, multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ * def _collect_nonl(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * res = _collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_17_collect_nonl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_17_collect_nonl = {"_collect_nonl", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_17_collect_nonl, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_17_collect_nonl(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_collect_nonl (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_multiplier,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_nonl", 1, 6, 6, 1); __PYX_ERR(0, 652, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_nonl", 1, 6, 6, 2); __PYX_ERR(0, 652, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_nonl", 1, 6, 6, 3); __PYX_ERR(0, 652, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_nonl", 1, 6, 6, 4); __PYX_ERR(0, 652, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_nonl", 1, 6, 6, 5); __PYX_ERR(0, 652, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_collect_nonl") < 0)) __PYX_ERR(0, 652, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_multiplier = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_compute_values = values[3];
+ __pyx_v_verbose = values[4];
+ __pyx_v_quadratic = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_collect_nonl", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 652, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_nonl", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_16_collect_nonl(__pyx_self, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_16_collect_nonl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic) {
+ PyObject *__pyx_v_res = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ int __pyx_t_5;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ int __pyx_t_8;
+ int __pyx_t_9;
+ Py_ssize_t __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ __Pyx_RefNannySetupContext("_collect_nonl", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":653
+ *
+ * def _collect_nonl(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * res = _collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0:
+ * return Results(nonl=multiplier*exp)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 653, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 653, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 653, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_3, __pyx_t_4, __pyx_int_1, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 6+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_3, __pyx_t_4, __pyx_int_1, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 6+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(6+__pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 653, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_3) {
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_5, __pyx_t_4);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_5, __pyx_int_1);
+ __Pyx_INCREF(__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_5, __pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_6, 3+__pyx_t_5, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_6, 4+__pyx_t_5, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_6, 5+__pyx_t_5, __pyx_v_quadratic);
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 653, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_res = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":654
+ * def _collect_nonl(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * res = _collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0: # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ * return Results(constant=multiplier*exp._apply_operation([res.constant]))
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_const); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 654, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_nonl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 654, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = NULL;
+ __pyx_t_5 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_5 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_6, __pyx_int_0};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_4, __pyx_t_6, __pyx_int_0};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_5, 2+__pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_3 = PyTuple_New(2+__pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 654, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__pyx_t_4) {
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_3, 0+__pyx_t_5, __pyx_t_6);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_3, 1+__pyx_t_5, __pyx_int_0);
+ __pyx_t_6 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 654, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_9 = ((!__pyx_t_8) != 0);
+ if (!__pyx_t_9) {
+ } else {
+ __pyx_t_7 = __pyx_t_9;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_linear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 654, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_9 = ((__pyx_t_10 > 0) != 0);
+ if (!__pyx_t_9) {
+ } else {
+ __pyx_t_7 = __pyx_t_9;
+ goto __pyx_L4_bool_binop_done;
+ }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 654, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_10 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_10 == ((Py_ssize_t)-1))) __PYX_ERR(0, 654, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_9 = ((__pyx_t_10 > 0) != 0);
+ __pyx_t_7 = __pyx_t_9;
+ __pyx_L4_bool_binop_done:;
+ if (__pyx_t_7) {
+
+ /* "pyomo/repn/standard_repn.pyx":655
+ * res = _collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0:
+ * return Results(nonl=multiplier*exp) # <<<<<<<<<<<<<<
+ * return Results(constant=multiplier*exp._apply_operation([res.constant]))
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 655, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_exp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 655, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nonl, __pyx_t_3) < 0) __PYX_ERR(0, 655, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 655, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":654
+ * def _collect_nonl(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * res = _collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0: # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ * return Results(constant=multiplier*exp._apply_operation([res.constant]))
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":656
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0:
+ * return Results(nonl=multiplier*exp)
+ * return Results(constant=multiplier*exp._apply_operation([res.constant])) # <<<<<<<<<<<<<<
+ *
+ * def _collect_negation(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_apply_operation); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_res, __pyx_n_s_constant); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_11 = PyList_New(1); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyList_SET_ITEM(__pyx_t_11, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_6))) {
+ __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_6);
+ if (likely(__pyx_t_4)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_4);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_6, function);
+ }
+ }
+ if (!__pyx_t_4) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_11); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_11};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_6)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_4, __pyx_t_11};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_6, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_4); __pyx_t_4 = NULL;
+ __Pyx_GIVEREF(__pyx_t_11);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+1, __pyx_t_11);
+ __pyx_t_11 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_12, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_constant, __pyx_t_6) < 0) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 656, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":652
+ * return _collect_standard_repn(exp._else, multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ * def _collect_nonl(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * res = _collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_nonl", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_res);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":658
+ * return Results(constant=multiplier*exp._apply_operation([res.constant]))
+ *
+ * def _collect_negation(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * return _collect_standard_repn(exp._args_[0], -1*multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_19_collect_negation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_19_collect_negation = {"_collect_negation", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_19_collect_negation, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_19_collect_negation(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_collect_negation (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_multiplier,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_negation", 1, 6, 6, 1); __PYX_ERR(0, 658, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_negation", 1, 6, 6, 2); __PYX_ERR(0, 658, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_negation", 1, 6, 6, 3); __PYX_ERR(0, 658, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_negation", 1, 6, 6, 4); __PYX_ERR(0, 658, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_negation", 1, 6, 6, 5); __PYX_ERR(0, 658, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_collect_negation") < 0)) __PYX_ERR(0, 658, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_multiplier = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_compute_values = values[3];
+ __pyx_v_verbose = values[4];
+ __pyx_v_quadratic = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_collect_negation", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 658, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_negation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_18_collect_negation(__pyx_self, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_18_collect_negation(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ __Pyx_RefNannySetupContext("_collect_negation", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":659
+ *
+ * def _collect_negation(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * return _collect_standard_repn(exp._args_[0], -1*multiplier, idMap, compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ *
+ * def _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 659, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 659, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_GetItemInt(__pyx_t_3, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 659, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_Multiply(__pyx_int_neg_1, __pyx_v_multiplier); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 659, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ __pyx_t_6 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_6 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_5, __pyx_t_4, __pyx_t_3, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 6+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_5, __pyx_t_4, __pyx_t_3, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_6, 6+__pyx_t_6); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(6+__pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 659, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_6, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_6, __pyx_t_3);
+ __Pyx_INCREF(__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_7, 2+__pyx_t_6, __pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_7, 3+__pyx_t_6, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_7, 4+__pyx_t_6, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_7, 5+__pyx_t_6, __pyx_v_quadratic);
+ __pyx_t_4 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_7, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 659, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_1;
+ __pyx_t_1 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":658
+ * return Results(constant=multiplier*exp._apply_operation([res.constant]))
+ *
+ * def _collect_negation(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * return _collect_standard_repn(exp._args_[0], -1*multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_negation", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":661
+ * return _collect_standard_repn(exp._args_[0], -1*multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ * def _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._args_[0].__class__ in native_numeric_types:
+ * return Results(constant=exp._args_[0])
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_21_collect_identity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_21_collect_identity = {"_collect_identity", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_21_collect_identity, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_21_collect_identity(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_collect_identity (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_multiplier,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_identity", 1, 6, 6, 1); __PYX_ERR(0, 661, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_identity", 1, 6, 6, 2); __PYX_ERR(0, 661, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_identity", 1, 6, 6, 3); __PYX_ERR(0, 661, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_identity", 1, 6, 6, 4); __PYX_ERR(0, 661, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_identity", 1, 6, 6, 5); __PYX_ERR(0, 661, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_collect_identity") < 0)) __PYX_ERR(0, 661, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_multiplier = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_compute_values = values[3];
+ __pyx_v_verbose = values[4];
+ __pyx_v_quadratic = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_collect_identity", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 661, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_identity", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_20_collect_identity(__pyx_self, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_20_collect_identity(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ __Pyx_RefNannySetupContext("_collect_identity", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":662
+ *
+ * def _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * if exp._args_[0].__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return Results(constant=exp._args_[0])
+ * if not exp._args_[0].is_potentially_variable():
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_class); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 662, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 662, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 662, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":663
+ * def _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * if exp._args_[0].__class__ in native_numeric_types:
+ * return Results(constant=exp._args_[0]) # <<<<<<<<<<<<<<
+ * if not exp._args_[0].is_potentially_variable():
+ * if compute_values:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 663, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 663, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_GetItemInt(__pyx_t_5, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_constant, __pyx_t_6) < 0) __PYX_ERR(0, 663, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 663, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":662
+ *
+ * def _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * if exp._args_[0].__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * return Results(constant=exp._args_[0])
+ * if not exp._args_[0].is_potentially_variable():
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":664
+ * if exp._args_[0].__class__ in native_numeric_types:
+ * return Results(constant=exp._args_[0])
+ * if not exp._args_[0].is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * return Results(constant=value(exp._args_[0]))
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 664, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_is_potentially_variable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 664, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_2)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_2);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_2) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 664, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 664, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_3 = ((!__pyx_t_4) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":665
+ * return Results(constant=exp._args_[0])
+ * if not exp._args_[0].is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * return Results(constant=value(exp._args_[0]))
+ * else:
+ */
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 665, __pyx_L1_error)
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":666
+ * if not exp._args_[0].is_potentially_variable():
+ * if compute_values:
+ * return Results(constant=value(exp._args_[0])) # <<<<<<<<<<<<<<
+ * else:
+ * return Results(constant=exp._args_[0])
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = __Pyx_GetItemInt(__pyx_t_7, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_7 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_7)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_7);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_7) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_7, __pyx_t_8};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
+ __Pyx_GIVEREF(__pyx_t_8);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_constant, __pyx_t_2) < 0) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 666, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_2;
+ __pyx_t_2 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":665
+ * return Results(constant=exp._args_[0])
+ * if not exp._args_[0].is_potentially_variable():
+ * if compute_values: # <<<<<<<<<<<<<<
+ * return Results(constant=value(exp._args_[0]))
+ * else:
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":668
+ * return Results(constant=value(exp._args_[0]))
+ * else:
+ * return Results(constant=exp._args_[0]) # <<<<<<<<<<<<<<
+ * return _collect_standard_repn(exp.expr, multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ */
+ /*else*/ {
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_GetItemInt(__pyx_t_6, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (PyDict_SetItem(__pyx_t_1, __pyx_n_s_constant, __pyx_t_5) < 0) __PYX_ERR(0, 668, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 668, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":664
+ * if exp._args_[0].__class__ in native_numeric_types:
+ * return Results(constant=exp._args_[0])
+ * if not exp._args_[0].is_potentially_variable(): # <<<<<<<<<<<<<<
+ * if compute_values:
+ * return Results(constant=value(exp._args_[0]))
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":669
+ * else:
+ * return Results(constant=exp._args_[0])
+ * return _collect_standard_repn(exp.expr, multiplier, idMap, compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ *
+ * def _collect_linear(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 669, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 669, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = NULL;
+ __pyx_t_10 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ __pyx_t_10 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_t_2, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_5 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 6+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_t_2, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_5 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-__pyx_t_10, 6+__pyx_t_10); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(6+__pyx_t_10); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 669, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_t_2);
+ __Pyx_INCREF(__pyx_v_multiplier);
+ __Pyx_GIVEREF(__pyx_v_multiplier);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_v_multiplier);
+ __Pyx_INCREF(__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_10, __pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_10, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_9, 4+__pyx_t_10, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_9, 5+__pyx_t_10, __pyx_v_quadratic);
+ __pyx_t_2 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_9, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 669, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_r = __pyx_t_5;
+ __pyx_t_5 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":661
+ * return _collect_standard_repn(exp._args_[0], -1*multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ * def _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._args_[0].__class__ in native_numeric_types:
+ * return Results(constant=exp._args_[0])
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_identity", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":671
+ * return _collect_standard_repn(exp.expr, multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ * def _collect_linear(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ * if compute_values:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_23_collect_linear(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_23_collect_linear = {"_collect_linear", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_23_collect_linear, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_23_collect_linear(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_collect_linear (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_multiplier,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_linear", 1, 6, 6, 1); __PYX_ERR(0, 671, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_linear", 1, 6, 6, 2); __PYX_ERR(0, 671, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_linear", 1, 6, 6, 3); __PYX_ERR(0, 671, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_linear", 1, 6, 6, 4); __PYX_ERR(0, 671, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_linear", 1, 6, 6, 5); __PYX_ERR(0, 671, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_collect_linear") < 0)) __PYX_ERR(0, 671, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_multiplier = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_compute_values = values[3];
+ __pyx_v_verbose = values[4];
+ __pyx_v_quadratic = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_collect_linear", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 671, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_linear", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_22_collect_linear(__pyx_self, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_22_collect_linear(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_quadratic) {
+ PyObject *__pyx_v_ans = NULL;
+ PyObject *__pyx_v_c = NULL;
+ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_v_id_ = NULL;
+ PyObject *__pyx_v_key = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ PyObject *__pyx_t_8 = NULL;
+ Py_ssize_t __pyx_t_9;
+ PyObject *(*__pyx_t_10)(PyObject *);
+ PyObject *(*__pyx_t_11)(PyObject *);
+ int __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ __Pyx_RefNannySetupContext("_collect_linear", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":672
+ *
+ * def _collect_linear(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * ans = Results() # <<<<<<<<<<<<<<
+ * if compute_values:
+ * ans.constant = multiplier*value(exp.constant)
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 672, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 672, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_ans = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":673
+ * def _collect_linear(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * ans = Results()
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant = multiplier*value(exp.constant)
+ * else:
+ */
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 673, __pyx_L1_error)
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":674
+ * ans = Results()
+ * if compute_values:
+ * ans.constant = multiplier*value(exp.constant) # <<<<<<<<<<<<<<
+ * else:
+ * ans.constant = multiplier*exp.constant
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 674, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 674, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 674, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 674, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_2) < 0) __PYX_ERR(0, 674, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":673
+ * def _collect_linear(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * ans = Results()
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant = multiplier*value(exp.constant)
+ * else:
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":676
+ * ans.constant = multiplier*value(exp.constant)
+ * else:
+ * ans.constant = multiplier*exp.constant # <<<<<<<<<<<<<<
+ *
+ * for c,v in zip(exp.linear_coefs, exp.linear_vars):
+ */
+ /*else*/ {
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 676, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 676, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_1) < 0) __PYX_ERR(0, 676, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __pyx_L3:;
+
+ /* "pyomo/repn/standard_repn.pyx":678
+ * ans.constant = multiplier*exp.constant
+ *
+ * for c,v in zip(exp.linear_coefs, exp.linear_vars): # <<<<<<<<<<<<<<
+ * if v.fixed:
+ * if compute_values:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_zip); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_linear_coefs); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_linear_vars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_6, __pyx_t_3};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_3);
+ __pyx_t_6 = 0;
+ __pyx_t_3 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_8, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
+ __pyx_t_10 = NULL;
+ } else {
+ __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 678, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_10)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 678, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 678, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_10(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 678, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
+ PyObject* sequence = __pyx_t_1;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 678, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_8 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_3);
+ #else
+ __pyx_t_8 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_6 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 678, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_11 = Py_TYPE(__pyx_t_6)->tp_iternext;
+ index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_8);
+ index = 1; __pyx_t_3 = __pyx_t_11(__pyx_t_6); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_3);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_6), 2) < 0) __PYX_ERR(0, 678, __pyx_L1_error)
+ __pyx_t_11 = NULL;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L7_unpacking_done;
+ __pyx_L6_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_11 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 678, __pyx_L1_error)
+ __pyx_L7_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_8);
+ __pyx_t_8 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":679
+ *
+ * for c,v in zip(exp.linear_coefs, exp.linear_vars):
+ * if v.fixed: # <<<<<<<<<<<<<<
+ * if compute_values:
+ * ans.constant += multiplier*v.value
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_fixed); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 679, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 679, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":680
+ * for c,v in zip(exp.linear_coefs, exp.linear_vars):
+ * if v.fixed:
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier*v.value
+ * else:
+ */
+ __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 680, __pyx_L1_error)
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":681
+ * if v.fixed:
+ * if compute_values:
+ * ans.constant += multiplier*v.value # <<<<<<<<<<<<<<
+ * else:
+ * ans.constant += multiplier*v
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 681, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 681, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_3); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 681, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 681, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_3) < 0) __PYX_ERR(0, 681, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":680
+ * for c,v in zip(exp.linear_coefs, exp.linear_vars):
+ * if v.fixed:
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier*v.value
+ * else:
+ */
+ goto __pyx_L9;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":683
+ * ans.constant += multiplier*v.value
+ * else:
+ * ans.constant += multiplier*v # <<<<<<<<<<<<<<
+ * else:
+ * id_ = id(v)
+ */
+ /*else*/ {
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 683, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_8 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_v); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 683, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 683, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_1) < 0) __PYX_ERR(0, 683, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ }
+ __pyx_L9:;
+
+ /* "pyomo/repn/standard_repn.pyx":679
+ *
+ * for c,v in zip(exp.linear_coefs, exp.linear_vars):
+ * if v.fixed: # <<<<<<<<<<<<<<
+ * if compute_values:
+ * ans.constant += multiplier*v.value
+ */
+ goto __pyx_L8;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":685
+ * ans.constant += multiplier*v
+ * else:
+ * id_ = id(v) # <<<<<<<<<<<<<<
+ * if id_ in idMap[None]:
+ * key = idMap[None][id_]
+ */
+ /*else*/ {
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 685, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_v);
+ __Pyx_GIVEREF(__pyx_v_v);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_v);
+ __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 685, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_id_, __pyx_t_8);
+ __pyx_t_8 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":686
+ * else:
+ * id_ = id(v)
+ * if id_ in idMap[None]: # <<<<<<<<<<<<<<
+ * key = idMap[None][id_]
+ * else:
+ */
+ __pyx_t_8 = PyObject_GetItem(__pyx_v_idMap, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_id_, __pyx_t_8, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 686, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_12 = (__pyx_t_4 != 0);
+ if (__pyx_t_12) {
+
+ /* "pyomo/repn/standard_repn.pyx":687
+ * id_ = id(v)
+ * if id_ in idMap[None]:
+ * key = idMap[None][id_] # <<<<<<<<<<<<<<
+ * else:
+ * key = len(idMap) - 1
+ */
+ __pyx_t_8 = PyObject_GetItem(__pyx_v_idMap, Py_None); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 687, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_8, __pyx_v_id_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 687, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":686
+ * else:
+ * id_ = id(v)
+ * if id_ in idMap[None]: # <<<<<<<<<<<<<<
+ * key = idMap[None][id_]
+ * else:
+ */
+ goto __pyx_L10;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":689
+ * key = idMap[None][id_]
+ * else:
+ * key = len(idMap) - 1 # <<<<<<<<<<<<<<
+ * idMap[None][id_] = key
+ * idMap[key] = v
+ */
+ /*else*/ {
+ __pyx_t_13 = PyObject_Length(__pyx_v_idMap); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 689, __pyx_L1_error)
+ __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_13 - 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":690
+ * else:
+ * key = len(idMap) - 1
+ * idMap[None][id_] = key # <<<<<<<<<<<<<<
+ * idMap[key] = v
+ * if compute_values:
+ */
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_idMap, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 690, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_id_, __pyx_v_key) < 0)) __PYX_ERR(0, 690, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":691
+ * key = len(idMap) - 1
+ * idMap[None][id_] = key
+ * idMap[key] = v # <<<<<<<<<<<<<<
+ * if compute_values:
+ * if key in ans.linear:
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_idMap, __pyx_v_key, __pyx_v_v) < 0)) __PYX_ERR(0, 691, __pyx_L1_error)
+ }
+ __pyx_L10:;
+
+ /* "pyomo/repn/standard_repn.pyx":692
+ * idMap[None][id_] = key
+ * idMap[key] = v
+ * if compute_values: # <<<<<<<<<<<<<<
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier*value(c)
+ */
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 692, __pyx_L1_error)
+ if (__pyx_t_12) {
+
+ /* "pyomo/repn/standard_repn.pyx":693
+ * idMap[key] = v
+ * if compute_values:
+ * if key in ans.linear: # <<<<<<<<<<<<<<
+ * ans.linear[key] += multiplier*value(c)
+ * else:
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 693, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_12 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_t_1, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 693, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_4 = (__pyx_t_12 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":694
+ * if compute_values:
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier*value(c) # <<<<<<<<<<<<<<
+ * else:
+ * ans.linear[key] = multiplier*value(c)
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 694, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_key);
+ __pyx_t_8 = __pyx_v_key;
+ __pyx_t_3 = PyObject_GetItem(__pyx_t_1, __pyx_t_8); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 694, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 694, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_14 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_14)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_14);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (!__pyx_t_14) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 694, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_c};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 694, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_14, __pyx_v_c};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 694, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ {
+ __pyx_t_15 = PyTuple_New(1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 694, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_GIVEREF(__pyx_t_14); PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_t_14); __pyx_t_14 = NULL;
+ __Pyx_INCREF(__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_15, 0+1, __pyx_v_c);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_15, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 694, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 694, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_3, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 694, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_t_8, __pyx_t_6) < 0)) __PYX_ERR(0, 694, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":693
+ * idMap[key] = v
+ * if compute_values:
+ * if key in ans.linear: # <<<<<<<<<<<<<<
+ * ans.linear[key] += multiplier*value(c)
+ * else:
+ */
+ goto __pyx_L12;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":696
+ * ans.linear[key] += multiplier*value(c)
+ * else:
+ * ans.linear[key] = multiplier*value(c) # <<<<<<<<<<<<<<
+ * else:
+ * if key in ans.linear:
+ */
+ /*else*/ {
+ __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_8))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_8);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_8, function);
+ }
+ }
+ if (!__pyx_t_6) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_v_c); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_c};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_8)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_6, __pyx_v_c};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_8, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ __Pyx_INCREF(__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_v_c);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_8 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_key, __pyx_t_8) < 0)) __PYX_ERR(0, 696, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __pyx_L12:;
+
+ /* "pyomo/repn/standard_repn.pyx":692
+ * idMap[None][id_] = key
+ * idMap[key] = v
+ * if compute_values: # <<<<<<<<<<<<<<
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier*value(c)
+ */
+ goto __pyx_L11;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":698
+ * ans.linear[key] = multiplier*value(c)
+ * else:
+ * if key in ans.linear: # <<<<<<<<<<<<<<
+ * ans.linear[key] += multiplier*c
+ * else:
+ */
+ /*else*/ {
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 698, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_4 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_t_8, Py_EQ)); if (unlikely(__pyx_t_4 < 0)) __PYX_ERR(0, 698, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ __pyx_t_12 = (__pyx_t_4 != 0);
+ if (__pyx_t_12) {
+
+ /* "pyomo/repn/standard_repn.pyx":699
+ * else:
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier*c # <<<<<<<<<<<<<<
+ * else:
+ * ans.linear[key] = multiplier*c
+ */
+ __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 699, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __Pyx_INCREF(__pyx_v_key);
+ __pyx_t_1 = __pyx_v_key;
+ __pyx_t_5 = PyObject_GetItem(__pyx_t_8, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 699, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 699, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 699, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_t_8, __pyx_t_1, __pyx_t_3) < 0)) __PYX_ERR(0, 699, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":698
+ * ans.linear[key] = multiplier*value(c)
+ * else:
+ * if key in ans.linear: # <<<<<<<<<<<<<<
+ * ans.linear[key] += multiplier*c
+ * else:
+ */
+ goto __pyx_L13;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":701
+ * ans.linear[key] += multiplier*c
+ * else:
+ * ans.linear[key] = multiplier*c # <<<<<<<<<<<<<<
+ * return ans
+ *
+ */
+ /*else*/ {
+ __pyx_t_8 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_c); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 701, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_8);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_key, __pyx_t_8) < 0)) __PYX_ERR(0, 701, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
+ }
+ __pyx_L13:;
+ }
+ __pyx_L11:;
+ }
+ __pyx_L8:;
+
+ /* "pyomo/repn/standard_repn.pyx":678
+ * ans.constant = multiplier*exp.constant
+ *
+ * for c,v in zip(exp.linear_coefs, exp.linear_vars): # <<<<<<<<<<<<<<
+ * if v.fixed:
+ * if compute_values:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":702
+ * else:
+ * ans.linear[key] = multiplier*c
+ * return ans # <<<<<<<<<<<<<<
+ *
+ * def _collect_comparison(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_ans);
+ __pyx_r = __pyx_v_ans;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":671
+ * return _collect_standard_repn(exp.expr, multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ * def _collect_linear(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ * if compute_values:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_8);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_linear", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_ans);
+ __Pyx_XDECREF(__pyx_v_c);
+ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XDECREF(__pyx_v_id_);
+ __Pyx_XDECREF(__pyx_v_key);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":704
+ * return ans
+ *
+ * def _collect_comparison(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_25_collect_comparison(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_25_collect_comparison = {"_collect_comparison", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_25_collect_comparison, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_25_collect_comparison(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_idMap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_collect_comparison (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_multiplier,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_comparison", 1, 6, 6, 1); __PYX_ERR(0, 704, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_comparison", 1, 6, 6, 2); __PYX_ERR(0, 704, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_comparison", 1, 6, 6, 3); __PYX_ERR(0, 704, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_comparison", 1, 6, 6, 4); __PYX_ERR(0, 704, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_comparison", 1, 6, 6, 5); __PYX_ERR(0, 704, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_collect_comparison") < 0)) __PYX_ERR(0, 704, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_multiplier = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_compute_values = values[3];
+ __pyx_v_verbose = values[4];
+ __pyx_v_quadratic = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_collect_comparison", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 704, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_comparison", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_24_collect_comparison(__pyx_self, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_24_collect_comparison(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, CYTHON_UNUSED PyObject *__pyx_v_idMap, CYTHON_UNUSED PyObject *__pyx_v_compute_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_quadratic) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("_collect_comparison", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":705
+ *
+ * def _collect_comparison(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * return Results(nonl=multiplier*exp) # <<<<<<<<<<<<<<
+ *
+ * def _collect_external_fn(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 705, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 705, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_exp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nonl, __pyx_t_3) < 0) __PYX_ERR(0, 705, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 705, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":704
+ * return ans
+ *
+ * def _collect_comparison(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_comparison", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":707
+ * return Results(nonl=multiplier*exp)
+ *
+ * def _collect_external_fn(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ *
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_27_collect_external_fn(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_27_collect_external_fn = {"_collect_external_fn", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_27_collect_external_fn, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_27_collect_external_fn(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_idMap = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_compute_values = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_collect_external_fn (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_multiplier,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_external_fn", 1, 6, 6, 1); __PYX_ERR(0, 707, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_external_fn", 1, 6, 6, 2); __PYX_ERR(0, 707, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_external_fn", 1, 6, 6, 3); __PYX_ERR(0, 707, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_external_fn", 1, 6, 6, 4); __PYX_ERR(0, 707, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_external_fn", 1, 6, 6, 5); __PYX_ERR(0, 707, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_collect_external_fn") < 0)) __PYX_ERR(0, 707, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_multiplier = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_compute_values = values[3];
+ __pyx_v_verbose = values[4];
+ __pyx_v_quadratic = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_collect_external_fn", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 707, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_external_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_26_collect_external_fn(__pyx_self, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_26_collect_external_fn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, CYTHON_UNUSED PyObject *__pyx_v_idMap, CYTHON_UNUSED PyObject *__pyx_v_compute_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_quadratic) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannySetupContext("_collect_external_fn", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":708
+ *
+ * def _collect_external_fn(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * return Results(nonl=multiplier*exp) # <<<<<<<<<<<<<<
+ *
+ * def _collect_linear_sum(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 708, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 708, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_exp); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_nonl, __pyx_t_3) < 0) __PYX_ERR(0, 708, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 708, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":707
+ * return Results(nonl=multiplier*exp)
+ *
+ * def _collect_external_fn(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ *
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_external_fn", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":710
+ * return Results(nonl=multiplier*exp)
+ *
+ * def _collect_linear_sum(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ * varkeys = idMap[None]
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_29_collect_linear_sum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_29_collect_linear_sum = {"_collect_linear_sum", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_29_collect_linear_sum, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_29_collect_linear_sum(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_verbose = 0;
+ CYTHON_UNUSED PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_collect_linear_sum (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_multiplier,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_linear_sum", 1, 6, 6, 1); __PYX_ERR(0, 710, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_linear_sum", 1, 6, 6, 2); __PYX_ERR(0, 710, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_linear_sum", 1, 6, 6, 3); __PYX_ERR(0, 710, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_linear_sum", 1, 6, 6, 4); __PYX_ERR(0, 710, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_linear_sum", 1, 6, 6, 5); __PYX_ERR(0, 710, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_collect_linear_sum") < 0)) __PYX_ERR(0, 710, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_multiplier = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_compute_values = values[3];
+ __pyx_v_verbose = values[4];
+ __pyx_v_quadratic = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_collect_linear_sum", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 710, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_linear_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_28_collect_linear_sum(__pyx_self, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_28_collect_linear_sum(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, CYTHON_UNUSED PyObject *__pyx_v_verbose, CYTHON_UNUSED PyObject *__pyx_v_quadratic) {
+ PyObject *__pyx_v_ans = NULL;
+ PyObject *__pyx_v_varkeys = NULL;
+ PyObject *__pyx_v_e_ = NULL;
+ PyObject *__pyx_v_c = NULL;
+ PyObject *__pyx_v_v = NULL;
+ PyObject *__pyx_v_id_ = NULL;
+ PyObject *__pyx_v_key = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ int __pyx_t_7;
+ Py_ssize_t __pyx_t_8;
+ PyObject *(*__pyx_t_9)(PyObject *);
+ PyObject *(*__pyx_t_10)(PyObject *);
+ int __pyx_t_11;
+ int __pyx_t_12;
+ Py_ssize_t __pyx_t_13;
+ __Pyx_RefNannySetupContext("_collect_linear_sum", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":711
+ *
+ * def _collect_linear_sum(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * ans = Results() # <<<<<<<<<<<<<<
+ * varkeys = idMap[None]
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_Results); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 711, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (__pyx_t_3) {
+ __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ } else {
+ __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 711, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_v_ans = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":712
+ * def _collect_linear_sum(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ * ans = Results()
+ * varkeys = idMap[None] # <<<<<<<<<<<<<<
+ *
+ * for e_ in itertools.islice(exp._args_, exp.nargs()):
+ */
+ __pyx_t_1 = PyObject_GetItem(__pyx_v_idMap, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 712, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_v_varkeys = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":714
+ * varkeys = idMap[None]
+ *
+ * for e_ in itertools.islice(exp._args_, exp.nargs()): # <<<<<<<<<<<<<<
+ * c,v = e_
+ * if not v is None:
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_itertools); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_islice); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_args); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 714, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_nargs); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 714, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_6) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 714, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 714, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = NULL;
+ __pyx_t_7 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_3))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_3);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_3, function);
+ __pyx_t_7 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_3)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_5, __pyx_t_2, __pyx_t_4};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_3, __pyx_temp+1-__pyx_t_7, 2+__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 714, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__pyx_t_5) {
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, __pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_t_4);
+ __pyx_t_2 = 0;
+ __pyx_t_4 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_6, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_8 = 0;
+ __pyx_t_9 = NULL;
+ } else {
+ __pyx_t_8 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 714, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_9 = Py_TYPE(__pyx_t_3)->tp_iternext; if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 714, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_9)) {
+ if (likely(PyList_CheckExact(__pyx_t_3))) {
+ if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 714, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_8); __Pyx_INCREF(__pyx_t_1); __pyx_t_8++; if (unlikely(0 < 0)) __PYX_ERR(0, 714, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_3, __pyx_t_8); __pyx_t_8++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 714, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_9(__pyx_t_3);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 714, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_e_, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":715
+ *
+ * for e_ in itertools.islice(exp._args_, exp.nargs()):
+ * c,v = e_ # <<<<<<<<<<<<<<
+ * if not v is None:
+ * if v.fixed:
+ */
+ if ((likely(PyTuple_CheckExact(__pyx_v_e_))) || (PyList_CheckExact(__pyx_v_e_))) {
+ PyObject* sequence = __pyx_v_e_;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 715, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_1 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_6);
+ #else
+ __pyx_t_1 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 715, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 715, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_4 = PyObject_GetIter(__pyx_v_e_); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 715, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_10 = Py_TYPE(__pyx_t_4)->tp_iternext;
+ index = 0; __pyx_t_1 = __pyx_t_10(__pyx_t_4); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_1);
+ index = 1; __pyx_t_6 = __pyx_t_10(__pyx_t_4); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_6);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_4), 2) < 0) __PYX_ERR(0, 715, __pyx_L1_error)
+ __pyx_t_10 = NULL;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ goto __pyx_L6_unpacking_done;
+ __pyx_L5_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_10 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 715, __pyx_L1_error)
+ __pyx_L6_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_c, __pyx_t_1);
+ __pyx_t_1 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":716
+ * for e_ in itertools.islice(exp._args_, exp.nargs()):
+ * c,v = e_
+ * if not v is None: # <<<<<<<<<<<<<<
+ * if v.fixed:
+ * if compute_values:
+ */
+ __pyx_t_11 = (__pyx_v_v != Py_None);
+ __pyx_t_12 = (__pyx_t_11 != 0);
+ if (__pyx_t_12) {
+
+ /* "pyomo/repn/standard_repn.pyx":717
+ * c,v = e_
+ * if not v is None:
+ * if v.fixed: # <<<<<<<<<<<<<<
+ * if compute_values:
+ * ans.constant += multiplier*c*v.value
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_fixed); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 717, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 717, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_12) {
+
+ /* "pyomo/repn/standard_repn.pyx":718
+ * if not v is None:
+ * if v.fixed:
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier*c*v.value
+ * else:
+ */
+ __pyx_t_12 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 718, __pyx_L1_error)
+ if (__pyx_t_12) {
+
+ /* "pyomo/repn/standard_repn.pyx":719
+ * if v.fixed:
+ * if compute_values:
+ * ans.constant += multiplier*c*v.value # <<<<<<<<<<<<<<
+ * else:
+ * ans.constant += multiplier*c*v
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_c); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_v, __pyx_n_s_value); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_t_1, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_4) < 0) __PYX_ERR(0, 719, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":718
+ * if not v is None:
+ * if v.fixed:
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier*c*v.value
+ * else:
+ */
+ goto __pyx_L9;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":721
+ * ans.constant += multiplier*c*v.value
+ * else:
+ * ans.constant += multiplier*c*v # <<<<<<<<<<<<<<
+ * else:
+ * id_ = id(v)
+ */
+ /*else*/ {
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 721, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_c); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyNumber_Multiply(__pyx_t_2, __pyx_v_v); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 721, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 721, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_2) < 0) __PYX_ERR(0, 721, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ }
+ __pyx_L9:;
+
+ /* "pyomo/repn/standard_repn.pyx":717
+ * c,v = e_
+ * if not v is None:
+ * if v.fixed: # <<<<<<<<<<<<<<
+ * if compute_values:
+ * ans.constant += multiplier*c*v.value
+ */
+ goto __pyx_L8;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":723
+ * ans.constant += multiplier*c*v
+ * else:
+ * id_ = id(v) # <<<<<<<<<<<<<<
+ * if id_ in varkeys:
+ * key = varkeys[id_]
+ */
+ /*else*/ {
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 723, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_v_v);
+ __Pyx_GIVEREF(__pyx_v_v);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_v);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_2, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 723, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_id_, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":724
+ * else:
+ * id_ = id(v)
+ * if id_ in varkeys: # <<<<<<<<<<<<<<
+ * key = varkeys[id_]
+ * else:
+ */
+ __pyx_t_12 = (__Pyx_PySequence_ContainsTF(__pyx_v_id_, __pyx_v_varkeys, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 724, __pyx_L1_error)
+ __pyx_t_11 = (__pyx_t_12 != 0);
+ if (__pyx_t_11) {
+
+ /* "pyomo/repn/standard_repn.pyx":725
+ * id_ = id(v)
+ * if id_ in varkeys:
+ * key = varkeys[id_] # <<<<<<<<<<<<<<
+ * else:
+ * key = len(idMap) - 1
+ */
+ __pyx_t_6 = PyObject_GetItem(__pyx_v_varkeys, __pyx_v_id_); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 725, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":724
+ * else:
+ * id_ = id(v)
+ * if id_ in varkeys: # <<<<<<<<<<<<<<
+ * key = varkeys[id_]
+ * else:
+ */
+ goto __pyx_L10;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":727
+ * key = varkeys[id_]
+ * else:
+ * key = len(idMap) - 1 # <<<<<<<<<<<<<<
+ * varkeys[id_] = key
+ * idMap[key] = v
+ */
+ /*else*/ {
+ __pyx_t_13 = PyObject_Length(__pyx_v_idMap); if (unlikely(__pyx_t_13 == ((Py_ssize_t)-1))) __PYX_ERR(0, 727, __pyx_L1_error)
+ __pyx_t_6 = PyInt_FromSsize_t((__pyx_t_13 - 1)); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 727, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":728
+ * else:
+ * key = len(idMap) - 1
+ * varkeys[id_] = key # <<<<<<<<<<<<<<
+ * idMap[key] = v
+ * if key in ans.linear:
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_varkeys, __pyx_v_id_, __pyx_v_key) < 0)) __PYX_ERR(0, 728, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":729
+ * key = len(idMap) - 1
+ * varkeys[id_] = key
+ * idMap[key] = v # <<<<<<<<<<<<<<
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier*c
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_idMap, __pyx_v_key, __pyx_v_v) < 0)) __PYX_ERR(0, 729, __pyx_L1_error)
+ }
+ __pyx_L10:;
+
+ /* "pyomo/repn/standard_repn.pyx":730
+ * varkeys[id_] = key
+ * idMap[key] = v
+ * if key in ans.linear: # <<<<<<<<<<<<<<
+ * ans.linear[key] += multiplier*c
+ * else:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 730, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_11 = (__Pyx_PySequence_ContainsTF(__pyx_v_key, __pyx_t_6, Py_EQ)); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 730, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_12 = (__pyx_t_11 != 0);
+ if (__pyx_t_12) {
+
+ /* "pyomo/repn/standard_repn.pyx":731
+ * idMap[key] = v
+ * if key in ans.linear:
+ * ans.linear[key] += multiplier*c # <<<<<<<<<<<<<<
+ * else:
+ * ans.linear[key] = multiplier*c
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 731, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_v_key);
+ __pyx_t_2 = __pyx_v_key;
+ __pyx_t_4 = PyObject_GetItem(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 731, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_1 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_c); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 731, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_4, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 731, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (unlikely(PyObject_SetItem(__pyx_t_6, __pyx_t_2, __pyx_t_5) < 0)) __PYX_ERR(0, 731, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":730
+ * varkeys[id_] = key
+ * idMap[key] = v
+ * if key in ans.linear: # <<<<<<<<<<<<<<
+ * ans.linear[key] += multiplier*c
+ * else:
+ */
+ goto __pyx_L11;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":733
+ * ans.linear[key] += multiplier*c
+ * else:
+ * ans.linear[key] = multiplier*c # <<<<<<<<<<<<<<
+ * elif c.__class__ in native_numeric_types:
+ * ans.constant += multiplier*c
+ */
+ /*else*/ {
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 733, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 733, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (unlikely(PyObject_SetItem(__pyx_t_2, __pyx_v_key, __pyx_t_6) < 0)) __PYX_ERR(0, 733, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ __pyx_L11:;
+ }
+ __pyx_L8:;
+
+ /* "pyomo/repn/standard_repn.pyx":716
+ * for e_ in itertools.islice(exp._args_, exp.nargs()):
+ * c,v = e_
+ * if not v is None: # <<<<<<<<<<<<<<
+ * if v.fixed:
+ * if compute_values:
+ */
+ goto __pyx_L7;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":734
+ * else:
+ * ans.linear[key] = multiplier*c
+ * elif c.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier*c
+ * else: # not c.is_potentially_variable()
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_c, __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 734, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 734, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_12 = (__Pyx_PySequence_ContainsTF(__pyx_t_6, __pyx_t_2, Py_EQ)); if (unlikely(__pyx_t_12 < 0)) __PYX_ERR(0, 734, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_11 = (__pyx_t_12 != 0);
+ if (__pyx_t_11) {
+
+ /* "pyomo/repn/standard_repn.pyx":735
+ * ans.linear[key] = multiplier*c
+ * elif c.__class__ in native_numeric_types:
+ * ans.constant += multiplier*c # <<<<<<<<<<<<<<
+ * else: # not c.is_potentially_variable()
+ * if compute_values:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 735, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 735, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_2, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 735, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_5) < 0) __PYX_ERR(0, 735, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":734
+ * else:
+ * ans.linear[key] = multiplier*c
+ * elif c.__class__ in native_numeric_types: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier*c
+ * else: # not c.is_potentially_variable()
+ */
+ goto __pyx_L7;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":737
+ * ans.constant += multiplier*c
+ * else: # not c.is_potentially_variable()
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier * value(c)
+ * else:
+ */
+ /*else*/ {
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 737, __pyx_L1_error)
+ if (__pyx_t_11) {
+
+ /* "pyomo/repn/standard_repn.pyx":738
+ * else: # not c.is_potentially_variable()
+ * if compute_values:
+ * ans.constant += multiplier * value(c) # <<<<<<<<<<<<<<
+ * else:
+ * ans.constant += multiplier * c
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 738, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ }
+ }
+ if (!__pyx_t_1) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_v_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 738, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_c};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 738, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_1, __pyx_v_c};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 738, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 738, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_1); __pyx_t_1 = NULL;
+ __Pyx_INCREF(__pyx_v_c);
+ __Pyx_GIVEREF(__pyx_v_c);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_v_c);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 738, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_t_6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 738, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyNumber_InPlaceAdd(__pyx_t_5, __pyx_t_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 738, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_6) < 0) __PYX_ERR(0, 738, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":737
+ * ans.constant += multiplier*c
+ * else: # not c.is_potentially_variable()
+ * if compute_values: # <<<<<<<<<<<<<<
+ * ans.constant += multiplier * value(c)
+ * else:
+ */
+ goto __pyx_L12;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":740
+ * ans.constant += multiplier * value(c)
+ * else:
+ * ans.constant += multiplier * c # <<<<<<<<<<<<<<
+ *
+ * return ans
+ */
+ /*else*/ {
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 740, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = PyNumber_Multiply(__pyx_v_multiplier, __pyx_v_c); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 740, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = PyNumber_InPlaceAdd(__pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 740, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_ans, __pyx_n_s_constant, __pyx_t_5) < 0) __PYX_ERR(0, 740, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __pyx_L12:;
+ }
+ __pyx_L7:;
+
+ /* "pyomo/repn/standard_repn.pyx":714
+ * varkeys = idMap[None]
+ *
+ * for e_ in itertools.islice(exp._args_, exp.nargs()): # <<<<<<<<<<<<<<
+ * c,v = e_
+ * if not v is None:
+ */
+ }
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":742
+ * ans.constant += multiplier * c
+ *
+ * return ans # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_ans);
+ __pyx_r = __pyx_v_ans;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":710
+ * return Results(nonl=multiplier*exp)
+ *
+ * def _collect_linear_sum(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ * varkeys = idMap[None]
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_linear_sum", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_ans);
+ __Pyx_XDECREF(__pyx_v_varkeys);
+ __Pyx_XDECREF(__pyx_v_e_);
+ __Pyx_XDECREF(__pyx_v_c);
+ __Pyx_XDECREF(__pyx_v_v);
+ __Pyx_XDECREF(__pyx_v_id_);
+ __Pyx_XDECREF(__pyx_v_key);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":787
+ *
+ *
+ * def _collect_standard_repn(exp, multiplier, idMap, # <<<<<<<<<<<<<<
+ * compute_values, verbose, quadratic):
+ * try:
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_31_collect_standard_repn(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_31_collect_standard_repn = {"_collect_standard_repn", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_31_collect_standard_repn, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_31_collect_standard_repn(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_exp = 0;
+ PyObject *__pyx_v_multiplier = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_collect_standard_repn (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exp,&__pyx_n_s_multiplier,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_exp)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_multiplier)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_standard_repn", 1, 6, 6, 1); __PYX_ERR(0, 787, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_standard_repn", 1, 6, 6, 2); __PYX_ERR(0, 787, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (likely((values[3] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_standard_repn", 1, 6, 6, 3); __PYX_ERR(0, 787, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (likely((values[4] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_standard_repn", 1, 6, 6, 4); __PYX_ERR(0, 787, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (likely((values[5] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("_collect_standard_repn", 1, 6, 6, 5); __PYX_ERR(0, 787, __pyx_L3_error)
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_collect_standard_repn") < 0)) __PYX_ERR(0, 787, __pyx_L3_error)
+ }
+ } else if (PyTuple_GET_SIZE(__pyx_args) != 6) {
+ goto __pyx_L5_argtuple_error;
+ } else {
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ }
+ __pyx_v_exp = values[0];
+ __pyx_v_multiplier = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_compute_values = values[3];
+ __pyx_v_verbose = values[4];
+ __pyx_v_quadratic = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_collect_standard_repn", 1, 6, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 787, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_standard_repn", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_30_collect_standard_repn(__pyx_self, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_30_collect_standard_repn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_exp, PyObject *__pyx_v_multiplier, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic) {
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ int __pyx_t_11;
+ PyObject *__pyx_t_12 = NULL;
+ __Pyx_RefNannySetupContext("_collect_standard_repn", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":789
+ * def _collect_standard_repn(exp, multiplier, idMap,
+ * compute_values, verbose, quadratic):
+ * try: # <<<<<<<<<<<<<<
+ * return _repn_collectors[exp.__class__](exp, multiplier, idMap,
+ * compute_values, verbose, quadratic)
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_1);
+ __Pyx_XGOTREF(__pyx_t_2);
+ __Pyx_XGOTREF(__pyx_t_3);
+ /*try:*/ {
+
+ /* "pyomo/repn/standard_repn.pyx":790
+ * compute_values, verbose, quadratic):
+ * try:
+ * return _repn_collectors[exp.__class__](exp, multiplier, idMap, # <<<<<<<<<<<<<<
+ * compute_values, verbose, quadratic)
+ * except KeyError:
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_repn_collectors); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 790, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_class); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 790, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = PyObject_GetItem(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 790, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":791
+ * try:
+ * return _repn_collectors[exp.__class__](exp, multiplier, idMap,
+ * compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * except KeyError:
+ * #
+ */
+ __pyx_t_6 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_7))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_7, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_4 = __Pyx_PyFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 790, __pyx_L3_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_7)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_6, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_4 = __Pyx_PyCFunction_FastCall(__pyx_t_7, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 790, __pyx_L3_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_4);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 790, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_exp);
+ __Pyx_GIVEREF(__pyx_v_exp);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_8, __pyx_v_exp);
+ __Pyx_INCREF(__pyx_v_multiplier);
+ __Pyx_GIVEREF(__pyx_v_multiplier);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_8, __pyx_v_multiplier);
+ __Pyx_INCREF(__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_8, __pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_8, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_8, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_5, 5+__pyx_t_8, __pyx_v_quadratic);
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 790, __pyx_L3_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ goto __pyx_L7_try_return;
+
+ /* "pyomo/repn/standard_repn.pyx":789
+ * def _collect_standard_repn(exp, multiplier, idMap,
+ * compute_values, verbose, quadratic):
+ * try: # <<<<<<<<<<<<<<
+ * return _repn_collectors[exp.__class__](exp, multiplier, idMap,
+ * compute_values, verbose, quadratic)
+ */
+ }
+ __pyx_L3_error:;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":792
+ * return _repn_collectors[exp.__class__](exp, multiplier, idMap,
+ * compute_values, verbose, quadratic)
+ * except KeyError: # <<<<<<<<<<<<<<
+ * #
+ * # These are types that might be extended using duck typing.
+ */
+ __pyx_t_8 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
+ if (__pyx_t_8) {
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_standard_repn", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_5) < 0) __PYX_ERR(0, 792, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GOTREF(__pyx_t_5);
+
+ /* "pyomo/repn/standard_repn.pyx":796
+ * # These are types that might be extended using duck typing.
+ * #
+ * if exp.is_variable_type(): # <<<<<<<<<<<<<<
+ * return _collect_var(exp, multiplier, idMap, compute_values, verbose, quadratic)
+ * if exp.is_named_expression_type():
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_is_variable_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 796, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+ if (__pyx_t_10) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_10); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 796, __pyx_L5_except_error)
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 796, __pyx_L5_except_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 796, __pyx_L5_except_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_11) {
+
+ /* "pyomo/repn/standard_repn.pyx":797
+ * #
+ * if exp.is_variable_type():
+ * return _collect_var(exp, multiplier, idMap, compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * if exp.is_named_expression_type():
+ * return _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic)
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_var); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 797, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_10 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_10 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_10)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_10);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_10, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 797, __pyx_L5_except_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_10, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 797, __pyx_L5_except_error)
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ {
+ __pyx_t_12 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 797, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ if (__pyx_t_10) {
+ __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_12, 0, __pyx_t_10); __pyx_t_10 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_exp);
+ __Pyx_GIVEREF(__pyx_v_exp);
+ PyTuple_SET_ITEM(__pyx_t_12, 0+__pyx_t_8, __pyx_v_exp);
+ __Pyx_INCREF(__pyx_v_multiplier);
+ __Pyx_GIVEREF(__pyx_v_multiplier);
+ PyTuple_SET_ITEM(__pyx_t_12, 1+__pyx_t_8, __pyx_v_multiplier);
+ __Pyx_INCREF(__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_12, 2+__pyx_t_8, __pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_12, 3+__pyx_t_8, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_12, 4+__pyx_t_8, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_12, 5+__pyx_t_8, __pyx_v_quadratic);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_12, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 797, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L6_except_return;
+
+ /* "pyomo/repn/standard_repn.pyx":796
+ * # These are types that might be extended using duck typing.
+ * #
+ * if exp.is_variable_type(): # <<<<<<<<<<<<<<
+ * return _collect_var(exp, multiplier, idMap, compute_values, verbose, quadratic)
+ * if exp.is_named_expression_type():
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":798
+ * if exp.is_variable_type():
+ * return _collect_var(exp, multiplier, idMap, compute_values, verbose, quadratic)
+ * if exp.is_named_expression_type(): # <<<<<<<<<<<<<<
+ * return _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic)
+ * raise ValueError( "Unexpected expression (type %s)" % type(exp).__name__)
+ */
+ __pyx_t_9 = __Pyx_PyObject_GetAttrStr(__pyx_v_exp, __pyx_n_s_is_named_expression_type); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 798, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_12 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ }
+ }
+ if (__pyx_t_12) {
+ __pyx_t_6 = __Pyx_PyObject_CallOneArg(__pyx_t_9, __pyx_t_12); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 798, __pyx_L5_except_error)
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ } else {
+ __pyx_t_6 = __Pyx_PyObject_CallNoArg(__pyx_t_9); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 798, __pyx_L5_except_error)
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_11 < 0)) __PYX_ERR(0, 798, __pyx_L5_except_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (__pyx_t_11) {
+
+ /* "pyomo/repn/standard_repn.pyx":799
+ * return _collect_var(exp, multiplier, idMap, compute_values, verbose, quadratic)
+ * if exp.is_named_expression_type():
+ * return _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * raise ValueError( "Unexpected expression (type %s)" % type(exp).__name__)
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_t_9 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_identity); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 799, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __pyx_t_12 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_9))) {
+ __pyx_t_12 = PyMethod_GET_SELF(__pyx_t_9);
+ if (likely(__pyx_t_12)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_9);
+ __Pyx_INCREF(__pyx_t_12);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_9, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_12, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_6 = __Pyx_PyFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L5_except_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_9)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_12, __pyx_v_exp, __pyx_v_multiplier, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_6 = __Pyx_PyCFunction_FastCall(__pyx_t_9, __pyx_temp+1-__pyx_t_8, 6+__pyx_t_8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L5_except_error)
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_GOTREF(__pyx_t_6);
+ } else
+ #endif
+ {
+ __pyx_t_10 = PyTuple_New(6+__pyx_t_8); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 799, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_10);
+ if (__pyx_t_12) {
+ __Pyx_GIVEREF(__pyx_t_12); PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_t_12); __pyx_t_12 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_exp);
+ __Pyx_GIVEREF(__pyx_v_exp);
+ PyTuple_SET_ITEM(__pyx_t_10, 0+__pyx_t_8, __pyx_v_exp);
+ __Pyx_INCREF(__pyx_v_multiplier);
+ __Pyx_GIVEREF(__pyx_v_multiplier);
+ PyTuple_SET_ITEM(__pyx_t_10, 1+__pyx_t_8, __pyx_v_multiplier);
+ __Pyx_INCREF(__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_10, 2+__pyx_t_8, __pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_10, 3+__pyx_t_8, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_10, 4+__pyx_t_8, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_10, 5+__pyx_t_8, __pyx_v_quadratic);
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_t_10, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 799, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_r = __pyx_t_6;
+ __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ goto __pyx_L6_except_return;
+
+ /* "pyomo/repn/standard_repn.pyx":798
+ * if exp.is_variable_type():
+ * return _collect_var(exp, multiplier, idMap, compute_values, verbose, quadratic)
+ * if exp.is_named_expression_type(): # <<<<<<<<<<<<<<
+ * return _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic)
+ * raise ValueError( "Unexpected expression (type %s)" % type(exp).__name__)
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":800
+ * if exp.is_named_expression_type():
+ * return _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic)
+ * raise ValueError( "Unexpected expression (type %s)" % type(exp).__name__) # <<<<<<<<<<<<<<
+ *
+ * def _generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None):
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_exp)), __pyx_n_s_name_2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_9 = __Pyx_PyString_Format(__pyx_kp_s_Unexpected_expression_type_s, __pyx_t_6); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 800, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 800, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_9);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_9);
+ __pyx_t_9 = 0;
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 800, __pyx_L5_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_Raise(__pyx_t_9, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __PYX_ERR(0, 800, __pyx_L5_except_error)
+ }
+ goto __pyx_L5_except_error;
+ __pyx_L5_except_error:;
+
+ /* "pyomo/repn/standard_repn.pyx":789
+ * def _collect_standard_repn(exp, multiplier, idMap,
+ * compute_values, verbose, quadratic):
+ * try: # <<<<<<<<<<<<<<
+ * return _repn_collectors[exp.__class__](exp, multiplier, idMap,
+ * compute_values, verbose, quadratic)
+ */
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L1_error;
+ __pyx_L7_try_return:;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L0;
+ __pyx_L6_except_return:;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __Pyx_XGIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
+ goto __pyx_L0;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":787
+ *
+ *
+ * def _collect_standard_repn(exp, multiplier, idMap, # <<<<<<<<<<<<<<
+ * compute_values, verbose, quadratic):
+ * try:
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_10);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._collect_standard_repn", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":802
+ * raise ValueError( "Unexpected expression (type %s)" % type(exp).__name__)
+ *
+ * def _generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None): # <<<<<<<<<<<<<<
+ * #
+ * # Call recursive logic
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_33_generate_standard_repn(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_33_generate_standard_repn = {"_generate_standard_repn", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_33_generate_standard_repn, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_33_generate_standard_repn(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_expr = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_compute_values = 0;
+ PyObject *__pyx_v_verbose = 0;
+ PyObject *__pyx_v_quadratic = 0;
+ PyObject *__pyx_v_repn = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("_generate_standard_repn (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_expr,&__pyx_n_s_idMap,&__pyx_n_s_compute_values,&__pyx_n_s_verbose,&__pyx_n_s_quadratic,&__pyx_n_s_repn,0};
+ PyObject* values[6] = {0,0,0,0,0,0};
+ values[1] = ((PyObject *)Py_None);
+ values[2] = ((PyObject *)Py_True);
+ values[3] = ((PyObject *)Py_False);
+ values[4] = ((PyObject *)Py_True);
+ values[5] = ((PyObject *)Py_None);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_expr)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_compute_values);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_verbose);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 4:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_quadratic);
+ if (value) { values[4] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 5:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_repn);
+ if (value) { values[5] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "_generate_standard_repn") < 0)) __PYX_ERR(0, 802, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 6: values[5] = PyTuple_GET_ITEM(__pyx_args, 5);
+ CYTHON_FALLTHROUGH;
+ case 5: values[4] = PyTuple_GET_ITEM(__pyx_args, 4);
+ CYTHON_FALLTHROUGH;
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_expr = values[0];
+ __pyx_v_idMap = values[1];
+ __pyx_v_compute_values = values[2];
+ __pyx_v_verbose = values[3];
+ __pyx_v_quadratic = values[4];
+ __pyx_v_repn = values[5];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("_generate_standard_repn", 0, 1, 6, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 802, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._generate_standard_repn", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_32_generate_standard_repn(__pyx_self, __pyx_v_expr, __pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic, __pyx_v_repn);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/repn/standard_repn.pyx":819
+ * #
+ * if compute_values:
+ * keys = list(key for key in ans.linear if not isclose(ans.linear[key],0)) # <<<<<<<<<<<<<<
+ * else:
+ * keys = list(ans.linear.keys())
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 819, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_2generator8, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_generate_standard_repn_locals_g, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!gen)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._generate_standard_repn.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_2generator8(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ int __pyx_t_11;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_r);
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ans)) { __Pyx_RaiseClosureNameError("ans"); __PYX_ERR(0, 819, __pyx_L1_error) }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ } else {
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 819, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_4)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 819, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 819, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_4(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 819, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ans)) { __Pyx_RaiseClosureNameError("ans"); __PYX_ERR(0, 819, __pyx_L1_error) }
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = PyObject_GetItem(__pyx_t_6, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_int_0};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_int_0};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_7);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_int_0);
+ __pyx_t_7 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_11 = ((!__pyx_t_10) != 0);
+ if (__pyx_t_11) {
+ if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_key))) __PYX_ERR(0, 819, __pyx_L1_error)
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_5generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/repn/standard_repn.pyx":822
+ * else:
+ * keys = list(ans.linear.keys())
+ * repn.linear_vars = tuple(idMap[key] for key in keys) # <<<<<<<<<<<<<<
+ * repn.linear_coefs = tuple(ans.linear[key] for key in keys)
+ *
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_3genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 822, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_5generator9, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_generate_standard_repn_locals_g, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!gen)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._generate_standard_repn.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_5generator9(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 822, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys)) { __Pyx_RaiseClosureNameError("keys"); __PYX_ERR(0, 822, __pyx_L1_error) }
+ if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 822, __pyx_L1_error)
+ }
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ for (;;) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 822, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap)) { __Pyx_RaiseClosureNameError("idMap"); __PYX_ERR(0, 822, __pyx_L1_error) }
+ __pyx_t_3 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 822, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_8generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/repn/standard_repn.pyx":823
+ * keys = list(ans.linear.keys())
+ * repn.linear_vars = tuple(idMap[key] for key in keys)
+ * repn.linear_coefs = tuple(ans.linear[key] for key in keys) # <<<<<<<<<<<<<<
+ *
+ * if quadratic:
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_6genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 823, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_8generator10, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_generate_standard_repn_locals_g, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!gen)) __PYX_ERR(0, 823, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._generate_standard_repn.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_8generator10(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 823, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys)) { __Pyx_RaiseClosureNameError("keys"); __PYX_ERR(0, 823, __pyx_L1_error) }
+ if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 823, __pyx_L1_error)
+ }
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ for (;;) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 823, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 823, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ans)) { __Pyx_RaiseClosureNameError("ans"); __PYX_ERR(0, 823, __pyx_L1_error) }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 823, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 823, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 823, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_11generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/repn/standard_repn.pyx":826
+ *
+ * if quadratic:
+ * keys = list(key for key in ans.quadratic if not isclose(ans.quadratic[key],0)) # <<<<<<<<<<<<<<
+ * repn.quadratic_vars = tuple((idMap[key[0]],idMap[key[1]]) for key in keys)
+ * repn.quadratic_coefs = tuple(ans.quadratic[key] for key in keys)
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_9genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 826, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_11generator11, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_generate_standard_repn_locals_g, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!gen)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._generate_standard_repn.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_11generator11(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ Py_ssize_t __pyx_t_3;
+ PyObject *(*__pyx_t_4)(PyObject *);
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ int __pyx_t_11;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __pyx_r = PyList_New(0); if (unlikely(!__pyx_r)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_r);
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ans)) { __Pyx_RaiseClosureNameError("ans"); __PYX_ERR(0, 826, __pyx_L1_error) }
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ans, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
+ __pyx_t_4 = NULL;
+ } else {
+ __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 826, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_4)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 826, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++; if (unlikely(0 < 0)) __PYX_ERR(0, 826, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_3); __pyx_t_3++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_4(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 826, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_1);
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_t_1 = 0;
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ans)) { __Pyx_RaiseClosureNameError("ans"); __PYX_ERR(0, 826, __pyx_L1_error) }
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ans, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_7 = PyObject_GetItem(__pyx_t_6, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = NULL;
+ __pyx_t_8 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_6)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_8 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_int_0};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_6, __pyx_t_7, __pyx_int_0};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_8, 2+__pyx_t_8); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_9 = PyTuple_New(2+__pyx_t_8); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ if (__pyx_t_6) {
+ __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_7);
+ PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_8, __pyx_t_7);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_8, __pyx_int_0);
+ __pyx_t_7 = 0;
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_10 < 0)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_11 = ((!__pyx_t_10) != 0);
+ if (__pyx_t_11) {
+ if (unlikely(__Pyx_ListComp_Append(__pyx_r, (PyObject*)__pyx_cur_scope->__pyx_v_key))) __PYX_ERR(0, 826, __pyx_L1_error)
+ }
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_14generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/repn/standard_repn.pyx":827
+ * if quadratic:
+ * keys = list(key for key in ans.quadratic if not isclose(ans.quadratic[key],0))
+ * repn.quadratic_vars = tuple((idMap[key[0]],idMap[key[1]]) for key in keys) # <<<<<<<<<<<<<<
+ * repn.quadratic_coefs = tuple(ans.quadratic[key] for key in keys)
+ *
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_12genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 827, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_14generator12, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_generate_standard_repn_locals_g, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!gen)) __PYX_ERR(0, 827, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._generate_standard_repn.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_14generator12(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 827, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys)) { __Pyx_RaiseClosureNameError("keys"); __PYX_ERR(0, 827, __pyx_L1_error) }
+ if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 827, __pyx_L1_error)
+ }
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ for (;;) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 827, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap)) { __Pyx_RaiseClosureNameError("idMap"); __PYX_ERR(0, 827, __pyx_L1_error) }
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_key, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap)) { __Pyx_RaiseClosureNameError("idMap"); __PYX_ERR(0, 827, __pyx_L1_error) }
+ __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_key, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = PyObject_GetItem(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_idMap, __pyx_t_3); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_5);
+ __pyx_t_4 = 0;
+ __pyx_t_5 = 0;
+ __pyx_r = __pyx_t_3;
+ __pyx_t_3 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 827, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_17generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value); /* proto */
+
+/* "pyomo/repn/standard_repn.pyx":828
+ * keys = list(key for key in ans.quadratic if not isclose(ans.quadratic[key],0))
+ * repn.quadratic_vars = tuple((idMap[key[0]],idMap[key[1]]) for key in keys)
+ * repn.quadratic_coefs = tuple(ans.quadratic[key] for key in keys) # <<<<<<<<<<<<<<
+ *
+ * if not isclose_const(ans.nonl,0):
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_15genexpr(PyObject *__pyx_self) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr *__pyx_cur_scope;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 828, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_outer_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *) __pyx_self;
+ __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope));
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope);
+ {
+ __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_17generator13, (PyObject *) __pyx_cur_scope, __pyx_n_s_genexpr, __pyx_n_s_generate_standard_repn_locals_g, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!gen)) __PYX_ERR(0, 828, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_cur_scope);
+ __Pyx_RefNannyFinishContext();
+ return (PyObject *) gen;
+ }
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._generate_standard_repn.genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_gb_5pyomo_4repn_13standard_repn_23_generate_standard_repn_17generator13(__pyx_CoroutineObject *__pyx_generator, CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject *__pyx_sent_value) /* generator body */
+{
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr *)__pyx_generator->closure);
+ PyObject *__pyx_r = NULL;
+ PyObject *__pyx_t_1 = NULL;
+ Py_ssize_t __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("genexpr", 0);
+ switch (__pyx_generator->resume_label) {
+ case 0: goto __pyx_L3_first_run;
+ case 1: goto __pyx_L6_resume_from_yield;
+ default: /* CPython raises the right error here */
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ }
+ __pyx_L3_first_run:;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 828, __pyx_L1_error)
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys)) { __Pyx_RaiseClosureNameError("keys"); __PYX_ERR(0, 828, __pyx_L1_error) }
+ if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys == Py_None)) {
+ PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable");
+ __PYX_ERR(0, 828, __pyx_L1_error)
+ }
+ __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_keys; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
+ for (;;) {
+ if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) __PYX_ERR(0, 828, __pyx_L1_error)
+ #else
+ __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ #endif
+ __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_key);
+ __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_key, __pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __pyx_t_3 = 0;
+ if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ans)) { __Pyx_RaiseClosureNameError("ans"); __PYX_ERR(0, 828, __pyx_L1_error) }
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_ans, __pyx_n_s_quadratic); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = PyObject_GetItem(__pyx_t_3, __pyx_cur_scope->__pyx_v_key); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_r = __pyx_t_4;
+ __pyx_t_4 = 0;
+ __Pyx_XGIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_t_0 = __pyx_t_1;
+ __pyx_cur_scope->__pyx_t_1 = __pyx_t_2;
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ /* return from generator, yielding value */
+ __pyx_generator->resume_label = 1;
+ return __pyx_r;
+ __pyx_L6_resume_from_yield:;
+ __pyx_t_1 = __pyx_cur_scope->__pyx_t_0;
+ __pyx_cur_scope->__pyx_t_0 = 0;
+ __Pyx_XGOTREF(__pyx_t_1);
+ __pyx_t_2 = __pyx_cur_scope->__pyx_t_1;
+ if (unlikely(!__pyx_sent_value)) __PYX_ERR(0, 828, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
+
+ /* function exit code */
+ PyErr_SetNone(PyExc_StopIteration);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
+ __Pyx_Coroutine_ResetAndClearException(__pyx_generator);
+ __pyx_generator->resume_label = -1;
+ __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":802
+ * raise ValueError( "Unexpected expression (type %s)" % type(exp).__name__)
+ *
+ * def _generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None): # <<<<<<<<<<<<<<
+ * #
+ * # Call recursive logic
+ */
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_32_generate_standard_repn(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_expr, PyObject *__pyx_v_idMap, PyObject *__pyx_v_compute_values, PyObject *__pyx_v_verbose, PyObject *__pyx_v_quadratic, PyObject *__pyx_v_repn) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *__pyx_cur_scope;
+ PyObject *__pyx_v_v_ = NULL;
+ PyObject *__pyx_v_id_ = NULL;
+ PyObject *__pyx_v_key = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ int __pyx_t_6;
+ PyObject *__pyx_t_7 = NULL;
+ int __pyx_t_8;
+ Py_ssize_t __pyx_t_9;
+ PyObject *(*__pyx_t_10)(PyObject *);
+ int __pyx_t_11;
+ Py_ssize_t __pyx_t_12;
+ __Pyx_RefNannySetupContext("_generate_standard_repn", 0);
+ __pyx_cur_scope = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *)__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn(__pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn, __pyx_empty_tuple, NULL);
+ if (unlikely(!__pyx_cur_scope)) {
+ __pyx_cur_scope = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *)Py_None);
+ __Pyx_INCREF(Py_None);
+ __PYX_ERR(0, 802, __pyx_L1_error)
+ } else {
+ __Pyx_GOTREF(__pyx_cur_scope);
+ }
+ __pyx_cur_scope->__pyx_v_idMap = __pyx_v_idMap;
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_idMap);
+
+ /* "pyomo/repn/standard_repn.pyx":806
+ * # Call recursive logic
+ * #
+ * ans = _collect_standard_repn(expr, 1, idMap, compute_values, verbose, quadratic) # <<<<<<<<<<<<<<
+ * #
+ * # Create the final object here from 'ans'
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_standard_repn); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 806, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = NULL;
+ __pyx_t_4 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_2))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_2, function);
+ __pyx_t_4 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_3, __pyx_v_expr, __pyx_int_1, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_1 = __Pyx_PyFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 6+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_2)) {
+ PyObject *__pyx_temp[7] = {__pyx_t_3, __pyx_v_expr, __pyx_int_1, __pyx_cur_scope->__pyx_v_idMap, __pyx_v_compute_values, __pyx_v_verbose, __pyx_v_quadratic};
+ __pyx_t_1 = __Pyx_PyCFunction_FastCall(__pyx_t_2, __pyx_temp+1-__pyx_t_4, 6+__pyx_t_4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_1);
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(6+__pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 806, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__pyx_t_3) {
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ }
+ __Pyx_INCREF(__pyx_v_expr);
+ __Pyx_GIVEREF(__pyx_v_expr);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+__pyx_t_4, __pyx_v_expr);
+ __Pyx_INCREF(__pyx_int_1);
+ __Pyx_GIVEREF(__pyx_int_1);
+ PyTuple_SET_ITEM(__pyx_t_5, 1+__pyx_t_4, __pyx_int_1);
+ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_idMap);
+ PyTuple_SET_ITEM(__pyx_t_5, 2+__pyx_t_4, __pyx_cur_scope->__pyx_v_idMap);
+ __Pyx_INCREF(__pyx_v_compute_values);
+ __Pyx_GIVEREF(__pyx_v_compute_values);
+ PyTuple_SET_ITEM(__pyx_t_5, 3+__pyx_t_4, __pyx_v_compute_values);
+ __Pyx_INCREF(__pyx_v_verbose);
+ __Pyx_GIVEREF(__pyx_v_verbose);
+ PyTuple_SET_ITEM(__pyx_t_5, 4+__pyx_t_4, __pyx_v_verbose);
+ __Pyx_INCREF(__pyx_v_quadratic);
+ __Pyx_GIVEREF(__pyx_v_quadratic);
+ PyTuple_SET_ITEM(__pyx_t_5, 5+__pyx_t_4, __pyx_v_quadratic);
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 806, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_1);
+ __pyx_cur_scope->__pyx_v_ans = __pyx_t_1;
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":810
+ * # Create the final object here from 'ans'
+ * #
+ * repn.constant = ans.constant # <<<<<<<<<<<<<<
+ *
+ * #
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ans, __pyx_n_s_constant); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 810, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_constant, __pyx_t_1) < 0) __PYX_ERR(0, 810, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":818
+ * # coefficients
+ * #
+ * if compute_values: # <<<<<<<<<<<<<<
+ * keys = list(key for key in ans.linear if not isclose(ans.linear[key],0))
+ * else:
+ */
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_compute_values); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 818, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+ /* "pyomo/repn/standard_repn.pyx":819
+ * #
+ * if compute_values:
+ * keys = list(key for key in ans.linear if not isclose(ans.linear[key],0)) # <<<<<<<<<<<<<<
+ * else:
+ * keys = list(ans.linear.keys())
+ */
+ __pyx_t_1 = __pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 819, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_cur_scope->__pyx_v_keys = ((PyObject*)__pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":818
+ * # coefficients
+ * #
+ * if compute_values: # <<<<<<<<<<<<<<
+ * keys = list(key for key in ans.linear if not isclose(ans.linear[key],0))
+ * else:
+ */
+ goto __pyx_L3;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":821
+ * keys = list(key for key in ans.linear if not isclose(ans.linear[key],0))
+ * else:
+ * keys = list(ans.linear.keys()) # <<<<<<<<<<<<<<
+ * repn.linear_vars = tuple(idMap[key] for key in keys)
+ * repn.linear_coefs = tuple(ans.linear[key] for key in keys)
+ */
+ /*else*/ {
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ans, __pyx_n_s_linear); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 821, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_keys); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 821, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_1)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_1);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ }
+ }
+ if (__pyx_t_1) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 821, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = PySequence_List(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 821, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_GIVEREF(__pyx_t_5);
+ __pyx_cur_scope->__pyx_v_keys = ((PyObject*)__pyx_t_5);
+ __pyx_t_5 = 0;
+ }
+ __pyx_L3:;
+
+ /* "pyomo/repn/standard_repn.pyx":822
+ * else:
+ * keys = list(ans.linear.keys())
+ * repn.linear_vars = tuple(idMap[key] for key in keys) # <<<<<<<<<<<<<<
+ * repn.linear_coefs = tuple(ans.linear[key] for key in keys)
+ *
+ */
+ __pyx_t_5 = __pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_3genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 822, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_linear_vars, __pyx_t_2) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":823
+ * keys = list(ans.linear.keys())
+ * repn.linear_vars = tuple(idMap[key] for key in keys)
+ * repn.linear_coefs = tuple(ans.linear[key] for key in keys) # <<<<<<<<<<<<<<
+ *
+ * if quadratic:
+ */
+ __pyx_t_2 = __pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_6genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 823, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 823, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_linear_coefs, __pyx_t_5) < 0) __PYX_ERR(0, 823, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":825
+ * repn.linear_coefs = tuple(ans.linear[key] for key in keys)
+ *
+ * if quadratic: # <<<<<<<<<<<<<<
+ * keys = list(key for key in ans.quadratic if not isclose(ans.quadratic[key],0))
+ * repn.quadratic_vars = tuple((idMap[key[0]],idMap[key[1]]) for key in keys)
+ */
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_quadratic); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 825, __pyx_L1_error)
+ if (__pyx_t_6) {
+
+ /* "pyomo/repn/standard_repn.pyx":826
+ *
+ * if quadratic:
+ * keys = list(key for key in ans.quadratic if not isclose(ans.quadratic[key],0)) # <<<<<<<<<<<<<<
+ * repn.quadratic_vars = tuple((idMap[key[0]],idMap[key[1]]) for key in keys)
+ * repn.quadratic_coefs = tuple(ans.quadratic[key] for key in keys)
+ */
+ __pyx_t_5 = __pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_9genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = __Pyx_Generator_Next(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 826, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_cur_scope->__pyx_v_keys);
+ __Pyx_DECREF_SET(__pyx_cur_scope->__pyx_v_keys, ((PyObject*)__pyx_t_2));
+ __Pyx_GIVEREF(__pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":827
+ * if quadratic:
+ * keys = list(key for key in ans.quadratic if not isclose(ans.quadratic[key],0))
+ * repn.quadratic_vars = tuple((idMap[key[0]],idMap[key[1]]) for key in keys) # <<<<<<<<<<<<<<
+ * repn.quadratic_coefs = tuple(ans.quadratic[key] for key in keys)
+ *
+ */
+ __pyx_t_2 = __pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_12genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 827, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_quadratic_vars, __pyx_t_5) < 0) __PYX_ERR(0, 827, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":828
+ * keys = list(key for key in ans.quadratic if not isclose(ans.quadratic[key],0))
+ * repn.quadratic_vars = tuple((idMap[key[0]],idMap[key[1]]) for key in keys)
+ * repn.quadratic_coefs = tuple(ans.quadratic[key] for key in keys) # <<<<<<<<<<<<<<
+ *
+ * if not isclose_const(ans.nonl,0):
+ */
+ __pyx_t_5 = __pyx_pf_5pyomo_4repn_13standard_repn_23_generate_standard_repn_15genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = __Pyx_PySequence_Tuple(__pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 828, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_quadratic_coefs, __pyx_t_2) < 0) __PYX_ERR(0, 828, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":825
+ * repn.linear_coefs = tuple(ans.linear[key] for key in keys)
+ *
+ * if quadratic: # <<<<<<<<<<<<<<
+ * keys = list(key for key in ans.quadratic if not isclose(ans.quadratic[key],0))
+ * repn.quadratic_vars = tuple((idMap[key[0]],idMap[key[1]]) for key in keys)
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":830
+ * repn.quadratic_coefs = tuple(ans.quadratic[key] for key in keys)
+ *
+ * if not isclose_const(ans.nonl,0): # <<<<<<<<<<<<<<
+ * repn.nonlinear_expr = ans.nonl
+ * repn.nonlinear_vars = []
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_const); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 830, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ans, __pyx_n_s_nonl); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 830, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_3 = NULL;
+ __pyx_t_4 = 0;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_5))) {
+ __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_5);
+ if (likely(__pyx_t_3)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
+ __Pyx_INCREF(__pyx_t_3);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_5, function);
+ __pyx_t_4 = 1;
+ }
+ }
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_1, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_5)) {
+ PyObject *__pyx_temp[3] = {__pyx_t_3, __pyx_t_1, __pyx_int_0};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_5, __pyx_temp+1-__pyx_t_4, 2+__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_7 = PyTuple_New(2+__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 830, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ if (__pyx_t_3) {
+ __Pyx_GIVEREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_3); __pyx_t_3 = NULL;
+ }
+ __Pyx_GIVEREF(__pyx_t_1);
+ PyTuple_SET_ITEM(__pyx_t_7, 0+__pyx_t_4, __pyx_t_1);
+ __Pyx_INCREF(__pyx_int_0);
+ __Pyx_GIVEREF(__pyx_int_0);
+ PyTuple_SET_ITEM(__pyx_t_7, 1+__pyx_t_4, __pyx_int_0);
+ __pyx_t_1 = 0;
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 830, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ }
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_6 < 0)) __PYX_ERR(0, 830, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_8 = ((!__pyx_t_6) != 0);
+ if (__pyx_t_8) {
+
+ /* "pyomo/repn/standard_repn.pyx":831
+ *
+ * if not isclose_const(ans.nonl,0):
+ * repn.nonlinear_expr = ans.nonl # <<<<<<<<<<<<<<
+ * repn.nonlinear_vars = []
+ * for v_ in EXPR.identify_variables(repn.nonlinear_expr, include_fixed=False):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_cur_scope->__pyx_v_ans, __pyx_n_s_nonl); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 831, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_nonlinear_expr, __pyx_t_2) < 0) __PYX_ERR(0, 831, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":832
+ * if not isclose_const(ans.nonl,0):
+ * repn.nonlinear_expr = ans.nonl
+ * repn.nonlinear_vars = [] # <<<<<<<<<<<<<<
+ * for v_ in EXPR.identify_variables(repn.nonlinear_expr, include_fixed=False):
+ * repn.nonlinear_vars.append(v_)
+ */
+ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 832, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_nonlinear_vars, __pyx_t_2) < 0) __PYX_ERR(0, 832, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":833
+ * repn.nonlinear_expr = ans.nonl
+ * repn.nonlinear_vars = []
+ * for v_ in EXPR.identify_variables(repn.nonlinear_expr, include_fixed=False): # <<<<<<<<<<<<<<
+ * repn.nonlinear_vars.append(v_)
+ * #
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_identify_variables); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 833, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_repn, __pyx_n_s_nonlinear_expr); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 833, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_include_fixed, Py_False) < 0) __PYX_ERR(0, 833, __pyx_L1_error)
+ __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_7, __pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_1)) || PyTuple_CheckExact(__pyx_t_1)) {
+ __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_9 = 0;
+ __pyx_t_10 = NULL;
+ } else {
+ __pyx_t_9 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 833, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_10 = Py_TYPE(__pyx_t_2)->tp_iternext; if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 833, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_10)) {
+ if (likely(PyList_CheckExact(__pyx_t_2))) {
+ if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 833, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ } else {
+ if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_9); __Pyx_INCREF(__pyx_t_1); __pyx_t_9++; if (unlikely(0 < 0)) __PYX_ERR(0, 833, __pyx_L1_error)
+ #else
+ __pyx_t_1 = PySequence_ITEM(__pyx_t_2, __pyx_t_9); __pyx_t_9++; if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 833, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ #endif
+ }
+ } else {
+ __pyx_t_1 = __pyx_t_10(__pyx_t_2);
+ if (unlikely(!__pyx_t_1)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 833, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_1);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_v_, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":834
+ * repn.nonlinear_vars = []
+ * for v_ in EXPR.identify_variables(repn.nonlinear_expr, include_fixed=False):
+ * repn.nonlinear_vars.append(v_) # <<<<<<<<<<<<<<
+ * #
+ * # Update idMap in case we skipped nonlinear sub-expressions
+ */
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_repn, __pyx_n_s_nonlinear_vars); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 834, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_11 = __Pyx_PyObject_Append(__pyx_t_1, __pyx_v_v_); if (unlikely(__pyx_t_11 == ((int)-1))) __PYX_ERR(0, 834, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":840
+ * # Q: Should we skip nonlinear sub-expressions?
+ * #
+ * id_ = id(v_) # <<<<<<<<<<<<<<
+ * if id_ in idMap[None]:
+ * key = idMap[None][id_]
+ */
+ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 840, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_v_v_);
+ __Pyx_GIVEREF(__pyx_v_v_);
+ PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_v_);
+ __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_id, __pyx_t_1, NULL); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 840, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_id_, __pyx_t_7);
+ __pyx_t_7 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":841
+ * #
+ * id_ = id(v_)
+ * if id_ in idMap[None]: # <<<<<<<<<<<<<<
+ * key = idMap[None][id_]
+ * else:
+ */
+ __pyx_t_7 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_idMap, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 841, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_8 = (__Pyx_PySequence_ContainsTF(__pyx_v_id_, __pyx_t_7, Py_EQ)); if (unlikely(__pyx_t_8 < 0)) __PYX_ERR(0, 841, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __pyx_t_6 = (__pyx_t_8 != 0);
+ if (__pyx_t_6) {
+
+ /* "pyomo/repn/standard_repn.pyx":842
+ * id_ = id(v_)
+ * if id_ in idMap[None]:
+ * key = idMap[None][id_] # <<<<<<<<<<<<<<
+ * else:
+ * key = len(idMap) - 1
+ */
+ __pyx_t_7 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_idMap, Py_None); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 842, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_7);
+ __pyx_t_1 = PyObject_GetItem(__pyx_t_7, __pyx_v_id_); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 842, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":841
+ * #
+ * id_ = id(v_)
+ * if id_ in idMap[None]: # <<<<<<<<<<<<<<
+ * key = idMap[None][id_]
+ * else:
+ */
+ goto __pyx_L8;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":844
+ * key = idMap[None][id_]
+ * else:
+ * key = len(idMap) - 1 # <<<<<<<<<<<<<<
+ * idMap[None][id_] = key
+ * idMap[key] = v_
+ */
+ /*else*/ {
+ __pyx_t_1 = __pyx_cur_scope->__pyx_v_idMap;
+ __Pyx_INCREF(__pyx_t_1);
+ __pyx_t_12 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_12 == ((Py_ssize_t)-1))) __PYX_ERR(0, 844, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = PyInt_FromSsize_t((__pyx_t_12 - 1)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 844, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_XDECREF_SET(__pyx_v_key, __pyx_t_1);
+ __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":845
+ * else:
+ * key = len(idMap) - 1
+ * idMap[None][id_] = key # <<<<<<<<<<<<<<
+ * idMap[key] = v_
+ * repn.nonlinear_vars = tuple(repn.nonlinear_vars)
+ */
+ __pyx_t_1 = PyObject_GetItem(__pyx_cur_scope->__pyx_v_idMap, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 845, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (unlikely(PyObject_SetItem(__pyx_t_1, __pyx_v_id_, __pyx_v_key) < 0)) __PYX_ERR(0, 845, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":846
+ * key = len(idMap) - 1
+ * idMap[None][id_] = key
+ * idMap[key] = v_ # <<<<<<<<<<<<<<
+ * repn.nonlinear_vars = tuple(repn.nonlinear_vars)
+ *
+ */
+ if (unlikely(PyObject_SetItem(__pyx_cur_scope->__pyx_v_idMap, __pyx_v_key, __pyx_v_v_) < 0)) __PYX_ERR(0, 846, __pyx_L1_error)
+ }
+ __pyx_L8:;
+
+ /* "pyomo/repn/standard_repn.pyx":833
+ * repn.nonlinear_expr = ans.nonl
+ * repn.nonlinear_vars = []
+ * for v_ in EXPR.identify_variables(repn.nonlinear_expr, include_fixed=False): # <<<<<<<<<<<<<<
+ * repn.nonlinear_vars.append(v_)
+ * #
+ */
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":847
+ * idMap[None][id_] = key
+ * idMap[key] = v_
+ * repn.nonlinear_vars = tuple(repn.nonlinear_vars) # <<<<<<<<<<<<<<
+ *
+ * return repn
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_repn, __pyx_n_s_nonlinear_vars); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 847, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_1 = __Pyx_PySequence_Tuple(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 847, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_repn, __pyx_n_s_nonlinear_vars, __pyx_t_1) < 0) __PYX_ERR(0, 847, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":830
+ * repn.quadratic_coefs = tuple(ans.quadratic[key] for key in keys)
+ *
+ * if not isclose_const(ans.nonl,0): # <<<<<<<<<<<<<<
+ * repn.nonlinear_expr = ans.nonl
+ * repn.nonlinear_vars = []
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":849
+ * repn.nonlinear_vars = tuple(repn.nonlinear_vars)
+ *
+ * return repn # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __Pyx_INCREF(__pyx_v_repn);
+ __pyx_r = __pyx_v_repn;
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":802
+ * raise ValueError( "Unexpected expression (type %s)" % type(exp).__name__)
+ *
+ * def _generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None): # <<<<<<<<<<<<<<
+ * #
+ * # Call recursive logic
+ */
+
+ /* function exit code */
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_7);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn._generate_standard_repn", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_v_);
+ __Pyx_XDECREF(__pyx_v_id_);
+ __Pyx_XDECREF(__pyx_v_key);
+ __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":859
+ *
+ *
+ * def preprocess_block_objectives(block, idMap=None): # <<<<<<<<<<<<<<
+ *
+ * # Get/Create the ComponentMap for the repn
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_35preprocess_block_objectives(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_35preprocess_block_objectives = {"preprocess_block_objectives", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_35preprocess_block_objectives, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_35preprocess_block_objectives(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_block = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("preprocess_block_objectives (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_idMap,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)Py_None);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_block)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "preprocess_block_objectives") < 0)) __PYX_ERR(0, 859, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_block = values[0];
+ __pyx_v_idMap = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("preprocess_block_objectives", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 859, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.preprocess_block_objectives", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_34preprocess_block_objectives(__pyx_self, __pyx_v_block, __pyx_v_idMap);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_34preprocess_block_objectives(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_block, PyObject *__pyx_v_idMap) {
+ PyObject *__pyx_v_block_repn = NULL;
+ PyObject *__pyx_v_objective_data = NULL;
+ PyObject *__pyx_v_repn = NULL;
+ PyObject *__pyx_v_err = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ Py_ssize_t __pyx_t_7;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *__pyx_t_10 = NULL;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ int __pyx_t_13;
+ PyObject *__pyx_t_14 = NULL;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ __Pyx_RefNannySetupContext("preprocess_block_objectives", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":862
+ *
+ * # Get/Create the ComponentMap for the repn
+ * if not hasattr(block,'_repn'): # <<<<<<<<<<<<<<
+ * block._repn = ComponentMap()
+ * block_repn = block._repn
+ */
+ __pyx_t_1 = __Pyx_HasAttr(__pyx_v_block, __pyx_n_s_repn_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 862, __pyx_L1_error)
+ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/repn/standard_repn.pyx":863
+ * # Get/Create the ComponentMap for the repn
+ * if not hasattr(block,'_repn'):
+ * block._repn = ComponentMap() # <<<<<<<<<<<<<<
+ * block_repn = block._repn
+ *
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ComponentMap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 863, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 863, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_block, __pyx_n_s_repn_2, __pyx_t_3) < 0) __PYX_ERR(0, 863, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":862
+ *
+ * # Get/Create the ComponentMap for the repn
+ * if not hasattr(block,'_repn'): # <<<<<<<<<<<<<<
+ * block._repn = ComponentMap()
+ * block_repn = block._repn
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":864
+ * if not hasattr(block,'_repn'):
+ * block._repn = ComponentMap()
+ * block_repn = block._repn # <<<<<<<<<<<<<<
+ *
+ * for objective_data in block.component_data_objects(Objective,
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_block, __pyx_n_s_repn_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 864, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_v_block_repn = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":866
+ * block_repn = block._repn
+ *
+ * for objective_data in block.component_data_objects(Objective, # <<<<<<<<<<<<<<
+ * active=True,
+ * descend_into=False):
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_block, __pyx_n_s_component_data_objects); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Objective); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":867
+ *
+ * for objective_data in block.component_data_objects(Objective,
+ * active=True, # <<<<<<<<<<<<<<
+ * descend_into=False):
+ *
+ */
+ __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 867, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_active, Py_True) < 0) __PYX_ERR(0, 867, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":868
+ * for objective_data in block.component_data_objects(Objective,
+ * active=True,
+ * descend_into=False): # <<<<<<<<<<<<<<
+ *
+ * if objective_data.expr is None:
+ */
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_descend_into, Py_False) < 0) __PYX_ERR(0, 867, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":866
+ * block_repn = block._repn
+ *
+ * for objective_data in block.component_data_objects(Objective, # <<<<<<<<<<<<<<
+ * active=True,
+ * descend_into=False):
+ */
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
+ __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ } else {
+ __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 866, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_8)) {
+ if (likely(PyList_CheckExact(__pyx_t_4))) {
+ if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 866, __pyx_L1_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ } else {
+ if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 866, __pyx_L1_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 866, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ }
+ } else {
+ __pyx_t_6 = __pyx_t_8(__pyx_t_4);
+ if (unlikely(!__pyx_t_6)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 866, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_objective_data, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":870
+ * descend_into=False):
+ *
+ * if objective_data.expr is None: # <<<<<<<<<<<<<<
+ * raise ValueError("No expression has been defined for objective %s"
+ * % (objective_data.name))
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_objective_data, __pyx_n_s_expr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 870, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = (__pyx_t_6 == Py_None);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "pyomo/repn/standard_repn.pyx":872
+ * if objective_data.expr is None:
+ * raise ValueError("No expression has been defined for objective %s"
+ * % (objective_data.name)) # <<<<<<<<<<<<<<
+ *
+ * try:
+ */
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_objective_data, __pyx_n_s_name); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 872, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_No_expression_has_been_defined_f, __pyx_t_6); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 872, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":871
+ *
+ * if objective_data.expr is None:
+ * raise ValueError("No expression has been defined for objective %s" # <<<<<<<<<<<<<<
+ * % (objective_data.name))
+ *
+ */
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 871, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 871, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __PYX_ERR(0, 871, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":870
+ * descend_into=False):
+ *
+ * if objective_data.expr is None: # <<<<<<<<<<<<<<
+ * raise ValueError("No expression has been defined for objective %s"
+ * % (objective_data.name))
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":874
+ * % (objective_data.name))
+ *
+ * try: # <<<<<<<<<<<<<<
+ * repn = generate_standard_repn(objective_data.expr, idMap=idMap)
+ * except Exception:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_9, &__pyx_t_10, &__pyx_t_11);
+ __Pyx_XGOTREF(__pyx_t_9);
+ __Pyx_XGOTREF(__pyx_t_10);
+ __Pyx_XGOTREF(__pyx_t_11);
+ /*try:*/ {
+
+ /* "pyomo/repn/standard_repn.pyx":875
+ *
+ * try:
+ * repn = generate_standard_repn(objective_data.expr, idMap=idMap) # <<<<<<<<<<<<<<
+ * except Exception:
+ * err = sys.exc_info()[1]
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_standard_repn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 875, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_objective_data, __pyx_n_s_expr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 875, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 875, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_6);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 875, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_6, __pyx_n_s_idMap, __pyx_v_idMap) < 0) __PYX_ERR(0, 875, __pyx_L7_error)
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 875, __pyx_L7_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_repn, __pyx_t_12);
+ __pyx_t_12 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":874
+ * % (objective_data.name))
+ *
+ * try: # <<<<<<<<<<<<<<
+ * repn = generate_standard_repn(objective_data.expr, idMap=idMap)
+ * except Exception:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ goto __pyx_L14_try_end;
+ __pyx_L7_error:;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":876
+ * try:
+ * repn = generate_standard_repn(objective_data.expr, idMap=idMap)
+ * except Exception: # <<<<<<<<<<<<<<
+ * err = sys.exc_info()[1]
+ * logging.getLogger('pyomo.core').error\
+ */
+ __pyx_t_13 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ if (__pyx_t_13) {
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.preprocess_block_objectives", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_12, &__pyx_t_6, &__pyx_t_3) < 0) __PYX_ERR(0, 876, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GOTREF(__pyx_t_3);
+
+ /* "pyomo/repn/standard_repn.pyx":877
+ * repn = generate_standard_repn(objective_data.expr, idMap=idMap)
+ * except Exception:
+ * err = sys.exc_info()[1] # <<<<<<<<<<<<<<
+ * logging.getLogger('pyomo.core').error\
+ * ( "exception generating a standard representation for objective %s: %s" \
+ */
+ __pyx_t_14 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 877, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_14, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 877, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __pyx_t_14 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_15))) {
+ __pyx_t_14 = PyMethod_GET_SELF(__pyx_t_15);
+ if (likely(__pyx_t_14)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+ __Pyx_INCREF(__pyx_t_14);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_15, function);
+ }
+ }
+ if (__pyx_t_14) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_14); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 877, __pyx_L9_except_error)
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else {
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 877, __pyx_L9_except_error)
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 877, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_v_err = __pyx_t_15;
+ __pyx_t_15 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":878
+ * except Exception:
+ * err = sys.exc_info()[1]
+ * logging.getLogger('pyomo.core').error\ # <<<<<<<<<<<<<<
+ * ( "exception generating a standard representation for objective %s: %s" \
+ * % (objective_data.name, str(err)) )
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 878, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 878, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 878, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __pyx_t_14 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 878, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":880
+ * logging.getLogger('pyomo.core').error\
+ * ( "exception generating a standard representation for objective %s: %s" \
+ * % (objective_data.name, str(err)) ) # <<<<<<<<<<<<<<
+ * raise
+ *
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_objective_data, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 880, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 880, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_INCREF(__pyx_v_err);
+ __Pyx_GIVEREF(__pyx_v_err);
+ PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_v_err);
+ __pyx_t_17 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_16, NULL); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 880, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __pyx_t_16 = PyTuple_New(2); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 880, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_16, 0, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_16, 1, __pyx_t_17);
+ __pyx_t_5 = 0;
+ __pyx_t_17 = 0;
+ __pyx_t_17 = __Pyx_PyString_Format(__pyx_kp_s_exception_generating_a_standard, __pyx_t_16); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 880, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __pyx_t_16 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_14))) {
+ __pyx_t_16 = PyMethod_GET_SELF(__pyx_t_14);
+ if (likely(__pyx_t_16)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_14);
+ __Pyx_INCREF(__pyx_t_16);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_14, function);
+ }
+ }
+ if (!__pyx_t_16) {
+ __pyx_t_15 = __Pyx_PyObject_CallOneArg(__pyx_t_14, __pyx_t_17); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 879, __pyx_L9_except_error)
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __Pyx_GOTREF(__pyx_t_15);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_t_17};
+ __pyx_t_15 = __Pyx_PyFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 879, __pyx_L9_except_error)
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_14)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_16, __pyx_t_17};
+ __pyx_t_15 = __Pyx_PyCFunction_FastCall(__pyx_t_14, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 879, __pyx_L9_except_error)
+ __Pyx_XDECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 879, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_16); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_16); __pyx_t_16 = NULL;
+ __Pyx_GIVEREF(__pyx_t_17);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_17);
+ __pyx_t_17 = 0;
+ __pyx_t_15 = __Pyx_PyObject_Call(__pyx_t_14, __pyx_t_5, NULL); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 879, __pyx_L9_except_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":881
+ * ( "exception generating a standard representation for objective %s: %s" \
+ * % (objective_data.name, str(err)) )
+ * raise # <<<<<<<<<<<<<<
+ *
+ * block_repn[objective_data] = repn
+ */
+ __Pyx_GIVEREF(__pyx_t_12);
+ __Pyx_GIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_ErrRestoreWithState(__pyx_t_12, __pyx_t_6, __pyx_t_3);
+ __pyx_t_12 = 0; __pyx_t_6 = 0; __pyx_t_3 = 0;
+ __PYX_ERR(0, 881, __pyx_L9_except_error)
+ }
+ goto __pyx_L9_except_error;
+ __pyx_L9_except_error:;
+
+ /* "pyomo/repn/standard_repn.pyx":874
+ * % (objective_data.name))
+ *
+ * try: # <<<<<<<<<<<<<<
+ * repn = generate_standard_repn(objective_data.expr, idMap=idMap)
+ * except Exception:
+ */
+ __Pyx_XGIVEREF(__pyx_t_9);
+ __Pyx_XGIVEREF(__pyx_t_10);
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
+ goto __pyx_L1_error;
+ __pyx_L14_try_end:;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":883
+ * raise
+ *
+ * block_repn[objective_data] = repn # <<<<<<<<<<<<<<
+ *
+ * def preprocess_block_constraints(block, idMap=None):
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_block_repn, __pyx_v_objective_data, __pyx_v_repn) < 0)) __PYX_ERR(0, 883, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":866
+ * block_repn = block._repn
+ *
+ * for objective_data in block.component_data_objects(Objective, # <<<<<<<<<<<<<<
+ * active=True,
+ * descend_into=False):
+ */
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":859
+ *
+ *
+ * def preprocess_block_objectives(block, idMap=None): # <<<<<<<<<<<<<<
+ *
+ * # Get/Create the ComponentMap for the repn
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.preprocess_block_objectives", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_block_repn);
+ __Pyx_XDECREF(__pyx_v_objective_data);
+ __Pyx_XDECREF(__pyx_v_repn);
+ __Pyx_XDECREF(__pyx_v_err);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":885
+ * block_repn[objective_data] = repn
+ *
+ * def preprocess_block_constraints(block, idMap=None): # <<<<<<<<<<<<<<
+ *
+ * # Get/Create the ComponentMap for the repn
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_37preprocess_block_constraints(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_37preprocess_block_constraints = {"preprocess_block_constraints", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_37preprocess_block_constraints, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_37preprocess_block_constraints(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_block = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("preprocess_block_constraints (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_idMap,0};
+ PyObject* values[2] = {0,0};
+ values[1] = ((PyObject *)Py_None);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_block)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap);
+ if (value) { values[1] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "preprocess_block_constraints") < 0)) __PYX_ERR(0, 885, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_block = values[0];
+ __pyx_v_idMap = values[1];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("preprocess_block_constraints", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 885, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.preprocess_block_constraints", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_36preprocess_block_constraints(__pyx_self, __pyx_v_block, __pyx_v_idMap);
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_36preprocess_block_constraints(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_block, PyObject *__pyx_v_idMap) {
+ PyObject *__pyx_v_block_repn = NULL;
+ PyObject *__pyx_v_constraint = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ Py_ssize_t __pyx_t_7;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ PyObject *__pyx_t_9 = NULL;
+ __Pyx_RefNannySetupContext("preprocess_block_constraints", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":888
+ *
+ * # Get/Create the ComponentMap for the repn
+ * if not hasattr(block,'_repn'): # <<<<<<<<<<<<<<
+ * block._repn = ComponentMap()
+ * block_repn = block._repn
+ */
+ __pyx_t_1 = __Pyx_HasAttr(__pyx_v_block, __pyx_n_s_repn_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 888, __pyx_L1_error)
+ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/repn/standard_repn.pyx":889
+ * # Get/Create the ComponentMap for the repn
+ * if not hasattr(block,'_repn'):
+ * block._repn = ComponentMap() # <<<<<<<<<<<<<<
+ * block_repn = block._repn
+ *
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ComponentMap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 889, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 889, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 889, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_block, __pyx_n_s_repn_2, __pyx_t_3) < 0) __PYX_ERR(0, 889, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":888
+ *
+ * # Get/Create the ComponentMap for the repn
+ * if not hasattr(block,'_repn'): # <<<<<<<<<<<<<<
+ * block._repn = ComponentMap()
+ * block_repn = block._repn
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":890
+ * if not hasattr(block,'_repn'):
+ * block._repn = ComponentMap()
+ * block_repn = block._repn # <<<<<<<<<<<<<<
+ *
+ * for constraint in block.component_objects(Constraint,
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_block, __pyx_n_s_repn_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 890, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_v_block_repn = __pyx_t_3;
+ __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":892
+ * block_repn = block._repn
+ *
+ * for constraint in block.component_objects(Constraint, # <<<<<<<<<<<<<<
+ * active=True,
+ * descend_into=False):
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_block, __pyx_n_s_component_objects); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 892, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_Constraint); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 892, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":893
+ *
+ * for constraint in block.component_objects(Constraint,
+ * active=True, # <<<<<<<<<<<<<<
+ * descend_into=False):
+ *
+ */
+ __pyx_t_4 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 893, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_active, Py_True) < 0) __PYX_ERR(0, 893, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":894
+ * for constraint in block.component_objects(Constraint,
+ * active=True,
+ * descend_into=False): # <<<<<<<<<<<<<<
+ *
+ * preprocess_constraint(block,
+ */
+ if (PyDict_SetItem(__pyx_t_4, __pyx_n_s_descend_into, Py_False) < 0) __PYX_ERR(0, 893, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":892
+ * block_repn = block._repn
+ *
+ * for constraint in block.component_objects(Constraint, # <<<<<<<<<<<<<<
+ * active=True,
+ * descend_into=False):
+ */
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, __pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 892, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_6)) || PyTuple_CheckExact(__pyx_t_6)) {
+ __pyx_t_4 = __pyx_t_6; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ } else {
+ __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 892, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_8 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 892, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_8)) {
+ if (likely(PyList_CheckExact(__pyx_t_4))) {
+ if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 892, __pyx_L1_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 892, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ } else {
+ if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_6); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 892, __pyx_L1_error)
+ #else
+ __pyx_t_6 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 892, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ #endif
+ }
+ } else {
+ __pyx_t_6 = __pyx_t_8(__pyx_t_4);
+ if (unlikely(!__pyx_t_6)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 892, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_6);
+ }
+ __Pyx_XDECREF_SET(__pyx_v_constraint, __pyx_t_6);
+ __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":896
+ * descend_into=False):
+ *
+ * preprocess_constraint(block, # <<<<<<<<<<<<<<
+ * constraint,
+ * idMap=idMap,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_preprocess_constraint); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 896, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+ /* "pyomo/repn/standard_repn.pyx":897
+ *
+ * preprocess_constraint(block,
+ * constraint, # <<<<<<<<<<<<<<
+ * idMap=idMap,
+ * block_repn=block_repn)
+ */
+ __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 896, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_INCREF(__pyx_v_block);
+ __Pyx_GIVEREF(__pyx_v_block);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_block);
+ __Pyx_INCREF(__pyx_v_constraint);
+ __Pyx_GIVEREF(__pyx_v_constraint);
+ PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_constraint);
+
+ /* "pyomo/repn/standard_repn.pyx":898
+ * preprocess_constraint(block,
+ * constraint,
+ * idMap=idMap, # <<<<<<<<<<<<<<
+ * block_repn=block_repn)
+ *
+ */
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 898, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_idMap, __pyx_v_idMap) < 0) __PYX_ERR(0, 898, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":899
+ * constraint,
+ * idMap=idMap,
+ * block_repn=block_repn) # <<<<<<<<<<<<<<
+ *
+ * def preprocess_constraint(block,
+ */
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_block_repn, __pyx_v_block_repn) < 0) __PYX_ERR(0, 898, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":896
+ * descend_into=False):
+ *
+ * preprocess_constraint(block, # <<<<<<<<<<<<<<
+ * constraint,
+ * idMap=idMap,
+ */
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 896, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":892
+ * block_repn = block._repn
+ *
+ * for constraint in block.component_objects(Constraint, # <<<<<<<<<<<<<<
+ * active=True,
+ * descend_into=False):
+ */
+ }
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":885
+ * block_repn[objective_data] = repn
+ *
+ * def preprocess_block_constraints(block, idMap=None): # <<<<<<<<<<<<<<
+ *
+ * # Get/Create the ComponentMap for the repn
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.preprocess_block_constraints", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_block_repn);
+ __Pyx_XDECREF(__pyx_v_constraint);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":901
+ * block_repn=block_repn)
+ *
+ * def preprocess_constraint(block, # <<<<<<<<<<<<<<
+ * constraint,
+ * idMap=None,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_39preprocess_constraint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_39preprocess_constraint = {"preprocess_constraint", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_39preprocess_constraint, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_39preprocess_constraint(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_block = 0;
+ PyObject *__pyx_v_constraint = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_block_repn = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("preprocess_constraint (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_constraint,&__pyx_n_s_idMap,&__pyx_n_s_block_repn,0};
+ PyObject* values[4] = {0,0,0,0};
+
+ /* "pyomo/repn/standard_repn.pyx":903
+ * def preprocess_constraint(block,
+ * constraint,
+ * idMap=None, # <<<<<<<<<<<<<<
+ * block_repn=None):
+ *
+ */
+ values[2] = ((PyObject *)Py_None);
+
+ /* "pyomo/repn/standard_repn.pyx":904
+ * constraint,
+ * idMap=None,
+ * block_repn=None): # <<<<<<<<<<<<<<
+ *
+ * from pyomo.repn.beta.matrix import MatrixConstraint
+ */
+ values[3] = ((PyObject *)Py_None);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_block)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_constraint)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("preprocess_constraint", 0, 2, 4, 1); __PYX_ERR(0, 901, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_block_repn);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "preprocess_constraint") < 0)) __PYX_ERR(0, 901, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_block = values[0];
+ __pyx_v_constraint = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_block_repn = values[3];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("preprocess_constraint", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 901, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.preprocess_constraint", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_38preprocess_constraint(__pyx_self, __pyx_v_block, __pyx_v_constraint, __pyx_v_idMap, __pyx_v_block_repn);
+
+ /* "pyomo/repn/standard_repn.pyx":901
+ * block_repn=block_repn)
+ *
+ * def preprocess_constraint(block, # <<<<<<<<<<<<<<
+ * constraint,
+ * idMap=None,
+ */
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_38preprocess_constraint(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_block, PyObject *__pyx_v_constraint, PyObject *__pyx_v_idMap, PyObject *__pyx_v_block_repn) {
+ PyObject *__pyx_v_MatrixConstraint = NULL;
+ CYTHON_UNUSED PyObject *__pyx_v_index = NULL;
+ PyObject *__pyx_v_constraint_data = NULL;
+ PyObject *__pyx_v_repn = NULL;
+ PyObject *__pyx_v_err = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ int __pyx_t_3;
+ int __pyx_t_4;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ Py_ssize_t __pyx_t_7;
+ PyObject *(*__pyx_t_8)(PyObject *);
+ PyObject *__pyx_t_9 = NULL;
+ PyObject *(*__pyx_t_10)(PyObject *);
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ int __pyx_t_14;
+ PyObject *__pyx_t_15 = NULL;
+ PyObject *__pyx_t_16 = NULL;
+ PyObject *__pyx_t_17 = NULL;
+ PyObject *__pyx_t_18 = NULL;
+ __Pyx_RefNannySetupContext("preprocess_constraint", 0);
+ __Pyx_INCREF(__pyx_v_block_repn);
+
+ /* "pyomo/repn/standard_repn.pyx":906
+ * block_repn=None):
+ *
+ * from pyomo.repn.beta.matrix import MatrixConstraint # <<<<<<<<<<<<<<
+ * if isinstance(constraint, MatrixConstraint):
+ * return
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_MatrixConstraint);
+ __Pyx_GIVEREF(__pyx_n_s_MatrixConstraint);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_MatrixConstraint);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_repn_beta_matrix, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 906, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_MatrixConstraint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 906, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_1);
+ __pyx_v_MatrixConstraint = __pyx_t_1;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":907
+ *
+ * from pyomo.repn.beta.matrix import MatrixConstraint
+ * if isinstance(constraint, MatrixConstraint): # <<<<<<<<<<<<<<
+ * return
+ *
+ */
+ __pyx_t_3 = PyObject_IsInstance(__pyx_v_constraint, __pyx_v_MatrixConstraint); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 907, __pyx_L1_error)
+ __pyx_t_4 = (__pyx_t_3 != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":908
+ * from pyomo.repn.beta.matrix import MatrixConstraint
+ * if isinstance(constraint, MatrixConstraint):
+ * return # <<<<<<<<<<<<<<
+ *
+ * # Get/Create the ComponentMap for the repn
+ */
+ __Pyx_XDECREF(__pyx_r);
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+
+ /* "pyomo/repn/standard_repn.pyx":907
+ *
+ * from pyomo.repn.beta.matrix import MatrixConstraint
+ * if isinstance(constraint, MatrixConstraint): # <<<<<<<<<<<<<<
+ * return
+ *
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":911
+ *
+ * # Get/Create the ComponentMap for the repn
+ * if not hasattr(block,'_repn'): # <<<<<<<<<<<<<<
+ * block._repn = ComponentMap()
+ * block_repn = block._repn
+ */
+ __pyx_t_4 = __Pyx_HasAttr(__pyx_v_block, __pyx_n_s_repn_2); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(0, 911, __pyx_L1_error)
+ __pyx_t_3 = ((!(__pyx_t_4 != 0)) != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":912
+ * # Get/Create the ComponentMap for the repn
+ * if not hasattr(block,'_repn'):
+ * block._repn = ComponentMap() # <<<<<<<<<<<<<<
+ * block_repn = block._repn
+ *
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_ComponentMap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 912, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 912, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_block, __pyx_n_s_repn_2, __pyx_t_2) < 0) __PYX_ERR(0, 912, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":911
+ *
+ * # Get/Create the ComponentMap for the repn
+ * if not hasattr(block,'_repn'): # <<<<<<<<<<<<<<
+ * block._repn = ComponentMap()
+ * block_repn = block._repn
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":913
+ * if not hasattr(block,'_repn'):
+ * block._repn = ComponentMap()
+ * block_repn = block._repn # <<<<<<<<<<<<<<
+ *
+ * for index, constraint_data in iteritems(constraint):
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_block, __pyx_n_s_repn_2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 913, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF_SET(__pyx_v_block_repn, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":915
+ * block_repn = block._repn
+ *
+ * for index, constraint_data in iteritems(constraint): # <<<<<<<<<<<<<<
+ *
+ * if not constraint_data.active:
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_iteritems); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_1))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_1);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_1, function);
+ }
+ }
+ if (!__pyx_t_5) {
+ __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_v_constraint); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_constraint};
+ __pyx_t_2 = __Pyx_PyFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_1)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_5, __pyx_v_constraint};
+ __pyx_t_2 = __Pyx_PyCFunction_FastCall(__pyx_t_1, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_GOTREF(__pyx_t_2);
+ } else
+ #endif
+ {
+ __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
+ __Pyx_INCREF(__pyx_v_constraint);
+ __Pyx_GIVEREF(__pyx_v_constraint);
+ PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_v_constraint);
+ __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (likely(PyList_CheckExact(__pyx_t_2)) || PyTuple_CheckExact(__pyx_t_2)) {
+ __pyx_t_1 = __pyx_t_2; __Pyx_INCREF(__pyx_t_1); __pyx_t_7 = 0;
+ __pyx_t_8 = NULL;
+ } else {
+ __pyx_t_7 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_8 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 915, __pyx_L1_error)
+ }
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ for (;;) {
+ if (likely(!__pyx_t_8)) {
+ if (likely(PyList_CheckExact(__pyx_t_1))) {
+ if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 915, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ } else {
+ if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_7); __Pyx_INCREF(__pyx_t_2); __pyx_t_7++; if (unlikely(0 < 0)) __PYX_ERR(0, 915, __pyx_L1_error)
+ #else
+ __pyx_t_2 = PySequence_ITEM(__pyx_t_1, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ #endif
+ }
+ } else {
+ __pyx_t_2 = __pyx_t_8(__pyx_t_1);
+ if (unlikely(!__pyx_t_2)) {
+ PyObject* exc_type = PyErr_Occurred();
+ if (exc_type) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
+ else __PYX_ERR(0, 915, __pyx_L1_error)
+ }
+ break;
+ }
+ __Pyx_GOTREF(__pyx_t_2);
+ }
+ if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
+ PyObject* sequence = __pyx_t_2;
+ #if !CYTHON_COMPILING_IN_PYPY
+ Py_ssize_t size = Py_SIZE(sequence);
+ #else
+ Py_ssize_t size = PySequence_Size(sequence);
+ #endif
+ if (unlikely(size != 2)) {
+ if (size > 2) __Pyx_RaiseTooManyValuesError(2);
+ else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
+ __PYX_ERR(0, 915, __pyx_L1_error)
+ }
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ if (likely(PyTuple_CheckExact(sequence))) {
+ __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyTuple_GET_ITEM(sequence, 1);
+ } else {
+ __pyx_t_6 = PyList_GET_ITEM(sequence, 0);
+ __pyx_t_5 = PyList_GET_ITEM(sequence, 1);
+ }
+ __Pyx_INCREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_t_5);
+ #else
+ __pyx_t_6 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_5 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ #endif
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ } else {
+ Py_ssize_t index = -1;
+ __pyx_t_9 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 915, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
+ index = 0; __pyx_t_6 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_6)) goto __pyx_L7_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_6);
+ index = 1; __pyx_t_5 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_5)) goto __pyx_L7_unpacking_failed;
+ __Pyx_GOTREF(__pyx_t_5);
+ if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) __PYX_ERR(0, 915, __pyx_L1_error)
+ __pyx_t_10 = NULL;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ goto __pyx_L8_unpacking_done;
+ __pyx_L7_unpacking_failed:;
+ __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
+ __pyx_t_10 = NULL;
+ if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
+ __PYX_ERR(0, 915, __pyx_L1_error)
+ __pyx_L8_unpacking_done:;
+ }
+ __Pyx_XDECREF_SET(__pyx_v_index, __pyx_t_6);
+ __pyx_t_6 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_constraint_data, __pyx_t_5);
+ __pyx_t_5 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":917
+ * for index, constraint_data in iteritems(constraint):
+ *
+ * if not constraint_data.active: # <<<<<<<<<<<<<<
+ * continue
+ *
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_constraint_data, __pyx_n_s_active); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 917, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_3 < 0)) __PYX_ERR(0, 917, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_4 = ((!__pyx_t_3) != 0);
+ if (__pyx_t_4) {
+
+ /* "pyomo/repn/standard_repn.pyx":918
+ *
+ * if not constraint_data.active:
+ * continue # <<<<<<<<<<<<<<
+ *
+ * if constraint_data.body is None:
+ */
+ goto __pyx_L5_continue;
+
+ /* "pyomo/repn/standard_repn.pyx":917
+ * for index, constraint_data in iteritems(constraint):
+ *
+ * if not constraint_data.active: # <<<<<<<<<<<<<<
+ * continue
+ *
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":920
+ * continue
+ *
+ * if constraint_data.body is None: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * "No expression has been defined for the body "
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_constraint_data, __pyx_n_s_body); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 920, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_4 = (__pyx_t_2 == Py_None);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_3 = (__pyx_t_4 != 0);
+ if (__pyx_t_3) {
+
+ /* "pyomo/repn/standard_repn.pyx":923
+ * raise ValueError(
+ * "No expression has been defined for the body "
+ * "of constraint %s" % (constraint_data.name)) # <<<<<<<<<<<<<<
+ *
+ * try:
+ */
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_constraint_data, __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 923, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_No_expression_has_been_defined_f_2, __pyx_t_2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 923, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":921
+ *
+ * if constraint_data.body is None:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * "No expression has been defined for the body "
+ * "of constraint %s" % (constraint_data.name))
+ */
+ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 921, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_5);
+ __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_2, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 921, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_Raise(__pyx_t_5, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __PYX_ERR(0, 921, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":920
+ * continue
+ *
+ * if constraint_data.body is None: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * "No expression has been defined for the body "
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":925
+ * "of constraint %s" % (constraint_data.name))
+ *
+ * try: # <<<<<<<<<<<<<<
+ * repn = generate_standard_repn(constraint_data.body,
+ * idMap=idMap)
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
+ __Pyx_XGOTREF(__pyx_t_11);
+ __Pyx_XGOTREF(__pyx_t_12);
+ __Pyx_XGOTREF(__pyx_t_13);
+ /*try:*/ {
+
+ /* "pyomo/repn/standard_repn.pyx":926
+ *
+ * try:
+ * repn = generate_standard_repn(constraint_data.body, # <<<<<<<<<<<<<<
+ * idMap=idMap)
+ * except Exception:
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_standard_repn); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 926, __pyx_L11_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_constraint_data, __pyx_n_s_body); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 926, __pyx_L11_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 926, __pyx_L11_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_GIVEREF(__pyx_t_2);
+ PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_2);
+ __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":927
+ * try:
+ * repn = generate_standard_repn(constraint_data.body,
+ * idMap=idMap) # <<<<<<<<<<<<<<
+ * except Exception:
+ * err = sys.exc_info()[1]
+ */
+ __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 927, __pyx_L11_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_idMap, __pyx_v_idMap) < 0) __PYX_ERR(0, 927, __pyx_L11_error)
+
+ /* "pyomo/repn/standard_repn.pyx":926
+ *
+ * try:
+ * repn = generate_standard_repn(constraint_data.body, # <<<<<<<<<<<<<<
+ * idMap=idMap)
+ * except Exception:
+ */
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, __pyx_t_2); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 926, __pyx_L11_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF_SET(__pyx_v_repn, __pyx_t_9);
+ __pyx_t_9 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":925
+ * "of constraint %s" % (constraint_data.name))
+ *
+ * try: # <<<<<<<<<<<<<<
+ * repn = generate_standard_repn(constraint_data.body,
+ * idMap=idMap)
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ goto __pyx_L18_try_end;
+ __pyx_L11_error:;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":928
+ * repn = generate_standard_repn(constraint_data.body,
+ * idMap=idMap)
+ * except Exception: # <<<<<<<<<<<<<<
+ * err = sys.exc_info()[1]
+ * logging.getLogger('pyomo.core').error(
+ */
+ __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ if (__pyx_t_14) {
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.preprocess_constraint", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_2, &__pyx_t_6) < 0) __PYX_ERR(0, 928, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GOTREF(__pyx_t_6);
+
+ /* "pyomo/repn/standard_repn.pyx":929
+ * idMap=idMap)
+ * except Exception:
+ * err = sys.exc_info()[1] # <<<<<<<<<<<<<<
+ * logging.getLogger('pyomo.core').error(
+ * "exception generating a standard representation for "
+ */
+ __pyx_t_15 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 929, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __pyx_t_16 = __Pyx_PyObject_GetAttrStr(__pyx_t_15, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 929, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_16))) {
+ __pyx_t_15 = PyMethod_GET_SELF(__pyx_t_16);
+ if (likely(__pyx_t_15)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_16);
+ __Pyx_INCREF(__pyx_t_15);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_16, function);
+ }
+ }
+ if (__pyx_t_15) {
+ __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_16, __pyx_t_15); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 929, __pyx_L13_except_error)
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ } else {
+ __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_16); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 929, __pyx_L13_except_error)
+ }
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+ __pyx_t_16 = __Pyx_GetItemInt(__pyx_t_5, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 929, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_v_err = __pyx_t_16;
+ __pyx_t_16 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":930
+ * except Exception:
+ * err = sys.exc_info()[1]
+ * logging.getLogger('pyomo.core').error( # <<<<<<<<<<<<<<
+ * "exception generating a standard representation for "
+ * "constraint %s: %s"
+ */
+ __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 930, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 930, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 930, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __pyx_t_15 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_error); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 930, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_15);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":933
+ * "exception generating a standard representation for "
+ * "constraint %s: %s"
+ * % (constraint_data.name, str(err))) # <<<<<<<<<<<<<<
+ * raise
+ *
+ */
+ __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_constraint_data, __pyx_n_s_name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 933, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __pyx_t_17 = PyTuple_New(1); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 933, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __Pyx_INCREF(__pyx_v_err);
+ __Pyx_GIVEREF(__pyx_v_err);
+ PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_v_err);
+ __pyx_t_18 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_17, NULL); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 933, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_18);
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __pyx_t_17 = PyTuple_New(2); if (unlikely(!__pyx_t_17)) __PYX_ERR(0, 933, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_17);
+ __Pyx_GIVEREF(__pyx_t_5);
+ PyTuple_SET_ITEM(__pyx_t_17, 0, __pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_18);
+ PyTuple_SET_ITEM(__pyx_t_17, 1, __pyx_t_18);
+ __pyx_t_5 = 0;
+ __pyx_t_18 = 0;
+ __pyx_t_18 = __Pyx_PyString_Format(__pyx_kp_s_exception_generating_a_standard_2, __pyx_t_17); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 933, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_18);
+ __Pyx_DECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __pyx_t_17 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_15))) {
+ __pyx_t_17 = PyMethod_GET_SELF(__pyx_t_15);
+ if (likely(__pyx_t_17)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_15);
+ __Pyx_INCREF(__pyx_t_17);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_15, function);
+ }
+ }
+ if (!__pyx_t_17) {
+ __pyx_t_16 = __Pyx_PyObject_CallOneArg(__pyx_t_15, __pyx_t_18); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 930, __pyx_L13_except_error)
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ __Pyx_GOTREF(__pyx_t_16);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_15)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_t_18};
+ __pyx_t_16 = __Pyx_PyFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 930, __pyx_L13_except_error)
+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_15)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_17, __pyx_t_18};
+ __pyx_t_16 = __Pyx_PyCFunction_FastCall(__pyx_t_15, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 930, __pyx_L13_except_error)
+ __Pyx_XDECREF(__pyx_t_17); __pyx_t_17 = 0;
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 930, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_17); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_17); __pyx_t_17 = NULL;
+ __Pyx_GIVEREF(__pyx_t_18);
+ PyTuple_SET_ITEM(__pyx_t_5, 0+1, __pyx_t_18);
+ __pyx_t_18 = 0;
+ __pyx_t_16 = __Pyx_PyObject_Call(__pyx_t_15, __pyx_t_5, NULL); if (unlikely(!__pyx_t_16)) __PYX_ERR(0, 930, __pyx_L13_except_error)
+ __Pyx_GOTREF(__pyx_t_16);
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
+ __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":934
+ * "constraint %s: %s"
+ * % (constraint_data.name, str(err)))
+ * raise # <<<<<<<<<<<<<<
+ *
+ * block_repn[constraint_data] = repn
+ */
+ __Pyx_GIVEREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_2);
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_ErrRestoreWithState(__pyx_t_9, __pyx_t_2, __pyx_t_6);
+ __pyx_t_9 = 0; __pyx_t_2 = 0; __pyx_t_6 = 0;
+ __PYX_ERR(0, 934, __pyx_L13_except_error)
+ }
+ goto __pyx_L13_except_error;
+ __pyx_L13_except_error:;
+
+ /* "pyomo/repn/standard_repn.pyx":925
+ * "of constraint %s" % (constraint_data.name))
+ *
+ * try: # <<<<<<<<<<<<<<
+ * repn = generate_standard_repn(constraint_data.body,
+ * idMap=idMap)
+ */
+ __Pyx_XGIVEREF(__pyx_t_11);
+ __Pyx_XGIVEREF(__pyx_t_12);
+ __Pyx_XGIVEREF(__pyx_t_13);
+ __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
+ goto __pyx_L1_error;
+ __pyx_L18_try_end:;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":936
+ * raise
+ *
+ * block_repn[constraint_data] = repn # <<<<<<<<<<<<<<
+ *
+ * def preprocess_constraint_data(block,
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_block_repn, __pyx_v_constraint_data, __pyx_v_repn) < 0)) __PYX_ERR(0, 936, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":915
+ * block_repn = block._repn
+ *
+ * for index, constraint_data in iteritems(constraint): # <<<<<<<<<<<<<<
+ *
+ * if not constraint_data.active:
+ */
+ __pyx_L5_continue:;
+ }
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":901
+ * block_repn=block_repn)
+ *
+ * def preprocess_constraint(block, # <<<<<<<<<<<<<<
+ * constraint,
+ * idMap=None,
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_6);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_15);
+ __Pyx_XDECREF(__pyx_t_16);
+ __Pyx_XDECREF(__pyx_t_17);
+ __Pyx_XDECREF(__pyx_t_18);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.preprocess_constraint", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_MatrixConstraint);
+ __Pyx_XDECREF(__pyx_v_index);
+ __Pyx_XDECREF(__pyx_v_constraint_data);
+ __Pyx_XDECREF(__pyx_v_repn);
+ __Pyx_XDECREF(__pyx_v_err);
+ __Pyx_XDECREF(__pyx_v_block_repn);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+/* "pyomo/repn/standard_repn.pyx":938
+ * block_repn[constraint_data] = repn
+ *
+ * def preprocess_constraint_data(block, # <<<<<<<<<<<<<<
+ * constraint_data,
+ * idMap=None,
+ */
+
+/* Python wrapper */
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_41preprocess_constraint_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
+static PyMethodDef __pyx_mdef_5pyomo_4repn_13standard_repn_41preprocess_constraint_data = {"preprocess_constraint_data", (PyCFunction)__pyx_pw_5pyomo_4repn_13standard_repn_41preprocess_constraint_data, METH_VARARGS|METH_KEYWORDS, 0};
+static PyObject *__pyx_pw_5pyomo_4repn_13standard_repn_41preprocess_constraint_data(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
+ PyObject *__pyx_v_block = 0;
+ PyObject *__pyx_v_constraint_data = 0;
+ PyObject *__pyx_v_idMap = 0;
+ PyObject *__pyx_v_block_repn = 0;
+ PyObject *__pyx_r = 0;
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("preprocess_constraint_data (wrapper)", 0);
+ {
+ static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_block,&__pyx_n_s_constraint_data,&__pyx_n_s_idMap,&__pyx_n_s_block_repn,0};
+ PyObject* values[4] = {0,0,0,0};
+
+ /* "pyomo/repn/standard_repn.pyx":940
+ * def preprocess_constraint_data(block,
+ * constraint_data,
+ * idMap=None, # <<<<<<<<<<<<<<
+ * block_repn=None):
+ *
+ */
+ values[2] = ((PyObject *)Py_None);
+
+ /* "pyomo/repn/standard_repn.pyx":941
+ * constraint_data,
+ * idMap=None,
+ * block_repn=None): # <<<<<<<<<<<<<<
+ *
+ * # Get/Create the ComponentMap for the repn
+ */
+ values[3] = ((PyObject *)Py_None);
+ if (unlikely(__pyx_kwds)) {
+ Py_ssize_t kw_args;
+ const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
+ switch (pos_args) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ CYTHON_FALLTHROUGH;
+ case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ CYTHON_FALLTHROUGH;
+ case 0: break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ kw_args = PyDict_Size(__pyx_kwds);
+ switch (pos_args) {
+ case 0:
+ if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_block)) != 0)) kw_args--;
+ else goto __pyx_L5_argtuple_error;
+ CYTHON_FALLTHROUGH;
+ case 1:
+ if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_constraint_data)) != 0)) kw_args--;
+ else {
+ __Pyx_RaiseArgtupleInvalid("preprocess_constraint_data", 0, 2, 4, 1); __PYX_ERR(0, 938, __pyx_L3_error)
+ }
+ CYTHON_FALLTHROUGH;
+ case 2:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_idMap);
+ if (value) { values[2] = value; kw_args--; }
+ }
+ CYTHON_FALLTHROUGH;
+ case 3:
+ if (kw_args > 0) {
+ PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_block_repn);
+ if (value) { values[3] = value; kw_args--; }
+ }
+ }
+ if (unlikely(kw_args > 0)) {
+ if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "preprocess_constraint_data") < 0)) __PYX_ERR(0, 938, __pyx_L3_error)
+ }
+ } else {
+ switch (PyTuple_GET_SIZE(__pyx_args)) {
+ case 4: values[3] = PyTuple_GET_ITEM(__pyx_args, 3);
+ CYTHON_FALLTHROUGH;
+ case 3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
+ CYTHON_FALLTHROUGH;
+ case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
+ values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
+ break;
+ default: goto __pyx_L5_argtuple_error;
+ }
+ }
+ __pyx_v_block = values[0];
+ __pyx_v_constraint_data = values[1];
+ __pyx_v_idMap = values[2];
+ __pyx_v_block_repn = values[3];
+ }
+ goto __pyx_L4_argument_unpacking_done;
+ __pyx_L5_argtuple_error:;
+ __Pyx_RaiseArgtupleInvalid("preprocess_constraint_data", 0, 2, 4, PyTuple_GET_SIZE(__pyx_args)); __PYX_ERR(0, 938, __pyx_L3_error)
+ __pyx_L3_error:;
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.preprocess_constraint_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __Pyx_RefNannyFinishContext();
+ return NULL;
+ __pyx_L4_argument_unpacking_done:;
+ __pyx_r = __pyx_pf_5pyomo_4repn_13standard_repn_40preprocess_constraint_data(__pyx_self, __pyx_v_block, __pyx_v_constraint_data, __pyx_v_idMap, __pyx_v_block_repn);
+
+ /* "pyomo/repn/standard_repn.pyx":938
+ * block_repn[constraint_data] = repn
+ *
+ * def preprocess_constraint_data(block, # <<<<<<<<<<<<<<
+ * constraint_data,
+ * idMap=None,
+ */
+
+ /* function exit code */
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static PyObject *__pyx_pf_5pyomo_4repn_13standard_repn_40preprocess_constraint_data(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_block, PyObject *__pyx_v_constraint_data, PyObject *__pyx_v_idMap, PyObject *__pyx_v_block_repn) {
+ PyObject *__pyx_v_repn = NULL;
+ PyObject *__pyx_v_err = NULL;
+ PyObject *__pyx_r = NULL;
+ __Pyx_RefNannyDeclarations
+ int __pyx_t_1;
+ int __pyx_t_2;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ PyObject *__pyx_t_7 = NULL;
+ PyObject *__pyx_t_8 = NULL;
+ PyObject *__pyx_t_9 = NULL;
+ int __pyx_t_10;
+ PyObject *__pyx_t_11 = NULL;
+ PyObject *__pyx_t_12 = NULL;
+ PyObject *__pyx_t_13 = NULL;
+ PyObject *__pyx_t_14 = NULL;
+ __Pyx_RefNannySetupContext("preprocess_constraint_data", 0);
+ __Pyx_INCREF(__pyx_v_block_repn);
+
+ /* "pyomo/repn/standard_repn.pyx":944
+ *
+ * # Get/Create the ComponentMap for the repn
+ * if not hasattr(block,'_repn'): # <<<<<<<<<<<<<<
+ * block._repn = ComponentMap()
+ * block_repn = block._repn
+ */
+ __pyx_t_1 = __Pyx_HasAttr(__pyx_v_block, __pyx_n_s_repn_2); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(0, 944, __pyx_L1_error)
+ __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
+ if (__pyx_t_2) {
+
+ /* "pyomo/repn/standard_repn.pyx":945
+ * # Get/Create the ComponentMap for the repn
+ * if not hasattr(block,'_repn'):
+ * block._repn = ComponentMap() # <<<<<<<<<<<<<<
+ * block_repn = block._repn
+ *
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_ComponentMap); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 945, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_5 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_4))) {
+ __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
+ if (likely(__pyx_t_5)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
+ __Pyx_INCREF(__pyx_t_5);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_4, function);
+ }
+ }
+ if (__pyx_t_5) {
+ __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 945, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ } else {
+ __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 945, __pyx_L1_error)
+ }
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ if (__Pyx_PyObject_SetAttrStr(__pyx_v_block, __pyx_n_s_repn_2, __pyx_t_3) < 0) __PYX_ERR(0, 945, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":944
+ *
+ * # Get/Create the ComponentMap for the repn
+ * if not hasattr(block,'_repn'): # <<<<<<<<<<<<<<
+ * block._repn = ComponentMap()
+ * block_repn = block._repn
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":946
+ * if not hasattr(block,'_repn'):
+ * block._repn = ComponentMap()
+ * block_repn = block._repn # <<<<<<<<<<<<<<
+ *
+ * if constraint_data.body is None:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_block, __pyx_n_s_repn_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 946, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_DECREF_SET(__pyx_v_block_repn, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":948
+ * block_repn = block._repn
+ *
+ * if constraint_data.body is None: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * "No expression has been defined for the body "
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_constraint_data, __pyx_n_s_body); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 948, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_2 = (__pyx_t_3 == Py_None);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_t_1 = (__pyx_t_2 != 0);
+ if (__pyx_t_1) {
+
+ /* "pyomo/repn/standard_repn.pyx":951
+ * raise ValueError(
+ * "No expression has been defined for the body "
+ * "of constraint %s" % (constraint_data.name)) # <<<<<<<<<<<<<<
+ *
+ * try:
+ */
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_constraint_data, __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 951, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_No_expression_has_been_defined_f_2, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 951, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":949
+ *
+ * if constraint_data.body is None:
+ * raise ValueError( # <<<<<<<<<<<<<<
+ * "No expression has been defined for the body "
+ * "of constraint %s" % (constraint_data.name))
+ */
+ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 949, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
+ __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 949, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_Raise(__pyx_t_4, 0, 0, 0);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __PYX_ERR(0, 949, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":948
+ * block_repn = block._repn
+ *
+ * if constraint_data.body is None: # <<<<<<<<<<<<<<
+ * raise ValueError(
+ * "No expression has been defined for the body "
+ */
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":953
+ * "of constraint %s" % (constraint_data.name))
+ *
+ * try: # <<<<<<<<<<<<<<
+ * repn = generate_standard_repn(constraint_data.body,
+ * idMap=idMap)
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_6, &__pyx_t_7, &__pyx_t_8);
+ __Pyx_XGOTREF(__pyx_t_6);
+ __Pyx_XGOTREF(__pyx_t_7);
+ __Pyx_XGOTREF(__pyx_t_8);
+ /*try:*/ {
+
+ /* "pyomo/repn/standard_repn.pyx":954
+ *
+ * try:
+ * repn = generate_standard_repn(constraint_data.body, # <<<<<<<<<<<<<<
+ * idMap=idMap)
+ * except Exception:
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_generate_standard_repn); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 954, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_constraint_data, __pyx_n_s_body); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 954, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 954, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_5);
+ __Pyx_GIVEREF(__pyx_t_3);
+ PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3);
+ __pyx_t_3 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":955
+ * try:
+ * repn = generate_standard_repn(constraint_data.body,
+ * idMap=idMap) # <<<<<<<<<<<<<<
+ * except Exception:
+ * err = sys.exc_info()[1]
+ */
+ __pyx_t_3 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 955, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_3);
+ if (PyDict_SetItem(__pyx_t_3, __pyx_n_s_idMap, __pyx_v_idMap) < 0) __PYX_ERR(0, 955, __pyx_L5_error)
+
+ /* "pyomo/repn/standard_repn.pyx":954
+ *
+ * try:
+ * repn = generate_standard_repn(constraint_data.body, # <<<<<<<<<<<<<<
+ * idMap=idMap)
+ * except Exception:
+ */
+ __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, __pyx_t_3); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 954, __pyx_L5_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __pyx_v_repn = __pyx_t_9;
+ __pyx_t_9 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":953
+ * "of constraint %s" % (constraint_data.name))
+ *
+ * try: # <<<<<<<<<<<<<<
+ * repn = generate_standard_repn(constraint_data.body,
+ * idMap=idMap)
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
+ __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
+ goto __pyx_L10_try_end;
+ __pyx_L5_error:;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":956
+ * repn = generate_standard_repn(constraint_data.body,
+ * idMap=idMap)
+ * except Exception: # <<<<<<<<<<<<<<
+ * err = sys.exc_info()[1]
+ * logging.getLogger('pyomo.core').error(
+ */
+ __pyx_t_10 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(&((PyTypeObject*)PyExc_Exception)[0])));
+ if (__pyx_t_10) {
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.preprocess_constraint_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_3, &__pyx_t_5) < 0) __PYX_ERR(0, 956, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_9);
+ __Pyx_GOTREF(__pyx_t_3);
+ __Pyx_GOTREF(__pyx_t_5);
+
+ /* "pyomo/repn/standard_repn.pyx":957
+ * idMap=idMap)
+ * except Exception:
+ * err = sys.exc_info()[1] # <<<<<<<<<<<<<<
+ * logging.getLogger('pyomo.core').error(
+ * "exception generating a standard representation for "
+ */
+ __pyx_t_11 = __Pyx_GetModuleGlobalName(__pyx_n_s_sys); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 957, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __pyx_t_12 = __Pyx_PyObject_GetAttrStr(__pyx_t_11, __pyx_n_s_exc_info); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 957, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = NULL;
+ if (CYTHON_UNPACK_METHODS && unlikely(PyMethod_Check(__pyx_t_12))) {
+ __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_12);
+ if (likely(__pyx_t_11)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_12);
+ __Pyx_INCREF(__pyx_t_11);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_12, function);
+ }
+ }
+ if (__pyx_t_11) {
+ __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_12, __pyx_t_11); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 957, __pyx_L7_except_error)
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ } else {
+ __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 957, __pyx_L7_except_error)
+ }
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+ __pyx_t_12 = __Pyx_GetItemInt(__pyx_t_4, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 957, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_v_err = __pyx_t_12;
+ __pyx_t_12 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":958
+ * except Exception:
+ * err = sys.exc_info()[1]
+ * logging.getLogger('pyomo.core').error( # <<<<<<<<<<<<<<
+ * "exception generating a standard representation for "
+ * "constraint %s: %s"
+ */
+ __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 958, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 958, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 958, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __pyx_t_11 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_error); if (unlikely(!__pyx_t_11)) __PYX_ERR(0, 958, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_11);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":961
+ * "exception generating a standard representation for "
+ * "constraint %s: %s"
+ * % (constraint_data.name, str(err))) # <<<<<<<<<<<<<<
+ * raise
+ *
+ */
+ __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_constraint_data, __pyx_n_s_name); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 961, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 961, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_INCREF(__pyx_v_err);
+ __Pyx_GIVEREF(__pyx_v_err);
+ PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_v_err);
+ __pyx_t_14 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_13, NULL); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 961, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __pyx_t_13 = PyTuple_New(2); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 961, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_13);
+ __Pyx_GIVEREF(__pyx_t_4);
+ PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_14);
+ __pyx_t_4 = 0;
+ __pyx_t_14 = 0;
+ __pyx_t_14 = __Pyx_PyString_Format(__pyx_kp_s_exception_generating_a_standard_2, __pyx_t_13); if (unlikely(!__pyx_t_14)) __PYX_ERR(0, 961, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_14);
+ __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __pyx_t_13 = NULL;
+ if (CYTHON_UNPACK_METHODS && likely(PyMethod_Check(__pyx_t_11))) {
+ __pyx_t_13 = PyMethod_GET_SELF(__pyx_t_11);
+ if (likely(__pyx_t_13)) {
+ PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_11);
+ __Pyx_INCREF(__pyx_t_13);
+ __Pyx_INCREF(function);
+ __Pyx_DECREF_SET(__pyx_t_11, function);
+ }
+ }
+ if (!__pyx_t_13) {
+ __pyx_t_12 = __Pyx_PyObject_CallOneArg(__pyx_t_11, __pyx_t_14); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 958, __pyx_L7_except_error)
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ } else {
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_14};
+ __pyx_t_12 = __Pyx_PyFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 958, __pyx_L7_except_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(__pyx_t_11)) {
+ PyObject *__pyx_temp[2] = {__pyx_t_13, __pyx_t_14};
+ __pyx_t_12 = __Pyx_PyCFunction_FastCall(__pyx_t_11, __pyx_temp+1-1, 1+1); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 958, __pyx_L7_except_error)
+ __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
+ } else
+ #endif
+ {
+ __pyx_t_4 = PyTuple_New(1+1); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 958, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_4);
+ __Pyx_GIVEREF(__pyx_t_13); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_13); __pyx_t_13 = NULL;
+ __Pyx_GIVEREF(__pyx_t_14);
+ PyTuple_SET_ITEM(__pyx_t_4, 0+1, __pyx_t_14);
+ __pyx_t_14 = 0;
+ __pyx_t_12 = __Pyx_PyObject_Call(__pyx_t_11, __pyx_t_4, NULL); if (unlikely(!__pyx_t_12)) __PYX_ERR(0, 958, __pyx_L7_except_error)
+ __Pyx_GOTREF(__pyx_t_12);
+ __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
+ }
+ }
+ __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
+ __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":962
+ * "constraint %s: %s"
+ * % (constraint_data.name, str(err)))
+ * raise # <<<<<<<<<<<<<<
+ *
+ * block_repn[constraint_data] = repn
+ */
+ __Pyx_GIVEREF(__pyx_t_9);
+ __Pyx_GIVEREF(__pyx_t_3);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ErrRestoreWithState(__pyx_t_9, __pyx_t_3, __pyx_t_5);
+ __pyx_t_9 = 0; __pyx_t_3 = 0; __pyx_t_5 = 0;
+ __PYX_ERR(0, 962, __pyx_L7_except_error)
+ }
+ goto __pyx_L7_except_error;
+ __pyx_L7_except_error:;
+
+ /* "pyomo/repn/standard_repn.pyx":953
+ * "of constraint %s" % (constraint_data.name))
+ *
+ * try: # <<<<<<<<<<<<<<
+ * repn = generate_standard_repn(constraint_data.body,
+ * idMap=idMap)
+ */
+ __Pyx_XGIVEREF(__pyx_t_6);
+ __Pyx_XGIVEREF(__pyx_t_7);
+ __Pyx_XGIVEREF(__pyx_t_8);
+ __Pyx_ExceptionReset(__pyx_t_6, __pyx_t_7, __pyx_t_8);
+ goto __pyx_L1_error;
+ __pyx_L10_try_end:;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":964
+ * raise
+ *
+ * block_repn[constraint_data] = repn # <<<<<<<<<<<<<<
+ *
+ */
+ if (unlikely(PyObject_SetItem(__pyx_v_block_repn, __pyx_v_constraint_data, __pyx_v_repn) < 0)) __PYX_ERR(0, 964, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":938
+ * block_repn[constraint_data] = repn
+ *
+ * def preprocess_constraint_data(block, # <<<<<<<<<<<<<<
+ * constraint_data,
+ * idMap=None,
+ */
+
+ /* function exit code */
+ __pyx_r = Py_None; __Pyx_INCREF(Py_None);
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_3);
+ __Pyx_XDECREF(__pyx_t_4);
+ __Pyx_XDECREF(__pyx_t_5);
+ __Pyx_XDECREF(__pyx_t_9);
+ __Pyx_XDECREF(__pyx_t_11);
+ __Pyx_XDECREF(__pyx_t_12);
+ __Pyx_XDECREF(__pyx_t_13);
+ __Pyx_XDECREF(__pyx_t_14);
+ __Pyx_AddTraceback("pyomo.repn.standard_repn.preprocess_constraint_data", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ __pyx_r = NULL;
+ __pyx_L0:;
+ __Pyx_XDECREF(__pyx_v_repn);
+ __Pyx_XDECREF(__pyx_v_err);
+ __Pyx_XDECREF(__pyx_v_block_repn);
+ __Pyx_XGIVEREF(__pyx_r);
+ __Pyx_RefNannyFinishContext();
+ return __pyx_r;
+}
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_idMap);
+ Py_CLEAR(p->__pyx_v_keys);
+ Py_CLEAR(p->__pyx_v_linear_coefs);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *)o;
+ if (p->__pyx_v_idMap) {
+ e = (*v)(p->__pyx_v_idMap, a); if (e) return e;
+ }
+ if (p->__pyx_v_keys) {
+ e = (*v)(p->__pyx_v_keys, a); if (e) return e;
+ }
+ if (p->__pyx_v_linear_coefs) {
+ e = (*v)(p->__pyx_v_linear_coefs, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn(PyObject *o) {
+ PyObject* tmp;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn *)o;
+ tmp = ((PyObject*)p->__pyx_v_idMap);
+ p->__pyx_v_idMap = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_keys);
+ p->__pyx_v_keys = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_linear_coefs);
+ p->__pyx_v_linear_coefs = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct__generate_standard_repn", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn, /*tp_traverse*/
+ __pyx_tp_clear_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_key);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_1_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_key);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_2_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_idMap);
+ Py_CLEAR(p->__pyx_v_lhs);
+ Py_CLEAR(p->__pyx_v_rhs);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *)o;
+ if (p->__pyx_v_idMap) {
+ e = (*v)(p->__pyx_v_idMap, a); if (e) return e;
+ }
+ if (p->__pyx_v_lhs) {
+ e = (*v)(p->__pyx_v_lhs, a); if (e) return e;
+ }
+ if (p->__pyx_v_rhs) {
+ e = (*v)(p->__pyx_v_rhs, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod(PyObject *o) {
+ PyObject* tmp;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod *)o;
+ tmp = ((PyObject*)p->__pyx_v_idMap);
+ p->__pyx_v_idMap = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_lhs);
+ p->__pyx_v_lhs = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_rhs);
+ p->__pyx_v_rhs = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_3__collect_prod", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod, /*tp_traverse*/
+ __pyx_tp_clear_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_coef);
+ Py_CLEAR(p->__pyx_v_key);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_coef) {
+ e = (*v)(p->__pyx_v_coef, a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_4_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_coef);
+ Py_CLEAR(p->__pyx_v_key);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_coef) {
+ e = (*v)(p->__pyx_v_coef, a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_5_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_coef);
+ Py_CLEAR(p->__pyx_v_key);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_coef) {
+ e = (*v)(p->__pyx_v_coef, a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_6_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_coef);
+ Py_CLEAR(p->__pyx_v_key);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_coef) {
+ e = (*v)(p->__pyx_v_coef, a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_7_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_coef);
+ Py_CLEAR(p->__pyx_v_key);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_coef) {
+ e = (*v)(p->__pyx_v_coef, a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_8_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_coef);
+ Py_CLEAR(p->__pyx_v_key);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_coef) {
+ e = (*v)(p->__pyx_v_coef, a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_9_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_v_ans);
+ Py_CLEAR(p->__pyx_v_idMap);
+ Py_CLEAR(p->__pyx_v_keys);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *)o;
+ if (p->__pyx_v_ans) {
+ e = (*v)(p->__pyx_v_ans, a); if (e) return e;
+ }
+ if (p->__pyx_v_idMap) {
+ e = (*v)(p->__pyx_v_idMap, a); if (e) return e;
+ }
+ if (p->__pyx_v_keys) {
+ e = (*v)(p->__pyx_v_keys, a); if (e) return e;
+ }
+ return 0;
+}
+
+static int __pyx_tp_clear_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn(PyObject *o) {
+ PyObject* tmp;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn *)o;
+ tmp = ((PyObject*)p->__pyx_v_ans);
+ p->__pyx_v_ans = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_idMap);
+ p->__pyx_v_idMap = Py_None; Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ tmp = ((PyObject*)p->__pyx_v_keys);
+ p->__pyx_v_keys = ((PyObject*)Py_None); Py_INCREF(Py_None);
+ Py_XDECREF(tmp);
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_10__generate_standard_repn", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn, /*tp_traverse*/
+ __pyx_tp_clear_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_key);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_11_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_key);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_12_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_key);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_13_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_key);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_14_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_key);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_15_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr *__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr[8];
+static int __pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr = 0;
+
+static PyObject *__pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
+ PyObject *o;
+ if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr)))) {
+ o = (PyObject*)__pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr[--__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr];
+ memset(o, 0, sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr));
+ (void) PyObject_INIT(o, t);
+ PyObject_GC_Track(o);
+ } else {
+ o = (*t->tp_alloc)(t, 0);
+ if (unlikely(!o)) return 0;
+ }
+ return o;
+}
+
+static void __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr(PyObject *o) {
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr *)o;
+ PyObject_GC_UnTrack(o);
+ Py_CLEAR(p->__pyx_outer_scope);
+ Py_CLEAR(p->__pyx_v_key);
+ Py_CLEAR(p->__pyx_t_0);
+ if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr)))) {
+ __pyx_freelist_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr[__pyx_freecount_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr++] = ((struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr *)o);
+ } else {
+ (*Py_TYPE(o)->tp_free)(o);
+ }
+}
+
+static int __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr(PyObject *o, visitproc v, void *a) {
+ int e;
+ struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr *p = (struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr *)o;
+ if (p->__pyx_outer_scope) {
+ e = (*v)(((PyObject *)p->__pyx_outer_scope), a); if (e) return e;
+ }
+ if (p->__pyx_v_key) {
+ e = (*v)(p->__pyx_v_key, a); if (e) return e;
+ }
+ if (p->__pyx_t_0) {
+ e = (*v)(p->__pyx_t_0, a); if (e) return e;
+ }
+ return 0;
+}
+
+static PyTypeObject __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "pyomo.repn.standard_repn.__pyx_scope_struct_16_genexpr", /*tp_name*/
+ sizeof(struct __pyx_obj_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr), /*tp_basicsize*/
+ 0, /*tp_itemsize*/
+ __pyx_tp_dealloc_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr, /*tp_dealloc*/
+ 0, /*tp_print*/
+ 0, /*tp_getattr*/
+ 0, /*tp_setattr*/
+ #if PY_MAJOR_VERSION < 3
+ 0, /*tp_compare*/
+ #endif
+ #if PY_MAJOR_VERSION >= 3
+ 0, /*tp_as_async*/
+ #endif
+ 0, /*tp_repr*/
+ 0, /*tp_as_number*/
+ 0, /*tp_as_sequence*/
+ 0, /*tp_as_mapping*/
+ 0, /*tp_hash*/
+ 0, /*tp_call*/
+ 0, /*tp_str*/
+ 0, /*tp_getattro*/
+ 0, /*tp_setattro*/
+ 0, /*tp_as_buffer*/
+ Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
+ 0, /*tp_doc*/
+ __pyx_tp_traverse_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr, /*tp_traverse*/
+ 0, /*tp_clear*/
+ 0, /*tp_richcompare*/
+ 0, /*tp_weaklistoffset*/
+ 0, /*tp_iter*/
+ 0, /*tp_iternext*/
+ 0, /*tp_methods*/
+ 0, /*tp_members*/
+ 0, /*tp_getset*/
+ 0, /*tp_base*/
+ 0, /*tp_dict*/
+ 0, /*tp_descr_get*/
+ 0, /*tp_descr_set*/
+ 0, /*tp_dictoffset*/
+ 0, /*tp_init*/
+ 0, /*tp_alloc*/
+ __pyx_tp_new_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr, /*tp_new*/
+ 0, /*tp_free*/
+ 0, /*tp_is_gc*/
+ 0, /*tp_bases*/
+ 0, /*tp_mro*/
+ 0, /*tp_cache*/
+ 0, /*tp_subclasses*/
+ 0, /*tp_weaklist*/
+ 0, /*tp_del*/
+ 0, /*tp_version_tag*/
+ #if PY_VERSION_HEX >= 0x030400a1
+ 0, /*tp_finalize*/
+ #endif
+};
+
+static PyMethodDef __pyx_methods[] = {
+ {0, 0, 0, 0}
+};
+
+#if PY_MAJOR_VERSION >= 3
+#if CYTHON_PEP489_MULTI_PHASE_INIT
+static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
+static int __pyx_pymod_exec_standard_repn(PyObject* module); /*proto*/
+static PyModuleDef_Slot __pyx_moduledef_slots[] = {
+ {Py_mod_create, (void*)__pyx_pymod_create},
+ {Py_mod_exec, (void*)__pyx_pymod_exec_standard_repn},
+ {0, NULL}
+};
+#endif
+
+static struct PyModuleDef __pyx_moduledef = {
+ PyModuleDef_HEAD_INIT,
+ "standard_repn",
+ 0, /* m_doc */
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ 0, /* m_size */
+ #else
+ -1, /* m_size */
+ #endif
+ __pyx_methods /* m_methods */,
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ __pyx_moduledef_slots, /* m_slots */
+ #else
+ NULL, /* m_reload */
+ #endif
+ NULL, /* m_traverse */
+ NULL, /* m_clear */
+ NULL /* m_free */
+};
+#endif
+
+static __Pyx_StringTabEntry __pyx_string_tab[] = {
+ {&__pyx_kp_s_, __pyx_k_, sizeof(__pyx_k_), 0, 0, 1, 0},
+ {&__pyx_n_s_AbsExpression, __pyx_k_AbsExpression, sizeof(__pyx_k_AbsExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_AttributeError, __pyx_k_AttributeError, sizeof(__pyx_k_AttributeError), 0, 0, 1, 1},
+ {&__pyx_n_s_Bunch, __pyx_k_Bunch, sizeof(__pyx_k_Bunch), 0, 0, 1, 1},
+ {&__pyx_n_s_C, __pyx_k_C, sizeof(__pyx_k_C), 0, 0, 1, 1},
+ {&__pyx_n_s_ComponentMap, __pyx_k_ComponentMap, sizeof(__pyx_k_ComponentMap), 0, 0, 1, 1},
+ {&__pyx_kp_s_Const_f_Linear_s_Quadratic_s_Non, __pyx_k_Const_f_Linear_s_Quadratic_s_Non, sizeof(__pyx_k_Const_f_Linear_s_Quadratic_s_Non), 0, 0, 1, 0},
+ {&__pyx_n_s_Constraint, __pyx_k_Constraint, sizeof(__pyx_k_Constraint), 0, 0, 1, 1},
+ {&__pyx_n_s_EXPR, __pyx_k_EXPR, sizeof(__pyx_k_EXPR), 0, 0, 1, 1},
+ {&__pyx_n_s_EqualityExpression, __pyx_k_EqualityExpression, sizeof(__pyx_k_EqualityExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_Expr_if, __pyx_k_Expr_if, sizeof(__pyx_k_Expr_if), 0, 0, 1, 1},
+ {&__pyx_n_s_Expression, __pyx_k_Expression, sizeof(__pyx_k_Expression), 0, 0, 1, 1},
+ {&__pyx_n_s_ExpressionData, __pyx_k_ExpressionData, sizeof(__pyx_k_ExpressionData), 0, 0, 1, 1},
+ {&__pyx_n_s_ExternalFunctionExpression, __pyx_k_ExternalFunctionExpression, sizeof(__pyx_k_ExternalFunctionExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_GeneralExpressionData, __pyx_k_GeneralExpressionData, sizeof(__pyx_k_GeneralExpressionData), 0, 0, 1, 1},
+ {&__pyx_n_s_GeneralObjectiveData, __pyx_k_GeneralObjectiveData, sizeof(__pyx_k_GeneralObjectiveData), 0, 0, 1, 1},
+ {&__pyx_n_s_GeneralVarData, __pyx_k_GeneralVarData, sizeof(__pyx_k_GeneralVarData), 0, 0, 1, 1},
+ {&__pyx_n_s_IIdentityExpression, __pyx_k_IIdentityExpression, sizeof(__pyx_k_IIdentityExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_IVariable, __pyx_k_IVariable, sizeof(__pyx_k_IVariable), 0, 0, 1, 1},
+ {&__pyx_n_s_InequalityExpression, __pyx_k_InequalityExpression, sizeof(__pyx_k_InequalityExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
+ {&__pyx_n_s_LinearExpression, __pyx_k_LinearExpression, sizeof(__pyx_k_LinearExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_MatrixConstraint, __pyx_k_MatrixConstraint, sizeof(__pyx_k_MatrixConstraint), 0, 0, 1, 1},
+ {&__pyx_n_s_NegationExpression, __pyx_k_NegationExpression, sizeof(__pyx_k_NegationExpression), 0, 0, 1, 1},
+ {&__pyx_kp_s_No_expression_has_been_defined_f, __pyx_k_No_expression_has_been_defined_f, sizeof(__pyx_k_No_expression_has_been_defined_f), 0, 0, 1, 0},
+ {&__pyx_kp_s_No_expression_has_been_defined_f_2, __pyx_k_No_expression_has_been_defined_f_2, sizeof(__pyx_k_No_expression_has_been_defined_f_2), 0, 0, 1, 0},
+ {&__pyx_n_s_NumericConstant, __pyx_k_NumericConstant, sizeof(__pyx_k_NumericConstant), 0, 0, 1, 1},
+ {&__pyx_n_s_Objective, __pyx_k_Objective, sizeof(__pyx_k_Objective), 0, 0, 1, 1},
+ {&__pyx_n_s_PY3, __pyx_k_PY3, sizeof(__pyx_k_PY3), 0, 0, 1, 1},
+ {&__pyx_n_s_ParamData, __pyx_k_ParamData, sizeof(__pyx_k_ParamData), 0, 0, 1, 1},
+ {&__pyx_n_s_PowExpression, __pyx_k_PowExpression, sizeof(__pyx_k_PowExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_ProductExpression, __pyx_k_ProductExpression, sizeof(__pyx_k_ProductExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_RangedExpression, __pyx_k_RangedExpression, sizeof(__pyx_k_RangedExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_ReciprocalExpression, __pyx_k_ReciprocalExpression, sizeof(__pyx_k_ReciprocalExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_Results, __pyx_k_Results, sizeof(__pyx_k_Results), 0, 0, 1, 1},
+ {&__pyx_n_s_Results___init, __pyx_k_Results___init, sizeof(__pyx_k_Results___init), 0, 0, 1, 1},
+ {&__pyx_n_s_Results___str, __pyx_k_Results___str, sizeof(__pyx_k_Results___str), 0, 0, 1, 1},
+ {&__pyx_n_s_SimpleExpression, __pyx_k_SimpleExpression, sizeof(__pyx_k_SimpleExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_SimpleObjective, __pyx_k_SimpleObjective, sizeof(__pyx_k_SimpleObjective), 0, 0, 1, 1},
+ {&__pyx_n_s_SimpleVar, __pyx_k_SimpleVar, sizeof(__pyx_k_SimpleVar), 0, 0, 1, 1},
+ {&__pyx_n_s_StandardRepn, __pyx_k_StandardRepn, sizeof(__pyx_k_StandardRepn), 0, 0, 1, 1},
+ {&__pyx_n_s_StandardRepn___getstate, __pyx_k_StandardRepn___getstate, sizeof(__pyx_k_StandardRepn___getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_StandardRepn___init, __pyx_k_StandardRepn___init, sizeof(__pyx_k_StandardRepn___init), 0, 0, 1, 1},
+ {&__pyx_n_s_StandardRepn___setstate, __pyx_k_StandardRepn___setstate, sizeof(__pyx_k_StandardRepn___setstate), 0, 0, 1, 1},
+ {&__pyx_n_s_StandardRepn___str, __pyx_k_StandardRepn___str, sizeof(__pyx_k_StandardRepn___str), 0, 0, 1, 1},
+ {&__pyx_n_s_StandardRepn_is_constant, __pyx_k_StandardRepn_is_constant, sizeof(__pyx_k_StandardRepn_is_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_StandardRepn_is_fixed, __pyx_k_StandardRepn_is_fixed, sizeof(__pyx_k_StandardRepn_is_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_StandardRepn_is_linear, __pyx_k_StandardRepn_is_linear, sizeof(__pyx_k_StandardRepn_is_linear), 0, 0, 1, 1},
+ {&__pyx_n_s_StandardRepn_is_nonlinear, __pyx_k_StandardRepn_is_nonlinear, sizeof(__pyx_k_StandardRepn_is_nonlinear), 0, 0, 1, 1},
+ {&__pyx_n_s_StandardRepn_is_quadratic, __pyx_k_StandardRepn_is_quadratic, sizeof(__pyx_k_StandardRepn_is_quadratic), 0, 0, 1, 1},
+ {&__pyx_n_s_StandardRepn_polynomial_degree, __pyx_k_StandardRepn_polynomial_degree, sizeof(__pyx_k_StandardRepn_polynomial_degree), 0, 0, 1, 1},
+ {&__pyx_n_s_StandardRepn_to_expression, __pyx_k_StandardRepn_to_expression, sizeof(__pyx_k_StandardRepn_to_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_StringIO, __pyx_k_StringIO, sizeof(__pyx_k_StringIO), 0, 0, 1, 1},
+ {&__pyx_n_s_Sum, __pyx_k_Sum, sizeof(__pyx_k_Sum), 0, 0, 1, 1},
+ {&__pyx_kp_s_This_class_defines_a_standard_c, __pyx_k_This_class_defines_a_standard_c, sizeof(__pyx_k_This_class_defines_a_standard_c), 0, 0, 1, 0},
+ {&__pyx_n_s_UnaryFunctionExpression, __pyx_k_UnaryFunctionExpression, sizeof(__pyx_k_UnaryFunctionExpression), 0, 0, 1, 1},
+ {&__pyx_kp_s_Unexpected_expression_type, __pyx_k_Unexpected_expression_type, sizeof(__pyx_k_Unexpected_expression_type), 0, 0, 1, 0},
+ {&__pyx_kp_s_Unexpected_expression_type_s, __pyx_k_Unexpected_expression_type_s, sizeof(__pyx_k_Unexpected_expression_type_s), 0, 0, 1, 0},
+ {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
+ {&__pyx_n_s_Var, __pyx_k_Var, sizeof(__pyx_k_Var), 0, 0, 1, 1},
+ {&__pyx_n_s_VarData, __pyx_k_VarData, sizeof(__pyx_k_VarData), 0, 0, 1, 1},
+ {&__pyx_n_s_ViewSumExpression, __pyx_k_ViewSumExpression, sizeof(__pyx_k_ViewSumExpression), 0, 0, 1, 1},
+ {&__pyx_n_s_ZeroDivisionError, __pyx_k_ZeroDivisionError, sizeof(__pyx_k_ZeroDivisionError), 0, 0, 1, 1},
+ {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
+ {&__pyx_n_s_abs_tol, __pyx_k_abs_tol, sizeof(__pyx_k_abs_tol), 0, 0, 1, 1},
+ {&__pyx_n_s_active, __pyx_k_active, sizeof(__pyx_k_active), 0, 0, 1, 1},
+ {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
+ {&__pyx_n_s_ans, __pyx_k_ans, sizeof(__pyx_k_ans), 0, 0, 1, 1},
+ {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
+ {&__pyx_n_s_apply_operation, __pyx_k_apply_operation, sizeof(__pyx_k_apply_operation), 0, 0, 1, 1},
+ {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
+ {&__pyx_n_s_args_2, __pyx_k_args_2, sizeof(__pyx_k_args_2), 0, 0, 1, 1},
+ {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
+ {&__pyx_n_s_basestring, __pyx_k_basestring, sizeof(__pyx_k_basestring), 0, 0, 1, 1},
+ {&__pyx_n_s_block, __pyx_k_block, sizeof(__pyx_k_block), 0, 0, 1, 1},
+ {&__pyx_n_s_block_repn, __pyx_k_block_repn, sizeof(__pyx_k_block_repn), 0, 0, 1, 1},
+ {&__pyx_n_s_body, __pyx_k_body, sizeof(__pyx_k_body), 0, 0, 1, 1},
+ {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
+ {&__pyx_n_s_c_2, __pyx_k_c_2, sizeof(__pyx_k_c_2), 0, 0, 1, 1},
+ {&__pyx_n_s_class, __pyx_k_class, sizeof(__pyx_k_class), 0, 0, 1, 1},
+ {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
+ {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
+ {&__pyx_n_s_coef, __pyx_k_coef, sizeof(__pyx_k_coef), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_branching_expr, __pyx_k_collect_branching_expr, sizeof(__pyx_k_collect_branching_expr), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_comparison, __pyx_k_collect_comparison, sizeof(__pyx_k_collect_comparison), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_external_fn, __pyx_k_collect_external_fn, sizeof(__pyx_k_collect_external_fn), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_identity, __pyx_k_collect_identity, sizeof(__pyx_k_collect_identity), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_linear, __pyx_k_collect_linear, sizeof(__pyx_k_collect_linear), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_linear_sum, __pyx_k_collect_linear_sum, sizeof(__pyx_k_collect_linear_sum), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_negation, __pyx_k_collect_negation, sizeof(__pyx_k_collect_negation), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_nonl, __pyx_k_collect_nonl, sizeof(__pyx_k_collect_nonl), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_pow, __pyx_k_collect_pow, sizeof(__pyx_k_collect_pow), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_prod, __pyx_k_collect_prod, sizeof(__pyx_k_collect_prod), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_prod_locals_genexpr, __pyx_k_collect_prod_locals_genexpr, sizeof(__pyx_k_collect_prod_locals_genexpr), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_reciprocal, __pyx_k_collect_reciprocal, sizeof(__pyx_k_collect_reciprocal), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_standard_repn, __pyx_k_collect_standard_repn, sizeof(__pyx_k_collect_standard_repn), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_sum, __pyx_k_collect_sum, sizeof(__pyx_k_collect_sum), 0, 0, 1, 1},
+ {&__pyx_n_s_collect_var, __pyx_k_collect_var, sizeof(__pyx_k_collect_var), 0, 0, 1, 1},
+ {&__pyx_n_s_component_data_objects, __pyx_k_component_data_objects, sizeof(__pyx_k_component_data_objects), 0, 0, 1, 1},
+ {&__pyx_n_s_component_objects, __pyx_k_component_objects, sizeof(__pyx_k_component_objects), 0, 0, 1, 1},
+ {&__pyx_n_s_compute_values, __pyx_k_compute_values, sizeof(__pyx_k_compute_values), 0, 0, 1, 1},
+ {&__pyx_n_s_const, __pyx_k_const, sizeof(__pyx_k_const), 0, 0, 1, 1},
+ {&__pyx_n_s_constant, __pyx_k_constant, sizeof(__pyx_k_constant), 0, 0, 1, 1},
+ {&__pyx_kp_s_constant_2, __pyx_k_constant_2, sizeof(__pyx_k_constant_2), 0, 0, 1, 0},
+ {&__pyx_n_s_constraint, __pyx_k_constraint, sizeof(__pyx_k_constraint), 0, 0, 1, 1},
+ {&__pyx_n_s_constraint_data, __pyx_k_constraint_data, sizeof(__pyx_k_constraint_data), 0, 0, 1, 1},
+ {&__pyx_n_s_current, __pyx_k_current, sizeof(__pyx_k_current), 0, 0, 1, 1},
+ {&__pyx_n_s_denom, __pyx_k_denom, sizeof(__pyx_k_denom), 0, 0, 1, 1},
+ {&__pyx_n_s_descend_into, __pyx_k_descend_into, sizeof(__pyx_k_descend_into), 0, 0, 1, 1},
+ {&__pyx_n_s_diff, __pyx_k_diff, sizeof(__pyx_k_diff), 0, 0, 1, 1},
+ {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
+ {&__pyx_n_s_e, __pyx_k_e, sizeof(__pyx_k_e), 0, 0, 1, 1},
+ {&__pyx_n_s_el_linear, __pyx_k_el_linear, sizeof(__pyx_k_el_linear), 0, 0, 1, 1},
+ {&__pyx_n_s_el_quadratic, __pyx_k_el_quadratic, sizeof(__pyx_k_el_quadratic), 0, 0, 1, 1},
+ {&__pyx_n_s_else, __pyx_k_else, sizeof(__pyx_k_else), 0, 0, 1, 1},
+ {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
+ {&__pyx_n_s_enumerate, __pyx_k_enumerate, sizeof(__pyx_k_enumerate), 0, 0, 1, 1},
+ {&__pyx_n_s_er_linear, __pyx_k_er_linear, sizeof(__pyx_k_er_linear), 0, 0, 1, 1},
+ {&__pyx_n_s_er_quadratic, __pyx_k_er_quadratic, sizeof(__pyx_k_er_quadratic), 0, 0, 1, 1},
+ {&__pyx_n_s_err, __pyx_k_err, sizeof(__pyx_k_err), 0, 0, 1, 1},
+ {&__pyx_n_s_error, __pyx_k_error, sizeof(__pyx_k_error), 0, 0, 1, 1},
+ {&__pyx_n_s_evaluate_expression, __pyx_k_evaluate_expression, sizeof(__pyx_k_evaluate_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_exc_info, __pyx_k_exc_info, sizeof(__pyx_k_exc_info), 0, 0, 1, 1},
+ {&__pyx_kp_s_exception_generating_a_standard, __pyx_k_exception_generating_a_standard, sizeof(__pyx_k_exception_generating_a_standard), 0, 0, 1, 0},
+ {&__pyx_kp_s_exception_generating_a_standard_2, __pyx_k_exception_generating_a_standard_2, sizeof(__pyx_k_exception_generating_a_standard_2), 0, 0, 1, 0},
+ {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
+ {&__pyx_n_s_exp, __pyx_k_exp, sizeof(__pyx_k_exp), 0, 0, 1, 1},
+ {&__pyx_n_s_exponent, __pyx_k_exponent, sizeof(__pyx_k_exponent), 0, 0, 1, 1},
+ {&__pyx_n_s_expr, __pyx_k_expr, sizeof(__pyx_k_expr), 0, 0, 1, 1},
+ {&__pyx_n_s_expression, __pyx_k_expression, sizeof(__pyx_k_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_fabs, __pyx_k_fabs, sizeof(__pyx_k_fabs), 0, 0, 1, 1},
+ {&__pyx_n_s_fixed, __pyx_k_fixed, sizeof(__pyx_k_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_generate_standard_repn, __pyx_k_generate_standard_repn, sizeof(__pyx_k_generate_standard_repn), 0, 0, 1, 1},
+ {&__pyx_n_s_generate_standard_repn_2, __pyx_k_generate_standard_repn_2, sizeof(__pyx_k_generate_standard_repn_2), 0, 0, 1, 1},
+ {&__pyx_n_s_generate_standard_repn_locals_g, __pyx_k_generate_standard_repn_locals_g, sizeof(__pyx_k_generate_standard_repn_locals_g), 0, 0, 1, 1},
+ {&__pyx_n_s_generate_standard_repn_locals_ge, __pyx_k_generate_standard_repn_locals_ge, sizeof(__pyx_k_generate_standard_repn_locals_ge), 0, 0, 1, 1},
+ {&__pyx_n_s_genexpr, __pyx_k_genexpr, sizeof(__pyx_k_genexpr), 0, 0, 1, 1},
+ {&__pyx_n_s_get, __pyx_k_get, sizeof(__pyx_k_get), 0, 0, 1, 1},
+ {&__pyx_n_s_getLogger, __pyx_k_getLogger, sizeof(__pyx_k_getLogger), 0, 0, 1, 1},
+ {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
+ {&__pyx_n_s_getvalue, __pyx_k_getvalue, sizeof(__pyx_k_getvalue), 0, 0, 1, 1},
+ {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
+ {&__pyx_n_s_id, __pyx_k_id, sizeof(__pyx_k_id), 0, 0, 1, 1},
+ {&__pyx_n_s_idMap, __pyx_k_idMap, sizeof(__pyx_k_idMap), 0, 0, 1, 1},
+ {&__pyx_n_s_id_2, __pyx_k_id_2, sizeof(__pyx_k_id_2), 0, 0, 1, 1},
+ {&__pyx_n_s_identify_variables, __pyx_k_identify_variables, sizeof(__pyx_k_identify_variables), 0, 0, 1, 1},
+ {&__pyx_n_s_if, __pyx_k_if, sizeof(__pyx_k_if), 0, 0, 1, 1},
+ {&__pyx_n_s_if_val, __pyx_k_if_val, sizeof(__pyx_k_if_val), 0, 0, 1, 1},
+ {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
+ {&__pyx_n_s_include_fixed, __pyx_k_include_fixed, sizeof(__pyx_k_include_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
+ {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
+ {&__pyx_n_s_is_constant, __pyx_k_is_constant, sizeof(__pyx_k_is_constant), 0, 0, 1, 1},
+ {&__pyx_n_s_is_expression_type, __pyx_k_is_expression_type, sizeof(__pyx_k_is_expression_type), 0, 0, 1, 1},
+ {&__pyx_n_s_is_fixed, __pyx_k_is_fixed, sizeof(__pyx_k_is_fixed), 0, 0, 1, 1},
+ {&__pyx_n_s_is_linear, __pyx_k_is_linear, sizeof(__pyx_k_is_linear), 0, 0, 1, 1},
+ {&__pyx_n_s_is_named_expression_type, __pyx_k_is_named_expression_type, sizeof(__pyx_k_is_named_expression_type), 0, 0, 1, 1},
+ {&__pyx_n_s_is_nonlinear, __pyx_k_is_nonlinear, sizeof(__pyx_k_is_nonlinear), 0, 0, 1, 1},
+ {&__pyx_n_s_is_potentially_variable, __pyx_k_is_potentially_variable, sizeof(__pyx_k_is_potentially_variable), 0, 0, 1, 1},
+ {&__pyx_n_s_is_quadratic, __pyx_k_is_quadratic, sizeof(__pyx_k_is_quadratic), 0, 0, 1, 1},
+ {&__pyx_n_s_is_variable_type, __pyx_k_is_variable_type, sizeof(__pyx_k_is_variable_type), 0, 0, 1, 1},
+ {&__pyx_n_s_isclose, __pyx_k_isclose, sizeof(__pyx_k_isclose), 0, 0, 1, 1},
+ {&__pyx_n_s_isclose_const, __pyx_k_isclose_const, sizeof(__pyx_k_isclose_const), 0, 0, 1, 1},
+ {&__pyx_n_s_isclose_context, __pyx_k_isclose_context, sizeof(__pyx_k_isclose_context), 0, 0, 1, 1},
+ {&__pyx_n_s_isclose_context___enter, __pyx_k_isclose_context___enter, sizeof(__pyx_k_isclose_context___enter), 0, 0, 1, 1},
+ {&__pyx_n_s_isclose_context___exit, __pyx_k_isclose_context___exit, sizeof(__pyx_k_isclose_context___exit), 0, 0, 1, 1},
+ {&__pyx_n_s_isclose_context___init, __pyx_k_isclose_context___init, sizeof(__pyx_k_isclose_context___init), 0, 0, 1, 1},
+ {&__pyx_n_s_isclose_default, __pyx_k_isclose_default, sizeof(__pyx_k_isclose_default), 0, 0, 1, 1},
+ {&__pyx_n_s_islice, __pyx_k_islice, sizeof(__pyx_k_islice), 0, 0, 1, 1},
+ {&__pyx_n_s_iteritems, __pyx_k_iteritems, sizeof(__pyx_k_iteritems), 0, 0, 1, 1},
+ {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1},
+ {&__pyx_n_s_itervalues, __pyx_k_itervalues, sizeof(__pyx_k_itervalues), 0, 0, 1, 1},
+ {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1},
+ {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
+ {&__pyx_n_s_lcoef, __pyx_k_lcoef, sizeof(__pyx_k_lcoef), 0, 0, 1, 1},
+ {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1},
+ {&__pyx_n_s_lhs_nonl_None, __pyx_k_lhs_nonl_None, sizeof(__pyx_k_lhs_nonl_None), 0, 0, 1, 1},
+ {&__pyx_n_s_linear, __pyx_k_linear, sizeof(__pyx_k_linear), 0, 0, 1, 1},
+ {&__pyx_kp_s_linear_coef, __pyx_k_linear_coef, sizeof(__pyx_k_linear_coef), 0, 0, 1, 0},
+ {&__pyx_n_s_linear_coefs, __pyx_k_linear_coefs, sizeof(__pyx_k_linear_coefs), 0, 0, 1, 1},
+ {&__pyx_kp_s_linear_var_ids, __pyx_k_linear_var_ids, sizeof(__pyx_k_linear_var_ids), 0, 0, 1, 0},
+ {&__pyx_n_s_linear_vars, __pyx_k_linear_vars, sizeof(__pyx_k_linear_vars), 0, 0, 1, 1},
+ {&__pyx_kp_s_linear_vars_2, __pyx_k_linear_vars_2, sizeof(__pyx_k_linear_vars_2), 0, 0, 1, 0},
+ {&__pyx_n_s_lkey, __pyx_k_lkey, sizeof(__pyx_k_lkey), 0, 0, 1, 1},
+ {&__pyx_n_s_logger, __pyx_k_logger, sizeof(__pyx_k_logger), 0, 0, 1, 1},
+ {&__pyx_n_s_logging, __pyx_k_logging, sizeof(__pyx_k_logging), 0, 0, 1, 1},
+ {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
+ {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1},
+ {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
+ {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
+ {&__pyx_n_s_multiplier, __pyx_k_multiplier, sizeof(__pyx_k_multiplier), 0, 0, 1, 1},
+ {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
+ {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
+ {&__pyx_n_s_nargs, __pyx_k_nargs, sizeof(__pyx_k_nargs), 0, 0, 1, 1},
+ {&__pyx_n_s_native_numeric_types, __pyx_k_native_numeric_types, sizeof(__pyx_k_native_numeric_types), 0, 0, 1, 1},
+ {&__pyx_n_s_noclone, __pyx_k_noclone, sizeof(__pyx_k_noclone), 0, 0, 1, 1},
+ {&__pyx_n_s_nonl, __pyx_k_nonl, sizeof(__pyx_k_nonl), 0, 0, 1, 1},
+ {&__pyx_n_s_nonlinear_expr, __pyx_k_nonlinear_expr, sizeof(__pyx_k_nonlinear_expr), 0, 0, 1, 1},
+ {&__pyx_kp_s_nonlinear_expr_2, __pyx_k_nonlinear_expr_2, sizeof(__pyx_k_nonlinear_expr_2), 0, 0, 1, 0},
+ {&__pyx_kp_s_nonlinear_expr_None, __pyx_k_nonlinear_expr_None, sizeof(__pyx_k_nonlinear_expr_None), 0, 0, 1, 0},
+ {&__pyx_n_s_nonlinear_vars, __pyx_k_nonlinear_vars, sizeof(__pyx_k_nonlinear_vars), 0, 0, 1, 1},
+ {&__pyx_kp_s_nonlinear_vars_2, __pyx_k_nonlinear_vars_2, sizeof(__pyx_k_nonlinear_vars_2), 0, 0, 1, 0},
+ {&__pyx_n_s_object, __pyx_k_object, sizeof(__pyx_k_object), 0, 0, 1, 1},
+ {&__pyx_n_s_objective, __pyx_k_objective, sizeof(__pyx_k_objective), 0, 0, 1, 1},
+ {&__pyx_n_s_objective_data, __pyx_k_objective_data, sizeof(__pyx_k_objective_data), 0, 0, 1, 1},
+ {&__pyx_n_s_output, __pyx_k_output, sizeof(__pyx_k_output), 0, 0, 1, 1},
+ {&__pyx_n_s_polynomial_degree, __pyx_k_polynomial_degree, sizeof(__pyx_k_polynomial_degree), 0, 0, 1, 1},
+ {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
+ {&__pyx_n_s_preprocess_block_constraints, __pyx_k_preprocess_block_constraints, sizeof(__pyx_k_preprocess_block_constraints), 0, 0, 1, 1},
+ {&__pyx_n_s_preprocess_block_objectives, __pyx_k_preprocess_block_objectives, sizeof(__pyx_k_preprocess_block_objectives), 0, 0, 1, 1},
+ {&__pyx_n_s_preprocess_constraint, __pyx_k_preprocess_constraint, sizeof(__pyx_k_preprocess_constraint), 0, 0, 1, 1},
+ {&__pyx_n_s_preprocess_constraint_data, __pyx_k_preprocess_constraint_data, sizeof(__pyx_k_preprocess_constraint_data), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo, __pyx_k_pyomo, sizeof(__pyx_k_pyomo), 0, 0, 1, 1},
+ {&__pyx_kp_s_pyomo_core, __pyx_k_pyomo_core, sizeof(__pyx_k_pyomo_core), 0, 0, 1, 0},
+ {&__pyx_n_s_pyomo_core_base, __pyx_k_pyomo_core_base, sizeof(__pyx_k_pyomo_core_base), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_base_expression, __pyx_k_pyomo_core_base_expression, sizeof(__pyx_k_pyomo_core_base_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_base_numvalue, __pyx_k_pyomo_core_base_numvalue, sizeof(__pyx_k_pyomo_core_base_numvalue), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_base_objective, __pyx_k_pyomo_core_base_objective, sizeof(__pyx_k_pyomo_core_base_objective), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_base_param, __pyx_k_pyomo_core_base_param, sizeof(__pyx_k_pyomo_core_base_param), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_base_var, __pyx_k_pyomo_core_base_var, sizeof(__pyx_k_pyomo_core_base_var), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_expr, __pyx_k_pyomo_core_expr, sizeof(__pyx_k_pyomo_core_expr), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_kernel_component_expr, __pyx_k_pyomo_core_kernel_component_expr, sizeof(__pyx_k_pyomo_core_kernel_component_expr), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_kernel_component_obje, __pyx_k_pyomo_core_kernel_component_obje, sizeof(__pyx_k_pyomo_core_kernel_component_obje), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_kernel_component_vari, __pyx_k_pyomo_core_kernel_component_vari, sizeof(__pyx_k_pyomo_core_kernel_component_vari), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_core_util, __pyx_k_pyomo_core_util, sizeof(__pyx_k_pyomo_core_util), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_repn_beta_matrix, __pyx_k_pyomo_repn_beta_matrix, sizeof(__pyx_k_pyomo_repn_beta_matrix), 0, 0, 1, 1},
+ {&__pyx_n_s_pyomo_repn_standard_repn, __pyx_k_pyomo_repn_standard_repn, sizeof(__pyx_k_pyomo_repn_standard_repn), 0, 0, 1, 1},
+ {&__pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_k_pyomo_repn_standard_repn_pyx, sizeof(__pyx_k_pyomo_repn_standard_repn_pyx), 0, 0, 1, 0},
+ {&__pyx_n_s_pyomo_util, __pyx_k_pyomo_util, sizeof(__pyx_k_pyomo_util), 0, 0, 1, 1},
+ {&__pyx_n_s_pyutilib_math_util, __pyx_k_pyutilib_math_util, sizeof(__pyx_k_pyutilib_math_util), 0, 0, 1, 1},
+ {&__pyx_n_s_pyutilib_misc, __pyx_k_pyutilib_misc, sizeof(__pyx_k_pyutilib_misc), 0, 0, 1, 1},
+ {&__pyx_n_s_quadratic, __pyx_k_quadratic, sizeof(__pyx_k_quadratic), 0, 0, 1, 1},
+ {&__pyx_kp_s_quadratic_coef, __pyx_k_quadratic_coef, sizeof(__pyx_k_quadratic_coef), 0, 0, 1, 0},
+ {&__pyx_n_s_quadratic_coefs, __pyx_k_quadratic_coefs, sizeof(__pyx_k_quadratic_coefs), 0, 0, 1, 1},
+ {&__pyx_kp_s_quadratic_var_ids, __pyx_k_quadratic_var_ids, sizeof(__pyx_k_quadratic_var_ids), 0, 0, 1, 0},
+ {&__pyx_n_s_quadratic_vars, __pyx_k_quadratic_vars, sizeof(__pyx_k_quadratic_vars), 0, 0, 1, 1},
+ {&__pyx_kp_s_quadratic_vars_2, __pyx_k_quadratic_vars_2, sizeof(__pyx_k_quadratic_vars_2), 0, 0, 1, 0},
+ {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
+ {&__pyx_n_s_rcoef, __pyx_k_rcoef, sizeof(__pyx_k_rcoef), 0, 0, 1, 1},
+ {&__pyx_n_s_rel_tol, __pyx_k_rel_tol, sizeof(__pyx_k_rel_tol), 0, 0, 1, 1},
+ {&__pyx_n_s_repn, __pyx_k_repn, sizeof(__pyx_k_repn), 0, 0, 1, 1},
+ {&__pyx_n_s_repn_2, __pyx_k_repn_2, sizeof(__pyx_k_repn_2), 0, 0, 1, 1},
+ {&__pyx_n_s_repn_collectors, __pyx_k_repn_collectors, sizeof(__pyx_k_repn_collectors), 0, 0, 1, 1},
+ {&__pyx_n_s_res, __pyx_k_res, sizeof(__pyx_k_res), 0, 0, 1, 1},
+ {&__pyx_n_s_res_2, __pyx_k_res_2, sizeof(__pyx_k_res_2), 0, 0, 1, 1},
+ {&__pyx_n_s_ret_str, __pyx_k_ret_str, sizeof(__pyx_k_ret_str), 0, 0, 1, 1},
+ {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1},
+ {&__pyx_n_s_rhs_nonl_None, __pyx_k_rhs_nonl_None, sizeof(__pyx_k_rhs_nonl_None), 0, 0, 1, 1},
+ {&__pyx_n_s_rkey, __pyx_k_rkey, sizeof(__pyx_k_rkey), 0, 0, 1, 1},
+ {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
+ {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
+ {&__pyx_n_s_setdefault, __pyx_k_setdefault, sizeof(__pyx_k_setdefault), 0, 0, 1, 1},
+ {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
+ {&__pyx_n_s_six, __pyx_k_six, sizeof(__pyx_k_six), 0, 0, 1, 1},
+ {&__pyx_n_s_six_moves, __pyx_k_six_moves, sizeof(__pyx_k_six_moves), 0, 0, 1, 1},
+ {&__pyx_n_s_slot, __pyx_k_slot, sizeof(__pyx_k_slot), 0, 0, 1, 1},
+ {&__pyx_n_s_slots, __pyx_k_slots, sizeof(__pyx_k_slots), 0, 0, 1, 1},
+ {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
+ {&__pyx_n_s_str, __pyx_k_str, sizeof(__pyx_k_str), 0, 0, 1, 1},
+ {&__pyx_n_s_sum, __pyx_k_sum, sizeof(__pyx_k_sum), 0, 0, 1, 1},
+ {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
+ {&__pyx_n_s_term, __pyx_k_term, sizeof(__pyx_k_term), 0, 0, 1, 1},
+ {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
+ {&__pyx_n_s_then, __pyx_k_then, sizeof(__pyx_k_then), 0, 0, 1, 1},
+ {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
+ {&__pyx_n_s_to_expression, __pyx_k_to_expression, sizeof(__pyx_k_to_expression), 0, 0, 1, 1},
+ {&__pyx_n_s_to_string, __pyx_k_to_string, sizeof(__pyx_k_to_string), 0, 0, 1, 1},
+ {&__pyx_n_s_using_py3, __pyx_k_using_py3, sizeof(__pyx_k_using_py3), 0, 0, 1, 1},
+ {&__pyx_n_s_v, __pyx_k_v, sizeof(__pyx_k_v), 0, 0, 1, 1},
+ {&__pyx_n_s_v_2, __pyx_k_v_2, sizeof(__pyx_k_v_2), 0, 0, 1, 1},
+ {&__pyx_n_s_val, __pyx_k_val, sizeof(__pyx_k_val), 0, 0, 1, 1},
+ {&__pyx_n_s_value, __pyx_k_value, sizeof(__pyx_k_value), 0, 0, 1, 1},
+ {&__pyx_n_s_variable, __pyx_k_variable, sizeof(__pyx_k_variable), 0, 0, 1, 1},
+ {&__pyx_n_s_varkeys, __pyx_k_varkeys, sizeof(__pyx_k_varkeys), 0, 0, 1, 1},
+ {&__pyx_n_s_verbose, __pyx_k_verbose, sizeof(__pyx_k_verbose), 0, 0, 1, 1},
+ {&__pyx_n_s_write, __pyx_k_write, sizeof(__pyx_k_write), 0, 0, 1, 1},
+ {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1},
+ {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
+ {0, 0, 0, 0, 0, 0, 0}
+};
+static int __Pyx_InitCachedBuiltins(void) {
+ __pyx_builtin_object = __Pyx_GetBuiltinName(__pyx_n_s_object); if (!__pyx_builtin_object) __PYX_ERR(0, 94, __pyx_L1_error)
+ __pyx_builtin_id = __Pyx_GetBuiltinName(__pyx_n_s_id); if (!__pyx_builtin_id) __PYX_ERR(0, 168, __pyx_L1_error)
+ __pyx_builtin_AttributeError = __Pyx_GetBuiltinName(__pyx_n_s_AttributeError); if (!__pyx_builtin_AttributeError) __PYX_ERR(0, 180, __pyx_L1_error)
+ __pyx_builtin_enumerate = __Pyx_GetBuiltinName(__pyx_n_s_enumerate); if (!__pyx_builtin_enumerate) __PYX_ERR(0, 221, __pyx_L1_error)
+ __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 359, __pyx_L1_error)
+ __pyx_builtin_sum = __Pyx_GetBuiltinName(__pyx_n_s_sum); if (!__pyx_builtin_sum) __PYX_ERR(0, 545, __pyx_L1_error)
+ __pyx_builtin_ZeroDivisionError = __Pyx_GetBuiltinName(__pyx_n_s_ZeroDivisionError); if (!__pyx_builtin_ZeroDivisionError) __PYX_ERR(0, 630, __pyx_L1_error)
+ __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 792, __pyx_L1_error)
+ return 0;
+ __pyx_L1_error:;
+ return -1;
+}
+
+static int __Pyx_InitCachedConstants(void) {
+ __Pyx_RefNannyDeclarations
+ __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
+
+ /* "pyomo/repn/standard_repn.pyx":165
+ * def __str__(self):
+ * output = StringIO()
+ * output.write("\n") # <<<<<<<<<<<<<<
+ * output.write("constant: "+str(self.constant)+"\n")
+ * output.write("linear vars: "+str([v_.name for v_ in self.linear_vars])+"\n")
+ */
+ __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 165, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__2);
+ __Pyx_GIVEREF(__pyx_tuple__2);
+
+ /* "pyomo/repn/standard_repn.pyx":174
+ * output.write("quadratic coef: "+str(list(self.quadratic_coefs))+"\n")
+ * if self.nonlinear_expr is None:
+ * output.write("nonlinear expr: None\n") # <<<<<<<<<<<<<<
+ * else:
+ * output.write("nonlinear expr:\n")
+ */
+ __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_nonlinear_expr_None); if (unlikely(!__pyx_tuple__3)) __PYX_ERR(0, 174, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__3);
+ __Pyx_GIVEREF(__pyx_tuple__3);
+
+ /* "pyomo/repn/standard_repn.pyx":176
+ * output.write("nonlinear expr: None\n")
+ * else:
+ * output.write("nonlinear expr:\n") # <<<<<<<<<<<<<<
+ * try:
+ * output.write(self.nonlinear_expr.to_string())
+ */
+ __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_nonlinear_expr_2); if (unlikely(!__pyx_tuple__4)) __PYX_ERR(0, 176, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__4);
+ __Pyx_GIVEREF(__pyx_tuple__4);
+
+ /* "pyomo/repn/standard_repn.pyx":179
+ * try:
+ * output.write(self.nonlinear_expr.to_string())
+ * output.write("\n") # <<<<<<<<<<<<<<
+ * except AttributeError:
+ * output.write(str(self.nonlinear_expr))
+ */
+ __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_); if (unlikely(!__pyx_tuple__5)) __PYX_ERR(0, 179, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__5);
+ __Pyx_GIVEREF(__pyx_tuple__5);
+
+ /* "pyomo/repn/standard_repn.pyx":182
+ * except AttributeError:
+ * output.write(str(self.nonlinear_expr))
+ * output.write("\n") # <<<<<<<<<<<<<<
+ * output.write("nonlinear vars: "+str([v_.name for v_ in self.nonlinear_vars])+"\n")
+ * output.write("\n")
+ */
+ __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_); if (unlikely(!__pyx_tuple__6)) __PYX_ERR(0, 182, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__6);
+ __Pyx_GIVEREF(__pyx_tuple__6);
+
+ /* "pyomo/repn/standard_repn.pyx":184
+ * output.write("\n")
+ * output.write("nonlinear vars: "+str([v_.name for v_ in self.nonlinear_vars])+"\n")
+ * output.write("\n") # <<<<<<<<<<<<<<
+ *
+ * ret_str = output.getvalue()
+ */
+ __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_); if (unlikely(!__pyx_tuple__7)) __PYX_ERR(0, 184, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__7);
+ __Pyx_GIVEREF(__pyx_tuple__7);
+
+ /* "pyomo/repn/standard_repn.pyx":300
+ * repn.constant = expr
+ * return repn
+ * repn.linear_coefs = (1,) # <<<<<<<<<<<<<<
+ * repn.linear_vars = (expr,)
+ * return repn
+ */
+ __pyx_tuple__8 = PyTuple_Pack(1, __pyx_int_1); if (unlikely(!__pyx_tuple__8)) __PYX_ERR(0, 300, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__8);
+ __Pyx_GIVEREF(__pyx_tuple__8);
+
+ /* "pyomo/repn/standard_repn.pyx":271
+ * # Use a custom isclose function
+ * #
+ * with isclose_context(compute_values): # <<<<<<<<<<<<<<
+ * #
+ * # Setup
+ */
+ __pyx_tuple__9 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__9);
+ __Pyx_GIVEREF(__pyx_tuple__9);
+ __pyx_tuple__10 = PyTuple_Pack(3, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 271, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__10);
+ __Pyx_GIVEREF(__pyx_tuple__10);
+
+ /* "pyomo/repn/standard_repn.pyx":878
+ * except Exception:
+ * err = sys.exc_info()[1]
+ * logging.getLogger('pyomo.core').error\ # <<<<<<<<<<<<<<
+ * ( "exception generating a standard representation for objective %s: %s" \
+ * % (objective_data.name, str(err)) )
+ */
+ __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_pyomo_core); if (unlikely(!__pyx_tuple__11)) __PYX_ERR(0, 878, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__11);
+ __Pyx_GIVEREF(__pyx_tuple__11);
+
+ /* "pyomo/repn/standard_repn.pyx":930
+ * except Exception:
+ * err = sys.exc_info()[1]
+ * logging.getLogger('pyomo.core').error( # <<<<<<<<<<<<<<
+ * "exception generating a standard representation for "
+ * "constraint %s: %s"
+ */
+ __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_pyomo_core); if (unlikely(!__pyx_tuple__12)) __PYX_ERR(0, 930, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__12);
+ __Pyx_GIVEREF(__pyx_tuple__12);
+
+ /* "pyomo/repn/standard_repn.pyx":958
+ * except Exception:
+ * err = sys.exc_info()[1]
+ * logging.getLogger('pyomo.core').error( # <<<<<<<<<<<<<<
+ * "exception generating a standard representation for "
+ * "constraint %s: %s"
+ */
+ __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_pyomo_core); if (unlikely(!__pyx_tuple__13)) __PYX_ERR(0, 958, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__13);
+ __Pyx_GIVEREF(__pyx_tuple__13);
+
+ /* "pyomo/repn/standard_repn.pyx":57
+ * basestring = str
+ *
+ * logger = logging.getLogger('pyomo.core') # <<<<<<<<<<<<<<
+ *
+ * using_py3 = six.PY3
+ */
+ __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_pyomo_core); if (unlikely(!__pyx_tuple__14)) __PYX_ERR(0, 57, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__14);
+ __Pyx_GIVEREF(__pyx_tuple__14);
+
+ /* "pyomo/repn/standard_repn.pyx":70
+ * # close to 'b' when it is constant.
+ * #
+ * def isclose_const(a, b, rel_tol=1e-9, abs_tol=0.0): # <<<<<<<<<<<<<<
+ * if not a.__class__ in native_numeric_types:
+ * if a.is_constant():
+ */
+ __pyx_tuple__15 = PyTuple_Pack(5, __pyx_n_s_a, __pyx_n_s_b, __pyx_n_s_rel_tol, __pyx_n_s_abs_tol, __pyx_n_s_diff); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__15);
+ __Pyx_GIVEREF(__pyx_tuple__15);
+ __pyx_codeobj__16 = (PyObject*)__Pyx_PyCode_New(4, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__15, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_isclose_const, 70, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__16)) __PYX_ERR(0, 70, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":94
+ * # isclose() function.
+ * #
+ * class isclose_context(object): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, compute_values):
+ */
+ __pyx_tuple__17 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__17)) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__17);
+ __Pyx_GIVEREF(__pyx_tuple__17);
+
+ /* "pyomo/repn/standard_repn.pyx":96
+ * class isclose_context(object):
+ *
+ * def __init__(self, compute_values): # <<<<<<<<<<<<<<
+ * self.compute_values = compute_values
+ *
+ */
+ __pyx_tuple__18 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_compute_values); if (unlikely(!__pyx_tuple__18)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__18);
+ __Pyx_GIVEREF(__pyx_tuple__18);
+ __pyx_codeobj__19 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__18, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_init, 96, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__19)) __PYX_ERR(0, 96, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":99
+ * self.compute_values = compute_values
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * if not self.compute_values:
+ * global isclose
+ */
+ __pyx_tuple__20 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__20)) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__20);
+ __Pyx_GIVEREF(__pyx_tuple__20);
+ __pyx_codeobj__21 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__20, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_enter, 99, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(0, 99, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":104
+ * isclose = isclose_const
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * global isclose
+ * isclose = isclose_default
+ */
+ __pyx_tuple__22 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_args_2); if (unlikely(!__pyx_tuple__22)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__22);
+ __Pyx_GIVEREF(__pyx_tuple__22);
+ __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS|CO_VARARGS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__22, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_exit, 104, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 104, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":109
+ *
+ *
+ * class StandardRepn(object): # <<<<<<<<<<<<<<
+ * """
+ * This class defines a standard/common representation for Pyomo expressions
+ */
+ __pyx_tuple__24 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__24)) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__24);
+ __Pyx_GIVEREF(__pyx_tuple__24);
+
+ /* "pyomo/repn/standard_repn.pyx":117
+ * """
+ *
+ * __slots__ = ('constant', # The constant term # <<<<<<<<<<<<<<
+ * 'linear_coefs', # Linear coefficients
+ * 'linear_vars', # Linear variables
+ */
+ __pyx_tuple__25 = PyTuple_Pack(7, __pyx_n_s_constant, __pyx_n_s_linear_coefs, __pyx_n_s_linear_vars, __pyx_n_s_quadratic_coefs, __pyx_n_s_quadratic_vars, __pyx_n_s_nonlinear_expr, __pyx_n_s_nonlinear_vars); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 117, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__25);
+ __Pyx_GIVEREF(__pyx_tuple__25);
+
+ /* "pyomo/repn/standard_repn.pyx":125
+ * 'nonlinear_vars') # Variables that appear in the nonlinear expression
+ *
+ * def __init__(self, expr=None): # <<<<<<<<<<<<<<
+ * self.constant = 0
+ * self.linear_vars = tuple()
+ */
+ __pyx_tuple__26 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_expr); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__26);
+ __Pyx_GIVEREF(__pyx_tuple__26);
+ __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__26, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_init, 125, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __pyx_tuple__28 = PyTuple_Pack(1, ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__28);
+ __Pyx_GIVEREF(__pyx_tuple__28);
+
+ /* "pyomo/repn/standard_repn.pyx":136
+ * generate_standard_repn(expr, repn=self)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * """
+ * This method is required because this class uses slots.
+ */
+ __pyx_tuple__29 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__29)) __PYX_ERR(0, 136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__29);
+ __Pyx_GIVEREF(__pyx_tuple__29);
+ __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__29, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_getstate, 136, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 136, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":148
+ * self.nonlinear_vars)
+ *
+ * def __setstate__(self, state): # <<<<<<<<<<<<<<
+ * """
+ * This method is required because this class uses slots.
+ */
+ __pyx_tuple__31 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_state); if (unlikely(!__pyx_tuple__31)) __PYX_ERR(0, 148, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__31);
+ __Pyx_GIVEREF(__pyx_tuple__31);
+ __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(2, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__31, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_setstate, 148, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__32)) __PYX_ERR(0, 148, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":163
+ * # Generate a string representation of the expression
+ * #
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * output = StringIO()
+ * output.write("\n")
+ */
+ __pyx_tuple__33 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_output, __pyx_n_s_ret_str, __pyx_n_s_v); if (unlikely(!__pyx_tuple__33)) __PYX_ERR(0, 163, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__33);
+ __Pyx_GIVEREF(__pyx_tuple__33);
+ __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__33, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_str, 163, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 163, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":190
+ * return ret_str
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * if len(self.linear_vars) == 0 and len(self.nonlinear_vars) == 0 and len(self.quadratic_vars) == 0:
+ * return True
+ */
+ __pyx_tuple__35 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__35)) __PYX_ERR(0, 190, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__35);
+ __Pyx_GIVEREF(__pyx_tuple__35);
+ __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__35, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_is_fixed, 190, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 190, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":195
+ * return False
+ *
+ * def polynomial_degree(self): # <<<<<<<<<<<<<<
+ * if not self.nonlinear_expr is None:
+ * return None
+ */
+ __pyx_tuple__37 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__37)) __PYX_ERR(0, 195, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__37);
+ __Pyx_GIVEREF(__pyx_tuple__37);
+ __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_polynomial_degree, 195, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 195, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":204
+ * return 0
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0 and len(self.linear_coefs) == 0
+ *
+ */
+ __pyx_tuple__39 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__39)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__39);
+ __Pyx_GIVEREF(__pyx_tuple__39);
+ __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__39, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_is_constant, 204, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(0, 204, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":207
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0 and len(self.linear_coefs) == 0
+ *
+ * def is_linear(self): # <<<<<<<<<<<<<<
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0
+ *
+ */
+ __pyx_tuple__41 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__41)) __PYX_ERR(0, 207, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__41);
+ __Pyx_GIVEREF(__pyx_tuple__41);
+ __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__41, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_is_linear, 207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(0, 207, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":210
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0
+ *
+ * def is_quadratic(self): # <<<<<<<<<<<<<<
+ * return len(self.quadratic_coefs) > 0 and self.nonlinear_expr is None
+ *
+ */
+ __pyx_tuple__43 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__43)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__43);
+ __Pyx_GIVEREF(__pyx_tuple__43);
+ __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__43, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_is_quadratic, 210, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(0, 210, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":213
+ * return len(self.quadratic_coefs) > 0 and self.nonlinear_expr is None
+ *
+ * def is_nonlinear(self): # <<<<<<<<<<<<<<
+ * return not (self.nonlinear_expr is None and len(self.quadratic_coefs) == 0)
+ *
+ */
+ __pyx_tuple__45 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__45)) __PYX_ERR(0, 213, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__45);
+ __Pyx_GIVEREF(__pyx_tuple__45);
+ __pyx_codeobj__46 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__45, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_is_nonlinear, 213, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__46)) __PYX_ERR(0, 213, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":216
+ * return not (self.nonlinear_expr is None and len(self.quadratic_coefs) == 0)
+ *
+ * def to_expression(self): # <<<<<<<<<<<<<<
+ * #
+ * # TODO: Should this replace non-mutable parameters with constants?
+ */
+ __pyx_tuple__47 = PyTuple_Pack(6, __pyx_n_s_self, __pyx_n_s_expr, __pyx_n_s_i, __pyx_n_s_v_2, __pyx_n_s_val, __pyx_n_s_term); if (unlikely(!__pyx_tuple__47)) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__47);
+ __Pyx_GIVEREF(__pyx_tuple__47);
+ __pyx_codeobj__48 = (PyObject*)__Pyx_PyCode_New(1, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__47, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_to_expression, 216, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__48)) __PYX_ERR(0, 216, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":267
+ * """
+ * #@profile
+ * def generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None): # <<<<<<<<<<<<<<
+ * #
+ * # Use a custom isclose function
+ */
+ __pyx_tuple__49 = PyTuple_Pack(18, __pyx_n_s_expr, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic, __pyx_n_s_repn, __pyx_n_s_C, __pyx_n_s_v, __pyx_n_s_c, __pyx_n_s_c_2, __pyx_n_s_v_2, __pyx_n_s_linear_coefs, __pyx_n_s_id_2, __pyx_n_s_key, __pyx_n_s_keys, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 267, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__49);
+ __Pyx_GIVEREF(__pyx_tuple__49);
+ __pyx_codeobj__50 = (PyObject*)__Pyx_PyCode_New(6, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_generate_standard_repn, 267, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__50)) __PYX_ERR(0, 267, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":368
+ * repn=repn)
+ *
+ * class Results(object): # <<<<<<<<<<<<<<
+ * __slot__ = ('const', 'nonl', 'linear', 'quadratic')
+ *
+ */
+ __pyx_tuple__51 = PyTuple_Pack(1, __pyx_builtin_object); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 368, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__51);
+ __Pyx_GIVEREF(__pyx_tuple__51);
+
+ /* "pyomo/repn/standard_repn.pyx":369
+ *
+ * class Results(object):
+ * __slot__ = ('const', 'nonl', 'linear', 'quadratic') # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, constant=0, nonl=0, linear=None, quadratic=None):
+ */
+ __pyx_tuple__52 = PyTuple_Pack(4, __pyx_n_s_const, __pyx_n_s_nonl, __pyx_n_s_linear, __pyx_n_s_quadratic); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 369, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__52);
+ __Pyx_GIVEREF(__pyx_tuple__52);
+
+ /* "pyomo/repn/standard_repn.pyx":371
+ * __slot__ = ('const', 'nonl', 'linear', 'quadratic')
+ *
+ * def __init__(self, constant=0, nonl=0, linear=None, quadratic=None): # <<<<<<<<<<<<<<
+ * self.constant = constant
+ * self.nonl = nonl
+ */
+ __pyx_tuple__53 = PyTuple_Pack(5, __pyx_n_s_self, __pyx_n_s_constant, __pyx_n_s_nonl, __pyx_n_s_linear, __pyx_n_s_quadratic); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 371, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__53);
+ __Pyx_GIVEREF(__pyx_tuple__53);
+ __pyx_codeobj__54 = (PyObject*)__Pyx_PyCode_New(5, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_init, 371, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__54)) __PYX_ERR(0, 371, __pyx_L1_error)
+ __pyx_tuple__55 = PyTuple_Pack(4, ((PyObject *)__pyx_int_0), ((PyObject *)__pyx_int_0), ((PyObject *)Py_None), ((PyObject *)Py_None)); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 371, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__55);
+ __Pyx_GIVEREF(__pyx_tuple__55);
+
+ /* "pyomo/repn/standard_repn.pyx":383
+ * self.quadratic = quadratic
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return "Const:\t%f\nLinear:\t%s\nQuadratic:\t%s\nNonlinear:\t%s" % (self.constant, str(self.linear), str(self.quadratic), str(self.nonl))
+ *
+ */
+ __pyx_tuple__56 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(0, 383, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__56);
+ __Pyx_GIVEREF(__pyx_tuple__56);
+ __pyx_codeobj__57 = (PyObject*)__Pyx_PyCode_New(1, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_str, 383, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__57)) __PYX_ERR(0, 383, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":388
+ *
+ * #@profile
+ * def _collect_sum(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ * varkeys = idMap[None]
+ */
+ __pyx_tuple__58 = PyTuple_Pack(14, __pyx_n_s_exp, __pyx_n_s_multiplier, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic, __pyx_n_s_ans, __pyx_n_s_varkeys, __pyx_n_s_e, __pyx_n_s_id_2, __pyx_n_s_key, __pyx_n_s_lhs, __pyx_n_s_res, __pyx_n_s_i); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 388, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__58);
+ __Pyx_GIVEREF(__pyx_tuple__58);
+ __pyx_codeobj__59 = (PyObject*)__Pyx_PyCode_New(6, 0, 14, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__58, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_collect_sum, 388, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__59)) __PYX_ERR(0, 388, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":457
+ *
+ * #@profile
+ * def _collect_prod(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * #
+ * # LHS is a numeric value
+ */
+ __pyx_tuple__60 = PyTuple_Pack(29, __pyx_n_s_exp, __pyx_n_s_multiplier, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic, __pyx_n_s_val, __pyx_n_s_lhs, __pyx_n_s_lhs_nonl_None, __pyx_n_s_rhs, __pyx_n_s_rhs_nonl_None, __pyx_n_s_ans, __pyx_n_s_key, __pyx_n_s_coef, __pyx_n_s_lkey, __pyx_n_s_lcoef, __pyx_n_s_rkey, __pyx_n_s_rcoef, __pyx_n_s_el_linear, __pyx_n_s_er_linear, __pyx_n_s_el_quadratic, __pyx_n_s_er_quadratic, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 457, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__60);
+ __Pyx_GIVEREF(__pyx_tuple__60);
+ __pyx_codeobj__61 = (PyObject*)__Pyx_PyCode_New(6, 0, 29, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_collect_prod, 457, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__61)) __PYX_ERR(0, 457, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":558
+ *
+ * #@profile
+ * def _collect_var(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ *
+ */
+ __pyx_tuple__62 = PyTuple_Pack(9, __pyx_n_s_exp, __pyx_n_s_multiplier, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic, __pyx_n_s_ans, __pyx_n_s_id_2, __pyx_n_s_key); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 558, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__62);
+ __Pyx_GIVEREF(__pyx_tuple__62);
+ __pyx_codeobj__63 = (PyObject*)__Pyx_PyCode_New(6, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_collect_var, 558, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__63)) __PYX_ERR(0, 558, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":581
+ * return ans
+ *
+ * def _collect_pow(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._args_[1].__class__ in native_numeric_types:
+ * exponent = exp._args_[1]
+ */
+ __pyx_tuple__64 = PyTuple_Pack(11, __pyx_n_s_exp, __pyx_n_s_multiplier, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic, __pyx_n_s_exponent, __pyx_n_s_res_2, __pyx_n_s_ans, __pyx_n_s_key, __pyx_n_s_coef); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 581, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__64);
+ __Pyx_GIVEREF(__pyx_tuple__64);
+ __pyx_codeobj__65 = (PyObject*)__Pyx_PyCode_New(6, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__64, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_collect_pow, 581, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__65)) __PYX_ERR(0, 581, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":617
+ * return Results(nonl=multiplier*exp)
+ *
+ * def _collect_reciprocal(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._args_[0].__class__ in native_numeric_types or not exp._args_[0].is_potentially_variable():
+ * if compute_values:
+ */
+ __pyx_tuple__66 = PyTuple_Pack(8, __pyx_n_s_exp, __pyx_n_s_multiplier, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic, __pyx_n_s_denom, __pyx_n_s_res_2); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 617, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__66);
+ __Pyx_GIVEREF(__pyx_tuple__66);
+ __pyx_codeobj__67 = (PyObject*)__Pyx_PyCode_New(6, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__66, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_collect_reciprocal, 617, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__67)) __PYX_ERR(0, 617, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":633
+ * return Results(constant=multiplier/denom)
+ *
+ * def _collect_branching_expr(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._if.__class__ in native_numeric_types:
+ * if_val = exp._if
+ */
+ __pyx_tuple__68 = PyTuple_Pack(8, __pyx_n_s_exp, __pyx_n_s_multiplier, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic, __pyx_n_s_if_val, __pyx_n_s_res_2); if (unlikely(!__pyx_tuple__68)) __PYX_ERR(0, 633, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__68);
+ __Pyx_GIVEREF(__pyx_tuple__68);
+ __pyx_codeobj__69 = (PyObject*)__Pyx_PyCode_New(6, 0, 8, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__68, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_collect_branching_expr, 633, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__69)) __PYX_ERR(0, 633, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":652
+ * return _collect_standard_repn(exp._else, multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ * def _collect_nonl(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * res = _collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0:
+ */
+ __pyx_tuple__70 = PyTuple_Pack(7, __pyx_n_s_exp, __pyx_n_s_multiplier, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic, __pyx_n_s_res_2); if (unlikely(!__pyx_tuple__70)) __PYX_ERR(0, 652, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__70);
+ __Pyx_GIVEREF(__pyx_tuple__70);
+ __pyx_codeobj__71 = (PyObject*)__Pyx_PyCode_New(6, 0, 7, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__70, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_collect_nonl, 652, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__71)) __PYX_ERR(0, 652, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":658
+ * return Results(constant=multiplier*exp._apply_operation([res.constant]))
+ *
+ * def _collect_negation(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * return _collect_standard_repn(exp._args_[0], -1*multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ */
+ __pyx_tuple__72 = PyTuple_Pack(6, __pyx_n_s_exp, __pyx_n_s_multiplier, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 658, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__72);
+ __Pyx_GIVEREF(__pyx_tuple__72);
+ __pyx_codeobj__73 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__72, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_collect_negation, 658, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__73)) __PYX_ERR(0, 658, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":661
+ * return _collect_standard_repn(exp._args_[0], -1*multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ * def _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._args_[0].__class__ in native_numeric_types:
+ * return Results(constant=exp._args_[0])
+ */
+ __pyx_tuple__74 = PyTuple_Pack(6, __pyx_n_s_exp, __pyx_n_s_multiplier, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic); if (unlikely(!__pyx_tuple__74)) __PYX_ERR(0, 661, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__74);
+ __Pyx_GIVEREF(__pyx_tuple__74);
+ __pyx_codeobj__75 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__74, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_collect_identity, 661, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__75)) __PYX_ERR(0, 661, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":671
+ * return _collect_standard_repn(exp.expr, multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ * def _collect_linear(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ * if compute_values:
+ */
+ __pyx_tuple__76 = PyTuple_Pack(11, __pyx_n_s_exp, __pyx_n_s_multiplier, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic, __pyx_n_s_ans, __pyx_n_s_c_2, __pyx_n_s_v_2, __pyx_n_s_id_2, __pyx_n_s_key); if (unlikely(!__pyx_tuple__76)) __PYX_ERR(0, 671, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__76);
+ __Pyx_GIVEREF(__pyx_tuple__76);
+ __pyx_codeobj__77 = (PyObject*)__Pyx_PyCode_New(6, 0, 11, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__76, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_collect_linear, 671, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__77)) __PYX_ERR(0, 671, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":704
+ * return ans
+ *
+ * def _collect_comparison(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ *
+ */
+ __pyx_tuple__78 = PyTuple_Pack(6, __pyx_n_s_exp, __pyx_n_s_multiplier, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic); if (unlikely(!__pyx_tuple__78)) __PYX_ERR(0, 704, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__78);
+ __Pyx_GIVEREF(__pyx_tuple__78);
+ __pyx_codeobj__79 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__78, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_collect_comparison, 704, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__79)) __PYX_ERR(0, 704, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":707
+ * return Results(nonl=multiplier*exp)
+ *
+ * def _collect_external_fn(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ *
+ */
+ __pyx_tuple__80 = PyTuple_Pack(6, __pyx_n_s_exp, __pyx_n_s_multiplier, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic); if (unlikely(!__pyx_tuple__80)) __PYX_ERR(0, 707, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__80);
+ __Pyx_GIVEREF(__pyx_tuple__80);
+ __pyx_codeobj__81 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__80, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_collect_external_fn, 707, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__81)) __PYX_ERR(0, 707, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":710
+ * return Results(nonl=multiplier*exp)
+ *
+ * def _collect_linear_sum(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ * varkeys = idMap[None]
+ */
+ __pyx_tuple__82 = PyTuple_Pack(13, __pyx_n_s_exp, __pyx_n_s_multiplier, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic, __pyx_n_s_ans, __pyx_n_s_varkeys, __pyx_n_s_e, __pyx_n_s_c_2, __pyx_n_s_v_2, __pyx_n_s_id_2, __pyx_n_s_key); if (unlikely(!__pyx_tuple__82)) __PYX_ERR(0, 710, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__82);
+ __Pyx_GIVEREF(__pyx_tuple__82);
+ __pyx_codeobj__83 = (PyObject*)__Pyx_PyCode_New(6, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__82, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_collect_linear_sum, 710, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__83)) __PYX_ERR(0, 710, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":787
+ *
+ *
+ * def _collect_standard_repn(exp, multiplier, idMap, # <<<<<<<<<<<<<<
+ * compute_values, verbose, quadratic):
+ * try:
+ */
+ __pyx_tuple__84 = PyTuple_Pack(6, __pyx_n_s_exp, __pyx_n_s_multiplier, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic); if (unlikely(!__pyx_tuple__84)) __PYX_ERR(0, 787, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__84);
+ __Pyx_GIVEREF(__pyx_tuple__84);
+ __pyx_codeobj__85 = (PyObject*)__Pyx_PyCode_New(6, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__84, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_collect_standard_repn, 787, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__85)) __PYX_ERR(0, 787, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":802
+ * raise ValueError( "Unexpected expression (type %s)" % type(exp).__name__)
+ *
+ * def _generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None): # <<<<<<<<<<<<<<
+ * #
+ * # Call recursive logic
+ */
+ __pyx_tuple__86 = PyTuple_Pack(18, __pyx_n_s_expr, __pyx_n_s_idMap, __pyx_n_s_compute_values, __pyx_n_s_verbose, __pyx_n_s_quadratic, __pyx_n_s_repn, __pyx_n_s_ans, __pyx_n_s_keys, __pyx_n_s_v, __pyx_n_s_id_2, __pyx_n_s_key, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr, __pyx_n_s_genexpr); if (unlikely(!__pyx_tuple__86)) __PYX_ERR(0, 802, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__86);
+ __Pyx_GIVEREF(__pyx_tuple__86);
+ __pyx_codeobj__87 = (PyObject*)__Pyx_PyCode_New(6, 0, 18, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__86, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_generate_standard_repn_2, 802, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__87)) __PYX_ERR(0, 802, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":859
+ *
+ *
+ * def preprocess_block_objectives(block, idMap=None): # <<<<<<<<<<<<<<
+ *
+ * # Get/Create the ComponentMap for the repn
+ */
+ __pyx_tuple__88 = PyTuple_Pack(6, __pyx_n_s_block, __pyx_n_s_idMap, __pyx_n_s_block_repn, __pyx_n_s_objective_data, __pyx_n_s_repn, __pyx_n_s_err); if (unlikely(!__pyx_tuple__88)) __PYX_ERR(0, 859, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__88);
+ __Pyx_GIVEREF(__pyx_tuple__88);
+ __pyx_codeobj__89 = (PyObject*)__Pyx_PyCode_New(2, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__88, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_preprocess_block_objectives, 859, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__89)) __PYX_ERR(0, 859, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":885
+ * block_repn[objective_data] = repn
+ *
+ * def preprocess_block_constraints(block, idMap=None): # <<<<<<<<<<<<<<
+ *
+ * # Get/Create the ComponentMap for the repn
+ */
+ __pyx_tuple__90 = PyTuple_Pack(4, __pyx_n_s_block, __pyx_n_s_idMap, __pyx_n_s_block_repn, __pyx_n_s_constraint); if (unlikely(!__pyx_tuple__90)) __PYX_ERR(0, 885, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__90);
+ __Pyx_GIVEREF(__pyx_tuple__90);
+ __pyx_codeobj__91 = (PyObject*)__Pyx_PyCode_New(2, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__90, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_preprocess_block_constraints, 885, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__91)) __PYX_ERR(0, 885, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":901
+ * block_repn=block_repn)
+ *
+ * def preprocess_constraint(block, # <<<<<<<<<<<<<<
+ * constraint,
+ * idMap=None,
+ */
+ __pyx_tuple__92 = PyTuple_Pack(9, __pyx_n_s_block, __pyx_n_s_constraint, __pyx_n_s_idMap, __pyx_n_s_block_repn, __pyx_n_s_MatrixConstraint, __pyx_n_s_index, __pyx_n_s_constraint_data, __pyx_n_s_repn, __pyx_n_s_err); if (unlikely(!__pyx_tuple__92)) __PYX_ERR(0, 901, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__92);
+ __Pyx_GIVEREF(__pyx_tuple__92);
+ __pyx_codeobj__93 = (PyObject*)__Pyx_PyCode_New(4, 0, 9, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__92, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_preprocess_constraint, 901, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__93)) __PYX_ERR(0, 901, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":938
+ * block_repn[constraint_data] = repn
+ *
+ * def preprocess_constraint_data(block, # <<<<<<<<<<<<<<
+ * constraint_data,
+ * idMap=None,
+ */
+ __pyx_tuple__94 = PyTuple_Pack(6, __pyx_n_s_block, __pyx_n_s_constraint_data, __pyx_n_s_idMap, __pyx_n_s_block_repn, __pyx_n_s_repn, __pyx_n_s_err); if (unlikely(!__pyx_tuple__94)) __PYX_ERR(0, 938, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_tuple__94);
+ __Pyx_GIVEREF(__pyx_tuple__94);
+ __pyx_codeobj__95 = (PyObject*)__Pyx_PyCode_New(4, 0, 6, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__94, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pyomo_repn_standard_repn_pyx, __pyx_n_s_preprocess_constraint_data, 938, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__95)) __PYX_ERR(0, 938, __pyx_L1_error)
+ __Pyx_RefNannyFinishContext();
+ return 0;
+ __pyx_L1_error:;
+ __Pyx_RefNannyFinishContext();
+ return -1;
+}
+
+static int __Pyx_InitGlobals(void) {
+ __pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type;
+ if (__Pyx_InitStrings(__pyx_string_tab) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+ __pyx_float_0_0 = PyFloat_FromDouble(0.0); if (unlikely(!__pyx_float_0_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_1_0 = PyFloat_FromDouble(1.0); if (unlikely(!__pyx_float_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_1eneg_9 = PyFloat_FromDouble(1e-9); if (unlikely(!__pyx_float_1eneg_9)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_float_neg_1_0 = PyFloat_FromDouble(-1.0); if (unlikely(!__pyx_float_neg_1_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+ return 0;
+ __pyx_L1_error:;
+ return -1;
+}
+
+#if PY_MAJOR_VERSION < 3
+PyMODINIT_FUNC initstandard_repn(void); /*proto*/
+PyMODINIT_FUNC initstandard_repn(void)
+#else
+PyMODINIT_FUNC PyInit_standard_repn(void); /*proto*/
+PyMODINIT_FUNC PyInit_standard_repn(void)
+#if CYTHON_PEP489_MULTI_PHASE_INIT
+{
+ return PyModuleDef_Init(&__pyx_moduledef);
+}
+static int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name) {
+ PyObject *value = PyObject_GetAttrString(spec, from_name);
+ int result = 0;
+ if (likely(value)) {
+ result = PyDict_SetItemString(moddict, to_name, value);
+ Py_DECREF(value);
+ } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_Clear();
+ } else {
+ result = -1;
+ }
+ return result;
+}
+static PyObject* __pyx_pymod_create(PyObject *spec, CYTHON_UNUSED PyModuleDef *def) {
+ PyObject *module = NULL, *moddict, *modname;
+ if (__pyx_m)
+ return __Pyx_NewRef(__pyx_m);
+ modname = PyObject_GetAttrString(spec, "name");
+ if (unlikely(!modname)) goto bad;
+ module = PyModule_NewObject(modname);
+ Py_DECREF(modname);
+ if (unlikely(!module)) goto bad;
+ moddict = PyModule_GetDict(module);
+ if (unlikely(!moddict)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__") < 0)) goto bad;
+ if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__") < 0)) goto bad;
+ return module;
+bad:
+ Py_XDECREF(module);
+ return NULL;
+}
+
+
+static int __pyx_pymod_exec_standard_repn(PyObject *__pyx_pyinit_module)
+#endif
+#endif
+{
+ PyObject *__pyx_t_1 = NULL;
+ PyObject *__pyx_t_2 = NULL;
+ PyObject *__pyx_t_3 = NULL;
+ PyObject *__pyx_t_4 = NULL;
+ PyObject *__pyx_t_5 = NULL;
+ PyObject *__pyx_t_6 = NULL;
+ __Pyx_RefNannyDeclarations
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ if (__pyx_m && __pyx_m == __pyx_pyinit_module) return 0;
+ #endif
+ #if CYTHON_REFNANNY
+ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
+ if (!__Pyx_RefNanny) {
+ PyErr_Clear();
+ __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
+ if (!__Pyx_RefNanny)
+ Py_FatalError("failed to import 'refnanny' module");
+ }
+ #endif
+ __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_standard_repn(void)", 0);
+ if (__Pyx_check_binary_version() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #ifdef __Pyx_CyFunction_USED
+ if (__pyx_CyFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_FusedFunction_USED
+ if (__pyx_FusedFunction_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ if (__pyx_Coroutine_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_Generator_USED
+ if (__pyx_Generator_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ if (__pyx_AsyncGen_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ #ifdef __Pyx_StopAsyncIteration_USED
+ if (__pyx_StopAsyncIteration_init() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ /*--- Library function declarations ---*/
+ /*--- Threads initialization code ---*/
+ #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
+ #ifdef WITH_THREAD /* Python build with threading support? */
+ PyEval_InitThreads();
+ #endif
+ #endif
+ /*--- Module creation code ---*/
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ __pyx_m = __pyx_pyinit_module;
+ Py_INCREF(__pyx_m);
+ #else
+ #if PY_MAJOR_VERSION < 3
+ __pyx_m = Py_InitModule4("standard_repn", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
+ #else
+ __pyx_m = PyModule_Create(&__pyx_moduledef);
+ #endif
+ if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
+ Py_INCREF(__pyx_d);
+ __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __pyx_cython_runtime = PyImport_AddModule((char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
+ #if CYTHON_COMPILING_IN_PYPY
+ Py_INCREF(__pyx_b);
+ #endif
+ if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error);
+ /*--- Initialize various global constants etc. ---*/
+ if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
+ if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+ if (__pyx_module_is_main_pyomo__repn__standard_repn) {
+ if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ }
+ #if PY_MAJOR_VERSION >= 3
+ {
+ PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
+ if (!PyDict_GetItemString(modules, "pyomo.repn.standard_repn")) {
+ if (unlikely(PyDict_SetItemString(modules, "pyomo.repn.standard_repn", __pyx_m) < 0)) __PYX_ERR(0, 1, __pyx_L1_error)
+ }
+ }
+ #endif
+ /*--- Builtin init code ---*/
+ if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ /*--- Constants init code ---*/
+ if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ /*--- Global init code ---*/
+ /*--- Variable export code ---*/
+ /*--- Function export code ---*/
+ /*--- Type init code ---*/
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn) < 0) __PYX_ERR(0, 267, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct__generate_standard_repn;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr) < 0) __PYX_ERR(0, 350, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_1_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr) < 0) __PYX_ERR(0, 351, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_2_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod) < 0) __PYX_ERR(0, 457, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_3__collect_prod;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr) < 0) __PYX_ERR(0, 545, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_4_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr) < 0) __PYX_ERR(0, 546, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_5_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr) < 0) __PYX_ERR(0, 547, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_6_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr) < 0) __PYX_ERR(0, 548, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_7_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr) < 0) __PYX_ERR(0, 551, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_8_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr) < 0) __PYX_ERR(0, 552, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_9_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn) < 0) __PYX_ERR(0, 802, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_10__generate_standard_repn;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr) < 0) __PYX_ERR(0, 819, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_11_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr) < 0) __PYX_ERR(0, 822, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_12_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr) < 0) __PYX_ERR(0, 823, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_13_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr) < 0) __PYX_ERR(0, 826, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_14_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr) < 0) __PYX_ERR(0, 827, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_15_genexpr;
+ if (PyType_Ready(&__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr) < 0) __PYX_ERR(0, 828, __pyx_L1_error)
+ __pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr.tp_print = 0;
+ __pyx_ptype_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr = &__pyx_type_5pyomo_4repn_13standard_repn___pyx_scope_struct_16_genexpr;
+ /*--- Type import code ---*/
+ /*--- Variable import code ---*/
+ /*--- Function import code ---*/
+ /*--- Execution code ---*/
+ #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+ if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ #endif
+
+ /* "pyomo/repn/standard_repn.pyx":13
+ * from __future__ import division
+ *
+ * __all__ = ['StandardRepn', 'generate_standard_repn'] # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 13, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_StandardRepn);
+ __Pyx_GIVEREF(__pyx_n_s_StandardRepn);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_StandardRepn);
+ __Pyx_INCREF(__pyx_n_s_generate_standard_repn);
+ __Pyx_GIVEREF(__pyx_n_s_generate_standard_repn);
+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_generate_standard_repn);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_1) < 0) __PYX_ERR(0, 13, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":16
+ *
+ *
+ * import sys # <<<<<<<<<<<<<<
+ * import logging
+ * import math
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_sys, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 16, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_1) < 0) __PYX_ERR(0, 16, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":17
+ *
+ * import sys
+ * import logging # <<<<<<<<<<<<<<
+ * import math
+ * import itertools
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_logging, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_logging, __pyx_t_1) < 0) __PYX_ERR(0, 17, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":18
+ * import sys
+ * import logging
+ * import math # <<<<<<<<<<<<<<
+ * import itertools
+ *
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 18, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_math, __pyx_t_1) < 0) __PYX_ERR(0, 18, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":19
+ * import logging
+ * import math
+ * import itertools # <<<<<<<<<<<<<<
+ *
+ * from pyomo.core.base import (Constraint,
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_itertools, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 19, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_itertools, __pyx_t_1) < 0) __PYX_ERR(0, 19, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":21
+ * import itertools
+ *
+ * from pyomo.core.base import (Constraint, # <<<<<<<<<<<<<<
+ * Objective,
+ * ComponentMap)
+ */
+ __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_Constraint);
+ __Pyx_GIVEREF(__pyx_n_s_Constraint);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Constraint);
+ __Pyx_INCREF(__pyx_n_s_Objective);
+ __Pyx_GIVEREF(__pyx_n_s_Objective);
+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_Objective);
+ __Pyx_INCREF(__pyx_n_s_ComponentMap);
+ __Pyx_GIVEREF(__pyx_n_s_ComponentMap);
+ PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_ComponentMap);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_core_base, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Constraint); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Constraint, __pyx_t_1) < 0) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Objective); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Objective, __pyx_t_1) < 0) __PYX_ERR(0, 22, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ComponentMap); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 21, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ComponentMap, __pyx_t_1) < 0) __PYX_ERR(0, 23, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":25
+ * ComponentMap)
+ *
+ * import pyomo.util # <<<<<<<<<<<<<<
+ * from pyutilib.misc import Bunch
+ * from pyutilib.math.util import isclose as isclose_default
+ */
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_util, 0, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 25, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyomo, __pyx_t_2) < 0) __PYX_ERR(0, 25, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":26
+ *
+ * import pyomo.util
+ * from pyutilib.misc import Bunch # <<<<<<<<<<<<<<
+ * from pyutilib.math.util import isclose as isclose_default
+ *
+ */
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_Bunch);
+ __Pyx_GIVEREF(__pyx_n_s_Bunch);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_Bunch);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyutilib_misc, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 26, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Bunch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 26, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Bunch, __pyx_t_2) < 0) __PYX_ERR(0, 26, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":27
+ * import pyomo.util
+ * from pyutilib.misc import Bunch
+ * from pyutilib.math.util import isclose as isclose_default # <<<<<<<<<<<<<<
+ *
+ * from pyomo.core.expr import current as EXPR
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_isclose);
+ __Pyx_GIVEREF(__pyx_n_s_isclose);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_isclose);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyutilib_math_util, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_isclose); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_isclose_default, __pyx_t_1) < 0) __PYX_ERR(0, 27, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":29
+ * from pyutilib.math.util import isclose as isclose_default
+ *
+ * from pyomo.core.expr import current as EXPR # <<<<<<<<<<<<<<
+ * from pyomo.core.base.objective import (_GeneralObjectiveData,
+ * SimpleObjective)
+ */
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_current);
+ __Pyx_GIVEREF(__pyx_n_s_current);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_current);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyomo_core_expr, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 29, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_current); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 29, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_EXPR, __pyx_t_2) < 0) __PYX_ERR(0, 29, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":30
+ *
+ * from pyomo.core.expr import current as EXPR
+ * from pyomo.core.base.objective import (_GeneralObjectiveData, # <<<<<<<<<<<<<<
+ * SimpleObjective)
+ * from pyomo.core.base import _ExpressionData, Expression
+ */
+ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_GeneralObjectiveData);
+ __Pyx_GIVEREF(__pyx_n_s_GeneralObjectiveData);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_GeneralObjectiveData);
+ __Pyx_INCREF(__pyx_n_s_SimpleObjective);
+ __Pyx_GIVEREF(__pyx_n_s_SimpleObjective);
+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_SimpleObjective);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_core_base_objective, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 30, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_GeneralObjectiveData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_GeneralObjectiveData, __pyx_t_1) < 0) __PYX_ERR(0, 30, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_SimpleObjective); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 30, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SimpleObjective, __pyx_t_1) < 0) __PYX_ERR(0, 31, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":32
+ * from pyomo.core.base.objective import (_GeneralObjectiveData,
+ * SimpleObjective)
+ * from pyomo.core.base import _ExpressionData, Expression # <<<<<<<<<<<<<<
+ * from pyomo.core.base.expression import SimpleExpression, _GeneralExpressionData
+ * from pyomo.core.base.var import (SimpleVar,
+ */
+ __pyx_t_2 = PyList_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_ExpressionData);
+ __Pyx_GIVEREF(__pyx_n_s_ExpressionData);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_ExpressionData);
+ __Pyx_INCREF(__pyx_n_s_Expression);
+ __Pyx_GIVEREF(__pyx_n_s_Expression);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Expression);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyomo_core_base, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 32, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_ExpressionData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ExpressionData, __pyx_t_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 32, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Expression, __pyx_t_2) < 0) __PYX_ERR(0, 32, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":33
+ * SimpleObjective)
+ * from pyomo.core.base import _ExpressionData, Expression
+ * from pyomo.core.base.expression import SimpleExpression, _GeneralExpressionData # <<<<<<<<<<<<<<
+ * from pyomo.core.base.var import (SimpleVar,
+ * Var,
+ */
+ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_SimpleExpression);
+ __Pyx_GIVEREF(__pyx_n_s_SimpleExpression);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_SimpleExpression);
+ __Pyx_INCREF(__pyx_n_s_GeneralExpressionData);
+ __Pyx_GIVEREF(__pyx_n_s_GeneralExpressionData);
+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_GeneralExpressionData);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_core_base_expression, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 33, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_SimpleExpression); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SimpleExpression, __pyx_t_1) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_GeneralExpressionData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 33, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_GeneralExpressionData, __pyx_t_1) < 0) __PYX_ERR(0, 33, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":34
+ * from pyomo.core.base import _ExpressionData, Expression
+ * from pyomo.core.base.expression import SimpleExpression, _GeneralExpressionData
+ * from pyomo.core.base.var import (SimpleVar, # <<<<<<<<<<<<<<
+ * Var,
+ * _GeneralVarData,
+ */
+ __pyx_t_2 = PyList_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_SimpleVar);
+ __Pyx_GIVEREF(__pyx_n_s_SimpleVar);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_SimpleVar);
+ __Pyx_INCREF(__pyx_n_s_Var);
+ __Pyx_GIVEREF(__pyx_n_s_Var);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_Var);
+ __Pyx_INCREF(__pyx_n_s_GeneralVarData);
+ __Pyx_GIVEREF(__pyx_n_s_GeneralVarData);
+ PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_GeneralVarData);
+ __Pyx_INCREF(__pyx_n_s_VarData);
+ __Pyx_GIVEREF(__pyx_n_s_VarData);
+ PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_s_VarData);
+ __Pyx_INCREF(__pyx_n_s_value);
+ __Pyx_GIVEREF(__pyx_n_s_value);
+ PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_s_value);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyomo_core_base_var, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 34, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_SimpleVar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SimpleVar, __pyx_t_2) < 0) __PYX_ERR(0, 34, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_Var); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Var, __pyx_t_2) < 0) __PYX_ERR(0, 35, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_GeneralVarData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_GeneralVarData, __pyx_t_2) < 0) __PYX_ERR(0, 36, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_VarData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_VarData, __pyx_t_2) < 0) __PYX_ERR(0, 37, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_value); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 34, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_value, __pyx_t_2) < 0) __PYX_ERR(0, 38, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":39
+ * _VarData,
+ * value)
+ * from pyomo.core.base.param import _ParamData # <<<<<<<<<<<<<<
+ * from pyomo.core.base.numvalue import (NumericConstant,
+ * native_numeric_types,
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_ParamData);
+ __Pyx_GIVEREF(__pyx_n_s_ParamData);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_ParamData);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_core_base_param, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 39, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_ParamData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 39, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_ParamData, __pyx_t_1) < 0) __PYX_ERR(0, 39, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":40
+ * value)
+ * from pyomo.core.base.param import _ParamData
+ * from pyomo.core.base.numvalue import (NumericConstant, # <<<<<<<<<<<<<<
+ * native_numeric_types,
+ * is_fixed)
+ */
+ __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_NumericConstant);
+ __Pyx_GIVEREF(__pyx_n_s_NumericConstant);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_NumericConstant);
+ __Pyx_INCREF(__pyx_n_s_native_numeric_types);
+ __Pyx_GIVEREF(__pyx_n_s_native_numeric_types);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_native_numeric_types);
+ __Pyx_INCREF(__pyx_n_s_is_fixed);
+ __Pyx_GIVEREF(__pyx_n_s_is_fixed);
+ PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_is_fixed);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyomo_core_base_numvalue, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 40, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_NumericConstant); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_NumericConstant, __pyx_t_2) < 0) __PYX_ERR(0, 40, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_native_numeric_types); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_native_numeric_types, __pyx_t_2) < 0) __PYX_ERR(0, 41, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_is_fixed); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 40, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_is_fixed, __pyx_t_2) < 0) __PYX_ERR(0, 42, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":43
+ * native_numeric_types,
+ * is_fixed)
+ * from pyomo.core.util import Sum # <<<<<<<<<<<<<<
+ * from pyomo.core.kernel.component_expression import IIdentityExpression, expression, noclone
+ * from pyomo.core.kernel.component_variable import IVariable
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_Sum);
+ __Pyx_GIVEREF(__pyx_n_s_Sum);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_Sum);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_core_util, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 43, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_Sum); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 43, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Sum, __pyx_t_1) < 0) __PYX_ERR(0, 43, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":44
+ * is_fixed)
+ * from pyomo.core.util import Sum
+ * from pyomo.core.kernel.component_expression import IIdentityExpression, expression, noclone # <<<<<<<<<<<<<<
+ * from pyomo.core.kernel.component_variable import IVariable
+ * from pyomo.core.kernel.component_objective import objective
+ */
+ __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_IIdentityExpression);
+ __Pyx_GIVEREF(__pyx_n_s_IIdentityExpression);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_IIdentityExpression);
+ __Pyx_INCREF(__pyx_n_s_expression);
+ __Pyx_GIVEREF(__pyx_n_s_expression);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_expression);
+ __Pyx_INCREF(__pyx_n_s_noclone);
+ __Pyx_GIVEREF(__pyx_n_s_noclone);
+ PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_noclone);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyomo_core_kernel_component_expr, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 44, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_IIdentityExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_IIdentityExpression, __pyx_t_2) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_expression, __pyx_t_2) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_noclone); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 44, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_noclone, __pyx_t_2) < 0) __PYX_ERR(0, 44, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":45
+ * from pyomo.core.util import Sum
+ * from pyomo.core.kernel.component_expression import IIdentityExpression, expression, noclone
+ * from pyomo.core.kernel.component_variable import IVariable # <<<<<<<<<<<<<<
+ * from pyomo.core.kernel.component_objective import objective
+ *
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_IVariable);
+ __Pyx_GIVEREF(__pyx_n_s_IVariable);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_IVariable);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_pyomo_core_kernel_component_vari, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_IVariable); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_IVariable, __pyx_t_1) < 0) __PYX_ERR(0, 45, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":46
+ * from pyomo.core.kernel.component_expression import IIdentityExpression, expression, noclone
+ * from pyomo.core.kernel.component_variable import IVariable
+ * from pyomo.core.kernel.component_objective import objective # <<<<<<<<<<<<<<
+ *
+ * import six
+ */
+ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_objective);
+ __Pyx_GIVEREF(__pyx_n_s_objective);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_objective);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyomo_core_kernel_component_obje, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 46, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_objective); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 46, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_objective, __pyx_t_2) < 0) __PYX_ERR(0, 46, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":48
+ * from pyomo.core.kernel.component_objective import objective
+ *
+ * import six # <<<<<<<<<<<<<<
+ * from six import iteritems
+ * from six import itervalues, iteritems, StringIO
+ */
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_six, 0, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 48, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_six, __pyx_t_1) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":49
+ *
+ * import six
+ * from six import iteritems # <<<<<<<<<<<<<<
+ * from six import itervalues, iteritems, StringIO
+ * from six.moves import xrange, zip
+ */
+ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_iteritems);
+ __Pyx_GIVEREF(__pyx_n_s_iteritems);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_iteritems);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_six, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 49, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_iteritems, __pyx_t_1) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":50
+ * import six
+ * from six import iteritems
+ * from six import itervalues, iteritems, StringIO # <<<<<<<<<<<<<<
+ * from six.moves import xrange, zip
+ * try:
+ */
+ __pyx_t_2 = PyList_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_INCREF(__pyx_n_s_itervalues);
+ __Pyx_GIVEREF(__pyx_n_s_itervalues);
+ PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_itervalues);
+ __Pyx_INCREF(__pyx_n_s_iteritems);
+ __Pyx_GIVEREF(__pyx_n_s_iteritems);
+ PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_s_iteritems);
+ __Pyx_INCREF(__pyx_n_s_StringIO);
+ __Pyx_GIVEREF(__pyx_n_s_StringIO);
+ PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_s_StringIO);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_six, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 50, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_itervalues); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_itervalues, __pyx_t_2) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_iteritems); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_iteritems, __pyx_t_2) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_StringIO); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_StringIO, __pyx_t_2) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":51
+ * from six import iteritems
+ * from six import itervalues, iteritems, StringIO
+ * from six.moves import xrange, zip # <<<<<<<<<<<<<<
+ * try:
+ * basestring
+ */
+ __pyx_t_1 = PyList_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_xrange);
+ __Pyx_GIVEREF(__pyx_n_s_xrange);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_xrange);
+ __Pyx_INCREF(__pyx_n_s_zip);
+ __Pyx_GIVEREF(__pyx_n_s_zip);
+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_zip);
+ __pyx_t_2 = __Pyx_Import(__pyx_n_s_six_moves, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 51, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_xrange); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_xrange, __pyx_t_1) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_zip); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 51, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_zip, __pyx_t_1) < 0) __PYX_ERR(0, 51, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":52
+ * from six import itervalues, iteritems, StringIO
+ * from six.moves import xrange, zip
+ * try: # <<<<<<<<<<<<<<
+ * basestring
+ * except:
+ */
+ {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ExceptionSave(&__pyx_t_3, &__pyx_t_4, &__pyx_t_5);
+ __Pyx_XGOTREF(__pyx_t_3);
+ __Pyx_XGOTREF(__pyx_t_4);
+ __Pyx_XGOTREF(__pyx_t_5);
+ /*try:*/ {
+
+ /* "pyomo/repn/standard_repn.pyx":53
+ * from six.moves import xrange, zip
+ * try:
+ * basestring # <<<<<<<<<<<<<<
+ * except:
+ * basestring = str
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_basestring); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 53, __pyx_L2_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":52
+ * from six import itervalues, iteritems, StringIO
+ * from six.moves import xrange, zip
+ * try: # <<<<<<<<<<<<<<
+ * basestring
+ * except:
+ */
+ }
+ __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
+ __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
+ __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
+ goto __pyx_L7_try_end;
+ __pyx_L2_error:;
+ __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":54
+ * try:
+ * basestring
+ * except: # <<<<<<<<<<<<<<
+ * basestring = str
+ *
+ */
+ /*except:*/ {
+ __Pyx_AddTraceback("pyomo.repn.standard_repn", __pyx_clineno, __pyx_lineno, __pyx_filename);
+ if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_1, &__pyx_t_6) < 0) __PYX_ERR(0, 54, __pyx_L4_except_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_GOTREF(__pyx_t_6);
+
+ /* "pyomo/repn/standard_repn.pyx":55
+ * basestring
+ * except:
+ * basestring = str # <<<<<<<<<<<<<<
+ *
+ * logger = logging.getLogger('pyomo.core')
+ */
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_basestring, ((PyObject *)(&PyString_Type))) < 0) __PYX_ERR(0, 55, __pyx_L4_except_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ goto __pyx_L3_exception_handled;
+ }
+ __pyx_L4_except_error:;
+
+ /* "pyomo/repn/standard_repn.pyx":52
+ * from six import itervalues, iteritems, StringIO
+ * from six.moves import xrange, zip
+ * try: # <<<<<<<<<<<<<<
+ * basestring
+ * except:
+ */
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_XGIVEREF(__pyx_t_4);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
+ goto __pyx_L1_error;
+ __pyx_L3_exception_handled:;
+ __Pyx_XGIVEREF(__pyx_t_3);
+ __Pyx_XGIVEREF(__pyx_t_4);
+ __Pyx_XGIVEREF(__pyx_t_5);
+ __Pyx_ExceptionReset(__pyx_t_3, __pyx_t_4, __pyx_t_5);
+ __pyx_L7_try_end:;
+ }
+
+ /* "pyomo/repn/standard_repn.pyx":57
+ * basestring = str
+ *
+ * logger = logging.getLogger('pyomo.core') # <<<<<<<<<<<<<<
+ *
+ * using_py3 = six.PY3
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_logging); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 57, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_getLogger); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 57, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 57, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_logger, __pyx_t_6) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":59
+ * logger = logging.getLogger('pyomo.core')
+ *
+ * using_py3 = six.PY3 # <<<<<<<<<<<<<<
+ *
+ * from pyomo.core.base import _VarData, _GeneralVarData, SimpleVar
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_six); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 59, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_PY3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 59, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_using_py3, __pyx_t_1) < 0) __PYX_ERR(0, 59, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":61
+ * using_py3 = six.PY3
+ *
+ * from pyomo.core.base import _VarData, _GeneralVarData, SimpleVar # <<<<<<<<<<<<<<
+ * from pyomo.core.kernel.component_variable import IVariable, variable
+ *
+ */
+ __pyx_t_1 = PyList_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_INCREF(__pyx_n_s_VarData);
+ __Pyx_GIVEREF(__pyx_n_s_VarData);
+ PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_VarData);
+ __Pyx_INCREF(__pyx_n_s_GeneralVarData);
+ __Pyx_GIVEREF(__pyx_n_s_GeneralVarData);
+ PyList_SET_ITEM(__pyx_t_1, 1, __pyx_n_s_GeneralVarData);
+ __Pyx_INCREF(__pyx_n_s_SimpleVar);
+ __Pyx_GIVEREF(__pyx_n_s_SimpleVar);
+ PyList_SET_ITEM(__pyx_t_1, 2, __pyx_n_s_SimpleVar);
+ __pyx_t_6 = __Pyx_Import(__pyx_n_s_pyomo_core_base, __pyx_t_1, -1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 61, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_VarData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_VarData, __pyx_t_1) < 0) __PYX_ERR(0, 61, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_GeneralVarData); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_GeneralVarData, __pyx_t_1) < 0) __PYX_ERR(0, 61, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_6, __pyx_n_s_SimpleVar); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 61, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_SimpleVar, __pyx_t_1) < 0) __PYX_ERR(0, 61, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":62
+ *
+ * from pyomo.core.base import _VarData, _GeneralVarData, SimpleVar
+ * from pyomo.core.kernel.component_variable import IVariable, variable # <<<<<<<<<<<<<<
+ *
+ *
+ */
+ __pyx_t_6 = PyList_New(2); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 62, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __Pyx_INCREF(__pyx_n_s_IVariable);
+ __Pyx_GIVEREF(__pyx_n_s_IVariable);
+ PyList_SET_ITEM(__pyx_t_6, 0, __pyx_n_s_IVariable);
+ __Pyx_INCREF(__pyx_n_s_variable);
+ __Pyx_GIVEREF(__pyx_n_s_variable);
+ PyList_SET_ITEM(__pyx_t_6, 1, __pyx_n_s_variable);
+ __pyx_t_1 = __Pyx_Import(__pyx_n_s_pyomo_core_kernel_component_vari, __pyx_t_6, -1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 62, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_IVariable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 62, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_IVariable, __pyx_t_6) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_variable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 62, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_variable, __pyx_t_6) < 0) __PYX_ERR(0, 62, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":70
+ * # close to 'b' when it is constant.
+ * #
+ * def isclose_const(a, b, rel_tol=1e-9, abs_tol=0.0): # <<<<<<<<<<<<<<
+ * if not a.__class__ in native_numeric_types:
+ * if a.is_constant():
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_1isclose_const, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_isclose_const, __pyx_t_1) < 0) __PYX_ERR(0, 70, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":88
+ * # (defined in pyutilib) or isclose_const
+ * #
+ * isclose = isclose_default # <<<<<<<<<<<<<<
+ *
+ * #
+ */
+ __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_isclose_default); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_isclose, __pyx_t_1) < 0) __PYX_ERR(0, 88, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":94
+ * # isclose() function.
+ * #
+ * class isclose_context(object): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, compute_values):
+ */
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__17); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__17, __pyx_n_s_isclose_context, __pyx_n_s_isclose_context, (PyObject *) NULL, __pyx_n_s_pyomo_repn_standard_repn, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+ /* "pyomo/repn/standard_repn.pyx":96
+ * class isclose_context(object):
+ *
+ * def __init__(self, compute_values): # <<<<<<<<<<<<<<
+ * self.compute_values = compute_values
+ *
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_15isclose_context_1__init__, 0, __pyx_n_s_isclose_context___init, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__19)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 96, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":99
+ * self.compute_values = compute_values
+ *
+ * def __enter__(self): # <<<<<<<<<<<<<<
+ * if not self.compute_values:
+ * global isclose
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_15isclose_context_3__enter__, 0, __pyx_n_s_isclose_context___enter, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_enter, __pyx_t_2) < 0) __PYX_ERR(0, 99, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":104
+ * isclose = isclose_const
+ *
+ * def __exit__(self, *args): # <<<<<<<<<<<<<<
+ * global isclose
+ * isclose = isclose_default
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_15isclose_context_5__exit__, 0, __pyx_n_s_isclose_context___exit, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_exit, __pyx_t_2) < 0) __PYX_ERR(0, 104, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":94
+ * # isclose() function.
+ * #
+ * class isclose_context(object): # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, compute_values):
+ */
+ __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_isclose_context, __pyx_tuple__17, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_isclose_context, __pyx_t_2) < 0) __PYX_ERR(0, 94, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":109
+ *
+ *
+ * class StandardRepn(object): # <<<<<<<<<<<<<<
+ * """
+ * This class defines a standard/common representation for Pyomo expressions
+ */
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__24); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__24, __pyx_n_s_StandardRepn, __pyx_n_s_StandardRepn, (PyObject *) NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_kp_s_This_class_defines_a_standard_c); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+ /* "pyomo/repn/standard_repn.pyx":117
+ * """
+ *
+ * __slots__ = ('constant', # The constant term # <<<<<<<<<<<<<<
+ * 'linear_coefs', # Linear coefficients
+ * 'linear_vars', # Linear variables
+ */
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_slots, __pyx_tuple__25) < 0) __PYX_ERR(0, 117, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":125
+ * 'nonlinear_vars') # Variables that appear in the nonlinear expression
+ *
+ * def __init__(self, expr=None): # <<<<<<<<<<<<<<
+ * self.constant = 0
+ * self.linear_vars = tuple()
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_1__init__, 0, __pyx_n_s_StandardRepn___init, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__28);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 125, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":136
+ * generate_standard_repn(expr, repn=self)
+ *
+ * def __getstate__(self): # <<<<<<<<<<<<<<
+ * """
+ * This method is required because this class uses slots.
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_3__getstate__, 0, __pyx_n_s_StandardRepn___getstate, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 136, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_getstate, __pyx_t_2) < 0) __PYX_ERR(0, 136, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":148
+ * self.nonlinear_vars)
+ *
+ * def __setstate__(self, state): # <<<<<<<<<<<<<<
+ * """
+ * This method is required because this class uses slots.
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_5__setstate__, 0, __pyx_n_s_StandardRepn___setstate, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 148, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_setstate, __pyx_t_2) < 0) __PYX_ERR(0, 148, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":163
+ * # Generate a string representation of the expression
+ * #
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * output = StringIO()
+ * output.write("\n")
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_7__str__, 0, __pyx_n_s_StandardRepn___str, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_str, __pyx_t_2) < 0) __PYX_ERR(0, 163, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":190
+ * return ret_str
+ *
+ * def is_fixed(self): # <<<<<<<<<<<<<<
+ * if len(self.linear_vars) == 0 and len(self.nonlinear_vars) == 0 and len(self.quadratic_vars) == 0:
+ * return True
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_9is_fixed, 0, __pyx_n_s_StandardRepn_is_fixed, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_is_fixed, __pyx_t_2) < 0) __PYX_ERR(0, 190, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":195
+ * return False
+ *
+ * def polynomial_degree(self): # <<<<<<<<<<<<<<
+ * if not self.nonlinear_expr is None:
+ * return None
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_11polynomial_degree, 0, __pyx_n_s_StandardRepn_polynomial_degree, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_polynomial_degree, __pyx_t_2) < 0) __PYX_ERR(0, 195, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":204
+ * return 0
+ *
+ * def is_constant(self): # <<<<<<<<<<<<<<
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0 and len(self.linear_coefs) == 0
+ *
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_13is_constant, 0, __pyx_n_s_StandardRepn_is_constant, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_is_constant, __pyx_t_2) < 0) __PYX_ERR(0, 204, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":207
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0 and len(self.linear_coefs) == 0
+ *
+ * def is_linear(self): # <<<<<<<<<<<<<<
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0
+ *
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_15is_linear, 0, __pyx_n_s_StandardRepn_is_linear, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_is_linear, __pyx_t_2) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":210
+ * return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0
+ *
+ * def is_quadratic(self): # <<<<<<<<<<<<<<
+ * return len(self.quadratic_coefs) > 0 and self.nonlinear_expr is None
+ *
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_17is_quadratic, 0, __pyx_n_s_StandardRepn_is_quadratic, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_is_quadratic, __pyx_t_2) < 0) __PYX_ERR(0, 210, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":213
+ * return len(self.quadratic_coefs) > 0 and self.nonlinear_expr is None
+ *
+ * def is_nonlinear(self): # <<<<<<<<<<<<<<
+ * return not (self.nonlinear_expr is None and len(self.quadratic_coefs) == 0)
+ *
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_19is_nonlinear, 0, __pyx_n_s_StandardRepn_is_nonlinear, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__46)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 213, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_is_nonlinear, __pyx_t_2) < 0) __PYX_ERR(0, 213, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":216
+ * return not (self.nonlinear_expr is None and len(self.quadratic_coefs) == 0)
+ *
+ * def to_expression(self): # <<<<<<<<<<<<<<
+ * #
+ * # TODO: Should this replace non-mutable parameters with constants?
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_12StandardRepn_21to_expression, 0, __pyx_n_s_StandardRepn_to_expression, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__48)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_to_expression, __pyx_t_2) < 0) __PYX_ERR(0, 216, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":109
+ *
+ *
+ * class StandardRepn(object): # <<<<<<<<<<<<<<
+ * """
+ * This class defines a standard/common representation for Pyomo expressions
+ */
+ __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_StandardRepn, __pyx_tuple__24, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_StandardRepn, __pyx_t_2) < 0) __PYX_ERR(0, 109, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":267
+ * """
+ * #@profile
+ * def generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None): # <<<<<<<<<<<<<<
+ * #
+ * # Use a custom isclose function
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_3generate_standard_repn, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 267, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_standard_repn, __pyx_t_1) < 0) __PYX_ERR(0, 267, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":368
+ * repn=repn)
+ *
+ * class Results(object): # <<<<<<<<<<<<<<
+ * __slot__ = ('const', 'nonl', 'linear', 'quadratic')
+ *
+ */
+ __pyx_t_1 = __Pyx_CalculateMetaclass(NULL, __pyx_tuple__51); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_Py3MetaclassPrepare(__pyx_t_1, __pyx_tuple__51, __pyx_n_s_Results, __pyx_n_s_Results, (PyObject *) NULL, __pyx_n_s_pyomo_repn_standard_repn, (PyObject *) NULL); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 368, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+
+ /* "pyomo/repn/standard_repn.pyx":369
+ *
+ * class Results(object):
+ * __slot__ = ('const', 'nonl', 'linear', 'quadratic') # <<<<<<<<<<<<<<
+ *
+ * def __init__(self, constant=0, nonl=0, linear=None, quadratic=None):
+ */
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_slot, __pyx_tuple__52) < 0) __PYX_ERR(0, 369, __pyx_L1_error)
+
+ /* "pyomo/repn/standard_repn.pyx":371
+ * __slot__ = ('const', 'nonl', 'linear', 'quadratic')
+ *
+ * def __init__(self, constant=0, nonl=0, linear=None, quadratic=None): # <<<<<<<<<<<<<<
+ * self.constant = constant
+ * self.nonl = nonl
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_7Results_1__init__, 0, __pyx_n_s_Results___init, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__54)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 371, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__55);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_init, __pyx_t_2) < 0) __PYX_ERR(0, 371, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":383
+ * self.quadratic = quadratic
+ *
+ * def __str__(self): # <<<<<<<<<<<<<<
+ * return "Const:\t%f\nLinear:\t%s\nQuadratic:\t%s\nNonlinear:\t%s" % (self.constant, str(self.linear), str(self.quadratic), str(self.nonl))
+ *
+ */
+ __pyx_t_2 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_7Results_3__str__, 0, __pyx_n_s_Results___str, NULL, __pyx_n_s_pyomo_repn_standard_repn, __pyx_d, ((PyObject *)__pyx_codeobj__57)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 383, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyObject_SetItem(__pyx_t_6, __pyx_n_s_str, __pyx_t_2) < 0) __PYX_ERR(0, 383, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":368
+ * repn=repn)
+ *
+ * class Results(object): # <<<<<<<<<<<<<<
+ * __slot__ = ('const', 'nonl', 'linear', 'quadratic')
+ *
+ */
+ __pyx_t_2 = __Pyx_Py3ClassCreate(__pyx_t_1, __pyx_n_s_Results, __pyx_tuple__51, __pyx_t_6, NULL, 0, 1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 368, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_Results, __pyx_t_2) < 0) __PYX_ERR(0, 368, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":388
+ *
+ * #@profile
+ * def _collect_sum(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ * varkeys = idMap[None]
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_5_collect_sum, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 388, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_collect_sum, __pyx_t_1) < 0) __PYX_ERR(0, 388, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":457
+ *
+ * #@profile
+ * def _collect_prod(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * #
+ * # LHS is a numeric value
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_7_collect_prod, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 457, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_collect_prod, __pyx_t_1) < 0) __PYX_ERR(0, 457, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":558
+ *
+ * #@profile
+ * def _collect_var(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ *
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_9_collect_var, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 558, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_collect_var, __pyx_t_1) < 0) __PYX_ERR(0, 558, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":581
+ * return ans
+ *
+ * def _collect_pow(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._args_[1].__class__ in native_numeric_types:
+ * exponent = exp._args_[1]
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_11_collect_pow, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 581, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_collect_pow, __pyx_t_1) < 0) __PYX_ERR(0, 581, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":617
+ * return Results(nonl=multiplier*exp)
+ *
+ * def _collect_reciprocal(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._args_[0].__class__ in native_numeric_types or not exp._args_[0].is_potentially_variable():
+ * if compute_values:
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_13_collect_reciprocal, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 617, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_collect_reciprocal, __pyx_t_1) < 0) __PYX_ERR(0, 617, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":633
+ * return Results(constant=multiplier/denom)
+ *
+ * def _collect_branching_expr(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._if.__class__ in native_numeric_types:
+ * if_val = exp._if
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_15_collect_branching_expr, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 633, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_collect_branching_expr, __pyx_t_1) < 0) __PYX_ERR(0, 633, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":652
+ * return _collect_standard_repn(exp._else, multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ * def _collect_nonl(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * res = _collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ * if not isclose_const(res.nonl,0) or len(res.linear) > 0 or len(res.quadratic) > 0:
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_17_collect_nonl, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 652, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_collect_nonl, __pyx_t_1) < 0) __PYX_ERR(0, 652, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":658
+ * return Results(constant=multiplier*exp._apply_operation([res.constant]))
+ *
+ * def _collect_negation(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * return _collect_standard_repn(exp._args_[0], -1*multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_19_collect_negation, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_collect_negation, __pyx_t_1) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":661
+ * return _collect_standard_repn(exp._args_[0], -1*multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ * def _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * if exp._args_[0].__class__ in native_numeric_types:
+ * return Results(constant=exp._args_[0])
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_21_collect_identity, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 661, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_collect_identity, __pyx_t_1) < 0) __PYX_ERR(0, 661, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":671
+ * return _collect_standard_repn(exp.expr, multiplier, idMap, compute_values, verbose, quadratic)
+ *
+ * def _collect_linear(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ * if compute_values:
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_23_collect_linear, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 671, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_collect_linear, __pyx_t_1) < 0) __PYX_ERR(0, 671, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":704
+ * return ans
+ *
+ * def _collect_comparison(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ *
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_25_collect_comparison, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 704, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_collect_comparison, __pyx_t_1) < 0) __PYX_ERR(0, 704, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":707
+ * return Results(nonl=multiplier*exp)
+ *
+ * def _collect_external_fn(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * return Results(nonl=multiplier*exp)
+ *
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_27_collect_external_fn, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 707, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_collect_external_fn, __pyx_t_1) < 0) __PYX_ERR(0, 707, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":710
+ * return Results(nonl=multiplier*exp)
+ *
+ * def _collect_linear_sum(exp, multiplier, idMap, compute_values, verbose, quadratic): # <<<<<<<<<<<<<<
+ * ans = Results()
+ * varkeys = idMap[None]
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_29_collect_linear_sum, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 710, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_collect_linear_sum, __pyx_t_1) < 0) __PYX_ERR(0, 710, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":750
+ *
+ * _repn_collectors = {
+ * EXPR.ViewSumExpression : _collect_sum, # <<<<<<<<<<<<<<
+ * EXPR.ProductExpression : _collect_prod,
+ * EXPR.PowExpression : _collect_pow,
+ */
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(27); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ViewSumExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_sum); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":751
+ * _repn_collectors = {
+ * EXPR.ViewSumExpression : _collect_sum,
+ * EXPR.ProductExpression : _collect_prod, # <<<<<<<<<<<<<<
+ * EXPR.PowExpression : _collect_pow,
+ * EXPR.ReciprocalExpression : _collect_reciprocal,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 751, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ProductExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 751, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_prod); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 751, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":752
+ * EXPR.ViewSumExpression : _collect_sum,
+ * EXPR.ProductExpression : _collect_prod,
+ * EXPR.PowExpression : _collect_pow, # <<<<<<<<<<<<<<
+ * EXPR.ReciprocalExpression : _collect_reciprocal,
+ * EXPR.Expr_if : _collect_branching_expr,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 752, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_PowExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 752, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_pow); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 752, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":753
+ * EXPR.ProductExpression : _collect_prod,
+ * EXPR.PowExpression : _collect_pow,
+ * EXPR.ReciprocalExpression : _collect_reciprocal, # <<<<<<<<<<<<<<
+ * EXPR.Expr_if : _collect_branching_expr,
+ * EXPR.UnaryFunctionExpression : _collect_nonl,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 753, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ReciprocalExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 753, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_reciprocal); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 753, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":754
+ * EXPR.PowExpression : _collect_pow,
+ * EXPR.ReciprocalExpression : _collect_reciprocal,
+ * EXPR.Expr_if : _collect_branching_expr, # <<<<<<<<<<<<<<
+ * EXPR.UnaryFunctionExpression : _collect_nonl,
+ * EXPR.AbsExpression : _collect_nonl,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 754, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_Expr_if); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 754, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_branching_expr); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 754, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":755
+ * EXPR.ReciprocalExpression : _collect_reciprocal,
+ * EXPR.Expr_if : _collect_branching_expr,
+ * EXPR.UnaryFunctionExpression : _collect_nonl, # <<<<<<<<<<<<<<
+ * EXPR.AbsExpression : _collect_nonl,
+ * EXPR.NegationExpression : _collect_negation,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 755, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_UnaryFunctionExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 755, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_nonl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 755, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":756
+ * EXPR.Expr_if : _collect_branching_expr,
+ * EXPR.UnaryFunctionExpression : _collect_nonl,
+ * EXPR.AbsExpression : _collect_nonl, # <<<<<<<<<<<<<<
+ * EXPR.NegationExpression : _collect_negation,
+ * EXPR.LinearExpression : _collect_linear,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_AbsExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_nonl); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 756, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":757
+ * EXPR.UnaryFunctionExpression : _collect_nonl,
+ * EXPR.AbsExpression : _collect_nonl,
+ * EXPR.NegationExpression : _collect_negation, # <<<<<<<<<<<<<<
+ * EXPR.LinearExpression : _collect_linear,
+ * EXPR.InequalityExpression : _collect_comparison,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 757, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_NegationExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 757, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_negation); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 757, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":758
+ * EXPR.AbsExpression : _collect_nonl,
+ * EXPR.NegationExpression : _collect_negation,
+ * EXPR.LinearExpression : _collect_linear, # <<<<<<<<<<<<<<
+ * EXPR.InequalityExpression : _collect_comparison,
+ * EXPR.RangedExpression : _collect_comparison,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 758, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_LinearExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 758, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_linear); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 758, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":759
+ * EXPR.NegationExpression : _collect_negation,
+ * EXPR.LinearExpression : _collect_linear,
+ * EXPR.InequalityExpression : _collect_comparison, # <<<<<<<<<<<<<<
+ * EXPR.RangedExpression : _collect_comparison,
+ * EXPR.EqualityExpression : _collect_comparison,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 759, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_InequalityExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 759, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_comparison); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 759, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":760
+ * EXPR.LinearExpression : _collect_linear,
+ * EXPR.InequalityExpression : _collect_comparison,
+ * EXPR.RangedExpression : _collect_comparison, # <<<<<<<<<<<<<<
+ * EXPR.EqualityExpression : _collect_comparison,
+ * EXPR.ExternalFunctionExpression : _collect_external_fn,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 760, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_RangedExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 760, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_comparison); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 760, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":761
+ * EXPR.InequalityExpression : _collect_comparison,
+ * EXPR.RangedExpression : _collect_comparison,
+ * EXPR.EqualityExpression : _collect_comparison, # <<<<<<<<<<<<<<
+ * EXPR.ExternalFunctionExpression : _collect_external_fn,
+ * #EXPR.LinearViewSumExpression : _collect_linear_sum,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 761, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_EqualityExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 761, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_comparison); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 761, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":762
+ * EXPR.RangedExpression : _collect_comparison,
+ * EXPR.EqualityExpression : _collect_comparison,
+ * EXPR.ExternalFunctionExpression : _collect_external_fn, # <<<<<<<<<<<<<<
+ * #EXPR.LinearViewSumExpression : _collect_linear_sum,
+ * #_ConnectorData : _collect_linear_connector,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_EXPR); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 762, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_ExternalFunctionExpression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 762, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_external_fn); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 762, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":770
+ * #param.Param : _collect_linear_const,
+ * #parameter : _collect_linear_const,
+ * _GeneralVarData : _collect_var, # <<<<<<<<<<<<<<
+ * SimpleVar : _collect_var,
+ * Var : _collect_var,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_GeneralVarData); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 770, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_var); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 770, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_6, __pyx_t_2) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":771
+ * #parameter : _collect_linear_const,
+ * _GeneralVarData : _collect_var,
+ * SimpleVar : _collect_var, # <<<<<<<<<<<<<<
+ * Var : _collect_var,
+ * variable : _collect_var,
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_SimpleVar); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 771, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_var); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 771, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":772
+ * _GeneralVarData : _collect_var,
+ * SimpleVar : _collect_var,
+ * Var : _collect_var, # <<<<<<<<<<<<<<
+ * variable : _collect_var,
+ * IVariable : _collect_var,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Var); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 772, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_var); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 772, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_6, __pyx_t_2) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":773
+ * SimpleVar : _collect_var,
+ * Var : _collect_var,
+ * variable : _collect_var, # <<<<<<<<<<<<<<
+ * IVariable : _collect_var,
+ * _GeneralExpressionData : _collect_identity,
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_variable); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 773, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_var); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 773, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":774
+ * Var : _collect_var,
+ * variable : _collect_var,
+ * IVariable : _collect_var, # <<<<<<<<<<<<<<
+ * _GeneralExpressionData : _collect_identity,
+ * SimpleExpression : _collect_identity,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_IVariable); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 774, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_var); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 774, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_6, __pyx_t_2) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":775
+ * variable : _collect_var,
+ * IVariable : _collect_var,
+ * _GeneralExpressionData : _collect_identity, # <<<<<<<<<<<<<<
+ * SimpleExpression : _collect_identity,
+ * expression : _collect_identity,
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_GeneralExpressionData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 775, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_identity); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 775, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":776
+ * IVariable : _collect_var,
+ * _GeneralExpressionData : _collect_identity,
+ * SimpleExpression : _collect_identity, # <<<<<<<<<<<<<<
+ * expression : _collect_identity,
+ * noclone : _collect_identity,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_SimpleExpression); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 776, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_identity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 776, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_6, __pyx_t_2) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":777
+ * _GeneralExpressionData : _collect_identity,
+ * SimpleExpression : _collect_identity,
+ * expression : _collect_identity, # <<<<<<<<<<<<<<
+ * noclone : _collect_identity,
+ * _ExpressionData : _collect_identity,
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_expression); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_identity); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 777, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":778
+ * SimpleExpression : _collect_identity,
+ * expression : _collect_identity,
+ * noclone : _collect_identity, # <<<<<<<<<<<<<<
+ * _ExpressionData : _collect_identity,
+ * Expression : _collect_identity,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_noclone); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 778, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_identity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 778, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_6, __pyx_t_2) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":779
+ * expression : _collect_identity,
+ * noclone : _collect_identity,
+ * _ExpressionData : _collect_identity, # <<<<<<<<<<<<<<
+ * Expression : _collect_identity,
+ * _GeneralObjectiveData : _collect_identity,
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_ExpressionData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 779, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_identity); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 779, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":780
+ * noclone : _collect_identity,
+ * _ExpressionData : _collect_identity,
+ * Expression : _collect_identity, # <<<<<<<<<<<<<<
+ * _GeneralObjectiveData : _collect_identity,
+ * SimpleObjective : _collect_identity,
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_Expression); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 780, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_identity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 780, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_6, __pyx_t_2) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":781
+ * _ExpressionData : _collect_identity,
+ * Expression : _collect_identity,
+ * _GeneralObjectiveData : _collect_identity, # <<<<<<<<<<<<<<
+ * SimpleObjective : _collect_identity,
+ * objective : _collect_identity,
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_GeneralObjectiveData); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 781, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_identity); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 781, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":782
+ * Expression : _collect_identity,
+ * _GeneralObjectiveData : _collect_identity,
+ * SimpleObjective : _collect_identity, # <<<<<<<<<<<<<<
+ * objective : _collect_identity,
+ * }
+ */
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_SimpleObjective); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 782, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_identity); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 782, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_6, __pyx_t_2) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":783
+ * _GeneralObjectiveData : _collect_identity,
+ * SimpleObjective : _collect_identity,
+ * objective : _collect_identity, # <<<<<<<<<<<<<<
+ * }
+ *
+ */
+ __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_objective); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_2);
+ __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_collect_identity); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 783, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_6);
+ if (PyDict_SetItem(__pyx_t_1, __pyx_t_2, __pyx_t_6) < 0) __PYX_ERR(0, 750, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
+ __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_repn_collectors, __pyx_t_1) < 0) __PYX_ERR(0, 749, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":787
+ *
+ *
+ * def _collect_standard_repn(exp, multiplier, idMap, # <<<<<<<<<<<<<<
+ * compute_values, verbose, quadratic):
+ * try:
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_31_collect_standard_repn, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 787, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_collect_standard_repn, __pyx_t_1) < 0) __PYX_ERR(0, 787, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":802
+ * raise ValueError( "Unexpected expression (type %s)" % type(exp).__name__)
+ *
+ * def _generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None): # <<<<<<<<<<<<<<
+ * #
+ * # Call recursive logic
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_33_generate_standard_repn, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 802, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_generate_standard_repn_2, __pyx_t_1) < 0) __PYX_ERR(0, 802, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":859
+ *
+ *
+ * def preprocess_block_objectives(block, idMap=None): # <<<<<<<<<<<<<<
+ *
+ * # Get/Create the ComponentMap for the repn
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_35preprocess_block_objectives, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 859, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_preprocess_block_objectives, __pyx_t_1) < 0) __PYX_ERR(0, 859, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":885
+ * block_repn[objective_data] = repn
+ *
+ * def preprocess_block_constraints(block, idMap=None): # <<<<<<<<<<<<<<
+ *
+ * # Get/Create the ComponentMap for the repn
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_37preprocess_block_constraints, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 885, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_preprocess_block_constraints, __pyx_t_1) < 0) __PYX_ERR(0, 885, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":901
+ * block_repn=block_repn)
+ *
+ * def preprocess_constraint(block, # <<<<<<<<<<<<<<
+ * constraint,
+ * idMap=None,
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_39preprocess_constraint, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 901, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_preprocess_constraint, __pyx_t_1) < 0) __PYX_ERR(0, 901, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":938
+ * block_repn[constraint_data] = repn
+ *
+ * def preprocess_constraint_data(block, # <<<<<<<<<<<<<<
+ * constraint_data,
+ * idMap=None,
+ */
+ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5pyomo_4repn_13standard_repn_41preprocess_constraint_data, NULL, __pyx_n_s_pyomo_repn_standard_repn); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 938, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_preprocess_constraint_data, __pyx_t_1) < 0) __PYX_ERR(0, 938, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /* "pyomo/repn/standard_repn.pyx":1
+ * # ___________________________________________________________________________ # <<<<<<<<<<<<<<
+ * #
+ * # Pyomo: Python Optimization Modeling Objects
+ */
+ __pyx_t_1 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
+ __Pyx_GOTREF(__pyx_t_1);
+ if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
+ __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
+
+ /*--- Wrapped vars code ---*/
+
+ goto __pyx_L0;
+ __pyx_L1_error:;
+ __Pyx_XDECREF(__pyx_t_1);
+ __Pyx_XDECREF(__pyx_t_2);
+ __Pyx_XDECREF(__pyx_t_6);
+ if (__pyx_m) {
+ if (__pyx_d) {
+ __Pyx_AddTraceback("init pyomo.repn.standard_repn", 0, __pyx_lineno, __pyx_filename);
+ }
+ Py_DECREF(__pyx_m); __pyx_m = 0;
+ } else if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_ImportError, "init pyomo.repn.standard_repn");
+ }
+ __pyx_L0:;
+ __Pyx_RefNannyFinishContext();
+ #if CYTHON_PEP489_MULTI_PHASE_INIT
+ return (__pyx_m != NULL) ? 0 : -1;
+ #elif PY_MAJOR_VERSION >= 3
+ return __pyx_m;
+ #else
+ return;
+ #endif
+}
+
+/* --- Runtime support code --- */
+/* Refnanny */
+#if CYTHON_REFNANNY
+static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
+ PyObject *m = NULL, *p = NULL;
+ void *r = NULL;
+ m = PyImport_ImportModule((char *)modname);
+ if (!m) goto end;
+ p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
+ if (!p) goto end;
+ r = PyLong_AsVoidPtr(p);
+end:
+ Py_XDECREF(p);
+ Py_XDECREF(m);
+ return (__Pyx_RefNannyAPIStruct *)r;
+}
+#endif
+
+/* GetBuiltinName */
+static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
+ PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
+ if (unlikely(!result)) {
+ PyErr_Format(PyExc_NameError,
+#if PY_MAJOR_VERSION >= 3
+ "name '%U' is not defined", name);
+#else
+ "name '%.200s' is not defined", PyString_AS_STRING(name));
+#endif
+ }
+ return result;
+}
+
+/* RaiseArgTupleInvalid */
+static void __Pyx_RaiseArgtupleInvalid(
+ const char* func_name,
+ int exact,
+ Py_ssize_t num_min,
+ Py_ssize_t num_max,
+ Py_ssize_t num_found)
+{
+ Py_ssize_t num_expected;
+ const char *more_or_less;
+ if (num_found < num_min) {
+ num_expected = num_min;
+ more_or_less = "at least";
+ } else {
+ num_expected = num_max;
+ more_or_less = "at most";
+ }
+ if (exact) {
+ more_or_less = "exactly";
+ }
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
+ func_name, more_or_less, num_expected,
+ (num_expected == 1) ? "" : "s", num_found);
+}
+
+/* RaiseDoubleKeywords */
+static void __Pyx_RaiseDoubleKeywordsError(
+ const char* func_name,
+ PyObject* kw_name)
+{
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION >= 3
+ "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
+ #else
+ "%s() got multiple values for keyword argument '%s'", func_name,
+ PyString_AsString(kw_name));
+ #endif
+}
+
+/* ParseKeywords */
+static int __Pyx_ParseOptionalKeywords(
+ PyObject *kwds,
+ PyObject **argnames[],
+ PyObject *kwds2,
+ PyObject *values[],
+ Py_ssize_t num_pos_args,
+ const char* function_name)
+{
+ PyObject *key = 0, *value = 0;
+ Py_ssize_t pos = 0;
+ PyObject*** name;
+ PyObject*** first_kw_arg = argnames + num_pos_args;
+ while (PyDict_Next(kwds, &pos, &key, &value)) {
+ name = first_kw_arg;
+ while (*name && (**name != key)) name++;
+ if (*name) {
+ values[name-argnames] = value;
+ continue;
+ }
+ name = first_kw_arg;
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
+ while (*name) {
+ if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
+ && _PyString_Eq(**name, key)) {
+ values[name-argnames] = value;
+ break;
+ }
+ name++;
+ }
+ if (*name) continue;
+ else {
+ PyObject*** argname = argnames;
+ while (argname != first_kw_arg) {
+ if ((**argname == key) || (
+ (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
+ && _PyString_Eq(**argname, key))) {
+ goto arg_passed_twice;
+ }
+ argname++;
+ }
+ }
+ } else
+ #endif
+ if (likely(PyUnicode_Check(key))) {
+ while (*name) {
+ int cmp = (**name == key) ? 0 :
+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+ (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
+ #endif
+ PyUnicode_Compare(**name, key);
+ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+ if (cmp == 0) {
+ values[name-argnames] = value;
+ break;
+ }
+ name++;
+ }
+ if (*name) continue;
+ else {
+ PyObject*** argname = argnames;
+ while (argname != first_kw_arg) {
+ int cmp = (**argname == key) ? 0 :
+ #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
+ (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
+ #endif
+ PyUnicode_Compare(**argname, key);
+ if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
+ if (cmp == 0) goto arg_passed_twice;
+ argname++;
+ }
+ }
+ } else
+ goto invalid_keyword_type;
+ if (kwds2) {
+ if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
+ } else {
+ goto invalid_keyword;
+ }
+ }
+ return 0;
+arg_passed_twice:
+ __Pyx_RaiseDoubleKeywordsError(function_name, key);
+ goto bad;
+invalid_keyword_type:
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() keywords must be strings", function_name);
+ goto bad;
+invalid_keyword:
+ PyErr_Format(PyExc_TypeError,
+ #if PY_MAJOR_VERSION < 3
+ "%.200s() got an unexpected keyword argument '%.200s'",
+ function_name, PyString_AsString(key));
+ #else
+ "%s() got an unexpected keyword argument '%U'",
+ function_name, key);
+ #endif
+bad:
+ return -1;
+}
+
+/* GetModuleGlobalName */
+static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) {
+ PyObject *result;
+#if !CYTHON_AVOID_BORROWED_REFS
+ result = PyDict_GetItem(__pyx_d, name);
+ if (likely(result)) {
+ Py_INCREF(result);
+ } else {
+#else
+ result = PyObject_GetItem(__pyx_d, name);
+ if (!result) {
+ PyErr_Clear();
+#endif
+ result = __Pyx_GetBuiltinName(name);
+ }
+ return result;
+}
+
+/* PyCFunctionFastCall */
+ #if CYTHON_FAST_PYCCALL
+static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, PyObject **args, Py_ssize_t nargs) {
+ PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
+ PyCFunction meth = PyCFunction_GET_FUNCTION(func);
+ PyObject *self = PyCFunction_GET_SELF(func);
+ int flags = PyCFunction_GET_FLAGS(func);
+ assert(PyCFunction_Check(func));
+ assert(METH_FASTCALL == (flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_KEYWORDS)));
+ assert(nargs >= 0);
+ assert(nargs == 0 || args != NULL);
+ /* _PyCFunction_FastCallDict() must not be called with an exception set,
+ because it may clear it (directly or indirectly) and so the
+ caller loses its exception */
+ assert(!PyErr_Occurred());
+ if ((PY_VERSION_HEX < 0x030700A0) || unlikely(flags & METH_KEYWORDS)) {
+ return (*((__Pyx_PyCFunctionFastWithKeywords)meth)) (self, args, nargs, NULL);
+ } else {
+ return (*((__Pyx_PyCFunctionFast)meth)) (self, args, nargs);
+ }
+}
+#endif
+
+/* PyFunctionFastCall */
+ #if CYTHON_FAST_PYCALL
+#include "frameobject.h"
+static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
+ PyObject *globals) {
+ PyFrameObject *f;
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ PyObject **fastlocals;
+ Py_ssize_t i;
+ PyObject *result;
+ assert(globals != NULL);
+ /* XXX Perhaps we should create a specialized
+ PyFrame_New() that doesn't take locals, but does
+ take builtins without sanity checking them.
+ */
+ assert(tstate != NULL);
+ f = PyFrame_New(tstate, co, globals, NULL);
+ if (f == NULL) {
+ return NULL;
+ }
+ fastlocals = f->f_localsplus;
+ for (i = 0; i < na; i++) {
+ Py_INCREF(*args);
+ fastlocals[i] = *args++;
+ }
+ result = PyEval_EvalFrameEx(f,0);
+ ++tstate->recursion_depth;
+ Py_DECREF(f);
+ --tstate->recursion_depth;
+ return result;
+}
+#if 1 || PY_VERSION_HEX < 0x030600B1
+static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, int nargs, PyObject *kwargs) {
+ PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
+ PyObject *globals = PyFunction_GET_GLOBALS(func);
+ PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
+ PyObject *closure;
+#if PY_MAJOR_VERSION >= 3
+ PyObject *kwdefs;
+#endif
+ PyObject *kwtuple, **k;
+ PyObject **d;
+ Py_ssize_t nd;
+ Py_ssize_t nk;
+ PyObject *result;
+ assert(kwargs == NULL || PyDict_Check(kwargs));
+ nk = kwargs ? PyDict_Size(kwargs) : 0;
+ if (Py_EnterRecursiveCall((char*)" while calling a Python object")) {
+ return NULL;
+ }
+ if (
+#if PY_MAJOR_VERSION >= 3
+ co->co_kwonlyargcount == 0 &&
+#endif
+ likely(kwargs == NULL || nk == 0) &&
+ co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
+ if (argdefs == NULL && co->co_argcount == nargs) {
+ result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
+ goto done;
+ }
+ else if (nargs == 0 && argdefs != NULL
+ && co->co_argcount == Py_SIZE(argdefs)) {
+ /* function called with no arguments, but all parameters have
+ a default value: use default values as arguments .*/
+ args = &PyTuple_GET_ITEM(argdefs, 0);
+ result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
+ goto done;
+ }
+ }
+ if (kwargs != NULL) {
+ Py_ssize_t pos, i;
+ kwtuple = PyTuple_New(2 * nk);
+ if (kwtuple == NULL) {
+ result = NULL;
+ goto done;
+ }
+ k = &PyTuple_GET_ITEM(kwtuple, 0);
+ pos = i = 0;
+ while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
+ Py_INCREF(k[i]);
+ Py_INCREF(k[i+1]);
+ i += 2;
+ }
+ nk = i / 2;
+ }
+ else {
+ kwtuple = NULL;
+ k = NULL;
+ }
+ closure = PyFunction_GET_CLOSURE(func);
+#if PY_MAJOR_VERSION >= 3
+ kwdefs = PyFunction_GET_KW_DEFAULTS(func);
+#endif
+ if (argdefs != NULL) {
+ d = &PyTuple_GET_ITEM(argdefs, 0);
+ nd = Py_SIZE(argdefs);
+ }
+ else {
+ d = NULL;
+ nd = 0;
+ }
+#if PY_MAJOR_VERSION >= 3
+ result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
+ args, nargs,
+ k, (int)nk,
+ d, (int)nd, kwdefs, closure);
+#else
+ result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
+ args, nargs,
+ k, (int)nk,
+ d, (int)nd, closure);
+#endif
+ Py_XDECREF(kwtuple);
+done:
+ Py_LeaveRecursiveCall();
+ return result;
+}
+#endif
+#endif
+
+/* PyObjectCall */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+ PyObject *result;
+ ternaryfunc call = func->ob_type->tp_call;
+ if (unlikely(!call))
+ return PyObject_Call(func, arg, kw);
+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+ return NULL;
+ result = (*call)(func, arg, kw);
+ Py_LeaveRecursiveCall();
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+ PyErr_SetString(
+ PyExc_SystemError,
+ "NULL result without error in PyObject_Call");
+ }
+ return result;
+}
+#endif
+
+/* PyObjectCallMethO */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
+ PyObject *self, *result;
+ PyCFunction cfunc;
+ cfunc = PyCFunction_GET_FUNCTION(func);
+ self = PyCFunction_GET_SELF(func);
+ if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
+ return NULL;
+ result = cfunc(self, arg);
+ Py_LeaveRecursiveCall();
+ if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
+ PyErr_SetString(
+ PyExc_SystemError,
+ "NULL result without error in PyObject_Call");
+ }
+ return result;
+}
+#endif
+
+/* PyObjectCallOneArg */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+ PyObject *result;
+ PyObject *args = PyTuple_New(1);
+ if (unlikely(!args)) return NULL;
+ Py_INCREF(arg);
+ PyTuple_SET_ITEM(args, 0, arg);
+ result = __Pyx_PyObject_Call(func, args, NULL);
+ Py_DECREF(args);
+ return result;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+#if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(func)) {
+ return __Pyx_PyFunction_FastCall(func, &arg, 1);
+ }
+#endif
+ if (likely(PyCFunction_Check(func))) {
+ if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
+ return __Pyx_PyObject_CallMethO(func, arg);
+#if CYTHON_FAST_PYCCALL
+ } else if (PyCFunction_GET_FLAGS(func) & METH_FASTCALL) {
+ return __Pyx_PyCFunction_FastCall(func, &arg, 1);
+#endif
+ }
+ }
+ return __Pyx__PyObject_CallOneArg(func, arg);
+}
+#else
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
+ PyObject *result;
+ PyObject *args = PyTuple_Pack(1, arg);
+ if (unlikely(!args)) return NULL;
+ result = __Pyx_PyObject_Call(func, args, NULL);
+ Py_DECREF(args);
+ return result;
+}
+#endif
+
+/* PyObjectCallNoArg */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
+#if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(func)) {
+ return __Pyx_PyFunction_FastCall(func, NULL, 0);
+ }
+#endif
+#ifdef __Pyx_CyFunction_USED
+ if (likely(PyCFunction_Check(func) || __Pyx_TypeCheck(func, __pyx_CyFunctionType))) {
+#else
+ if (likely(PyCFunction_Check(func))) {
+#endif
+ if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
+ return __Pyx_PyObject_CallMethO(func, NULL);
+ }
+ }
+ return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
+}
+#endif
+
+/* RaiseTooManyValuesToUnpack */
+ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
+ PyErr_Format(PyExc_ValueError,
+ "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
+}
+
+/* RaiseNeedMoreValuesToUnpack */
+ static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
+ PyErr_Format(PyExc_ValueError,
+ "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
+ index, (index == 1) ? "" : "s");
+}
+
+/* IterFinish */
+ static CYTHON_INLINE int __Pyx_IterFinish(void) {
+#if CYTHON_FAST_THREAD_STATE
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ PyObject* exc_type = tstate->curexc_type;
+ if (unlikely(exc_type)) {
+ if (likely(__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) {
+ PyObject *exc_value, *exc_tb;
+ exc_value = tstate->curexc_value;
+ exc_tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+ Py_DECREF(exc_type);
+ Py_XDECREF(exc_value);
+ Py_XDECREF(exc_tb);
+ return 0;
+ } else {
+ return -1;
+ }
+ }
+ return 0;
+#else
+ if (unlikely(PyErr_Occurred())) {
+ if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
+ PyErr_Clear();
+ return 0;
+ } else {
+ return -1;
+ }
+ }
+ return 0;
+#endif
+}
+
+/* UnpackItemEndCheck */
+ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
+ if (unlikely(retval)) {
+ Py_DECREF(retval);
+ __Pyx_RaiseTooManyValuesError(expected);
+ return -1;
+ } else {
+ return __Pyx_IterFinish();
+ }
+ return 0;
+}
+
+/* GetItemInt */
+ static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
+ PyObject *r;
+ if (!j) return NULL;
+ r = PyObject_GetItem(o, j);
+ Py_DECREF(j);
+ return r;
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ Py_ssize_t wrapped_i = i;
+ if (wraparound & unlikely(i < 0)) {
+ wrapped_i += PyList_GET_SIZE(o);
+ }
+ if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyList_GET_SIZE(o)))) {
+ PyObject *r = PyList_GET_ITEM(o, wrapped_i);
+ Py_INCREF(r);
+ return r;
+ }
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+ return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ Py_ssize_t wrapped_i = i;
+ if (wraparound & unlikely(i < 0)) {
+ wrapped_i += PyTuple_GET_SIZE(o);
+ }
+ if ((!boundscheck) || likely((0 <= wrapped_i) & (wrapped_i < PyTuple_GET_SIZE(o)))) {
+ PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
+ Py_INCREF(r);
+ return r;
+ }
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+#else
+ return PySequence_GetItem(o, i);
+#endif
+}
+static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
+ CYTHON_NCP_UNUSED int wraparound,
+ CYTHON_NCP_UNUSED int boundscheck) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
+ if (is_list || PyList_CheckExact(o)) {
+ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
+ if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
+ PyObject *r = PyList_GET_ITEM(o, n);
+ Py_INCREF(r);
+ return r;
+ }
+ }
+ else if (PyTuple_CheckExact(o)) {
+ Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
+ if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
+ PyObject *r = PyTuple_GET_ITEM(o, n);
+ Py_INCREF(r);
+ return r;
+ }
+ } else {
+ PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
+ if (likely(m && m->sq_item)) {
+ if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
+ Py_ssize_t l = m->sq_length(o);
+ if (likely(l >= 0)) {
+ i += l;
+ } else {
+ if (!PyErr_ExceptionMatches(PyExc_OverflowError))
+ return NULL;
+ PyErr_Clear();
+ }
+ }
+ return m->sq_item(o, i);
+ }
+ }
+#else
+ if (is_list || PySequence_Check(o)) {
+ return PySequence_GetItem(o, i);
+ }
+#endif
+ return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
+}
+
+/* SaveResetException */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ #if PY_VERSION_HEX >= 0x030700A2
+ *type = tstate->exc_state.exc_type;
+ *value = tstate->exc_state.exc_value;
+ *tb = tstate->exc_state.exc_traceback;
+ #else
+ *type = tstate->exc_type;
+ *value = tstate->exc_value;
+ *tb = tstate->exc_traceback;
+ #endif
+ Py_XINCREF(*type);
+ Py_XINCREF(*value);
+ Py_XINCREF(*tb);
+}
+static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ #if PY_VERSION_HEX >= 0x030700A2
+ tmp_type = tstate->exc_state.exc_type;
+ tmp_value = tstate->exc_state.exc_value;
+ tmp_tb = tstate->exc_state.exc_traceback;
+ tstate->exc_state.exc_type = type;
+ tstate->exc_state.exc_value = value;
+ tstate->exc_state.exc_traceback = tb;
+ #else
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = type;
+ tstate->exc_value = value;
+ tstate->exc_traceback = tb;
+ #endif
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+}
+#endif
+
+/* PyErrExceptionMatches */
+ #if CYTHON_FAST_THREAD_STATE
+static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
+ Py_ssize_t i, n;
+ n = PyTuple_GET_SIZE(tuple);
+#if PY_MAJOR_VERSION >= 3
+ for (i=0; icurexc_type;
+ if (exc_type == err) return 1;
+ if (unlikely(!exc_type)) return 0;
+ if (unlikely(PyTuple_Check(err)))
+ return __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
+ return __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
+}
+#endif
+
+/* GetException */
+ #if CYTHON_FAST_THREAD_STATE
+static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+#else
+static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
+#endif
+ PyObject *local_type, *local_value, *local_tb;
+#if CYTHON_FAST_THREAD_STATE
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ local_type = tstate->curexc_type;
+ local_value = tstate->curexc_value;
+ local_tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+#else
+ PyErr_Fetch(&local_type, &local_value, &local_tb);
+#endif
+ PyErr_NormalizeException(&local_type, &local_value, &local_tb);
+#if CYTHON_FAST_THREAD_STATE
+ if (unlikely(tstate->curexc_type))
+#else
+ if (unlikely(PyErr_Occurred()))
+#endif
+ goto bad;
+ #if PY_MAJOR_VERSION >= 3
+ if (local_tb) {
+ if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
+ goto bad;
+ }
+ #endif
+ Py_XINCREF(local_tb);
+ Py_XINCREF(local_type);
+ Py_XINCREF(local_value);
+ *type = local_type;
+ *value = local_value;
+ *tb = local_tb;
+#if CYTHON_FAST_THREAD_STATE
+ #if PY_VERSION_HEX >= 0x030700A2
+ tmp_type = tstate->exc_state.exc_type;
+ tmp_value = tstate->exc_state.exc_value;
+ tmp_tb = tstate->exc_state.exc_traceback;
+ tstate->exc_state.exc_type = local_type;
+ tstate->exc_state.exc_value = local_value;
+ tstate->exc_state.exc_traceback = local_tb;
+ #else
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = local_type;
+ tstate->exc_value = local_value;
+ tstate->exc_traceback = local_tb;
+ #endif
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+#else
+ PyErr_SetExcInfo(local_type, local_value, local_tb);
+#endif
+ return 0;
+bad:
+ *type = 0;
+ *value = 0;
+ *tb = 0;
+ Py_XDECREF(local_type);
+ Py_XDECREF(local_value);
+ Py_XDECREF(local_tb);
+ return -1;
+}
+
+/* PyIntBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ const long b = intval;
+ long x;
+ long a = PyInt_AS_LONG(op1);
+ x = (long)((unsigned long)a + b);
+ if (likely((x^a) >= 0 || (x^b) >= 0))
+ return PyInt_FromLong(x);
+ return PyLong_Type.tp_as_number->nb_add(op1, op2);
+ }
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+ if (likely(PyLong_CheckExact(op1))) {
+ const long b = intval;
+ long a, x;
+#ifdef HAVE_LONG_LONG
+ const PY_LONG_LONG llb = intval;
+ PY_LONG_LONG lla, llx;
+#endif
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ a = likely(size) ? digits[0] : 0;
+ if (size == -1) a = -a;
+ } else {
+ switch (size) {
+ case -2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case -4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = -(PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ case 4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+#ifdef HAVE_LONG_LONG
+ } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
+ lla = (PY_LONG_LONG) (((((((((unsigned PY_LONG_LONG)digits[3]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[2]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
+ goto long_long;
+#endif
+ }
+ default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
+ }
+ }
+ x = a + b;
+ return PyLong_FromLong(x);
+#ifdef HAVE_LONG_LONG
+ long_long:
+ llx = lla + llb;
+ return PyLong_FromLongLong(llx);
+#endif
+
+
+ }
+ #endif
+ if (PyFloat_CheckExact(op1)) {
+ const long b = intval;
+ double a = PyFloat_AS_DOUBLE(op1);
+ double result;
+ PyFPE_START_PROTECT("add", return NULL)
+ result = ((double)a) + (double)b;
+ PyFPE_END_PROTECT(result)
+ return PyFloat_FromDouble(result);
+ }
+ return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
+}
+#endif
+
+/* None */
+ static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) {
+ PyErr_Format(PyExc_NameError, "free variable '%s' referenced before assignment in enclosing scope", varname);
+}
+
+/* UnpackUnboundCMethod */
+ static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
+ PyObject *method;
+ method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
+ if (unlikely(!method))
+ return -1;
+ target->method = method;
+#if CYTHON_COMPILING_IN_CPYTHON
+ #if PY_MAJOR_VERSION >= 3
+ if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
+ #endif
+ {
+ PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
+ target->func = descr->d_method->ml_meth;
+ target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST);
+ }
+#endif
+ return 0;
+}
+
+/* CallUnboundCMethod0 */
+ static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
+ PyObject *args, *result = NULL;
+ if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
+#if CYTHON_ASSUME_SAFE_MACROS
+ args = PyTuple_New(1);
+ if (unlikely(!args)) goto bad;
+ Py_INCREF(self);
+ PyTuple_SET_ITEM(args, 0, self);
+#else
+ args = PyTuple_Pack(1, self);
+ if (unlikely(!args)) goto bad;
+#endif
+ result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
+ Py_DECREF(args);
+bad:
+ return result;
+}
+
+/* py_dict_keys */
+ static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) {
+ if (PY_MAJOR_VERSION >= 3)
+ return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_keys, d);
+ else
+ return PyDict_Keys(d);
+}
+
+/* PyErrFetchRestore */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ tmp_type = tstate->curexc_type;
+ tmp_value = tstate->curexc_value;
+ tmp_tb = tstate->curexc_traceback;
+ tstate->curexc_type = type;
+ tstate->curexc_value = value;
+ tstate->curexc_traceback = tb;
+ Py_XDECREF(tmp_type);
+ Py_XDECREF(tmp_value);
+ Py_XDECREF(tmp_tb);
+}
+static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ *type = tstate->curexc_type;
+ *value = tstate->curexc_value;
+ *tb = tstate->curexc_traceback;
+ tstate->curexc_type = 0;
+ tstate->curexc_value = 0;
+ tstate->curexc_traceback = 0;
+}
+#endif
+
+/* RaiseException */
+ #if PY_MAJOR_VERSION < 3
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
+ CYTHON_UNUSED PyObject *cause) {
+ __Pyx_PyThreadState_declare
+ Py_XINCREF(type);
+ if (!value || value == Py_None)
+ value = NULL;
+ else
+ Py_INCREF(value);
+ if (!tb || tb == Py_None)
+ tb = NULL;
+ else {
+ Py_INCREF(tb);
+ if (!PyTraceBack_Check(tb)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: arg 3 must be a traceback or None");
+ goto raise_error;
+ }
+ }
+ if (PyType_Check(type)) {
+#if CYTHON_COMPILING_IN_PYPY
+ if (!value) {
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+#endif
+ PyErr_NormalizeException(&type, &value, &tb);
+ } else {
+ if (value) {
+ PyErr_SetString(PyExc_TypeError,
+ "instance exception may not have a separate value");
+ goto raise_error;
+ }
+ value = type;
+ type = (PyObject*) Py_TYPE(type);
+ Py_INCREF(type);
+ if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: exception class must be a subclass of BaseException");
+ goto raise_error;
+ }
+ }
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrRestore(type, value, tb);
+ return;
+raise_error:
+ Py_XDECREF(value);
+ Py_XDECREF(type);
+ Py_XDECREF(tb);
+ return;
+}
+#else
+static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
+ PyObject* owned_instance = NULL;
+ if (tb == Py_None) {
+ tb = 0;
+ } else if (tb && !PyTraceBack_Check(tb)) {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: arg 3 must be a traceback or None");
+ goto bad;
+ }
+ if (value == Py_None)
+ value = 0;
+ if (PyExceptionInstance_Check(type)) {
+ if (value) {
+ PyErr_SetString(PyExc_TypeError,
+ "instance exception may not have a separate value");
+ goto bad;
+ }
+ value = type;
+ type = (PyObject*) Py_TYPE(value);
+ } else if (PyExceptionClass_Check(type)) {
+ PyObject *instance_class = NULL;
+ if (value && PyExceptionInstance_Check(value)) {
+ instance_class = (PyObject*) Py_TYPE(value);
+ if (instance_class != type) {
+ int is_subclass = PyObject_IsSubclass(instance_class, type);
+ if (!is_subclass) {
+ instance_class = NULL;
+ } else if (unlikely(is_subclass == -1)) {
+ goto bad;
+ } else {
+ type = instance_class;
+ }
+ }
+ }
+ if (!instance_class) {
+ PyObject *args;
+ if (!value)
+ args = PyTuple_New(0);
+ else if (PyTuple_Check(value)) {
+ Py_INCREF(value);
+ args = value;
+ } else
+ args = PyTuple_Pack(1, value);
+ if (!args)
+ goto bad;
+ owned_instance = PyObject_Call(type, args, NULL);
+ Py_DECREF(args);
+ if (!owned_instance)
+ goto bad;
+ value = owned_instance;
+ if (!PyExceptionInstance_Check(value)) {
+ PyErr_Format(PyExc_TypeError,
+ "calling %R should have returned an instance of "
+ "BaseException, not %R",
+ type, Py_TYPE(value));
+ goto bad;
+ }
+ }
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "raise: exception class must be a subclass of BaseException");
+ goto bad;
+ }
+ if (cause) {
+ PyObject *fixed_cause;
+ if (cause == Py_None) {
+ fixed_cause = NULL;
+ } else if (PyExceptionClass_Check(cause)) {
+ fixed_cause = PyObject_CallObject(cause, NULL);
+ if (fixed_cause == NULL)
+ goto bad;
+ } else if (PyExceptionInstance_Check(cause)) {
+ fixed_cause = cause;
+ Py_INCREF(fixed_cause);
+ } else {
+ PyErr_SetString(PyExc_TypeError,
+ "exception causes must derive from "
+ "BaseException");
+ goto bad;
+ }
+ PyException_SetCause(value, fixed_cause);
+ }
+ PyErr_SetObject(type, value);
+ if (tb) {
+#if CYTHON_COMPILING_IN_PYPY
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
+ Py_INCREF(tb);
+ PyErr_Restore(tmp_type, tmp_value, tb);
+ Py_XDECREF(tmp_tb);
+#else
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ PyObject* tmp_tb = tstate->curexc_traceback;
+ if (tb != tmp_tb) {
+ Py_INCREF(tb);
+ tstate->curexc_traceback = tb;
+ Py_XDECREF(tmp_tb);
+ }
+#endif
+ }
+bad:
+ Py_XDECREF(owned_instance);
+ return;
+}
+#endif
+
+/* PyIntBinop */
+ #if !CYTHON_COMPILING_IN_PYPY
+static PyObject* __Pyx_PyInt_EqObjC(PyObject *op1, PyObject *op2, CYTHON_UNUSED long intval, CYTHON_UNUSED int inplace) {
+ if (op1 == op2) {
+ Py_RETURN_TRUE;
+ }
+ #if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(op1))) {
+ const long b = intval;
+ long a = PyInt_AS_LONG(op1);
+ if (a == b) {
+ Py_RETURN_TRUE;
+ } else {
+ Py_RETURN_FALSE;
+ }
+ }
+ #endif
+ #if CYTHON_USE_PYLONG_INTERNALS
+ if (likely(PyLong_CheckExact(op1))) {
+ const long b = intval;
+ long a;
+ const digit* digits = ((PyLongObject*)op1)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(op1);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ a = likely(size) ? digits[0] : 0;
+ if (size == -1) a = -a;
+ } else {
+ switch (size) {
+ case -2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case 2:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case -3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case 3:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case -4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ case 4:
+ if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ a = (long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
+ break;
+ }
+ #if PyLong_SHIFT < 30 && PyLong_SHIFT != 15
+ default: return PyLong_Type.tp_richcompare(op1, op2, Py_EQ);
+ #else
+ default: Py_RETURN_FALSE;
+ #endif
+ }
+ }
+ if (a == b) {
+ Py_RETURN_TRUE;
+ } else {
+ Py_RETURN_FALSE;
+ }
+ }
+ #endif
+ if (PyFloat_CheckExact(op1)) {
+ const long b = intval;
+ double a = PyFloat_AS_DOUBLE(op1);
+ if ((double)a == (double)b) {
+ Py_RETURN_TRUE;
+ } else {
+ Py_RETURN_FALSE;
+ }
+ }
+ return PyObject_RichCompare(op1, op2, Py_EQ);
+}
+#endif
+
+/* PyObjectCallMethod1 */
+ static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
+ PyObject *result = NULL;
+#if CYTHON_UNPACK_METHODS
+ if (likely(PyMethod_Check(method))) {
+ PyObject *self = PyMethod_GET_SELF(method);
+ if (likely(self)) {
+ PyObject *args;
+ PyObject *function = PyMethod_GET_FUNCTION(method);
+ #if CYTHON_FAST_PYCALL
+ if (PyFunction_Check(function)) {
+ PyObject *args[2] = {self, arg};
+ result = __Pyx_PyFunction_FastCall(function, args, 2);
+ goto done;
+ }
+ #endif
+ #if CYTHON_FAST_PYCCALL
+ if (__Pyx_PyFastCFunction_Check(function)) {
+ PyObject *args[2] = {self, arg};
+ result = __Pyx_PyCFunction_FastCall(function, args, 2);
+ goto done;
+ }
+ #endif
+ args = PyTuple_New(2);
+ if (unlikely(!args)) goto done;
+ Py_INCREF(self);
+ PyTuple_SET_ITEM(args, 0, self);
+ Py_INCREF(arg);
+ PyTuple_SET_ITEM(args, 1, arg);
+ Py_INCREF(function);
+ result = __Pyx_PyObject_Call(function, args, NULL);
+ Py_DECREF(args);
+ Py_DECREF(function);
+ return result;
+ }
+ }
+#endif
+ result = __Pyx_PyObject_CallOneArg(method, arg);
+ goto done;
+done:
+ return result;
+}
+static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
+ PyObject *method, *result = NULL;
+ method = __Pyx_PyObject_GetAttrStr(obj, method_name);
+ if (unlikely(!method)) goto done;
+ result = __Pyx__PyObject_CallMethod1(method, arg);
+done:
+ Py_XDECREF(method);
+ return result;
+}
+
+/* append */
+ static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
+ if (likely(PyList_CheckExact(L))) {
+ if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
+ } else {
+ PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
+ if (unlikely(!retval))
+ return -1;
+ Py_DECREF(retval);
+ }
+ return 0;
+}
+
+/* GetAttr */
+ static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
+#if CYTHON_USE_TYPE_SLOTS
+#if PY_MAJOR_VERSION >= 3
+ if (likely(PyUnicode_Check(n)))
+#else
+ if (likely(PyString_Check(n)))
+#endif
+ return __Pyx_PyObject_GetAttrStr(o, n);
+#endif
+ return PyObject_GetAttr(o, n);
+}
+
+/* HasAttr */
+ static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
+ PyObject *r;
+ if (unlikely(!__Pyx_PyBaseString_Check(n))) {
+ PyErr_SetString(PyExc_TypeError,
+ "hasattr(): attribute name must be string");
+ return -1;
+ }
+ r = __Pyx_GetAttr(o, n);
+ if (unlikely(!r)) {
+ PyErr_Clear();
+ return 0;
+ } else {
+ Py_DECREF(r);
+ return 1;
+ }
+}
+
+/* Import */
+ static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
+ PyObject *empty_list = 0;
+ PyObject *module = 0;
+ PyObject *global_dict = 0;
+ PyObject *empty_dict = 0;
+ PyObject *list;
+ #if PY_MAJOR_VERSION < 3
+ PyObject *py_import;
+ py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
+ if (!py_import)
+ goto bad;
+ #endif
+ if (from_list)
+ list = from_list;
+ else {
+ empty_list = PyList_New(0);
+ if (!empty_list)
+ goto bad;
+ list = empty_list;
+ }
+ global_dict = PyModule_GetDict(__pyx_m);
+ if (!global_dict)
+ goto bad;
+ empty_dict = PyDict_New();
+ if (!empty_dict)
+ goto bad;
+ {
+ #if PY_MAJOR_VERSION >= 3
+ if (level == -1) {
+ if (strchr(__Pyx_MODULE_NAME, '.')) {
+ module = PyImport_ImportModuleLevelObject(
+ name, global_dict, empty_dict, list, 1);
+ if (!module) {
+ if (!PyErr_ExceptionMatches(PyExc_ImportError))
+ goto bad;
+ PyErr_Clear();
+ }
+ }
+ level = 0;
+ }
+ #endif
+ if (!module) {
+ #if PY_MAJOR_VERSION < 3
+ PyObject *py_level = PyInt_FromLong(level);
+ if (!py_level)
+ goto bad;
+ module = PyObject_CallFunctionObjArgs(py_import,
+ name, global_dict, empty_dict, list, py_level, NULL);
+ Py_DECREF(py_level);
+ #else
+ module = PyImport_ImportModuleLevelObject(
+ name, global_dict, empty_dict, list, level);
+ #endif
+ }
+ }
+bad:
+ #if PY_MAJOR_VERSION < 3
+ Py_XDECREF(py_import);
+ #endif
+ Py_XDECREF(empty_list);
+ Py_XDECREF(empty_dict);
+ return module;
+}
+
+/* ImportFrom */
+ static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
+ PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
+ if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_Format(PyExc_ImportError,
+ #if PY_MAJOR_VERSION < 3
+ "cannot import name %.230s", PyString_AS_STRING(name));
+ #else
+ "cannot import name %S", name);
+ #endif
+ }
+ return value;
+}
+
+/* CalculateMetaclass */
+ static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
+ Py_ssize_t i, nbases = PyTuple_GET_SIZE(bases);
+ for (i=0; i < nbases; i++) {
+ PyTypeObject *tmptype;
+ PyObject *tmp = PyTuple_GET_ITEM(bases, i);
+ tmptype = Py_TYPE(tmp);
+#if PY_MAJOR_VERSION < 3
+ if (tmptype == &PyClass_Type)
+ continue;
+#endif
+ if (!metaclass) {
+ metaclass = tmptype;
+ continue;
+ }
+ if (PyType_IsSubtype(metaclass, tmptype))
+ continue;
+ if (PyType_IsSubtype(tmptype, metaclass)) {
+ metaclass = tmptype;
+ continue;
+ }
+ PyErr_SetString(PyExc_TypeError,
+ "metaclass conflict: "
+ "the metaclass of a derived class "
+ "must be a (non-strict) subclass "
+ "of the metaclasses of all its bases");
+ return NULL;
+ }
+ if (!metaclass) {
+#if PY_MAJOR_VERSION < 3
+ metaclass = &PyClass_Type;
+#else
+ metaclass = &PyType_Type;
+#endif
+ }
+ Py_INCREF((PyObject*) metaclass);
+ return (PyObject*) metaclass;
+}
+
+/* FetchCommonType */
+ static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
+ PyObject* fake_module;
+ PyTypeObject* cached_type = NULL;
+ fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
+ if (!fake_module) return NULL;
+ Py_INCREF(fake_module);
+ cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
+ if (cached_type) {
+ if (!PyType_Check((PyObject*)cached_type)) {
+ PyErr_Format(PyExc_TypeError,
+ "Shared Cython type %.200s is not a type object",
+ type->tp_name);
+ goto bad;
+ }
+ if (cached_type->tp_basicsize != type->tp_basicsize) {
+ PyErr_Format(PyExc_TypeError,
+ "Shared Cython type %.200s has the wrong size, try recompiling",
+ type->tp_name);
+ goto bad;
+ }
+ } else {
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
+ PyErr_Clear();
+ if (PyType_Ready(type) < 0) goto bad;
+ if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
+ goto bad;
+ Py_INCREF(type);
+ cached_type = type;
+ }
+done:
+ Py_DECREF(fake_module);
+ return cached_type;
+bad:
+ Py_XDECREF(cached_type);
+ cached_type = NULL;
+ goto done;
+}
+
+/* CythonFunction */
+ static PyObject *
+__Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure)
+{
+ if (unlikely(op->func_doc == NULL)) {
+ if (op->func.m_ml->ml_doc) {
+#if PY_MAJOR_VERSION >= 3
+ op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc);
+#else
+ op->func_doc = PyString_FromString(op->func.m_ml->ml_doc);
+#endif
+ if (unlikely(op->func_doc == NULL))
+ return NULL;
+ } else {
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ }
+ Py_INCREF(op->func_doc);
+ return op->func_doc;
+}
+static int
+__Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp = op->func_doc;
+ if (value == NULL) {
+ value = Py_None;
+ }
+ Py_INCREF(value);
+ op->func_doc = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op)
+{
+ if (unlikely(op->func_name == NULL)) {
+#if PY_MAJOR_VERSION >= 3
+ op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name);
+#else
+ op->func_name = PyString_InternFromString(op->func.m_ml->ml_name);
+#endif
+ if (unlikely(op->func_name == NULL))
+ return NULL;
+ }
+ Py_INCREF(op->func_name);
+ return op->func_name;
+}
+static int
+__Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+ if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+ if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+ PyErr_SetString(PyExc_TypeError,
+ "__name__ must be set to a string object");
+ return -1;
+ }
+ tmp = op->func_name;
+ Py_INCREF(value);
+ op->func_name = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op)
+{
+ Py_INCREF(op->func_qualname);
+ return op->func_qualname;
+}
+static int
+__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+ if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+ if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+ PyErr_SetString(PyExc_TypeError,
+ "__qualname__ must be set to a string object");
+ return -1;
+ }
+ tmp = op->func_qualname;
+ Py_INCREF(value);
+ op->func_qualname = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure)
+{
+ PyObject *self;
+ self = m->func_closure;
+ if (self == NULL)
+ self = Py_None;
+ Py_INCREF(self);
+ return self;
+}
+static PyObject *
+__Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op)
+{
+ if (unlikely(op->func_dict == NULL)) {
+ op->func_dict = PyDict_New();
+ if (unlikely(op->func_dict == NULL))
+ return NULL;
+ }
+ Py_INCREF(op->func_dict);
+ return op->func_dict;
+}
+static int
+__Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value)
+{
+ PyObject *tmp;
+ if (unlikely(value == NULL)) {
+ PyErr_SetString(PyExc_TypeError,
+ "function's dictionary may not be deleted");
+ return -1;
+ }
+ if (unlikely(!PyDict_Check(value))) {
+ PyErr_SetString(PyExc_TypeError,
+ "setting function's dictionary to a non-dict");
+ return -1;
+ }
+ tmp = op->func_dict;
+ Py_INCREF(value);
+ op->func_dict = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op)
+{
+ Py_INCREF(op->func_globals);
+ return op->func_globals;
+}
+static PyObject *
+__Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op)
+{
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+static PyObject *
+__Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op)
+{
+ PyObject* result = (op->func_code) ? op->func_code : Py_None;
+ Py_INCREF(result);
+ return result;
+}
+static int
+__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
+ int result = 0;
+ PyObject *res = op->defaults_getter((PyObject *) op);
+ if (unlikely(!res))
+ return -1;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
+ Py_INCREF(op->defaults_tuple);
+ op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
+ Py_INCREF(op->defaults_kwdict);
+ #else
+ op->defaults_tuple = PySequence_ITEM(res, 0);
+ if (unlikely(!op->defaults_tuple)) result = -1;
+ else {
+ op->defaults_kwdict = PySequence_ITEM(res, 1);
+ if (unlikely(!op->defaults_kwdict)) result = -1;
+ }
+ #endif
+ Py_DECREF(res);
+ return result;
+}
+static int
+__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) {
+ PyObject* tmp;
+ if (!value) {
+ value = Py_None;
+ } else if (value != Py_None && !PyTuple_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__defaults__ must be set to a tuple object");
+ return -1;
+ }
+ Py_INCREF(value);
+ tmp = op->defaults_tuple;
+ op->defaults_tuple = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) {
+ PyObject* result = op->defaults_tuple;
+ if (unlikely(!result)) {
+ if (op->defaults_getter) {
+ if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+ result = op->defaults_tuple;
+ } else {
+ result = Py_None;
+ }
+ }
+ Py_INCREF(result);
+ return result;
+}
+static int
+__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) {
+ PyObject* tmp;
+ if (!value) {
+ value = Py_None;
+ } else if (value != Py_None && !PyDict_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__kwdefaults__ must be set to a dict object");
+ return -1;
+ }
+ Py_INCREF(value);
+ tmp = op->defaults_kwdict;
+ op->defaults_kwdict = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) {
+ PyObject* result = op->defaults_kwdict;
+ if (unlikely(!result)) {
+ if (op->defaults_getter) {
+ if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL;
+ result = op->defaults_kwdict;
+ } else {
+ result = Py_None;
+ }
+ }
+ Py_INCREF(result);
+ return result;
+}
+static int
+__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) {
+ PyObject* tmp;
+ if (!value || value == Py_None) {
+ value = NULL;
+ } else if (!PyDict_Check(value)) {
+ PyErr_SetString(PyExc_TypeError,
+ "__annotations__ must be set to a dict object");
+ return -1;
+ }
+ Py_XINCREF(value);
+ tmp = op->func_annotations;
+ op->func_annotations = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) {
+ PyObject* result = op->func_annotations;
+ if (unlikely(!result)) {
+ result = PyDict_New();
+ if (unlikely(!result)) return NULL;
+ op->func_annotations = result;
+ }
+ Py_INCREF(result);
+ return result;
+}
+static PyGetSetDef __pyx_CyFunction_getsets[] = {
+ {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+ {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
+ {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+ {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
+ {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
+ {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0},
+ {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+ {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
+ {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+ {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
+ {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+ {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
+ {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+ {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
+ {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+ {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
+ {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
+ {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
+ {0, 0, 0, 0, 0}
+};
+static PyMemberDef __pyx_CyFunction_members[] = {
+ {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), PY_WRITE_RESTRICTED, 0},
+ {0, 0, 0, 0, 0}
+};
+static PyObject *
+__Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, CYTHON_UNUSED PyObject *args)
+{
+#if PY_MAJOR_VERSION >= 3
+ return PyUnicode_FromString(m->func.m_ml->ml_name);
+#else
+ return PyString_FromString(m->func.m_ml->ml_name);
+#endif
+}
+static PyMethodDef __pyx_CyFunction_methods[] = {
+ {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
+ {0, 0, 0, 0}
+};
+#if PY_VERSION_HEX < 0x030500A0
+#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
+#else
+#define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func.m_weakreflist)
+#endif
+static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname,
+ PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
+ __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type);
+ if (op == NULL)
+ return NULL;
+ op->flags = flags;
+ __Pyx_CyFunction_weakreflist(op) = NULL;
+ op->func.m_ml = ml;
+ op->func.m_self = (PyObject *) op;
+ Py_XINCREF(closure);
+ op->func_closure = closure;
+ Py_XINCREF(module);
+ op->func.m_module = module;
+ op->func_dict = NULL;
+ op->func_name = NULL;
+ Py_INCREF(qualname);
+ op->func_qualname = qualname;
+ op->func_doc = NULL;
+ op->func_classobj = NULL;
+ op->func_globals = globals;
+ Py_INCREF(op->func_globals);
+ Py_XINCREF(code);
+ op->func_code = code;
+ op->defaults_pyobjects = 0;
+ op->defaults = NULL;
+ op->defaults_tuple = NULL;
+ op->defaults_kwdict = NULL;
+ op->defaults_getter = NULL;
+ op->func_annotations = NULL;
+ PyObject_GC_Track(op);
+ return (PyObject *) op;
+}
+static int
+__Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
+{
+ Py_CLEAR(m->func_closure);
+ Py_CLEAR(m->func.m_module);
+ Py_CLEAR(m->func_dict);
+ Py_CLEAR(m->func_name);
+ Py_CLEAR(m->func_qualname);
+ Py_CLEAR(m->func_doc);
+ Py_CLEAR(m->func_globals);
+ Py_CLEAR(m->func_code);
+ Py_CLEAR(m->func_classobj);
+ Py_CLEAR(m->defaults_tuple);
+ Py_CLEAR(m->defaults_kwdict);
+ Py_CLEAR(m->func_annotations);
+ if (m->defaults) {
+ PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+ int i;
+ for (i = 0; i < m->defaults_pyobjects; i++)
+ Py_XDECREF(pydefaults[i]);
+ PyObject_Free(m->defaults);
+ m->defaults = NULL;
+ }
+ return 0;
+}
+static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
+{
+ if (__Pyx_CyFunction_weakreflist(m) != NULL)
+ PyObject_ClearWeakRefs((PyObject *) m);
+ __Pyx_CyFunction_clear(m);
+ PyObject_GC_Del(m);
+}
+static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
+{
+ PyObject_GC_UnTrack(m);
+ __Pyx__CyFunction_dealloc(m);
+}
+static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
+{
+ Py_VISIT(m->func_closure);
+ Py_VISIT(m->func.m_module);
+ Py_VISIT(m->func_dict);
+ Py_VISIT(m->func_name);
+ Py_VISIT(m->func_qualname);
+ Py_VISIT(m->func_doc);
+ Py_VISIT(m->func_globals);
+ Py_VISIT(m->func_code);
+ Py_VISIT(m->func_classobj);
+ Py_VISIT(m->defaults_tuple);
+ Py_VISIT(m->defaults_kwdict);
+ if (m->defaults) {
+ PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
+ int i;
+ for (i = 0; i < m->defaults_pyobjects; i++)
+ Py_VISIT(pydefaults[i]);
+ }
+ return 0;
+}
+static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObject *type)
+{
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ if (m->flags & __Pyx_CYFUNCTION_STATICMETHOD) {
+ Py_INCREF(func);
+ return func;
+ }
+ if (m->flags & __Pyx_CYFUNCTION_CLASSMETHOD) {
+ if (type == NULL)
+ type = (PyObject *)(Py_TYPE(obj));
+ return __Pyx_PyMethod_New(func, type, (PyObject *)(Py_TYPE(type)));
+ }
+ if (obj == Py_None)
+ obj = NULL;
+ return __Pyx_PyMethod_New(func, obj, type);
+}
+static PyObject*
+__Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
+{
+#if PY_MAJOR_VERSION >= 3
+ return PyUnicode_FromFormat("",
+ op->func_qualname, (void *)op);
+#else
+ return PyString_FromFormat("",
+ PyString_AsString(op->func_qualname), (void *)op);
+#endif
+}
+static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
+ PyCFunctionObject* f = (PyCFunctionObject*)func;
+ PyCFunction meth = f->m_ml->ml_meth;
+ Py_ssize_t size;
+ switch (f->m_ml->ml_flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
+ case METH_VARARGS:
+ if (likely(kw == NULL || PyDict_Size(kw) == 0))
+ return (*meth)(self, arg);
+ break;
+ case METH_VARARGS | METH_KEYWORDS:
+ return (*(PyCFunctionWithKeywords)meth)(self, arg, kw);
+ case METH_NOARGS:
+ if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
+ size = PyTuple_GET_SIZE(arg);
+ if (likely(size == 0))
+ return (*meth)(self, NULL);
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
+ f->m_ml->ml_name, size);
+ return NULL;
+ }
+ break;
+ case METH_O:
+ if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
+ size = PyTuple_GET_SIZE(arg);
+ if (likely(size == 1)) {
+ PyObject *result, *arg0;
+ #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ arg0 = PyTuple_GET_ITEM(arg, 0);
+ #else
+ arg0 = PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
+ #endif
+ result = (*meth)(self, arg0);
+ #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
+ Py_DECREF(arg0);
+ #endif
+ return result;
+ }
+ PyErr_Format(PyExc_TypeError,
+ "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
+ f->m_ml->ml_name, size);
+ return NULL;
+ }
+ break;
+ default:
+ PyErr_SetString(PyExc_SystemError, "Bad call flags in "
+ "__Pyx_CyFunction_Call. METH_OLDARGS is no "
+ "longer supported!");
+ return NULL;
+ }
+ PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
+ f->m_ml->ml_name);
+ return NULL;
+}
+static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
+ return __Pyx_CyFunction_CallMethod(func, ((PyCFunctionObject*)func)->m_self, arg, kw);
+}
+static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
+ PyObject *result;
+ __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
+ if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
+ Py_ssize_t argc;
+ PyObject *new_args;
+ PyObject *self;
+ argc = PyTuple_GET_SIZE(args);
+ new_args = PyTuple_GetSlice(args, 1, argc);
+ if (unlikely(!new_args))
+ return NULL;
+ self = PyTuple_GetItem(args, 0);
+ if (unlikely(!self)) {
+ Py_DECREF(new_args);
+ return NULL;
+ }
+ result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
+ Py_DECREF(new_args);
+ } else {
+ result = __Pyx_CyFunction_Call(func, args, kw);
+ }
+ return result;
+}
+static PyTypeObject __pyx_CyFunctionType_type = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "cython_function_or_method",
+ sizeof(__pyx_CyFunctionObject),
+ 0,
+ (destructor) __Pyx_CyFunction_dealloc,
+ 0,
+ 0,
+ 0,
+#if PY_MAJOR_VERSION < 3
+ 0,
+#else
+ 0,
+#endif
+ (reprfunc) __Pyx_CyFunction_repr,
+ 0,
+ 0,
+ 0,
+ 0,
+ __Pyx_CyFunction_CallAsMethod,
+ 0,
+ 0,
+ 0,
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC,
+ 0,
+ (traverseproc) __Pyx_CyFunction_traverse,
+ (inquiry) __Pyx_CyFunction_clear,
+ 0,
+#if PY_VERSION_HEX < 0x030500A0
+ offsetof(__pyx_CyFunctionObject, func_weakreflist),
+#else
+ offsetof(PyCFunctionObject, m_weakreflist),
+#endif
+ 0,
+ 0,
+ __pyx_CyFunction_methods,
+ __pyx_CyFunction_members,
+ __pyx_CyFunction_getsets,
+ 0,
+ 0,
+ __Pyx_CyFunction_descr_get,
+ 0,
+ offsetof(__pyx_CyFunctionObject, func_dict),
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+#if PY_VERSION_HEX >= 0x030400a1
+ 0,
+#endif
+};
+static int __pyx_CyFunction_init(void) {
+ __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
+ if (unlikely(__pyx_CyFunctionType == NULL)) {
+ return -1;
+ }
+ return 0;
+}
+static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->defaults = PyObject_Malloc(size);
+ if (unlikely(!m->defaults))
+ return PyErr_NoMemory();
+ memset(m->defaults, 0, size);
+ m->defaults_pyobjects = pyobjects;
+ return m->defaults;
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->defaults_tuple = tuple;
+ Py_INCREF(tuple);
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->defaults_kwdict = dict;
+ Py_INCREF(dict);
+}
+static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
+ __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
+ m->func_annotations = dict;
+ Py_INCREF(dict);
+}
+
+/* Py3ClassCreate */
+ static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
+ PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
+ PyObject *ns;
+ if (metaclass) {
+ PyObject *prep = __Pyx_PyObject_GetAttrStr(metaclass, __pyx_n_s_prepare);
+ if (prep) {
+ PyObject *pargs = PyTuple_Pack(2, name, bases);
+ if (unlikely(!pargs)) {
+ Py_DECREF(prep);
+ return NULL;
+ }
+ ns = PyObject_Call(prep, pargs, mkw);
+ Py_DECREF(prep);
+ Py_DECREF(pargs);
+ } else {
+ if (unlikely(!PyErr_ExceptionMatches(PyExc_AttributeError)))
+ return NULL;
+ PyErr_Clear();
+ ns = PyDict_New();
+ }
+ } else {
+ ns = PyDict_New();
+ }
+ if (unlikely(!ns))
+ return NULL;
+ if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
+ if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
+ if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
+ return ns;
+bad:
+ Py_DECREF(ns);
+ return NULL;
+}
+static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
+ PyObject *dict, PyObject *mkw,
+ int calculate_metaclass, int allow_py2_metaclass) {
+ PyObject *result, *margs;
+ PyObject *owned_metaclass = NULL;
+ if (allow_py2_metaclass) {
+ owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
+ if (owned_metaclass) {
+ metaclass = owned_metaclass;
+ } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
+ PyErr_Clear();
+ } else {
+ return NULL;
+ }
+ }
+ if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
+ metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
+ Py_XDECREF(owned_metaclass);
+ if (unlikely(!metaclass))
+ return NULL;
+ owned_metaclass = metaclass;
+ }
+ margs = PyTuple_Pack(3, name, bases, dict);
+ if (unlikely(!margs)) {
+ result = NULL;
+ } else {
+ result = PyObject_Call(metaclass, margs, mkw);
+ Py_DECREF(margs);
+ }
+ Py_XDECREF(owned_metaclass);
+ return result;
+}
+
+/* CLineInTraceback */
+ #ifndef CYTHON_CLINE_IN_TRACEBACK
+static int __Pyx_CLineForTraceback(CYTHON_UNUSED PyThreadState *tstate, int c_line) {
+ PyObject *use_cline;
+ PyObject *ptype, *pvalue, *ptraceback;
+#if CYTHON_COMPILING_IN_CPYTHON
+ PyObject **cython_runtime_dict;
+#endif
+ __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
+#if CYTHON_COMPILING_IN_CPYTHON
+ cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
+ if (likely(cython_runtime_dict)) {
+ use_cline = PyDict_GetItem(*cython_runtime_dict, __pyx_n_s_cline_in_traceback);
+ } else
+#endif
+ {
+ PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
+ if (use_cline_obj) {
+ use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
+ Py_DECREF(use_cline_obj);
+ } else {
+ PyErr_Clear();
+ use_cline = NULL;
+ }
+ }
+ if (!use_cline) {
+ c_line = 0;
+ PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
+ }
+ else if (PyObject_Not(use_cline) != 0) {
+ c_line = 0;
+ }
+ __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
+ return c_line;
+}
+#endif
+
+/* CodeObjectCache */
+ static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
+ int start = 0, mid = 0, end = count - 1;
+ if (end >= 0 && code_line > entries[end].code_line) {
+ return count;
+ }
+ while (start < end) {
+ mid = start + (end - start) / 2;
+ if (code_line < entries[mid].code_line) {
+ end = mid;
+ } else if (code_line > entries[mid].code_line) {
+ start = mid + 1;
+ } else {
+ return mid;
+ }
+ }
+ if (code_line <= entries[mid].code_line) {
+ return mid;
+ } else {
+ return mid + 1;
+ }
+}
+static PyCodeObject *__pyx_find_code_object(int code_line) {
+ PyCodeObject* code_object;
+ int pos;
+ if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
+ return NULL;
+ }
+ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+ if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
+ return NULL;
+ }
+ code_object = __pyx_code_cache.entries[pos].code_object;
+ Py_INCREF(code_object);
+ return code_object;
+}
+static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
+ int pos, i;
+ __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
+ if (unlikely(!code_line)) {
+ return;
+ }
+ if (unlikely(!entries)) {
+ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
+ if (likely(entries)) {
+ __pyx_code_cache.entries = entries;
+ __pyx_code_cache.max_count = 64;
+ __pyx_code_cache.count = 1;
+ entries[0].code_line = code_line;
+ entries[0].code_object = code_object;
+ Py_INCREF(code_object);
+ }
+ return;
+ }
+ pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
+ if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
+ PyCodeObject* tmp = entries[pos].code_object;
+ entries[pos].code_object = code_object;
+ Py_DECREF(tmp);
+ return;
+ }
+ if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
+ int new_max = __pyx_code_cache.max_count + 64;
+ entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
+ __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
+ if (unlikely(!entries)) {
+ return;
+ }
+ __pyx_code_cache.entries = entries;
+ __pyx_code_cache.max_count = new_max;
+ }
+ for (i=__pyx_code_cache.count; i>pos; i--) {
+ entries[i] = entries[i-1];
+ }
+ entries[pos].code_line = code_line;
+ entries[pos].code_object = code_object;
+ __pyx_code_cache.count++;
+ Py_INCREF(code_object);
+}
+
+/* AddTraceback */
+ #include "compile.h"
+#include "frameobject.h"
+#include "traceback.h"
+static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
+ const char *funcname, int c_line,
+ int py_line, const char *filename) {
+ PyCodeObject *py_code = 0;
+ PyObject *py_srcfile = 0;
+ PyObject *py_funcname = 0;
+ #if PY_MAJOR_VERSION < 3
+ py_srcfile = PyString_FromString(filename);
+ #else
+ py_srcfile = PyUnicode_FromString(filename);
+ #endif
+ if (!py_srcfile) goto bad;
+ if (c_line) {
+ #if PY_MAJOR_VERSION < 3
+ py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+ #else
+ py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
+ #endif
+ }
+ else {
+ #if PY_MAJOR_VERSION < 3
+ py_funcname = PyString_FromString(funcname);
+ #else
+ py_funcname = PyUnicode_FromString(funcname);
+ #endif
+ }
+ if (!py_funcname) goto bad;
+ py_code = __Pyx_PyCode_New(
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ __pyx_empty_bytes, /*PyObject *code,*/
+ __pyx_empty_tuple, /*PyObject *consts,*/
+ __pyx_empty_tuple, /*PyObject *names,*/
+ __pyx_empty_tuple, /*PyObject *varnames,*/
+ __pyx_empty_tuple, /*PyObject *freevars,*/
+ __pyx_empty_tuple, /*PyObject *cellvars,*/
+ py_srcfile, /*PyObject *filename,*/
+ py_funcname, /*PyObject *name,*/
+ py_line,
+ __pyx_empty_bytes /*PyObject *lnotab*/
+ );
+ Py_DECREF(py_srcfile);
+ Py_DECREF(py_funcname);
+ return py_code;
+bad:
+ Py_XDECREF(py_srcfile);
+ Py_XDECREF(py_funcname);
+ return NULL;
+}
+static void __Pyx_AddTraceback(const char *funcname, int c_line,
+ int py_line, const char *filename) {
+ PyCodeObject *py_code = 0;
+ PyFrameObject *py_frame = 0;
+ PyThreadState *tstate = __Pyx_PyThreadState_Current;
+ if (c_line) {
+ c_line = __Pyx_CLineForTraceback(tstate, c_line);
+ }
+ py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
+ if (!py_code) {
+ py_code = __Pyx_CreateCodeObjectForTraceback(
+ funcname, c_line, py_line, filename);
+ if (!py_code) goto bad;
+ __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
+ }
+ py_frame = PyFrame_New(
+ tstate, /*PyThreadState *tstate,*/
+ py_code, /*PyCodeObject *code,*/
+ __pyx_d, /*PyObject *globals,*/
+ 0 /*PyObject *locals*/
+ );
+ if (!py_frame) goto bad;
+ __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
+ PyTraceBack_Here(py_frame);
+bad:
+ Py_XDECREF(py_code);
+ Py_XDECREF(py_frame);
+}
+
+/* CIntToPy */
+ static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
+ const long neg_one = (long) -1, const_zero = (long) 0;
+ const int is_unsigned = neg_one > const_zero;
+ if (is_unsigned) {
+ if (sizeof(long) < sizeof(long)) {
+ return PyInt_FromLong((long) value);
+ } else if (sizeof(long) <= sizeof(unsigned long)) {
+ return PyLong_FromUnsignedLong((unsigned long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
+ return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
+#endif
+ }
+ } else {
+ if (sizeof(long) <= sizeof(long)) {
+ return PyInt_FromLong((long) value);
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
+ return PyLong_FromLongLong((PY_LONG_LONG) value);
+#endif
+ }
+ }
+ {
+ int one = 1; int little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&value;
+ return _PyLong_FromByteArray(bytes, sizeof(long),
+ little, !is_unsigned);
+ }
+}
+
+/* CIntFromPyVerify */
+ #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
+#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
+ __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
+#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
+ {\
+ func_type value = func_value;\
+ if (sizeof(target_type) < sizeof(func_type)) {\
+ if (unlikely(value != (func_type) (target_type) value)) {\
+ func_type zero = 0;\
+ if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
+ return (target_type) -1;\
+ if (is_unsigned && unlikely(value < zero))\
+ goto raise_neg_overflow;\
+ else\
+ goto raise_overflow;\
+ }\
+ }\
+ return (target_type) value;\
+ }
+
+/* CIntFromPy */
+ static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
+ const long neg_one = (long) -1, const_zero = (long) 0;
+ const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+ if (sizeof(long) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
+ } else {
+ long val = PyInt_AS_LONG(x);
+ if (is_unsigned && unlikely(val < 0)) {
+ goto raise_neg_overflow;
+ }
+ return (long) val;
+ }
+ } else
+#endif
+ if (likely(PyLong_Check(x))) {
+ if (is_unsigned) {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (long) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
+ case 2:
+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
+ return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
+ return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
+ return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
+ }
+ }
+ break;
+ }
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ if (unlikely(Py_SIZE(x) < 0)) {
+ goto raise_neg_overflow;
+ }
+#else
+ {
+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
+ if (unlikely(result < 0))
+ return (long) -1;
+ if (unlikely(result == 1))
+ goto raise_neg_overflow;
+ }
+#endif
+ if (sizeof(long) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
+ }
+ } else {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (long) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(long, digit, +digits[0])
+ case -2:
+ if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 2:
+ if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case -3:
+ if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case -4:
+ if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
+ return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
+ }
+ }
+ break;
+ }
+#endif
+ if (sizeof(long) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
+ }
+ }
+ {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+ PyErr_SetString(PyExc_RuntimeError,
+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+ long val;
+ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+#endif
+ return (long) -1;
+ }
+ } else {
+ long val;
+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+ if (!tmp) return (long) -1;
+ val = __Pyx_PyInt_As_long(tmp);
+ Py_DECREF(tmp);
+ return val;
+ }
+raise_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "value too large to convert to long");
+ return (long) -1;
+raise_neg_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "can't convert negative value to long");
+ return (long) -1;
+}
+
+/* CIntFromPy */
+ static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
+ const int neg_one = (int) -1, const_zero = (int) 0;
+ const int is_unsigned = neg_one > const_zero;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x))) {
+ if (sizeof(int) < sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
+ } else {
+ long val = PyInt_AS_LONG(x);
+ if (is_unsigned && unlikely(val < 0)) {
+ goto raise_neg_overflow;
+ }
+ return (int) val;
+ }
+ } else
+#endif
+ if (likely(PyLong_Check(x))) {
+ if (is_unsigned) {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (int) 0;
+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
+ case 2:
+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
+ return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
+ return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
+ return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
+ }
+ }
+ break;
+ }
+#endif
+#if CYTHON_COMPILING_IN_CPYTHON
+ if (unlikely(Py_SIZE(x) < 0)) {
+ goto raise_neg_overflow;
+ }
+#else
+ {
+ int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
+ if (unlikely(result < 0))
+ return (int) -1;
+ if (unlikely(result == 1))
+ goto raise_neg_overflow;
+ }
+#endif
+ if (sizeof(int) <= sizeof(unsigned long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
+#endif
+ }
+ } else {
+#if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)x)->ob_digit;
+ switch (Py_SIZE(x)) {
+ case 0: return (int) 0;
+ case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, (sdigit) (-(sdigit)digits[0]))
+ case 1: __PYX_VERIFY_RETURN_INT(int, digit, +digits[0])
+ case -2:
+ if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 2:
+ if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case -3:
+ if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 3:
+ if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case -4:
+ if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
+ return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ case 4:
+ if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
+ if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
+ __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
+ } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
+ return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
+ }
+ }
+ break;
+ }
+#endif
+ if (sizeof(int) <= sizeof(long)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
+#ifdef HAVE_LONG_LONG
+ } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
+ __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
+#endif
+ }
+ }
+ {
+#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
+ PyErr_SetString(PyExc_RuntimeError,
+ "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
+#else
+ int val;
+ PyObject *v = __Pyx_PyNumber_IntOrLong(x);
+ #if PY_MAJOR_VERSION < 3
+ if (likely(v) && !PyLong_Check(v)) {
+ PyObject *tmp = v;
+ v = PyNumber_Long(tmp);
+ Py_DECREF(tmp);
+ }
+ #endif
+ if (likely(v)) {
+ int one = 1; int is_little = (int)*(unsigned char *)&one;
+ unsigned char *bytes = (unsigned char *)&val;
+ int ret = _PyLong_AsByteArray((PyLongObject *)v,
+ bytes, sizeof(val),
+ is_little, !is_unsigned);
+ Py_DECREF(v);
+ if (likely(!ret))
+ return val;
+ }
+#endif
+ return (int) -1;
+ }
+ } else {
+ int val;
+ PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
+ if (!tmp) return (int) -1;
+ val = __Pyx_PyInt_As_int(tmp);
+ Py_DECREF(tmp);
+ return val;
+ }
+raise_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "value too large to convert to int");
+ return (int) -1;
+raise_neg_overflow:
+ PyErr_SetString(PyExc_OverflowError,
+ "can't convert negative value to int");
+ return (int) -1;
+}
+
+/* FastTypeChecks */
+ #if CYTHON_COMPILING_IN_CPYTHON
+static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
+ while (a) {
+ a = a->tp_base;
+ if (a == b)
+ return 1;
+ }
+ return b == &PyBaseObject_Type;
+}
+static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
+ PyObject *mro;
+ if (a == b) return 1;
+ mro = a->tp_mro;
+ if (likely(mro)) {
+ Py_ssize_t i, n;
+ n = PyTuple_GET_SIZE(mro);
+ for (i = 0; i < n; i++) {
+ if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
+ return 1;
+ }
+ return 0;
+ }
+ return __Pyx_InBases(a, b);
+}
+#if PY_MAJOR_VERSION == 2
+static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
+ PyObject *exception, *value, *tb;
+ int res;
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrFetch(&exception, &value, &tb);
+ res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
+ if (unlikely(res == -1)) {
+ PyErr_WriteUnraisable(err);
+ res = 0;
+ }
+ if (!res) {
+ res = PyObject_IsSubclass(err, exc_type2);
+ if (unlikely(res == -1)) {
+ PyErr_WriteUnraisable(err);
+ res = 0;
+ }
+ }
+ __Pyx_ErrRestore(exception, value, tb);
+ return res;
+}
+#else
+static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
+ int res = exc_type1 ? __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type1) : 0;
+ if (!res) {
+ res = __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
+ }
+ return res;
+}
+#endif
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
+ if (likely(err == exc_type)) return 1;
+ if (likely(PyExceptionClass_Check(err))) {
+ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
+ }
+ return PyErr_GivenExceptionMatches(err, exc_type);
+}
+static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
+ if (likely(err == exc_type1 || err == exc_type2)) return 1;
+ if (likely(PyExceptionClass_Check(err))) {
+ return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
+ }
+ return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
+}
+#endif
+
+/* SwapException */
+ #if CYTHON_FAST_THREAD_STATE
+static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ #if PY_VERSION_HEX >= 0x030700A2
+ tmp_type = tstate->exc_state.exc_type;
+ tmp_value = tstate->exc_state.exc_value;
+ tmp_tb = tstate->exc_state.exc_traceback;
+ tstate->exc_state.exc_type = *type;
+ tstate->exc_state.exc_value = *value;
+ tstate->exc_state.exc_traceback = *tb;
+ #else
+ tmp_type = tstate->exc_type;
+ tmp_value = tstate->exc_value;
+ tmp_tb = tstate->exc_traceback;
+ tstate->exc_type = *type;
+ tstate->exc_value = *value;
+ tstate->exc_traceback = *tb;
+ #endif
+ *type = tmp_type;
+ *value = tmp_value;
+ *tb = tmp_tb;
+}
+#else
+static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
+ PyObject *tmp_type, *tmp_value, *tmp_tb;
+ PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
+ PyErr_SetExcInfo(*type, *value, *tb);
+ *type = tmp_type;
+ *value = tmp_value;
+ *tb = tmp_tb;
+}
+#endif
+
+/* CoroutineBase */
+ #include
+#include
+#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
+static int __Pyx_PyGen__FetchStopIterationValue(CYTHON_UNUSED PyThreadState *__pyx_tstate, PyObject **pvalue) {
+ PyObject *et, *ev, *tb;
+ PyObject *value = NULL;
+ __Pyx_ErrFetch(&et, &ev, &tb);
+ if (!et) {
+ Py_XDECREF(tb);
+ Py_XDECREF(ev);
+ Py_INCREF(Py_None);
+ *pvalue = Py_None;
+ return 0;
+ }
+ if (likely(et == PyExc_StopIteration)) {
+ if (!ev) {
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+#if PY_VERSION_HEX >= 0x030300A0
+ else if (Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
+ value = ((PyStopIterationObject *)ev)->value;
+ Py_INCREF(value);
+ Py_DECREF(ev);
+ }
+#endif
+ else if (unlikely(PyTuple_Check(ev))) {
+ if (PyTuple_GET_SIZE(ev) >= 1) {
+#if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
+ value = PyTuple_GET_ITEM(ev, 0);
+ Py_INCREF(value);
+#else
+ value = PySequence_ITEM(ev, 0);
+#endif
+ } else {
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+ Py_DECREF(ev);
+ }
+ else if (!__Pyx_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
+ value = ev;
+ }
+ if (likely(value)) {
+ Py_XDECREF(tb);
+ Py_DECREF(et);
+ *pvalue = value;
+ return 0;
+ }
+ } else if (!__Pyx_PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
+ __Pyx_ErrRestore(et, ev, tb);
+ return -1;
+ }
+ PyErr_NormalizeException(&et, &ev, &tb);
+ if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
+ __Pyx_ErrRestore(et, ev, tb);
+ return -1;
+ }
+ Py_XDECREF(tb);
+ Py_DECREF(et);
+#if PY_VERSION_HEX >= 0x030300A0
+ value = ((PyStopIterationObject *)ev)->value;
+ Py_INCREF(value);
+ Py_DECREF(ev);
+#else
+ {
+ PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args_2);
+ Py_DECREF(ev);
+ if (likely(args)) {
+ value = PySequence_GetItem(args, 0);
+ Py_DECREF(args);
+ }
+ if (unlikely(!value)) {
+ __Pyx_ErrRestore(NULL, NULL, NULL);
+ Py_INCREF(Py_None);
+ value = Py_None;
+ }
+ }
+#endif
+ *pvalue = value;
+ return 0;
+}
+static CYTHON_INLINE
+void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
+ PyObject *exc_type = self->exc_type;
+ PyObject *exc_value = self->exc_value;
+ PyObject *exc_traceback = self->exc_traceback;
+ self->exc_type = NULL;
+ self->exc_value = NULL;
+ self->exc_traceback = NULL;
+ Py_XDECREF(exc_type);
+ Py_XDECREF(exc_value);
+ Py_XDECREF(exc_traceback);
+}
+#define __Pyx_Coroutine_AlreadyRunningError(gen) (__Pyx__Coroutine_AlreadyRunningError(gen), (PyObject*)NULL)
+static void __Pyx__Coroutine_AlreadyRunningError(CYTHON_UNUSED __pyx_CoroutineObject *gen) {
+ const char *msg;
+ if (0) {
+ #ifdef __Pyx_Coroutine_USED
+ } else if (__Pyx_Coroutine_CheckExact((PyObject*)gen)) {
+ msg = "coroutine already executing";
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ } else if (__Pyx_AsyncGen_CheckExact((PyObject*)gen)) {
+ msg = "async generator already executing";
+ #endif
+ } else {
+ msg = "generator already executing";
+ }
+ PyErr_SetString(PyExc_ValueError, msg);
+}
+#define __Pyx_Coroutine_NotStartedError(gen) (__Pyx__Coroutine_NotStartedError(gen), (PyObject*)NULL)
+static void __Pyx__Coroutine_NotStartedError(CYTHON_UNUSED PyObject *gen) {
+ const char *msg;
+ if (0) {
+ #ifdef __Pyx_Coroutine_USED
+ } else if (__Pyx_Coroutine_CheckExact(gen)) {
+ msg = "can't send non-None value to a just-started coroutine";
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ } else if (__Pyx_AsyncGen_CheckExact(gen)) {
+ msg = "can't send non-None value to a just-started async generator";
+ #endif
+ } else {
+ msg = "can't send non-None value to a just-started generator";
+ }
+ PyErr_SetString(PyExc_TypeError, msg);
+}
+#define __Pyx_Coroutine_AlreadyTerminatedError(gen, value, closing) (__Pyx__Coroutine_AlreadyTerminatedError(gen, value, closing), (PyObject*)NULL)
+static void __Pyx__Coroutine_AlreadyTerminatedError(CYTHON_UNUSED PyObject *gen, PyObject *value, CYTHON_UNUSED int closing) {
+ #ifdef __Pyx_Coroutine_USED
+ if (!closing && __Pyx_Coroutine_CheckExact(gen)) {
+ PyErr_SetString(PyExc_RuntimeError, "cannot reuse already awaited coroutine");
+ } else
+ #endif
+ if (value) {
+ #ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(gen))
+ PyErr_SetNone(__Pyx_PyExc_StopAsyncIteration);
+ else
+ #endif
+ PyErr_SetNone(PyExc_StopIteration);
+ }
+}
+static
+PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value, int closing) {
+ __Pyx_PyThreadState_declare
+ PyThreadState *tstate;
+ PyObject *retval;
+ assert(!self->is_running);
+ if (unlikely(self->resume_label == 0)) {
+ if (unlikely(value && value != Py_None)) {
+ return __Pyx_Coroutine_NotStartedError((PyObject*)self);
+ }
+ }
+ if (unlikely(self->resume_label == -1)) {
+ return __Pyx_Coroutine_AlreadyTerminatedError((PyObject*)self, value, closing);
+ }
+#if CYTHON_FAST_THREAD_STATE
+ __Pyx_PyThreadState_assign
+ tstate = __pyx_tstate;
+#else
+ tstate = __Pyx_PyThreadState_Current;
+#endif
+ if (self->exc_type) {
+#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
+#else
+ if (self->exc_traceback) {
+ PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
+ PyFrameObject *f = tb->tb_frame;
+ Py_XINCREF(tstate->frame);
+ assert(f->f_back == NULL);
+ f->f_back = tstate->frame;
+ }
+#endif
+ __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
+ &self->exc_traceback);
+ } else {
+ __Pyx_Coroutine_ExceptionClear(self);
+ __Pyx_ExceptionSave(&self->exc_type, &self->exc_value, &self->exc_traceback);
+ }
+ self->is_running = 1;
+ retval = self->body((PyObject *) self, tstate, value);
+ self->is_running = 0;
+ return retval;
+}
+static CYTHON_INLINE void __Pyx_Coroutine_ResetFrameBackpointer(__pyx_CoroutineObject *self) {
+ if (likely(self->exc_traceback)) {
+#if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_PYSTON
+#else
+ PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
+ PyFrameObject *f = tb->tb_frame;
+ Py_CLEAR(f->f_back);
+#endif
+ }
+}
+static CYTHON_INLINE
+PyObject *__Pyx_Coroutine_MethodReturn(CYTHON_UNUSED PyObject* gen, PyObject *retval) {
+ if (unlikely(!retval)) {
+ __Pyx_PyThreadState_declare
+ __Pyx_PyThreadState_assign
+ if (!__Pyx_PyErr_Occurred()) {
+ PyObject *exc = PyExc_StopIteration;
+ #ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(gen))
+ exc = __Pyx_PyExc_StopAsyncIteration;
+ #endif
+ __Pyx_PyErr_SetNone(exc);
+ }
+ }
+ return retval;
+}
+static CYTHON_INLINE
+PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
+ PyObject *ret;
+ PyObject *val = NULL;
+ __Pyx_Coroutine_Undelegate(gen);
+ __Pyx_PyGen__FetchStopIterationValue(__Pyx_PyThreadState_Current, &val);
+ ret = __Pyx_Coroutine_SendEx(gen, val, 0);
+ Py_XDECREF(val);
+ return ret;
+}
+static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
+ PyObject *retval;
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
+ PyObject *yf = gen->yieldfrom;
+ if (unlikely(gen->is_running))
+ return __Pyx_Coroutine_AlreadyRunningError(gen);
+ if (yf) {
+ PyObject *ret;
+ gen->is_running = 1;
+ #ifdef __Pyx_Generator_USED
+ if (__Pyx_Generator_CheckExact(yf)) {
+ ret = __Pyx_Coroutine_Send(yf, value);
+ } else
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ if (__Pyx_Coroutine_CheckExact(yf)) {
+ ret = __Pyx_Coroutine_Send(yf, value);
+ } else
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
+ ret = __Pyx_async_gen_asend_send(yf, value);
+ } else
+ #endif
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
+ if (PyGen_CheckExact(yf)) {
+ ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
+ } else
+ #endif
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03050000 && defined(PyCoro_CheckExact) && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
+ if (PyCoro_CheckExact(yf)) {
+ ret = _PyGen_Send((PyGenObject*)yf, value == Py_None ? NULL : value);
+ } else
+ #endif
+ {
+ if (value == Py_None)
+ ret = Py_TYPE(yf)->tp_iternext(yf);
+ else
+ ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
+ }
+ gen->is_running = 0;
+ if (likely(ret)) {
+ return ret;
+ }
+ retval = __Pyx_Coroutine_FinishDelegation(gen);
+ } else {
+ retval = __Pyx_Coroutine_SendEx(gen, value, 0);
+ }
+ return __Pyx_Coroutine_MethodReturn(self, retval);
+}
+static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
+ PyObject *retval = NULL;
+ int err = 0;
+ #ifdef __Pyx_Generator_USED
+ if (__Pyx_Generator_CheckExact(yf)) {
+ retval = __Pyx_Coroutine_Close(yf);
+ if (!retval)
+ return -1;
+ } else
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ if (__Pyx_Coroutine_CheckExact(yf)) {
+ retval = __Pyx_Coroutine_Close(yf);
+ if (!retval)
+ return -1;
+ } else
+ if (__Pyx_CoroutineAwait_CheckExact(yf)) {
+ retval = __Pyx_CoroutineAwait_Close((__pyx_CoroutineAwaitObject*)yf);
+ if (!retval)
+ return -1;
+ } else
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ if (__pyx_PyAsyncGenASend_CheckExact(yf)) {
+ retval = __Pyx_async_gen_asend_close(yf, NULL);
+ } else
+ if (__pyx_PyAsyncGenAThrow_CheckExact(yf)) {
+ retval = __Pyx_async_gen_athrow_close(yf, NULL);
+ } else
+ #endif
+ {
+ PyObject *meth;
+ gen->is_running = 1;
+ meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
+ if (unlikely(!meth)) {
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ PyErr_WriteUnraisable(yf);
+ }
+ PyErr_Clear();
+ } else {
+ retval = PyObject_CallFunction(meth, NULL);
+ Py_DECREF(meth);
+ if (!retval)
+ err = -1;
+ }
+ gen->is_running = 0;
+ }
+ Py_XDECREF(retval);
+ return err;
+}
+static PyObject *__Pyx_Generator_Next(PyObject *self) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
+ PyObject *yf = gen->yieldfrom;
+ if (unlikely(gen->is_running))
+ return __Pyx_Coroutine_AlreadyRunningError(gen);
+ if (yf) {
+ PyObject *ret;
+ gen->is_running = 1;
+ #ifdef __Pyx_Generator_USED
+ if (__Pyx_Generator_CheckExact(yf)) {
+ ret = __Pyx_Generator_Next(yf);
+ } else
+ #endif
+ #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03030000 && (defined(__linux__) || PY_VERSION_HEX >= 0x030600B3)
+ if (PyGen_CheckExact(yf)) {
+ ret = _PyGen_Send((PyGenObject*)yf, NULL);
+ } else
+ #endif
+ ret = Py_TYPE(yf)->tp_iternext(yf);
+ gen->is_running = 0;
+ if (likely(ret)) {
+ return ret;
+ }
+ return __Pyx_Coroutine_FinishDelegation(gen);
+ }
+ return __Pyx_Coroutine_SendEx(gen, Py_None, 0);
+}
+static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ PyObject *retval, *raised_exception;
+ PyObject *yf = gen->yieldfrom;
+ int err = 0;
+ if (unlikely(gen->is_running))
+ return __Pyx_Coroutine_AlreadyRunningError(gen);
+ if (yf) {
+ Py_INCREF(yf);
+ err = __Pyx_Coroutine_CloseIter(gen, yf);
+ __Pyx_Coroutine_Undelegate(gen);
+ Py_DECREF(yf);
+ }
+ if (err == 0)
+ PyErr_SetNone(PyExc_GeneratorExit);
+ retval = __Pyx_Coroutine_SendEx(gen, NULL, 1);
+ if (unlikely(retval)) {
+ const char *msg;
+ Py_DECREF(retval);
+ if ((0)) {
+ #ifdef __Pyx_Coroutine_USED
+ } else if (__Pyx_Coroutine_CheckExact(self)) {
+ msg = "coroutine ignored GeneratorExit";
+ #endif
+ #ifdef __Pyx_AsyncGen_USED
+ } else if (__Pyx_AsyncGen_CheckExact(self)) {
+#if PY_VERSION_HEX < 0x03060000
+ msg = "async generator ignored GeneratorExit - might require Python 3.6+ finalisation (PEP 525)";
+#else
+ msg = "async generator ignored GeneratorExit";
+#endif
+ #endif
+ } else {
+ msg = "generator ignored GeneratorExit";
+ }
+ PyErr_SetString(PyExc_RuntimeError, msg);
+ return NULL;
+ }
+ raised_exception = PyErr_Occurred();
+ if (likely(!raised_exception || __Pyx_PyErr_GivenExceptionMatches2(raised_exception, PyExc_GeneratorExit, PyExc_StopIteration))) {
+ if (raised_exception) PyErr_Clear();
+ Py_INCREF(Py_None);
+ return Py_None;
+ }
+ return NULL;
+}
+static PyObject *__Pyx__Coroutine_Throw(PyObject *self, PyObject *typ, PyObject *val, PyObject *tb,
+ PyObject *args, int close_on_genexit) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ PyObject *yf = gen->yieldfrom;
+ if (unlikely(gen->is_running))
+ return __Pyx_Coroutine_AlreadyRunningError(gen);
+ if (yf) {
+ PyObject *ret;
+ Py_INCREF(yf);
+ if (__Pyx_PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit) && close_on_genexit) {
+ int err = __Pyx_Coroutine_CloseIter(gen, yf);
+ Py_DECREF(yf);
+ __Pyx_Coroutine_Undelegate(gen);
+ if (err < 0)
+ return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
+ goto throw_here;
+ }
+ gen->is_running = 1;
+ if (0
+ #ifdef __Pyx_Generator_USED
+ || __Pyx_Generator_CheckExact(yf)
+ #endif
+ #ifdef __Pyx_Coroutine_USED
+ || __Pyx_Coroutine_CheckExact(yf)
+ #endif
+ ) {
+ ret = __Pyx__Coroutine_Throw(yf, typ, val, tb, args, close_on_genexit);
+ #ifdef __Pyx_Coroutine_USED
+ } else if (__Pyx_CoroutineAwait_CheckExact(yf)) {
+ ret = __Pyx__Coroutine_Throw(((__pyx_CoroutineAwaitObject*)yf)->coroutine, typ, val, tb, args, close_on_genexit);
+ #endif
+ } else {
+ PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
+ if (unlikely(!meth)) {
+ Py_DECREF(yf);
+ if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
+ gen->is_running = 0;
+ return NULL;
+ }
+ PyErr_Clear();
+ __Pyx_Coroutine_Undelegate(gen);
+ gen->is_running = 0;
+ goto throw_here;
+ }
+ if (likely(args)) {
+ ret = PyObject_CallObject(meth, args);
+ } else {
+ ret = PyObject_CallFunctionObjArgs(meth, typ, val, tb, NULL);
+ }
+ Py_DECREF(meth);
+ }
+ gen->is_running = 0;
+ Py_DECREF(yf);
+ if (!ret) {
+ ret = __Pyx_Coroutine_FinishDelegation(gen);
+ }
+ return __Pyx_Coroutine_MethodReturn(self, ret);
+ }
+throw_here:
+ __Pyx_Raise(typ, val, tb, NULL);
+ return __Pyx_Coroutine_MethodReturn(self, __Pyx_Coroutine_SendEx(gen, NULL, 0));
+}
+static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
+ PyObject *typ;
+ PyObject *val = NULL;
+ PyObject *tb = NULL;
+ if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
+ return NULL;
+ return __Pyx__Coroutine_Throw(self, typ, val, tb, args, 1);
+}
+static int __Pyx_Coroutine_traverse(__pyx_CoroutineObject *gen, visitproc visit, void *arg) {
+ Py_VISIT(gen->closure);
+ Py_VISIT(gen->classobj);
+ Py_VISIT(gen->yieldfrom);
+ Py_VISIT(gen->exc_type);
+ Py_VISIT(gen->exc_value);
+ Py_VISIT(gen->exc_traceback);
+ return 0;
+}
+static int __Pyx_Coroutine_clear(PyObject *self) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ Py_CLEAR(gen->closure);
+ Py_CLEAR(gen->classobj);
+ Py_CLEAR(gen->yieldfrom);
+ Py_CLEAR(gen->exc_type);
+ Py_CLEAR(gen->exc_value);
+ Py_CLEAR(gen->exc_traceback);
+#ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(self)) {
+ Py_CLEAR(((__pyx_PyAsyncGenObject*)gen)->ag_finalizer);
+ }
+#endif
+ Py_CLEAR(gen->gi_name);
+ Py_CLEAR(gen->gi_qualname);
+ Py_CLEAR(gen->gi_modulename);
+ return 0;
+}
+static void __Pyx_Coroutine_dealloc(PyObject *self) {
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ PyObject_GC_UnTrack(gen);
+ if (gen->gi_weakreflist != NULL)
+ PyObject_ClearWeakRefs(self);
+ if (gen->resume_label >= 0) {
+ PyObject_GC_Track(self);
+#if PY_VERSION_HEX >= 0x030400a1 && CYTHON_USE_TP_FINALIZE
+ if (PyObject_CallFinalizerFromDealloc(self))
+#else
+ Py_TYPE(gen)->tp_del(self);
+ if (self->ob_refcnt > 0)
+#endif
+ {
+ return;
+ }
+ PyObject_GC_UnTrack(self);
+ }
+#ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(self)) {
+ /* We have to handle this case for asynchronous generators
+ right here, because this code has to be between UNTRACK
+ and GC_Del. */
+ Py_CLEAR(((__pyx_PyAsyncGenObject*)self)->ag_finalizer);
+ }
+#endif
+ __Pyx_Coroutine_clear(self);
+ PyObject_GC_Del(gen);
+}
+static void __Pyx_Coroutine_del(PyObject *self) {
+ PyObject *error_type, *error_value, *error_traceback;
+ __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
+ __Pyx_PyThreadState_declare
+ if (gen->resume_label < 0) {
+ return;
+ }
+#if !CYTHON_USE_TP_FINALIZE
+ assert(self->ob_refcnt == 0);
+ self->ob_refcnt = 1;
+#endif
+ __Pyx_PyThreadState_assign
+ __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
+#ifdef __Pyx_AsyncGen_USED
+ if (__Pyx_AsyncGen_CheckExact(self)) {
+ __pyx_PyAsyncGenObject *agen = (__pyx_PyAsyncGenObject*)self;
+ PyObject *finalizer = agen->ag_finalizer;
+ if (finalizer && !agen->ag_closed) {
+ PyObject *res = __Pyx_PyObject_CallOneArg(finalizer, self);
+ if (unlikely(!res)) {
+ PyErr_WriteUnraisable(self);
+ } else {
+ Py_DECREF(res);
+ }
+ __Pyx_ErrRestore(error_type, error_value, error_traceback);
+ return;
+ }
+ }
+#endif
+ if (unlikely(gen->resume_label == 0 && !error_value)) {
+#ifdef __Pyx_Coroutine_USED
+#ifdef __Pyx_Generator_USED
+ if (!__Pyx_Generator_CheckExact(self))
+#endif
+ {
+ PyObject_GC_UnTrack(self);
+#if PY_MAJOR_VERSION >= 3 || defined(PyErr_WarnFormat)
+ if (unlikely(PyErr_WarnFormat(PyExc_RuntimeWarning, 1, "coroutine '%.50S' was never awaited", gen->gi_qualname) < 0))
+ PyErr_WriteUnraisable(self);
+#else
+ {PyObject *msg;
+ char *cmsg;
+ #if CYTHON_COMPILING_IN_PYPY
+ msg = NULL;
+ cmsg = (char*) "coroutine was never awaited";
+ #else
+ char *cname;
+ PyObject *qualname;
+ qualname = gen->gi_qualname;
+ cname = PyString_AS_STRING(qualname);
+ msg = PyString_FromFormat("coroutine '%.50s' was never awaited", cname);
+ if (unlikely(!msg)) {
+ PyErr_Clear();
+ cmsg = (char*) "coroutine was never awaited";
+ } else {
+ cmsg = PyString_AS_STRING(msg);
+ }
+ #endif
+ if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, cmsg, 1) < 0))
+ PyErr_WriteUnraisable(self);
+ Py_XDECREF(msg);}
+#endif
+ PyObject_GC_Track(self);
+ }
+#endif
+ } else {
+ PyObject *res = __Pyx_Coroutine_Close(self);
+ if (unlikely(!res)) {
+ if (PyErr_Occurred())
+ PyErr_WriteUnraisable(self);
+ } else {
+ Py_DECREF(res);
+ }
+ }
+ __Pyx_ErrRestore(error_type, error_value, error_traceback);
+#if !CYTHON_USE_TP_FINALIZE
+ assert(self->ob_refcnt > 0);
+ if (--self->ob_refcnt == 0) {
+ return;
+ }
+ {
+ Py_ssize_t refcnt = self->ob_refcnt;
+ _Py_NewReference(self);
+ self->ob_refcnt = refcnt;
+ }
+#if CYTHON_COMPILING_IN_CPYTHON
+ assert(PyType_IS_GC(self->ob_type) &&
+ _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
+ _Py_DEC_REFTOTAL;
+#endif
+#ifdef COUNT_ALLOCS
+ --Py_TYPE(self)->tp_frees;
+ --Py_TYPE(self)->tp_allocs;
+#endif
+#endif
+}
+static PyObject *
+__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
+{
+ PyObject *name = self->gi_name;
+ if (unlikely(!name)) name = Py_None;
+ Py_INCREF(name);
+ return name;
+}
+static int
+__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
+{
+ PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+ if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+ if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+ PyErr_SetString(PyExc_TypeError,
+ "__name__ must be set to a string object");
+ return -1;
+ }
+ tmp = self->gi_name;
+ Py_INCREF(value);
+ self->gi_name = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static PyObject *
+__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
+{
+ PyObject *name = self->gi_qualname;
+ if (unlikely(!name)) name = Py_None;
+ Py_INCREF(name);
+ return name;
+}
+static int
+__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
+{
+ PyObject *tmp;
+#if PY_MAJOR_VERSION >= 3
+ if (unlikely(value == NULL || !PyUnicode_Check(value))) {
+#else
+ if (unlikely(value == NULL || !PyString_Check(value))) {
+#endif
+ PyErr_SetString(PyExc_TypeError,
+ "__qualname__ must be set to a string object");
+ return -1;
+ }
+ tmp = self->gi_qualname;
+ Py_INCREF(value);
+ self->gi_qualname = value;
+ Py_XDECREF(tmp);
+ return 0;
+}
+static __pyx_CoroutineObject *__Pyx__Coroutine_New(
+ PyTypeObject* type, __pyx_coroutine_body_t body, PyObject *closure,
+ PyObject *name, PyObject *qualname, PyObject *module_name) {
+ __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
+ if (unlikely(!gen))
+ return NULL;
+ return __Pyx__Coroutine_NewInit(gen, body, closure, name, qualname, module_name);
+}
+static __pyx_CoroutineObject *__Pyx__Coroutine_NewInit(
+ __pyx_CoroutineObject *gen, __pyx_coroutine_body_t body, PyObject *closure,
+ PyObject *name, PyObject *qualname, PyObject *module_name) {
+ gen->body = body;
+ gen->closure = closure;
+ Py_XINCREF(closure);
+ gen->is_running = 0;
+ gen->resume_label = 0;
+ gen->classobj = NULL;
+ gen->yieldfrom = NULL;
+ gen->exc_type = NULL;
+ gen->exc_value = NULL;
+ gen->exc_traceback = NULL;
+ gen->gi_weakreflist = NULL;
+ Py_XINCREF(qualname);
+ gen->gi_qualname = qualname;
+ Py_XINCREF(name);
+ gen->gi_name = name;
+ Py_XINCREF(module_name);
+ gen->gi_modulename = module_name;
+ PyObject_GC_Track(gen);
+ return gen;
+}
+
+/* PatchModuleWithCoroutine */
+ static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
+#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+ int result;
+ PyObject *globals, *result_obj;
+ globals = PyDict_New(); if (unlikely(!globals)) goto ignore;
+ result = PyDict_SetItemString(globals, "_cython_coroutine_type",
+ #ifdef __Pyx_Coroutine_USED
+ (PyObject*)__pyx_CoroutineType);
+ #else
+ Py_None);
+ #endif
+ if (unlikely(result < 0)) goto ignore;
+ result = PyDict_SetItemString(globals, "_cython_generator_type",
+ #ifdef __Pyx_Generator_USED
+ (PyObject*)__pyx_GeneratorType);
+ #else
+ Py_None);
+ #endif
+ if (unlikely(result < 0)) goto ignore;
+ if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
+ if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
+ result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
+ if (unlikely(!result_obj)) goto ignore;
+ Py_DECREF(result_obj);
+ Py_DECREF(globals);
+ return module;
+ignore:
+ Py_XDECREF(globals);
+ PyErr_WriteUnraisable(module);
+ if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
+ Py_DECREF(module);
+ module = NULL;
+ }
+#else
+ py_code++;
+#endif
+ return module;
+}
+
+/* PatchGeneratorABC */
+ #ifndef CYTHON_REGISTER_ABCS
+#define CYTHON_REGISTER_ABCS 1
+#endif
+#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+static PyObject* __Pyx_patch_abc_module(PyObject *module);
+static PyObject* __Pyx_patch_abc_module(PyObject *module) {
+ module = __Pyx_Coroutine_patch_module(
+ module, ""
+"if _cython_generator_type is not None:\n"
+" try: Generator = _module.Generator\n"
+" except AttributeError: pass\n"
+" else: Generator.register(_cython_generator_type)\n"
+"if _cython_coroutine_type is not None:\n"
+" try: Coroutine = _module.Coroutine\n"
+" except AttributeError: pass\n"
+" else: Coroutine.register(_cython_coroutine_type)\n"
+ );
+ return module;
+}
+#endif
+static int __Pyx_patch_abc(void) {
+#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
+ static int abc_patched = 0;
+ if (CYTHON_REGISTER_ABCS && !abc_patched) {
+ PyObject *module;
+ module = PyImport_ImportModule((PY_MAJOR_VERSION >= 3) ? "collections.abc" : "collections");
+ if (!module) {
+ PyErr_WriteUnraisable(NULL);
+ if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
+ ((PY_MAJOR_VERSION >= 3) ?
+ "Cython module failed to register with collections.abc module" :
+ "Cython module failed to register with collections module"), 1) < 0)) {
+ return -1;
+ }
+ } else {
+ module = __Pyx_patch_abc_module(module);
+ abc_patched = 1;
+ if (unlikely(!module))
+ return -1;
+ Py_DECREF(module);
+ }
+ module = PyImport_ImportModule("backports_abc");
+ if (module) {
+ module = __Pyx_patch_abc_module(module);
+ Py_XDECREF(module);
+ }
+ if (!module) {
+ PyErr_Clear();
+ }
+ }
+#else
+ if ((0)) __Pyx_Coroutine_patch_module(NULL, NULL);
+#endif
+ return 0;
+}
+
+/* Generator */
+ static PyMethodDef __pyx_Generator_methods[] = {
+ {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
+ (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
+ {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
+ (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
+ {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
+ (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
+ {0, 0, 0, 0}
+};
+static PyMemberDef __pyx_Generator_memberlist[] = {
+ {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
+ {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
+ (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
+ {0, 0, 0, 0, 0}
+};
+static PyGetSetDef __pyx_Generator_getsets[] = {
+ {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
+ (char*) PyDoc_STR("name of the generator"), 0},
+ {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
+ (char*) PyDoc_STR("qualified name of the generator"), 0},
+ {0, 0, 0, 0, 0}
+};
+static PyTypeObject __pyx_GeneratorType_type = {
+ PyVarObject_HEAD_INIT(0, 0)
+ "generator",
+ sizeof(__pyx_CoroutineObject),
+ 0,
+ (destructor) __Pyx_Coroutine_dealloc,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
+ 0,
+ (traverseproc) __Pyx_Coroutine_traverse,
+ 0,
+ 0,
+ offsetof(__pyx_CoroutineObject, gi_weakreflist),
+ 0,
+ (iternextfunc) __Pyx_Generator_Next,
+ __pyx_Generator_methods,
+ __pyx_Generator_memberlist,
+ __pyx_Generator_getsets,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+ 0,
+#if CYTHON_USE_TP_FINALIZE
+ 0,
+#else
+ __Pyx_Coroutine_del,
+#endif
+ 0,
+#if CYTHON_USE_TP_FINALIZE
+ __Pyx_Coroutine_del,
+#elif PY_VERSION_HEX >= 0x030400a1
+ 0,
+#endif
+};
+static int __pyx_Generator_init(void) {
+ __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
+ __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
+ __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
+ if (unlikely(!__pyx_GeneratorType)) {
+ return -1;
+ }
+ return 0;
+}
+
+/* CheckBinaryVersion */
+ static int __Pyx_check_binary_version(void) {
+ char ctversion[4], rtversion[4];
+ PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
+ PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
+ if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
+ char message[200];
+ PyOS_snprintf(message, sizeof(message),
+ "compiletime version %s of module '%.100s' "
+ "does not match runtime version %s",
+ ctversion, __Pyx_MODULE_NAME, rtversion);
+ return PyErr_WarnEx(NULL, message, 1);
+ }
+ return 0;
+}
+
+/* InitStrings */
+ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
+ while (t->p) {
+ #if PY_MAJOR_VERSION < 3
+ if (t->is_unicode) {
+ *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
+ } else if (t->intern) {
+ *t->p = PyString_InternFromString(t->s);
+ } else {
+ *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
+ }
+ #else
+ if (t->is_unicode | t->is_str) {
+ if (t->intern) {
+ *t->p = PyUnicode_InternFromString(t->s);
+ } else if (t->encoding) {
+ *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
+ } else {
+ *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
+ }
+ } else {
+ *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
+ }
+ #endif
+ if (!*t->p)
+ return -1;
+ if (PyObject_Hash(*t->p) == -1)
+ PyErr_Clear();
+ ++t;
+ }
+ return 0;
+}
+
+static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
+ return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
+}
+static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
+ Py_ssize_t ignore;
+ return __Pyx_PyObject_AsStringAndSize(o, &ignore);
+}
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+#if !CYTHON_PEP393_ENABLED
+static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+ char* defenc_c;
+ PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
+ if (!defenc) return NULL;
+ defenc_c = PyBytes_AS_STRING(defenc);
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ {
+ char* end = defenc_c + PyBytes_GET_SIZE(defenc);
+ char* c;
+ for (c = defenc_c; c < end; c++) {
+ if ((unsigned char) (*c) >= 128) {
+ PyUnicode_AsASCIIString(o);
+ return NULL;
+ }
+ }
+ }
+#endif
+ *length = PyBytes_GET_SIZE(defenc);
+ return defenc_c;
+}
+#else
+static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+ if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ if (likely(PyUnicode_IS_ASCII(o))) {
+ *length = PyUnicode_GET_LENGTH(o);
+ return PyUnicode_AsUTF8(o);
+ } else {
+ PyUnicode_AsASCIIString(o);
+ return NULL;
+ }
+#else
+ return PyUnicode_AsUTF8AndSize(o, length);
+#endif
+}
+#endif
+#endif
+static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
+#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
+ if (
+#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
+ __Pyx_sys_getdefaultencoding_not_ascii &&
+#endif
+ PyUnicode_Check(o)) {
+ return __Pyx_PyUnicode_AsStringAndSize(o, length);
+ } else
+#endif
+#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
+ if (PyByteArray_Check(o)) {
+ *length = PyByteArray_GET_SIZE(o);
+ return PyByteArray_AS_STRING(o);
+ } else
+#endif
+ {
+ char* result;
+ int r = PyBytes_AsStringAndSize(o, &result, length);
+ if (unlikely(r < 0)) {
+ return NULL;
+ } else {
+ return result;
+ }
+ }
+}
+static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
+ int is_true = x == Py_True;
+ if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
+ else return PyObject_IsTrue(x);
+}
+static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
+#if PY_MAJOR_VERSION >= 3
+ if (PyLong_Check(result)) {
+ if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
+ "__int__ returned non-int (type %.200s). "
+ "The ability to return an instance of a strict subclass of int "
+ "is deprecated, and may be removed in a future version of Python.",
+ Py_TYPE(result)->tp_name)) {
+ Py_DECREF(result);
+ return NULL;
+ }
+ return result;
+ }
+#endif
+ PyErr_Format(PyExc_TypeError,
+ "__%.4s__ returned non-%.4s (type %.200s)",
+ type_name, type_name, Py_TYPE(result)->tp_name);
+ Py_DECREF(result);
+ return NULL;
+}
+static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
+#if CYTHON_USE_TYPE_SLOTS
+ PyNumberMethods *m;
+#endif
+ const char *name = NULL;
+ PyObject *res = NULL;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_Check(x) || PyLong_Check(x)))
+#else
+ if (likely(PyLong_Check(x)))
+#endif
+ return __Pyx_NewRef(x);
+#if CYTHON_USE_TYPE_SLOTS
+ m = Py_TYPE(x)->tp_as_number;
+ #if PY_MAJOR_VERSION < 3
+ if (m && m->nb_int) {
+ name = "int";
+ res = m->nb_int(x);
+ }
+ else if (m && m->nb_long) {
+ name = "long";
+ res = m->nb_long(x);
+ }
+ #else
+ if (likely(m && m->nb_int)) {
+ name = "int";
+ res = m->nb_int(x);
+ }
+ #endif
+#else
+ if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
+ res = PyNumber_Int(x);
+ }
+#endif
+ if (likely(res)) {
+#if PY_MAJOR_VERSION < 3
+ if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
+#else
+ if (unlikely(!PyLong_CheckExact(res))) {
+#endif
+ return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
+ }
+ }
+ else if (!PyErr_Occurred()) {
+ PyErr_SetString(PyExc_TypeError,
+ "an integer is required");
+ }
+ return res;
+}
+static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
+ Py_ssize_t ival;
+ PyObject *x;
+#if PY_MAJOR_VERSION < 3
+ if (likely(PyInt_CheckExact(b))) {
+ if (sizeof(Py_ssize_t) >= sizeof(long))
+ return PyInt_AS_LONG(b);
+ else
+ return PyInt_AsSsize_t(x);
+ }
+#endif
+ if (likely(PyLong_CheckExact(b))) {
+ #if CYTHON_USE_PYLONG_INTERNALS
+ const digit* digits = ((PyLongObject*)b)->ob_digit;
+ const Py_ssize_t size = Py_SIZE(b);
+ if (likely(__Pyx_sst_abs(size) <= 1)) {
+ ival = likely(size) ? digits[0] : 0;
+ if (size == -1) ival = -ival;
+ return ival;
+ } else {
+ switch (size) {
+ case 2:
+ if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -2:
+ if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case 3:
+ if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -3:
+ if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case 4:
+ if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
+ return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ case -4:
+ if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
+ return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
+ }
+ break;
+ }
+ }
+ #endif
+ return PyLong_AsSsize_t(b);
+ }
+ x = PyNumber_Index(b);
+ if (!x) return -1;
+ ival = PyInt_AsSsize_t(x);
+ Py_DECREF(x);
+ return ival;
+}
+static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
+ return PyInt_FromSize_t(ival);
+}
+
+
+#endif /* Py_PYTHON_H */
diff --git a/pyomo/repn/standard_repn.py b/pyomo/repn/standard_repn.py
new file mode 100644
index 00000000000..ad4624de27d
--- /dev/null
+++ b/pyomo/repn/standard_repn.py
@@ -0,0 +1,1455 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+
+from __future__ import division
+
+__all__ = ['StandardRepn', 'generate_standard_repn']
+
+
+import sys
+import logging
+import math
+import itertools
+
+from pyomo.core.base import (Constraint,
+ Objective,
+ ComponentMap)
+
+import pyomo.util
+from pyutilib.misc import Bunch
+from pyutilib.math.util import isclose as isclose_default
+
+from pyomo.core.expr import current as EXPR
+from pyomo.core.base.objective import (_GeneralObjectiveData,
+ SimpleObjective)
+from pyomo.core.base import _ExpressionData, Expression
+from pyomo.core.base.expression import SimpleExpression, _GeneralExpressionData
+from pyomo.core.base.var import (SimpleVar,
+ Var,
+ _GeneralVarData,
+ _VarData,
+ value)
+from pyomo.core.base.param import _ParamData
+from pyomo.core.base.numvalue import (NumericConstant,
+ native_numeric_types,
+ is_fixed)
+from pyomo.core.kernel.component_expression import IIdentityExpression, expression, noclone
+from pyomo.core.kernel.component_variable import IVariable
+from pyomo.core.kernel.component_objective import objective
+
+import six
+from six import iteritems
+from six import itervalues, iteritems, StringIO
+from six.moves import xrange, zip
+try:
+ basestring
+except:
+ basestring = str
+
+logger = logging.getLogger('pyomo.core')
+
+using_py3 = six.PY3
+
+from pyomo.core.base import _VarData, _GeneralVarData, SimpleVar
+from pyomo.core.kernel.component_variable import IVariable, variable
+
+
+#
+# This checks if the first argument is a numeric value. If not
+# then this is a Pyomo constant expression, and we can only check if its
+# close to 'b' when it is constant.
+#
+def isclose_const(a, b, rel_tol=1e-9, abs_tol=0.0):
+ if not a.__class__ in native_numeric_types:
+ if a.is_constant():
+ a = value(a)
+ else:
+ return False
+ # Copied from pyutilib.math.isclose
+ return abs(a-b) <= max( rel_tol * max(abs(a), abs(b)), abs_tol )
+
+#
+# The global isclose() function used below. This is either isclose_default
+# (defined in pyutilib) or isclose_const
+#
+isclose = isclose_default
+
+
+class StandardRepn(object):
+ """
+ This class defines a standard/common representation for Pyomo expressions
+ that provides an efficient interface for writing all models.
+
+ TODO: define what "efficient" means to us.
+ """
+
+ __slots__ = ('constant', # The constant term
+ 'linear_coefs', # Linear coefficients
+ 'linear_vars', # Linear variables
+ 'quadratic_coefs', # Quadratic coefficients
+ 'quadratic_vars', # Quadratic variables
+ 'nonlinear_expr', # Nonlinear expression
+ 'nonlinear_vars') # Variables that appear in the nonlinear expression
+
+ def __init__(self):
+ self.constant = 0
+ self.linear_vars = tuple()
+ self.linear_coefs = tuple()
+ self.quadratic_vars = tuple()
+ self.quadratic_coefs = tuple()
+ self.nonlinear_expr = None
+ self.nonlinear_vars = tuple()
+
+ def __getstate__(self):
+ """
+ This method is required because this class uses slots.
+ """
+ return (self.constant,
+ self.linear_coefs,
+ self.linear_vars,
+ self.quadratic_coefs,
+ self.quadratic_vars,
+ self.nonlinear_expr,
+ self.nonlinear_vars)
+
+ def __setstate__(self, state):
+ """
+ This method is required because this class uses slots.
+ """
+ self.constant, \
+ self.linear_coefs, \
+ self.linear_vars, \
+ self.quadratic_coefs, \
+ self.quadratic_vars, \
+ self.nonlinear_expr, \
+ self.nonlinear_vars = state
+
+ #
+ # Generate a string representation of the expression
+ #
+ def __str__(self): #pragma: nocover
+ output = StringIO()
+ output.write("\n")
+ output.write("constant: "+str(self.constant)+"\n")
+ output.write("linear vars: "+str([v_.name for v_ in self.linear_vars])+"\n")
+ output.write("linear var ids: "+str([id(v_) for v_ in self.linear_vars])+"\n")
+ output.write("linear coef: "+str(list(self.linear_coefs))+"\n")
+ output.write("quadratic vars: "+str([(v_[0].name,v_[1].name) for v_ in self.quadratic_vars])+"\n")
+ output.write("quadratic var ids: "+str([(id(v_[0]), id(v_[1])) for v_ in self.quadratic_vars])+"\n")
+ output.write("quadratic coef: "+str(list(self.quadratic_coefs))+"\n")
+ if self.nonlinear_expr is None:
+ output.write("nonlinear expr: None\n")
+ else:
+ output.write("nonlinear expr:\n")
+ try:
+ output.write(self.nonlinear_expr.to_string())
+ output.write("\n")
+ except AttributeError:
+ output.write(str(self.nonlinear_expr))
+ output.write("\n")
+ output.write("nonlinear vars: "+str([v_.name for v_ in self.nonlinear_vars])+"\n")
+ output.write("\n")
+
+ ret_str = output.getvalue()
+ output.close()
+ return ret_str
+
+ def is_fixed(self):
+ if len(self.linear_vars) == 0 and len(self.nonlinear_vars) == 0 and len(self.quadratic_vars) == 0:
+ return True
+ return False
+
+ def polynomial_degree(self):
+ if not self.nonlinear_expr is None:
+ return None
+ if len(self.quadratic_coefs) > 0:
+ return 2
+ if len(self.linear_coefs) > 0:
+ return 1
+ return 0
+
+ def is_constant(self):
+ return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0 and len(self.linear_coefs) == 0
+
+ def is_linear(self):
+ return self.nonlinear_expr is None and len(self.quadratic_coefs) == 0
+
+ def is_quadratic(self):
+ return len(self.quadratic_coefs) > 0 and self.nonlinear_expr is None
+
+ def is_nonlinear(self):
+ return not (self.nonlinear_expr is None and len(self.quadratic_coefs) == 0)
+
+ def to_expression(self, sort=True):
+ #
+ # When an standard representation is created, the ordering of the
+ # linear and quadratic terms may not be preserved. Hence, the
+ # sorting option ensures that an expression generated from a
+ # standard representation has a consistent order.
+ #
+ # TODO: Should this replace non-mutable parameters with constants?
+ #
+ expr = self.constant
+
+ lvars = [(i,v) for i,v in enumerate(self.linear_vars)]
+ if sort:
+ lvars = sorted(lvars, key=lambda x: str(x[1]))
+ for i,v in lvars:
+ c = self.linear_coefs[i]
+ if c.__class__ in native_numeric_types:
+ if isclose_const(c, 1.0):
+ expr += v
+ elif isclose_const(c, -1.0):
+ expr -= v
+ elif c < 0.0:
+ expr -= - c*v
+ else:
+ expr += c*v
+ else:
+ expr += c*v
+
+ qvars = [(i,v) for i,v in enumerate(self.quadratic_vars)]
+ if sort:
+ qvars = sorted(qvars, key=lambda x: (str(x[1][0]), str(x[1][1])))
+ for i,v in qvars:
+ if id(v[0]) == id(v[1]):
+ term = v[0]**2
+ else:
+ term = v[0]*v[1]
+ c = self.quadratic_coefs[i]
+ if c.__class__ in native_numeric_types:
+ if isclose_const(c, 1.0):
+ expr += term
+ elif isclose_const(c, -1.0):
+ expr -= term
+ else:
+ expr += c*term
+ else:
+ expr += c*term
+
+ if not self.nonlinear_expr is None:
+ expr += self.nonlinear_expr
+ return expr
+
+
+"""
+
+Note: This function separates linear terms from nonlinear terms.
+Along the way, fixed variable and mutable parameter values *may* be
+replaced with constants. However, that is not guaranteed. Thus,
+the nonlinear expression may contain subexpressions whose value is
+constant. This was done to avoid additional work when a subexpression
+is clearly nonlinear. However, this requires that standard
+representations be temporary. They should be used to interface
+to a solver and then be deleted.
+
+"""
+#@profile
+def generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None):
+ #
+ # Use a custom Results object
+ #
+ global Results
+ if quadratic:
+ Results = ResultsWithQuadratics
+ else:
+ Results = ResultsWithoutQuadratics
+ #
+ # Use a custom isclose function
+ #
+ global isclose
+ if compute_values:
+ isclose = isclose_default
+ else:
+ isclose = isclose_const
+
+ if True:
+ #
+ # Setup
+ #
+ if idMap is None:
+ idMap = {}
+ idMap.setdefault(None, {})
+ if repn is None:
+ repn = StandardRepn()
+ #
+ # The expression is a number or a non-variable constant
+ # expression.
+ #
+ if expr.__class__ in native_numeric_types or not expr.is_potentially_variable():
+ if compute_values:
+ repn.constant = EXPR.evaluate_expression(expr)
+ else:
+ repn.constant = expr
+ return repn
+ #
+ # The expression is a variable
+ #
+ elif expr.is_variable_type():
+ if expr.fixed:
+ if compute_values:
+ repn.constant = value(expr)
+ else:
+ repn.constant = expr
+ return repn
+ repn.linear_coefs = (1,)
+ repn.linear_vars = (expr,)
+ return repn
+ #
+ # The expression is linear
+ #
+ elif expr.__class__ is EXPR.LinearExpression:
+ if compute_values:
+ C_ = EXPR.evaluate_expression(expr.constant)
+ else:
+ C_ = expr.constant
+ if compute_values:
+ linear_coefs = {}
+ for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ if c.__class__ in native_numeric_types:
+ cval = c
+ elif c.is_expression_type():
+ cval = EXPR.evaluate_expression(c)
+ else:
+ cval = value(c)
+ if v.fixed:
+ C_ += cval * v.value
+ else:
+ id_ = id(v)
+ if not id_ in idMap[None]:
+ key = len(idMap) - 1
+ idMap[None][id_] = key
+ idMap[key] = v
+ else:
+ key = idMap[None][id_]
+ if key in linear_coefs:
+ linear_coefs[key] += cval
+ else:
+ linear_coefs[key] = cval
+ keys = list(linear_coefs.keys())
+ repn.linear_vars = tuple(idMap[key] for key in keys)
+ repn.linear_coefs = tuple(linear_coefs[key] for key in keys)
+ else:
+ linear_coefs = {}
+ for c,v in zip(expr.linear_coefs, expr.linear_vars):
+ if v.fixed:
+ C_ += c*v
+ else:
+ id_ = id(v)
+ if not id_ in idMap[None]:
+ key = len(idMap) - 1
+ idMap[None][id_] = key
+ idMap[key] = v
+ else:
+ key = idMap[None][id_]
+ if key in linear_coefs:
+ linear_coefs[key] += c
+ else:
+ linear_coefs[key] = c
+ keys = list(linear_coefs.keys())
+ repn.linear_vars = tuple(idMap[key] for key in keys)
+ repn.linear_coefs = tuple(linear_coefs[key] for key in keys)
+ repn.constant = C_
+ return repn
+
+ #
+ # Unknown expression object
+ #
+ elif not expr.is_expression_type(): #pragma: nocover
+ raise ValueError("Unexpected expression type: "+str(expr))
+
+ #
+ # WEH - Checking the polynomial degree didn't
+ # turn out to be a win. But I'm leaving this
+ # in as a comment for now, since we're not
+ # done tuning this code.
+ #
+ #degree = expr.polynomial_degree()
+ #if degree == 1:
+ # return _generate_linear_standard_repn(expr,
+ # idMap=idMap,
+ # compute_values=compute_values,
+ # verbose=verbose,
+ # repn=repn)
+ #else:
+ return _generate_standard_repn(expr,
+ idMap=idMap,
+ compute_values=compute_values,
+ verbose=verbose,
+ quadratic=quadratic,
+ repn=repn)
+
+##-----------------------------------------------------------------------
+##
+## Logic for _generate_standard_repn
+##
+##-----------------------------------------------------------------------
+
+class ResultsWithQuadratics(object):
+ __slot__ = ('const', 'nonl', 'linear', 'quadratic')
+
+ def __init__(self, constant=0, nonl=0, linear=None, quadratic=None):
+ self.constant = constant
+ self.nonl = nonl
+ self.linear = {}
+ #if linear is None:
+ # self.linear = {}
+ #else:
+ # self.linear = linear
+ self.quadratic = {}
+ #if quadratic is None:
+ # self.quadratic = {}
+ #else:
+ # self.quadratic = quadratic
+
+ def __str__(self): #pragma: nocover
+ return "Const:\t%f\nLinear:\t%s\nQuadratic:\t%s\nNonlinear:\t%s" % (self.constant, str(self.linear), str(self.quadratic), str(self.nonl))
+
+class ResultsWithoutQuadratics(object):
+ __slot__ = ('const', 'nonl', 'linear')
+
+ def __init__(self, constant=0, nonl=0, linear=None):
+ self.constant = constant
+ self.nonl = nonl
+ self.linear = {}
+ #if linear is None:
+ # self.linear = {}
+ #else:
+ # self.linear = linear
+
+ def __str__(self): #pragma: nocover
+ return "Const:\t%f\nLinear:\t%s\nNonlinear:\t%s" % (self.constant, str(self.linear), str(self.nonl))
+
+Results = ResultsWithQuadratics
+
+
+#@profile
+def _collect_sum(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ ans = Results()
+ nonl = []
+ varkeys = idMap[None]
+
+ for e_ in itertools.islice(exp._args_, exp.nargs()):
+ if e_.__class__ is EXPR.MonomialTermExpression:
+ lhs, v = e_._args_
+ if compute_values and not lhs.__class__ in native_numeric_types:
+ lhs = value(lhs)
+ if v.fixed:
+ if compute_values:
+ ans.constant += multiplier*lhs*value(v)
+ else:
+ ans.constant += multiplier*lhs*v
+ else:
+ id_ = id(v)
+ if id_ in varkeys:
+ key = varkeys[id_]
+ else:
+ key = len(idMap) - 1
+ varkeys[id_] = key
+ idMap[key] = v
+ if key in ans.linear:
+ ans.linear[key] += multiplier*lhs
+ else:
+ ans.linear[key] = multiplier*lhs
+ elif e_.__class__ in native_numeric_types:
+ ans.constant += multiplier*e_
+ elif e_.is_variable_type():
+ if e_.fixed:
+ if compute_values:
+ ans.constant += multiplier*e_.value
+ else:
+ ans.constant += multiplier*e_
+ else:
+ id_ = id(e_)
+ if id_ in varkeys:
+ key = varkeys[id_]
+ else:
+ key = len(idMap) - 1
+ varkeys[id_] = key
+ idMap[key] = e_
+ if key in ans.linear:
+ ans.linear[key] += multiplier
+ else:
+ ans.linear[key] = multiplier
+ elif not e_.is_potentially_variable():
+ if compute_values:
+ ans.constant += multiplier * value(e_)
+ else:
+ ans.constant += multiplier * e_
+ else:
+ res_ = _collect_standard_repn(e_, multiplier, idMap,
+ compute_values, verbose, quadratic)
+ #
+ # Add returned from recursion
+ #
+ ans.constant += res_.constant
+ if not (res_.nonl is 0 or res_.nonl.__class__ in native_numeric_types and res_.nonl == 0):
+ nonl.append(res_.nonl)
+ for i in res_.linear:
+ ans.linear[i] = ans.linear.get(i,0) + res_.linear[i]
+ if quadratic:
+ for i in res_.quadratic:
+ ans.quadratic[i] = ans.quadratic.get(i, 0) + res_.quadratic[i]
+
+ if len(nonl) > 0:
+ if len(nonl) == 1:
+ ans.nonl = nonl[0]
+ else:
+ ans.nonl = EXPR.SumExpression(nonl)
+ return ans
+
+#@profile
+def _collect_term(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ #
+ # LHS is a numeric value
+ #
+ if exp._args_[0].__class__ in native_numeric_types:
+ if exp._args_[0] == 0:
+ return Results()
+ return _collect_standard_repn(exp._args_[1], multiplier * exp._args_[0], idMap,
+ compute_values, verbose, quadratic)
+ #
+ # LHS is a non-variable expression
+ #
+ else:
+ if compute_values:
+ val = value(exp._args_[0])
+ if val == 0:
+ return Results()
+ return _collect_standard_repn(exp._args_[1], multiplier * val, idMap,
+ compute_values, verbose, quadratic)
+ else:
+ return _collect_standard_repn(exp._args_[1], multiplier*exp._args_[0], idMap,
+ compute_values, verbose, quadratic)
+
+def _collect_prod(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ #
+ # LHS is a numeric value
+ #
+ if exp._args_[0].__class__ in native_numeric_types:
+ if exp._args_[0] == 0:
+ return Results()
+ return _collect_standard_repn(exp._args_[1], multiplier * exp._args_[0], idMap,
+ compute_values, verbose, quadratic)
+ #
+ # RHS is a numeric value
+ #
+ if exp._args_[1].__class__ in native_numeric_types:
+ if exp._args_[1] == 0:
+ return Results()
+ return _collect_standard_repn(exp._args_[0], multiplier * exp._args_[1], idMap,
+ compute_values, verbose, quadratic)
+ #
+ # LHS is a non-variable expression
+ #
+ elif not exp._args_[0].is_potentially_variable():
+ if compute_values:
+ val = value(exp._args_[0])
+ if val == 0:
+ return Results()
+ return _collect_standard_repn(exp._args_[1], multiplier * val, idMap,
+ compute_values, verbose, quadratic)
+ else:
+ return _collect_standard_repn(exp._args_[1], multiplier*exp._args_[0], idMap,
+ compute_values, verbose, quadratic)
+ #
+ # RHS is a non-variable expression
+ #
+ elif not exp._args_[1].is_potentially_variable():
+ if compute_values:
+ val = value(exp._args_[1])
+ if val == 0:
+ return Results()
+ return _collect_standard_repn(exp._args_[0], multiplier * val, idMap,
+ compute_values, verbose, quadratic)
+ else:
+ return _collect_standard_repn(exp._args_[0], multiplier*exp._args_[1], idMap,
+ compute_values, verbose, quadratic)
+ #
+ # Both the LHS and RHS are potentially variable ...
+ #
+ # Collect LHS
+ #
+ lhs = _collect_standard_repn(exp._args_[0], 1, idMap,
+ compute_values, verbose, quadratic)
+ lhs_nonl_None = lhs.nonl.__class__ in native_numeric_types and lhs.nonl == 0
+ #
+ # LHS is potentially variable, but it turns out to be a constant
+ # because the variables were fixed.
+ #
+ if lhs_nonl_None and len(lhs.linear) == 0 and (not quadratic or len(lhs.quadratic) == 0):
+ if lhs.constant.__class__ in native_numeric_types and lhs.constant == 0:
+ return Results()
+ if compute_values:
+ val = value(lhs.constant)
+ if val == 0:
+ return Results()
+ return _collect_standard_repn(exp._args_[1], multiplier*val, idMap,
+ compute_values, verbose, quadratic)
+ else:
+ return _collect_standard_repn(exp._args_[1], multiplier*lhs.constant, idMap,
+ compute_values, verbose, quadratic)
+ #
+ # Collect RHS
+ #
+ if exp._args_[1].__class__ in native_numeric_types:
+ rhs = Results(constant=exp._args_[1])
+ elif not exp._args_[1].is_potentially_variable():
+ if compute_values:
+ rhs = Results(constant=value(exp._args_[1]))
+ else:
+ rhs = Results(constant=exp._args_[1])
+ else:
+ rhs = _collect_standard_repn(exp._args_[1], 1, idMap,
+ compute_values, verbose, quadratic)
+ rhs_nonl_None = rhs.nonl.__class__ in native_numeric_types and rhs.nonl == 0
+ #
+ # If RHS is zero, then return an empty results
+ #
+ if rhs_nonl_None and len(rhs.linear) == 0 and (not quadratic or len(rhs.quadratic) == 0) and rhs.constant.__class__ in native_numeric_types and rhs.constant == 0:
+ return Results()
+ #
+ # If either the LHS or RHS are nonlinear, then simply return the nonlinear expression
+ #
+ if not lhs_nonl_None or not rhs_nonl_None:
+ return Results(nonl=multiplier*exp)
+ #
+ # If not collecting quadratic terms and both terms are linear, then simply return the nonlinear expression
+ #
+ if not quadratic and len(lhs.linear) > 0 and len(rhs.linear) > 0:
+ # NOTE: We treat a product of linear terms as nonlinear unless quadratic==2
+ return Results(nonl=multiplier*exp)
+
+ ans = Results()
+ ans.constant = multiplier*lhs.constant * rhs.constant
+ if not (lhs.constant.__class__ in native_numeric_types and lhs.constant == 0):
+ for key, coef in six.iteritems(rhs.linear):
+ ans.linear[key] = multiplier*coef*lhs.constant
+ if not (rhs.constant.__class__ in native_numeric_types and rhs.constant == 0):
+ for key, coef in six.iteritems(lhs.linear):
+ if key in ans.linear:
+ ans.linear[key] += multiplier*coef*rhs.constant
+ else:
+ ans.linear[key] = multiplier*coef*rhs.constant
+
+ if quadratic:
+ if not (lhs.constant.__class__ in native_numeric_types and lhs.constant == 0):
+ for key, coef in six.iteritems(rhs.quadratic):
+ ans.quadratic[key] = multiplier*coef*lhs.constant
+ if not (rhs.constant.__class__ in native_numeric_types and rhs.constant == 0):
+ for key, coef in six.iteritems(lhs.quadratic):
+ if key in ans.quadratic:
+ ans.quadratic[key] += multiplier*coef*rhs.constant
+ else:
+ ans.quadratic[key] = multiplier*coef*rhs.constant
+ for lkey, lcoef in six.iteritems(lhs.linear):
+ for rkey, rcoef in six.iteritems(rhs.linear):
+ if lkey <= rkey:
+ ans.quadratic[lkey,rkey] = multiplier*lcoef*rcoef
+ else:
+ ans.quadratic[rkey,lkey] = multiplier*lcoef*rcoef
+ # TODO - Use quicksum here?
+ el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ el_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(lhs.quadratic))
+ er_quadratic = multiplier*sum(coef*idMap[key[0]]*idMap[key[1]] for key, coef in six.iteritems(rhs.quadratic))
+ ans.nonl += el_linear*er_quadratic + el_quadratic*er_linear
+ elif len(lhs.linear) + len(rhs.linear) > 1:
+ return Results(nonl=multiplier*exp)
+ #el_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(lhs.linear))
+ #er_linear = multiplier*sum(coef*idMap[key] for key, coef in six.iteritems(rhs.linear))
+ #ans.nonl += el_linear*er_linear
+
+ return ans
+
+#@profile
+def _collect_var(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ ans = Results()
+
+ if exp.fixed:
+ if compute_values:
+ ans.constant += multiplier*value(exp)
+ else:
+ ans.constant += multiplier*exp
+ else:
+ id_ = id(exp)
+ if id_ in idMap[None]:
+ key = idMap[None][id_]
+ else:
+ key = len(idMap) - 1
+ idMap[None][id_] = key
+ idMap[key] = exp
+ if key in ans.linear:
+ ans.linear[key] += multiplier
+ else:
+ ans.linear[key] = multiplier
+
+ return ans
+
+def _collect_pow(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ if exp._args_[1].__class__ in native_numeric_types:
+ exponent = exp._args_[1]
+ elif not exp._args_[1].is_potentially_variable():
+ if compute_values:
+ exponent = value(exp._args_[1])
+ else:
+ exponent = exp._args_[1]
+ else:
+ res = _collect_standard_repn(exp._args_[1], 1, idMap, compute_values, verbose, quadratic)
+ if not (res.nonl.__class__ in native_numeric_types and res.nonl == 0) or len(res.linear) > 0 or (quadratic and len(res.quadratic) > 0):
+ # The exponent is variable, so this is a nonlinear expression
+ return Results(nonl=multiplier*exp)
+ exponent = res.constant
+
+ if exponent.__class__ in native_numeric_types:
+ if exponent == 0:
+ return Results(constant=multiplier)
+ elif exponent == 1:
+ return _collect_standard_repn(exp._args_[0], multiplier, idMap, compute_values, verbose, quadratic)
+ # If the exponent is >= 2, then this is a nonlinear expression
+ elif exponent == 2:
+ if quadratic:
+ # NOTE: We treat a product of linear terms as nonlinear unless quadratic==2
+ res =_collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ if not (res.nonl.__class__ in native_numeric_types and res.nonl == 0) or len(res.quadratic) > 0:
+ return Results(nonl=multiplier*exp)
+ ans = Results()
+ if not (res.constant.__class__ in native_numeric_types and res.constant == 0):
+ ans.constant = multiplier*res.constant*res.constant
+ for key, coef in six.iteritems(res.linear):
+ ans.linear[key] = 2*multiplier*coef*res.constant
+ for key, coef in six.iteritems(res.linear):
+ ans.quadratic[key,key] = multiplier*coef
+ return ans
+ elif exp._args_[0].is_fixed():
+ if compute_values:
+ return Results(constant=multiplier*value(exp._args_[0])**2)
+ else:
+ return Results(constant=multiplier*exp)
+
+ return Results(nonl=multiplier*exp)
+
+def _collect_reciprocal(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ if exp._args_[0].__class__ in native_numeric_types or not exp._args_[0].is_potentially_variable():
+ if compute_values:
+ denom = 1.0 * value(exp._args_[0])
+ else:
+ denom = 1.0 * exp._args_[0]
+ else:
+ res =_collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ if not (res.nonl.__class__ in native_numeric_types and res.nonl == 0) or len(res.linear) > 0 or (quadratic and len(res.quadratic) > 0):
+ return Results(nonl=multiplier*exp)
+ else:
+ denom = 1.0*res.constant
+ if denom.__class__ in native_numeric_types and denom == 0:
+ raise ZeroDivisionError()
+ return Results(constant=multiplier/denom)
+
+def _collect_branching_expr(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ if exp._if.__class__ in native_numeric_types:
+ if_val = exp._if
+ elif not exp._if.is_potentially_variable():
+ if compute_values:
+ if_val = value(exp._if)
+ else:
+ return Results(nonl=multiplier*exp)
+ else:
+ res = _collect_standard_repn(exp._if, 1, idMap, compute_values, verbose, quadratic)
+ if not (res.nonl.__class__ in native_numeric_types and res.nonl == 0) or len(res.linear) > 0 or (quadratic and len(res.quadratic) > 0):
+ return Results(nonl=multiplier*exp)
+ else:
+ if_val = res.constant
+ if if_val:
+ return _collect_standard_repn(exp._then, multiplier, idMap, compute_values, verbose, quadratic)
+ else:
+ return _collect_standard_repn(exp._else, multiplier, idMap, compute_values, verbose, quadratic)
+
+def _collect_nonl(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ res = _collect_standard_repn(exp._args_[0], 1, idMap, compute_values, verbose, quadratic)
+ if not (res.nonl.__class__ in native_numeric_types and res.nonl == 0) or len(res.linear) > 0 or (quadratic and len(res.quadratic) > 0):
+ return Results(nonl=multiplier*exp)
+ if compute_values:
+ return Results(constant=multiplier*exp._apply_operation([res.constant]))
+ else:
+ return Results(constant=multiplier*exp)
+
+def _collect_negation(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ return _collect_standard_repn(exp._args_[0], -1*multiplier, idMap, compute_values, verbose, quadratic)
+
+def _collect_const(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ if compute_values:
+ return Results(constant=value(exp))
+ else:
+ return Results(constant=exp)
+
+def _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ if exp._args_[0].__class__ in native_numeric_types:
+ return Results(constant=exp._args_[0])
+ if not exp._args_[0].is_potentially_variable():
+ if compute_values:
+ return Results(constant=value(exp._args_[0]))
+ else:
+ return Results(constant=exp._args_[0])
+ return _collect_standard_repn(exp.expr, multiplier, idMap, compute_values, verbose, quadratic)
+
+def _collect_linear(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ ans = Results()
+ if compute_values:
+ ans.constant = multiplier*value(exp.constant)
+ else:
+ ans.constant = multiplier*exp.constant
+
+ for c,v in zip(exp.linear_coefs, exp.linear_vars):
+ if v.fixed:
+ if compute_values:
+ ans.constant += multiplier*v.value
+ else:
+ ans.constant += multiplier*v
+ else:
+ id_ = id(v)
+ if id_ in idMap[None]:
+ key = idMap[None][id_]
+ else:
+ key = len(idMap) - 1
+ idMap[None][id_] = key
+ idMap[key] = v
+ if compute_values:
+ if key in ans.linear:
+ ans.linear[key] += multiplier*value(c)
+ else:
+ ans.linear[key] = multiplier*value(c)
+ else:
+ if key in ans.linear:
+ ans.linear[key] += multiplier*c
+ else:
+ ans.linear[key] = multiplier*c
+ return ans
+
+def _collect_comparison(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ return Results(nonl=multiplier*exp)
+
+def _collect_external_fn(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ return Results(nonl=multiplier*exp)
+
+def _collect_linear_sum(exp, multiplier, idMap, compute_values, verbose, quadratic):
+ ans = Results()
+ varkeys = idMap[None]
+
+ for e_ in itertools.islice(exp._args_, exp.nargs()):
+ c,v = e_
+ if not v is None:
+ if v.fixed:
+ if compute_values:
+ ans.constant += multiplier*c*v.value
+ else:
+ ans.constant += multiplier*c*v
+ else:
+ id_ = id(v)
+ if id_ in varkeys:
+ key = varkeys[id_]
+ else:
+ key = len(idMap) - 1
+ varkeys[id_] = key
+ idMap[key] = v
+ if key in ans.linear:
+ ans.linear[key] += multiplier*c
+ else:
+ ans.linear[key] = multiplier*c
+ elif c.__class__ in native_numeric_types:
+ ans.constant += multiplier*c
+ else: # not c.is_potentially_variable()
+ if compute_values:
+ ans.constant += multiplier * value(c)
+ else:
+ ans.constant += multiplier * c
+
+ return ans
+
+
+_repn_collectors = {
+ EXPR.SumExpression : _collect_sum,
+ EXPR.ProductExpression : _collect_prod,
+ EXPR.MonomialTermExpression : _collect_term,
+ EXPR.PowExpression : _collect_pow,
+ EXPR.ReciprocalExpression : _collect_reciprocal,
+ EXPR.Expr_ifExpression : _collect_branching_expr,
+ EXPR.UnaryFunctionExpression : _collect_nonl,
+ EXPR.AbsExpression : _collect_nonl,
+ EXPR.NegationExpression : _collect_negation,
+ EXPR.LinearExpression : _collect_linear,
+ EXPR.InequalityExpression : _collect_comparison,
+ EXPR.RangedExpression : _collect_comparison,
+ EXPR.EqualityExpression : _collect_comparison,
+ EXPR.ExternalFunctionExpression : _collect_external_fn,
+ #EXPR.LinearSumExpression : _collect_linear_sum,
+ #_ConnectorData : _collect_linear_connector,
+ #SimpleConnector : _collect_linear_connector,
+ #param._ParamData : _collect_linear_const,
+ #param.SimpleParam : _collect_linear_const,
+ #param.Param : _collect_linear_const,
+ #parameter : _collect_linear_const,
+ NumericConstant : _collect_const,
+ _GeneralVarData : _collect_var,
+ SimpleVar : _collect_var,
+ Var : _collect_var,
+ variable : _collect_var,
+ IVariable : _collect_var,
+ _GeneralExpressionData : _collect_identity,
+ SimpleExpression : _collect_identity,
+ expression : _collect_identity,
+ noclone : _collect_identity,
+ _ExpressionData : _collect_identity,
+ Expression : _collect_identity,
+ _GeneralObjectiveData : _collect_identity,
+ SimpleObjective : _collect_identity,
+ objective : _collect_identity,
+ }
+
+
+def _collect_standard_repn(exp, multiplier, idMap,
+ compute_values, verbose, quadratic):
+ try:
+ return _repn_collectors[exp.__class__](exp, multiplier, idMap,
+ compute_values, verbose, quadratic)
+ except KeyError:
+ #
+ # These are types that might be extended using duck typing.
+ #
+ if exp.is_variable_type():
+ return _collect_var(exp, multiplier, idMap, compute_values, verbose, quadratic)
+ if exp.is_named_expression_type():
+ return _collect_identity(exp, multiplier, idMap, compute_values, verbose, quadratic)
+ raise ValueError( "Unexpected expression (type %s)" % type(exp).__name__)
+
+
+def _generate_standard_repn(expr, idMap=None, compute_values=True, verbose=False, quadratic=True, repn=None):
+ if expr.__class__ is EXPR.SumExpression:
+ #
+ # This is the common case, so start collecting the sum
+ #
+ ans = _collect_sum(expr, 1, idMap, compute_values, verbose, quadratic)
+ else:
+ #
+ # Call generic recursive logic
+ #
+ ans = _collect_standard_repn(expr, 1, idMap, compute_values, verbose, quadratic)
+ #
+ # Create the final object here from 'ans'
+ #
+ repn.constant = ans.constant
+ #
+ # Create a list (tuple) of the variables and coefficients
+ #
+ v = []
+ c = []
+ for key in ans.linear:
+ val = ans.linear[key]
+ if val.__class__ in native_numeric_types:
+ if val == 0:
+ continue
+ elif val.is_constant():
+ if value(val) == 0:
+ continue
+ v.append(idMap[key])
+ c.append(ans.linear[key])
+ repn.linear_vars = tuple(v)
+ repn.linear_coefs = tuple(c)
+
+ if quadratic:
+ repn.quadratic_vars = []
+ repn.quadratic_coefs = []
+ for key in ans.quadratic:
+ val = ans.quadratic[key]
+ if val.__class__ in native_numeric_types:
+ if val == 0:
+ continue
+ elif val.is_constant():
+ if value(val) == 0:
+ continue
+ repn.quadratic_vars.append( (idMap[key[0]],idMap[key[1]]) )
+ repn.quadratic_coefs.append( val )
+ repn.quadratic_vars = tuple(repn.quadratic_vars)
+ repn.quadratic_coefs = tuple(repn.quadratic_coefs)
+ v = []
+ c = []
+ for key in ans.quadratic:
+ v.append((idMap[key[0]], idMap[key[1]]))
+ c.append(ans.quadratic[key])
+ repn.quadratic_vars = tuple(v)
+ repn.quadratic_coefs = tuple(c)
+
+ if ans.nonl is not None and not isclose_const(ans.nonl,0):
+ repn.nonlinear_expr = ans.nonl
+ repn.nonlinear_vars = []
+ for v_ in EXPR.identify_variables(repn.nonlinear_expr, include_fixed=False):
+ repn.nonlinear_vars.append(v_)
+ #
+ # Update idMap in case we skipped nonlinear sub-expressions
+ #
+ # Q: Should we skip nonlinear sub-expressions?
+ #
+ id_ = id(v_)
+ if id_ in idMap[None]:
+ key = idMap[None][id_]
+ else:
+ key = len(idMap) - 1
+ idMap[None][id_] = key
+ idMap[key] = v_
+ repn.nonlinear_vars = tuple(repn.nonlinear_vars)
+
+ return repn
+
+
+"""
+WEH - This code assumes the expression is linear and fills in a dictionary.
+ This avoids creating temporary Results objects, but in practice that's
+ not a big win. Hence, this is deprecated.
+
+##-----------------------------------------------------------------------
+##
+## Logic for _generate_linear_standard_repn
+##
+##-----------------------------------------------------------------------
+
+def _linear_collect_sum(exp, multiplier, idMap, compute_values, verbose, coef):
+ varkeys = idMap[None]
+
+ for e_ in itertools.islice(exp._args_, exp.nargs()):
+ if e_.__class__ in native_numeric_types:
+ coef[None] += multiplier*e_
+
+ elif e_.is_variable_type():
+ if e_.fixed:
+ if compute_values:
+ coef[None] += multiplier*e_.value
+ else:
+ coef[None] += multiplier*e_
+ else:
+ id_ = id(e_)
+ if id_ in varkeys:
+ key = varkeys[id_]
+ else:
+ key = len(idMap) - 1
+ varkeys[id_] = key
+ idMap[key] = e_
+ if key in coef:
+ coef[key] += multiplier
+ else:
+ coef[key] = multiplier
+
+ elif not e_.is_potentially_variable():
+ if compute_values:
+ coef[None] += multiplier * value(e_)
+ else:
+ coef[None] += multiplier * e_
+
+ elif e_.__class__ is EXPR.NegationExpression:
+ arg = e_._args_[0]
+ if arg.is_variable_type():
+ if arg.fixed:
+ if compute_values:
+ coef[None] -= multiplier*arg.value
+ else:
+ coef[None] -= multiplier*arg
+ else:
+ id_ = id(arg)
+ if id_ in varkeys:
+ key = varkeys[id_]
+ else:
+ key = len(idMap) - 1
+ varkeys[id_] = key
+ idMap[key] = arg
+ if key in coef:
+ coef[key] -= multiplier
+ else:
+ coef[key] = -1 * multiplier
+ else:
+ _collect_linear_standard_repn(arg, -1*multiplier, idMap, compute_values, verbose, coef)
+
+ elif e_.__class__ is EXPR.MonomialTermExpression:
+ if compute_values:
+ lhs = value(e_._args_[0])
+ else:
+ lhs = e_._args_[0]
+ if e_._args_[1].fixed:
+ if compute_values:
+ coef[None] += multiplier*lhs*value(e_._args_[1])
+ else:
+ coef[None] += multiplier*lhs*e_._args_[1]
+ else:
+ id_ = id(e_._args_[1])
+ if id_ in varkeys:
+ key = varkeys[id_]
+ else:
+ key = len(idMap) - 1
+ varkeys[id_] = key
+ idMap[key] = e_._args_[1]
+ if key in coef:
+ coef[key] += multiplier*lhs
+ else:
+ coef[key] = multiplier*lhs
+
+ else:
+ _collect_linear_standard_repn(e_, multiplier, idMap, compute_values, verbose, coef)
+
+def _linear_collect_linear(exp, multiplier, idMap, compute_values, verbose, coef):
+ varkeys = idMap[None]
+
+ if compute_values:
+ coef[None] += multiplier*value(exp.constant)
+ else:
+ coef[None] += multiplier*exp.constant
+
+ for c,v in zip(exp.linear_coefs, exp.linear_vars):
+ if v.fixed:
+ if compute_values:
+ coef[None] += multiplier*v.value
+ else:
+ coef[None] += multiplier*v
+ else:
+ id_ = id(v)
+ if id_ in varkeys:
+ key = varkeys[id_]
+ else:
+ key = len(idMap) - 1
+ varkeys[id_] = key
+ idMap[key] = v
+ if compute_values:
+ if key in coef:
+ coef[key] += multiplier*value(c)
+ else:
+ coef[key] = multiplier*value(c)
+ else:
+ if key in coef:
+ coef[key] += multiplier*c
+ else:
+ coef[key] = multiplier*c
+
+def _linear_collect_term(exp, multiplier, idMap, compute_values, verbose, coef):
+ #
+ # LHS is a numeric value
+ #
+ if exp._args_[0].__class__ in native_numeric_types:
+ if isclose_default(exp._args_[0],0):
+ return
+ _collect_linear_standard_repn(exp._args_[1], multiplier * exp._args_[0], idMap,
+ compute_values, verbose, coef)
+ #
+ # LHS is a non-variable expression
+ #
+ else:
+ if compute_values:
+ val = value(exp._args_[0])
+ if isclose_default(val,0):
+ return
+ _collect_linear_standard_repn(exp._args_[1], multiplier * val, idMap,
+ compute_values, verbose, coef)
+ else:
+ _collect_linear_standard_repn(exp._args_[1], multiplier*exp._args_[0], idMap,
+ compute_values, verbose, coef)
+
+def _linear_collect_prod(exp, multiplier, idMap, compute_values, verbose, coef):
+ #
+ # LHS is a numeric value
+ #
+ if exp._args_[0].__class__ in native_numeric_types:
+ if isclose_default(exp._args_[0],0):
+ return
+ _collect_linear_standard_repn(exp._args_[1], multiplier * exp._args_[0], idMap,
+ compute_values, verbose, coef)
+ #
+ # LHS is a non-variable expression
+ #
+ elif not exp._args_[0].is_potentially_variable():
+ if compute_values:
+ val = value(exp._args_[0])
+ if isclose_default(val,0):
+ return
+ _collect_linear_standard_repn(exp._args_[1], multiplier * val, idMap,
+ compute_values, verbose, coef)
+ else:
+ _collect_linear_standard_repn(exp._args_[1], multiplier*exp._args_[0], idMap,
+ compute_values, verbose, coef)
+ #
+ # The LHS should never be variable
+ #
+ elif exp._args_[0].is_fixed():
+ if compute_values:
+ val = value(exp._args_[0])
+ if isclose_default(val,0):
+ return
+ _collect_linear_standard_repn(exp._args_[1], multiplier * val, idMap,
+ compute_values, verbose, coef)
+ else:
+ _collect_linear_standard_repn(exp._args_[1], multiplier*exp._args_[0], idMap,
+ compute_values, verbose, coef)
+ else:
+ if compute_values:
+ val = value(exp._args_[1])
+ if isclose_default(val,0):
+ return
+ _collect_linear_standard_repn(exp._args_[0], multiplier * val, idMap,
+ compute_values, verbose, coef)
+ else:
+ _collect_linear_standard_repn(exp._args_[0], multiplier*exp._args_[1], idMap,
+ compute_values, verbose, coef)
+
+def _linear_collect_var(exp, multiplier, idMap, compute_values, verbose, coef):
+ if exp.fixed:
+ if compute_values:
+ coef[None] += multiplier*value(exp)
+ else:
+ coef[None] += multiplier*exp
+ else:
+ id_ = id(exp)
+ if id_ in idMap[None]:
+ key = idMap[None][id_]
+ else:
+ key = len(idMap) - 1
+ idMap[None][id_] = key
+ idMap[key] = exp
+ if key in coef:
+ coef[key] += multiplier
+ else:
+ coef[key] = multiplier
+
+def _linear_collect_negation(exp, multiplier, idMap, compute_values, verbose, coef):
+ _collect_linear_standard_repn(exp._args_[0], -1*multiplier, idMap, compute_values, verbose, coef)
+
+def _linear_collect_identity(exp, multiplier, idMap, compute_values, verbose, coef):
+ arg = exp._args_[0]
+ if arg.__class__ in native_numeric_types:
+ coef[None] += arg
+ elif not arg.is_potentially_variable():
+ if compute_values:
+ coef[None] += value(arg)
+ else:
+ coef[None] += arg
+ else:
+ _collect_linear_standard_repn(exp.expr, multiplier, idMap, compute_values, verbose, coef)
+
+def _linear_collect_branching_expr(exp, multiplier, idMap, compute_values, verbose, coef):
+ if exp._if.__class__ in native_numeric_types:
+ if_val = exp._if
+ else:
+ # If this value is not constant, then the expression is nonlinear.
+ if_val = value(exp._if)
+ if if_val:
+ _collect_linear_standard_repn(exp._then, multiplier, idMap, compute_values, verbose, coef)
+ else:
+ _collect_linear_standard_repn(exp._else, multiplier, idMap, compute_values, verbose, coef)
+
+def _linear_collect_pow(exp, multiplier, idMap, compute_values, verbose, coef):
+ if exp._args_[1].__class__ in native_numeric_types:
+ exponent = exp._args_[1]
+ else:
+ # If this value is not constant, then the expression is nonlinear.
+ exponent = value(exp._args_[1])
+
+ if exponent == 0:
+ coef[None] += multiplier
+ else: #exponent == 1
+ _collect_linear_standard_repn(exp._args_[0], multiplier, idMap, compute_values, verbose, coef)
+
+
+_linear_repn_collectors = {
+ EXPR.SumExpression : _linear_collect_sum,
+ EXPR.ProductExpression : _linear_collect_prod,
+ EXPR.MonomialTermExpression : _linear_collect_term,
+ EXPR.PowExpression : _linear_collect_pow,
+ #EXPR.ReciprocalExpression : _linear_collect_reciprocal,
+ EXPR.Expr_ifExpression : _linear_collect_branching_expr,
+ #EXPR.UnaryFunctionExpression : _linear_collect_nonl,
+ #EXPR.AbsExpression : _linear_collect_nonl,
+ EXPR.NegationExpression : _linear_collect_negation,
+ EXPR.LinearExpression : _linear_collect_linear,
+ #EXPR.InequalityExpression : _linear_collect_comparison,
+ #EXPR.RangedExpression : _linear_collect_comparison,
+ #EXPR.EqualityExpression : _linear_collect_comparison,
+ #EXPR.ExternalFunctionExpression : _linear_collect_external_fn,
+ ##EXPR.LinearSumExpression : _collect_linear_sum,
+ ##_ConnectorData : _collect_linear_connector,
+ ##SimpleConnector : _collect_linear_connector,
+ ##param._ParamData : _collect_linear_const,
+ ##param.SimpleParam : _collect_linear_const,
+ ##param.Param : _collect_linear_const,
+ ##parameter : _collect_linear_const,
+ _GeneralVarData : _linear_collect_var,
+ SimpleVar : _linear_collect_var,
+ Var : _linear_collect_var,
+ variable : _linear_collect_var,
+ IVariable : _linear_collect_var,
+ _GeneralExpressionData : _linear_collect_identity,
+ SimpleExpression : _linear_collect_identity,
+ expression : _linear_collect_identity,
+ noclone : _linear_collect_identity,
+ _ExpressionData : _linear_collect_identity,
+ Expression : _linear_collect_identity,
+ _GeneralObjectiveData : _linear_collect_identity,
+ SimpleObjective : _linear_collect_identity,
+ objective : _linear_collect_identity,
+ }
+
+
+def _collect_linear_standard_repn(exp, multiplier, idMap, compute_values, verbose, coefs):
+ try:
+ return _linear_repn_collectors[exp.__class__](exp, multiplier, idMap, compute_values, verbose, coefs)
+ except KeyError:
+ #
+ # These are types that might be extended using duck typing.
+ #
+ if exp.is_variable_type():
+ return _linear_collect_var(exp, multiplier, idMap, compute_values, verbose, coefs)
+ if exp.is_named_expression_type():
+ return _linear_collect_identity(exp, multiplier, idMap, compute_values, verbose, coefs)
+ raise ValueError( "Unexpected expression (type %s)" % type(exp).__name__)
+
+def _generate_linear_standard_repn(expr, idMap=None, compute_values=True, verbose=False, repn=None):
+ coef = {None:0}
+ #
+ # Call recursive logic
+ #
+ ans = _collect_linear_standard_repn(expr, 1, idMap, compute_values, verbose, coef)
+ #
+ # Create the final object here from 'ans'
+ #
+ repn.constant = coef[None]
+ del coef[None]
+ #
+ # Create a list (tuple) of the variables and coefficients
+ #
+ # If we compute the values of constants, then we can skip terms with zero
+ # coefficients
+ #
+ if compute_values:
+ keys = list(key for key in coef if not isclose(coef[key],0))
+ else:
+ keys = list(coef.keys())
+ repn.linear_vars = tuple(idMap[key] for key in keys)
+ repn.linear_coefs = tuple(coef[key] for key in keys)
+
+ return repn
+"""
+
+
+##-----------------------------------------------------------------------
+##
+## Functions to preprocess blocks
+##
+##-----------------------------------------------------------------------
+
+
+def preprocess_block_objectives(block, idMap=None):
+
+ # Get/Create the ComponentMap for the repn
+ if not hasattr(block,'_repn'):
+ block._repn = ComponentMap()
+ block_repn = block._repn
+
+ for objective_data in block.component_data_objects(Objective,
+ active=True,
+ descend_into=False):
+
+ if objective_data.expr is None:
+ raise ValueError("No expression has been defined for objective %s"
+ % (objective_data.name))
+
+ try:
+ repn = generate_standard_repn(objective_data.expr, idMap=idMap)
+ except Exception:
+ err = sys.exc_info()[1]
+ logging.getLogger('pyomo.core').error\
+ ( "exception generating a standard representation for objective %s: %s" \
+ % (objective_data.name, str(err)) )
+ raise
+
+ block_repn[objective_data] = repn
+
+def preprocess_block_constraints(block, idMap=None):
+
+ # Get/Create the ComponentMap for the repn
+ if not hasattr(block,'_repn'):
+ block._repn = ComponentMap()
+ block_repn = block._repn
+
+ for constraint in block.component_objects(Constraint,
+ active=True,
+ descend_into=False):
+
+ preprocess_constraint(block,
+ constraint,
+ idMap=idMap,
+ block_repn=block_repn)
+
+def preprocess_constraint(block,
+ constraint,
+ idMap=None,
+ block_repn=None):
+
+ from pyomo.repn.beta.matrix import MatrixConstraint
+ if isinstance(constraint, MatrixConstraint):
+ return
+
+ # Get/Create the ComponentMap for the repn
+ if not hasattr(block,'_repn'):
+ block._repn = ComponentMap()
+ block_repn = block._repn
+
+ for index, constraint_data in iteritems(constraint):
+
+ if not constraint_data.active:
+ continue
+
+ if constraint_data.body is None:
+ raise ValueError(
+ "No expression has been defined for the body "
+ "of constraint %s" % (constraint_data.name))
+
+ try:
+ repn = generate_standard_repn(constraint_data.body,
+ idMap=idMap)
+ except Exception:
+ err = sys.exc_info()[1]
+ logging.getLogger('pyomo.core').error(
+ "exception generating a standard representation for "
+ "constraint %s: %s"
+ % (constraint_data.name, str(err)))
+ raise
+
+ block_repn[constraint_data] = repn
+
+def preprocess_constraint_data(block,
+ constraint_data,
+ idMap=None,
+ block_repn=None):
+
+ # Get/Create the ComponentMap for the repn
+ if not hasattr(block,'_repn'):
+ block._repn = ComponentMap()
+ block_repn = block._repn
+
+ if constraint_data.body is None:
+ raise ValueError(
+ "No expression has been defined for the body "
+ "of constraint %s" % (constraint_data.name))
+
+ try:
+ repn = generate_standard_repn(constraint_data.body,
+ idMap=idMap)
+ except Exception:
+ err = sys.exc_info()[1]
+ logging.getLogger('pyomo.core').error(
+ "exception generating a standard representation for "
+ "constraint %s: %s"
+ % (constraint_data.name, str(err)))
+ raise
+
+ block_repn[constraint_data] = repn
+
diff --git a/pyomo/repn/tests/ampl/external_expression_fixed.nl.baseline b/pyomo/repn/tests/ampl/external_expression_fixed.nl.baseline
index a8821c32025..03cd8117381 100644
--- a/pyomo/repn/tests/ampl/external_expression_fixed.nl.baseline
+++ b/pyomo/repn/tests/ampl/external_expression_fixed.nl.baseline
@@ -13,10 +13,10 @@ O0 0 #o
o2 #*
o5 #pow
v0 #z
-n2.0
+n2
o5 #pow
n5.0
-n2.0
+n2
x1 # initial guess
0 1
r #0 ranges (rhs's)
diff --git a/pyomo/repn/tests/ampl/external_expression_partial_fixed.nl.baseline b/pyomo/repn/tests/ampl/external_expression_partial_fixed.nl.baseline
index b3d26663dab..7c202d1f368 100644
--- a/pyomo/repn/tests/ampl/external_expression_partial_fixed.nl.baseline
+++ b/pyomo/repn/tests/ampl/external_expression_partial_fixed.nl.baseline
@@ -13,14 +13,14 @@ O0 0 #o
o2 #*
o5 #pow
v1 #z
-n2.0
+n2
o5 #pow
f0 2 #hypot
n3
o0 #+
n1
v0 #y
-n2.0
+n2
x2 # initial guess
0 3
1 1
diff --git a/pyomo/repn/tests/ampl/external_expression_variable.nl.baseline b/pyomo/repn/tests/ampl/external_expression_variable.nl.baseline
index 59402d42a26..dac0370ff75 100644
--- a/pyomo/repn/tests/ampl/external_expression_variable.nl.baseline
+++ b/pyomo/repn/tests/ampl/external_expression_variable.nl.baseline
@@ -13,7 +13,7 @@ O0 0 #o
o2 #*
o5 #pow
v2 #z
-n2.0
+n2
o5 #pow
f0 2 #hypot
o2 #*
@@ -22,7 +22,7 @@ v0 #x
o0 #+
n1
v1 #y
-n2.0
+n2
x3 # initial guess
0 3
1 3
diff --git a/pyomo/repn/tests/ampl/helper.py b/pyomo/repn/tests/ampl/helper.py
index bed102c5b10..219dc6c6e73 100644
--- a/pyomo/repn/tests/ampl/helper.py
+++ b/pyomo/repn/tests/ampl/helper.py
@@ -8,7 +8,8 @@
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
-from pyomo.core.base.numvalue import NumericValue
+from pyomo.core.expr import NumericValue
+
class MockFixedValue(NumericValue):
value = 42
diff --git a/pyomo/repn/tests/ampl/small10_testCase.mod b/pyomo/repn/tests/ampl/small10_testCase.mod
index df7af8ac38a..25d90a20ed8 100644
--- a/pyomo/repn/tests/ampl/small10_testCase.mod
+++ b/pyomo/repn/tests/ampl/small10_testCase.mod
@@ -19,53 +19,53 @@ fix x := 1.0;
fix z := 0.0;
minimize obj: x*y +
- z*y +
- q*y +
- y*y*q +
- p*y +
- y*y*p +
- y*y*z +
- z*(y**2);
+ z*y +
+ q*y +
+ y*y*q +
+ p*y +
+ y*y*p +
+ y*y*z +
+ z*(y**2);
s.t.
- con1:
- x*y == 0;
- con2:
- z*y + y == 0;
- con3:
- q*(y**2) + y == 0;
- con4:
- q*y*x + y == 0;
- con5:
- p*(y**2) + y == 0;
- con6:
- p*y*x + y == 0;
- con7:
- z*(y**2) + y == 0;
- con8:
- z*y*x + y == 0;
+ con1:
+ x*y == 0;
+ con2:
+ z*y + y == 0;
+ con3:
+ q*(y**2) + y == 0;
+ con4:
+ q*y*x + y == 0;
+ con5:
+ p*(y**2) + y == 0;
+ con6:
+ p*y*x + y == 0;
+ con7:
+ z*(y**2) + y == 0;
+ con8:
+ z*y*x + y == 0;
# AMPL differs from Pyomo in these cases that involve immutable params (q).
# These never actually become constraints in Pyomo, and for good reason.
- con9:
- z*y == 0;
-# con10:
-# q*(y**2) == 0;
-# con11:
-# q*y*x == 0;
- con12:
- p*(y**2) == 0;
- con13:
- p*y*x == 0;
- con14:
- z*(y**2) == 0;
- con15:
- z*y*x == 0;
-# con16:
-# q*y == 0;
- con17:
- p*y == 0;
+ con9:
+ z*y == 0;
+# con10:
+# q*(y**2) == 0;
+# con11:
+# q*y*x == 0;
+ con12:
+ p*(y**2) == 0;
+ con13:
+ p*y*x == 0;
+ con14:
+ z*(y**2) == 0;
+ con15:
+ z*y*x == 0;
+# con16:
+# q*y == 0;
+ con17:
+ p*y == 0;
option substout 0;
option presolve 0;
option auxfiles 'rc';
-write gjunk;
+write gsmall10.ampl;
diff --git a/pyomo/repn/tests/ampl/small11_testCase.mod b/pyomo/repn/tests/ampl/small11_testCase.mod
index 4f4de9490df..b999a4a2cf8 100644
--- a/pyomo/repn/tests/ampl/small11_testCase.mod
+++ b/pyomo/repn/tests/ampl/small11_testCase.mod
@@ -24,4 +24,4 @@ fix x[1,1] := 1.0;
option substout 0;
option presolve 0;
option auxfiles 'rc';
-write gjunk;
+write gsmall11.ampl;
diff --git a/pyomo/repn/tests/ampl/small11_testCase.py b/pyomo/repn/tests/ampl/small11_testCase.py
index adcd78b94b2..34d2b4a3c30 100644
--- a/pyomo/repn/tests/ampl/small11_testCase.py
+++ b/pyomo/repn/tests/ampl/small11_testCase.py
@@ -32,7 +32,7 @@ def obj_rule(model):
model.obj = Objective(rule=obj_rule)
def var_bnd_rule(model,i):
- return -1.0 <= model.x[1,i] <= 1.0
+ return (-1.0, model.x[1,i], 1.0)
model.var_bnd = Constraint(RangeSet(1,n),rule=var_bnd_rule)
model.x[1,1] = 1.0
diff --git a/pyomo/repn/tests/ampl/small12_testCase.mod b/pyomo/repn/tests/ampl/small12_testCase.mod
index 7192a6d57de..b68d7bda625 100644
--- a/pyomo/repn/tests/ampl/small12_testCase.mod
+++ b/pyomo/repn/tests/ampl/small12_testCase.mod
@@ -63,4 +63,4 @@ s.t.
option substout 0;
option presolve 0;
option auxfiles 'rc';
-write gjunk;
+write gsmall12.ampl;
diff --git a/pyomo/repn/tests/ampl/small12_testCase.py b/pyomo/repn/tests/ampl/small12_testCase.py
index 3ce6a7bae48..7dc5e5b980d 100644
--- a/pyomo/repn/tests/ampl/small12_testCase.py
+++ b/pyomo/repn/tests/ampl/small12_testCase.py
@@ -17,7 +17,8 @@
#
from pyomo.environ import *
-from pyomo.core.base.expr import Expr_if
+from pyomo.core.expr.current import Expr_if
+
model = ConcreteModel()
@@ -62,15 +63,15 @@
model.c14 = Constraint(expr= Expr_if(IF=(model.vP1*10.0 > 0), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pTrue)
# -1 <= x <= 1
-model.c15 = Constraint(expr= Expr_if(IF=(-1 <= model.vN2 <= 1), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pFalse)
-model.c16 = Constraint(expr= Expr_if(IF=(-1*model.vP1 <= model.vN1 <= 1), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pTrue)
-model.c17 = Constraint(expr= Expr_if(IF=(-1*model.vP1**2 <= model.v0 <= 1), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pTrue)
-model.c18 = Constraint(expr= Expr_if(IF=(model.vN1 <= model.vP1 <= 1), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pTrue)
-model.c19 = Constraint(expr= Expr_if(IF=(-1 <= model.vP2 <= 1), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pFalse)
+model.c15 = Constraint(expr= Expr_if(IF=inequality(-1, model.vN2, 1), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pFalse)
+model.c16 = Constraint(expr= Expr_if(IF=inequality(-1*model.vP1, model.vN1, 1), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pTrue)
+model.c17 = Constraint(expr= Expr_if(IF=inequality(-1*model.vP1**2, model.v0, 1), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pTrue)
+model.c18 = Constraint(expr= Expr_if(IF=inequality(model.vN1, model.vP1, 1), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pTrue)
+model.c19 = Constraint(expr= Expr_if(IF=inequality(-1, model.vP2, 1), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pFalse)
# -1 < x < 1
-model.c20 = Constraint(expr= Expr_if(IF=(-1 < model.vN2 < 1) , THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pFalse)
-model.c21 = Constraint(expr= Expr_if(IF=(-1 < model.vN1 < 1*model.vP1) , THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pFalse)
-model.c22 = Constraint(expr= Expr_if(IF=(-1 < model.v0 < 1*model.vP1**2), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pTrue)
-model.c23 = Constraint(expr= Expr_if(IF=(-1 < model.vP1 < model.vP1) , THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pFalse)
-model.c24 = Constraint(expr= Expr_if(IF=(-1 < model.vP2 < 1) , THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pFalse)
+model.c20 = Constraint(expr= Expr_if(IF=inequality(-1, model.vN2, 1, strict=True), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pFalse)
+model.c21 = Constraint(expr= Expr_if(IF=inequality(-1, model.vN1, 1*model.vP1, strict=True), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pFalse)
+model.c22 = Constraint(expr= Expr_if(IF=inequality(-1, model.v0, 1*model.vP1**2, strict=True), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pTrue)
+model.c23 = Constraint(expr= Expr_if(IF=inequality(-1, model.vP1, model.vP1, strict=True), THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pFalse)
+model.c24 = Constraint(expr= Expr_if(IF=inequality(-1, model.vP2, 1, strict=True) , THEN=(model.vTrue), ELSE=(model.vFalse)) == model.pFalse)
diff --git a/pyomo/repn/tests/ampl/small13.pyomo.nl b/pyomo/repn/tests/ampl/small13.pyomo.nl
index 1bf18512207..c285f1b9a70 100644
--- a/pyomo/repn/tests/ampl/small13.pyomo.nl
+++ b/pyomo/repn/tests/ampl/small13.pyomo.nl
@@ -11,27 +11,19 @@ g3 1 1 0 # problem unknown
C0
o5
v0
-n3.0
+n3
C1
o2
n10
-o0
o5
v0
-n3.0
-o2
-n-1
-v0
+n3
C2
o2
n0.1
-o0
o5
v0
-n3.0
-o2
-n-1
-v0
+n3
O0 1
n0
x1
@@ -44,10 +36,10 @@ b
3
k0
J0 1
-0 -1.0
+0 -1
J1 1
-0 0
+0 -10
J2 1
-0 0
+0 -0.1
G0 1
0 1
diff --git a/pyomo/repn/tests/ampl/small14.ampl.col b/pyomo/repn/tests/ampl/small14.ampl.col
new file mode 100644
index 00000000000..bfbe762d708
--- /dev/null
+++ b/pyomo/repn/tests/ampl/small14.ampl.col
@@ -0,0 +1,2 @@
+ONE
+ZERO
diff --git a/pyomo/repn/tests/ampl/small14.ampl.nl b/pyomo/repn/tests/ampl/small14.ampl.nl
new file mode 100644
index 00000000000..1493d25b29b
--- /dev/null
+++ b/pyomo/repn/tests/ampl/small14.ampl.nl
@@ -0,0 +1,142 @@
+g3 0 1 0 # problem small14
+ 2 19 1 0 19 # vars, constraints, objectives, ranges, eqns
+ 19 0 # nonlinear constraints, objectives
+ 0 0 # network constraints: nonlinear, linear
+ 2 0 0 # nonlinear vars in constraints, objectives, both
+ 0 0 0 1 # linear network variables; functions; arith, flags
+ 0 0 0 0 0 # discrete variables: binary, integer, nonlinear (b,c,o)
+ 19 2 # nonzeros in Jacobian, gradients
+ 7 4 # max name lengths: constraints, variables
+ 0 0 0 0 0 # common exprs: b,c,o,c1,o1
+C0
+o43
+v0
+C1
+o42
+v0
+C2
+o41
+v1
+C3
+o46
+v1
+C4
+o38
+v1
+C5
+o40
+v1
+C6
+o45
+v1
+C7
+o37
+v1
+C8
+o51
+v1
+C9
+o53
+v1
+C10
+o49
+v1
+C11
+o50
+v1
+C12
+o52
+o3
+o0
+v0
+n7.3890560989306495
+n5.43656365691809
+C13
+o47
+v1
+C14
+o44
+v1
+C15
+o39
+v0
+C16
+o14
+v0
+C17
+o13
+v0
+C18
+o15
+v0
+O0 0
+n0
+x2
+0 1
+1 0
+r
+4 0
+4 0
+4 0
+4 1
+4 0
+4 0
+4 1
+4 0
+4 0
+4 1.5707963267948966
+4 0
+4 0
+4 0
+4 0
+4 1
+4 1
+4 1
+4 1
+4 1
+b
+3
+3
+k1
+7
+J0 1
+0 0
+J1 1
+0 0
+J2 1
+1 0
+J3 1
+1 0
+J4 1
+1 0
+J5 1
+1 0
+J6 1
+1 0
+J7 1
+1 0
+J8 1
+1 0
+J9 1
+1 0
+J10 1
+1 0
+J11 1
+1 0
+J12 1
+0 0
+J13 1
+1 0
+J14 1
+1 0
+J15 1
+0 0
+J16 1
+0 0
+J17 1
+0 0
+J18 1
+0 0
+G0 2
+0 1
+1 1
diff --git a/pyomo/repn/tests/ampl/small14.ampl.row b/pyomo/repn/tests/ampl/small14.ampl.row
new file mode 100644
index 00000000000..7620a90d360
--- /dev/null
+++ b/pyomo/repn/tests/ampl/small14.ampl.row
@@ -0,0 +1,20 @@
+c_log
+c_log10
+c_sin
+c_cos
+c_tan
+c_sinh
+c_cosh
+c_tanh
+c_asin
+c_acos
+c_atan
+c_asinh
+c_acosh
+c_atanh
+c_exp
+c_sqrt
+c_ceil
+c_floor
+c_abs
+obj
diff --git a/pyomo/repn/tests/ampl/small14.pyomo.nl b/pyomo/repn/tests/ampl/small14.pyomo.nl
new file mode 100644
index 00000000000..c9431b7c408
--- /dev/null
+++ b/pyomo/repn/tests/ampl/small14.pyomo.nl
@@ -0,0 +1,142 @@
+g3 1 1 0 # problem unknown
+ 2 19 1 0 19 # vars, constraints, objectives, ranges, eqns
+ 19 0 0 0 0 0 # nonlinear constrs, objs; ccons: lin, nonlin, nd, nzlb
+ 0 0 # network constraints: nonlinear, linear
+ 2 0 0 # nonlinear vars in constraints, objectives, both
+ 0 0 0 1 # linear network variables; functions; arith, flags
+ 0 0 0 0 0 # discrete variables: binary, integer, nonlinear (b,c,o)
+ 19 2 # nonzeros in Jacobian, obj. gradient
+ 0 0 # max name lengths: constraints, variables
+ 0 0 0 0 0 # common exprs: b,c,o,c1,o1
+C0
+o43
+v0
+C1
+o42
+v0
+C2
+o41
+v1
+C3
+o46
+v1
+C4
+o38
+v1
+C5
+o40
+v1
+C6
+o45
+v1
+C7
+o37
+v1
+C8
+o51
+v1
+C9
+o53
+v1
+C10
+o49
+v1
+C11
+o50
+v1
+C12
+o52
+o2
+o0
+v0
+n7.3890560989306495
+n0.18393972058572117
+C13
+o47
+v1
+C14
+o44
+v1
+C15
+o39
+v0
+C16
+o13
+v0
+C17
+o14
+v0
+C18
+o15
+v0
+O0 0
+n0
+x2
+0 1
+1 0
+r
+4 0.0
+4 0.0
+4 0.0
+4 1.0
+4 0.0
+4 0.0
+4 1.0
+4 0.0
+4 0.0
+4 1.5707963267948966
+4 0.0
+4 0.0
+4 0.0
+4 0.0
+4 1.0
+4 1.0
+4 1.0
+4 1.0
+4 1.0
+b
+3
+3
+k1
+7
+J0 1
+0 0
+J1 1
+0 0
+J2 1
+1 0
+J3 1
+1 0
+J4 1
+1 0
+J5 1
+1 0
+J6 1
+1 0
+J7 1
+1 0
+J8 1
+1 0
+J9 1
+1 0
+J10 1
+1 0
+J11 1
+1 0
+J12 1
+0 0
+J13 1
+1 0
+J14 1
+1 0
+J15 1
+0 0
+J16 1
+0 0
+J17 1
+0 0
+J18 1
+0 0
+G0 2
+0 1
+1 1
diff --git a/pyomo/repn/tests/ampl/small14_testCase.mod b/pyomo/repn/tests/ampl/small14_testCase.mod
new file mode 100644
index 00000000000..83f167085f4
--- /dev/null
+++ b/pyomo/repn/tests/ampl/small14_testCase.mod
@@ -0,0 +1,32 @@
+var ONE := 1;
+var ZERO := 0;
+param pi = 4 * atan(1);
+param e = exp(1);
+
+minimize obj: ONE+ZERO;
+
+s.t.
+ c_log: log(ONE) = 0;
+ c_log10: log10(ONE) = 0;
+ c_sin: sin(ZERO) = 0;
+ c_cos: cos(ZERO) = 1;
+ c_tan: tan(ZERO) = 0;
+ c_sinh: sinh(ZERO) = 0;
+ c_cosh: cosh(ZERO) = 1;
+ c_tanh: tanh(ZERO) = 0;
+ c_asin: asin(ZERO) = 0;
+ c_acos: acos(ZERO) = pi/2;
+ c_atan: atan(ZERO) = 0;
+ c_asinh: asinh(ZERO) = 0;
+ c_acosh: acosh((e^2 + ONE)/(2*e)) = 0;
+ c_atanh: atanh(ZERO) = 0;
+ c_exp: exp(ZERO) = 1;
+ c_sqrt: sqrt(ONE) = 1;
+ c_ceil: ceil(ONE) = 1;
+ c_floor: floor(ONE) = 1;
+ c_abs: abs(ONE) = 1;
+
+option substout 0;
+option presolve 0;
+option auxfiles 'rc';
+write gsmall14.ampl;
diff --git a/pyomo/repn/tests/ampl/small14_testCase.py b/pyomo/repn/tests/ampl/small14_testCase.py
new file mode 100644
index 00000000000..822be0f3f64
--- /dev/null
+++ b/pyomo/repn/tests/ampl/small14_testCase.py
@@ -0,0 +1,46 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+
+from pyomo.environ import *
+from math import e, pi
+
+model = ConcreteModel()
+
+# pick a value in the domain of all of these functions
+model.ONE = Var(initialize=1)
+model.ZERO = Var(initialize=0)
+
+
+model.obj = Objective(expr=model.ONE+model.ZERO)
+
+model.c_log = Constraint(expr=log(model.ONE) == 0)
+model.c_log10 = Constraint(expr=log10(model.ONE) == 0)
+
+model.c_sin = Constraint(expr=sin(model.ZERO) == 0)
+model.c_cos = Constraint(expr=cos(model.ZERO) == 1)
+model.c_tan = Constraint(expr=tan(model.ZERO) == 0)
+
+model.c_sinh = Constraint(expr=sinh(model.ZERO) == 0)
+model.c_cosh = Constraint(expr=cosh(model.ZERO) == 1)
+model.c_tanh = Constraint(expr=tanh(model.ZERO) == 0)
+
+model.c_asin = Constraint(expr=asin(model.ZERO) == 0)
+model.c_acos = Constraint(expr=acos(model.ZERO) == pi/2)
+model.c_atan = Constraint(expr=atan(model.ZERO) == 0)
+
+model.c_asinh = Constraint(expr=asinh(model.ZERO) == 0)
+model.c_acosh = Constraint(expr=acosh((e**2 + model.ONE)/(2*e)) == 0)
+model.c_atanh = Constraint(expr=atanh(model.ZERO) == 0)
+
+model.c_exp = Constraint(expr=exp(model.ZERO) == 1)
+model.c_sqrt = Constraint(expr=sqrt(model.ONE) == 1)
+model.c_ceil = Constraint(expr=ceil(model.ONE) == 1)
+model.c_floor = Constraint(expr=floor(model.ONE) == 1)
+model.c_abs = Constraint(expr=abs(model.ONE) == 1)
diff --git a/pyomo/repn/tests/ampl/small1_testCase.mod b/pyomo/repn/tests/ampl/small1_testCase.mod
index 6b36950477a..31fc5d7d475 100644
--- a/pyomo/repn/tests/ampl/small1_testCase.mod
+++ b/pyomo/repn/tests/ampl/small1_testCase.mod
@@ -12,10 +12,10 @@ var y := 1.0;
minimize OBJ: x^2;
s.t.
- CON1:
- y^2 = 4;
+ CON1:
+ y^2 = 4;
option substout 0;
option presolve 0;
option auxfiles 'rc';
-write gjunk;
\ No newline at end of file
+write gsmall1.ampl;
diff --git a/pyomo/repn/tests/ampl/small2_testCase.mod b/pyomo/repn/tests/ampl/small2_testCase.mod
index 66ce9bdc31d..fc4abc1486e 100644
--- a/pyomo/repn/tests/ampl/small2_testCase.mod
+++ b/pyomo/repn/tests/ampl/small2_testCase.mod
@@ -12,10 +12,10 @@ var y := 1.0;
minimize OBJ: x;
s.t.
- CON1:
- y^2 = 4;
+ CON1:
+ y^2 = 4;
option substout 0;
option presolve 0;
option auxfiles 'rc';
-write gjunk;
+write gsmall2.ampl;
diff --git a/pyomo/repn/tests/ampl/small3_testCase.mod b/pyomo/repn/tests/ampl/small3_testCase.mod
index 0006a38db11..2c9ff724195 100644
--- a/pyomo/repn/tests/ampl/small3_testCase.mod
+++ b/pyomo/repn/tests/ampl/small3_testCase.mod
@@ -12,10 +12,10 @@ var y := 1.0;
minimize OBJ: x*y;
s.t.
- CON1:
- y^2 = 4;
+ CON1:
+ y^2 = 4;
option substout 0;
option presolve 0;
option auxfiles 'rc';
-write gjunk;
+write gsmall3.ampl;
diff --git a/pyomo/repn/tests/ampl/small4_testCase.mod b/pyomo/repn/tests/ampl/small4_testCase.mod
index 764320054ca..45d3e2b05b6 100644
--- a/pyomo/repn/tests/ampl/small4_testCase.mod
+++ b/pyomo/repn/tests/ampl/small4_testCase.mod
@@ -12,10 +12,10 @@ var y := 1.0;
minimize OBJ: y^2;
s.t.
- CON1:
- y*x = 4;
+ CON1:
+ y*x = 4;
option substout 0;
option presolve 0;
option auxfiles 'rc';
-write gjunk;
+write gsmall4.ampl;
diff --git a/pyomo/repn/tests/ampl/small5.pyomo.nl b/pyomo/repn/tests/ampl/small5.pyomo.nl
index 0e1d21d6ea4..fee2ed31b4d 100644
--- a/pyomo/repn/tests/ampl/small5.pyomo.nl
+++ b/pyomo/repn/tests/ampl/small5.pyomo.nl
@@ -10,8 +10,8 @@ g3 1 1 0 # problem unknown
0 0 0 0 0 # common exprs: b,c,o,c1,o1
C0
o2
-n0.5
o2
+n0.5
v2
o0
v0
@@ -20,8 +20,8 @@ n-1
v1
C1
o2
-n0.5
o2
+n0.5
v2
o0
v0
@@ -67,27 +67,28 @@ o2
n-1
v1
C6
-o3
o2
+o2
+n0.5
v2
o0
v0
o2
n-1
v1
-n2.0
C7
-o3
o2
+o2
+n0.5
v2
o0
v0
o2
n-1
v1
-n2.0
C8
-o3
+o2
+n0.5
o2
v2
o0
@@ -95,21 +96,19 @@ v0
o2
n-1
v1
-n2.0
C9
o2
v2
o0
-o3
+o2
+n0.5
v0
-n2.0
o2
-n-1
-o3
+n-0.5
v1
-n2.0
C10
-o3
+o2
+n0.5
o2
v2
o0
@@ -117,7 +116,6 @@ v0
o2
n-1
v1
-n2.0
C11
o2
v2
@@ -132,12 +130,12 @@ o2
n0.5
o5
v0
-n2.0
-o3
+n2
+o2
+n0.5
o5
v0
-n2.0
-n2.0
+n2
x3
0 1.0
1 2.0
diff --git a/pyomo/repn/tests/ampl/small5_testCase.mod b/pyomo/repn/tests/ampl/small5_testCase.mod
index b7acd9d0206..6de8dc1973a 100644
--- a/pyomo/repn/tests/ampl/small5_testCase.mod
+++ b/pyomo/repn/tests/ampl/small5_testCase.mod
@@ -32,21 +32,21 @@ s.t.
v*(x/p-y/p) = 2.0;
CON5:
v*(x-y)*(1.0/p) = 2.0;
- CON6:
- v*(x-y) = 2.0*p;
+ CON6:
+ v*(x-y) = 2.0*p;
- CON7:
- 1.0/q*v*(x-y) = 2.0;
- CON8:
- v*1.0/q*(x-y) = 2.0;
- CON9:
- v*(x-y)/q = 2.0;
- CON10:
- v*(x/q-y/q) = 2.0;
- CON11:
- v*(x-y)*(1.0/q) = 2.0;
- CON12:
- v*(x-y) = 2.0*q;
+ CON7:
+ 1.0/q*v*(x-y) = 2.0;
+ CON8:
+ v*1.0/q*(x-y) = 2.0;
+ CON9:
+ v*(x-y)/q = 2.0;
+ CON10:
+ v*(x/q-y/q) = 2.0;
+ CON11:
+ v*(x-y)*(1.0/q) = 2.0;
+ CON12:
+ v*(x-y) = 2.0*q;
data;
@@ -57,4 +57,4 @@ var v := 3.0;
option substout 0;
option presolve 0;
option auxfiles 'rc';
-write gjunk;
+write gsmall5.ampl;
diff --git a/pyomo/repn/tests/ampl/small6.pyomo.nl b/pyomo/repn/tests/ampl/small6.pyomo.nl
index bf1130b7278..53579292be5 100644
--- a/pyomo/repn/tests/ampl/small6.pyomo.nl
+++ b/pyomo/repn/tests/ampl/small6.pyomo.nl
@@ -9,27 +9,31 @@ g3 1 1 0 # problem unknown
0 0 # max name lengths: constraints, variables
0 0 0 0 0 # common exprs: b,c,o,c1,o1
C0
-o3
o2
+o2
+o3
+n1.0
+n2.0
v2
o0
v0
o2
n-1
v1
-n2.0
C1
-o3
+o2
o2
v2
+o3
+n1.0
+n2.0
o0
v0
o2
n-1
v1
-n2.0
C2
-o3
+o2
o2
v2
o0
@@ -37,21 +41,26 @@ v0
o2
n-1
v1
+o3
+n1.0
n2.0
C3
o2
v2
o0
-o3
+o2
v0
+o3
+n1.0
n2.0
+o16
o2
-n-1
-o3
v1
+o3
+n1.0
n2.0
C4
-o3
+o2
o2
v2
o0
@@ -59,6 +68,8 @@ v0
o2
n-1
v1
+o3
+n1.0
n2.0
C5
o2
diff --git a/pyomo/repn/tests/ampl/small6_testCase.mod b/pyomo/repn/tests/ampl/small6_testCase.mod
index a50d25116c8..8191967ae07 100644
--- a/pyomo/repn/tests/ampl/small6_testCase.mod
+++ b/pyomo/repn/tests/ampl/small6_testCase.mod
@@ -31,8 +31,8 @@ s.t.
v*(x/p-y/p) = 2.0;
CON5:
v*(x-y)*(1.0/p) = 2.0;
- CON6:
- v*(x-y) = 2.0*p;
+ CON6:
+ v*(x-y) = 2.0*p;
data;
var x := 1.0;
@@ -44,4 +44,4 @@ fix p := 2.0;
option substout 0;
option presolve 0;
option auxfiles 'rc';
-write gjunk;
+write gsmall6.ampl;
diff --git a/pyomo/repn/tests/ampl/small6_testCase.py b/pyomo/repn/tests/ampl/small6_testCase.py
index d48026cce8a..7051c24867b 100644
--- a/pyomo/repn/tests/ampl/small6_testCase.py
+++ b/pyomo/repn/tests/ampl/small6_testCase.py
@@ -37,4 +37,4 @@
model.CON3 = Constraint(expr=model.v*(model.x-model.y)/model.p == 2.0)
model.CON4 = Constraint(expr=model.v*(model.x/model.p-model.y/model.p) == 2.0)
model.CON5 = Constraint(expr=model.v*(model.x-model.y)*(1.0/model.p) == 2.0)
-model.CON6 = Constraint(expr=model.v*(model.x-model.y) == 2.0*model.p)
+model.CON6 = Constraint(expr=model.v*(model.x-model.y) - 2.0*model.p == 0)
diff --git a/pyomo/repn/tests/ampl/small7.pyomo.nl b/pyomo/repn/tests/ampl/small7.pyomo.nl
index aaca31f3f53..fd73b76ff43 100644
--- a/pyomo/repn/tests/ampl/small7.pyomo.nl
+++ b/pyomo/repn/tests/ampl/small7.pyomo.nl
@@ -9,61 +9,70 @@ g3 1 1 0 # problem unknown
0 0 # max name lengths: constraints, variables
0 0 0 0 0 # common exprs: b,c,o,c1,o1
C0
-o3
o2
-n0.5
o2
+o2
+o3
+n1.0
+n2.0
+n0.5
v2
o0
v0
o2
n-1
v1
-n2.0
C1
-o3
+o2
+o2
o2
v2
+o3
+n1.0
+n2.0
+o3
+n1.0
+n2.0
o0
v0
o2
n-1
v1
-o2
-n2.0
-n2.0
C2
-o3
o2
n0.5
o2
+o2
v2
o0
v0
o2
n-1
v1
+o3
+n1.0
n2.0
C3
o2
v2
o0
-o3
o2
-n0.5
+o2
v0
+o3
+n1.0
n2.0
+n0.5
+o16
o2
-n-1
-o3
o2
-n0.5
v1
+o3
+n1.0
n2.0
+n0.5
C4
-o3
o2
-n0.5
o2
v2
o0
@@ -71,7 +80,11 @@ v0
o2
n-1
v1
+o2
+o3
+n1.0
n2.0
+n0.5
C5
o2
v2
@@ -81,33 +94,35 @@ o2
n-1
v1
C6
-o3
o2
-n0.5
o2
+o3
+n1.0
+o2
+n2.0
+n2.0
v2
o0
v0
o2
n-1
v1
-n2.0
C7
-o3
+o2
o2
v2
+o3
+n1.0
+o2
+n2.0
+n2.0
o0
v0
o2
n-1
v1
-o2
-n2.0
-n2.0
C8
-o3
o2
-n0.5
o2
v2
o0
@@ -115,27 +130,32 @@ v0
o2
n-1
v1
+o3
+n1.0
+o2
+n2.0
n2.0
C9
o2
v2
o0
-o3
o2
-n0.5
v0
+o3
+n1.0
+o2
n2.0
+n2.0
+o16
o2
-n-1
+v1
o3
+n1.0
o2
-n0.5
-v1
+n2.0
n2.0
C10
-o3
o2
-n0.5
o2
v2
o0
@@ -143,6 +163,10 @@ v0
o2
n-1
v1
+o3
+n1.0
+o2
+n2.0
n2.0
C11
o2
@@ -153,31 +177,35 @@ o2
n-1
v1
C12
-o3
o2
+o2
+o3
+n1.0
+o0
+n2.0
+n2.0
v2
o0
v0
o2
n-1
v1
-o0
-n2.0
-n2.0
C13
-o3
+o2
o2
v2
+o3
+n1.0
+o0
+n2.0
+n2.0
o0
v0
o2
n-1
v1
-o0
-n2.0
-n2.0
C14
-o3
+o2
o2
v2
o0
@@ -185,6 +213,8 @@ v0
o2
n-1
v1
+o3
+n1.0
o0
n2.0
n2.0
@@ -192,20 +222,23 @@ C15
o2
v2
o0
-o3
+o2
v0
+o3
+n1.0
o0
n2.0
n2.0
+o16
o2
-n-1
-o3
v1
+o3
+n1.0
o0
n2.0
n2.0
C16
-o3
+o2
o2
v2
o0
@@ -213,6 +246,8 @@ v0
o2
n-1
v1
+o3
+n1.0
o0
n2.0
n2.0
@@ -225,35 +260,39 @@ o2
n-1
v1
C18
-o3
o2
-v2
-o0
-v0
o2
-n-1
-v1
+o3
+n1.0
o5
o0
n2.0
n2.0
-n2.0
-C19
-o3
-o2
+n2
v2
o0
v0
o2
n-1
v1
+C19
+o2
+o2
+v2
+o3
+n1.0
o5
o0
n2.0
n2.0
-n2.0
+n2
+o0
+v0
+o2
+n-1
+v1
C20
-o3
+o2
o2
v2
o0
@@ -261,33 +300,38 @@ v0
o2
n-1
v1
+o3
+n1.0
o5
o0
n2.0
n2.0
-n2.0
+n2
C21
o2
v2
o0
-o3
+o2
v0
+o3
+n1.0
o5
o0
n2.0
n2.0
-n2.0
+n2
+o16
o2
-n-1
-o3
v1
+o3
+n1.0
o5
o0
n2.0
n2.0
-n2.0
+n2
C22
-o3
+o2
o2
v2
o0
@@ -295,11 +339,13 @@ v0
o2
n-1
v1
+o3
+n1.0
o5
o0
n2.0
n2.0
-n2.0
+n2
C23
o2
v2
diff --git a/pyomo/repn/tests/ampl/small7_testCase.mod b/pyomo/repn/tests/ampl/small7_testCase.mod
index 491867e0934..2931636a5e2 100644
--- a/pyomo/repn/tests/ampl/small7_testCase.mod
+++ b/pyomo/repn/tests/ampl/small7_testCase.mod
@@ -32,21 +32,21 @@ s.t.
v*(x/p/q-y/p/q) = 2.0;
CON5a:
v*(x-y)*(1.0/p/q) = 2.0;
- CON6a:
- v*(x-y) = 2.0*p*q;
+ CON6a:
+ v*(x-y) = 2.0*p*q;
CON1b:
1.0/(p*q)*v*(x-y) = 2.0;
- CON2b:
- v*(1.0/(p*q))*(x-y) = 2.0;
+ CON2b:
+ v*(1.0/(p*q))*(x-y) = 2.0;
CON3b:
v*(x-y)/(p*q) = 2.0;
CON4b:
v*(x/(p*q)-y/(p*q)) = 2.0;
CON5b:
v*(x-y)*(1.0/(p*q)) = 2.0;
- CON6b:
- v*(x-y) = 2.0*(p*q);
+ CON6b:
+ v*(x-y) = 2.0*(p*q);
CON1c:
1.0/(p+q)*v*(x-y) = 2.0;
@@ -58,8 +58,8 @@ s.t.
v*(x/(p+q)-y/(p+q)) = 2.0;
CON5c:
v*(x-y)*(1.0/(p+q)) = 2.0;
- CON6c:
- v*(x-y) = 2.0*(p+q);
+ CON6c:
+ v*(x-y) = 2.0*(p+q);
CON1d:
@@ -72,8 +72,8 @@ s.t.
v*(x/((p+q)^2)-y/((p+q)^2)) = 2.0;
CON5d:
v*(x-y)*(1.0/((p+q)^2)) = 2.0;
- CON6d:
- v*(x-y) = 2.0*((p+q)^2);
+ CON6d:
+ v*(x-y) = 2.0*((p+q)^2);
data;
var x := 1.0;
@@ -85,4 +85,4 @@ fix p := 2.0;
option substout 0;
option presolve 0;
option auxfiles 'rc';
-write gjunk;
+write gsmall7.ampl;
diff --git a/pyomo/repn/tests/ampl/small7_testCase.py b/pyomo/repn/tests/ampl/small7_testCase.py
index 49fab1c47b7..33eea2c5f01 100644
--- a/pyomo/repn/tests/ampl/small7_testCase.py
+++ b/pyomo/repn/tests/ampl/small7_testCase.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
@@ -38,14 +38,14 @@
model.CON3a = Constraint(expr=model.v*(model.x-model.y)/model.p/model.q == 2.0)
model.CON4a = Constraint(expr=model.v*(model.x/model.p/model.q-model.y/model.p/model.q) == 2.0)
model.CON5a = Constraint(expr=model.v*(model.x-model.y)*(1.0/model.p/model.q) == 2.0)
-model.CON6a = Constraint(expr=model.v*(model.x-model.y) == 2.0*model.p*model.q)
+model.CON6a = Constraint(expr=model.v*(model.x-model.y) - 2.0*model.p*model.q == 0)
model.CON1b = Constraint(expr=1.0/(model.p*model.q)*model.v*(model.x-model.y) == 2.0)
model.CON2b = Constraint(expr=model.v*1.0/(model.p*model.p)*(model.x-model.y) == 2.0)
model.CON3b = Constraint(expr=model.v*(model.x-model.y)/(model.p*model.q) == 2.0)
model.CON4b = Constraint(expr=model.v*(model.x/(model.p*model.q)-model.y/(model.p*model.q)) == 2.0)
model.CON5b = Constraint(expr=model.v*(model.x-model.y)*(1.0/(model.p*model.q)) == 2.0)
-model.CON6b = Constraint(expr=model.v*(model.x-model.y) == 2.0*(model.p*model.q))
+model.CON6b = Constraint(expr=model.v*(model.x-model.y) - 2.0*(model.p*model.q) == 0)
model.CON1c = Constraint(expr=1.0/(model.p+model.q)*model.v*(model.x-model.y) == 2.0)
model.CON2c = Constraint(expr=model.v*1.0/(model.p+model.p)*(model.x-model.y) == 2.0)
@@ -59,5 +59,4 @@
model.CON3d = Constraint(expr=model.v*(model.x-model.y)/((model.p+model.q)**2) == 2.0)
model.CON4d = Constraint(expr=model.v*(model.x/((model.p+model.q)**2)-model.y/((model.p+model.q)**2)) == 2.0)
model.CON5d = Constraint(expr=model.v*(model.x-model.y)*(1.0/((model.p+model.q)**2)) == 2.0)
-model.CON6d = Constraint(expr=model.v*(model.x-model.y) == 2.0*((model.p+model.q)**2))
-
+model.CON6d = Constraint(expr=model.v*(model.x-model.y) - 2.0*((model.p+model.q)**2) == 0)
diff --git a/pyomo/repn/tests/ampl/small8.pyomo.nl b/pyomo/repn/tests/ampl/small8.pyomo.nl
index 8ce68c297ce..4780a59e366 100644
--- a/pyomo/repn/tests/ampl/small8.pyomo.nl
+++ b/pyomo/repn/tests/ampl/small8.pyomo.nl
@@ -41,6 +41,6 @@ J2 2
0 -1
2 1
G0 3
-0 1.0
+0 1
1 0
-2 1.0
+2 1
diff --git a/pyomo/repn/tests/ampl/small8_testCase.mod b/pyomo/repn/tests/ampl/small8_testCase.mod
index 022b870d7f8..5330ab12b3f 100644
--- a/pyomo/repn/tests/ampl/small8_testCase.mod
+++ b/pyomo/repn/tests/ampl/small8_testCase.mod
@@ -18,16 +18,16 @@ var z >= 7;
minimize obj: z+x*x+y;
s.t.
- constr:
- y*y >= a;
+ constr:
+ y*y >= a;
- constr2:
- y <= x/a;
+ constr2:
+ y <= x/a;
- constr3:
- z <= y + a;
+ constr3:
+ z <= y + a;
option substout 0;
option presolve 0;
option auxfiles 'rc';
-write gjunk;
+write gsmall8.ampl;
diff --git a/pyomo/repn/tests/ampl/small9_testCase.mod b/pyomo/repn/tests/ampl/small9_testCase.mod
index 4e6dc9ec403..0ab8ed3b9f7 100644
--- a/pyomo/repn/tests/ampl/small9_testCase.mod
+++ b/pyomo/repn/tests/ampl/small9_testCase.mod
@@ -20,22 +20,22 @@ fix y := 0.0;
minimize obj: x;
s.t.
- con1:
- x*y*z + x == 1.0;
- con2:
- x*p*z + x == 1.0;
- con3:
- x*q*z + x == 1.0;
+ con1:
+ x*y*z + x == 1.0;
+ con2:
+ x*p*z + x == 1.0;
+ con3:
+ x*q*z + x == 1.0;
# AMPL differs from Pyomo in these cases that involve immutable params (q).
# These never actually become constraints in Pyomo, and for good reason.
- con4:
- x*y*z == 1.0;
- con5:
- x*p*z == 1.0;
-# con6:
-# x*q*z == 1.0;
+ con4:
+ x*y*z == 1.0;
+ con5:
+ x*p*z == 1.0;
+# con6:
+# x*q*z == 1.0;
option substout 0;
option presolve 0;
option auxfiles 'rc';
-write gjunk;
+write gsmall9.ampl;
diff --git a/pyomo/repn/tests/ampl/small9_testCase.py b/pyomo/repn/tests/ampl/small9_testCase.py
index d30fa5da8c0..f93971739b3 100644
--- a/pyomo/repn/tests/ampl/small9_testCase.py
+++ b/pyomo/repn/tests/ampl/small9_testCase.py
@@ -36,7 +36,7 @@
model.con2 = Constraint(expr= model.x*model.p*model.z + model.x == 1.0)
model.con3 = Constraint(expr= model.x*model.q*model.z + model.x == 1.0)
# Pyomo differs from AMPL in these cases that involve immutable params (q).
-# These never actually become constraints in Pyomo, and for good reason.
+# These never actually become constants in Pyomo, and for good reason.
model.con4 = Constraint(expr= model.x*model.y*model.z == 1.0)
model.con5 = Constraint(expr= model.x*model.p*model.z == 1.0)
model.con6 = Constraint(rule= simple_constraint_rule(model.x*model.q*model.z == 0.0) )
diff --git a/pyomo/repn/tests/ampl/test_ampl_comparison.py b/pyomo/repn/tests/ampl/test_ampl_comparison.py
index ec4147237eb..bab15b17d95 100644
--- a/pyomo/repn/tests/ampl/test_ampl_comparison.py
+++ b/pyomo/repn/tests/ampl/test_ampl_comparison.py
@@ -2,8 +2,8 @@
#
# Pyomo: Python Optimization Modeling Objects
# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
diff --git a/pyomo/repn/tests/ampl/test_ampl_nl.py b/pyomo/repn/tests/ampl/test_ampl_nl.py
index 869069557b1..c81e2043307 100644
--- a/pyomo/repn/tests/ampl/test_ampl_nl.py
+++ b/pyomo/repn/tests/ampl/test_ampl_nl.py
@@ -164,7 +164,7 @@ def test_external_expression_rewrite_fixed(self):
variable_baseline,
delete=True)
- self.assertIsNot(m._ampl_repn, None)
+ self.assertIsNot(m._repn, None)
m.x.fix()
self._cleanup(test_fname)
diff --git a/pyomo/repn/tests/ampl/test_ampl_repn.py b/pyomo/repn/tests/ampl/test_ampl_repn.py
index c290a277305..a80efa54125 100644
--- a/pyomo/repn/tests/ampl/test_ampl_repn.py
+++ b/pyomo/repn/tests/ampl/test_ampl_repn.py
@@ -1,8 +1,7 @@
import pyutilib.th as unittest
from pyomo.core import *
-from pyomo.repn.ampl_repn import _generate_ampl_repn as gar
-from pyomo.repn.ampl_repn import AmplRepn
+from pyomo.repn.standard_repn import generate_standard_repn as gar
class AmplRepnTests(unittest.TestCase):
@@ -18,8 +17,11 @@ def test_divide_by_mutable(self):
m.obj = Objective(expr=m.x**2)
test = gar(m.con.body)
- self.assertEqual(test._constant, 0)
- self.assertEqual(test._linear_vars, {})
- self.assertEqual(test._linear_terms_coef, {})
- self.assertEqual(test._nonlinear_vars, {id(m.x): m.x})
- self.assertIs(test._nonlinear_expr, m.con.body)
+ self.assertEqual(test.constant, 0)
+ self.assertEqual(test.linear_vars, tuple())
+ self.assertEqual(test.linear_coefs, tuple())
+ self.assertEqual(set(id(v) for v in test.nonlinear_vars), set([id(m.x)]))
+ self.assertIs(test.nonlinear_expr, m.con.body)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/pyomo/repn/tests/ampl/test_cAmpl.py b/pyomo/repn/tests/ampl/test_cAmpl.py
deleted file mode 100644
index 134c67ac04f..00000000000
--- a/pyomo/repn/tests/ampl/test_cAmpl.py
+++ /dev/null
@@ -1,172 +0,0 @@
-# ___________________________________________________________________________
-#
-# Pyomo: Python Optimization Modeling Objects
-# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
-# rights in this software.
-# This software is distributed under the 3-clause BSD License.
-# ___________________________________________________________________________
-
-import pyutilib.th as unittest
-#from nose.tools import nottest
-import pyomo.repn
-
-_campl_available = False
-try:
- # Disabling these tests
- #import pyomo.repn.plugins.ampl.cAmpl as cAmpl
- _campl_available = False
-except ImportError:
- pass
-
-class MockFixedValue:
- value = 42
- def __init__(self, v = 42):
- self.value = v
- def is_fixed(self):
- return True
-
-@unittest.skipUnless(_campl_available, "C AMPL module required")
-class CAmplBasicTest(unittest.TestCase):
- def testNone(self):
- with self.assertRaises(ValueError) as cm:
- pyomo.repn.generate_ampl_repn(None)
-
- def testVar(self):
- testname = 'testname'
-
- var = pyomo.core.base.var._VarData(testname, None, None)
- var_ar = pyomo.repn.generate_ampl_repn(var)
-
- self.assertIsInstance(var_ar, pyomo.core.ampl.ampl_representation)
-
- self.assertEquals({testname:1.0}, var_ar._linear_terms_coef)
-
- self.assertEquals(1, len(var_ar._linear_terms_var))
- self.assertIsInstance(var_ar._linear_terms_var[testname], pyomo.core.base.var._VarData)
-
- def testExpressionBase(self):
- exp = pyomo.core.base.expr._ExpressionBase('name', 0, [])
- with self.assertRaises(ValueError) as cm:
- exp_ar = pyomo.repn.generate_ampl_repn(exp)
-
- def testSumExpression(self):
- exp = pyomo.core.base.expr._SumExpression()
- exp_ar = pyomo.repn.generate_ampl_repn(exp)
-
- self.assertIsInstance(exp_ar, pyomo.core.ampl.ampl_representation)
-
- def testProductExpression(self):
- x = pyomo.core.base.var.Var()
- y = pyomo.core.base.var.Var()
- exp = x * y
- exp_ar = pyomo.repn.generate_ampl_repn(exp)
-
- self.assertIsInstance(exp_ar, pyomo.core.ampl.ampl_representation)
- self.assertIs(exp_ar._nonlinear_expr, exp)
- self.assertTrue(exp_ar.is_nonlinear())
-
- def testProductExpressionZeroDiv(self):
- exp = pyomo.core.base.expr._ProductExpression()
- exp._numerator = [MockFixedValue(1)]
- exp._denominator = [MockFixedValue(0)]
- with self.assertRaises(ZeroDivisionError) as cm:
- exp_ar = pyomo.repn.generate_ampl_repn(exp)
-
- def testPowExpressionNoneArgs(self):
- exp = pyomo.core.base.expr._PowExpression([None, None])
- with self.assertRaises(ValueError) as cm:
- exp_ar = pyomo.repn.generate_ampl_repn(exp)
-
- def testPowExpressionConstants(self):
- v1 = MockFixedValue(2)
- v2 = MockFixedValue(3)
-
- exp = pyomo.core.base.expr._PowExpression([v1, v2])
- exp_ar = pyomo.repn.generate_ampl_repn(exp)
-
- self.assertIsNotNone(exp_ar)
- self.assertIsInstance(exp_ar, pyomo.core.ampl.ampl_representation)
-
- self.assertEquals(exp_ar._constant, 8)
-
- def testPowExpressionExp1(self):
- v1 = pyomo.core.base.var.Var()
- v2 = MockFixedValue(1)
-
- exp = pyomo.core.base.expr._PowExpression([v1, v2])
- exp_ar = pyomo.repn.generate_ampl_repn(exp)
-
- self.assertIsNotNone(exp_ar)
- self.assertIsInstance(exp_ar, pyomo.core.ampl.ampl_representation)
- self.assertEquals(exp_ar._linear_terms_var, pyomo.repn.generate_ampl_repn(v1)._linear_terms_var)
-
- def testPowExpressionExp0(self):
- v1 = pyomo.core.base.var.Var()
- v2 = MockFixedValue(0)
-
- exp = pyomo.core.base.expr._PowExpression([v1, v2])
- exp_ar = pyomo.repn.generate_ampl_repn(exp)
-
- self.assertIsNotNone(exp_ar)
- self.assertIsInstance(exp_ar, pyomo.core.ampl.ampl_representation)
- self.assertEquals(exp_ar._constant, 1)
-
- def testPowExpressionNonlinear(self):
- v1 = pyomo.core.base.var.Var(initialize=2)
- v2 = pyomo.core.base.var.Var(initialize=3)
-
- exp = pyomo.core.base.expr._PowExpression([v1, v2])
- exp_ar = pyomo.repn.generate_ampl_repn(exp)
-
- self.assertIsNotNone(exp_ar)
- self.assertIsInstance(exp_ar, pyomo.core.ampl.ampl_representation)
- self.assertIsInstance(exp_ar._nonlinear_expr, pyomo.core.base.expr._PowExpression)
-
- def testIntrinsicFunctionExpressionEmpty(self):
- exp = pyomo.core.base.expr._IntrinsicFunctionExpression('testname', 0, [], None)
- with self.assertRaises(AssertionError) as cm:
- exp_ar = pyomo.repn.generate_ampl_repn(exp)
-
- def testIntrinsicFunctionExpressionNoneArg(self):
- exp = pyomo.core.base.expr._IntrinsicFunctionExpression('sum', 1, [None], sum)
- with self.assertRaises(ValueError) as cm:
- exp_ar = pyomo.repn.generate_ampl_repn(exp)
-
- def testAbsFunctionExpression(self):
- exp = pyomo.core.base.expr._AbsExpression([2])
- with self.assertRaises(ValueError) as cm:
- exp_ar = pyomo.repn.generate_ampl_repn(exp)
-
- def testIntrinsicFunctionExpression(self):
- exp = pyomo.core.base.expr._IntrinsicFunctionExpression('sum', 1, [MockFixedValue()], sum)
- exp_ar = pyomo.repn.generate_ampl_repn(exp)
-
- self.assertIsNotNone(exp_ar)
- self.assertIsInstance(exp_ar, pyomo.core.ampl.ampl_representation)
-
- self.assertEquals(type(exp), type(exp_ar._nonlinear_expr))
- self.assertEquals(exp.name, exp_ar._nonlinear_expr.name)
- self.assertEquals(0, len(exp_ar._nonlinear_vars))
-
- def testFixedValue(self):
- val = MockFixedValue()
- val_ar = pyomo.repn.generate_ampl_repn(val)
-
- self.assertIsInstance(val_ar, pyomo.core.ampl.ampl_representation)
- self.assertEquals(MockFixedValue.value, val_ar._constant)
-
- def testCombinedProductSum(self):
- x = pyomo.core.base.var.Var()
- y = pyomo.core.base.var.Var()
- z = pyomo.core.base.var.Var()
- exp = x * y + z
-
- exp_ar = pyomo.repn.generate_ampl_repn(exp)
-
- self.assertIsInstance(exp_ar, pyomo.core.ampl.ampl_representation)
- self.assertTrue(exp_ar.is_nonlinear())
-
-if __name__ == "__main__":
- unittest.main(verbosity=2)
diff --git a/pyomo/repn/tests/ampl/test_equality.py b/pyomo/repn/tests/ampl/test_equality.py
deleted file mode 100644
index 451ee628416..00000000000
--- a/pyomo/repn/tests/ampl/test_equality.py
+++ /dev/null
@@ -1,244 +0,0 @@
-# ___________________________________________________________________________
-#
-# Pyomo: Python Optimization Modeling Objects
-# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
-# Under the terms of Contract DE-NA0003525 with National Technology and
-# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
-# rights in this software.
-# This software is distributed under the 3-clause BSD License.
-# ___________________________________________________________________________
-
-import types
-
-import pyutilib.th as unittest
-
-from pyomo.repn.tests.ampl.helper import MockFixedValue
-from pyomo.core import *
-
-_campl_available = False
-#FIXME: Disabling C AMPL tests until we decide whether to keep C AMPL module
-# around and keep it up to date with nl writer changes. (ZBF)
-#try:
-# import pyomo.core.ampl.cAmpl as cAmpl
-# _campl_available = True
-# cgar = pyomo.core.ampl.cAmpl.generate_ampl_repn
-# gar = pyomo.core.ampl.ampl.py_generate_ampl_repn
-#except ImportError:
-from pyomo.repn.ampl_repn import _generate_ampl_repn as gar
-from pyomo.repn.ampl_repn import AmplRepn
-
-class _GenericAmplRepnEqualityTests(unittest.TestCase):
- def setUp(self):
- # Helper function for param init
- def q_initialize(model, i):
- return [2,3,5,7,11,13,17,19,23,29][i-1]
- # Need a model so that variables can be distinguishable
- self.model = ConcreteModel()
- self.model.s = RangeSet(10)
- self.model.p = Param(default=42)
- self.model.q = Param(self.model.s, initialize=q_initialize)
- self.model.w = Var(self.model.s)
- self.model.x = Var()
- self.model.y = Var()
- self.model.z = Var(self.model.s)
-
- def tearDown(self):
- self.model = None
-
- def assertAmplRepnMatch(self, rep1, rep2):
- self.assertEqual(rep1, rep2)
- self.assertEqual(rep1.is_constant(), rep2.is_constant())
- self.assertEqual(rep1.is_linear(), rep2.is_linear())
- self.assertEqual(rep1.is_nonlinear(), rep2.is_nonlinear())
- self.assertEqual(rep1.needs_sum(), rep2.needs_sum())
-
-class AmplRepnEqualityTests(_GenericAmplRepnEqualityTests):
- """Serves as a test class for the AmplRepn.__eq__ method."""
-
- def testBasicEquality(self):
- self.assertEqual(AmplRepn(), AmplRepn())
-
- def testBasicInequality(self):
- self.assertNotEqual(AmplRepn(), None)
-
- def testVarEquality(self):
- self.assertEqual(gar(self.model.x), gar(self.model.x))
-
- def testVarInequality(self):
- self.assertNotEqual(gar(self.model.x), gar(self.model.y))
-
- def testVarCoefInequality(self):
- self.assertNotEqual(gar(self.model.x), gar(2.0 * self.model.x))
-
- def testFixedValueEquality(self):
- self.assertEqual(gar(MockFixedValue()), gar(MockFixedValue()))
-
- def testFixedValueInequality(self):
- self.assertNotEqual(gar(MockFixedValue(1)), gar(MockFixedValue(2)))
-
- def testProductEquality(self):
- expr = self.model.x * self.model.y
- self.assertEqual(gar(expr), gar(expr))
-
- def testProductInequality(self):
- e1 = self.model.x * self.model.x
- e2 = self.model.y * self.model.y
- self.assertNotEqual(gar(e1), gar(e2))
-
- def testSumEquality(self):
- expr = self.model.x + self.model.y
- self.assertEqual(gar(expr), gar(expr))
-
- def testSumInequality(self):
- e1 = self.model.x + self.model.y
- e2 = self.model.x + self.model.x
- self.assertNotEqual(gar(e1), gar(e2))
-
- def testSumCommutativeEquality(self):
- e1 = self.model.x + self.model.y
- e2 = self.model.y + self.model.x
- self.assertEqual(gar(e1), gar(e2))
-
- def testPowEquality(self):
- expr = self.model.x ** 2
- self.assertEqual(gar(expr), gar(expr))
-
- def testPowInequality(self):
- e1 = self.model.x ** 2
- e2 = self.model.x ** 3
- self.assertNotEqual(gar(e1), gar(e2))
-
- def testIntrinsicEquality(self):
- fns = [sin, cos, tan, sinh, cosh, tanh, asin, acos, atan, asinh, acosh, atanh, log, exp]
- for fn in fns:
- expr = fn(self.model.x)
- self.assertEqual(gar(expr), gar(expr))
-
- def testIntrinsicInequality(self):
- e1 = sin(self.model.x)
- e2 = cos(self.model.x)
- self.assertNotEqual(gar(e1), gar(e2))
-
- def testCompoundEquality(self):
- expr = self.model.x + self.model.y + self.model.x * self.model.y
- self.assertEqual(gar(expr), gar(expr))
-
- def testMoreCompoundEquality(self):
- expr = ((self.model.x + self.model.y) * self.model.x) ** 2
- self.assertEqual(gar(expr), gar(expr))
-
- def testCompoundCoefficientInequality(self):
- e1 = self.model.x * self.model.y
- e2 = 2.0 * self.model.x * self.model.y
- self.assertNotEqual(gar(e1), gar(e2))
-
- def testQuotientEquality(self):
- expr = self.model.x / self.model.y
- self.assertEqual(gar(expr), gar(expr))
-
- def testCompoundQuotientEquality(self):
- expr = self.model.y + self.model.x / self.model.y + self.model.y ** 2
- self.assertEqual(gar(expr), gar(expr))
-
- def testQuotientInequality(self):
- e1 = self.model.x / self.model.y
- e2 = self.model.y / self.model.x
- self.assertNotEqual(gar(e1), gar(e2))
-
- def testSumEquality(self):
- expr = sum(self.model.z[i] for i in self.model.s)
- self.assertEqual(gar(expr), gar(expr))
-
- def testCompoundSumEquality(self):
- expr = sum(self.model.z[i] for i in self.model.s) + self.model.x / self.model.y
- self.assertEqual(gar(expr), gar(expr))
-
-@unittest.skipUnless(_campl_available, "C AMPL module required")
-class CAmplEqualityCompatTests(_GenericAmplRepnEqualityTests):
- """Tests whether the Python and cAmpl implementations produce identical repns."""
-
- def testEnvironment(self):
- # Simply ensure the import environment is working.
- with self.assertRaises(ValueError) as cm:
- cAmpl.generate_ampl_repn(None, None, None)
-
- def testEnvironmentTypes(self):
- self.assertEqual(type(gar), types.FunctionType)
- self.assertEqual(type(cgar), types.BuiltinFunctionType)
-
- def testFixedValue(self):
- expr = MockFixedValue()
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testVar(self):
- expr = self.model.x
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testProduct(self):
- expr = self.model.x * self.model.y
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testSum(self):
- expr = self.model.x + self.model.y
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testSumCommutative(self):
- e1 = self.model.x + self.model.y
- e2 = self.model.y + self.model.x
- self.assertAmplRepnMatch(gar(e1), cgar(e2))
-
- def testPow(self):
- expr = self.model.x ** 2
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testIntrinsic(self):
- fns = [sin, cos, tan, sinh, cosh, tanh, asin, acos, atan, asinh, acosh, atanh, log, exp]
- for fn in fns:
- expr = fn(self.model.x)
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testCompound(self):
- expr = self.model.x + self.model.y + self.model.x * self.model.y
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testMoreCompound(self):
- expr = ((self.model.x + self.model.y) * self.model.x) ** 2
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testQuotient(self):
- expr = self.model.x / self.model.y
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testCompoundQuotient(self):
- expr = self.model.y + self.model.x / self.model.y + self.model.y ** 2
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testSum(self):
- expr = sum(self.model.z[i] for i in self.model.s)
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testCompoundSum(self):
- expr = sum(self.model.z[i] for i in self.model.s) + self.model.x / self.model.y
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testSumExpression(self):
- expr = sum(self.model.w[i] / self.model.z[i] ** 3 for i in self.model.s)
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testSumExpressionParam(self):
- expr = sum(value(self.model.q[i]) / self.model.z[i] ** 3 for i in self.model.s)
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testCantilvrConstraintExpr(self):
- # originally from pyomo.data.cute cantilvr model.
- expr = sum(value(self.model.q[i]) / self.model.z[i] ** 3 for i in self.model.s) - 1.0
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
- def testCantilvrObjective(self):
- # originally from pyomo.data.cute cantilvr model.
- # exposes problem in linear product handling, if present.
- expr = sum(self.model.z[i] for i in self.model.s) * 0.0624
- self.assertAmplRepnMatch(gar(expr), cgar(expr))
-
-if __name__ == "__main__":
- unittest.main(verbosity=2)
diff --git a/pyomo/repn/tests/ampl/test_suffixes.py b/pyomo/repn/tests/ampl/test_suffixes.py
index c99e8f1adab..beb4bc0920f 100644
--- a/pyomo/repn/tests/ampl/test_suffixes.py
+++ b/pyomo/repn/tests/ampl/test_suffixes.py
@@ -42,7 +42,7 @@ def test_EXPORT_suffixes_int(self):
model.junk.set_value(model.y,2)
model.junk_inactive.set_value(model.y,2)
- model.obj = Objective(expr=model.x+summation(model.y))
+ model.obj = Objective(expr=model.x+sum_product(model.y))
model.junk.set_value(model.obj,3)
model.junk_inactive.set_value(model.obj,3)
@@ -83,7 +83,7 @@ def test_EXPORT_suffixes_float(self):
model.junk.set_value(model.y,2)
model.junk_inactive.set_value(model.y,2)
- model.obj = Objective(expr=model.x+summation(model.y))
+ model.obj = Objective(expr=model.x+sum_product(model.y))
model.junk.set_value(model.obj,3)
model.junk_inactive.set_value(model.obj,3)
@@ -115,7 +115,7 @@ def test_EXPORT_suffixes_with_SOSConstraint_duplicateref(self):
model = ConcreteModel()
model.ref = Suffix(direction=Suffix.EXPORT,datatype=Suffix.INT)
model.y = Var([1,2,3])
- model.obj = Objective(expr=summation(model.y))
+ model.obj = Objective(expr=sum_product(model.y))
# The NL writer will convert this constraint to ref and sosno
# suffixes on model.y
@@ -148,7 +148,7 @@ def test_EXPORT_suffixes_with_SOSConstraint_duplicatesosno(self):
model = ConcreteModel()
model.sosno = Suffix(direction=Suffix.EXPORT,datatype=Suffix.INT)
model.y = Var([1,2,3])
- model.obj = Objective(expr=summation(model.y))
+ model.obj = Objective(expr=sum_product(model.y))
# The NL writer will convert this constraint to ref and sosno
# suffixes on model.y
@@ -180,7 +180,7 @@ def test_EXPORT_suffixes_no_datatype(self):
model = ConcreteModel()
model.sosno = Suffix(direction=Suffix.EXPORT,datatype=None)
model.y = Var([1,2,3])
- model.obj = Objective(expr=summation(model.y))
+ model.obj = Objective(expr=sum_product(model.y))
# The NL writer will convert this constraint to ref and sosno
# suffixes on model.y
diff --git a/pyomo/core/base/expr.py b/pyomo/repn/tests/baron/__init__.py
similarity index 87%
rename from pyomo/core/base/expr.py
rename to pyomo/repn/tests/baron/__init__.py
index 1f0b11ca9e9..3719398a540 100644
--- a/pyomo/core/base/expr.py
+++ b/pyomo/repn/tests/baron/__init__.py
@@ -7,7 +7,6 @@
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
-
-import sys
-from pyomo.core.kernel import expr
-sys.modules[__name__] = expr
+#
+# Pyomo BARON plugin tests
+#
diff --git a/pyomo/repn/tests/baron/no_column_ordering_linear.bar.baseline b/pyomo/repn/tests/baron/no_column_ordering_linear.bar.baseline
new file mode 100644
index 00000000000..cfe3329d0be
--- /dev/null
+++ b/pyomo/repn/tests/baron/no_column_ordering_linear.bar.baseline
@@ -0,0 +1,19 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES a, b, c;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, con;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+con: a + b + c <= 1;
+
+OBJ: minimize a + b + c ;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+}
+
diff --git a/pyomo/repn/tests/baron/no_column_ordering_quadratic.bar.baseline b/pyomo/repn/tests/baron/no_column_ordering_quadratic.bar.baseline
new file mode 100644
index 00000000000..bd01176d620
--- /dev/null
+++ b/pyomo/repn/tests/baron/no_column_ordering_quadratic.bar.baseline
@@ -0,0 +1,19 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES a, b, c;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, con;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+con: a + b + c + a * a + b * b + c * c + a * b + a * c + b * c <= 1;
+
+OBJ: minimize a + b + c + a * a + b * b + c * c + a * b + a * c + b * c ;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+}
+
diff --git a/pyomo/repn/tests/baron/no_row_ordering.bar.baseline b/pyomo/repn/tests/baron/no_row_ordering.bar.baseline
new file mode 100644
index 00000000000..db09d211b45
--- /dev/null
+++ b/pyomo/repn/tests/baron/no_row_ordering.bar.baseline
@@ -0,0 +1,23 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES a;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, con1, con2, con3, con4_1_, con4_2_;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+con1: a >= 0;
+con2: a <= 1;
+con3: 0 <= a <= 1;
+con4_1_: a == 1;
+con4_2_: a == 2;
+
+OBJ: minimize a ;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+}
+
diff --git a/pyomo/repn/tests/baron/small1.pyomo.bar b/pyomo/repn/tests/baron/small1.pyomo.bar
new file mode 100644
index 00000000000..e3e8000e805
--- /dev/null
+++ b/pyomo/repn/tests/baron/small1.pyomo.bar
@@ -0,0 +1,21 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES x1, x2;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c1;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c1: x1 ^ 2 == 4;
+
+OBJ: minimize x2 ^ 2;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+x1: 1;
+x2: 1;
+}
+
diff --git a/pyomo/repn/tests/baron/small10.pyomo.bar b/pyomo/repn/tests/baron/small10.pyomo.bar
new file mode 100644
index 00000000000..baefb6dba19
--- /dev/null
+++ b/pyomo/repn/tests/baron/small10.pyomo.bar
@@ -0,0 +1,32 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES x1;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c1: 1.0 * x1 == 0;
+c2: 0.0 * x1 + x1 == 0;
+c3: x1 == 0;
+c4: x1 == 0;
+c5: 0.0 * x1 ^ 2 + x1 == 0;
+c6: 0.0 * x1 * 1.0 + x1 == 0;
+c7: 0.0 * x1 ^ 2 + x1 == 0;
+c8: 0.0 * x1 * 1.0 + x1 == 0;
+c9: 0.0 * x1 == 0;
+c10: 0.0 * x1 ^ 2 == 0;
+c11: 0.0 * x1 * 1.0 == 0;
+c12: 0.0 * x1 ^ 2 == 0;
+c13: 0.0 * x1 * 1.0 == 0;
+c14: 0.0 * x1 == 0;
+
+OBJ: minimize 1.0 * x1 + 0.0 * x1 + 0.0 * x1 + x1 * x1 * 0.0 + x1 * x1 * 0.0 + 0.0 * x1 ^ 2;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+}
+
diff --git a/pyomo/repn/tests/baron/small11.pyomo.bar b/pyomo/repn/tests/baron/small11.pyomo.bar
new file mode 100644
index 00000000000..84705f94d75
--- /dev/null
+++ b/pyomo/repn/tests/baron/small11.pyomo.bar
@@ -0,0 +1,21 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES x1, x2, x3;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c1, c2, c3;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c1: -1 <= 1.0 + 0 * ONE_VAR_CONST__ <= 1;
+c2: -1 <= x1 <= 1;
+c3: -1 <= x2 <= 1;
+
+OBJ: minimize x3;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+}
+
diff --git a/pyomo/repn/tests/baron/small12.pyomo.bar b/pyomo/repn/tests/baron/small12.pyomo.bar
new file mode 100644
index 00000000000..5b76bac4af8
--- /dev/null
+++ b/pyomo/repn/tests/baron/small12.pyomo.bar
@@ -0,0 +1,49 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES x1, x2, x3, x4, x5, x6, x7;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c1: Expr_if( ( 0.0 ), then=( vTrue ), else=( vFalse ) ) == -1;
+c2: Expr_if( ( 1.0 ), then=( vTrue ), else=( vFalse ) ) == 1;
+c3: Expr_if( ( vN1 <= 0.0 ), then=( vTrue ), else=( vFalse ) ) == 1;
+c4: Expr_if( ( v0 <= 0.0 ), then=( vTrue ), else=( vFalse ) ) == 1;
+c5: Expr_if( ( vP1 <= 0.0 ), then=( vTrue ), else=( vFalse ) ) == -1;
+c6: Expr_if( ( vN1 < 0.0 ), then=( vTrue ), else=( vFalse ) ) == 1;
+c7: Expr_if( ( v0 < 0.0 ), then=( vTrue ), else=( vFalse ) ) == -1;
+c8: Expr_if( ( vP1 < 0.0 ), then=( vTrue ), else=( vFalse ) ) == -1;
+c9: Expr_if( ( 0.0 <= 10.0*vN1 ), then=( vTrue ), else=( vFalse ) ) == -1;
+c10: Expr_if( ( 0.0 <= 10.0*v0 ), then=( vTrue ), else=( vFalse ) ) == 1;
+c11: Expr_if( ( 0.0 <= 10.0*vP1 ), then=( vTrue ), else=( vFalse ) ) == 1;
+c12: Expr_if( ( 0.0 < 10.0*vN1 ), then=( vTrue ), else=( vFalse ) ) == -1;
+c13: Expr_if( ( 0.0 < 10.0*v0 ), then=( vTrue ), else=( vFalse ) ) == -1;
+c14: Expr_if( ( 0.0 < 10.0*vP1 ), then=( vTrue ), else=( vFalse ) ) == 1;
+c15: Expr_if( ( -1.0 <= vN2 <= 1.0 ), then=( vTrue ), else=( vFalse ) ) == -1;
+c16: Expr_if( ( - vP1 <= vN1 <= 1.0 ), then=( vTrue ), else=( vFalse ) ) == 1;
+c17: Expr_if( ( - vP1**2 <= v0 <= 1.0 ), then=( vTrue ), else=( vFalse ) ) == 1;
+c18: Expr_if( ( vN1 <= vP1 <= 1.0 ), then=( vTrue ), else=( vFalse ) ) == 1;
+c19: Expr_if( ( -1.0 <= vP2 <= 1.0 ), then=( vTrue ), else=( vFalse ) ) == -1;
+c20: Expr_if( ( -1.0 < vN2 < 1.0 ), then=( vTrue ), else=( vFalse ) ) == -1;
+c21: Expr_if( ( -1.0 < vN1 < vP1 ), then=( vTrue ), else=( vFalse ) ) == -1;
+c22: Expr_if( ( -1.0 < v0 < vP1**2 ), then=( vTrue ), else=( vFalse ) ) == 1;
+c23: Expr_if( ( -1.0 < vP1 < vP1 ), then=( vTrue ), else=( vFalse ) ) == -1;
+c24: Expr_if( ( -1.0 < vP2 < 1.0 ), then=( vTrue ), else=( vFalse ) ) == -1;
+
+OBJ: minimize 10.0 * Expr_if( ( v0 ), then=( vTrue ), else=( vFalse ) );
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+x1: 1;
+x2: -1;
+x3: -1;
+x4: 0;
+x5: 1;
+x6: -2;
+x7: 2;
+}
+
diff --git a/pyomo/repn/tests/baron/small13.pyomo.bar b/pyomo/repn/tests/baron/small13.pyomo.bar
new file mode 100644
index 00000000000..ab606879b1b
--- /dev/null
+++ b/pyomo/repn/tests/baron/small13.pyomo.bar
@@ -0,0 +1,22 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES x1;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c1, c2, c3;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c1: x1 ^ 3 - x1 == 0;
+c2: 10 * (x1 ^ 3 - x1) == 0;
+c3: (x1 ^ 3 - x1) * 0.1 == 0;
+
+OBJ: maximize x1;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+x1: 0.5;
+}
+
diff --git a/pyomo/repn/tests/baron/small14.pyomo.bar b/pyomo/repn/tests/baron/small14.pyomo.bar
new file mode 100644
index 00000000000..0c42d05de6f
--- /dev/null
+++ b/pyomo/repn/tests/baron/small14.pyomo.bar
@@ -0,0 +1,39 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES x1, x2;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c1: log(x1) == 0;
+c2: log10(x1) == 0;
+c3: sin(x2) == 0;
+c4: cos(x2) == 1;
+c5: tan(x2) == 0;
+c6: sinh(x2) == 0;
+c7: cosh(x2) == 1;
+c8: tanh(x2) == 0;
+c9: asin(x2) == 0;
+c10: acos(x2) == 1.5707963267948966;
+c11: atan(x2) == 0;
+c12: asinh(x2) == 0;
+c13: acosh((7.3890560989306495 + x1) * 0.18393972058572117) == 0;
+c14: atanh(x2) == 0;
+c15: exp(x2) == 1;
+c16: sqrt(x1) == 1;
+c17: ceil(x1) == 1;
+c18: floor(x1) == 1;
+c19: abs(x1) == 1;
+
+OBJ: minimize x1 + x2;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+x1: 1;
+x2: 0;
+}
+
diff --git a/pyomo/repn/tests/baron/small2.pyomo.bar b/pyomo/repn/tests/baron/small2.pyomo.bar
new file mode 100644
index 00000000000..5145029d6e5
--- /dev/null
+++ b/pyomo/repn/tests/baron/small2.pyomo.bar
@@ -0,0 +1,21 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES x1, x2;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c1;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c1: x1 ^ 2 == 4;
+
+OBJ: minimize x2;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+x1: 1;
+x2: 1;
+}
+
diff --git a/pyomo/repn/tests/baron/small3.pyomo.bar b/pyomo/repn/tests/baron/small3.pyomo.bar
new file mode 100644
index 00000000000..c3bc07a9aaf
--- /dev/null
+++ b/pyomo/repn/tests/baron/small3.pyomo.bar
@@ -0,0 +1,21 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES x1, x2;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c1;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c1: x1 ^ 2 == 4;
+
+OBJ: minimize x2 * x1;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+x1: 1;
+x2: 1;
+}
+
diff --git a/pyomo/repn/tests/baron/small4.pyomo.bar b/pyomo/repn/tests/baron/small4.pyomo.bar
new file mode 100644
index 00000000000..535e8949669
--- /dev/null
+++ b/pyomo/repn/tests/baron/small4.pyomo.bar
@@ -0,0 +1,21 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES x1, x2;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c1;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c1: x1 * x2 == 4;
+
+OBJ: minimize x1 ^ 2;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+x1: 1;
+x2: 1;
+}
+
diff --git a/pyomo/repn/tests/baron/small5.pyomo.bar b/pyomo/repn/tests/baron/small5.pyomo.bar
new file mode 100644
index 00000000000..84f1650d145
--- /dev/null
+++ b/pyomo/repn/tests/baron/small5.pyomo.bar
@@ -0,0 +1,45 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES x1, x2, x3;
+
+LOWER_BOUNDS{
+x1: -1;
+x2: -1;
+x3: -1;
+}
+
+UPPER_BOUNDS{
+x1: 1;
+x2: 1;
+x3: 1;
+}
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c1: 0.5 * x1 * (x2 - x3) == 2;
+c2: 0.5 * x1 * (x2 - x3) == 2;
+c3: x1 * (x2 - x3) * 0.5 == 2;
+c4: x1 * (0.5 * x2 - 0.5 * x3) == 2;
+c5: x1 * (x2 - x3) * 0.5 == 2;
+c6: x1 * (x2 - x3) == 4;
+c7: (1/2.0) * x1 * (x2 - x3) == 2;
+c8: (1/2.0) * x1 * (x2 - x3) == 2;
+c9: x1 * (x2 - x3) * (1/2.0) == 2;
+c10: x1 * ((1/2.0) * x2 - (1/2.0) * x3) == 2;
+c11: x1 * (x2 - x3) * (1/2.0) == 2;
+c12: x1 * (x2 - x3) == 4;
+
+OBJ: minimize x2 ^ 2 * 0.5 + x2 ^ 2 * (1/2.0);
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+x1: 3;
+x2: 1;
+x3: 2;
+}
+
diff --git a/pyomo/repn/tests/baron/small6.pyomo.bar b/pyomo/repn/tests/baron/small6.pyomo.bar
new file mode 100644
index 00000000000..d3a372af515
--- /dev/null
+++ b/pyomo/repn/tests/baron/small6.pyomo.bar
@@ -0,0 +1,39 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES x1, x2, x3;
+
+LOWER_BOUNDS{
+x1: -1;
+x2: -1;
+x3: -1;
+}
+
+UPPER_BOUNDS{
+x1: 1;
+x2: 1;
+x3: 1;
+}
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c1, c2, c3, c4, c5, c6;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c1: (1/2.0) * x1 * (x2 - x3) == 2;
+c2: x1 * (1/2.0) * (x2 - x3) == 2;
+c3: x1 * (x2 - x3) * (1/2.0) == 2;
+c4: x1 * (x2 * (1/2.0) - x3 * (1/2.0)) == 2;
+c5: x1 * (x2 - x3) * (1/2.0) == 2;
+c6: x1 * (x2 - x3) - 2.0 * 2.0 == 0;
+
+OBJ: minimize x2;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+x1: 3;
+x2: 1;
+x3: 2;
+}
+
diff --git a/pyomo/repn/tests/baron/small7.pyomo.bar b/pyomo/repn/tests/baron/small7.pyomo.bar
new file mode 100644
index 00000000000..55f442340d2
--- /dev/null
+++ b/pyomo/repn/tests/baron/small7.pyomo.bar
@@ -0,0 +1,57 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES x1, x2, x3;
+
+LOWER_BOUNDS{
+x1: -1;
+x2: -1;
+x3: -1;
+}
+
+UPPER_BOUNDS{
+x1: 1;
+x2: 1;
+x3: 1;
+}
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22, c23, c24;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c1: (1/2.0) * 0.5 * x1 * (x2 - x3) == 2;
+c2: x1 * (1/2.0) * (1/2.0) * (x2 - x3) == 2;
+c3: x1 * (x2 - x3) * (1/2.0) * 0.5 == 2;
+c4: x1 * (x2 * (1/2.0) * 0.5 - x3 * (1/2.0) * 0.5) == 2;
+c5: x1 * (x2 - x3) * (1/2.0) * 0.5 == 2;
+c6: x1 * (x2 - x3) - 4.0 * 2.0 == 0;
+c7: (1/(2.0 * 2.0)) * x1 * (x2 - x3) == 2;
+c8: x1 * (1/(2.0 * 2.0)) * (x2 - x3) == 2;
+c9: x1 * (x2 - x3) * (1/(2.0 * 2.0)) == 2;
+c10: x1 * (x2 * (1/(2.0 * 2.0)) - x3 * (1/(2.0 * 2.0))) == 2;
+c11: x1 * (x2 - x3) * (1/(2.0 * 2.0)) == 2;
+c12: x1 * (x2 - x3) - 4.0 * 2.0 == 0;
+c13: (1/(2.0 + 2.0)) * x1 * (x2 - x3) == 2;
+c14: x1 * (1/(2.0 + 2.0)) * (x2 - x3) == 2;
+c15: x1 * (x2 - x3) * (1/(2.0 + 2.0)) == 2;
+c16: x1 * (x2 * (1/(2.0 + 2.0)) - x3 * (1/(2.0 + 2.0))) == 2;
+c17: x1 * (x2 - x3) * (1/(2.0 + 2.0)) == 2;
+c18: x1 * (x2 - x3) - 2.0 * (2.0 + 2.0) == 0;
+c19: (1/(2.0 + 2.0) ^ 2) * x1 * (x2 - x3) == 2;
+c20: x1 * (1/(2.0 + 2.0) ^ 2) * (x2 - x3) == 2;
+c21: x1 * (x2 - x3) * (1/(2.0 + 2.0) ^ 2) == 2;
+c22: x1 * (x2 * (1/(2.0 + 2.0) ^ 2) - x3 * (1/(2.0 + 2.0) ^ 2)) == 2;
+c23: x1 * (x2 - x3) * (1/(2.0 + 2.0) ^ 2) == 2;
+c24: x1 * (x2 - x3) - 2.0 * (2.0 + 2.0) ^ 2 == 0;
+
+OBJ: minimize x2;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+x1: 3;
+x2: 1;
+x3: 2;
+}
+
diff --git a/pyomo/repn/tests/baron/small8.pyomo.bar b/pyomo/repn/tests/baron/small8.pyomo.bar
new file mode 100644
index 00000000000..2657b9f155e
--- /dev/null
+++ b/pyomo/repn/tests/baron/small8.pyomo.bar
@@ -0,0 +1,25 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__, x1, x2, x3;
+
+LOWER_BOUNDS{
+x1: 0;
+x2: 0;
+x3: 7;
+}
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c1, c2, c3;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c1: x1 * x1 >= 2;
+c2: x1 - 0.5 * x2 <= 0;
+c3: x3 - (x1 + 2.0) <= 0;
+
+OBJ: minimize x3 + x2 * x2 + x1;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+}
+
diff --git a/pyomo/repn/tests/baron/small9.pyomo.bar b/pyomo/repn/tests/baron/small9.pyomo.bar
new file mode 100644
index 00000000000..4bf198cb431
--- /dev/null
+++ b/pyomo/repn/tests/baron/small9.pyomo.bar
@@ -0,0 +1,23 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES x1, x2;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c1, c2, c3, c4, c5;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c1: x1 * 0.0 * x2 + x1 == 1;
+c2: 0.0 * x1 * x2 + x1 == 1;
+c3: x1 == 1;
+c4: x1 * 0.0 * x2 == 1;
+c5: 0.0 * x1 * x2 == 1;
+
+OBJ: minimize x1;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+}
+
diff --git a/pyomo/repn/tests/baron/test_baron.py b/pyomo/repn/tests/baron/test_baron.py
new file mode 100644
index 00000000000..4e3f77445b1
--- /dev/null
+++ b/pyomo/repn/tests/baron/test_baron.py
@@ -0,0 +1,207 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+#
+# Test the canonical expressions
+#
+
+import os
+
+import pyutilib.th as unittest
+
+from pyomo.environ import *
+import pyomo.opt
+
+thisdir = os.path.dirname(os.path.abspath(__file__))
+
+
+class Test(unittest.TestCase):
+
+ def _cleanup(self, fname):
+ try:
+ os.remove(fname)
+ except OSError:
+ pass
+
+ def _get_fnames(self):
+ class_name, test_name = self.id().split('.')[-2:]
+ prefix = os.path.join(thisdir, test_name.replace("test_", "", 1))
+ return prefix+".bar.baseline", prefix+".bar.out"
+
+ def _check_baseline(self, model, **kwds):
+ baseline_fname, test_fname = self._get_fnames()
+ self._cleanup(test_fname)
+ io_options = {"symbolic_solver_labels": True}
+ io_options.update(kwds)
+ model.write(test_fname,
+ format="bar",
+ io_options=io_options)
+ self.assertFileEqualsBaseline(
+ test_fname,
+ baseline_fname,
+ delete=True)
+
+ def _gen_expression(self, terms):
+ terms = list(terms)
+ expr = 0.0
+ for term in terms:
+ if type(term) is tuple:
+ prodterms = list(term)
+ prodexpr = 1.0
+ for x in prodterms:
+ prodexpr *= x
+ expr += prodexpr
+ else:
+ expr += term
+ return expr
+
+ def test_no_column_ordering_quadratic(self):
+ model = ConcreteModel()
+ model.a = Var()
+ model.b = Var()
+ model.c = Var()
+
+ terms = [model.a, model.b, model.c,
+ (model.a, model.a), (model.b, model.b), (model.c, model.c),
+ (model.a, model.b), (model.a, model.c), (model.b, model.c)]
+ model.obj = Objective(expr=self._gen_expression(terms))
+ model.con = Constraint(expr=self._gen_expression(terms) <= 1)
+ self._check_baseline(model)
+
+ def test_no_column_ordering_linear(self):
+ model = ConcreteModel()
+ model.a = Var()
+ model.b = Var()
+ model.c = Var()
+
+ terms = [model.a, model.b, model.c]
+ model.obj = Objective(expr=self._gen_expression(terms))
+ model.con = Constraint(expr=self._gen_expression(terms) <= 1)
+ self._check_baseline(model)
+
+ def test_no_row_ordering(self):
+ model = ConcreteModel()
+ model.a = Var()
+
+ components = {}
+ components["obj"] = Objective(expr=model.a)
+ components["con1"] = Constraint(expr=model.a >= 0)
+ components["con2"] = Constraint(expr=model.a <= 1)
+ components["con3"] = Constraint(expr=(0, model.a, 1))
+ components["con4"] = Constraint([1,2], rule=lambda m, i: model.a == i)
+
+ for key in components:
+ model.add_component(key, components[key])
+
+ self._check_baseline(model, file_determinism=2)
+
+ def test_var_on_other_model(self):
+ other = ConcreteModel()
+ other.a = Var()
+
+ model = ConcreteModel()
+ model.x = Var()
+ model.c = Constraint(expr=other.a + 2*model.x <= 0)
+ model.obj = Objective(expr=model.x)
+ self._check_baseline(model)
+
+ def test_var_on_deactivated_block(self):
+ model = ConcreteModel()
+ model.x = Var()
+ model.other = Block()
+ model.other.a = Var()
+ model.other.deactivate()
+ model.c = Constraint(expr=model.other.a + 2*model.x <= 0)
+ model.obj = Objective(expr=model.x)
+ self._check_baseline(model)
+
+ def test_var_on_nonblock(self):
+ class Foo(Block().__class__):
+ def __init__(self, *args, **kwds):
+ kwds.setdefault('ctype',Foo)
+ super(Foo,self).__init__(*args, **kwds)
+
+ model = ConcreteModel()
+ model.x = Var()
+ model.other = Foo()
+ model.other.a = Var()
+ model.c = Constraint(expr=model.other.a + 2*model.x <= 0)
+ model.obj = Objective(expr=model.x)
+ self._check_baseline(model)
+
+
+#class TestBaron_writer(unittest.TestCase):
+class TestBaron_writer(object):
+
+ def _cleanup(self, fname):
+ try:
+ os.remove(fname)
+ except OSError:
+ pass
+
+ def _get_fnames(self):
+ class_name, test_name = self.id().split('.')[-2:]
+ prefix = os.path.join(thisdir, test_name.replace("test_", "", 1))
+ return prefix+".bar.baseline", prefix+".bar.out"
+
+ def test_var_on_other_model(self):
+ other = ConcreteModel()
+ other.a = Var()
+
+ model = ConcreteModel()
+ model.x = Var()
+ model.c = Constraint(expr=other.a + 2*model.x <= 0)
+ model.obj = Objective(expr=model.x)
+
+ baseline_fname, test_fname = self._get_fnames()
+ self._cleanup(test_fname)
+ self.assertRaises(
+ KeyError,
+ model.write, test_fname, format='bar')
+ self._cleanup(test_fname)
+
+ def test_var_on_deactivated_block(self):
+ model = ConcreteModel()
+ model.x = Var()
+ model.other = Block()
+ model.other.a = Var()
+ model.other.deactivate()
+ model.c = Constraint(expr=model.other.a + 2*model.x <= 0)
+ model.obj = Objective(expr=model.x)
+
+ baseline_fname, test_fname = self._get_fnames()
+ self._cleanup(test_fname)
+ self.assertRaises(
+ KeyError,
+ model.write, test_fname, format='bar' )
+ self._cleanup(test_fname)
+
+ def test_var_on_nonblock(self):
+ class Foo(Block().__class__):
+ def __init__(self, *args, **kwds):
+ kwds.setdefault('ctype',Foo)
+ super(Foo,self).__init__(*args, **kwds)
+
+ model = ConcreteModel()
+ model.x = Var()
+ model.other = Foo()
+ model.other.a = Var()
+ model.c = Constraint(expr=model.other.a + 2*model.x <= 0)
+ model.obj = Objective(expr=model.x)
+
+ baseline_fname, test_fname = self._get_fnames()
+ self._cleanup(test_fname)
+ self.assertRaises(
+ KeyError,
+ model.write, test_fname, format='bar')
+ self._cleanup(test_fname)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/pyomo/repn/tests/baron/test_baron_comparison.py b/pyomo/repn/tests/baron/test_baron_comparison.py
new file mode 100644
index 00000000000..d1812926d79
--- /dev/null
+++ b/pyomo/repn/tests/baron/test_baron_comparison.py
@@ -0,0 +1,73 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+#
+# Test the Pyomo BAR writer
+#
+
+import re
+import glob
+import os
+from os.path import abspath, dirname, join
+currdir = dirname(abspath(__file__))+os.sep
+datadir = abspath(join(currdir, "..", "ampl"))+os.sep
+
+import pyutilib.th as unittest
+import pyutilib.subprocess
+
+import pyomo.scripting.pyomo_main as main
+
+
+class Tests(unittest.TestCase):
+
+ def pyomo(self, cmd):
+ os.chdir(currdir)
+ output = main.main(['convert', '--logging=quiet', '-c']+cmd)
+ return output
+
+class BaselineTests(Tests):
+ def __init__(self, *args, **kwds):
+ Tests.__init__(self, *args, **kwds)
+BaselineTests = unittest.category('smoke', 'nightly','expensive')(BaselineTests)
+
+#
+#The following test generates an nl file for the test case
+#and checks that it matches the current pyomo baseline nl file
+#
+@unittest.nottest
+def barwriter_baseline_test(self, name):
+ if os.path.exists(datadir+name+'.dat'):
+ self.pyomo(['--output='+currdir+name+'.test.bar',
+ datadir+name+'_testCase.py',
+ datadir+name+'.dat'])
+ else:
+ self.pyomo(['--output='+currdir+name+'.test.bar',
+ datadir+name+'_testCase.py'])
+
+ # Check that the pyomo nl file matches its own baseline
+ self.assertFileEqualsBaseline(
+ currdir+name+'.test.bar', currdir+name+'.pyomo.bar',
+ tolerance=(1e-7, False))
+
+
+class ASLTests(Tests):
+
+ def __init__(self, *args, **kwds):
+ Tests.__init__(self, *args, **kwds)
+ASLTests = unittest.category('smoke','nightly','expensive')(ASLTests)
+
+
+# add test methods to classes
+for f in glob.glob(datadir+'*_testCase.py'):
+ name = re.split('[._]',os.path.basename(f))[0]
+ BaselineTests.add_fn_test(fn=barwriter_baseline_test, name=name)
+ #ASLTests.add_fn_test(fn=nlwriter_asl_test, name=name)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/pyomo/repn/tests/baron/var_on_deactivated_block.bar.baseline b/pyomo/repn/tests/baron/var_on_deactivated_block.bar.baseline
new file mode 100644
index 00000000000..c247cb09c9b
--- /dev/null
+++ b/pyomo/repn/tests/baron/var_on_deactivated_block.bar.baseline
@@ -0,0 +1,19 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES other_a, x;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c: other_a + 2 * x <= 0;
+
+OBJ: minimize x;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+}
+
diff --git a/pyomo/repn/tests/baron/var_on_nonblock.bar.baseline b/pyomo/repn/tests/baron/var_on_nonblock.bar.baseline
new file mode 100644
index 00000000000..c247cb09c9b
--- /dev/null
+++ b/pyomo/repn/tests/baron/var_on_nonblock.bar.baseline
@@ -0,0 +1,19 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES other_a, x;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c: other_a + 2 * x <= 0;
+
+OBJ: minimize x;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+}
+
diff --git a/pyomo/repn/tests/baron/var_on_other_model.bar.baseline b/pyomo/repn/tests/baron/var_on_other_model.bar.baseline
new file mode 100644
index 00000000000..35fa95b7b38
--- /dev/null
+++ b/pyomo/repn/tests/baron/var_on_other_model.bar.baseline
@@ -0,0 +1,19 @@
+OPTIONS {
+Summary: 0;
+}
+
+POSITIVE_VARIABLES ONE_VAR_CONST__;
+
+VARIABLES a, x;
+
+EQUATIONS c_e_FIX_ONE_VAR_CONST__, c;
+
+c_e_FIX_ONE_VAR_CONST__: ONE_VAR_CONST__ == 1;
+c: a + 2 * x <= 0;
+
+OBJ: minimize x;
+
+STARTING_POINT{
+ONE_VAR_CONST__: 1;
+}
+
diff --git a/pyomo/repn/tests/cpxlp/test_cpxlp.py b/pyomo/repn/tests/cpxlp/test_cpxlp.py
index 36ee1d831a8..afdc46a486a 100644
--- a/pyomo/repn/tests/cpxlp/test_cpxlp.py
+++ b/pyomo/repn/tests/cpxlp/test_cpxlp.py
@@ -132,7 +132,7 @@ def test_no_row_ordering(self):
components["obj"] = Objective(expr=model.a)
components["con1"] = Constraint(expr=model.a >= 0)
components["con2"] = Constraint(expr=model.a <= 1)
- components["con3"] = Constraint(expr=0 <= model.a <= 1)
+ components["con3"] = Constraint(expr=(0, model.a, 1))
components["con4"] = Constraint([1,2], rule=lambda m, i: model.a == i)
# add components in random order
@@ -151,7 +151,7 @@ def test_row_ordering(self):
components["obj"] = Objective(expr=model.a)
components["con1"] = Constraint(expr=model.a >= 0)
components["con2"] = Constraint(expr=model.a <= 1)
- components["con3"] = Constraint(expr=0 <= model.a <= 1)
+ components["con3"] = Constraint(expr=(0, model.a, 1))
components["con4"] = Constraint([1,2], rule=lambda m, i: model.a == i)
# add components in random order
@@ -193,9 +193,8 @@ def test_var_on_other_model(self):
baseline_fname, test_fname = self._get_fnames()
self._cleanup(test_fname)
- self.assertRaisesRegexp(
+ self.assertRaises(
KeyError,
- "'a' is not part of the model",
model.write, test_fname, format='lp')
self._cleanup(test_fname)
@@ -210,11 +209,15 @@ def test_var_on_deactivated_block(self):
baseline_fname, test_fname = self._get_fnames()
self._cleanup(test_fname)
- model.write(test_fname, format='lp')
- self.assertFileEqualsBaseline(
- test_fname,
- baseline_fname,
- delete=True)
+ self.assertRaises(
+ KeyError,
+ model.write, test_fname, format='lp' )
+ self._cleanup(test_fname)
+ #model.write(test_fname, format='lp')
+ #self.assertFileEqualsBaseline(
+ # test_fname,
+ # baseline_fname,
+ # delete=True)
def test_var_on_nonblock(self):
class Foo(Block().__class__):
@@ -231,9 +234,8 @@ def __init__(self, *args, **kwds):
baseline_fname, test_fname = self._get_fnames()
self._cleanup(test_fname)
- self.assertRaisesRegexp(
+ self.assertRaises(
KeyError,
- "'other.a' exists within Foo 'other'",
model.write, test_fname, format='lp')
self._cleanup(test_fname)
diff --git a/pyomo/core/base/expr_coopr3.py b/pyomo/repn/tests/gams/__init__.py
similarity index 85%
rename from pyomo/core/base/expr_coopr3.py
rename to pyomo/repn/tests/gams/__init__.py
index f84830428d0..9e692752410 100644
--- a/pyomo/core/base/expr_coopr3.py
+++ b/pyomo/repn/tests/gams/__init__.py
@@ -7,7 +7,6 @@
# rights in this software.
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
-
-import sys
-from pyomo.core.kernel import expr_coopr3
-sys.modules[__name__] = expr_coopr3
+#
+# Pyomo GAMS plugin tests
+#
diff --git a/pyomo/repn/tests/gams/no_column_ordering_linear.gams.baseline b/pyomo/repn/tests/gams/no_column_ordering_linear.gams.baseline
new file mode 100644
index 00000000000..5357af38f8f
--- /dev/null
+++ b/pyomo/repn/tests/gams/no_column_ordering_linear.gams.baseline
@@ -0,0 +1,42 @@
+$offdigit
+
+EQUATIONS
+ con_hi
+ obj;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ a
+ b
+ c;
+
+con_hi.. a + b + c =l= 1.0 ;
+obj.. GAMS_OBJECTIVE =e= a + b + c ;
+
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING lp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/no_column_ordering_quadratic.gams.baseline b/pyomo/repn/tests/gams/no_column_ordering_quadratic.gams.baseline
new file mode 100644
index 00000000000..b1b991595c3
--- /dev/null
+++ b/pyomo/repn/tests/gams/no_column_ordering_quadratic.gams.baseline
@@ -0,0 +1,42 @@
+$offdigit
+
+EQUATIONS
+ con_hi
+ obj;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ a
+ b
+ c;
+
+con_hi.. a + b + c + a*a + b*b + c*c + a*b + a*c + b*c =l= 1.0 ;
+obj.. GAMS_OBJECTIVE =e= a + b + c + a*a + b*b + c*c + a*b + a*c + b*c ;
+
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING nlp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/no_row_ordering.gams.baseline b/pyomo/repn/tests/gams/no_row_ordering.gams.baseline
new file mode 100644
index 00000000000..b6c53875892
--- /dev/null
+++ b/pyomo/repn/tests/gams/no_row_ordering.gams.baseline
@@ -0,0 +1,50 @@
+$offdigit
+
+EQUATIONS
+ con1_lo
+ con2_hi
+ con3_lo
+ con3_hi
+ con4_1_
+ con4_2_
+ obj;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ a;
+
+con1_lo.. 0.0 =l= a ;
+con2_hi.. a =l= 1.0 ;
+con3_lo.. 0.0 =l= a ;
+con3_hi.. a =l= 1.0 ;
+con4_1_.. a =e= 1.0 ;
+con4_2_.. a =e= 2.0 ;
+obj.. GAMS_OBJECTIVE =e= a ;
+
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING lp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/small1.pyomo.gms b/pyomo/repn/tests/gams/small1.pyomo.gms
new file mode 100644
index 00000000000..90d3c24eff3
--- /dev/null
+++ b/pyomo/repn/tests/gams/small1.pyomo.gms
@@ -0,0 +1,43 @@
+$offdigit
+
+EQUATIONS
+ c1
+ c2;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ x1
+ x2;
+
+c1.. power(x1, 2) =e= 4.0 ;
+c2.. GAMS_OBJECTIVE =e= power(x2, 2) ;
+
+x1.l = 1.0;
+x2.l = 1.0;
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING nlp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/small10.pyomo.gms b/pyomo/repn/tests/gams/small10.pyomo.gms
new file mode 100644
index 00000000000..492d2aff323
--- /dev/null
+++ b/pyomo/repn/tests/gams/small10.pyomo.gms
@@ -0,0 +1,66 @@
+$offdigit
+
+EQUATIONS
+ c1
+ c2
+ c3
+ c4
+ c5
+ c6
+ c7
+ c8
+ c9
+ c10
+ c11
+ c12
+ c13
+ c14
+ c15;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ x1;
+
+c1.. x1 =e= 0.0 ;
+c2.. 0.0*x1 + x1 =e= 0.0 ;
+c3.. x1 =e= 0.0 ;
+c4.. x1 =e= 0.0 ;
+c5.. 0.0*power(x1, 2) + x1 =e= 0.0 ;
+c6.. 0.0*x1*1.0 + x1 =e= 0.0 ;
+c7.. 0.0*power(x1, 2) + x1 =e= 0.0 ;
+c8.. 0.0*x1*1.0 + x1 =e= 0.0 ;
+c9.. 0.0*x1 =e= 0.0 ;
+c10.. 0.0*power(x1, 2) =e= 0.0 ;
+c11.. 0.0*x1*1.0 =e= 0.0 ;
+c12.. 0.0*power(x1, 2) =e= 0.0 ;
+c13.. 0.0*x1*1.0 =e= 0.0 ;
+c14.. 0.0*x1 =e= 0.0 ;
+c15.. GAMS_OBJECTIVE =e= x1 + 0.0*x1 + 0.0*x1 + x1*x1*0.0 + x1*x1*0.0 + 0.0*power(x1, 2) ;
+
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING nlp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/small11.pyomo.gms b/pyomo/repn/tests/gams/small11.pyomo.gms
new file mode 100644
index 00000000000..a74c6ea2fa5
--- /dev/null
+++ b/pyomo/repn/tests/gams/small11.pyomo.gms
@@ -0,0 +1,52 @@
+$offdigit
+
+EQUATIONS
+ c1_lo
+ c1_hi
+ c2_lo
+ c2_hi
+ c3_lo
+ c3_hi
+ c4;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ x1
+ x2
+ x3;
+
+c1_lo.. -1.0 =l= 1.0 ;
+c1_hi.. 1.0 =l= 1.0 ;
+c2_lo.. -1.0 =l= x1 ;
+c2_hi.. x1 =l= 1.0 ;
+c3_lo.. -1.0 =l= x2 ;
+c3_hi.. x2 =l= 1.0 ;
+c4.. GAMS_OBJECTIVE =e= x3 ;
+
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING lp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/small12.pyomo.gms b/pyomo/repn/tests/gams/small12.pyomo.gms
new file mode 100644
index 00000000000..252dde13079
--- /dev/null
+++ b/pyomo/repn/tests/gams/small12.pyomo.gms
@@ -0,0 +1,99 @@
+$offdigit
+
+EQUATIONS
+ c1
+ c2
+ c3
+ c4
+ c5
+ c6
+ c7
+ c8
+ c9
+ c10
+ c11
+ c12
+ c13
+ c14
+ c15
+ c16
+ c17
+ c18
+ c19
+ c20
+ c21
+ c22
+ c23
+ c24
+ c25;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ x1
+ x2
+ x3
+ x4
+ x5
+ x6
+ x7;
+
+c1.. Expr_if( ( 0.0 ), then=( vTrue ), else=( vFalse ) ) =e= -1.0 ;
+c2.. Expr_if( ( 1.0 ), then=( vTrue ), else=( vFalse ) ) =e= 1.0 ;
+c3.. Expr_if( ( vN1 <= 0.0 ), then=( vTrue ), else=( vFalse ) ) =e= 1.0 ;
+c4.. Expr_if( ( v0 <= 0.0 ), then=( vTrue ), else=( vFalse ) ) =e= 1.0 ;
+c5.. Expr_if( ( vP1 <= 0.0 ), then=( vTrue ), else=( vFalse ) ) =e= -1.0 ;
+c6.. Expr_if( ( vN1 < 0.0 ), then=( vTrue ), else=( vFalse ) ) =e= 1.0 ;
+c7.. Expr_if( ( v0 < 0.0 ), then=( vTrue ), else=( vFalse ) ) =e= -1.0 ;
+c8.. Expr_if( ( vP1 < 0.0 ), then=( vTrue ), else=( vFalse ) ) =e= -1.0 ;
+c9.. Expr_if( ( 0.0 <= 10.0*vN1 ), then=( vTrue ), else=( vFalse ) ) =e= -1.0 ;
+c10.. Expr_if( ( 0.0 <= 10.0*v0 ), then=( vTrue ), else=( vFalse ) ) =e= 1.0 ;
+c11.. Expr_if( ( 0.0 <= 10.0*vP1 ), then=( vTrue ), else=( vFalse ) ) =e= 1.0 ;
+c12.. Expr_if( ( 0.0 < 10.0*vN1 ), then=( vTrue ), else=( vFalse ) ) =e= -1.0 ;
+c13.. Expr_if( ( 0.0 < 10.0*v0 ), then=( vTrue ), else=( vFalse ) ) =e= -1.0 ;
+c14.. Expr_if( ( 0.0 < 10.0*vP1 ), then=( vTrue ), else=( vFalse ) ) =e= 1.0 ;
+c15.. Expr_if( ( -1 <= vN2 <= 1 ), then=( vTrue ), else=( vFalse ) ) =e= -1.0 ;
+c16.. Expr_if( ( - vP1 <= vN1 <= 1 ), then=( vTrue ), else=( vFalse ) ) =e= 1.0 ;
+c17.. Expr_if( ( - vP1**2 <= v0 <= 1 ), then=( vTrue ), else=( vFalse ) ) =e= 1.0 ;
+c18.. Expr_if( ( vN1 <= vP1 <= 1 ), then=( vTrue ), else=( vFalse ) ) =e= 1.0 ;
+c19.. Expr_if( ( -1 <= vP2 <= 1 ), then=( vTrue ), else=( vFalse ) ) =e= -1.0 ;
+c20.. Expr_if( ( -1 < vN2 < 1 ), then=( vTrue ), else=( vFalse ) ) =e= -1.0 ;
+c21.. Expr_if( ( -1 < vN1 < vP1 ), then=( vTrue ), else=( vFalse ) ) =e= -1.0 ;
+c22.. Expr_if( ( -1 < v0 < vP1**2 ), then=( vTrue ), else=( vFalse ) ) =e= 1.0 ;
+c23.. Expr_if( ( -1 < vP1 < vP1 ), then=( vTrue ), else=( vFalse ) ) =e= -1.0 ;
+c24.. Expr_if( ( -1 < vP2 < 1 ), then=( vTrue ), else=( vFalse ) ) =e= -1.0 ;
+c25.. GAMS_OBJECTIVE =e= 10.0*Expr_if( ( v0 ), then=( vTrue ), else=( vFalse ) ) ;
+
+x1.l = 1;
+x2.l = -1;
+x3.l = -1;
+x4.l = 0;
+x5.l = 1;
+x6.l = -2;
+x7.l = 2;
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING nlp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/small13.pyomo.gms b/pyomo/repn/tests/gams/small13.pyomo.gms
new file mode 100644
index 00000000000..c40e1dcd757
--- /dev/null
+++ b/pyomo/repn/tests/gams/small13.pyomo.gms
@@ -0,0 +1,45 @@
+$offdigit
+
+EQUATIONS
+ c1
+ c2
+ c3
+ c4;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ x1;
+
+c1.. power(x1, 3) - x1 =e= 0.0 ;
+c2.. 10*(power(x1, 3) - x1) =e= 0.0 ;
+c3.. (power(x1, 3) - x1)*0.1 =e= 0.0 ;
+c4.. GAMS_OBJECTIVE =e= x1 ;
+
+x1.l = 0.5;
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING nlp maximizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/small14.pyomo.gms b/pyomo/repn/tests/gams/small14.pyomo.gms
new file mode 100644
index 00000000000..0e694dd1e1f
--- /dev/null
+++ b/pyomo/repn/tests/gams/small14.pyomo.gms
@@ -0,0 +1,79 @@
+$offdigit
+
+EQUATIONS
+ c1
+ c2
+ c3
+ c4
+ c5
+ c6
+ c7
+ c8
+ c9
+ c10
+ c11
+ c12
+ c13
+ c14
+ c15
+ c16
+ c17
+ c18
+ c19
+ c20;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ x1
+ x2;
+
+c1.. log(x1) =e= 0.0 ;
+c2.. log10(x1) =e= 0.0 ;
+c3.. sin(x2) =e= 0.0 ;
+c4.. cos(x2) =e= 1.0 ;
+c5.. tan(x2) =e= 0.0 ;
+c6.. sinh(x2) =e= 0.0 ;
+c7.. cosh(x2) =e= 1.0 ;
+c8.. tanh(x2) =e= 0.0 ;
+c9.. asin(x2) =e= 0.0 ;
+c10.. acos(x2) =e= 1.5707963267948966 ;
+c11.. atan(x2) =e= 0.0 ;
+c12.. asinh(x2) =e= 0.0 ;
+c13.. acosh((7.3890560989306495 + x1)*0.18393972058572117) =e= 0.0 ;
+c14.. atanh(x2) =e= 0.0 ;
+c15.. exp(x2) =e= 1.0 ;
+c16.. sqrt(x1) =e= 1.0 ;
+c17.. ceil(x1) =e= 1.0 ;
+c18.. floor(x1) =e= 1.0 ;
+c19.. abs(x1) =e= 1.0 ;
+c20.. GAMS_OBJECTIVE =e= x1 + x2 ;
+
+x1.l = 1;
+x2.l = 0;
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING nlp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/small2.pyomo.gms b/pyomo/repn/tests/gams/small2.pyomo.gms
new file mode 100644
index 00000000000..25a5041eea2
--- /dev/null
+++ b/pyomo/repn/tests/gams/small2.pyomo.gms
@@ -0,0 +1,43 @@
+$offdigit
+
+EQUATIONS
+ c1
+ c2;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ x1
+ x2;
+
+c1.. power(x1, 2) =e= 4.0 ;
+c2.. GAMS_OBJECTIVE =e= x2 ;
+
+x1.l = 1.0;
+x2.l = 1.0;
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING nlp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/small3.pyomo.gms b/pyomo/repn/tests/gams/small3.pyomo.gms
new file mode 100644
index 00000000000..55c0c0bc6ce
--- /dev/null
+++ b/pyomo/repn/tests/gams/small3.pyomo.gms
@@ -0,0 +1,43 @@
+$offdigit
+
+EQUATIONS
+ c1
+ c2;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ x1
+ x2;
+
+c1.. power(x1, 2) =e= 4.0 ;
+c2.. GAMS_OBJECTIVE =e= x2*x1 ;
+
+x1.l = 1.0;
+x2.l = 1.0;
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING nlp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/small4.pyomo.gms b/pyomo/repn/tests/gams/small4.pyomo.gms
new file mode 100644
index 00000000000..b2a61c988ab
--- /dev/null
+++ b/pyomo/repn/tests/gams/small4.pyomo.gms
@@ -0,0 +1,43 @@
+$offdigit
+
+EQUATIONS
+ c1
+ c2;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ x1
+ x2;
+
+c1.. x1*x2 =e= 4.0 ;
+c2.. GAMS_OBJECTIVE =e= power(x1, 2) ;
+
+x1.l = 1.0;
+x2.l = 1.0;
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING nlp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/small5.pyomo.gms b/pyomo/repn/tests/gams/small5.pyomo.gms
new file mode 100644
index 00000000000..8fbd323dbcf
--- /dev/null
+++ b/pyomo/repn/tests/gams/small5.pyomo.gms
@@ -0,0 +1,73 @@
+$offdigit
+
+EQUATIONS
+ c1
+ c2
+ c3
+ c4
+ c5
+ c6
+ c7
+ c8
+ c9
+ c10
+ c11
+ c12
+ c13;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ x1
+ x2
+ x3;
+
+c1.. 0.5*x1*(x2 - x3) =e= 2.0 ;
+c2.. 0.5*x1*(x2 - x3) =e= 2.0 ;
+c3.. x1*(x2 - x3)*0.5 =e= 2.0 ;
+c4.. x1*(0.5*x2 - 0.5*x3) =e= 2.0 ;
+c5.. x1*(x2 - x3)*0.5 =e= 2.0 ;
+c6.. x1*(x2 - x3) =e= 4.0 ;
+c7.. (1/2.0)*x1*(x2 - x3) =e= 2.0 ;
+c8.. (1/2.0)*x1*(x2 - x3) =e= 2.0 ;
+c9.. x1*(x2 - x3)*(1/2.0) =e= 2.0 ;
+c10.. x1*((1/2.0)*x2 - (1/2.0)*x3) =e= 2.0 ;
+c11.. x1*(x2 - x3)*(1/2.0) =e= 2.0 ;
+c12.. x1*(x2 - x3) =e= 4.0 ;
+c13.. GAMS_OBJECTIVE =e= power(x2, 2)*0.5 + power(x2, 2)*(1/2.0) ;
+
+x1.lo = -1.0;
+x1.up = 1.0;
+x1.l = 3.0;
+x2.lo = -1.0;
+x2.up = 1.0;
+x2.l = 1.0;
+x3.lo = -1.0;
+x3.up = 1.0;
+x3.l = 2.0;
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING nlp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/small6.pyomo.gms b/pyomo/repn/tests/gams/small6.pyomo.gms
new file mode 100644
index 00000000000..3898ba8440e
--- /dev/null
+++ b/pyomo/repn/tests/gams/small6.pyomo.gms
@@ -0,0 +1,61 @@
+$offdigit
+
+EQUATIONS
+ c1
+ c2
+ c3
+ c4
+ c5
+ c6
+ c7;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ x1
+ x2
+ x3;
+
+c1.. (1/2.0)*x1*(x2 - x3) =e= 2.0 ;
+c2.. x1*(1/2.0)*(x2 - x3) =e= 2.0 ;
+c3.. x1*(x2 - x3)*(1/2.0) =e= 2.0 ;
+c4.. x1*(x2*(1/2.0) - x3*(1/2.0)) =e= 2.0 ;
+c5.. x1*(x2 - x3)*(1/2.0) =e= 2.0 ;
+c6.. x1*(x2 - x3) - 2.0*2.0 =e= 0.0 ;
+c7.. GAMS_OBJECTIVE =e= x2 ;
+
+x1.lo = -1.0;
+x1.up = 1.0;
+x1.l = 3.0;
+x2.lo = -1.0;
+x2.up = 1.0;
+x2.l = 1.0;
+x3.lo = -1.0;
+x3.up = 1.0;
+x3.l = 2.0;
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING nlp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/small7.pyomo.gms b/pyomo/repn/tests/gams/small7.pyomo.gms
new file mode 100644
index 00000000000..df0d9cb4338
--- /dev/null
+++ b/pyomo/repn/tests/gams/small7.pyomo.gms
@@ -0,0 +1,97 @@
+$offdigit
+
+EQUATIONS
+ c1
+ c2
+ c3
+ c4
+ c5
+ c6
+ c7
+ c8
+ c9
+ c10
+ c11
+ c12
+ c13
+ c14
+ c15
+ c16
+ c17
+ c18
+ c19
+ c20
+ c21
+ c22
+ c23
+ c24
+ c25;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ x1
+ x2
+ x3;
+
+c1.. (1/2.0)*0.5*x1*(x2 - x3) =e= 2.0 ;
+c2.. x1*(1/2.0)*(1/2.0)*(x2 - x3) =e= 2.0 ;
+c3.. x1*(x2 - x3)*(1/2.0)*0.5 =e= 2.0 ;
+c4.. x1*(x2*(1/2.0)*0.5 - x3*(1/2.0)*0.5) =e= 2.0 ;
+c5.. x1*(x2 - x3)*(1/2.0)*0.5 =e= 2.0 ;
+c6.. x1*(x2 - x3) - 4.0*2.0 =e= 0.0 ;
+c7.. (1/(2.0*2.0))*x1*(x2 - x3) =e= 2.0 ;
+c8.. x1*(1/(2.0*2.0))*(x2 - x3) =e= 2.0 ;
+c9.. x1*(x2 - x3)*(1/(2.0*2.0)) =e= 2.0 ;
+c10.. x1*(x2*(1/(2.0*2.0)) - x3*(1/(2.0*2.0))) =e= 2.0 ;
+c11.. x1*(x2 - x3)*(1/(2.0*2.0)) =e= 2.0 ;
+c12.. x1*(x2 - x3) - 4.0*2.0 =e= 0.0 ;
+c13.. (1/(2.0 + 2.0))*x1*(x2 - x3) =e= 2.0 ;
+c14.. x1*(1/(2.0 + 2.0))*(x2 - x3) =e= 2.0 ;
+c15.. x1*(x2 - x3)*(1/(2.0 + 2.0)) =e= 2.0 ;
+c16.. x1*(x2*(1/(2.0 + 2.0)) - x3*(1/(2.0 + 2.0))) =e= 2.0 ;
+c17.. x1*(x2 - x3)*(1/(2.0 + 2.0)) =e= 2.0 ;
+c18.. x1*(x2 - x3) - 2.0*(2.0 + 2.0) =e= 0.0 ;
+c19.. (1/power((2.0 + 2.0), 2))*x1*(x2 - x3) =e= 2.0 ;
+c20.. x1*(1/power((2.0 + 2.0), 2))*(x2 - x3) =e= 2.0 ;
+c21.. x1*(x2 - x3)*(1/power((2.0 + 2.0), 2)) =e= 2.0 ;
+c22.. x1*(x2*(1/power((2.0 + 2.0), 2)) - x3*(1/power((2.0 + 2.0), 2))) =e= 2.0 ;
+c23.. x1*(x2 - x3)*(1/power((2.0 + 2.0), 2)) =e= 2.0 ;
+c24.. x1*(x2 - x3) - 2.0*power((2.0 + 2.0), 2) =e= 0.0 ;
+c25.. GAMS_OBJECTIVE =e= x2 ;
+
+x1.lo = -1.0;
+x1.up = 1.0;
+x1.l = 3.0;
+x2.lo = -1.0;
+x2.up = 1.0;
+x2.l = 1.0;
+x3.lo = -1.0;
+x3.up = 1.0;
+x3.l = 2.0;
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING nlp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/small8.pyomo.gms b/pyomo/repn/tests/gams/small8.pyomo.gms
new file mode 100644
index 00000000000..5cffb208b74
--- /dev/null
+++ b/pyomo/repn/tests/gams/small8.pyomo.gms
@@ -0,0 +1,49 @@
+$offdigit
+
+EQUATIONS
+ c1_lo
+ c2_hi
+ c3_hi
+ c4;
+
+POSITIVE VARIABLES
+ x1
+ x2;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ x3;
+
+c1_lo.. 2.0 =l= x1*x1 ;
+c2_hi.. x1 - 0.5*x2 =l= 0.0 ;
+c3_hi.. x3 - (x1 + 2.0) =l= 0.0 ;
+c4.. GAMS_OBJECTIVE =e= x3 + x2*x2 + x1 ;
+
+x3.lo = 7;
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING nlp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/small9.pyomo.gms b/pyomo/repn/tests/gams/small9.pyomo.gms
new file mode 100644
index 00000000000..54ae8cff39b
--- /dev/null
+++ b/pyomo/repn/tests/gams/small9.pyomo.gms
@@ -0,0 +1,49 @@
+$offdigit
+
+EQUATIONS
+ c1
+ c2
+ c3
+ c4
+ c5
+ c6;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ x1
+ x2;
+
+c1.. x1*0.0*x2 + x1 =e= 1.0 ;
+c2.. 0.0*x1*x2 + x1 =e= 1.0 ;
+c3.. x1 =e= 1.0 ;
+c4.. x1*0.0*x2 =e= 1.0 ;
+c5.. 0.0*x1*x2 =e= 1.0 ;
+c6.. GAMS_OBJECTIVE =e= x1 ;
+
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING nlp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/test_gams.py b/pyomo/repn/tests/gams/test_gams.py
new file mode 100644
index 00000000000..d0b65416b24
--- /dev/null
+++ b/pyomo/repn/tests/gams/test_gams.py
@@ -0,0 +1,239 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+#
+# Test the canonical expressions
+#
+
+import os
+
+import pyutilib.th as unittest
+
+from pyomo.environ import *
+import pyomo.opt
+
+thisdir = os.path.dirname(os.path.abspath(__file__))
+
+
+class Test(unittest.TestCase):
+
+ def _cleanup(self, fname):
+ try:
+ os.remove(fname)
+ except OSError:
+ pass
+
+ def _get_fnames(self):
+ class_name, test_name = self.id().split('.')[-2:]
+ prefix = os.path.join(thisdir, test_name.replace("test_", "", 1))
+ return prefix+".gams.baseline", prefix+".gams.out"
+
+ def _check_baseline(self, model, **kwds):
+ baseline_fname, test_fname = self._get_fnames()
+ self._cleanup(test_fname)
+ io_options = {"symbolic_solver_labels": True}
+ io_options.update(kwds)
+ model.write(test_fname,
+ format="gams",
+ io_options=io_options)
+ self.assertFileEqualsBaseline(
+ test_fname,
+ baseline_fname,
+ delete=True)
+
+ def _gen_expression(self, terms):
+ terms = list(terms)
+ expr = 0.0
+ for term in terms:
+ if type(term) is tuple:
+ prodterms = list(term)
+ prodexpr = 1.0
+ for x in prodterms:
+ prodexpr *= x
+ expr += prodexpr
+ else:
+ expr += term
+ return expr
+
+ def test_no_column_ordering_quadratic(self):
+ model = ConcreteModel()
+ model.a = Var()
+ model.b = Var()
+ model.c = Var()
+
+ terms = [model.a, model.b, model.c,
+ (model.a, model.a), (model.b, model.b), (model.c, model.c),
+ (model.a, model.b), (model.a, model.c), (model.b, model.c)]
+ model.obj = Objective(expr=self._gen_expression(terms))
+ model.con = Constraint(expr=self._gen_expression(terms) <= 1)
+ self._check_baseline(model)
+
+ def test_no_column_ordering_linear(self):
+ model = ConcreteModel()
+ model.a = Var()
+ model.b = Var()
+ model.c = Var()
+
+ terms = [model.a, model.b, model.c]
+ model.obj = Objective(expr=self._gen_expression(terms))
+ model.con = Constraint(expr=self._gen_expression(terms) <= 1)
+ self._check_baseline(model)
+
+ def test_no_row_ordering(self):
+ model = ConcreteModel()
+ model.a = Var()
+
+ components = {}
+ components["obj"] = Objective(expr=model.a)
+ components["con1"] = Constraint(expr=model.a >= 0)
+ components["con2"] = Constraint(expr=model.a <= 1)
+ components["con3"] = Constraint(expr=(0, model.a, 1))
+ components["con4"] = Constraint([1,2], rule=lambda m, i: model.a == i)
+
+ for key in components:
+ model.add_component(key, components[key])
+
+ self._check_baseline(model, file_determinism=2)
+
+ def test_var_on_other_model(self):
+ other = ConcreteModel()
+ other.a = Var()
+
+ model = ConcreteModel()
+ model.x = Var()
+ model.c = Constraint(expr=other.a + 2*model.x <= 0)
+ model.obj = Objective(expr=model.x)
+ self._check_baseline(model)
+
+ def test_var_on_deactivated_block(self):
+ model = ConcreteModel()
+ model.x = Var()
+ model.other = Block()
+ model.other.a = Var()
+ model.other.deactivate()
+ model.c = Constraint(expr=model.other.a + 2*model.x <= 0)
+ model.obj = Objective(expr=model.x)
+ self._check_baseline(model)
+
+ def test_var_on_nonblock(self):
+ class Foo(Block().__class__):
+ def __init__(self, *args, **kwds):
+ kwds.setdefault('ctype',Foo)
+ super(Foo,self).__init__(*args, **kwds)
+
+ model = ConcreteModel()
+ model.x = Var()
+ model.other = Foo()
+ model.other.a = Var()
+ model.c = Constraint(expr=model.other.a + 2*model.x <= 0)
+ model.obj = Objective(expr=model.x)
+ self._check_baseline(model)
+
+ def test_expr_xfrm(self):
+ from pyomo.repn.plugins.gams_writer import expression_to_string
+ from pyomo.core.expr.symbol_map import SymbolMap
+ M = ConcreteModel()
+ M.abc = Var()
+
+ smap = SymbolMap()
+
+ expr = M.abc**2.0
+ self.assertEqual(str(expr), "abc**2.0")
+ self.assertEqual(expression_to_string(expr, smap=smap), "power(abc, 2.0)")
+
+ expr = log( M.abc**2.0 )
+ self.assertEqual(str(expr), "log(abc**2.0)")
+ self.assertEqual(expression_to_string(expr, smap=smap), "log(power(abc, 2.0))")
+
+ expr = log( M.abc**2.0 ) + 5
+ self.assertEqual(str(expr), "log(abc**2.0) + 5")
+ self.assertEqual(expression_to_string(expr, smap=smap), "log(power(abc, 2.0)) + 5")
+
+ expr = exp( M.abc**2.0 ) + 5
+ self.assertEqual(str(expr), "exp(abc**2.0) + 5")
+ self.assertEqual(expression_to_string(expr, smap=smap), "exp(power(abc, 2.0)) + 5")
+
+ expr = log( M.abc**2.0 )**4
+ self.assertEqual(str(expr), "log(abc**2.0)**4")
+ self.assertEqual(expression_to_string(expr, smap=smap), "power(log(power(abc, 2.0)), 4)")
+
+ expr = log( M.abc**2.0 )**4.5
+ self.assertEqual(str(expr), "log(abc**2.0)**4.5")
+ self.assertEqual(expression_to_string(expr, smap=smap), "power(log(power(abc, 2.0)), 4.5)")
+
+
+
+#class TestGams_writer(unittest.TestCase):
+class TestGams_writer(object):
+
+ def _cleanup(self, fname):
+ try:
+ os.remove(fname)
+ except OSError:
+ pass
+
+ def _get_fnames(self):
+ class_name, test_name = self.id().split('.')[-2:]
+ prefix = os.path.join(thisdir, test_name.replace("test_", "", 1))
+ return prefix+".gams.baseline", prefix+".gams.out"
+
+ def test_var_on_other_model(self):
+ other = ConcreteModel()
+ other.a = Var()
+
+ model = ConcreteModel()
+ model.x = Var()
+ model.c = Constraint(expr=other.a + 2*model.x <= 0)
+ model.obj = Objective(expr=model.x)
+
+ baseline_fname, test_fname = self._get_fnames()
+ self._cleanup(test_fname)
+ self.assertRaises(
+ KeyError,
+ model.write, test_fname, format='gams')
+ self._cleanup(test_fname)
+
+ def test_var_on_deactivated_block(self):
+ model = ConcreteModel()
+ model.x = Var()
+ model.other = Block()
+ model.other.a = Var()
+ model.other.deactivate()
+ model.c = Constraint(expr=model.other.a + 2*model.x <= 0)
+ model.obj = Objective(expr=model.x)
+
+ baseline_fname, test_fname = self._get_fnames()
+ self._cleanup(test_fname)
+ self.assertRaises(
+ KeyError,
+ model.write, test_fname, format='gams' )
+ self._cleanup(test_fname)
+
+ def test_var_on_nonblock(self):
+ class Foo(Block().__class__):
+ def __init__(self, *args, **kwds):
+ kwds.setdefault('ctype',Foo)
+ super(Foo,self).__init__(*args, **kwds)
+
+ model = ConcreteModel()
+ model.x = Var()
+ model.other = Foo()
+ model.other.a = Var()
+ model.c = Constraint(expr=model.other.a + 2*model.x <= 0)
+ model.obj = Objective(expr=model.x)
+
+ baseline_fname, test_fname = self._get_fnames()
+ self._cleanup(test_fname)
+ self.assertRaises(
+ RuntimeError,
+ model.write, test_fname, format='gams')
+ self._cleanup(test_fname)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/pyomo/repn/tests/gams/test_gams_comparison.py b/pyomo/repn/tests/gams/test_gams_comparison.py
new file mode 100644
index 00000000000..1e935f708c8
--- /dev/null
+++ b/pyomo/repn/tests/gams/test_gams_comparison.py
@@ -0,0 +1,73 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+#
+# Test the Pyomo BAR writer
+#
+
+import re
+import glob
+import os
+from os.path import abspath, dirname, join
+currdir = dirname(abspath(__file__))+os.sep
+datadir = abspath(join(currdir, "..", "ampl"))+os.sep
+
+import pyutilib.th as unittest
+import pyutilib.subprocess
+
+import pyomo.scripting.pyomo_main as main
+
+
+class Tests(unittest.TestCase):
+
+ def pyomo(self, cmd):
+ os.chdir(currdir)
+ output = main.main(['convert', '--logging=quiet', '-c']+cmd)
+ return output
+
+class BaselineTests(Tests):
+ def __init__(self, *args, **kwds):
+ Tests.__init__(self, *args, **kwds)
+BaselineTests = unittest.category('smoke', 'nightly','expensive')(BaselineTests)
+
+#
+#The following test generates an nl file for the test case
+#and checks that it matches the current pyomo baseline nl file
+#
+@unittest.nottest
+def gams_writer_baseline_test(self, name):
+ if os.path.exists(datadir+name+'.dat'):
+ self.pyomo(['--output='+currdir+name+'.test.gms',
+ datadir+name+'_testCase.py',
+ datadir+name+'.dat'])
+ else:
+ self.pyomo(['--output='+currdir+name+'.test.gms',
+ datadir+name+'_testCase.py'])
+
+ # Check that the pyomo nl file matches its own baseline
+ self.assertFileEqualsBaseline(
+ currdir+name+'.test.gms', currdir+name+'.pyomo.gms',
+ tolerance=(1e-7, False))
+
+
+class ASLTests(Tests):
+
+ def __init__(self, *args, **kwds):
+ Tests.__init__(self, *args, **kwds)
+ASLTests = unittest.category('smoke','nightly','expensive')(ASLTests)
+
+
+# add test methods to classes
+for f in glob.glob(datadir+'*_testCase.py'):
+ name = re.split('[._]',os.path.basename(f))[0]
+ BaselineTests.add_fn_test(fn=gams_writer_baseline_test, name=name)
+ #ASLTests.add_fn_test(fn=nlwriter_asl_test, name=name)
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/pyomo/repn/tests/gams/testgmsfile.gms b/pyomo/repn/tests/gams/testgmsfile.gms
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/pyomo/repn/tests/gams/var_on_deactivated_block.gams.baseline b/pyomo/repn/tests/gams/var_on_deactivated_block.gams.baseline
new file mode 100644
index 00000000000..9c7c08d1abe
--- /dev/null
+++ b/pyomo/repn/tests/gams/var_on_deactivated_block.gams.baseline
@@ -0,0 +1,41 @@
+$offdigit
+
+EQUATIONS
+ c_hi
+ obj;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ other_a
+ x;
+
+c_hi.. other_a + 2*x =l= 0.0 ;
+obj.. GAMS_OBJECTIVE =e= x ;
+
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING lp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/var_on_nonblock.gams.baseline b/pyomo/repn/tests/gams/var_on_nonblock.gams.baseline
new file mode 100644
index 00000000000..9c7c08d1abe
--- /dev/null
+++ b/pyomo/repn/tests/gams/var_on_nonblock.gams.baseline
@@ -0,0 +1,41 @@
+$offdigit
+
+EQUATIONS
+ c_hi
+ obj;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ other_a
+ x;
+
+c_hi.. other_a + 2*x =l= 0.0 ;
+obj.. GAMS_OBJECTIVE =e= x ;
+
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING lp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/gams/var_on_other_model.gams.baseline b/pyomo/repn/tests/gams/var_on_other_model.gams.baseline
new file mode 100644
index 00000000000..18eec5ddc27
--- /dev/null
+++ b/pyomo/repn/tests/gams/var_on_other_model.gams.baseline
@@ -0,0 +1,41 @@
+$offdigit
+
+EQUATIONS
+ c_hi
+ obj;
+
+VARIABLES
+ GAMS_OBJECTIVE
+ a
+ x;
+
+c_hi.. a + 2*x =l= 0.0 ;
+obj.. GAMS_OBJECTIVE =e= x ;
+
+
+MODEL GAMS_MODEL /all/ ;
+SOLVE GAMS_MODEL USING lp minimizing GAMS_OBJECTIVE;
+
+Scalars MODELSTAT 'model status', SOLVESTAT 'solve status';
+MODELSTAT = GAMS_MODEL.modelstat;
+SOLVESTAT = GAMS_MODEL.solvestat;
+
+Scalar OBJEST 'best objective', OBJVAL 'objective value';
+OBJEST = GAMS_MODEL.objest;
+OBJVAL = GAMS_MODEL.objval;
+
+Scalar NUMVAR 'number of variables';
+NUMVAR = GAMS_MODEL.numvar
+
+Scalar NUMEQU 'number of equations';
+NUMEQU = GAMS_MODEL.numequ
+
+Scalar NUMDVAR 'number of discrete variables';
+NUMDVAR = GAMS_MODEL.numdvar
+
+Scalar NUMNZ 'number of nonzeros';
+NUMNZ = GAMS_MODEL.numnz
+
+Scalar ETSOLVE 'time to execute solve statement';
+ETSOLVE = GAMS_MODEL.etsolve
+
diff --git a/pyomo/repn/tests/mps/test_mps.py b/pyomo/repn/tests/mps/test_mps.py
index aa5ae393c06..62403c0fb3f 100644
--- a/pyomo/repn/tests/mps/test_mps.py
+++ b/pyomo/repn/tests/mps/test_mps.py
@@ -132,7 +132,7 @@ def test_no_row_ordering(self):
components["obj"] = Objective(expr=model.a)
components["con1"] = Constraint(expr=model.a >= 0)
components["con2"] = Constraint(expr=model.a <= 1)
- components["con3"] = Constraint(expr=0 <= model.a <= 1)
+ components["con3"] = Constraint(expr=(0, model.a, 1))
components["con4"] = Constraint([1,2], rule=lambda m, i: model.a == i)
# add components in random order
@@ -151,7 +151,7 @@ def test_row_ordering(self):
components["obj"] = Objective(expr=model.a)
components["con1"] = Constraint(expr=model.a >= 0)
components["con2"] = Constraint(expr=model.a <= 1)
- components["con3"] = Constraint(expr=0 <= model.a <= 1)
+ components["con3"] = Constraint(expr=(0, model.a, 1))
components["con4"] = Constraint([1,2], rule=lambda m, i: model.a == i)
# add components in random order
diff --git a/pyomo/repn/tests/test_gams.py b/pyomo/repn/tests/test_gams.py
index 078c284a9d8..94d8e900aaa 100644
--- a/pyomo/repn/tests/test_gams.py
+++ b/pyomo/repn/tests/test_gams.py
@@ -57,7 +57,7 @@ def test_gams_connector_in_active_constraint(self):
m.b2.c.add(m.b2.x)
m.c = Constraint(expr=m.b1.c == m.b2.c)
m.o = Objective(expr=m.b1.x)
- with self.assertRaises(TypeError):
+ with self.assertRaises(RuntimeError):
m.write('testgmsfile.gms')
diff --git a/pyomo/repn/tests/test_standard.py b/pyomo/repn/tests/test_standard.py
new file mode 100644
index 00000000000..46d714c9a13
--- /dev/null
+++ b/pyomo/repn/tests/test_standard.py
@@ -0,0 +1,3249 @@
+# ___________________________________________________________________________
+#
+# Pyomo: Python Optimization Modeling Objects
+# Copyright 2017 National Technology and Engineering Solutions of Sandia, LLC
+# Under the terms of Contract DE-NA0003525 with National Technology and
+# Engineering Solutions of Sandia, LLC, the U.S. Government retains certain
+# rights in this software.
+# This software is distributed under the 3-clause BSD License.
+# ___________________________________________________________________________
+#
+# Test the standard expressions
+#
+
+import pickle
+import os
+from os.path import abspath, dirname
+currdir = dirname(abspath(__file__))+os.sep
+
+import pyutilib.th as unittest
+import pyutilib.services
+
+from pyomo.core.expr.current import Expr_if
+from pyomo.core.expr import expr_common, current as EXPR
+from pyomo.repn import *
+from pyomo.environ import *
+from pyomo.core.base.numvalue import native_numeric_types
+
+from six import iteritems
+from six.moves import range
+
+class frozendict(dict):
+ __slots__ = ('_hash',)
+ def __hash__(self):
+ rval = getattr(self, '_hash', None)
+ if rval is None:
+ rval = self._hash = hash(frozenset(iteritems(self)))
+ return rval
+
+
+# A utility to facilitate comparison of tuples where we don't care about ordering
+def repn_to_dict(repn):
+ result = {}
+ for i in range(len(repn.linear_vars)):
+ if id(repn.linear_vars[i]) in result:
+ result[id(repn.linear_vars[i])] += repn.linear_coefs[i]
+ else:
+ result[id(repn.linear_vars[i])] = repn.linear_coefs[i]
+ for i in range(len(repn.quadratic_vars)):
+ v1_, v2_ = repn.quadratic_vars[i]
+ if id(v1_) <= id(v2_):
+ result[id(v1_), id(v2_)] = repn.quadratic_coefs[i]
+ else:
+ result[id(v2_), id(v1_)] = repn.quadratic_coefs[i]
+ if not (repn.constant is None or (type(repn.constant) in native_numeric_types and repn.constant == 0)):
+ result[None] = repn.constant
+ return result
+
+
+class TestSimple(unittest.TestCase):
+
+ def test_number(self):
+ # 1.0
+ m = AbstractModel()
+ m.a = Var()
+ e = 1.0
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_var(self):
+ # a
+ m = ConcreteModel()
+ m.a = Var()
+ e = m.a
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ m.a.value = 3
+ m.a.fixed = True
+ rep = generate_standard_repn(e)
+ #
+ self.assertTrue( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 0 )
+ self.assertTrue( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None: 3 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ rep = generate_standard_repn(e, compute_values=False)
+ #
+ self.assertTrue( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 0 )
+ self.assertTrue( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None: 3 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ self.assertTrue(rep.constant is m.a)
+
+ def test_param(self):
+ # p
+ m = AbstractModel()
+ m.p = Param()
+ e = m.p
+
+ with self.assertRaises(ValueError):
+ rep = generate_standard_repn(e)
+ rep = generate_standard_repn(e, compute_values=False)
+ #
+ self.assertTrue( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 0 )
+ self.assertTrue( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None : m.p }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ #s = pickle.dumps(rep)
+ #rep = pickle.loads(s)
+ #baseline = { None : m.p }
+ #self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_simplesum(self):
+ # a + b
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ e = m.a + m.b
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : 1, id(m.b) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]) : 1, id(rep.linear_vars[1]) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_constsum(self):
+ # a + 5
+ m = AbstractModel()
+ m.a = Var()
+ e = m.a + 5
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:5, id(m.a) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { None:5, id(rep.linear_vars[0]) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # 5 + a
+ m = AbstractModel()
+ m.a = Var()
+ e = 5 + m.a
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:5, id(m.a) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { None:5, id(rep.linear_vars[0]) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_paramsum(self):
+ # a + 5
+ m = ConcreteModel()
+ m.a = Var()
+ m.p = Param(mutable=True, default=5)
+ e = m.a + m.p
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:5, id(m.a) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { None:5, id(rep.linear_vars[0]) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # 5 + a
+ m = ConcreteModel()
+ m.a = Var()
+ m.p = Param(mutable=True, default=5)
+ e = m.p + m.a
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:5, id(m.a) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { None:5, id(rep.linear_vars[0]) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ rep = generate_standard_repn(e, compute_values=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:5, id(m.a) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ self.assertTrue(rep.constant is m.p)
+
+ def test_paramprod1(self):
+ # p*a
+ m = ConcreteModel()
+ m.a = Var()
+ m.p = Param(mutable=True, default=5)
+ e = m.p*m.a
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : 5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]) : 5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ rep = generate_standard_repn(e, compute_values=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : 5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ #
+ self.assertTrue(rep.linear_coefs[0] is m.p)
+
+ def test_paramprod2(self):
+ # p*a
+ m = ConcreteModel()
+ m.a = Var()
+ m.p = Param(mutable=True, default=0)
+ e = m.p*m.a
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertTrue( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 0 )
+ self.assertTrue( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ rep = generate_standard_repn(e, compute_values=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : 0 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ #
+ self.assertTrue(rep.linear_coefs[0] is m.p)
+
+ def test_linear_sum1(self):
+ #
+ m = ConcreteModel()
+ m.x = Var()
+ m.y = Var()
+ m.p = Param(mutable=True, default=1)
+ m.q = Param(mutable=True, default=2)
+ e = m.p*m.x + m.q*m.y
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x):1, id(m.y):2 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ rep = generate_standard_repn(e, compute_values=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x):1, id(m.y):2 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ #
+ self.assertTrue(rep.linear_coefs[0] is m.p)
+ self.assertTrue(rep.linear_coefs[1] is m.q)
+
+ def test_linear_sum2(self):
+ #
+ m = ConcreteModel()
+ m.A = Set(initialize=range(5))
+ m.x = Var(m.A)
+ m.p = Param(m.A, mutable=True, default=1)
+ e = quicksum(m.p[i]*m.x[i] for i in m.A)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 5)
+ self.assertTrue(len(rep.linear_coefs) == 5)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):1, id(m.x[1]):1, id(m.x[2]):1, id(m.x[3]):1, id(m.x[4]):1}
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ rep = generate_standard_repn(e, compute_values=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 5)
+ self.assertTrue(len(rep.linear_coefs) == 5)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):1, id(m.x[1]):1, id(m.x[2]):1, id(m.x[3]):1, id(m.x[4]):1}
+ self.assertEqual(baseline, repn_to_dict(rep))
+ #
+ self.assertTrue(rep.linear_coefs[0] is m.p[0])
+ self.assertTrue(rep.linear_coefs[1] is m.p[1])
+
+ def test_linear_sum3(self):
+ #
+ m = ConcreteModel()
+ m.A = Set(initialize=range(5))
+ m.x = Var(m.A, initialize=3)
+ m.p = Param(m.A, mutable=True, default=1)
+ e = quicksum((i+1)*m.x[i] for i in m.A)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 5)
+ self.assertTrue(len(rep.linear_coefs) == 5)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):1, id(m.x[1]):2, id(m.x[2]):3, id(m.x[3]):4, id(m.x[4]):5}
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ m.x[2].fixed = True
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 4)
+ self.assertTrue(len(rep.linear_coefs) == 4)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):1, id(m.x[1]):2, None:9, id(m.x[3]):4, id(m.x[4]):5}
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_linear_sum4(self):
+ #
+ m = ConcreteModel()
+ m.A = Set(initialize=range(5))
+ m.x = Var(m.A, initialize=3)
+ m.p = Param(m.A, mutable=True, default=1)
+ e = quicksum(m.p[i]*m.x[i] for i in m.A)
+
+ m.x[2].fixed = True
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 4)
+ self.assertTrue(len(rep.linear_coefs) == 4)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):1, id(m.x[1]):1, None:3, id(m.x[3]):1, id(m.x[4]):1}
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ rep = generate_standard_repn(e, compute_values=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 4)
+ self.assertTrue(len(rep.linear_coefs) == 4)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):1, id(m.x[1]):1, None:3, id(m.x[3]):1, id(m.x[4]):1}
+ self.assertEqual(baseline, repn_to_dict(rep))
+ #
+ self.assertTrue(rep.linear_coefs[0] is m.p[0])
+ self.assertTrue(rep.linear_coefs[1] is m.p[1])
+ self.assertTrue(type(rep.constant) is EXPR.MonomialTermExpression)
+
+ def test_linear_sum5(self):
+ #
+ m = ConcreteModel()
+ m.A = Set(initialize=range(5))
+ m.x = Var(m.A, initialize=3)
+ m.p = Param(m.A, mutable=True, default=1)
+ e = quicksum((m.p[i]*m.p[i])*m.x[i] for i in m.A)
+
+ m.x[2].fixed = True
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 4)
+ self.assertTrue(len(rep.linear_coefs) == 4)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):1, id(m.x[1]):1, None:3, id(m.x[3]):1, id(m.x[4]):1}
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ rep = generate_standard_repn(e, compute_values=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 4)
+ self.assertTrue(len(rep.linear_coefs) == 4)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):1, id(m.x[1]):1, None:3, id(m.x[3]):1, id(m.x[4]):1}
+ self.assertEqual(baseline, repn_to_dict(rep))
+ #
+ self.assertTrue(rep.linear_coefs[0].is_expression_type())
+ self.assertTrue(type(rep.constant) is EXPR.MonomialTermExpression)
+
+ def test_linear_sum6(self):
+ #
+ m = ConcreteModel()
+ m.A = Set(initialize=range(5))
+ m.x = Var(m.A)
+ m.p = Param(m.A, mutable=True, default=1)
+ m.q = Param(m.A, mutable=True, default=2)
+ e = quicksum(m.p[i]*m.x[i] if i < 5 else m.q[i-5]*m.x[i-5] for i in range(10))
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 5)
+ self.assertTrue(len(rep.linear_coefs) == 5)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):3, id(m.x[1]):3, id(m.x[2]):3, id(m.x[3]):3, id(m.x[4]):3}
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ rep = generate_standard_repn(e, compute_values=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 5)
+ self.assertTrue(len(rep.linear_coefs) == 5)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):3, id(m.x[1]):3, id(m.x[2]):3, id(m.x[3]):3, id(m.x[4]):3}
+ self.assertEqual(baseline, repn_to_dict(rep))
+ #
+ self.assertTrue(rep.linear_coefs[0].is_expression_type())
+
+ def test_general_sum1(self):
+ #
+ m = ConcreteModel()
+ m.A = Set(initialize=range(3))
+ m.x = Var(m.A, initialize=2)
+ m.p = Param(m.A, mutable=True, default=3)
+ e = sum(m.p[i]*m.x[i] for i in range(3))
+ m.x[1].fixed = True
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):3, None:6, id(m.x[2]):3}
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ rep = generate_standard_repn(e, compute_values=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):3, None:6, id(m.x[2]):3}
+ self.assertEqual(baseline, repn_to_dict(rep))
+ #
+ self.assertTrue(rep.linear_coefs[0] is m.p[0])
+
+ def test_general_sum2(self):
+ #
+ m = ConcreteModel()
+ m.A = Set(initialize=range(3))
+ m.x = Var(m.A, initialize=2)
+ m.p = Param(m.A, mutable=True, default=3)
+ e = sum(m.p[i]*m.x[i] if i!=1 else m.x[i] for i in range(3))
+ m.x[1].fixed = True
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):3, None:2, id(m.x[2]):3}
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ rep = generate_standard_repn(e, compute_values=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):3, None:2, id(m.x[2]):3}
+ self.assertEqual(baseline, repn_to_dict(rep))
+ #
+ self.assertTrue(rep.linear_coefs[0] is m.p[0])
+
+ def test_general_sum3(self):
+ #
+ m = ConcreteModel()
+ m.A = Set(initialize=range(3))
+ m.x = Var(m.A, initialize=2)
+ m.p = Param(m.A, mutable=True, default=3)
+ e = sum(m.p[i]*m.x[i] if i<3 else m.x[i-3] for i in range(6))
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 3)
+ self.assertTrue(len(rep.linear_coefs) == 3)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):4, id(m.x[1]):4, id(m.x[2]):4}
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ rep = generate_standard_repn(e, compute_values=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 3)
+ self.assertTrue(len(rep.linear_coefs) == 3)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.x[0]):4, id(m.x[1]):4, id(m.x[2]):4}
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_nestedSum(self):
+ #
+ # Check the structure of nested sums
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.d = Var()
+
+ # +
+ # / \
+ # + 5
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e = e1 + 5
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:5, id(m.a) : 1, id(m.b) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { None:5, id(rep.linear_vars[0]):1, id(rep.linear_vars[1]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # +
+ # / \
+ # 5 +
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e = 5 + e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:5, id(m.a) : 1, id(m.b) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { None:5, id(rep.linear_vars[0]):1, id(rep.linear_vars[1]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # +
+ # / \
+ # + c
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e = e1 + m.c
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 3)
+ self.assertTrue(len(rep.linear_coefs) == 3)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : 1, id(m.b) : 1, id(m.c) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):1, id(rep.linear_vars[1]):1, id(rep.linear_vars[2]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # +
+ # / \
+ # c +
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e = m.c + e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 3)
+ self.assertTrue(len(rep.linear_coefs) == 3)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : 1, id(m.b) : 1, id(m.c) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):1, id(rep.linear_vars[1]):1, id(rep.linear_vars[2]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # +
+ # / \
+ # + +
+ # / \ / \
+ # a b c d
+ e1 = m.a + m.b
+ e2 = m.c + m.d
+ e = e1 + e2
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 4)
+ self.assertTrue(len(rep.linear_coefs) == 4)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : 1, id(m.b) : 1, id(m.c) : 1, id(m.d) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):1, id(rep.linear_vars[1]):1, id(rep.linear_vars[2]):1, id(rep.linear_vars[3]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_sumOf_nestedTrivialProduct(self):
+ #
+ # Check sums with nested products
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+
+ # +
+ # / \
+ # * b
+ # / \
+ # a 5
+ e1 = m.a * 5
+ e = e1 + m.b
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : 5, id(m.b) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]) : 5, id(rep.linear_vars[1]) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # +
+ # / \
+ # b *
+ # / \
+ # a 5
+ e = m.b + e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : 5, id(m.b) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[1]) : 5, id(rep.linear_vars[0]) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # +
+ # / \
+ # * +
+ # / \ / \
+ # a 5 b c
+ e2 = m.b + m.c
+ e = e1 + e2
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 3)
+ self.assertTrue(len(rep.linear_coefs) == 3)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : 5, id(m.b) : 1, id(m.c) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[2]) : 5, id(rep.linear_vars[0]) : 1, id(rep.linear_vars[1]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # +
+ # / \
+ # + *
+ # / \ / \
+ # b c a 5
+ e2 = m.b + m.c
+ e = e2 + e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 3)
+ self.assertTrue(len(rep.linear_coefs) == 3)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : 5, id(m.b) : 1, id(m.c) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[2]) : 5, id(rep.linear_vars[0]) : 1, id(rep.linear_vars[1]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # +
+ # / \
+ # * *
+ # / \ / \
+ # a 5 b 5
+ e2 = m.b * 5
+ e = e2 + e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : 5, id(m.b) : 5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):5, id(rep.linear_vars[1]):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_negation(self):
+ # -
+ # \
+ # a
+ m = AbstractModel()
+ m.a = Var()
+ e = - m.a
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : -1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]) : -1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_simpleDiff(self):
+ # -
+ # / \
+ # a b
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ e = m.a - m.b
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a) : 1, id(m.b) : -1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]) : 1, id(rep.linear_vars[1]) : -1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # -
+ # / \
+ # a a
+ e = m.a - m.a
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertTrue( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 0 )
+ self.assertTrue( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertEqual(len(rep.linear_vars), 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_constDiff(self):
+ # -
+ # / \
+ # a 5
+ m = AbstractModel()
+ m.a = Var()
+ e = m.a - 5
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:-5, id(m.a) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { None:-5, id(rep.linear_vars[0]) : 1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # -
+ # / \
+ # 5 a
+ e = 5 - m.a
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:5, id(m.a) : -1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { None:5, id(rep.linear_vars[0]):-1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_nestedDiff(self):
+ #
+ # Check the structure of nested differences
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.d = Var()
+
+ # -
+ # / \
+ # - 5
+ # / \
+ # a b
+ e1 = m.a - m.b
+ e = e1 - 5
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:-5, id(m.a):1, id(m.b):-1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { None:-5, id(rep.linear_vars[0]):1, id(rep.linear_vars[1]):-1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # -
+ # / \
+ # 5 -
+ # / \
+ # a b
+ e1 = m.a - m.b
+ e = 5 - e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:5, id(m.a):-1, id(m.b):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { None:5, id(rep.linear_vars[0]):-1, id(rep.linear_vars[1]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # -
+ # / \
+ # - c
+ # / \
+ # a b
+ e1 = m.a - m.b
+ e = e1 - m.c
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 3)
+ self.assertTrue(len(rep.linear_coefs) == 3)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):1, id(m.b):-1, id(m.c):-1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):1, id(rep.linear_vars[1]):-1, id(rep.linear_vars[2]):-1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # -
+ # / \
+ # c -
+ # / \
+ # a b
+ e1 = m.a - m.b
+ e = m.c - e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 3)
+ self.assertTrue(len(rep.linear_coefs) == 3)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):-1, id(m.b):1, id(m.c):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[1]):-1, id(rep.linear_vars[0]):1, id(rep.linear_vars[2]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # -
+ # / \
+ # - -
+ # / \ / \
+ # a b c d
+ e1 = m.a - m.b
+ e2 = m.c - m.d
+ e = e1 - e2
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 4)
+ self.assertTrue(len(rep.linear_coefs) == 4)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):1, id(m.b):-1, id(m.c):-1, id(m.d):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):1, id(rep.linear_vars[1]):-1, id(rep.linear_vars[2]):-1, id(rep.linear_vars[3]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # -
+ # / \
+ # - -
+ # / \ / \
+ # c d a b
+ e1 = m.a - m.b
+ e2 = m.c - m.d
+ e = e2 - e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 4)
+ self.assertTrue(len(rep.linear_coefs) == 4)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):-1, id(m.b):1, id(m.c):1, id(m.d):-1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[2]):-1, id(rep.linear_vars[3]):1, id(rep.linear_vars[0]):1, id(rep.linear_vars[1]):-1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_sumOf_nestedTrivialProduct2(self):
+ #
+ # Check the structure of sum of products
+ #
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+
+ # -
+ # / \
+ # * b
+ # / \
+ # a 5
+ e1 = m.a * 5
+ e = e1 - m.b
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):5, id(m.b):-1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):5, id(rep.linear_vars[1]):-1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # -
+ # / \
+ # b *
+ # / \
+ # a 5
+ e1 = m.a * 5
+ e = m.b - e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):-5, id(m.b):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[1]):-5, id(rep.linear_vars[0]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # -
+ # / \
+ # * -
+ # / \ / \
+ # a 5 b c
+ e1 = m.a * 5
+ e2 = m.b - m.c
+ e = e1 - e2
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertTrue(len(rep.linear_vars) == 3)
+ self.assertTrue(len(rep.linear_coefs) == 3)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):5, id(m.b):-1, id(m.c):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):5, id(rep.linear_vars[1]):-1, id(rep.linear_vars[2]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # -
+ # / \
+ # - *
+ # / \ / \
+ # b c a 5
+ e1 = m.a * 5
+ e2 = m.b - m.c
+ e = e2 - e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 3)
+ self.assertTrue(len(rep.linear_coefs) == 3)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):-5, id(m.b):1, id(m.c):-1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[2]):-5, id(rep.linear_vars[0]):1, id(rep.linear_vars[1]):-1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # -
+ # \
+ # -
+ # / \
+ # a b
+ e = - (m.a - m.b)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):-1, id(m.b):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):-1, id(rep.linear_vars[1]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_simpleProduct1(self):
+ m = ConcreteModel()
+ m.a = Var()
+ m.p = Param(default=2)
+ # *
+ # / \
+ # a p
+ e = m.a * m.p
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):2 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):2 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # *
+ # / \
+ # a 0
+ e = m.a * 0
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertTrue( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 0 )
+ self.assertTrue( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_simpleProduct2(self):
+ # *
+ # / \
+ # a 5
+ m = AbstractModel()
+ m.a = Var()
+ e = m.a * 5
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # *
+ # / \
+ # 5 a
+ e = 5 * m.a
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_nestedProduct(self):
+ # *
+ # / \
+ # * 5
+ # / \
+ # a b
+ m = ConcreteModel()
+ m.a = Var()
+ m.b = Param(default=2)
+ m.c = Param(default=3)
+ m.d = Param(default=7)
+
+ e1 = m.a * m.b
+ e = e1 * 5
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):10 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):10 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # *
+ # / \
+ # 5 *
+ # / \
+ # a b
+ e1 = m.a * m.b
+ e = 5 * e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):10 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):10 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # *
+ # / \
+ # * *
+ # / \ / \
+ # a b c d
+ e1 = m.a * m.b
+ e2 = m.c * m.d
+ e = e1 * e2
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):42 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):42 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_nestedProduct2(self):
+ #
+ # Check the structure of nested products
+ #
+ m = ConcreteModel()
+ m.a = Param(default=2)
+ m.b = Param(default=3)
+ m.c = Param(default=5)
+ m.d = Var()
+ #
+ # Check the structure of nested products
+ #
+ # *
+ # / \
+ # + +
+ # / \ / \
+ # c + d
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e2 = m.c + e1
+ e3 = e1 + m.d
+ e = e2 * e3
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:50, id(m.d):10 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { None:50, id(rep.linear_vars[0]):10 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ #
+ # Check the structure of nested products
+ #
+ # *
+ # / \
+ # * *
+ # / \ / \
+ # c + d
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e2 = m.c * e1
+ e3 = e1 * m.d
+ e = e2 * e3
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.d):125 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):125 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_division(self):
+ #
+ # /
+ # / \
+ # + 2
+ # / \
+ # a b
+ m = ConcreteModel()
+ m.a = Var()
+ m.b = Var()
+ m.y = Var(initialize=2.0)
+ m.y.fixed = True
+
+ e = (m.a + m.b)/2.0
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):0.5, id(m.b):0.5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):0.5, id(rep.linear_vars[1]):0.5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # /
+ # / \
+ # + y
+ # / \
+ # a b
+ e = (m.a + m.b)/m.y
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):0.5, id(m.b):0.5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):0.5, id(rep.linear_vars[1]):0.5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # /
+ # / \
+ # + +
+ # / \ / \
+ # a b y 2
+ e = (m.a + m.b)/(m.y+2)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):0.25, id(m.b):0.25 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):0.25, id(rep.linear_vars[1]):0.25 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_weighted_sum1(self):
+ # *
+ # / \
+ # + 5
+ # / \
+ # a b
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.d = Var()
+
+ e1 = m.a + m.b
+ e = e1 * 5
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):5, id(m.b):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):5, id(rep.linear_vars[1]):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # *
+ # / \
+ # 5 +
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e = 5 * e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):5, id(m.b):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):5, id(rep.linear_vars[1]):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # *
+ # / \
+ # 5 *
+ # / \
+ # 2 +
+ # / \
+ # a b
+ e1 = m.a + m.b
+ e = 5 * 2* e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):10, id(m.b):10 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):10, id(rep.linear_vars[1]):10 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # 5(a+2(a+b))
+ e = 5*(m.a+2*(m.a+m.b))
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):15, id(m.b):10 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):15, id(rep.linear_vars[1]):10 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_quadratic1(self):
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.d = Var()
+
+ ab_key = (id(m.a),id(m.b)) if id(m.a) <= id(m.b) else (id(m.b),id(m.a))
+
+ # *
+ # / \
+ # * b
+ # / \
+ # a 5
+ e1 = m.a * 5
+ e = e1 * m.b
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 2 )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertTrue( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 1)
+ self.assertTrue(len(rep.quadratic_coefs) == 1)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { ab_key:5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ if id(rep.quadratic_vars[0][0]) < id(rep.quadratic_vars[0][1]):
+ baseline = { (id(rep.quadratic_vars[0][0]), id(rep.quadratic_vars[0][1])):5 }
+ else:
+ baseline = { (id(rep.quadratic_vars[0][1]), id(rep.quadratic_vars[0][0])):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # *
+ # / \
+ # * 5
+ # / \
+ # a b
+ e1 = m.a * m.b
+ e = e1 * 5
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 2 )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertTrue( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 1)
+ self.assertTrue(len(rep.quadratic_coefs) == 1)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { ab_key:5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ if id(rep.quadratic_vars[0][0]) < id(rep.quadratic_vars[0][1]):
+ baseline = { (id(rep.quadratic_vars[0][0]), id(rep.quadratic_vars[0][1])):5 }
+ else:
+ baseline = { (id(rep.quadratic_vars[0][1]), id(rep.quadratic_vars[0][0])):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # *
+ # / \
+ # 5 *
+ # / \
+ # a b
+ e1 = m.a * m.b
+ e = 5*e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 2 )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertTrue( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 1)
+ self.assertTrue(len(rep.quadratic_coefs) == 1)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { ab_key:5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ if id(rep.quadratic_vars[0][0]) < id(rep.quadratic_vars[0][1]):
+ baseline = { (id(rep.quadratic_vars[0][0]), id(rep.quadratic_vars[0][1])):5 }
+ else:
+ baseline = { (id(rep.quadratic_vars[0][1]), id(rep.quadratic_vars[0][0])):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # *
+ # / \
+ # b *
+ # / \
+ # a 5
+ e1 = m.a * 5
+ e = m.b*e1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 2 )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertTrue( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 1)
+ self.assertTrue(len(rep.quadratic_coefs) == 1)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { ab_key:5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ if id(rep.quadratic_vars[0][0]) < id(rep.quadratic_vars[0][1]):
+ baseline = { (id(rep.quadratic_vars[0][0]), id(rep.quadratic_vars[0][1])):5 }
+ else:
+ baseline = { (id(rep.quadratic_vars[0][1]), id(rep.quadratic_vars[0][0])):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+
+ def test_quadratic2(self):
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.d = Var()
+
+ ab_key = (id(m.a),id(m.b)) if id(m.a) <= id(m.b) else (id(m.b),id(m.a))
+ ac_key = (id(m.a),id(m.c)) if id(m.a) <= id(m.c) else (id(m.c),id(m.a))
+ bc_key = (id(m.b),id(m.c)) if id(m.b) <= id(m.c) else (id(m.c),id(m.b))
+
+ # *
+ # / \
+ # + b
+ # / \
+ # a 5
+ e1 = m.a + 5
+ e = e1 * m.b
+
+ # Collect quadratics
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 2 )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertTrue( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 1)
+ self.assertTrue(len(rep.quadratic_coefs) == 1)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { ab_key:1, id(m.b):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ if id(rep.quadratic_vars[0][0]) < id(rep.quadratic_vars[0][1]):
+ baseline = { (id(rep.quadratic_vars[0][0]), id(rep.quadratic_vars[0][1])):1, id(rep.linear_vars[0]):5 }
+ else:
+ baseline = { (id(rep.quadratic_vars[0][1]), id(rep.quadratic_vars[0][0])):1, id(rep.linear_vars[0]):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # Do not collect quadratics
+ rep = generate_standard_repn(e, quadratic=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), None )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertFalse(rep.nonlinear_expr is None)
+ self.assertEqual(len(rep.nonlinear_vars), 2)
+ baseline1 = { }
+ self.assertEqual(baseline1, repn_to_dict(rep))
+ baseline2 = set([ id(m.a), id(m.b) ])
+ self.assertEqual(baseline2, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ self.assertEqual(baseline1, repn_to_dict(rep))
+
+ # *
+ # / \
+ # b +
+ # / \
+ # a 5
+ e1 = m.a + 5
+ e = m.b * e1
+
+ # Collect quadratics
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 2 )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertTrue( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 1)
+ self.assertTrue(len(rep.quadratic_coefs) == 1)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { ab_key:1, id(m.b):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ if id(rep.quadratic_vars[0][0]) < id(rep.quadratic_vars[0][1]):
+ baseline = { (id(rep.quadratic_vars[0][0]), id(rep.quadratic_vars[0][1])):1, id(rep.linear_vars[0]):5 }
+ else:
+ baseline = { (id(rep.quadratic_vars[0][1]), id(rep.quadratic_vars[0][0])):1, id(rep.linear_vars[0]):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # Do not collect quadratics
+ rep = generate_standard_repn(e, quadratic=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), None )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertFalse(rep.nonlinear_expr is None)
+ self.assertEqual(len(rep.nonlinear_vars), 2)
+ baseline1 = { }
+ self.assertEqual(baseline1, repn_to_dict(rep))
+ baseline2 = set([ id(m.a), id(m.b) ])
+ self.assertEqual(baseline2, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ self.assertEqual(baseline1, repn_to_dict(rep))
+
+ # *
+ # / \
+ # + +
+ # / \ / \
+ # c b a 5
+ e = (m.c + m.b) * (m.a + 5)
+
+ # Collect quadratics
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 2 )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertTrue( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 2)
+ self.assertTrue(len(rep.quadratic_coefs) == 2)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { ab_key:1, ac_key:1, id(m.b):5, id(m.c):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ ab_key_ = (id(rep.quadratic_vars[0][0]),id(rep.quadratic_vars[0][1])) if id(rep.quadratic_vars[0][0]) <= id(rep.quadratic_vars[0][1]) else (id(rep.quadratic_vars[0][1]),id(rep.quadratic_vars[0][0]))
+ ac_key_ = (id(rep.quadratic_vars[1][0]),id(rep.quadratic_vars[1][1])) if id(rep.quadratic_vars[1][0]) <= id(rep.quadratic_vars[1][1]) else (id(rep.quadratic_vars[1][1]),id(rep.quadratic_vars[1][0]))
+ baseline = { ab_key_:1, ac_key_:1, id(rep.linear_vars[0]):5, id(rep.linear_vars[1]):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # *
+ # / \
+ # + +
+ # / \ / \
+ # a 5 b c
+ e = (m.a + 5) * (m.b + m.c)
+
+ # Collect quadratics
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 2 )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertTrue( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 2)
+ self.assertTrue(len(rep.linear_coefs) == 2)
+ self.assertTrue(len(rep.quadratic_vars) == 2)
+ self.assertTrue(len(rep.quadratic_coefs) == 2)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { ab_key:1, ac_key:1, id(m.b):5, id(m.c):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ ab_key_ = (id(rep.quadratic_vars[0][0]),id(rep.quadratic_vars[0][1])) if id(rep.quadratic_vars[0][0]) <= id(rep.quadratic_vars[0][1]) else (id(rep.quadratic_vars[0][1]),id(rep.quadratic_vars[0][0]))
+ ac_key_ = (id(rep.quadratic_vars[1][0]),id(rep.quadratic_vars[1][1])) if id(rep.quadratic_vars[1][0]) <= id(rep.quadratic_vars[1][1]) else (id(rep.quadratic_vars[1][1]),id(rep.quadratic_vars[1][0]))
+ baseline = { ab_key_:1, ac_key_:1, id(rep.linear_vars[0]):5, id(rep.linear_vars[1]):5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # Do not collect quadratics
+ rep = generate_standard_repn(e, quadratic=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), None )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertFalse(rep.nonlinear_expr is None)
+ self.assertEqual(len(rep.nonlinear_vars), 3)
+ baseline1 = { }
+ self.assertEqual(baseline1, repn_to_dict(rep))
+ baseline2 = set([ id(m.a), id(m.b), id(m.c) ])
+ self.assertEqual(baseline2, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ self.assertEqual(baseline1, repn_to_dict(rep))
+
+ # *
+ # / \
+ # * +
+ # / \ / \
+ # a 5 b c
+ e = (m.a * 5) * (m.b + m.c)
+
+ # Collect quadratics
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 2 )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertTrue( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 2)
+ self.assertTrue(len(rep.quadratic_coefs) == 2)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { ab_key:5, ac_key:5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ ab_key_ = (id(rep.quadratic_vars[0][0]),id(rep.quadratic_vars[0][1])) if id(rep.quadratic_vars[0][0]) <= id(rep.quadratic_vars[0][1]) else (id(rep.quadratic_vars[0][1]),id(rep.quadratic_vars[0][0]))
+ ac_key_ = (id(rep.quadratic_vars[1][0]),id(rep.quadratic_vars[1][1])) if id(rep.quadratic_vars[1][0]) <= id(rep.quadratic_vars[1][1]) else (id(rep.quadratic_vars[1][1]),id(rep.quadratic_vars[1][0]))
+ baseline = { ab_key_:5, ac_key_:5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # Do not collect quadratics
+ rep = generate_standard_repn(e, quadratic=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), None )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertFalse(rep.nonlinear_expr is None)
+ self.assertEqual(len(rep.nonlinear_vars), 3)
+ baseline1 = { }
+ self.assertEqual(baseline1, repn_to_dict(rep))
+ baseline2 = set([ id(m.a), id(m.b), id(m.c) ])
+ self.assertEqual(baseline2, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ self.assertEqual(baseline1, repn_to_dict(rep))
+
+ # *
+ # / \
+ # + *
+ # / \ / \
+ # b c a 5
+ e = (m.b + m.c) * (m.a * 5)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 2 )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertTrue( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 2)
+ self.assertTrue(len(rep.quadratic_coefs) == 2)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { ab_key:5, ac_key:5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ ab_key_ = (id(rep.quadratic_vars[0][0]),id(rep.quadratic_vars[0][1])) if id(rep.quadratic_vars[0][0]) <= id(rep.quadratic_vars[0][1]) else (id(rep.quadratic_vars[0][1]),id(rep.quadratic_vars[0][0]))
+ ac_key_ = (id(rep.quadratic_vars[1][0]),id(rep.quadratic_vars[1][1])) if id(rep.quadratic_vars[1][0]) <= id(rep.quadratic_vars[1][1]) else (id(rep.quadratic_vars[1][1]),id(rep.quadratic_vars[1][0]))
+ baseline = { ab_key_:5, ac_key_:5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # Do not collect quadratics
+ rep = generate_standard_repn(e, quadratic=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), None )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertFalse(rep.nonlinear_expr is None)
+ self.assertEqual(len(rep.nonlinear_vars), 3)
+ baseline1 = { }
+ self.assertEqual(baseline1, repn_to_dict(rep))
+ baseline2 = set([ id(m.a), id(m.b), id(m.c) ])
+ self.assertEqual(baseline2, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ self.assertEqual(baseline1, repn_to_dict(rep))
+
+ # *
+ # / \
+ # + *
+ # / \ / \
+ # a 5 b c
+ e = (m.a + 5) * (m.b * m.c)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), None )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 1)
+ self.assertTrue(len(rep.quadratic_coefs) == 1)
+ self.assertFalse(rep.nonlinear_expr is None)
+ self.assertEqual(len(rep.nonlinear_vars), 3)
+ baseline = { bc_key:5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ bc_key_ = (id(rep.quadratic_vars[0][0]),id(rep.quadratic_vars[0][1])) if id(rep.quadratic_vars[0][0]) <= id(rep.quadratic_vars[0][1]) else (id(rep.quadratic_vars[0][1]),id(rep.quadratic_vars[0][0]))
+ baseline = { bc_key_:5 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # Do not collect quadratics
+ rep = generate_standard_repn(e, quadratic=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), None )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertFalse(rep.nonlinear_expr is None)
+ self.assertEqual(len(rep.nonlinear_vars), 3)
+ baseline1 = { }
+ self.assertEqual(baseline1, repn_to_dict(rep))
+ baseline2 = set([ id(m.a), id(m.b), id(m.c) ])
+ self.assertEqual(baseline2, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ self.assertEqual(baseline1, repn_to_dict(rep))
+
+ def test_pow(self):
+ # ^
+ # / \
+ # a 0
+ m = ConcreteModel()
+ m.a = Var()
+ m.b = Var()
+ m.p = Param()
+ m.q = Param(default=1)
+ m.r = Param(default=2)
+
+ e = m.a ** 0
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertTrue( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 0 )
+ self.assertTrue( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # ^
+ # / \
+ # a 1
+ e = m.a ** 1
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # ^
+ # / \
+ # a 2
+ e = m.a ** 2
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 2 )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertTrue( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 1)
+ self.assertTrue(len(rep.quadratic_coefs) == 1)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { (id(m.a),id(m.a)):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { (id(rep.quadratic_vars[0][0]),id(rep.quadratic_vars[0][1])):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # ^
+ # / \
+ # a r
+ e = m.a ** m.r
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 2 )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertTrue( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 1)
+ self.assertTrue(len(rep.quadratic_coefs) == 1)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { (id(m.a),id(m.a)):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { (id(rep.quadratic_vars[0][0]),id(rep.quadratic_vars[0][1])):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # ^
+ # / \
+ # a 2
+ e = m.a ** 2
+
+ rep = generate_standard_repn(e, quadratic=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), None )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertFalse(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 1)
+ baseline = set([ id(m.a) ])
+ self.assertEqual(baseline, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = set([ id(rep.nonlinear_vars[0]) ])
+ self.assertEqual(baseline, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+
+ # ^
+ # / \
+ # a m.r
+ e = m.a ** m.r
+
+ rep = generate_standard_repn(e, quadratic=False)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), None )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertFalse(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 1)
+ baseline = set([ id(m.a) ])
+ self.assertEqual(baseline, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = set([ id(rep.nonlinear_vars[0]) ])
+ self.assertEqual(baseline, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+
+ # ^
+ # / \
+ # a q
+ e = m.a ** m.q
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_pow2(self):
+ # ^
+ # / \
+ # a 2
+ m = ConcreteModel()
+ m.a = Var(initialize=2)
+ m.p = Param(default=3)
+ m.a.fixed = True
+
+ e = m.p*m.a**2
+
+ rep = generate_standard_repn(e, compute_values=False, quadratic=False)
+ #
+ self.assertTrue( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 0 )
+ self.assertTrue( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:12 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_abs(self):
+ # abs
+ # /
+ # a
+ m = ConcreteModel()
+ m.a = Var()
+ m.q = Param(default=-1)
+
+ e = abs(m.a)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), None )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertFalse(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 1)
+ baseline = set([ id(m.a) ])
+ self.assertEqual(baseline, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = set([ id(rep.nonlinear_vars[0]) ])
+ self.assertEqual(baseline, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+
+ # abs
+ # /
+ # a
+ e = abs(m.a)
+ m.a.set_value(-1)
+ m.a.fixed = True
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertTrue( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 0 )
+ self.assertTrue( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # abs
+ # /
+ # q
+ e = abs(m.q)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertTrue( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 0 )
+ self.assertTrue( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_cos(self):
+ # cos
+ # /
+ # a
+ m = ConcreteModel()
+ m.a = Var()
+ m.q = Param(default=0)
+
+ e = cos(m.a)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), None )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertFalse(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 1)
+ baseline = set([ id(m.a) ])
+ self.assertEqual(baseline, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = set([ id(rep.nonlinear_vars[0]) ])
+ self.assertEqual(baseline, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+
+ # cos
+ # /
+ # a
+ e = cos(m.a)
+ m.a.set_value(0)
+ m.a.fixed = True
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertTrue( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 0 )
+ self.assertTrue( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:1.0 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # cos
+ # /
+ # q
+ e = cos(m.q)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertTrue( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 0 )
+ self.assertTrue( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { None:1.0 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ def test_ExprIf(self):
+ # ExprIf
+ # / | \
+ # True a b
+ m = AbstractModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.q = Param(default=1)
+
+ e = EXPR.Expr_if(IF=True, THEN=m.a, ELSE=m.b)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # ExprIf
+ # / | \
+ # False a b
+ e = EXPR.Expr_if(IF=False, THEN=m.a, ELSE=m.b)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.b):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # ExprIf
+ # / | \
+ # c a b
+ e = EXPR.Expr_if(IF=m.c, THEN=m.a, ELSE=m.b)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), None )
+ self.assertFalse( rep.is_constant() )
+ self.assertFalse( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertTrue( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 0)
+ self.assertTrue(len(rep.linear_coefs) == 0)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertFalse(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 3)
+ baseline = set([ id(m.a), id(m.b), id(m.c) ])
+ self.assertEqual(baseline, set(id(v_) for v_ in EXPR.identify_variables(rep.nonlinear_expr)))
+ #s = pickle.dumps(rep)
+ #rep = pickle.loads(s)
+ #self.assertEqual(baseline, repn_to_dict(rep))
+
+ m = ConcreteModel()
+ m.a = Var()
+ m.b = Var()
+ m.c = Var()
+ m.q = Param(default=1)
+
+ # ExprIf
+ # / | \
+ # bool a b
+ e = EXPR.Expr_if(IF=m.q, THEN=m.a, ELSE=m.b)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.a):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+ # ExprIf
+ # / | \
+ # c a b
+ e = EXPR.Expr_if(IF=m.c, THEN=m.a, ELSE=m.b)
+ m.c.fixed = True
+ m.c.set_value(0)
+
+ rep = generate_standard_repn(e)
+ #
+ self.assertFalse( rep.is_fixed() )
+ self.assertEqual( rep.polynomial_degree(), 1 )
+ self.assertFalse( rep.is_constant() )
+ self.assertTrue( rep.is_linear() )
+ self.assertFalse( rep.is_quadratic() )
+ self.assertFalse( rep.is_nonlinear() )
+ #
+ self.assertTrue(len(rep.linear_vars) == 1)
+ self.assertTrue(len(rep.linear_coefs) == 1)
+ self.assertTrue(len(rep.quadratic_vars) == 0)
+ self.assertTrue(len(rep.quadratic_coefs) == 0)
+ self.assertTrue(rep.nonlinear_expr is None)
+ self.assertTrue(len(rep.nonlinear_vars) == 0)
+ baseline = { id(m.b):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+ s = pickle.dumps(rep)
+ rep = pickle.loads(s)
+ baseline = { id(rep.linear_vars[0]):1 }
+ self.assertEqual(baseline, repn_to_dict(rep))
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/pyomo/repn/tests/testgmsfile.gms b/pyomo/repn/tests/testgmsfile.gms
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/pyomo/scripting/tests/test_pms.py b/pyomo/scripting/tests/test_pms.py
index faee82d0b82..9bd9b0a88bc 100644
--- a/pyomo/scripting/tests/test_pms.py
+++ b/pyomo/scripting/tests/test_pms.py
@@ -53,7 +53,7 @@ def test_t1(self):
model.A = RangeSet(1,4)
model.x = Var(model.A, bounds=(-1,1))
def obj_rule(model):
- return summation(model.x)
+ return sum_product(model.x)
model.obj = Objective(rule=obj_rule)
def c_rule(model):
expr = 0
diff --git a/pyomo/solvers/plugins/solvers/cplex_direct.py b/pyomo/solvers/plugins/solvers/cplex_direct.py
index fdf14cec686..630cd27dcee 100644
--- a/pyomo/solvers/plugins/solvers/cplex_direct.py
+++ b/pyomo/solvers/plugins/solvers/cplex_direct.py
@@ -14,11 +14,11 @@
import pyutilib.services
from pyutilib.misc import Bunch
from pyomo.util.plugin import alias
-from pyomo.core.kernel.numvalue import is_fixed
-from pyomo.repn import generate_canonical_repn, LinearCanonicalRepn, canonical_degree
+from pyomo.core.expr.numvalue import is_fixed
+from pyomo.core.expr.numvalue import value
+from pyomo.repn import generate_standard_repn
from pyomo.solvers.plugins.solvers.direct_solver import DirectSolver
from pyomo.solvers.plugins.solvers.direct_or_persistent_solver import DirectOrPersistentSolver
-from pyomo.core.kernel.numvalue import value
import pyomo.core.kernel
from pyomo.core.kernel.component_set import ComponentSet
from pyomo.core.kernel.component_map import ComponentMap
@@ -186,60 +186,33 @@ def _process_stream(arg):
def _get_expr_from_pyomo_repn(self, repn, max_degree=2):
referenced_vars = ComponentSet()
- degree = canonical_degree(repn)
+ degree = repn.polynomial_degree()
if (degree is None) or (degree > max_degree):
raise DegreeError('CPLEXDirect does not support expressions of degree {0}.'.format(degree))
- if isinstance(repn, LinearCanonicalRepn):
- new_expr = _CplexExpr()
+ new_expr = _CplexExpr()
+ if len(repn.linear_vars) > 0:
+ referenced_vars.update(repn.linear_vars)
+ new_expr.variables.extend(self._pyomo_var_to_ndx_map[i] for i in repn.linear_vars)
+ new_expr.coefficients.extend(repn.linear_coefs)
- if repn.constant is not None:
- new_expr.offset = repn.constant
+ for i, v in enumerate(repn.quadratic_vars):
+ x, y = v
+ new_expr.q_coefficients.append(repn.quadratic_coefs[i])
+ new_expr.q_variables1.append(self._pyomo_var_to_ndx_map[x])
+ new_expr.q_variables2.append(self._pyomo_var_to_ndx_map[y])
+ referenced_vars.add(x)
+ referenced_vars.add(y)
- if (repn.linear is not None) and (len(repn.linear) > 0):
- list(map(referenced_vars.add, repn.variables))
- new_expr.variables.extend(self._pyomo_var_to_ndx_map[var] for var in repn.variables)
- new_expr.coefficients.extend(coeff for coeff in repn.linear)
-
- else:
- new_expr = _CplexExpr()
- if 0 in repn:
- new_expr.offset = repn[0][None]
-
- if 1 in repn:
- for ndx, coeff in repn[1].items():
- new_expr.coefficients.append(coeff)
- var = repn[-1][ndx]
- new_expr.variables.append(self._pyomo_var_to_ndx_map[var])
- referenced_vars.add(var)
-
- if 2 in repn:
- for key, coeff in repn[2].items():
- new_expr.q_coefficients.append(coeff)
- indices = list(key.keys())
- if len(indices) == 1:
- ndx = indices[0]
- var = repn[-1][ndx]
- referenced_vars.add(var)
- cplex_var = self._pyomo_var_to_ndx_map[var]
- new_expr.q_variables1.append(cplex_var)
- new_expr.q_variables2.append(cplex_var)
- else:
- ndx = indices[0]
- var = repn[-1][ndx]
- referenced_vars.add(var)
- cplex_var = self._pyomo_var_to_ndx_map[var]
- new_expr.q_variables1.append(cplex_var)
- ndx = indices[1]
- var = repn[-1][ndx]
- referenced_vars.add(var)
- cplex_var = self._pyomo_var_to_ndx_map[var]
- new_expr.q_variables2.append(cplex_var)
+ new_expr.offset = repn.constant
return new_expr, referenced_vars
def _get_expr_from_pyomo_expr(self, expr, max_degree=2):
- repn = generate_canonical_repn(expr)
+ if max_degree == 2:
+ repn = generate_standard_repn(expr, quadratic=True)
+ else:
+ repn = generate_standard_repn(expr, quadratic=False)
try:
cplex_expr, referenced_vars = self._get_expr_from_pyomo_repn(repn, max_degree)
@@ -319,10 +292,6 @@ def _add_constraint(self, con):
cplex_expr, referenced_vars = self._get_expr_from_pyomo_repn(
con.canonical_form(),
self._max_constraint_degree)
- elif isinstance(con, LinearCanonicalRepn):
- cplex_expr, referenced_vars = self._get_expr_from_pyomo_repn(
- con,
- self._max_constraint_degree)
else:
cplex_expr, referenced_vars = self._get_expr_from_pyomo_expr(
con.body,
diff --git a/pyomo/solvers/plugins/solvers/cplex_persistent.py b/pyomo/solvers/plugins/solvers/cplex_persistent.py
index 5d60147f332..bd88012d086 100644
--- a/pyomo/solvers/plugins/solvers/cplex_persistent.py
+++ b/pyomo/solvers/plugins/solvers/cplex_persistent.py
@@ -8,14 +8,14 @@
# This software is distributed under the 3-clause BSD License.
# ___________________________________________________________________________
+from pyomo.core.expr.numvalue import value
from pyomo.core.base.PyomoModel import ConcreteModel
-from pyomo.solvers.plugins.solvers.cplex_direct import CPLEXDirect
-from pyomo.solvers.plugins.solvers.persistent_solver import PersistentSolver
-from pyomo.util.plugin import alias
from pyomo.core.base.constraint import Constraint
from pyomo.core.base.var import Var
from pyomo.core.base.sos import SOSConstraint
-from pyomo.core.kernel.numvalue import value
+from pyomo.solvers.plugins.solvers.cplex_direct import CPLEXDirect
+from pyomo.solvers.plugins.solvers.persistent_solver import PersistentSolver
+from pyomo.util.plugin import alias
class CPLEXPersistent(PersistentSolver, CPLEXDirect):
diff --git a/pyomo/solvers/plugins/solvers/gurobi_direct.py b/pyomo/solvers/plugins/solvers/gurobi_direct.py
index a6c12114224..4946e036739 100644
--- a/pyomo/solvers/plugins/solvers/gurobi_direct.py
+++ b/pyomo/solvers/plugins/solvers/gurobi_direct.py
@@ -14,11 +14,11 @@
import pyutilib.services
from pyutilib.misc import Bunch
from pyomo.util.plugin import alias
-from pyomo.core.kernel.numvalue import is_fixed
-from pyomo.repn import generate_canonical_repn, LinearCanonicalRepn, canonical_degree
+from pyomo.core.expr.numvalue import is_fixed
+from pyomo.core.expr.numvalue import value
+from pyomo.repn import generate_standard_repn
from pyomo.solvers.plugins.solvers.direct_solver import DirectSolver
from pyomo.solvers.plugins.solvers.direct_or_persistent_solver import DirectOrPersistentSolver
-from pyomo.core.kernel.numvalue import value
import pyomo.core.kernel
from pyomo.core.kernel.component_set import ComponentSet
from pyomo.core.kernel.component_map import ComponentMap
@@ -163,43 +163,31 @@ def _apply_solver(self):
def _get_expr_from_pyomo_repn(self, repn, max_degree=2):
referenced_vars = ComponentSet()
- degree = canonical_degree(repn)
+ degree = repn.polynomial_degree()
if (degree is None) or (degree > max_degree):
raise DegreeError('GurobiDirect does not support expressions of degree {0}.'.format(degree))
- if isinstance(repn, LinearCanonicalRepn):
- if (repn.linear is not None) and (len(repn.linear) > 0):
- list(map(referenced_vars.add, repn.variables))
- new_expr = self._gurobipy.LinExpr(repn.linear, [self._pyomo_var_to_solver_var_map[i] for i in repn.variables])
- else:
- new_expr = 0
+ if len(repn.linear_vars) > 0:
+ referenced_vars.update(repn.linear_vars)
+ new_expr = self._gurobipy.LinExpr(repn.linear_coefs, [self._pyomo_var_to_solver_var_map[i] for i in repn.linear_vars])
+ else:
+ new_expr = 0.0
- if repn.constant is not None:
- new_expr += repn.constant
+ for i,v in enumerate(repn.quadratic_vars):
+ x,y = v
+ new_expr += repn.quadratic_coefs[i] * self._pyomo_var_to_solver_var_map[x] * self._pyomo_var_to_solver_var_map[y]
+ referenced_vars.add(x)
+ referenced_vars.add(y)
- else:
- new_expr = 0
- if 0 in repn:
- new_expr += repn[0][None]
-
- if 1 in repn:
- for ndx, coeff in repn[1].items():
- new_expr += coeff * self._pyomo_var_to_solver_var_map[repn[-1][ndx]]
- referenced_vars.add(repn[-1][ndx])
-
- if 2 in repn:
- for key, coeff in repn[2].items():
- tmp_expr = coeff
- for ndx, power in key.items():
- referenced_vars.add(repn[-1][ndx])
- for i in range(power):
- tmp_expr *= self._pyomo_var_to_solver_var_map[repn[-1][ndx]]
- new_expr += tmp_expr
+ new_expr += repn.constant
return new_expr, referenced_vars
def _get_expr_from_pyomo_expr(self, expr, max_degree=2):
- repn = generate_canonical_repn(expr)
+ if max_degree == 2:
+ repn = generate_standard_repn(expr, quadratic=True)
+ else:
+ repn = generate_standard_repn(expr, quadratic=False)
try:
gurobi_expr, referenced_vars = self._get_expr_from_pyomo_repn(repn, max_degree)
@@ -286,10 +274,10 @@ def _add_constraint(self, con):
gurobi_expr, referenced_vars = self._get_expr_from_pyomo_repn(
con.canonical_form(),
self._max_constraint_degree)
- elif isinstance(con, LinearCanonicalRepn):
- gurobi_expr, referenced_vars = self._get_expr_from_pyomo_repn(
- con,
- self._max_constraint_degree)
+ #elif isinstance(con, LinearCanonicalRepn):
+ # gurobi_expr, referenced_vars = self._get_expr_from_pyomo_repn(
+ # con,
+ # self._max_constraint_degree)
else:
gurobi_expr, referenced_vars = self._get_expr_from_pyomo_expr(
con.body,
diff --git a/pyomo/solvers/plugins/solvers/gurobi_persistent.py b/pyomo/solvers/plugins/solvers/gurobi_persistent.py
index 9e70744720e..6318b284779 100644
--- a/pyomo/solvers/plugins/solvers/gurobi_persistent.py
+++ b/pyomo/solvers/plugins/solvers/gurobi_persistent.py
@@ -12,7 +12,7 @@
from pyomo.solvers.plugins.solvers.gurobi_direct import GurobiDirect
from pyomo.solvers.plugins.solvers.persistent_solver import PersistentSolver
from pyomo.util.plugin import alias
-from pyomo.core.kernel.numvalue import value
+from pyomo.core.expr.numvalue import value
class GurobiPersistent(PersistentSolver, GurobiDirect):
diff --git a/pyomo/solvers/tests/core/performance/bilinear1.py b/pyomo/solvers/tests/core/performance/bilinear1.py
deleted file mode 100644
index 42cf1a5ce84..00000000000
--- a/pyomo/solvers/tests/core/performance/bilinear1.py
+++ /dev/null
@@ -1,15 +0,0 @@
-from pyomo.core import *
-
-def create_model(N):
- model = ConcreteModel()
-
- model.A = RangeSet(N)
- model.x = Var(model.A, bounds=(1,2))
-
- expr=sum(2*model.x[i]*model.x[i+1] for i in model.A if (i+1) in model.A)
- model.obj = Objective(expr=expr)
-
- return model
-
-def pyomo_create_model(options=None, model_options=None):
- return create_model(1000000)
diff --git a/pyomo/solvers/tests/core/performance/bilinearC100000.py b/pyomo/solvers/tests/core/performance/bilinearC100000.py
deleted file mode 100644
index abe278cb3b1..00000000000
--- a/pyomo/solvers/tests/core/performance/bilinearC100000.py
+++ /dev/null
@@ -1,17 +0,0 @@
-from pyomo.core import *
-
-def create_model(N):
- model = ConcreteModel()
-
- model.A = RangeSet(N)
- def domain_rule(model, i):
- return Reals
- model.x = Var(model.A, bounds=(1,2), domain=domain_rule)
-
- expr=sum(2*model.x[i]*model.x[i+1] for i in model.A if (i+1) in model.A)
- model.obj = Objective(expr=expr)
-
- return model
-
-def pyomo_create_model(options=None, model_options=None):
- return create_model(100000)
diff --git a/pyomo/solvers/tests/core/performance/diag1.py b/pyomo/solvers/tests/core/performance/diag1.py
deleted file mode 100644
index 7a9ff20a2ea..00000000000
--- a/pyomo/solvers/tests/core/performance/diag1.py
+++ /dev/null
@@ -1,18 +0,0 @@
-from pyomo.core import *
-
-def create_model(N):
- model = ConcreteModel()
-
- for i in range(1,N+1):
- setattr(model, 'x'+str(i), Var())
-
- expr=sum(i*getattr(model, 'x'+str(i)) for i in range(1,N+1))
- model.obj = Objective(expr=expr)
-
- for i in range(1,N+1):
- setattr(model, 'c'+str(i), Constraint(expr = (N-i+1)*getattr(model, 'x'+str(i)) >= N))
-
- return model
-
-def pyomo_create_model(options=None, model_options=None):
- return create_model(1000000)
diff --git a/pyomo/solvers/tests/core/performance/diagA100000.py b/pyomo/solvers/tests/core/performance/diagA100000.py
deleted file mode 100644
index 5a0121afde3..00000000000
--- a/pyomo/solvers/tests/core/performance/diagA100000.py
+++ /dev/null
@@ -1,19 +0,0 @@
-from pyomo.core import *
-from six.moves import xrange
-
-def create_model(N):
- model = ConcreteModel()
-
- for i in xrange(1,N+1):
- setattr(model, 'x'+str(i), Var())
-
- expr=sum(i*getattr(model, 'x'+str(i)) for i in xrange(1,N+1))
- model.obj = Objective(expr=expr)
-
- for i in xrange(1,N+1):
- setattr(model, 'c'+str(i), Constraint(expr = (N-i+1)*getattr(model, 'x'+str(i)) >= N))
-
- return model
-
-def pyomo_create_model(options=None, model_options=None):
- return create_model(100000)
diff --git a/pyomo/solvers/tests/core/problems/lp_unique1.py b/pyomo/solvers/tests/core/problems/lp_unique1.py
index 372ea6c6d2e..46f3c7ea9ff 100644
--- a/pyomo/solvers/tests/core/problems/lp_unique1.py
+++ b/pyomo/solvers/tests/core/problems/lp_unique1.py
@@ -33,7 +33,7 @@ def A_rule(model, i, j):
model.x = Var(model.N, within=NonNegativeReals)
model.y = Var(model.M, within=NonNegativeReals)
-model.cost = Objective(expr=summation(model.c, model.x))
+model.cost = Objective(expr=sum_product(model.c, model.x))
def primalcon_rule(model, i):
return sum(model.A[i,j]*model.x[j] for j in model.N) >= model.b[i]
diff --git a/pyomo/solvers/tests/core/problems/multidimen_sos1.py b/pyomo/solvers/tests/core/problems/multidimen_sos1.py
index 08650caf5b6..95f6c8cf6a9 100644
--- a/pyomo/solvers/tests/core/problems/multidimen_sos1.py
+++ b/pyomo/solvers/tests/core/problems/multidimen_sos1.py
@@ -26,7 +26,7 @@ def constraint1_rule(model,t1,t2,i):
def constraint2_rule(model,t1,t2):
return sum(model.y[t1,t2,j] for j in xrange(1,len(PIECEWISE_PTS[t1,t2]))) == 1
-model.obj = Objective(expr=summation(model.Fx), sense=maximize)
+model.obj = Objective(expr=sum_product(model.Fx), sense=maximize)
model.constraint1 = Constraint(model.ub_indices,rule=constraint1_rule)
model.constraint2 = Constraint(INDEX_SET1,INDEX_SET2,rule=constraint2_rule)
model.SOS_set_constraint = SOSConstraint(INDEX_SET1,INDEX_SET2, var=model.y, index=model.SOS_indices, sos=1)
diff --git a/pyomo/solvers/tests/core/problems/multidimen_sos2.py b/pyomo/solvers/tests/core/problems/multidimen_sos2.py
index ae3b44fd622..3014b00e56c 100644
--- a/pyomo/solvers/tests/core/problems/multidimen_sos2.py
+++ b/pyomo/solvers/tests/core/problems/multidimen_sos2.py
@@ -28,7 +28,7 @@ def constraint2_rule(model,t1,t2):
def constraint3_rule(model,t1,t2):
return sum(model.y[t1,t2,j] for j in xrange(len(PIECEWISE_PTS[t1,t2]))) == 1
-model.obj = Objective(expr=summation(model.Fx), sense=maximize)
+model.obj = Objective(expr=sum_product(model.Fx), sense=maximize)
model.constraint1 = Constraint(INDEX_SET1,INDEX_SET2,rule=constraint1_rule)
model.constraint2 = Constraint(INDEX_SET1,INDEX_SET2,rule=constraint2_rule)
model.constraint3 = Constraint(INDEX_SET1,INDEX_SET2,rule=constraint3_rule)
diff --git a/pyomo/solvers/tests/core/problems/sos1.py b/pyomo/solvers/tests/core/problems/sos1.py
index abe9bf3d472..fcd2e941756 100644
--- a/pyomo/solvers/tests/core/problems/sos1.py
+++ b/pyomo/solvers/tests/core/problems/sos1.py
@@ -24,7 +24,7 @@ def constraint1_rule(model,t,i):
def constraint2_rule(model,t):
return sum(model.y[t,j] for j in xrange(1,len(PIECEWISE_PTS[t]))) == 1
-model.obj = Objective(expr=summation(model.Fx), sense=maximize)
+model.obj = Objective(expr=sum_product(model.Fx), sense=maximize)
model.constraint1 = Constraint(model.ub_indices,rule=constraint1_rule)
model.constraint2 = Constraint(INDEX_SET,rule=constraint2_rule)
model.SOS_set_constraint = SOSConstraint(INDEX_SET, var=model.y, index=model.SOS_indices, sos=1)
diff --git a/pyomo/solvers/tests/core/problems/sos2.py b/pyomo/solvers/tests/core/problems/sos2.py
index e78c3597935..df87b5464d8 100644
--- a/pyomo/solvers/tests/core/problems/sos2.py
+++ b/pyomo/solvers/tests/core/problems/sos2.py
@@ -26,7 +26,7 @@ def constraint2_rule(model,t):
def constraint3_rule(model,t):
return sum(model.y[t,j] for j in xrange(len(PIECEWISE_PTS[t]))) == 1
-model.obj = Objective(expr=summation(model.Fx), sense=maximize)
+model.obj = Objective(expr=sum_product(model.Fx), sense=maximize)
model.constraint1 = Constraint(INDEX_SET,rule=constraint1_rule)
model.constraint2 = Constraint(INDEX_SET,rule=constraint2_rule)
model.constraint3 = Constraint(INDEX_SET,rule=constraint3_rule)
diff --git a/pyomo/solvers/tests/core/test_component_perf.py b/pyomo/solvers/tests/core/test_component_perf.py
index 36137b9d758..6c3ba8ae644 100644
--- a/pyomo/solvers/tests/core/test_component_perf.py
+++ b/pyomo/solvers/tests/core/test_component_perf.py
@@ -98,7 +98,7 @@ class TestConstraintPerformance(ComponentPerformanceBase, unittest.TestCase):
@classmethod
def _setup(self):
self._create_model(Constraint,
- **{'rule': lambda m,i: 1 <= m.x <= 2})
+ **{'rule': lambda m,i: (1, m.x, 2)})
@unittest.category('performance')
class TestObjectivePerformance(ComponentPerformanceBase, unittest.TestCase):
diff --git a/pyomo/solvers/tests/mip/model.py b/pyomo/solvers/tests/mip/model.py
index efbb2e9d597..7729c312cc8 100644
--- a/pyomo/solvers/tests/mip/model.py
+++ b/pyomo/solvers/tests/mip/model.py
@@ -17,5 +17,5 @@
model.x = Var(model.A)
def obj_rule(model):
- return summation(model.x)
+ return sum_product(model.x)
model.obj = Objective(rule=obj_rule)
diff --git a/pyomo/solvers/tests/models/LP_block.py b/pyomo/solvers/tests/models/LP_block.py
index 73bcf37d46e..527bf44f3f6 100644
--- a/pyomo/solvers/tests/models/LP_block.py
+++ b/pyomo/solvers/tests/models/LP_block.py
@@ -40,7 +40,7 @@ def _generate_model(self):
model.obj.deactivate()
model.B[2].c = Constraint(expr=-model.B[1].x <= -model.a)
model.B[2].obj = Objective(expr=model.b.x + 3.0*model.B[1].x + 2)
- model.B[3].c = Constraint(expr=2.0 <= model.b.x/model.a - model.B[1].x <= 10)
+ model.B[3].c = Constraint(expr=(2.0, model.b.x/model.a - model.B[1].x, 10))
def warmstart_model(self):
assert self.model is not None
@@ -67,5 +67,5 @@ def _generate_model(self):
model.obj.deactivate()
model.B[2].c = pmo.constraint(expr=-model.B[1].x <= -model.a)
model.B[2].obj = pmo.objective(expr=model.b.x + 3.0*model.B[1].x + 2)
- model.B[3].c = pmo.constraint(expr=2.0 <= model.b.x/model.a - model.B[1].x <= 10)
+ model.B[3].c = pmo.constraint(expr=(2.0, model.b.x/model.a - model.B[1].x, 10))
diff --git a/pyomo/solvers/tests/models/LP_simple.py b/pyomo/solvers/tests/models/LP_simple.py
index 289b6631078..daa9f3260d2 100644
--- a/pyomo/solvers/tests/models/LP_simple.py
+++ b/pyomo/solvers/tests/models/LP_simple.py
@@ -48,9 +48,9 @@ def _generate_model(self):
model.obj = Objective(expr=model.p + model.inactive_obj)
model.c1 = Constraint(expr=model.dummy_expr1 <= model.dummy_expr2)
- model.c2 = Constraint(expr=2.0 <= model.x/model.a3 - model.y <= 10)
- model.c3 = Constraint(expr=0 <= model.z1 + 1 <= 10)
- model.c4 = Constraint(expr=-10 <= model.z2 + 1 <= 0)
+ model.c2 = Constraint(expr=(2.0, model.x/model.a3 - model.y, 10))
+ model.c3 = Constraint(expr=(0, model.z1 + 1, 10))
+ model.c4 = Constraint(expr=(-10, model.z2 + 1, 0))
def warmstart_model(self):
assert self.model is not None
@@ -86,6 +86,6 @@ def _generate_model(self):
model.obj = pmo.objective(model.p + model.inactive_obj)
model.c1 = pmo.constraint(model.dummy_expr1 <= pmo.noclone(model.dummy_expr2))
- model.c2 = pmo.constraint(2.0 <= model.x/model.a3 - model.y <= 10)
- model.c3 = pmo.constraint(0 <= model.z1 + 1 <= 10)
- model.c4 = pmo.constraint(-10 <= model.z2 + 1 <= 0)
+ model.c2 = pmo.constraint((2.0, model.x/model.a3 - model.y, 10))
+ model.c3 = pmo.constraint((0, model.z1 + 1, 10))
+ model.c4 = pmo.constraint((-10, model.z2 + 1, 0))
diff --git a/pyomo/solvers/tests/models/LP_unique_duals.py b/pyomo/solvers/tests/models/LP_unique_duals.py
index a86c94681a0..1fd416f358e 100644
--- a/pyomo/solvers/tests/models/LP_unique_duals.py
+++ b/pyomo/solvers/tests/models/LP_unique_duals.py
@@ -65,7 +65,7 @@ def _generate_model(self):
model.x = Var(model.N, within=NonNegativeReals)
model.y = Var(model.M, within=NonNegativeReals)
- model.cost = Objective(expr=summation(model.c, model.x))
+ model.cost = Objective(expr=sum_product(model.c, model.x))
model.primalcon = Constraint(model.M, rule=primalcon_rule)
diff --git a/pyomo/solvers/tests/models/LP_unused_vars.py b/pyomo/solvers/tests/models/LP_unused_vars.py
index aeb7c4a072a..1aab915a5c7 100644
--- a/pyomo/solvers/tests/models/LP_unused_vars.py
+++ b/pyomo/solvers/tests/models/LP_unused_vars.py
@@ -9,7 +9,7 @@
# ___________________________________________________________________________
import pyomo.kernel as pmo
-from pyomo.core import ConcreteModel, Param, Var, Expression, Objective, Constraint, Set, ConstraintList, summation, Block
+from pyomo.core import ConcreteModel, Param, Var, Expression, Objective, Constraint, Set, ConstraintList, sum_product, Block
from pyomo.solvers.tests.models.base import _BaseTestModel, register_model
@register_model
@@ -61,8 +61,8 @@ def _generate_model(self):
model.obj = Objective(expr= model.x + \
model.x_initialy_stale + \
- summation(model.X) + \
- summation(model.X_initialy_stale))
+ sum_product(model.X) + \
+ sum_product(model.X_initialy_stale))
model.c = ConstraintList()
model.c.add( model.x >= 1 )
diff --git a/pyomo/solvers/tests/models/MILP_simple.py b/pyomo/solvers/tests/models/MILP_simple.py
index 1a293c57bdb..cb49de5b613 100644
--- a/pyomo/solvers/tests/models/MILP_simple.py
+++ b/pyomo/solvers/tests/models/MILP_simple.py
@@ -37,7 +37,7 @@ def _generate_model(self):
model.obj = Objective(expr=model.x + 3.0*model.y)
model.c1 = Constraint(expr=model.a <= model.y)
- model.c2 = Constraint(expr=2.0 <= model.x/model.a - model.y <= 10)
+ model.c2 = Constraint(expr=(2.0, model.x/model.a - model.y, 10))
def warmstart_model(self):
assert self.model is not None
@@ -59,4 +59,4 @@ def _generate_model(self):
model.obj = pmo.objective(model.x + 3.0*model.y)
model.c1 = pmo.constraint(model.a <= model.y)
- model.c2 = pmo.constraint(2.0 <= model.x/model.a - model.y <= 10)
+ model.c2 = pmo.constraint((2.0, model.x/model.a - model.y, 10))
diff --git a/pyomo/solvers/tests/models/MILP_unused_vars.py b/pyomo/solvers/tests/models/MILP_unused_vars.py
index 65a26a02bd1..3d024346892 100644
--- a/pyomo/solvers/tests/models/MILP_unused_vars.py
+++ b/pyomo/solvers/tests/models/MILP_unused_vars.py
@@ -9,7 +9,7 @@
# ___________________________________________________________________________
import pyomo.kernel as pmo
-from pyomo.core import ConcreteModel, Param, Var, Expression, Objective, Constraint, ConstraintList, Set, Integers, IntegerInterval, summation, Block
+from pyomo.core import ConcreteModel, Param, Var, Expression, Objective, Constraint, ConstraintList, Set, Integers, IntegerInterval, sum_product, Block
from pyomo.solvers.tests.models.base import _BaseTestModel, register_model
@register_model
@@ -60,8 +60,8 @@ def _generate_model(self):
model.obj = Objective(expr= model.x + \
model.x_initialy_stale + \
- summation(model.X) + \
- summation(model.X_initialy_stale))
+ sum_product(model.X) + \
+ sum_product(model.X_initialy_stale))
model.c = ConstraintList()
model.c.add( model.x >= 1 )
diff --git a/pyomo/solvers/tests/models/MIQP_simple.py b/pyomo/solvers/tests/models/MIQP_simple.py
index 006d6e48673..a621ff1ecfc 100644
--- a/pyomo/solvers/tests/models/MIQP_simple.py
+++ b/pyomo/solvers/tests/models/MIQP_simple.py
@@ -38,7 +38,7 @@ def _generate_model(self):
model.obj = Objective(expr=model.x**2 + 3.0*model.y**2)
model.c1 = Constraint(expr=model.a <= model.y)
- model.c2 = Constraint(expr=2.0 <= model.x/model.a - model.y <= 10)
+ model.c2 = Constraint(expr=(2.0, model.x/model.a - model.y, 10))
def warmstart_model(self):
assert self.model is not None
@@ -70,4 +70,4 @@ def _generate_model(self):
model.obj = pmo.objective(model.x**2 + 3.0*model.y**2)
model.c1 = pmo.constraint(model.a <= model.y)
- model.c2 = pmo.constraint(2.0 <= model.x/model.a - model.y <= 10)
+ model.c2 = pmo.constraint((2.0, model.x/model.a - model.y, 10))
diff --git a/pyomo/solvers/tests/models/QP_simple.py b/pyomo/solvers/tests/models/QP_simple.py
index 41e58549385..86a783a9504 100644
--- a/pyomo/solvers/tests/models/QP_simple.py
+++ b/pyomo/solvers/tests/models/QP_simple.py
@@ -41,7 +41,7 @@ def _generate_model(self):
model.inactive_obj.deactivate()
model.obj = Objective(expr=model.x**2 + 3.0*model.inactive_obj**2 + 1.0)
model.c1 = Constraint(expr=model.a <= model.y)
- model.c2 = Constraint(expr=2.0 <= model.x/model.a - model.y <= 10)
+ model.c2 = Constraint(expr=(2.0, model.x/model.a - model.y, 10))
def warmstart_model(self):
assert self.model is not None
@@ -87,7 +87,7 @@ def _generate_model(self):
model.inactive_obj.deactivate()
model.obj = pmo.objective(model.x**2 + 3.0*model.inactive_obj**2 + 1.0)
model.c1 = pmo.constraint(model.a <= model.y)
- model.c2 = pmo.constraint(2.0 <= model.x/model.a - model.y <= 10)
+ model.c2 = pmo.constraint((2.0, model.x/model.a - model.y, 10))
@register_model
class QP_simple_nosuffixes_kernel(QP_simple_kernel):
diff --git a/pyomo/solvers/tests/models/SOS1_simple.py b/pyomo/solvers/tests/models/SOS1_simple.py
index ff4b9751274..4921e42950b 100644
--- a/pyomo/solvers/tests/models/SOS1_simple.py
+++ b/pyomo/solvers/tests/models/SOS1_simple.py
@@ -9,7 +9,7 @@
# ___________________________________________________________________________
import pyomo.kernel as pmo
-from pyomo.core import ConcreteModel, Param, Var, Expression, Objective, Constraint, NonNegativeReals, SOSConstraint, summation
+from pyomo.core import ConcreteModel, Param, Var, Expression, Objective, Constraint, NonNegativeReals, SOSConstraint, sum_product
from pyomo.solvers.tests.models.base import _BaseTestModel, register_model
@register_model
@@ -37,9 +37,9 @@ def _generate_model(self):
model.obj = Objective(expr=model.x + model.y[1]+2*model.y[2])
model.c1 = Constraint(expr=model.a <= model.y[2])
- model.c2 = Constraint(expr=2.0 <= model.x <= 10.0)
+ model.c2 = Constraint(expr=(2.0, model.x, 10.0))
model.c3 = SOSConstraint(var=model.y, index=[1,2], sos=1)
- model.c4 = Constraint(expr=summation(model.y) == 1)
+ model.c4 = Constraint(expr=sum_product(model.y) == 1)
# Make an empty SOSConstraint
model.c5 = SOSConstraint(var=model.y, index=[1,2], sos=1)
@@ -69,7 +69,7 @@ def _generate_model(self):
model.obj = pmo.objective(model.x + model.y[1]+2*model.y[2])
model.c1 = pmo.constraint(model.a <= model.y[2])
- model.c2 = pmo.constraint(2.0 <= model.x <= 10.0)
+ model.c2 = pmo.constraint((2.0, model.x, 10.0))
model.c3 = pmo.sos1(model.y.values())
model.c4 = pmo.constraint(sum(model.y.values()) == 1)
diff --git a/pyomo/solvers/tests/models/SOS2_simple.py b/pyomo/solvers/tests/models/SOS2_simple.py
index d1a089448bf..61ec6b0bb8d 100644
--- a/pyomo/solvers/tests/models/SOS2_simple.py
+++ b/pyomo/solvers/tests/models/SOS2_simple.py
@@ -9,7 +9,7 @@
# ___________________________________________________________________________
import pyomo.kernel as pmo
-from pyomo.core import ConcreteModel, Param, Var, Expression, Objective, Constraint, SOSConstraint, NonNegativeReals, ConstraintList, summation
+from pyomo.core import ConcreteModel, Param, Var, Expression, Objective, Constraint, SOSConstraint, NonNegativeReals, ConstraintList, sum_product
from pyomo.solvers.tests.models.base import _BaseTestModel, register_model
@register_model
@@ -46,13 +46,13 @@ def _generate_model(self):
model.lmbda = Var([1,2,3])
model.obj = Objective(expr=model.p+model.n)
model.c1 = ConstraintList()
- model.c1.add(0.0 <= model.lmbda[1] <= 1.0)
- model.c1.add(0.0 <= model.lmbda[2] <= 1.0)
+ model.c1.add((0.0, model.lmbda[1], 1.0))
+ model.c1.add((0.0, model.lmbda[2], 1.0))
model.c1.add(0.0 <= model.lmbda[3])
model.c2 = SOSConstraint(var=model.lmbda, index=[1,2,3], sos=2)
- model.c3 = Constraint(expr=summation(model.lmbda) == 1)
- model.c4 = Constraint(expr=model.f==summation(model.fi,model.lmbda))
- model.c5 = Constraint(expr=model.x==summation(model.xi,model.lmbda))
+ model.c3 = Constraint(expr=sum_product(model.lmbda) == 1)
+ model.c4 = Constraint(expr=model.f==sum_product(model.fi,model.lmbda))
+ model.c5 = Constraint(expr=model.x==sum_product(model.xi,model.lmbda))
model.x = 2.75
model.x.fixed = True
@@ -95,8 +95,8 @@ def _generate_model(self):
model.lmbda = pmo.create_variable_dict(range(1,4))
model.obj = pmo.objective(model.p+model.n)
model.c1 = pmo.constraint_dict()
- model.c1[1] = pmo.constraint(0.0 <= model.lmbda[1] <= 1.0)
- model.c1[2] = pmo.constraint(0.0 <= model.lmbda[2] <= 1.0)
+ model.c1[1] = pmo.constraint((0.0, model.lmbda[1], 1.0))
+ model.c1[2] = pmo.constraint((0.0, model.lmbda[2], 1.0))
model.c1[3] = pmo.constraint(0.0 <= model.lmbda[3])
model.c2 = pmo.sos2(model.lmbda.values())
model.c3 = pmo.constraint(sum(model.lmbda.values()) == 1)
diff --git a/pyomo/solvers/tests/piecewise_linear/indexed_nonlinear.nl b/pyomo/solvers/tests/piecewise_linear/indexed_nonlinear.nl
index f4c073899fc..a12b1bdb6f7 100644
--- a/pyomo/solvers/tests/piecewise_linear/indexed_nonlinear.nl
+++ b/pyomo/solvers/tests/piecewise_linear/indexed_nonlinear.nl
@@ -39,10 +39,10 @@ k3 #intermediate Jacobian column lengths
3
J0 2
0 -0.1
-2 1.0
+2 1
J1 2
1 -0.1
-3 1.0
+3 1
G0 2
2 1
3 1
diff --git a/pyomo/solvers/tests/piecewise_linear/problems/concave_multi_vararray1.py b/pyomo/solvers/tests/piecewise_linear/problems/concave_multi_vararray1.py
index c80baeaa5a2..f6ffb43b434 100644
--- a/pyomo/solvers/tests/piecewise_linear/problems/concave_multi_vararray1.py
+++ b/pyomo/solvers/tests/piecewise_linear/problems/concave_multi_vararray1.py
@@ -36,7 +36,7 @@ def define_model(**kwds):
model.Fx = Var(INDEX_SET1, INDEX_SET2) # range variable
model.p = Param(INDEX_SET1, INDEX_SET2, initialize=1.0)
- model.obj = Objective(expr=summation(model.Fx), sense=kwds.pop('sense',maximize))
+ model.obj = Objective(expr=sum_product(model.Fx), sense=kwds.pop('sense',maximize))
model.piecewise = Piecewise(INDEX_SET1,INDEX_SET2,model.Fx,model.x,
pw_pts=DOMAIN_PTS,
diff --git a/pyomo/solvers/tests/piecewise_linear/problems/concave_multi_vararray2.py b/pyomo/solvers/tests/piecewise_linear/problems/concave_multi_vararray2.py
index d4b014ce18f..070eddd6d68 100644
--- a/pyomo/solvers/tests/piecewise_linear/problems/concave_multi_vararray2.py
+++ b/pyomo/solvers/tests/piecewise_linear/problems/concave_multi_vararray2.py
@@ -35,7 +35,7 @@ def define_model(**kwds):
model.Fx = Var(INDEX_SET) # range variable
model.p = Param(INDEX_SET, initialize=1.0)
- model.obj = Objective(expr=summation(model.Fx), sense=kwds.pop('sense',maximize))
+ model.obj = Objective(expr=sum_product(model.Fx), sense=kwds.pop('sense',maximize))
model.piecewise = Piecewise(INDEX_SET,model.Fx,model.x,
pw_pts=DOMAIN_PTS,
diff --git a/pyomo/solvers/tests/piecewise_linear/problems/concave_vararray.py b/pyomo/solvers/tests/piecewise_linear/problems/concave_vararray.py
index 62a7128894f..25441bd4013 100644
--- a/pyomo/solvers/tests/piecewise_linear/problems/concave_vararray.py
+++ b/pyomo/solvers/tests/piecewise_linear/problems/concave_vararray.py
@@ -35,7 +35,7 @@ def define_model(**kwds):
model.Fx = Var(INDEX_SET) # range variable
model.p = Param(INDEX_SET, initialize=1.0)
- model.obj = Objective(expr=summation(model.Fx), sense=kwds.pop('sense',maximize))
+ model.obj = Objective(expr=sum_product(model.Fx), sense=kwds.pop('sense',maximize))
model.piecewise = Piecewise(INDEX_SET,model.Fx,model.x,
pw_pts=DOMAIN_PTS,
diff --git a/pyomo/solvers/tests/piecewise_linear/problems/convex_multi_vararray1.py b/pyomo/solvers/tests/piecewise_linear/problems/convex_multi_vararray1.py
index 6d2dff4d10d..c3f2465c9f6 100644
--- a/pyomo/solvers/tests/piecewise_linear/problems/convex_multi_vararray1.py
+++ b/pyomo/solvers/tests/piecewise_linear/problems/convex_multi_vararray1.py
@@ -38,7 +38,7 @@ def define_model(**kwds):
model.Fx = Var(INDEX_SET1, INDEX_SET2) # range variable
model.p = Param(INDEX_SET1, INDEX_SET2, initialize=1.0)
- model.obj = Objective(expr=summation(model.Fx), sense=kwds.pop('sense',maximize))
+ model.obj = Objective(expr=sum_product(model.Fx), sense=kwds.pop('sense',maximize))
model.piecewise = Piecewise(INDEX_SET1,INDEX_SET2,model.Fx,model.x,
pw_pts=DOMAIN_PTS,
diff --git a/pyomo/solvers/tests/piecewise_linear/problems/convex_multi_vararray2.py b/pyomo/solvers/tests/piecewise_linear/problems/convex_multi_vararray2.py
index 320f4371635..170ec987a03 100644
--- a/pyomo/solvers/tests/piecewise_linear/problems/convex_multi_vararray2.py
+++ b/pyomo/solvers/tests/piecewise_linear/problems/convex_multi_vararray2.py
@@ -36,7 +36,7 @@ def define_model(**kwds):
model.Fx = Var(INDEX_SET) # range variable
model.p = Param(INDEX_SET, initialize=1.0)
- model.obj = Objective(expr=summation(model.Fx), sense=kwds.pop('sense',maximize))
+ model.obj = Objective(expr=sum_product(model.Fx), sense=kwds.pop('sense',maximize))
model.piecewise = Piecewise(INDEX_SET,model.Fx,model.x,
pw_pts=DOMAIN_PTS,
diff --git a/pyomo/solvers/tests/piecewise_linear/problems/convex_vararray.py b/pyomo/solvers/tests/piecewise_linear/problems/convex_vararray.py
index 6e2c18e459b..3a9813d0c76 100644
--- a/pyomo/solvers/tests/piecewise_linear/problems/convex_vararray.py
+++ b/pyomo/solvers/tests/piecewise_linear/problems/convex_vararray.py
@@ -37,7 +37,7 @@ def define_model(**kwds):
model.Fx = Var(INDEX_SET) # range variable
model.p = Param(INDEX_SET,initialize=1.0)
- model.obj = Objective(expr=summation(model.Fx), sense=kwds.pop('sense',maximize))
+ model.obj = Objective(expr=sum_product(model.Fx), sense=kwds.pop('sense',maximize))
model.piecewise = Piecewise(INDEX_SET,model.Fx,model.x,
pw_pts=DOMAIN_PTS,
diff --git a/pyomo/solvers/tests/piecewise_linear/problems/piecewise_multi_vararray.py b/pyomo/solvers/tests/piecewise_linear/problems/piecewise_multi_vararray.py
index 5398b597c77..b6ef0b30ad6 100644
--- a/pyomo/solvers/tests/piecewise_linear/problems/piecewise_multi_vararray.py
+++ b/pyomo/solvers/tests/piecewise_linear/problems/piecewise_multi_vararray.py
@@ -33,7 +33,7 @@ def define_model(**kwds):
model.Fx = Var(INDEX_SET1, INDEX_SET2) # range variable
model.p = Param(INDEX_SET1, INDEX_SET2, initialize=1.0)
- model.obj = Objective(expr=summation(model.Fx), sense=kwds.pop('sense',maximize))
+ model.obj = Objective(expr=sum_product(model.Fx), sense=kwds.pop('sense',maximize))
model.piecewise = Piecewise(INDEX_SET1,INDEX_SET2,model.Fx,model.x,
pw_pts=DOMAIN_PTS,
diff --git a/pyomo/solvers/tests/piecewise_linear/problems/piecewise_vararray.py b/pyomo/solvers/tests/piecewise_linear/problems/piecewise_vararray.py
index a5d1334251b..dc74878eba0 100644
--- a/pyomo/solvers/tests/piecewise_linear/problems/piecewise_vararray.py
+++ b/pyomo/solvers/tests/piecewise_linear/problems/piecewise_vararray.py
@@ -32,7 +32,7 @@ def define_model(**kwds):
model.Fx = Var(INDEX_SET) # range variable
model.p = Param(INDEX_SET, initialize=1.0, mutable=True)
- model.obj = Objective(expr=summation(model.Fx), sense=kwds.pop('sense',maximize))
+ model.obj = Objective(expr=sum_product(model.Fx), sense=kwds.pop('sense',maximize))
model.piecewise = Piecewise(INDEX_SET,model.Fx,model.x,
pw_pts=DOMAIN_PTS,
diff --git a/pyomo/solvers/tests/piecewise_linear/problems/step_vararray.py b/pyomo/solvers/tests/piecewise_linear/problems/step_vararray.py
index 627719b6e67..ed4c81f8248 100644
--- a/pyomo/solvers/tests/piecewise_linear/problems/step_vararray.py
+++ b/pyomo/solvers/tests/piecewise_linear/problems/step_vararray.py
@@ -30,7 +30,7 @@ def define_model(**kwds):
model.Fx = Var(INDEX) # range variable
- model.obj = Objective(expr=summation(model.Fx)+summation(model.x), sense=kwds.pop('sense',maximize))
+ model.obj = Objective(expr=sum_product(model.Fx)+sum_product(model.x), sense=kwds.pop('sense',maximize))
model.piecewise = Piecewise(INDEX,model.Fx,model.x,
pw_pts=DOMAIN_PTS,
diff --git a/setup.py b/setup.py
index 4eaf47d8f8a..3befe70fde6 100644
--- a/setup.py
+++ b/setup.py
@@ -50,6 +50,35 @@ def read(*rnames):
requires.append('ordereddict')
from setuptools import setup
+import sys
+
+if 'develop' in sys.argv:
+ using_cython = False
+else:
+ using_cython = True
+if '--with-cython' in sys.argv:
+ using_cython = True
+ sys.argv.remove('--with-cython')
+
+ext_modules = []
+if using_cython:
+ try:
+ import platform
+ if not platform.python_implementation() == "CPython":
+ raise RuntimeError()
+ from Cython.Build import cythonize
+ #
+ # Note: The Cython developers recommend that you destribute C source
+ # files to users. But this is fine for evaluating the utility of Cython
+ #
+ import shutil
+ files = ["pyomo/core/expr/expr_pyomo5.pyx", "pyomo/core/expr/numvalue.pyx", "pyomo/core/util.pyx", "pyomo/repn/standard_repn.pyx"]
+ for f in files:
+ shutil.copyfile(f[:-1], f)
+ ext_modules = cythonize(files)
+ except:
+ using_cython = False
+
packages = _find_packages('pyomo')
setup(name='Pyomo',
@@ -94,6 +123,7 @@ def read(*rnames):
packages=packages,
keywords=['optimization'],
install_requires=requires,
+ ext_modules = ext_modules,
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
entry_points="""
[console_scripts]